/* ══════════════════════════════════════════════
   PROYECTO SCAN – MAIN CSS
   ══════════════════════════════════════════════ */

/* ── RESET / BASE ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0f0f13;
  --surface:    #1a1a24;
  --surface2:   #22222f;
  --border:     #2e2e40;
  --accent:     #7c5cfc;
  --accent-h:   #9b7eff;
  --danger:     #e05252;
  --success:    #4caf80;
  --text:       #e8e8f0;
  --text-muted: #888898;
  --radius:     10px;
  --transition: 0.18s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

/* ── UTILITIES ─────────────────────────────────── */
.hidden { display: none !important; }

/* ── BUTTONS ───────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--accent-h); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm {
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  margin: 0 2px;
  transition: background var(--transition);
}
.btn-sm:hover { background: var(--border); }
.btn-sm.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-sm.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm.btn-primary { border-color: var(--accent); color: var(--accent); }
.btn-sm.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-sm.btn-info { border-color: #5bc0de; color: #5bc0de; }
.btn-sm.btn-info:hover { background: #5bc0de; color: #000; }

.btn-logout {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.btn-logout:hover { color: var(--danger); border-color: var(--danger); }

/* ── FORM ──────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}
.form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { min-height: 80px; resize: vertical; }

.form-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.4rem;
}
.form-success {
  color: var(--success);
  font-size: 0.875rem;
  margin-top: 0.4rem;
}

/* ── NAVBAR ────────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.logo-icon { font-size: 1.4rem; }
.navbar-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-greeting { font-size: 0.85rem; color: var(--text-muted); }

/* ── AUTH PAGE ─────────────────────────────────── */
.auth-page {
  --auth-ink: #f8f5ff;
  --auth-muted: #a59daf;
  --auth-line: rgba(255,255,255,.11);
  --auth-purple: #9d6cff;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px;
  overflow-x: hidden;
  background: #100d18;
  color: var(--auth-ink);
}
.auth-ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.ambient-orb {
  position: absolute;
  width: 42vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .2;
  transform: translate(var(--pointer-x, 0), var(--pointer-y, 0));
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.orb-one { background: #7c3cff; top: -24%; left: -12%; }
.orb-two { background: #d04f8d; right: -18%; bottom: -30%; opacity: .12; }
.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(480px, 1.15fr);
  width: min(1120px, 100%);
  min-height: 720px;
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: 28px;
  background: rgba(20,16,29,.86);
  box-shadow: 0 40px 120px rgba(0,0,0,.5);
  backdrop-filter: blur(24px);
}
.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(137,83,255,.3), rgba(38,25,57,.35)),
    radial-gradient(circle at 20% 90%, rgba(214,86,146,.28), transparent 44%);
}
.auth-story::after {
  content: "物語";
  position: absolute;
  right: -28px;
  bottom: 80px;
  color: rgba(255,255,255,.035);
  font: 900 10rem/1 sans-serif;
  writing-mode: vertical-rl;
}
.auth-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.02em;
}
.auth-brand:hover { color: white; }
.auth-brand strong { color: #c8aaff; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  font: 800 1.1rem/1 Georgia, serif;
}
.story-copy { position: relative; z-index: 1; max-width: 430px; }
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: #c9adff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.story-copy h1 {
  max-width: 9ch;
  margin-bottom: 22px;
  font: 700 clamp(2.6rem, 4.4vw, 4.6rem)/.98 Georgia, "Times New Roman", serif;
  letter-spacing: -.055em;
}
.story-copy p { max-width: 43ch; color: #c8c0cf; line-height: 1.7; }
.story-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.story-stats div { display: flex; flex-direction: column; gap: 4px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.16); }
.story-stats strong { font-size: 1.05rem; }
.story-stats span { color: #a69cac; font-size: .7rem; }
.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 70px);
  background: rgba(16,13,24,.76);
}
.portal-heading { margin-bottom: 24px; }
.portal-heading .eyebrow { margin-bottom: 8px; }
.portal-heading h2 { margin-bottom: 8px; font-size: clamp(1.8rem,3vw,2.45rem); letter-spacing: -.045em; }
.portal-heading p { color: var(--auth-muted); font-size: .92rem; line-height: 1.55; }
.portal-switcher {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.portal-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  color: #b8b0bf;
  text-align: left;
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, background .22s ease, color .22s ease;
}
.portal-option:hover { transform: translateY(-2px); border-color: rgba(157,108,255,.55); }
.portal-option.active { border-color: rgba(157,108,255,.8); background: rgba(157,108,255,.12); color: white; box-shadow: inset 0 0 0 1px rgba(157,108,255,.08); }
.portal-icon { display: grid; flex: 0 0 28px; height: 28px; place-items: center; border-radius: 9px; background: rgba(255,255,255,.07); color: #c8aaff; }
.portal-option > span:last-child { overflow: hidden; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.portal-option small { display: block; overflow: hidden; margin-top: 3px; color: #807887; font-size: .6rem; font-weight: 500; text-overflow: ellipsis; }
.portal-option.active small { color: #aaa0b1; }
.auth-tabs {
  position: relative;
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--auth-line);
}
.auth-page .tab-btn {
  flex: initial;
  min-height: 42px;
  padding: 0 18px 11px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #77707e;
  font-size: .78rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.auth-page .tab-btn + .tab-btn { padding-left: 18px; }
.auth-page .tab-btn.active { border-color: var(--auth-purple); color: white; }
.auth-page .form-group { gap: 8px; margin-bottom: 16px; }
.auth-page .form-group label { color: #aaa2b1; font-size: .72rem; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; }
.input-shell {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--auth-line);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  color: #726a79;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.input-shell:focus-within { border-color: var(--auth-purple); background: rgba(157,108,255,.055); box-shadow: 0 0 0 3px rgba(157,108,255,.1); }
.auth-page .input-shell input {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 10px;
  color: white;
}
.auth-page .input-shell select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 10px;
  color: white;
  outline: 0;
}
.auth-page .input-shell select option { color: #17131f; background: white; }
.auth-page .input-shell input:focus { border: 0; }
.password-toggle { border: 0; background: transparent; color: #8f8796; font-size: .68rem; font-weight: 700; cursor: pointer; }
.auth-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  padding: 0 18px;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(110deg, #8153ec, #a56cf5);
  color: white;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(126,76,229,.24);
  transition: transform .22s ease, box-shadow .22s ease;
}
.auth-submit::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.2), transparent 80%); transform: translateX(-110%); transition: transform .55s ease; }
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(126,76,229,.35); }
.auth-submit:hover::before { transform: translateX(110%); }
.auth-submit span,.auth-submit b { position: relative; }
.auth-submit.is-loading { opacity: .65; pointer-events: none; }
.form-message { margin-top: 13px; padding: 10px 12px; border-radius: 10px; font-size: .75rem; }
.auth-page .form-error { border: 1px solid rgba(224,82,82,.25); background: rgba(224,82,82,.09); }
.auth-page .form-success { border: 1px solid rgba(76,175,128,.25); background: rgba(76,175,128,.09); }
.staff-registration { padding: 28px; border: 1px dashed rgba(157,108,255,.35); border-radius: 16px; background: rgba(157,108,255,.05); text-align: center; }
.staff-symbol { display: grid; width: 45px; height: 45px; margin: 0 auto 13px; place-items: center; border-radius: 14px; background: rgba(157,108,255,.16); color: #c7a8ff; }
.staff-registration h3 { margin-bottom: 8px; font-size: 1rem; }
.staff-registration p { margin-bottom: 18px; color: var(--auth-muted); font-size: .78rem; line-height: 1.55; }
.auth-footnote { margin-top: 18px; color: #77707e; font-size: .68rem; line-height: 1.5; text-align: center; }

@media (max-width: 900px) {
  .auth-page { padding: 18px; }
  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  .auth-story { min-height: 290px; padding: 32px; }
  .story-copy { margin: 48px 0 30px; }
  .story-copy h1 { max-width: 14ch; font-size: clamp(2.3rem, 8vw, 3.5rem); }
  .story-stats { display: none; }
}
@media (max-width: 560px) {
  .auth-page { display: block; padding: 0; }
  .auth-shell { border: 0; border-radius: 0; }
  .auth-story { min-height: 230px; padding: 24px; }
  .story-copy { margin: 38px 0 0; }
  .story-copy h1 { margin-bottom: 12px; font-size: 2.25rem; }
  .story-copy p { font-size: .78rem; }
  .auth-panel { padding: 30px 20px 42px; }
  .portal-switcher { gap: 6px; }
  .portal-option { flex-direction: column; padding: 10px 4px; text-align: center; }
  .portal-option small { display: none; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ============================================================
   MINXTRAL STUDIO — PANEL MULTI-SCAN
   ============================================================ */
.admin-page {
  --studio-bg: #f3f2f5;
  --studio-panel: #fff;
  --studio-nav: #120e1c;
  --studio-muted: #77707f;
  --studio-purple: #8959f4;
  background: var(--studio-bg);
}
.admin-page .admin-sidebar {
  width: 272px;
  padding: 1.5rem 1.15rem;
  background:
    radial-gradient(circle at 10% 0, rgba(137,89,244,.22), transparent 30%),
    var(--studio-nav);
  border-right: 1px solid rgba(255,255,255,.06);
}
.admin-page .admin-main { margin-left: 272px; padding: 2.3rem clamp(1.25rem,4vw,4rem) 6rem; }
.admin-brand { padding: .25rem .45rem; font-size: .95rem; }
.admin-brand b { color: #b898ff; }
.admin-page .brand-mark { border-radius: 11px; background: linear-gradient(135deg,#7542df,#a66eff); }
.admin-identity { margin: 1.5rem .45rem; padding: 1rem 0; }
.admin-identity strong { margin-top: .32rem; font-size: .92rem; }
.nav-group-label { margin: 1.25rem .75rem .35rem; color: rgba(255,255,255,.32); font-size: .58rem; font-weight: 900; letter-spacing: .16em; }
#admin-nav button { position: relative; min-height: 43px; color: rgba(255,255,255,.62); font-size: .78rem; font-weight: 650; transition: .2s ease; }
#admin-nav button span { width: 20px; color: #8b7b9d; text-align: center; }
#admin-nav button:hover { transform: translateX(3px); }
#admin-nav button.active { background: linear-gradient(90deg,rgba(137,89,244,.25),rgba(137,89,244,.07)); box-shadow: inset 2px 0 #9f72ff; }
.admin-topbar { padding-bottom: 1.7rem; border-bottom: 1px solid #dfdbe4; }
.admin-topbar h1 { font-family: Inter,"Segoe UI",sans-serif; font-weight: 750; letter-spacing: -.045em; }
.topbar-tools { display: flex; align-items: center; gap: .65rem; }
.command-button { padding: .55rem .85rem; border: 1px solid #ddd8e2; border-radius: 9px; background: white; color: #6e6774; cursor: pointer; }
.stats-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
.stat-card,.panel-card,.content-card,.empty-panel { border-color: #e2dee6; border-radius: 14px; box-shadow: 0 8px 30px rgba(30,20,40,.035); }
.stat-card { min-height: 145px; padding: 1.1rem; }
.stat-card strong { font-family: Inter,"Segoe UI",sans-serif; font-size: 2rem; font-weight: 760; letter-spacing: -.05em; }
.stat-card small { margin-top: auto; font-size: .68rem; }
.panel-card { min-height: 300px; padding: 1.5rem; }
.panel-card h2 { font-family: Inter,"Segoe UI",sans-serif; font-size: 1rem; font-weight: 750; }
.platform-welcome { display: flex; min-height: 235px; flex-direction: column; justify-content: center; border-radius: 12px; padding: 2rem; background: linear-gradient(135deg,#181020,#352052); color: white; }
.platform-welcome > span { color: #b995ff; font-size: .62rem; font-weight: 900; letter-spacing: .16em; }
.platform-welcome h3 { max-width: 12ch; margin: .8rem 0; font: 500 2rem/1.05 Georgia,serif; }
.platform-welcome p { max-width: 54ch; color: rgba(255,255,255,.65); font-size: .78rem; line-height: 1.55; }
.platform-welcome button { width: fit-content; margin-top: 1rem; border: 0; background: transparent; color: #cfb6ff; cursor: pointer; }
.architecture-note { display: grid; gap: .75rem; padding: .7rem; }
.architecture-note p { color: #78717d; font-size: .8rem; line-height: 1.55; }
.architecture-note div { display: flex; justify-content: space-between; padding: .7rem 0; border-bottom: 1px solid #ebe8ed; }
.architecture-note div span { color: #7445d7; font-weight: 850; }
.architecture-note div i { color: #958d9b; font-size: .75rem; font-style: normal; }
.studio-scan-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 1rem; }
.studio-scan-card { display: grid; gap: 1.2rem; padding: 1.35rem; border: 1px solid #e1dce5; border-radius: 16px; background: white; box-shadow: 0 10px 35px rgba(25,15,35,.04); }
.scan-card-head { display: flex; justify-content: space-between; align-items: center; }
.scan-avatar { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: color-mix(in srgb,var(--scan-accent) 15%,white); color: var(--scan-accent); font-weight: 900; }
.studio-scan-card h3 { margin: .25rem 0; font-size: 1.3rem; letter-spacing: -.035em; }
.studio-scan-card p { color: #807884; font-size: .75rem; }
.scan-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.scan-metrics span { padding: .65rem; border-radius: 9px; background: #f7f5f8; color: #817a86; font-size: .68rem; }
.scan-metrics b { display: block; color: #211a27; font-size: 1rem; }
.scan-status-button { padding: .65rem; border: 1px solid #ded9e2; border-radius: 9px; background: white; color: #746c79; cursor: pointer; }
.community-switcher { max-width: 190px; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); font-size: .72rem; }
@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 850px) {
  .admin-page .admin-sidebar { width: auto; }
  .admin-page .admin-main { margin-left: 0; }
  .nav-group-label { display: none; }
}

/* ============================================================
   MINXTRAL READER — EXPERIENCIA DE COMUNIDAD
   ============================================================ */
.reader-catalog {
  --reader-bg: #f5f3f0;
  --reader-ink: #17141b;
  --reader-muted: #746e79;
  --reader-purple: #8254ed;
  --reader-line: #ded9e1;
  background: var(--reader-bg);
  color: var(--reader-ink);
}
.reader-nav {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(1rem,4vw,4rem);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(13,11,18,.92);
  color: white;
  backdrop-filter: blur(18px);
}
.minxtral-wordmark { display: inline-flex; align-items: center; gap: .7rem; width: fit-content; color: white; font-weight: 820; letter-spacing: -.03em; }
.minxtral-wordmark:hover { color: white; }
.wordmark-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: linear-gradient(135deg,#7543df,#a670ff); }
.wordmark-icon svg { width: 17px; }
.community-control { display: flex; align-items: center; gap: .45rem; min-width: 230px; padding: .55rem .7rem; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: rgba(255,255,255,.055); }
.community-control svg { width: 15px; color: #ae91ef; }
.community-control svg:last-child { margin-left: auto; }
.community-control select { width: 100%; appearance: none; border: 0; outline: 0; background: transparent; color: white; font-size: .75rem; font-weight: 650; }
.community-control option { color: #17141b; background: white; }
.reader-actions { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; }
.reader-icon-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: transparent; color: rgba(255,255,255,.72); cursor: pointer; transition: .2s ease; }
.reader-icon-button:hover { transform: translateY(-2px); border-color: rgba(174,145,239,.65); color: white; }
.reader-icon-button svg { width: 16px; }
.reader-profile { display: flex; align-items: center; gap: .55rem; padding: 0 .45rem; }
.profile-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #2c2338; color: #c7aafa; font-size: .72rem; font-weight: 850; }
.reader-profile div { display: grid; }
.reader-profile strong { font-size: .72rem; }
.reader-profile small { max-width: 110px; overflow: hidden; color: #817989; font-size: .6rem; text-overflow: ellipsis; white-space: nowrap; }
.reader-nav .membership-badge { border-color: rgba(255,255,255,.13); color: #bcb3c3; }
.reader-nav .membership-badge.vip { border-color: #d7a33d; background: #d7a33d; color: #261b06; }
.reader-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(2rem,7vw,8rem);
  min-height: 610px;
  padding: clamp(5rem,9vw,9rem) clamp(1.25rem,7vw,8rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 15%,rgba(132,83,239,.22),transparent 30%),
    linear-gradient(125deg,#0d0b12 15%,#1b1227 62%,#271838);
  color: #fbf8ff;
}
.reader-hero::after { content: ""; position: absolute; right: -10%; bottom: -48%; width: 650px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; box-shadow: 0 0 0 75px rgba(255,255,255,.018),0 0 0 150px rgba(255,255,255,.012); }
.hero-noise { position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(90deg,black,transparent 75%); }
.reader-hero-copy,.membership-card { position: relative; z-index: 1; }
.reader-kicker { display: inline-flex; align-items: center; gap: .45rem; color: #a77bf8; font-size: .66rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.reader-kicker svg { width: 14px; }
.reader-hero h1 { max-width: 850px; margin: 1.2rem 0 1.5rem; font: 500 clamp(3.4rem,7.2vw,7.2rem)/.91 Georgia,serif; letter-spacing: -.065em; }
.reader-hero-copy > p { max-width: 620px; color: rgba(255,255,255,.56); line-height: 1.75; }
.reader-hero-actions { display: flex; align-items: center; gap: 1.4rem; margin-top: 2rem; }
.reader-primary-action { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 46px; padding: 0 1rem; border: 0; border-radius: 11px; background: linear-gradient(110deg,#7d4ce8,#a36af5); color: white; font-size: .75rem; font-weight: 800; cursor: pointer; box-shadow: 0 14px 34px rgba(113,65,215,.25); transition: .2s ease; }
.reader-primary-action:hover { transform: translateY(-2px); }
.reader-primary-action svg { width: 16px; }
.reader-hero-actions > span { color: rgba(255,255,255,.45); font-size: .75rem; }
.reader-hero-actions > span strong { margin-right: .25rem; color: white; font-size: 1.1rem; }
.membership-card { align-self: end; padding: 1.5rem; border: 1px solid rgba(255,255,255,.11); border-radius: 20px; background: rgba(255,255,255,.065); box-shadow: 0 25px 70px rgba(0,0,0,.22); backdrop-filter: blur(16px); }
.membership-card-icon { display: grid; width: 42px; height: 42px; margin-bottom: 1.7rem; place-items: center; border-radius: 12px; background: rgba(168,116,255,.15); color: #c9a8ff; }
.membership-card-icon svg { width: 19px; }
.membership-card > span { color: rgba(255,255,255,.42); font-size: .65rem; text-transform: uppercase; letter-spacing: .12em; }
.membership-card > strong { display: block; margin: .55rem 0; font-size: 1.35rem; }
.membership-card > p { color: rgba(255,255,255,.5); font-size: .75rem; line-height: 1.6; }
.membership-rule { display: flex; align-items: center; gap: .5rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.1); color: #bca5e7; font-size: .68rem; }
.membership-rule svg { width: 14px; }
.reader-library { max-width: 1540px; margin: 0 auto; padding: 6rem clamp(1.25rem,5vw,5rem) 8rem; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.library-heading h2 { margin: .6rem 0; font: 500 clamp(2.5rem,5vw,4.4rem)/1 Georgia,serif; letter-spacing: -.055em; }
.library-heading p { color: var(--reader-muted); font-size: .8rem; }
.reader-search { display: flex; align-items: center; gap: .55rem; width: min(380px,100%); padding: .7rem .2rem; border-bottom: 1px solid #aaa3ae; }
.reader-search svg { width: 17px; color: #8a818e; }
.reader-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--reader-ink); }
.reader-search kbd { padding: .2rem .35rem; border: 1px solid #d3ced6; border-radius: 5px; color: #968e9a; background: white; font-size: .58rem; }
.catalog-toolbar { display: flex; justify-content: space-between; margin-top: 3rem; padding-bottom: .9rem; border-bottom: 1px solid var(--reader-line); color: #7b747e; font-size: .7rem; }
.catalog-toolbar div { display: flex; gap: .3rem; }
.view-toggle { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #99919c; }
.view-toggle.active { background: white; color: #6f3fd5; box-shadow: 0 3px 12px rgba(30,20,35,.07); }
.view-toggle svg { width: 14px; }
.reader-catalog .series-grid { grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 2.7rem 1.2rem; padding: 2rem 0 0; }
.reader-catalog .series-card { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.reader-catalog .series-card:hover { transform: translateY(-7px); }
.reader-catalog .series-cover { height: auto; aspect-ratio: 2/3; border-radius: 12px; background: #e5e0e7; box-shadow: 0 14px 35px rgba(27,20,32,.12); }
.reader-catalog .cover-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: #a59da9; background: linear-gradient(145deg,#ebe7ed,#dcd6e1); }
.reader-catalog .cover-placeholder svg { width: 30px; }
.reader-catalog .series-status { top: .75rem; left: .75rem; border: 1px solid rgba(255,255,255,.2); background: rgba(18,13,25,.75); backdrop-filter: blur(8px); }
.reader-catalog .series-info { padding: 1rem .1rem; }
.reader-catalog .series-info h3 { font: 600 1.25rem/1.2 Georgia,serif; }
.reader-catalog .series-genre { color: #7948de; }
.reader-empty-state { grid-column: 1/-1; display: flex; min-height: 360px; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; border: 1px dashed #d6d0da; border-radius: 18px; text-align: center; }
.reader-empty-state > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 17px; background: #ebe5f8; color: #8050e7; }
.reader-empty-state h3 { margin: 1.2rem 0 .5rem; font: 500 1.6rem Georgia,serif; }
.reader-empty-state p { max-width: 480px; color: #837b87; font-size: .8rem; line-height: 1.6; }
.catalog-skeleton { display: contents; }
.catalog-skeleton span { min-height: 320px; border-radius: 12px; background: linear-gradient(100deg,#e7e3e8 30%,#f3f1f4 50%,#e7e3e8 70%); background-size: 300% 100%; animation: reader-shimmer 1.5s infinite; }
@keyframes reader-shimmer { to { background-position: -150% 0; } }
.reader-catalog .series-detail { background: #f9f7fa; }
.reader-catalog .series-detail-head { padding-bottom: 2rem; border-bottom: 1px solid #ded8e1; }
.community-column { padding: 1.2rem; border-radius: 14px; background: #f0edf2; }
@media (max-width: 900px) {
  .reader-nav { grid-template-columns: 1fr auto; }
  .reader-nav-center { grid-row: 2; grid-column: 1/-1; padding-bottom: .7rem; }
  .community-control { width: 100%; }
  .reader-profile,.reader-nav .membership-badge { display: none; }
  .reader-hero { grid-template-columns: 1fr; min-height: auto; }
  .membership-card { max-width: 420px; }
}
@media (max-width: 600px) {
  .reader-nav { padding: .65rem 1rem; }
  .reader-hero { padding: 4.5rem 1.25rem 3rem; }
  .reader-hero h1 { font-size: 3.25rem; }
  .reader-hero-actions { align-items: flex-start; flex-direction: column; }
  .library-heading { align-items: flex-start; flex-direction: column; }
  .reader-search { width: 100%; }
  .reader-catalog .series-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.7rem .7rem; }
  .reader-catalog .series-info h3 { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
}

/* ============================================================
   MINXTRAL STUDIO — WORKSPACE HORIZONTAL
   ============================================================ */
.admin-page {
  --workspace-bg: #f7f7f5;
  --workspace-surface: #ffffff;
  --workspace-ink: #171717;
  --workspace-muted: #6b6b66;
  --workspace-line: #deded9;
  --workspace-accent: #2457d6;
  min-height: 100vh;
  background: var(--workspace-bg);
  color: var(--workspace-ink);
}
.admin-page .admin-sidebar {
  position: sticky !important;
  inset: 0 0 auto !important;
  z-index: 100;
  width: 100% !important;
  height: auto !important;
  min-height: 118px;
  padding: 0 clamp(24px,4vw,64px) !important;
  display: grid !important;
  grid-template-columns: auto minmax(180px,auto) 1fr auto;
  grid-template-rows: 66px 52px;
  align-items: center;
  gap: 0 28px;
  border: 0 !important;
  border-bottom: 1px solid var(--workspace-line) !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px);
}
.admin-brand {
  grid-column: 1;
  grid-row: 1;
  padding: 0 !important;
  color: var(--workspace-ink) !important;
  font-size: .9rem;
}
.admin-brand b { color: var(--workspace-muted) !important; font-weight: 540; }
.admin-page .brand-mark {
  width: 31px; height: 31px; border-radius: 9px;
  color: #fff; background: var(--workspace-ink) !important;
}
.admin-page .brand-mark svg { width: 16px; }
.admin-identity {
  grid-column: 2;
  grid-row: 1;
  margin: 0 !important;
  padding: 0 0 0 28px !important;
  border: 0 !important;
  border-left: 1px solid var(--workspace-line) !important;
}
.admin-identity span {
  display: block; max-width: 260px; overflow: hidden; color: var(--workspace-muted) !important;
  font-size: .63rem; letter-spacing: .04em; text-overflow: ellipsis; text-transform: none !important; white-space: nowrap;
}
.admin-identity strong { margin-top: 2px !important; color: var(--workspace-ink) !important; font-size: .78rem; }
#admin-nav {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: stretch;
  display: flex !important;
  align-items: stretch;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
#admin-nav::-webkit-scrollbar { display: none; }
.nav-group-label { display: none !important; }
#admin-nav button {
  width: auto !important;
  min-height: 0 !important;
  padding: 0 1px !important;
  flex: 0 0 auto;
  gap: 7px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #73736d !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: .73rem !important;
  font-weight: 610 !important;
  transform: none !important;
}
#admin-nav button span { width: 17px !important; color: #8b8b85 !important; }
#admin-nav button svg { width: 15px; }
#admin-nav button:hover { color: var(--workspace-ink) !important; }
#admin-nav button.active {
  color: var(--workspace-ink) !important;
  box-shadow: inset 0 -2px var(--workspace-accent) !important;
}
#admin-nav button.active span { color: var(--workspace-accent) !important; }
.sidebar-footer {
  grid-column: 4;
  grid-row: 1;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0 !important;
}
.sidebar-footer a,.sidebar-footer button {
  width: auto !important;
  min-height: 34px;
  padding: 0 12px !important;
  justify-content: center;
  border: 1px solid var(--workspace-line) !important;
  border-radius: 8px !important;
  color: #555550 !important;
  background: white !important;
  font-size: .68rem;
}
.admin-page .admin-main {
  width: min(1440px,100%);
  margin: 0 auto !important;
  padding: 58px clamp(24px,5vw,80px) 100px !important;
  overflow: visible;
}
.admin-topbar {
  margin: 0 0 48px !important;
  padding: 0 0 28px !important;
  border-bottom: 1px solid var(--workspace-line) !important;
}
.admin-topbar .eyebrow { color: var(--workspace-accent); }
.admin-topbar h1 {
  margin-top: 8px;
  font-family: Inter,"Segoe UI",sans-serif !important;
  font-size: clamp(2.5rem,5vw,4.6rem) !important;
  font-weight: 620 !important;
  letter-spacing: -.065em !important;
}
.command-button {
  border-color: var(--workspace-line) !important;
  border-radius: 8px !important;
  color: #62625d !important;
  box-shadow: none;
}
.status-dot { border: 0 !important; color: #2e6751 !important; background: #e7f2ec !important; }
.section-actions { align-items: center; margin-bottom: 28px !important; }
.section-actions p { max-width: 680px; color: var(--workspace-muted) !important; line-height: 1.6; }
.admin-page .btn-primary {
  border-radius: 8px !important;
  background: var(--workspace-ink) !important;
  box-shadow: none !important;
}
.admin-page .btn-primary:hover { background: var(--workspace-accent) !important; transform: none; }
.stat-card,.panel-card,.content-card,.empty-panel,.table-wrapper {
  border: 1px solid var(--workspace-line) !important;
  border-radius: 10px !important;
  background: var(--workspace-surface) !important;
  box-shadow: none !important;
}
.empty-panel {
  min-height: 180px;
  padding: 52px 24px !important;
  display: grid;
  place-items: center;
  color: var(--workspace-muted);
  border-style: dashed !important;
}
.stat-card { min-height: 132px; }
.panel-card { min-height: 320px; }
.admin-table { border-radius: 9px !important; background: white !important; }
.admin-table th { color: #777771 !important; background: #f1f1ee !important; }
.admin-table td { border-color: #e6e6e1 !important; }

.admin-page .app-dialog[open] {
  position: fixed !important;
  inset: 0 !important;
  width: min(640px,calc(100vw - 32px)) !important;
  max-width: 640px !important;
  max-height: min(780px,calc(100vh - 48px)) !important;
  margin: auto !important;
  padding: 0 !important;
  overflow: auto !important;
  border: 1px solid #d8d8d2 !important;
  border-radius: 14px !important;
  color: var(--workspace-ink) !important;
  background: #fff !important;
  box-shadow: 0 28px 90px rgba(17,17,17,.22) !important;
}
.admin-page .app-dialog::backdrop { background: rgba(20,20,18,.56) !important; backdrop-filter: blur(3px); }
.admin-page .app-dialog form { gap: 18px !important; padding: 28px !important; }
.admin-page .dialog-heading {
  margin-bottom: 4px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--workspace-line);
}
.admin-page .dialog-heading h2 {
  font-family: Inter,"Segoe UI",sans-serif !important;
  font-size: 1.4rem !important;
  font-weight: 650 !important;
  letter-spacing: -.035em;
}
.admin-page .dialog-heading button {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 8px !important; color: #555550; background: #f2f2ef !important;
}
.admin-page .app-dialog label { color: #4c4c47 !important; font-size: .72rem !important; }
.admin-page .app-dialog input:not([type="checkbox"]):not([type="file"]),
.admin-page .app-dialog textarea,
.admin-page .app-dialog select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cfcfc9;
  border-radius: 8px;
  outline: 0;
  background: #fff;
  font: inherit;
}
.admin-page .app-dialog textarea { min-height: 110px; resize: vertical; }
.admin-page .app-dialog input:focus,.admin-page .app-dialog textarea:focus,.admin-page .app-dialog select:focus {
  border-color: var(--workspace-accent);
  box-shadow: 0 0 0 3px rgba(36,87,214,.12);
}
.admin-page .modal-actions {
  position: sticky;
  bottom: -28px;
  margin: 6px -28px -28px !important;
  padding: 18px 28px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--workspace-line);
  background: rgba(255,255,255,.96);
}
.admin-page .btn-secondary {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #cfcfc9 !important;
  border-radius: 8px !important;
  color: #3d3d39 !important;
  background: #fff !important;
  opacity: 1 !important;
}
.admin-preview { left: 0 !important; }
.admin-page:has(.admin-preview) .admin-sidebar { top: 42px !important; }
.admin-page:has(.admin-preview) .admin-main { padding-top: 58px !important; }

@media (max-width: 900px) {
  .admin-page .admin-sidebar {
    grid-template-columns: 1fr auto;
    grid-template-rows: 62px 48px;
    gap: 0 16px;
    padding: 0 18px !important;
  }
  .admin-brand { grid-column: 1; }
  .admin-identity { display: none; }
  .sidebar-footer { grid-column: 2; }
  .sidebar-footer a { display: none !important; }
  #admin-nav { grid-column: 1/-1; gap: 22px; }
  .admin-page .admin-main { padding: 38px 18px 80px !important; }
  .admin-topbar { align-items: flex-start; gap: 18px; }
  .topbar-tools { display: none; }
  .stats-grid { grid-template-columns: repeat(2,1fr) !important; }
  .dashboard-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 560px) {
  .admin-topbar h1 { font-size: 2.5rem !important; }
  .section-actions { align-items: stretch; flex-direction: column; }
  .section-actions .btn-primary { width: 100%; }
  .stats-grid { grid-template-columns: 1fr !important; }
  .admin-page .app-dialog form { padding: 22px 18px !important; }
  .admin-page .modal-actions { margin: 4px -18px -22px !important; padding: 16px 18px 18px; }
}

/* ── HERO ──────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.hero h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.hero p { color: var(--text-muted); font-size: 1rem; }

/* ── CATALOG ───────────────────────────────────── */
.catalog-controls {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1.5rem 1.5rem;
}
.catalog-controls input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50px;
  padding: 0.6rem 1.2rem;
  width: 100%;
  max-width: 400px;
  font-size: 0.95rem;
}
.catalog-controls input:focus { outline: none; border-color: var(--accent); }

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.2rem;
  padding: 0 1.5rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}
.series-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.series-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(124,92,252,0.2);
}
.series-cover { height: 220px; overflow: hidden; }
.series-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2);
  font-size: 3rem;
}
.series-info { padding: 0.75rem; }
.series-info h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.3rem; }
.series-genre { font-size: 0.78rem; color: var(--text-muted); display: block; margin-bottom: 0.3rem; }
.series-status { font-size: 0.75rem; border-radius: 4px; padding: 2px 6px; font-weight: 600; }
.status-ongoing { background: #1e3a2f; color: var(--success); }
.status-finished { background: #2a1f3a; color: var(--accent); }

.loading-spinner, .empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
  font-size: 1rem;
}

/* ── BADGES ────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge-active { background: #1e3a2f; color: var(--success); }
.badge-done   { background: #2a1f3a; color: var(--accent); }
.badge-off    { background: #3a1e1e; color: var(--danger); }

/* ── ADMIN LAYOUT ──────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 54px);
}
.admin-sidebar {
  width: 200px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}
.admin-sidebar h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.admin-sidebar ul { list-style: none; }
.admin-sidebar ul li { margin-bottom: 0.4rem; }
.admin-sidebar ul li button {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}
.admin-sidebar ul li button:hover { background: var(--surface2); color: var(--accent); }

.admin-main { flex: 1; padding: 1.5rem; overflow-x: auto; }

.admin-section { display: block; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}
.section-header h2 { font-size: 1.2rem; font-weight: 700; }

/* ── ADMIN TABLE ───────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.9rem;
}
.admin-table th {
  background: var(--surface2);
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--surface2); }
.action-cell { white-space: nowrap; }

/* ── MODAL ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.2rem; }
.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* ── TABLE SCROLL WRAPPER ──────────────────────── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}

/* ── HAMBURGER BUTTON ──────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* ── RESPONSIVE: TABLET (960px) ────────────────── */
@media (max-width: 960px) {
  .admin-sidebar { width: 170px; }
  .series-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
}

/* ── RESPONSIVE: MOBILE (640px) ───────────────── */
@media (max-width: 640px) {
  html { font-size: 15px; }

  /* Navbar */
  .nav-toggle { display: flex; }
  .navbar { padding: 0.65rem 1rem; }
  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    gap: 0.6rem;
    z-index: 99;
  }
  .navbar-links.open { display: flex; }
  .navbar-links .btn-logout { margin-top: 0.25rem; width: 100%; text-align: left; }

  /* Hero */
  .hero { padding: 1.75rem 1rem 1rem; }
  .hero h2 { font-size: 1.45rem; }
  .hero p { font-size: 0.9rem; }

  /* Catalog */
  .catalog-controls { padding: 0.25rem 0.75rem 1rem; }
  .catalog-controls input { font-size: 1rem; } /* prevents iOS zoom on focus */

  /* Series grid – 2 columns */
  .series-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0 0.75rem 4rem;
  }
  .series-cover { height: 170px; }
  .series-info { padding: 0.5rem 0.6rem; }
  .series-info h3 { font-size: 0.82rem; }
  .series-genre { font-size: 0.72rem; }

  /* Auth card */
  .auth-card {
    margin: 1rem;
    padding: 1.75rem 1.2rem;
    border-radius: 14px;
  }
  .auth-logo h1 { font-size: 1.4rem; }

  /* Admin layout → vertical stack */
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0.75rem;
  }
  .admin-sidebar h2 { display: none; }
  .admin-sidebar ul {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }
  .admin-sidebar ul::-webkit-scrollbar { display: none; }
  .admin-sidebar ul li { flex-shrink: 0; margin: 0; }
  .admin-sidebar ul li button {
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 0.82rem;
    white-space: nowrap;
  }
  .admin-sidebar ul li button:hover { background: var(--surface2); }
  .admin-main { padding: 1rem 0.75rem; }
  .section-header { flex-wrap: wrap; gap: 0.5rem; }
  .section-header h2 { font-size: 1rem; }

  /* Modal – bottom sheet */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    border-radius: 18px 18px 0 0;
    max-width: 100%;
    max-height: 90vh;
    padding: 1.5rem 1.25rem;
  }

  /* Prevent iOS auto-zoom on input focus */
  .form-group input,
  .form-group select,
  .form-group textarea,
  .catalog-controls input {
    font-size: 16px;
  }

  /* Touch targets */
  .btn-primary, .btn-secondary, .tab-btn { min-height: 44px; }
  .btn-sm { min-height: 36px; padding: 0.3rem 0.7rem; }
  .btn-logout { min-height: 36px; }
}

/* ── RESPONSIVE: SMALL MOBILE (380px) ─────────── */
@media (max-width: 380px) {
  .series-grid {
    gap: 0.5rem;
    padding: 0 0.5rem 4rem;
  }
  .series-cover { height: 145px; }
  .series-info h3 { font-size: 0.78rem; }
}

/* ══════════════════════════════════════════════
   NUEVOS COMPONENTES
   ══════════════════════════════════════════════ */

/* ── TEXT MUTED UTILITY ────────────────────────── */
.text-muted { color: var(--text-muted); font-size: 0.88rem; }

/* ── CHAPTERS COUNT EN TARJETAS ────────────────── */
.series-chapters {
  font-size: 0.75rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.2rem;
}

/* ── MODAL CLOSE BUTTON ────────────────────────── */
.modal-close-btn {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}
.modal-close-btn:hover { background: var(--surface2); color: var(--text); }

/* ── SERIES DETAIL MODAL ───────────────────────── */
.modal.series-detail { max-width: 560px; position: relative; }

.series-detail-head {
  display: flex;
  gap: 1.2rem;
  margin: 0.25rem 0 1.25rem;
}
.detail-cover { flex-shrink: 0; width: 100px; }
.detail-cover img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}
.detail-cover .cover-placeholder {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border-radius: 8px;
  font-size: 2.5rem;
}
.detail-info { flex: 1; }
.detail-info h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.2rem; }

.detail-chapters-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ── CHAPTER BUTTONS (catálogo detail) ─────────── */
.chapter-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  margin-bottom: 0.4rem;
  transition: background var(--transition), border-color var(--transition);
}
.chapter-btn:hover { background: var(--border); border-color: var(--accent); }
.ch-num { font-weight: 700; font-size: 0.88rem; min-width: 58px; color: var(--accent); }
.ch-title { flex: 1; font-size: 0.88rem; color: var(--text-muted); }
.ch-pages { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

/* ── CHAPTERS ACCORDION (admin) ────────────────── */
.chapters-accordion > td {
  padding: 0 !important;
  border-bottom: 2px solid var(--accent) !important;
}
.chapters-accordion-cell {
  background: var(--bg);
  border-left: 3px solid var(--accent);
}
.chapters-subpanel { padding: 0.75rem 1rem 1rem; }
.subpanel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.subpanel-title { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.chapters-sub-table { font-size: 0.83rem; }
.chapters-sub-table th { font-size: 0.72rem; }
.chapters-sub-table td { padding: 0.5rem 0.8rem; }
.accordion-toggle { font-size: 0.78rem; white-space: nowrap; }

/* ── RESPONSIVE: series detail modal ──────────── */
@media (max-width: 640px) {
  .series-detail-head { flex-direction: column; }
  .detail-cover { width: 100%; }
  .detail-cover img, .detail-cover .cover-placeholder { height: 160px; width: 110px; }
  .ch-pages { display: none; }
  .chapter-btn { padding: 0.6rem 0.7rem; }
}
/* ── SISTEMA DE MONEDAS ────────────────────────────── */

/* Saldo de monedas en la navbar */
.coin-badge {
  background: rgba(124, 92, 252, 0.15);
  border: 1px solid rgba(124, 92, 252, 0.4);
  color: var(--accent-h);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* Capítulo bloqueado en la lista de capítulos */
.chapter-btn.chapter-locked {
  border-color: rgba(180, 130, 0, 0.35);
  background: rgba(180, 130, 0, 0.06);
  color: var(--text-muted);
  cursor: pointer;
}
.chapter-btn.chapter-locked:hover {
  border-color: rgba(180, 130, 0, 0.7);
  background: rgba(180, 130, 0, 0.12);
  color: var(--text);
}

/* Precio en monedas del capítulo bloqueado */
.ch-price {
  font-size: 0.78rem;
  font-weight: 700;
  color: #d4a017;
  background: rgba(212, 160, 23, 0.12);
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  margin-left: auto;
}
/* ============================================================
   SISTEMA VISUAL 2026
   ============================================================ */

:root {
  --ink: #171713;
  --paper: #f4f1e8;
  --paper-strong: #fffdf7;
  --line: #d9d3c5;
  --accent: #e45a32;
  --accent-dark: #b83d1e;
  --forest: #143e35;
  --gold: #f0b84a;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-soft: 0 18px 60px rgba(31, 28, 20, 0.11);
}

body.catalog-page,
body.admin-page {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.setup-intro {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.6;
}

.catalog-page .navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 241, 232, 0.92);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.catalog-page .navbar-brand {
  color: var(--ink);
  text-decoration: none;
}

.membership-badge,
.status-dot {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.membership-badge.vip {
  background: var(--gold);
  border-color: var(--gold);
}

.catalog-hero {
  min-height: 430px;
  padding: 6rem clamp(1.5rem, 7vw, 8rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  color: #fffaf0;
  background:
    radial-gradient(circle at 80% 20%, rgba(240, 184, 74, 0.28), transparent 25%),
    linear-gradient(120deg, #123b33, #1b5548);
}

.eyebrow {
  display: block;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 0.65rem;
}

.catalog-hero .eyebrow { color: #f2c56d; }

.catalog-hero h1 {
  max-width: 860px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.8rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.catalog-hero p {
  max-width: 580px;
  margin: 1.6rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-stat {
  flex: 0 0 auto;
  border-left: 1px solid rgba(255,255,255,.35);
  padding-left: 2rem;
}

.hero-stat strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 4rem;
  line-height: 1;
}

.hero-stat span { color: rgba(255,255,255,.65); }

.catalog-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 4rem clamp(1.2rem, 5vw, 5rem) 7rem;
}

.catalog-heading,
.section-actions,
.subsection-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.catalog-heading h2,
.admin-topbar h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 500;
}

.search-field input {
  width: min(360px, 80vw);
  padding: 0.8rem 0.2rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}

.catalog-page .series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2.4rem 1.4rem;
  max-width: none;
  padding: 2.5rem 0 0;
}

.catalog-page .series-card {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  cursor: pointer;
  transition: transform .25s ease;
}

.catalog-page .series-card:hover,
.catalog-page .series-card:focus-visible {
  transform: translateY(-7px);
  outline: none;
}

.catalog-page .series-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  height: auto;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #d8d1c2;
  box-shadow: 0 10px 32px rgba(28, 25, 18, .13);
}

.catalog-page .series-cover img { width: 100%; height: 100%; object-fit: cover; }

.catalog-page .series-status {
  position: absolute;
  top: .7rem;
  left: .7rem;
  padding: .35rem .55rem;
  color: white;
  background: rgba(20, 62, 53, .88);
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 800;
}

.catalog-page .series-info { padding: 1rem .1rem; }
.catalog-page .series-info h3 { margin: .3rem 0 .6rem; font-family: Georgia, serif; font-size: 1.3rem; }
.catalog-page .series-genre { color: var(--accent-dark); font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; }
.card-meta { display: flex; flex-wrap: wrap; gap: .8rem; color: #726c60; font-size: .72rem; }

.catalog-page .modal-overlay {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(16, 28, 24, .72);
  backdrop-filter: blur(8px);
}
.catalog-page .modal-overlay.hidden { display: none; }
.catalog-page .series-detail {
  width: min(1100px, 96vw);
  max-height: 92vh;
  overflow: auto;
  padding: clamp(1.3rem, 4vw, 3rem);
  background: var(--paper-strong);
  border-radius: var(--radius-lg);
  color: var(--ink);
}
.catalog-page .series-detail-head { display: grid; grid-template-columns: 180px 1fr; gap: 2rem; }
.catalog-page .detail-cover { width: 180px; height: 270px; border-radius: var(--radius-sm); overflow: hidden; background: #ddd5c6; }
.catalog-page .detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.catalog-page .detail-info h2 { margin: 0 0 .7rem; font: 500 clamp(2rem, 5vw, 4rem)/1 Georgia, serif; }
.rating-summary { display: flex; gap: .8rem; align-items: baseline; margin-top: 1rem; }
.rating-summary strong { font: 500 2rem Georgia, serif; color: var(--accent-dark); }
.rating-buttons button { color: #b9b09f; background: none; border: 0; font-size: 1.35rem; cursor: pointer; }
.rating-buttons button.active { color: var(--gold); }
.detail-columns { display: grid; grid-template-columns: 1.25fr .75fr; gap: 2.5rem; margin-top: 2.5rem; }
.chapter-list { display: grid; gap: .55rem; }
.chapter-row { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem; color: var(--ink); background: #f2ede1; border: 1px solid transparent; border-radius: var(--radius-sm); text-decoration: none; }
.chapter-row:hover { border-color: var(--accent); }
.chapter-row > div { display: grid; gap: .25rem; }
.chapter-row > div:last-child { text-align: right; }
.chapter-row span, .chapter-row small { color: #746d60; font-size: .78rem; }
.chapter-row.locked { opacity: .7; }
.chapter-lock span { color: var(--accent-dark); font-weight: 800; }
.comment-form { display: grid; gap: .65rem; }
.comment-form textarea { min-height: 90px; resize: vertical; }
.comments-list { display: grid; gap: .7rem; margin-top: 1rem; }
.comment { padding: .9rem; border-bottom: 1px solid var(--line); }
.comment > div { display: flex; justify-content: space-between; gap: .5rem; }
.comment time { color: #80786a; font-size: .68rem; }
.comment p { margin: .5rem 0 0; white-space: pre-wrap; font-size: .86rem; }

/* ============================================================
   PANEL ADMINISTRATIVO
   ============================================================ */

.admin-page { min-height: 100vh; }
.admin-page .admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 245px;
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  color: #f7f1e4;
  background: var(--forest);
}
.admin-brand { display: flex; align-items: center; gap: .7rem; color: white; text-decoration: none; font-weight: 800; }
.admin-identity { display: grid; margin: 2rem 0; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.15); border-bottom: 1px solid rgba(255,255,255,.15); }
.admin-identity span { color: rgba(255,255,255,.55); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
#admin-nav { display: grid; gap: .25rem; }
#admin-nav button, .sidebar-footer button, .sidebar-footer a { width: 100%; display: flex; gap: .8rem; padding: .75rem; color: rgba(255,255,255,.72); background: transparent; border: 0; border-radius: var(--radius-sm); text-align: left; text-decoration: none; cursor: pointer; }
#admin-nav button:hover, #admin-nav button.active { color: white; background: rgba(255,255,255,.1); }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.15); padding-top: .7rem; }
.admin-page .admin-main { margin-left: 245px; padding: 2.5rem clamp(1.2rem, 4vw, 4rem) 5rem; max-width: none; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.status-dot { color: #226253; background: #d9eadf; border-color: #bad7c5; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-card, .panel-card, .content-card, .empty-panel { background: var(--paper-strong); border: 1px solid var(--line); border-radius: var(--radius-md); }
.stat-card { display: grid; padding: 1.25rem; }
.stat-card span { color: #6f685c; font-size: .76rem; }
.stat-card strong { margin: .5rem 0; font: 500 2.4rem Georgia, serif; }
.stat-card small { color: #91887a; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.panel-card { padding: 1.4rem; }
.panel-card h2 { margin-top: 0; font: 500 1.35rem Georgia, serif; }
.ranking-row, .activity-row { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.activity-row { grid-template-columns: 1fr; gap: .2rem; }
.activity-row p { margin: 0; color: #766f63; font-size: .8rem; }
.section-actions { margin-bottom: 1.3rem; }
.section-actions p { color: #6e675b; }
.content-list { display: grid; gap: .8rem; }
.content-card { display: grid; grid-template-columns: 75px 1fr auto; gap: 1.1rem; align-items: center; padding: .9rem; }
.content-cover { width: 75px; height: 105px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: #ddd5c5; color: #857c6e; font-weight: 900; }
.content-cover img { width: 100%; height: 100%; object-fit: cover; }
.content-copy h2 { margin: 0; font: 500 1.45rem Georgia, serif; }
.content-copy p { margin: .4rem 0 0; color: #756e62; font-size: .78rem; }
.content-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.content-actions button, .chapter-admin-row button, .admin-table button, .moderation-card button { padding: .5rem .7rem; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.danger-link { color: #a13724 !important; border-color: #e3b4a9 !important; }
.chapter-admin-area { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 1rem; }
.chapter-admin-heading, .chapter-admin-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.chapter-admin-row { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.chapter-admin-row > div { display: grid; gap: .2rem; }
.chapter-admin-row span, .chapter-admin-row small { color: #756e62; font-size: .75rem; }
.badge-vip { color: #684600; background: #f4cc74; }
.admin-table td strong, .admin-table td small { display: block; }
.moderation-card { padding: 1rem; background: var(--paper-strong); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.moderation-card > div { display: flex; justify-content: space-between; gap: .6rem; }
.moderation-card span { color: #756e62; font-size: .75rem; }
.app-dialog { width: min(600px, 94vw); padding: 0; color: var(--ink); background: var(--paper-strong); border: 0; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); }
.app-dialog::backdrop { background: rgba(12,31,26,.72); backdrop-filter: blur(5px); }
.app-dialog form { display: grid; gap: 1rem; padding: 1.5rem; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; }
.dialog-heading h2 { margin: 0; font: 500 1.8rem Georgia, serif; }
.dialog-heading button { font-size: 1.5rem; background: none; border: 0; cursor: pointer; }
.app-dialog label { display: grid; gap: .4rem; color: #554f45; font-size: .8rem; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.check-row { grid-template-columns: auto 1fr !important; align-items: center; }
.check-row small { grid-column: 2; font-weight: 400; color: #7d7568; }

@media (max-width: 850px) {
  .catalog-hero { min-height: 390px; align-items: flex-start; flex-direction: column; padding-top: 4rem; }
  .hero-stat { border-left: 0; padding-left: 0; }
  .detail-columns { grid-template-columns: 1fr; }
  .catalog-page .series-detail-head { grid-template-columns: 110px 1fr; }
  .catalog-page .detail-cover { width: 110px; height: 165px; }
  .admin-page .admin-sidebar { position: static; width: auto; }
  .admin-page .admin-main { margin-left: 0; }
  #admin-nav { grid-template-columns: repeat(3, 1fr); }
  #admin-nav button { font-size: .72rem; }
  .sidebar-footer { display: none; }
  .stats-grid, .dashboard-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .catalog-page .navbar { padding: .75rem 1rem; }
  .catalog-page .navbar-links { gap: .45rem; }
  .nav-greeting { display: none; }
  .catalog-hero h1 { font-size: 3.2rem; }
  .catalog-heading { align-items: stretch; flex-direction: column; }
  .search-field input { width: 100%; }
  .catalog-page .series-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem .75rem; }
  .catalog-page .series-detail-head { grid-template-columns: 1fr; }
  .catalog-page .detail-cover { width: 100%; height: 220px; }
  .stats-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .content-card { grid-template-columns: 55px 1fr; }
  .content-cover { width: 55px; height: 78px; }
  .content-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .form-row { grid-template-columns: 1fr; }
}
.perspective-banner {
  position: fixed; inset: 0 0 auto; z-index: 3000; min-height: 42px; padding: 8px 18px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #f59e0b; color: #211506; font-size: .82rem; box-shadow: 0 8px 30px rgba(0,0,0,.24);
}
.perspective-banner svg { width: 17px; }
.perspective-banner a { margin-left: 10px; color: inherit; font-weight: 800; }
.perspective-banner + .reader-nav { top: 42px; }
.admin-preview { left: 250px; }
.admin-page:has(.admin-preview) .admin-main { padding-top: 42px; }
@media (max-width: 760px) {
  .perspective-banner { justify-content: flex-start; font-size: .72rem; }
  .admin-preview { left: 0; }
}

/* ============================================================
   STUDIO — AUDITORÍA FINAL DE ALINEACIÓN Y EXPERIENCIA
   Mantener al final: normaliza reglas heredadas del prototipo.
   ============================================================ */
.admin-page,
.admin-page button,
.admin-page input,
.admin-page textarea,
.admin-page select {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}
.admin-page button,
.admin-page a {
  -webkit-tap-highlight-color: transparent;
}
.admin-page svg {
  display: block;
  flex: 0 0 auto;
  stroke-width: 1.8;
}
.admin-page .admin-sidebar {
  position: sticky !important;
  top: 0 !important;
  width: 100% !important;
  height: auto !important;
  padding-inline: clamp(24px,4vw,64px) !important;
  display: grid !important;
  grid-template-columns: auto minmax(180px,auto) 1fr auto !important;
  grid-template-rows: 66px 54px !important;
  gap: 0 30px !important;
  border: 0 !important;
  border-bottom: 1px solid #e1e1dc !important;
  background: rgba(255,255,255,.97) !important;
}
.admin-page:has(.admin-preview) .admin-sidebar { top: 38px !important; }
.admin-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  line-height: 1 !important;
}
.admin-brand > span:last-child {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.admin-page .brand-mark {
  display: grid !important;
  width: 32px !important;
  height: 32px !important;
  place-items: center;
}
.admin-identity {
  display: flex !important;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.admin-identity span,.admin-identity strong { line-height: 1.25; }
#admin-nav {
  display: flex !important;
  align-items: stretch !important;
  gap: 30px !important;
}
#admin-nav button {
  display: inline-flex !important;
  width: auto !important;
  min-height: 54px !important;
  padding: 0 1px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #6d6d67 !important;
  background: transparent !important;
  box-shadow: none !important;
  line-height: 1 !important;
  white-space: nowrap;
}
#admin-nav button span {
  display: inline-grid !important;
  width: 17px !important;
  height: 17px !important;
  place-items: center;
  line-height: 0;
}
#admin-nav button span svg { width: 16px; height: 16px; }
#admin-nav button:hover { color: #171717 !important; }
#admin-nav button.active {
  color: #171717 !important;
  box-shadow: inset 0 -2px #2457d6 !important;
}
.sidebar-footer {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end;
  gap: 18px !important;
}
.sidebar-footer a,
.sidebar-footer button {
  display: inline-flex !important;
  width: auto !important;
  min-height: 40px !important;
  padding: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #666660 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: .7rem !important;
  font-weight: 600;
  line-height: 1 !important;
  white-space: nowrap;
}
.sidebar-footer svg { width: 15px; height: 15px; }
.sidebar-footer a:hover,.sidebar-footer button:hover { color: #171717 !important; }
.sidebar-footer a:focus-visible,.sidebar-footer button:focus-visible,
#admin-nav button:focus-visible,.command-button:focus-visible {
  outline: 2px solid #2457d6 !important;
  outline-offset: 4px;
}
.admin-page .admin-main {
  width: min(1440px,100%) !important;
  margin: 0 auto !important;
  padding: 54px clamp(24px,5vw,80px) 100px !important;
}
.admin-page:has(.admin-preview) .admin-main { padding-top: 54px !important; }
.admin-topbar {
  display: flex !important;
  margin: 0 0 48px !important;
  padding: 0 0 28px !important;
  align-items: flex-end !important;
  border-bottom: 1px solid #deded9 !important;
}
.admin-topbar .eyebrow {
  color: #2457d6 !important;
  font-size: .61rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: .15em;
}
.admin-topbar h1,
.panel-card h2,
.content-copy h2,
.dialog-heading h2,
.stat-card strong {
  font-family: Inter, "Segoe UI", system-ui, sans-serif !important;
}
.admin-topbar h1 {
  margin: 10px 0 0 !important;
  font-size: clamp(2.7rem,5vw,4.4rem) !important;
  font-weight: 620 !important;
  line-height: .95 !important;
  letter-spacing: -.065em !important;
}
.topbar-tools {
  display: inline-flex;
  align-items: center;
  gap: 18px !important;
}
.command-button {
  display: inline-flex !important;
  min-height: 38px;
  padding: 0 !important;
  align-items: center;
  gap: 7px !important;
  border: 0 !important;
  color: #65655f !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: .7rem;
}
.command-button svg { width: 15px; }
.command-button kbd {
  margin-left: 2px;
  padding: 2px 5px;
  border: 1px solid #d7d7d1;
  border-radius: 5px;
  color: #8a8a84;
  background: #fff;
  font-family: inherit;
  font-size: .58rem;
  font-weight: 500;
  line-height: 1.2;
}
.status-dot {
  display: inline-flex !important;
  padding: 0 !important;
  align-items: center;
  gap: 7px;
  border: 0 !important;
  color: #50625a !important;
  background: transparent !important;
  font-size: .66rem;
  line-height: 1;
  letter-spacing: .02em;
}
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: #2f8b60; box-shadow: 0 0 0 4px #e4f2ea; }
.stats-grid { gap: 16px !important; }
.stat-card {
  min-height: 132px !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #deded9 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
}
.stat-card span { color: #65655f; font-size: .68rem; line-height: 1.3; }
.stat-card strong { color: #171717; font-size: 1.75rem !important; font-weight: 610 !important; line-height: 1; letter-spacing: -.04em; }
.stat-card small { color: #85857f; font-size: .62rem; line-height: 1.35; }
.panel-card,.content-card,.empty-panel,.table-wrapper {
  border-color: #deded9 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.panel-card h2 { font-weight: 620 !important; letter-spacing: -.025em; }
.empty-panel {
  min-height: 190px !important;
  padding: 48px 24px !important;
  border-style: dashed !important;
  color: #777771 !important;
  background: rgba(255,255,255,.55) !important;
  line-height: 1.5;
}
.perspective-banner {
  min-height: 38px !important;
  padding: 7px 18px !important;
  gap: 9px !important;
  color: #f7f7f5 !important;
  background: #20201e !important;
  box-shadow: none !important;
  font-size: .7rem !important;
}
.perspective-banner svg { width: 14px; height: 14px; color: #b8c8ff; }
.perspective-banner a {
  margin-left: 12px !important;
  color: #d8e1ff !important;
  font-weight: 650 !important;
  text-underline-offset: 3px;
}
.admin-page .app-dialog[open] {
  position: fixed !important;
  inset: 0 !important;
  margin: auto !important;
}
.admin-page .dialog-heading button {
  display: grid !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.admin-page .modal-actions {
  align-items: center !important;
}
.admin-page .modal-actions button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
@media (max-width: 900px) {
  .admin-page .admin-sidebar {
    grid-template-columns: 1fr auto !important;
    grid-template-rows: 62px 50px !important;
    gap: 0 18px !important;
    padding-inline: 18px !important;
  }
  .admin-identity { display: none !important; }
  .sidebar-footer { display: inline-flex !important; }
  .sidebar-footer a { display: none !important; }
  #admin-nav { grid-column: 1/-1 !important; gap: 24px !important; }
  #admin-nav button { min-height: 50px !important; }
  .admin-page .admin-main { padding: 38px 18px 80px !important; }
  .admin-topbar { align-items: flex-start !important; }
}
@media (max-width: 560px) {
  .admin-brand b { display: none; }
  .sidebar-footer button span { display: none; }
  .sidebar-footer button { width: 40px !important; }
  .admin-topbar h1 { font-size: 2.55rem !important; }
  .perspective-banner { justify-content: space-between !important; }
  .perspective-banner > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .perspective-banner a { flex: 0 0 auto; }
}

/* ============================================================
   READER — AUDITORÍA EDITORIAL FINAL
   ============================================================ */
.reader-catalog {
  --reader-paper: #f6f5f1;
  --reader-white: #fff;
  --reader-ink: #171717;
  --reader-muted: #6c6c66;
  --reader-line: #deded8;
  --reader-blue: #2457d6;
  min-height: 100vh;
  color: var(--reader-ink);
  background: var(--reader-paper);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}
.reader-catalog button,.reader-catalog input,.reader-catalog textarea,.reader-catalog select { font-family: inherit; }
.reader-catalog svg { display: block; flex: 0 0 auto; stroke-width: 1.8; }
.reader-nav {
  position: sticky !important;
  top: 0;
  min-height: 68px !important;
  padding: 0 clamp(20px,4vw,64px) !important;
  border-bottom: 1px solid var(--reader-line) !important;
  color: var(--reader-ink) !important;
  background: rgba(255,255,255,.96) !important;
  backdrop-filter: blur(16px);
}
.minxtral-wordmark {
  gap: 10px !important;
  color: var(--reader-ink) !important;
  font-size: .88rem;
  line-height: 1;
}
.wordmark-icon {
  width: 32px !important;
  height: 32px !important;
  border: 0 !important;
  border-radius: 9px !important;
  color: #fff;
  background: #171717 !important;
}
.wordmark-icon svg { width: 16px; height: 16px; }
.reader-nav-center { display: flex; justify-content: center; }
.community-control {
  width: min(300px,100%);
  min-height: 38px;
  padding: 0 12px !important;
  gap: 8px !important;
  border: 1px solid var(--reader-line) !important;
  border-radius: 8px !important;
  color: #666660;
  background: #fafaf8 !important;
}
.community-control svg { width: 15px !important; color: #777771 !important; }
.community-control select {
  color: #3e3e3a !important;
  font-size: .7rem !important;
  font-weight: 600 !important;
}
.reader-actions { gap: 14px !important; }
.reader-icon-button {
  display: inline-grid !important;
  width: 34px !important;
  height: 34px !important;
  place-items: center;
  border: 0 !important;
  border-radius: 7px !important;
  color: #666660 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
.reader-icon-button svg { width: 16px !important; height: 16px; }
.reader-icon-button:hover { color: #171717 !important; background: #f0f0ec !important; }
.reader-icon-button:focus-visible,.reader-primary-action:focus-visible,.reader-search input:focus-visible {
  outline: 2px solid var(--reader-blue) !important;
  outline-offset: 3px;
}
.reader-profile {
  gap: 8px !important;
  padding: 0 4px 0 14px !important;
  border-left: 1px solid var(--reader-line);
}
.profile-avatar {
  width: 30px !important;
  height: 30px !important;
  color: #fff !important;
  background: #2d2d2a !important;
}
.reader-profile strong { color: #292926; font-size: .68rem !important; line-height: 1.2; }
.reader-profile small { color: #85857f !important; line-height: 1.2; }
.reader-nav .membership-badge {
  padding: 4px 8px !important;
  border: 1px solid #d7d7d1 !important;
  border-radius: 999px !important;
  color: #666660 !important;
  background: transparent !important;
  font-size: .58rem !important;
  letter-spacing: .06em;
}
.reader-nav .membership-badge.vip { border-color: #d8b96d !important; color: #725410 !important; background: #fff9e9 !important; }
.reader-hero {
  min-height: 590px !important;
  grid-template-columns: minmax(0,1fr) 320px !important;
  gap: clamp(48px,8vw,120px) !important;
  padding: clamp(72px,9vw,128px) clamp(24px,7vw,112px) !important;
  border-bottom: 1px solid var(--reader-line);
  color: var(--reader-ink) !important;
  background: var(--reader-white) !important;
}
.reader-hero::before {
  content: "";
  position: absolute;
  inset: 0 45% 0 auto;
  width: 1px;
  background: linear-gradient(transparent,#e8e8e3 20%,#e8e8e3 80%,transparent);
}
.reader-hero::after,.hero-noise { display: none !important; }
.reader-kicker {
  gap: 7px !important;
  color: var(--reader-blue) !important;
  font-size: .61rem !important;
  font-weight: 750 !important;
  line-height: 1;
  letter-spacing: .14em !important;
}
.reader-kicker svg { width: 14px !important; height: 14px; }
.reader-hero h1 {
  max-width: 820px !important;
  margin: 22px 0 24px !important;
  color: var(--reader-ink);
  font-family: Inter,"Segoe UI",system-ui,sans-serif !important;
  font-size: clamp(3.5rem,7vw,7rem) !important;
  font-weight: 600 !important;
  line-height: .91 !important;
  letter-spacing: -.075em !important;
}
.reader-hero-copy > p {
  max-width: 590px !important;
  color: var(--reader-muted) !important;
  font-size: .88rem;
  line-height: 1.75 !important;
}
.reader-hero-actions { margin-top: 32px !important; gap: 20px !important; }
.reader-primary-action {
  min-height: 42px !important;
  padding: 0 15px !important;
  gap: 8px !important;
  border-radius: 8px !important;
  color: #fff !important;
  background: #171717 !important;
  box-shadow: none !important;
  font-size: .7rem !important;
  font-weight: 650 !important;
  transform: none !important;
}
.reader-primary-action:hover { background: var(--reader-blue) !important; }
.reader-primary-action svg { width: 15px !important; height: 15px; }
.reader-hero-actions > span { color: #777771 !important; font-size: .7rem !important; }
.reader-hero-actions > span strong { color: #171717 !important; font-size: 1rem !important; }
.membership-card {
  align-self: center !important;
  padding: 28px !important;
  border: 1px solid var(--reader-line) !important;
  border-radius: 12px !important;
  color: var(--reader-ink);
  background: #fafaf8 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.membership-card-icon {
  width: 38px !important;
  height: 38px !important;
  margin-bottom: 40px !important;
  border: 1px solid #deded8;
  border-radius: 9px !important;
  color: #6f5417 !important;
  background: #fff8e5 !important;
}
.membership-card-icon svg { width: 17px !important; }
.membership-card > span { color: #85857f !important; font-size: .58rem !important; font-weight: 700; }
.membership-card > strong { margin: 8px 0 !important; color: #171717; font-size: 1.3rem !important; letter-spacing: -.03em; }
.membership-card > p { color: var(--reader-muted) !important; font-size: .72rem !important; line-height: 1.65 !important; }
.membership-rule {
  margin-top: 24px !important;
  padding-top: 16px !important;
  border-color: var(--reader-line) !important;
  color: #666660 !important;
  font-size: .64rem !important;
}
.reader-library {
  max-width: 1440px !important;
  padding: 88px clamp(24px,5vw,72px) 120px !important;
}
.library-heading { align-items: flex-end !important; }
.library-heading h2 {
  margin: 12px 0 10px !important;
  color: var(--reader-ink);
  font-family: Inter,"Segoe UI",system-ui,sans-serif !important;
  font-size: clamp(2.4rem,5vw,4.2rem) !important;
  font-weight: 600 !important;
  line-height: .98 !important;
  letter-spacing: -.06em !important;
}
.library-heading p { color: var(--reader-muted) !important; font-size: .76rem !important; }
.reader-search {
  width: min(360px,100%) !important;
  min-height: 42px;
  padding: 0 12px !important;
  gap: 8px !important;
  border: 1px solid var(--reader-line) !important;
  border-radius: 8px;
  background: #fff;
}
.reader-search svg { width: 15px !important; color: #777771 !important; }
.reader-search input { min-width: 0; color: #262623 !important; font-size: .72rem; }
.reader-search input:focus-visible { outline: 0 !important; }
.reader-search:focus-within { border-color: var(--reader-blue) !important; box-shadow: 0 0 0 3px rgba(36,87,214,.1); }
.reader-search kbd { border-color: #d7d7d1 !important; color: #8a8a84 !important; background: #f7f7f4 !important; }
.catalog-toolbar {
  margin-top: 48px !important;
  padding-bottom: 14px !important;
  border-color: var(--reader-line) !important;
  color: #777771 !important;
  font-size: .66rem !important;
}
.reader-catalog .series-grid {
  grid-template-columns: repeat(auto-fill,minmax(200px,1fr)) !important;
  gap: 42px 18px !important;
  padding: 28px 0 0 !important;
}
.reader-catalog .series-card { transform: none !important; }
.reader-catalog .series-card:focus-visible { outline: 2px solid var(--reader-blue); outline-offset: 5px; }
.reader-catalog .series-cover {
  border: 1px solid #d8d8d2;
  border-radius: 8px !important;
  background: #e9e9e4 !important;
  box-shadow: none !important;
  transition: transform .22s ease,box-shadow .22s ease;
}
.reader-catalog .series-card:hover .series-cover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(30,30,27,.12) !important; }
.reader-catalog .cover-placeholder { color: #999992 !important; background: #e9e9e4 !important; }
.reader-catalog .series-status {
  border: 0 !important;
  border-radius: 5px !important;
  color: #fff;
  background: rgba(23,23,23,.82) !important;
}
.reader-catalog .series-info { padding: 14px 1px 0 !important; }
.reader-catalog .series-info h3 {
  margin: 4px 0 8px;
  color: #1f1f1c;
  font-family: Inter,"Segoe UI",system-ui,sans-serif !important;
  font-size: 1rem !important;
  font-weight: 620 !important;
  line-height: 1.3 !important;
  letter-spacing: -.025em;
}
.reader-catalog .series-genre { color: var(--reader-blue) !important; font-size: .59rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.reader-catalog .card-meta { color: #7c7c76; font-size: .61rem; }
.reader-empty-state {
  min-height: 340px !important;
  border-color: #d3d3cd !important;
  border-radius: 10px !important;
}
.reader-empty-state > span {
  width: 48px !important;
  height: 48px !important;
  border: 1px solid #deded8;
  border-radius: 9px !important;
  color: #666660 !important;
  background: #fff !important;
}
.reader-empty-state h3 {
  font-family: Inter,"Segoe UI",system-ui,sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 620 !important;
  letter-spacing: -.03em;
}
.reader-empty-state p { color: var(--reader-muted) !important; }
.modal-open { overflow: hidden; }
.reader-catalog .modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2000;
  padding: 24px;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(24,24,22,.58) !important;
  backdrop-filter: blur(3px);
}
.reader-catalog .modal-overlay.hidden { display: none !important; }
.reader-catalog .series-detail {
  width: min(1040px,100%) !important;
  max-width: 1040px !important;
  max-height: calc(100vh - 48px);
  margin: auto !important;
  padding: clamp(24px,4vw,48px) !important;
  overflow-y: auto;
  border: 1px solid #d8d8d2 !important;
  border-radius: 14px !important;
  color: var(--reader-ink);
  background: #fff !important;
  box-shadow: 0 30px 100px rgba(20,20,18,.25) !important;
}
.reader-catalog .modal-close-btn {
  top: 18px !important;
  right: 18px !important;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #555550;
  background: #f0f0ec;
}
.reader-catalog .series-detail-head {
  grid-template-columns: 170px 1fr !important;
  gap: 32px !important;
  padding-bottom: 32px !important;
  border-color: var(--reader-line) !important;
}
.reader-catalog .detail-cover { width: 170px !important; height: 255px !important; border-radius: 8px !important; }
.reader-catalog .detail-info h2 {
  font-family: Inter,"Segoe UI",system-ui,sans-serif !important;
  font-size: clamp(2rem,4vw,3.5rem) !important;
  font-weight: 620 !important;
  line-height: 1 !important;
  letter-spacing: -.055em !important;
}
.rating-summary strong { color: #171717 !important; font-family: inherit !important; font-weight: 620 !important; }
.rating-buttons { display: flex; gap: 2px; }
.rating-buttons button { line-height: 1; }
.reader-catalog .detail-columns { gap: 32px !important; padding-top: 32px; }
.reader-catalog .community-column { border: 1px solid var(--reader-line); border-radius: 10px !important; background: #f7f7f4 !important; }
.chapter-row {
  border: 1px solid var(--reader-line) !important;
  border-radius: 8px !important;
  color: #252522 !important;
  background: #fff !important;
}
.chapter-row:hover { border-color: #aebee7 !important; background: #f8faff !important; }
.comment-form textarea { border-color: #cecec8 !important; border-radius: 8px !important; background: #fff !important; }
.comment { border-color: var(--reader-line) !important; }
@media (max-width: 900px) {
  .reader-nav { grid-template-columns: 1fr auto !important; padding: 10px 18px !important; }
  .reader-nav-center { grid-row: 2; grid-column: 1/-1; padding: 8px 0 0 !important; }
  .community-control { width: 100%; }
  .reader-hero { grid-template-columns: 1fr !important; min-height: auto !important; }
  .reader-hero::before { display: none; }
  .membership-card { width: min(420px,100%); }
  .reader-catalog .detail-columns { grid-template-columns: 1fr !important; }
}
@media (max-width: 600px) {
  .reader-profile,.reader-nav .membership-badge { display: none !important; }
  .reader-actions { gap: 4px !important; }
  .reader-hero { padding: 64px 20px 48px !important; }
  .reader-hero h1 { font-size: 3.3rem !important; }
  .reader-hero-actions { align-items: flex-start !important; flex-direction: column !important; }
  .reader-library { padding: 64px 18px 88px !important; }
  .library-heading { align-items: flex-start !important; flex-direction: column !important; }
  .reader-search { width: 100% !important; }
  .reader-catalog .series-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 28px 10px !important; }
  .reader-catalog .series-detail { padding: 52px 18px 24px !important; }
  .reader-catalog .series-detail-head { grid-template-columns: 100px 1fr !important; gap: 18px !important; }
  .reader-catalog .detail-cover { width: 100px !important; height: 150px !important; }
  .reader-catalog .detail-info h2 { font-size: 1.8rem !important; }
  .reader-catalog .modal-overlay { padding: 10px; }
}

/* Buzón de mejoras */
.feedback-dialog[open] {
  position: fixed;
  inset: 0;
  width: min(600px,calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #d8d8d2;
  border-radius: 14px;
  color: #171717;
  background: #fff;
  box-shadow: 0 28px 90px rgba(17,17,17,.23);
}
.feedback-dialog::backdrop { background: rgba(20,20,18,.56); backdrop-filter: blur(3px); }
.feedback-dialog form { display: grid; gap: 18px; padding: 28px; }
.feedback-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid #deded8; }
.feedback-heading span { color: #2457d6; font-size: .58rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.feedback-heading h2 { margin: 6px 0 0; font: 620 1.45rem/1.1 Inter,"Segoe UI",system-ui,sans-serif; letter-spacing: -.035em; }
.feedback-heading button { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 8px; color: #555550; background: #f1f1ee; }
.feedback-heading svg { width: 16px; }
.feedback-dialog form > p { margin: 0; color: #6c6c66; font-size: .76rem; line-height: 1.6; }
.feedback-dialog label { display: grid; gap: 7px; color: #4b4b46; font-size: .68rem; font-weight: 650; }
.feedback-dialog select,.feedback-dialog textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #cecec8; border-radius: 8px; outline: 0; color: #262623; background: #fff; font: inherit;
}
.feedback-dialog select { min-height: 42px; }
.feedback-dialog textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.feedback-dialog select:focus,.feedback-dialog textarea:focus { border-color: #2457d6; box-shadow: 0 0 0 3px rgba(36,87,214,.1); }
.feedback-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.feedback-actions > button { min-height: 40px; padding: 0 15px; border: 1px solid #cecec8; border-radius: 8px; color: #454541; background: #fff; }
.feedback-result { color: #2f7655 !important; font-weight: 650; }
.feedback-inbox { display: grid; gap: 12px; }
.feedback-ticket { padding: 22px; border: 1px solid #deded8; border-radius: 10px; background: #fff; }
.feedback-ticket header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.feedback-ticket header div { display: flex; align-items: baseline; gap: 10px; }
.feedback-ticket header span { color: #2457d6; font-size: .58rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.feedback-ticket header strong { font-size: .76rem; }
.feedback-ticket header small,.feedback-ticket time { color: #85857f; font-size: .62rem; }
.feedback-ticket > p { margin: 18px 0; color: #383834; font-size: .8rem; line-height: 1.65; white-space: pre-wrap; }
.feedback-review { display: grid; grid-template-columns: 160px 1fr auto; gap: 8px; padding-top: 14px; border-top: 1px solid #e5e5df; }
.feedback-review select,.feedback-review input,.feedback-review button { min-height: 38px; border: 1px solid #cecec8; border-radius: 7px; background: #fff; font: inherit; font-size: .68rem; }
.feedback-review select,.feedback-review input { padding: 0 10px; }
.feedback-review button { padding: 0 14px; color: #fff; border-color: #171717; background: #171717; }
@media (max-width: 680px) {
  .feedback-dialog form { padding: 22px 18px; }
  .feedback-review { grid-template-columns: 1fr; }
  .feedback-ticket header,.feedback-ticket header div { align-items: flex-start; flex-direction: column; gap: 5px; }
}
