/* =====================================================
   American Fyre — Admin
   ===================================================== */
:root {
  --admin-bg:    #f4eee2;
  --admin-side:  #0e0d0c;
  --admin-side-2:#161412;
}

.admin-body {
  margin: 0;
  display: flex;
  min-height: 100vh;
  background: var(--admin-bg);
  font-family: 'DM Sans', system-ui, sans-serif;
}

/* ---- Auth ---- */
.admin-body--auth {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(216,58,28,.25), transparent 50%),
    radial-gradient(circle at 20% 90%, rgba(245,180,0,.18), transparent 45%),
    #0e0d0c;
  padding: 2rem 1rem;
}
.auth-card {
  background: #fff;
  padding: 2.5rem;
  border-radius: 18px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.auth-card h1 { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; letter-spacing: .04em; margin: 1.5rem 0 .25rem; }
.auth-card form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.auth-card label { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; font-weight: 600; color: #4a443e; }
.auth-card input {
  padding: .75rem 1rem;
  border: 1px solid #d8cfbe;
  border-radius: 10px;
  font: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.auth-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(216,58,28,.12); }
.auth-card .small { font-size: .8rem; margin-top: 1rem; line-height: 1.5; }
.auth-card code { background: #f4eee2; padding: 1px 6px; border-radius: 4px; font-size: .8rem; }

/* ---- Sidebar ---- */
.admin-side {
  width: 260px; flex-shrink: 0;
  background: var(--admin-side);
  color: rgba(255,255,255,.7);
  padding: 1.75rem 1.25rem 1.25rem;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.admin-side .brand { color: #fff; margin-bottom: 2rem; }
.admin-nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.admin-nav a {
  color: rgba(255,255,255,.65);
  padding: .7rem 1rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: .95rem;
  transition: background-color .2s, color .2s;
}
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.admin-nav a.is-active {
  background: var(--primary);
  color: #fff;
}
.admin-side__foot {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap;
}
.admin-side__foot strong { color: #fff; display: block; font-size: .9rem; }
.admin-side__foot small { color: rgba(255,255,255,.5); font-size: .75rem; word-break: break-all; }
.admin-side__foot .btn-ghost { color: #fff; border-color: rgba(255,255,255,.2); }
.admin-side__foot .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ---- Main ---- */
.admin-main { flex: 1; padding: 2rem 2.5rem 4rem; min-width: 0; }
.admin-topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0d6c2;
}
.admin-topbar h1 { font-family: 'Bebas Neue', sans-serif; letter-spacing: .04em; font-size: 2rem; margin: 0; }

.panel {
  background: #fff;
  border: 1px solid #e0d6c2;
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.panel__head h2 { margin: 0; font-family: 'DM Sans', sans-serif; font-size: 1.15rem; font-weight: 700; }
.panel h2 { font-family: 'DM Sans', sans-serif; font-size: 1.1rem; font-weight: 700; margin: 0 0 1.25rem; }
.panel h3 { font-family: 'DM Sans', sans-serif; font-size: .95rem; font-weight: 700; margin: 1rem 0 .5rem; }

/* ---- Stats ---- */
.stats-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1.5rem;
}
.stat-card {
  background: #fff;
  border: 1px solid #e0d6c2;
  border-radius: 14px;
  padding: 1.5rem;
  display: flex; flex-direction: column;
}
.stat-card__num { font-family: 'Bebas Neue', sans-serif; font-size: 3rem; line-height: 1; color: var(--primary-d); }
.stat-card__lbl { font-weight: 600; margin-top: .25rem; }
.stat-card small { color: #786f63; font-size: .8rem; margin-top: .25rem; }
.stat-card--cta { background: var(--ink); color: #fff; }
.stat-card--cta strong { display: block; margin-bottom: .75rem; font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; letter-spacing: .04em; }
.stat-card--cta .btn { margin: .25rem .5rem .25rem 0; }

/* ---- Tabla ---- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: .85rem .75rem;
  border-bottom: 1px solid #ede5d3;
  vertical-align: middle;
}
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: #786f63; }
.table tbody tr:hover { background: #faf6ee; }
.table code { font-size: .8rem; background: #faf6ee; padding: 1px 6px; border-radius: 4px; }

.pill {
  display: inline-block;
  font-size: .7rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: #ede5d3;
  color: #4a443e;
  font-weight: 600;
  margin-right: .25rem;
}
.pill--ok   { background: #d8f0e1; color: #1b5e3c; }
.pill--gold { background: #fbe5a8; color: #6d4d00; }

.actions { white-space: nowrap; }
.btn-ghost--danger { color: var(--err); border-color: rgba(192,57,43,.3); }
.btn-ghost--danger:hover { background: var(--err); color: #fff; border-color: var(--err); }

/* ---- Forms ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem 2rem;
}
.form-grid--single { grid-template-columns: 1fr; }
.form-col { display: flex; flex-direction: column; gap: .9rem; }
.form-col--side { background: #faf6ee; border: 1px solid #ede5d3; padding: 1.25rem; border-radius: 12px; }
.form-foot {
  grid-column: 1 / -1;
  display: flex; justify-content: flex-end; gap: .75rem;
  padding-top: 1rem;
  border-top: 1px solid #ede5d3;
}
.form-foot--sticky {
  position: sticky; bottom: 0;
  background: rgba(244,238,226,.95);
  backdrop-filter: blur(8px);
  padding: 1rem 0;
  margin: 0 -2.5rem;
  padding-inline: 2.5rem;
  border-top: 1px solid #e0d6c2;
}

.admin-content label {
  display: flex; flex-direction: column;
  gap: .35rem;
  font-size: .85rem; font-weight: 600; color: #4a443e;
}
.admin-content input[type="text"],
.admin-content input[type="email"],
.admin-content input[type="password"],
.admin-content input[type="number"],
.admin-content input[type="tel"],
.admin-content input[type="search"],
.admin-content select,
.admin-content textarea {
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid #d8cfbe;
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: #0e0d0c;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.admin-content input:focus,
.admin-content select:focus,
.admin-content textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(216,58,28,.12); }
.admin-content textarea { resize: vertical; min-height: 80px; }
.admin-content input[type="file"] { padding: .5rem 0; border: 0; background: transparent; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chk-row { display: flex; flex-wrap: wrap; gap: 1.25rem; padding-top: .5rem; }
.chk { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; color: #0e0d0c; }
.chk input { width: auto; }

.img-preview {
  width: 100%;
  aspect-ratio: 1/1;
  background: #fff;
  border: 1px dashed #d8cfbe;
  border-radius: 12px;
  margin-bottom: 1rem;
  display: grid; place-items: center;
  overflow: hidden;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .admin-side {
    position: static; height: auto;
    width: 100%;
    padding: 1rem;
    flex-direction: row; flex-wrap: wrap; gap: .5rem;
  }
  .admin-side .brand { margin: 0; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .admin-nav a { flex: 1; text-align: center; padding: .5rem .75rem; font-size: .85rem; }
  .admin-side__foot { width: 100%; border-top: 0; padding: 0; }
  .admin-body { flex-direction: column; }
  .admin-main { padding: 1.5rem 1rem 3rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-foot--sticky { margin: 0 -1rem; padding-inline: 1rem; }
}
