/* ============================================================
   SECRETS MATCH · APP SHELL
   Capa compartida para las páginas internas (post-login).
   Usa tokens.css y typography.css como base.
   Product register — sin display italic, sin grain, sin kinetic.
   ============================================================ */

/* ─────────── Layout container ─────────── */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 96px;
}

/* ─────────── Cards / surfaces ─────────── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.card-pad {
  padding: 16px;
}

.card + .card { margin-top: 12px; }

/* hairline list dentro de .card */
.list > * + * {
  border-top: 1px solid var(--border);
}

/* ─────────── List rows (settings, ships, feeds) ─────────── */
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: var(--text);
  background: transparent;
  transition: background-color var(--dur-fast) var(--ease-out);
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.row:hover { background: var(--bg-surface); }
.row-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--bg-surface);
  color: var(--text-muted);
  flex-shrink: 0;
}
.row-icon svg { width: 18px; height: 18px; }
.row-body { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 500; color: var(--text); }
.row-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.row-chev { color: var(--text-faint); flex-shrink: 0; }
.row-chev::after { content: "›"; font-size: 20px; line-height: 1; }

/* ─────────── Avatar tiles ─────────── */
.avatar {
  border-radius: var(--r-md);
  background: var(--bg-surface);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 22px;
}
.avatar-md { width: 56px; height: 56px; }
.avatar-lg { width: 72px; height: 72px; }

/* ─────────── Eyebrow / labels ─────────── */
.label-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ─────────── Buttons (product) ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.btn-primary {
  background: var(--accent);
  color: var(--bone-50);
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-surface); }
.btn-block { width: 100%; }

/* ─────────── Badges / chips ─────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.chip-verified { background: var(--crimson-alpha-25); color: var(--crimson-300); border-color: var(--crimson-alpha-60); }
.chip-pro { background: var(--bone-50); color: var(--noir-950); border-color: var(--bone-50); }
.chip-unread {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--bone-50);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ─────────── Inputs / search ─────────── */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
}
.search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: inherit;
  font: inherit;
  font-size: 14px;
}
.search input::placeholder { color: var(--text-faint); }
.search svg { color: var(--text-faint); width: 18px; height: 18px; flex-shrink: 0; }

.input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.input:focus { outline: none; border-color: var(--accent); }
.input::placeholder { color: var(--text-faint); }

/* ─────────── Empty states ─────────── */
.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-faint);
}
.empty-icon {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1;
}
.empty-title { color: var(--text-muted); font-size: 14px; }
.empty-sub { font-size: 12px; margin-top: 6px; }

/* ─────────── Header bar ─────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.app-header h1 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

/* ─────────── Bottom nav (compartido) ─────────── */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--noir-alpha-90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-2);
  z-index: var(--z-sticky);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { color: var(--text-muted); }
.nav-item.active { color: var(--accent); background: var(--crimson-alpha-25); }

/* ─────────── Banners (verify, warning) ─────────── */
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--crimson-alpha-25);
  border: 1px solid var(--crimson-alpha-60);
  color: var(--text);
}
.banner-icon {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--bone-50);
  flex-shrink: 0;
}
.banner-icon svg { width: 16px; height: 16px; }
.banner-body { flex: 1; }
.banner-title { font-size: 13px; font-weight: 600; color: var(--text); }
.banner-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─────────── Progress (conexiones) ─────────── */
.progress {
  height: 3px;
  background: var(--bone-alpha-15);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 8px;
}
.progress > div {
  height: 100%;
  background: var(--accent);
  transition: width var(--dur-base) var(--ease-out);
}

/* ─────────── Big number (datos) sin caer en hero-metric ───
   Numbers grandes solo en contextos secundarios — no son la
   estrella del layout. ──────────────────────────────────── */
.num {
  font-family: var(--font-sans);
  font-feature-settings: "tnum", "ss01";
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}

/* ─────────── Photo grid (browse) ─────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.photo-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(10, 4, 5, 0.92));
  color: var(--bone-50);
}
.photo-tile-info .name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.photo-tile-info .meta { font-size: 11px; color: var(--bone-200); margin-top: 2px; }
.photo-tile-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

/* ─────────── Tipografía utility ─────────── */
.t-display { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.t-num { font-feature-settings: "tnum"; }
.t-muted { color: var(--text-muted); }
.t-faint { color: var(--text-faint); }
.t-accent { color: var(--accent); }

/* ============================================================
   AUTH SHELL · login, register, forgot, reset, verify,
   apply, waiting-list, status
   ============================================================ */

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 20px 80px;
  max-width: 460px;
  margin: 0 auto;
  position: relative;
}

.auth-back {
  position: absolute;
  top: 24px; left: 20px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color var(--dur-fast) var(--ease-out);
}
.auth-back:hover { color: var(--text); }

.auth-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-style: italic;
  font-weight: 600; font-size: 22px;
  color: var(--bone-50);
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}
.auth-mark .seal {
  width: 26px; height: 26px;
  background: radial-gradient(circle at 30% 30%, var(--crimson-300) 0%, var(--crimson-500) 50%, var(--crimson-700) 100%);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--crimson-700), inset 0 0 8px var(--noir-900), 0 0 24px var(--crimson-alpha-25);
  position: relative;
  display: inline-block;
}
.auth-mark .seal::after {
  content: "sm"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--noir-950);
  letter-spacing: -0.06em;
}
/* Logo PNG real para auth-shell. Sirve a login, register, forgot,
   reset, verify, status, waiting-list, apply, onboarding, etc.
   Logo wordmark aspect ratio ~7.27:1 → height 28-32px funciona bien. */
.auth-logo {
  height: 32px; width: auto;
  max-width: 260px; display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 12px rgba(0,0,0,0.4));
}
.auth-mark.has-logo .auth-mark-fallback { display: none !important; }

.auth-card {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
}

.auth-title {
  font-family: var(--font-serif); font-style: italic;
  font-weight: 600; font-variation-settings: "opsz" 60;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.1; letter-spacing: -0.025em;
  color: var(--text); margin: 0 0 8px;
}
.auth-sub {
  font-size: 13px; color: var(--text-muted);
  margin: 0 0 28px;
}

.auth-form { display: grid; gap: 16px; }

.field { display: grid; gap: 6px; }
.field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.field .hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

.auth-checkbox {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}
.auth-checkbox input[type="checkbox"] {
  margin-top: 2px;
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.auth-checkbox a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-checkbox a:hover { color: var(--accent-hover); }

.auth-msg { font-size: 13px; margin-top: 4px; min-height: 18px; }
.auth-msg.ok { color: var(--accent); }
.auth-msg.err { color: #FF6B6B; }
.auth-msg.info { color: var(--text-muted); }

.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 24px;
}
.auth-footer a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-footer a:hover { color: var(--text); }

.auth-cta { margin-top: 8px; }

/* ============================================================
   ADMIN SHELL · panel interno de operación
   ============================================================ */

.adm-shell { max-width: 1100px; margin: 0 auto; padding: 24px 20px 80px; }

.adm-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.adm-header h1 {
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-variation-settings: "opsz" 72;
  font-size: 26px; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--text); margin: 0;
}
.adm-header .actions { display: flex; gap: 12px; align-items: center; }
.adm-header a, .adm-header button {
  font-size: 13px; color: var(--text-muted);
  background: transparent; border: 0; cursor: pointer;
}
.adm-header a:hover, .adm-header button:hover { color: var(--text); }

.adm-section + .adm-section { margin-top: 32px; }
.adm-section-title {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 14px;
}

.adm-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.adm-card {
  display: block;
  padding: 16px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.adm-card:hover { border-color: var(--accent); }
.adm-card .title { font-size: 14px; font-weight: 500; margin: 0; }
.adm-card .sub { font-size: 12px; color: var(--text-faint); margin: 4px 0 0; }
.adm-card.is-primary { background: var(--crimson-alpha-25); border-color: var(--crimson-alpha-60); }

.adm-row {
  display: block;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  margin-bottom: 8px;
}
.adm-row:hover { background: var(--bg-surface); }
.adm-row .top {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.adm-row .name { font-weight: 500; font-size: 14px; }
.adm-row .meta { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.adm-row .badge {
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.adm-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.adm-tab {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-faint);
  background: transparent; border: 0; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.adm-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.adm-metric {
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.adm-metric .lbl {
  font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-faint);
  font-weight: 600;
}
.adm-metric .val {
  font-family: var(--font-sans);
  font-size: 32px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text); margin-top: 6px;
}

.adm-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.adm-table th {
  text-align: left;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.adm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
.adm-table tr:hover td { background: var(--bg-elevated); }

.adm-msg { font-size: 13px; margin-top: 10px; }
.adm-msg.ok { color: var(--accent); }
.adm-msg.err { color: #FF6B6B; }
.adm-msg.warn { color: #F5C518; }

.adm-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font: inherit; font-size: 14px;
  outline: none;
}
.adm-input:focus { border-color: var(--accent); }

.adm-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}
