@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #090a09;
  --bg2: #101210;
  --bg3: #171a17;
  --surface: rgba(22, 25, 22, 0.88);
  --surface-2: rgba(28, 31, 28, 0.94);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(126, 223, 99, 0.22);
  --text: #edf3eb;
  --text2: #b3bcb1;
  --text3: #6f796e;
  --green: #72db62;
  --green-2: #9cfb72;
  --green-dim: rgba(114, 219, 98, 0.13);
  --green-glow: rgba(114, 219, 98, 0.26);
  --red: #f07167;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 64px;
  --trans: .18s ease;
  --font: 'Inter', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, var(--area-bg-glow, rgba(114, 219, 98, 0.08)), transparent 22%),
    radial-gradient(circle at bottom right, var(--area-bg-glow-soft, rgba(114, 219, 98, 0.05)), transparent 20%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body[data-area="manga"] {
  --area-bg-glow: rgba(114, 219, 98, 0.08);
  --area-bg-glow-soft: rgba(114, 219, 98, 0.05);
}

body[data-area="books"] {
  --bg: #0d0b08;
  --bg2: #15110c;
  --bg3: #201910;
  --green: #c98f45;
  --green-2: #f0c985;
  --green-dim: rgba(201, 143, 69, 0.15);
  --green-glow: rgba(201, 143, 69, 0.28);
  --border-strong: rgba(240, 201, 133, 0.24);
  --area-bg-glow: rgba(201, 143, 69, 0.1);
  --area-bg-glow-soft: rgba(95, 58, 30, 0.09);
}

body[data-area="comics"] {
  --bg: #070910;
  --bg2: #100d1d;
  --bg3: #1a1430;
  --green: #9b5cff;
  --green-2: #63b7ff;
  --green-dim: rgba(155, 92, 255, 0.16);
  --green-glow: rgba(99, 183, 255, 0.22);
  --border-strong: rgba(155, 92, 255, 0.24);
  --area-bg-glow: rgba(155, 92, 255, 0.12);
  --area-bg-glow-soft: rgba(99, 183, 255, 0.1);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
}

a,
[role="button"] {
  touch-action: manipulation;
}

input,
select {
  font-family: var(--font);
}

select option {
  color: #edf3eb;
  background: #111411;
}

body[data-area="books"] select option {
  background: #1b130c;
}

body[data-area="comics"] select option {
  background: #100d1d;
}

img {
  display: block;
}

.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.fx-orb,
.fx-particle {
  position: absolute;
  display: block;
}

.fx-orb {
  border-radius: 50%;
  filter: blur(30px);
  opacity: .22;
}

.orb-1 {
  width: 320px;
  height: 320px;
  top: 6%;
  left: -90px;
  background: radial-gradient(circle, rgba(114, 219, 98, 0.44), rgba(114, 219, 98, 0));
}

.orb-2 {
  width: 240px;
  height: 240px;
  top: 36%;
  right: -80px;
  background: radial-gradient(circle, rgba(99, 188, 84, 0.34), rgba(99, 188, 84, 0));
}

.orb-3 {
  width: 220px;
  height: 220px;
  bottom: 10%;
  left: 18%;
  background: radial-gradient(circle, rgba(158, 251, 114, 0.18), rgba(158, 251, 114, 0));
}

.orb-4 {
  width: 180px;
  height: 180px;
  top: 12%;
  right: 20%;
  background: radial-gradient(circle, rgba(158, 251, 114, 0.16), rgba(158, 251, 114, 0));
}

.orb-5 {
  width: 240px;
  height: 240px;
  bottom: 18%;
  right: 8%;
  background: radial-gradient(circle, rgba(114, 219, 98, 0.12), rgba(114, 219, 98, 0));
}

.fx-particle {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(158, 251, 114, 0.84);
  box-shadow: 0 0 12px rgba(158, 251, 114, 0.36);
  animation: floatParticle linear infinite;
}

.p-1 { top: 12%; left: 18%; animation-duration: 14s; animation-delay: -3s; }
.p-2 { top: 20%; left: 72%; animation-duration: 18s; animation-delay: -10s; }
.p-3 { top: 27%; left: 84%; animation-duration: 13s; animation-delay: -5s; }
.p-4 { top: 39%; left: 14%; animation-duration: 16s; animation-delay: -8s; }
.p-5 { top: 48%; left: 56%; animation-duration: 15s; animation-delay: -2s; }
.p-6 { top: 58%; left: 80%; animation-duration: 17s; animation-delay: -6s; }
.p-7 { top: 64%; left: 28%; animation-duration: 13s; animation-delay: -7s; }
.p-8 { top: 72%; left: 60%; animation-duration: 19s; animation-delay: -1s; }
.p-9 { top: 80%; left: 8%; animation-duration: 14s; animation-delay: -11s; }
.p-10 { top: 82%; left: 88%; animation-duration: 16s; animation-delay: -4s; }
.p-11 { top: 10%; left: 48%; animation-duration: 20s; animation-delay: -9s; }
.p-12 { top: 52%; left: 94%; animation-duration: 18s; animation-delay: -12s; }

@keyframes floatParticle {
  0% {
    transform: translate3d(0, 0, 0) scale(.8);
    opacity: .1;
  }
  45% {
    opacity: .85;
  }
  100% {
    transform: translate3d(-18px, -42px, 0) scale(1.22);
    opacity: 0;
  }
}

#appHeader {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: rgba(7, 8, 7, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 20;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.3rem;
  padding: 0 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  white-space: nowrap;
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 768px) {
  .logo { cursor: pointer; }
  /* Em mobile, as tabs de áreas (Mangás/Livros/HQs) somem do header pra dar
     espaço. O usuário troca de área tocando no logo do Meruem. */
  .lib-tabs { display: none !important; }

  /* Header em grid 3 colunas: [logo] [centro = Apoiar] [actions]
     "Apoiar" fica naturalmente centralizado pela 2ª coluna do grid.
     Quando o user é Premium, o botão fica hidden (JS) e o centro fica vazio. */
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .6rem;
    align-items: center;
  }
  .logo { justify-self: start; }
  #headerPremiumBtn {
    justify-self: center;
    margin: 0;
  }
  .header-actions {
    justify-self: end;
    gap: .55rem;
  }
  /* Mais espaço pro chip de perfil (avatar + nome). */
  .header-user-chip {
    max-width: 140px;
    overflow: hidden;
  }
  .header-user-chip .user-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ── Tutorial do logo (primeira visita mobile) ──────────────────────────── */
.logo-tutorial {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}
.logo-tutorial.hidden { display: none; }
.logo-tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  pointer-events: auto;
}
.logo-tutorial-arrow {
  position: relative;
  margin: calc(var(--header-h) + 4px) 0 0 16px;
  color: var(--green-2);
  width: 24px;
  height: 60px;
  filter: drop-shadow(0 0 8px rgba(126, 217, 87, 0.55));
  animation: tutorialBounce 1.1s ease-in-out infinite;
  pointer-events: none;
}
.logo-tutorial-arrow svg {
  width: 100%;
  height: 100%;
}
@keyframes tutorialBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.logo-tutorial-card {
  position: relative;
  margin: 14px 18px 0 18px;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(20, 26, 22, 0.98), rgba(14, 18, 16, 0.98));
  border: 1px solid rgba(126, 217, 87, 0.32);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
  pointer-events: auto;
  max-width: 360px;
}
.logo-tutorial-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--green-2);
  margin: 0 0 .35rem;
}
.logo-tutorial-card p {
  font-size: .88rem;
  line-height: 1.45;
  color: var(--text2);
  margin: 0 0 .85rem;
}
.logo-tutorial-card p strong {
  color: var(--text);
}
.logo-tutorial-btn {
  display: block;
  width: 100%;
  padding: .7rem 1rem;
  background: linear-gradient(135deg, #7ed957, #96f56a);
  color: #071a05;
  font-weight: 800;
  border-radius: 10px;
  font-size: .92rem;
  -webkit-tap-highlight-color: transparent;
}
.logo-tutorial-btn:active { transform: translateY(1px); }

/* ── Popup "instalar como app" ─────────────────────────────────────────── */
.install-prompt-overlay {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.install-prompt-overlay.hidden { display: none; }
.install-prompt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}
.install-prompt-card {
  position: relative;
  margin: 0 16px 18px;
  padding: 1.15rem 1.2rem 1.1rem;
  background: linear-gradient(180deg, rgba(22, 28, 23, 0.99), rgba(14, 18, 16, 0.99));
  border: 1px solid rgba(126, 217, 87, 0.32);
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.52);
  width: min(420px, 100%);
  animation: installPromptIn .26s ease;
}
@keyframes installPromptIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.install-prompt-icon {
  display: inline-flex;
  width: 48px; height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(126, 217, 87, .18), rgba(126, 217, 87, .05));
  border: 1px solid rgba(126, 217, 87, .35);
  color: var(--green-2);
  margin-bottom: .55rem;
}
.install-prompt-card h3 {
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 .35rem;
}
.install-prompt-card p {
  font-size: .88rem;
  line-height: 1.5;
  color: var(--text2);
  margin: 0 0 .95rem;
}
.install-prompt-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.install-prompt-btn {
  width: 100%;
  padding: .72rem 1rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: .92rem;
  -webkit-tap-highlight-color: transparent;
}
.install-prompt-btn-primary {
  background: linear-gradient(135deg, #7ed957, #96f56a);
  color: #071a05;
}
.install-prompt-btn-secondary {
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .12);
}
.install-prompt-btn:active { transform: translateY(1px); }
.install-prompt-btn-link {
  background: none;
  color: var(--text3);
  font-size: .8rem;
  text-decoration: underline;
  padding: .4rem;
  margin-top: .15rem;
}
.install-prompt-btn-link:hover { color: var(--text2); }

.logo-mark {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 18px rgba(114, 219, 98, 0.18));
}

.logo-copy {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  line-height: 1;
}

.logo-title {
  font-size: 1.02rem;
  font-weight: 800;
}

.logo-subtitle {
  font-size: .64rem;
  color: rgba(158, 251, 114, 0.72);
  text-transform: uppercase;
  letter-spacing: .16em;
}

.lib-tabs {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.lib-tabs::-webkit-scrollbar {
  display: none;
}

.area-tabs,
.library-tabs {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-width: max-content;
}

.library-tabs {
  padding-left: .55rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.area-tab,
.lib-tab {
  padding: .45rem .9rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text2);
  border: 1px solid transparent;
  transition: all var(--trans);
  white-space: nowrap;
}

.area-tab {
  color: rgba(238, 244, 233, 0.84);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.07);
  font-weight: 800;
}

.area-tab:hover,
.lib-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.area-tab.active,
.lib-tab.active {
  color: var(--green-2);
  background: var(--green-dim);
  border-color: var(--green-glow);
  box-shadow: inset 0 0 0 1px rgba(158, 251, 114, 0.05);
}

.header-actions {
  display: flex;
  gap: .35rem;
  align-items: center;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text2);
  border: 1px solid transparent;
  transition: all var(--trans);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

#settingsBtn {
  color: var(--green-2);
  background: rgba(114, 219, 98, 0.08);
  border-color: rgba(114, 219, 98, 0.16);
}

#settingsBtn:hover {
  background: rgba(114, 219, 98, 0.14);
  border-color: rgba(114, 219, 98, 0.28);
}

.header-chip {
  height: 38px;
  padding: 0 .9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: all var(--trans);
}

.header-chip:hover {
  background: rgba(114, 219, 98, 0.08);
  border-color: rgba(114, 219, 98, 0.24);
  color: var(--green-2);
}

.header-user-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding-left: .45rem;
  padding-right: .78rem;
  text-transform: none;
  letter-spacing: 0;
}

.user-chip-avatar {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(114, 219, 98, 0.12);
  border: 1px solid rgba(114, 219, 98, 0.16);
  flex: 0 0 auto;
}

.user-chip-name {
  max-width: 112px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip-gem {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: #7dd9f5;
  filter: drop-shadow(0 0 4px rgba(125, 217, 245, 0.6));
}

.header-upgrade-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 36px;
  color: #b8ffb1;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
    rgba(9, 17, 12, .74);
  border-color: rgba(114, 219, 98, 0.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  font-weight: 650;
  font-size: .78rem;
  letter-spacing: 0;
  padding: 0 .78rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-upgrade-chip:hover {
  color: #d7ffd0;
  border-color: rgba(150, 251, 118, 0.42);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)),
    rgba(10, 21, 13, .88);
}

.header-upgrade-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #9cfb72;
  background: rgba(114, 219, 98, 0.12);
}

.header-upgrade-chip-label-short {
  display: none;
}

/* Botao "Instalar app" (PWA) — discreto mas visivel quando disponivel */
.header-install-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #cfdcc7;
  background: rgba(115, 223, 103, 0.12);
  border-color: rgba(115, 223, 103, 0.35);
  font-weight: 600;
  font-size: .72rem;
  padding: 0 .7rem;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.header-install-chip:hover {
  background: rgba(115, 223, 103, 0.22);
  border-color: rgba(156, 251, 114, 0.6);
  color: #b8ff8f;
}
.header-install-chip svg {
  flex-shrink: 0;
  opacity: .85;
}
@media (max-width: 560px) {
  /* No mobile, mostra so o icone para economizar espaco */
  .header-install-chip {
    padding: 0 .55rem;
    font-size: 0;
    gap: 0;
  }
  .header-install-chip svg {
    width: 16px;
    height: 16px;
    opacity: 1;
  }
}

.header-login-chip {
  color: #071a05;
  background: linear-gradient(135deg, #6cf06f 0%, #43bc4d 52%, #2b7f35 100%);
  border-color: rgba(114, 219, 98, 0.34);
  box-shadow: 0 12px 28px rgba(45, 138, 58, 0.22);
}

.header-login-chip:hover {
  color: #071a05;
  background: linear-gradient(135deg, #79f57b 0%, #4dca58 52%, #328d3d 100%);
  border-color: rgba(156, 251, 114, 0.42);
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-fallback {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(114, 219, 98, 0.2), rgba(70, 141, 57, 0.3));
  color: var(--green-2);
  font-weight: 800;
}

.user-avatar-fallback-sm {
  font-size: .72rem;
}

.user-avatar-fallback-lg {
  font-size: 1.3rem;
}

#mainContent {
  padding-top: calc(var(--header-h) + 1.45rem);
  padding-bottom: 3rem;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: max(1.25rem, calc(1.25rem + var(--safe-left, 0px)));
  padding-right: max(1.25rem, calc(1.25rem + var(--safe-right, 0px)));
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 5rem 0;
  color: var(--text2);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.library-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(114, 219, 98, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(114, 219, 98, 0.09), rgba(114, 219, 98, 0) 45%),
    rgba(19, 21, 19, 0.86);
  box-shadow: var(--shadow);
}

.overview-copy {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.overview-kicker {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(158, 251, 114, 0.76);
}

.overview-title {
  font-size: 1.72rem;
  line-height: 1.06;
  font-weight: 800;
}

.overview-text {
  max-width: 720px;
  color: var(--text2);
  font-size: .9rem;
  line-height: 1.55;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.stat-card {
  padding: .95rem 1rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text2);
}

.stat-value {
  font-size: 1.45rem;
  line-height: 1;
  color: var(--text);
}

.spotlight {
  position: relative;
  min-height: 410px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 2rem;
  cursor: pointer;
  background: var(--bg3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
}

.spotlight-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(.33) saturate(1.35);
  transform: scale(1.08);
  transition: transform 8s ease;
}

.spotlight:hover .spotlight-bg {
  transform: scale(1.13);
}

.spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(124, 234, 104, 0.13), transparent 24%),
    linear-gradient(to right, rgba(0, 0, 0, 0.88) 24%, rgba(0, 0, 0, 0.44) 58%, rgba(0, 0, 0, 0.2) 100%);
}

.spotlight-shell {
  position: relative;
  z-index: 1;
  min-height: 410px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: 1.5rem;
  padding: 2rem;
  align-items: stretch;
}

.spotlight-cover {
  position: absolute;
  left: 2rem;
  bottom: 2rem;
  width: 124px;
  height: 182px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
  z-index: 1;
}

.spotlight-info {
  align-self: end;
  margin-left: calc(124px + 1.3rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 560px;
  min-width: 0;
}

.spotlight-tag {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--green-2);
  margin-bottom: .65rem;
}

.spotlight-tag::before {
  content: '';
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--green);
}

.spotlight-title {
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 800;
  margin-bottom: .5rem;
  max-width: 620px;
}

.spotlight-meta {
  font-size: .86rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: .65rem;
}

.spotlight-summary {
  font-size: .9rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.spotlight-aside {
  align-self: stretch;
  justify-self: end;
  width: min(100%, 560px);
  padding: 1.1rem 1.2rem 1.1rem 1.25rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 12, 11, 0.58), rgba(10, 12, 11, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.spotlight-aside.is-empty {
  background: linear-gradient(180deg, rgba(13, 17, 14, 0.52), rgba(13, 17, 14, 0.14));
}

.spotlight-aside-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(158, 251, 114, 0.84);
  margin-bottom: .75rem;
}

.spotlight-summary-wrap {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 84%, rgba(0, 0, 0, 0));
}

.spotlight-summary-wrap::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 64px;
  background: linear-gradient(to bottom, rgba(14, 17, 15, 0), rgba(14, 17, 15, 0.92));
  pointer-events: none;
}

.btn-read,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 48px;
  padding: .9rem 1.22rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: .86rem;
  line-height: 1;
  transition: all var(--trans);
}

.btn-read svg,
.btn-primary svg,
.btn-secondary svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-read {
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #091008;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(114, 219, 98, 0.24);
}

.btn-read:hover,
.btn-primary:hover {
  transform: translateY(-1px);
}

.section {
  margin-bottom: 2.3rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.04rem;
  font-weight: 700;
}

.continue-empty-hint {
  margin: 0;
  padding: .65rem 0;
  font-size: .88rem;
  color: var(--text2);
}

.guest-continue-login {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .8rem;
}

.guest-continue-login-btn {
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(114, 219, 98, 0.34);
  background: linear-gradient(135deg, #6cf06f 0%, #43bc4d 52%, #2b7f35 100%);
  color: #071a05;
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 14px 32px rgba(45, 138, 58, 0.22);
  transition: transform var(--trans), filter var(--trans), box-shadow var(--trans);
}

.guest-continue-login-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.section-link {
  color: var(--green-2);
  font-size: .8rem;
  font-weight: 600;
}

.section-link:hover {
  opacity: .8;
}

.section-order-toggle {
  padding: .36rem .72rem;
  border-radius: 999px;
  border: 1px solid rgba(114, 219, 98, 0.18);
  background: rgba(114, 219, 98, 0.08);
}

.managed-section.is-ordering .section-title::after {
  content: ' · ordem manual';
  color: rgba(158, 251, 114, 0.72);
  font-size: .76rem;
  font-weight: 600;
}

.h-scroll {
  display: flex;
  gap: .95rem;
  overflow-x: auto;
  padding-bottom: .4rem;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.h-scroll::-webkit-scrollbar {
  height: 4px;
}

.h-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.book-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .55rem;
}

.book-card {
  width: 174px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  cursor: pointer;
  transition: transform var(--trans);
  position: relative;
}

.book-card:hover {
  transform: translateY(-4px);
}

.book-card-cover-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: var(--bg3);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.book-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-card-body {
  display: flex;
  flex-direction: column;
  gap: .22rem;
  min-width: 0;
  padding-right: .25rem;
}

.book-card-title {
  font-size: .86rem;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-sub {
  font-size: .75rem;
  color: var(--text2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2em;
}

.book-card-meta {
  display: flex;
  flex-direction: column;
  gap: .14rem;
  color: var(--text3);
  font-size: .74rem;
}

.book-progress {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  margin-top: .12rem;
}

.book-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.book-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-2), var(--green));
  border-radius: inherit;
}

.book-progress-label {
  font-size: .72rem;
  color: rgba(158, 251, 114, 0.82);
  font-weight: 600;
}

.spotlight-mount {
  margin-bottom: 2rem;
}

.spotlight-mount-manga .spotlight,
.spotlight-mount-comics .spotlight {
  min-height: 276px;
  margin-bottom: 1.45rem;
}

.spotlight-mount-manga .spotlight-shell,
.spotlight-mount-comics .spotlight-shell {
  min-height: 300px;
  grid-template-columns: minmax(300px, .72fr) minmax(320px, .9fr);
  padding: 1.75rem 1.5rem;
  gap: 1rem;
  align-items: center;
}

.spotlight-mount-manga .spotlight-cover,
.spotlight-mount-comics .spotlight-cover {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 148px;
  height: 216px;
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0,0,0,.7), 0 0 0 2px rgba(255,255,255,.08);
}

.spotlight-mount-manga .spotlight-info,
.spotlight-mount-comics .spotlight-info {
  margin-left: 0;
  max-width: 430px;
  align-self: center;
}

.spotlight-mount-manga .spotlight-title,
.spotlight-mount-comics .spotlight-title {
  font-size: 1.55rem;
}

.spotlight-mount-manga .spotlight-aside,
.spotlight-mount-comics .spotlight-aside {
  width: min(100%, 520px);
  padding: .9rem 1rem;
}

body[data-area="books"] .spotlight::before {
  background:
    radial-gradient(circle at 74% 24%, rgba(240, 201, 133, 0.16), transparent 25%),
    linear-gradient(to right, rgba(18, 10, 5, 0.9) 20%, rgba(42, 26, 12, 0.5) 58%, rgba(17, 10, 5, 0.24) 100%);
}

body[data-area="comics"] .spotlight::before {
  background:
    radial-gradient(circle at 80% 24%, rgba(176, 102, 255, 0.22), transparent 24%),
    radial-gradient(circle at 55% 70%, rgba(64, 207, 255, 0.16), transparent 22%),
    linear-gradient(to right, rgba(2, 5, 14, 0.9) 20%, rgba(12, 18, 42, 0.5) 58%, rgba(6, 4, 18, 0.25) 100%);
}

body.cards-compact .card {
  width: 132px;
}

body.cards-compact .card-cover {
  border-radius: 12px;
}

body.cards-compact .digest-card {
  width: 136px;
}

body.cards-compact .top-series-card {
  width: 152px;
}

.digest-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .55rem;
}

.digest-card {
  width: 156px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  cursor: pointer;
  transition: transform var(--trans);
}

.digest-card:hover {
  transform: translateY(-4px);
}

.digest-cover-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.digest-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.digest-body {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}

.digest-title {
  font-size: .82rem;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.digest-sub {
  font-size: .72rem;
  color: rgba(158, 251, 114, 0.74);
}

.digest-meta {
  font-size: .72rem;
  color: var(--text3);
}

.top-series-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: .2rem .25rem .7rem;
}

.top-series-card {
  position: relative;
  width: 178px;
  flex-shrink: 0;
  cursor: pointer;
  padding: .5rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(16, 18, 17, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.065);
  transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
}

.top-series-card:hover {
  transform: translateY(-4px);
  border-color: rgba(158, 251, 114, 0.24);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.top-series-card.rank-1,
.top-series-card.rank-2,
.top-series-card.rank-3 {
  border-color: rgba(255, 207, 92, 0.42);
  animation: goldPulse 3.6s ease-in-out infinite;
}

.top-series-card.rank-2 {
  animation-delay: .55s;
}

.top-series-card.rank-3 {
  animation-delay: 1.1s;
}

@keyframes goldPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 207, 92, 0.1),
      0 12px 30px rgba(0, 0, 0, 0.32);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 207, 92, 0.5),
      0 0 24px rgba(255, 195, 64, 0.25),
      0 18px 38px rgba(0, 0, 0, 0.42);
  }
}

.rank-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #171107;
  font-size: .85rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff1a8, #e8a92c);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.top-series-cover-wrap {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg3);
}

.top-series-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-series-body {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  padding: .65rem .15rem .1rem;
}

.top-series-title {
  font-size: .88rem;
  line-height: 1.26;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-series-sub {
  font-size: .76rem;
  color: rgba(255, 207, 92, 0.86);
  font-weight: 700;
}

.top-series-date {
  font-size: .72rem;
  color: var(--text3);
}

.card {
  flex-shrink: 0;
  width: 156px;
  cursor: pointer;
  transition: transform var(--trans);
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
}

.card-order-controls {
  position: absolute;
  inset: .55rem .55rem auto auto;
  display: flex;
  gap: .28rem;
  z-index: 2;
}

.card-order-btn {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 12, 10, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.card-order-btn:disabled {
  opacity: .38;
  cursor: default;
}

.card-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg3);
  position: relative;
  margin-bottom: .6rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
}

.card-fav {
  position: absolute;
  top: .55rem;
  right: .55rem;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(10, 12, 11, 0.82);
  border: 1px solid rgba(255, 127, 159, 0.18);
  color: #ff7f9f;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.card-fav svg {
  width: 16px;
  height: 16px;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.card:hover .card-cover img {
  transform: scale(1.05);
}

.card-cover::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.52), transparent);
}

.card-cover .badge {
  position: absolute;
  top: .45rem;
  right: .45rem;
  z-index: 1;
  padding: .18rem .42rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--green-2);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.card-title {
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.card-sub {
  margin-top: .24rem;
  font-size: .72rem;
  color: var(--text3);
}

.progress-bar {
  margin-top: .4rem;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-2), var(--green));
  border-radius: inherit;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.series-grid .card {
  width: 100%;
}

.section-count {
  color: var(--green);
  border: 1px solid rgba(114, 219, 98, 0.22);
  background: rgba(114, 219, 98, 0.09);
  border-radius: 999px;
  padding: .35rem .65rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.book-catalog-card .badge {
  background: rgba(245, 181, 52, 0.94);
  color: #17130a;
}

.catalog-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.15rem;
}

.compact-btn {
  min-height: 38px;
  padding: 0 .95rem;
  border-radius: 999px;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 5rem 1.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.search-overlay.hidden {
  display: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: .85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(17, 18, 17, 0.92);
}

.search-box svg {
  width: 18px;
  height: 18px;
  color: var(--text2);
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font-size: 1rem;
}

.search-box button {
  color: var(--text2);
}

.search-results {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.search-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .7rem .85rem;
  border-radius: 14px;
  background: rgba(18, 20, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--trans);
}

.search-item:hover {
  background: rgba(24, 27, 24, 0.98);
  border-color: rgba(114, 219, 98, 0.14);
}

.search-item img {
  width: 42px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg3);
}

.search-item-info h4 {
  font-size: .88rem;
  font-weight: 600;
}

.search-item-info mark {
  background: rgba(114, 219, 98, 0.18);
  color: var(--green-2);
  padding: 0 .16rem;
  border-radius: 4px;
}

.search-item-info p {
  margin-top: .18rem;
  font-size: .75rem;
  color: var(--text2);
}

.search-item-shelf-mode {
  cursor: pointer;
}

.search-item-shelf-mode .search-item-info {
  min-width: 0;
  flex: 1;
}

.search-shelf-add-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 .78rem;
  border: 1px solid rgba(126, 217, 87, 0.28);
  border-radius: 999px;
  background: rgba(126, 217, 87, 0.1);
  color: #c8ffc0;
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}

.search-shelf-add-btn:hover {
  background: rgba(126, 217, 87, 0.16);
}

.search-item.is-adding .search-shelf-add-btn,
.search-item.is-added .search-shelf-add-btn {
  cursor: default;
}

.search-item.is-added {
  border-color: rgba(126, 217, 87, 0.22);
  background: rgba(18, 36, 20, 0.76);
}

.search-item.is-added .search-shelf-add-btn {
  background: rgba(126, 217, 87, 0.2);
  color: #efffe9;
}

@media (max-width: 520px) {
  .search-item-shelf-mode {
    align-items: flex-start;
  }
  .search-shelf-add-btn {
    align-self: center;
    padding: 0 .65rem;
  }
}

.search-area-section {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.search-area-section + .search-area-section {
  margin-top: .6rem;
}

.search-area-header {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text2);
  padding: 0 .25rem;
}

.search-area-cross .search-area-header {
  color: var(--green-2, var(--text2));
}

.search-item-cross {
  border-style: dashed;
  background: rgba(18, 20, 18, 0.7);
}

.search-item-area-pill {
  display: inline-block;
  margin-left: .45rem;
  padding: .08rem .42rem;
  border-radius: 999px;
  background: rgba(114, 219, 98, 0.16);
  color: var(--green-2, #72db62);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  background:
    linear-gradient(180deg, rgba(114, 219, 98, 0.05), transparent 22%),
    rgba(17, 18, 17, 0.96);
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: 1;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
  animation: slideUp .22s ease;
}

@media (min-width: 740px) {
  .modal {
    align-items: center;
  }

  .modal-panel {
    border-radius: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    animation: fadeScale .2s ease;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes fadeScale {
  from {
    opacity: 0;
    transform: scale(.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #d62828, #ff4d4d);
  color: #ffffff;
  z-index: 2;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(214, 40, 40, 0.34);
  transition: transform var(--trans), box-shadow var(--trans), background var(--trans);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-close:hover {
  background: linear-gradient(135deg, #ff4d4d, #ff6b6b);
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(214, 40, 40, 0.5);
}

.modal-close:focus-visible {
  outline: 2px solid rgba(255, 77, 77, 0.6);
  outline-offset: 3px;
}

.series-shell {
  padding: 1.35rem 1.35rem 1.6rem;
}

.series-hero {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.series-cover-wrap {
  position: relative;
}

.series-cover-glow {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -8px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(114, 219, 98, 0.42), transparent 72%);
  filter: blur(16px);
}

.series-cover {
  width: 112px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: var(--bg3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.52);
  position: relative;
  z-index: 1;
}

.series-info {
  display: flex;
  flex-direction: column;
  gap: .56rem;
  min-width: 0;
}

.series-kicker {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(158, 251, 114, 0.76);
}

.series-info h2 {
  font-size: 1.48rem;
  line-height: 1.08;
  font-weight: 800;
}

.series-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .32rem;
}

.badge-pill {
  padding: .24rem .56rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text2);
  font-size: .7rem;
  font-weight: 600;
}

.badge-pill.green {
  color: var(--green-2);
  background: var(--green-dim);
  border-color: var(--green-glow);
}

.series-desc {
  font-size: .84rem;
  color: var(--text2);
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.series-meta-inline-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
}

.series-meta-inline {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .34rem .58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: .74rem;
  color: var(--text2);
}

.series-shell-book .series-hero {
  grid-template-columns: 124px minmax(0, 1fr);
}

.series-shell-book .series-desc {
  -webkit-line-clamp: 6;
}

.series-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}

.meta-card {
  padding: .78rem .82rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: .28rem;
}

.meta-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text3);
}

.meta-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.series-actions {
  display: flex;
  gap: .65rem;
  padding: 1rem 0 .9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #091008;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(114, 219, 98, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
}

.action-pill {
  min-width: 0;
  padding: .9rem 1.1rem;
  border-radius: 14px;
  font-size: .88rem;
}

.action-pill span {
  white-space: nowrap;
}

.series-actions .btn-primary {
  min-width: 220px;
}

.series-actions:not(.series-actions-books) .action-pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--trans), background var(--trans), border-color var(--trans), color var(--trans);
}

.series-actions:not(.series-actions-books) .action-pill:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(114, 219, 98, 0.18);
}

.series-actions:not(.series-actions-books) .action-pill svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.series-actions:not(.series-actions-books) .action-read {
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #091008;
  border-color: rgba(114, 219, 98, 0.26);
  box-shadow: 0 14px 28px rgba(114, 219, 98, 0.2);
}

.series-actions:not(.series-actions-books) .action-favorite.is-active {
  color: #ff9ab3;
  border-color: rgba(255, 120, 150, 0.32);
  background: rgba(255, 90, 130, 0.1);
}

.series-actions:not(.series-actions-books) .action-shelf.is-active {
  color: var(--green-2);
  border-color: var(--green-glow);
  background: var(--green-dim);
}

.series-actions:not(.series-actions-books) .action-report {
  color: var(--text2);
}

/* ═════════════════════════════════════════════════════════════════════════
   Modal de livros v2 — layout grid, ações coloridas, sidebar "Por que ler"
   ═════════════════════════════════════════════════════════════════════════ */
.books-modal-v2.series-shell {
  padding: 1.6rem 1.6rem 1.8rem;
}

.books-modal-v2 .series-hero {
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 2.2rem;
  align-items: start;
}

.books-modal-v2 .series-cover-wrap {
  max-width: 176px;
}

.books-modal-v2 .series-info h2 {
  font-size: 1.55rem;
  line-height: 1.18;
  margin-bottom: .55rem;
}

.books-modal-v2 .series-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
}

.books-modal-v2 .meta-card {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  padding: .85rem 1rem;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
}

.books-modal-v2 .meta-card:last-child {
  border-right: none;
}

.books-modal-v2 .meta-label {
  font-size: .64rem;
  letter-spacing: .12em;
  color: var(--text3);
}

.books-modal-v2 .meta-value {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
}

.badge-pill.badge-format {
  background: rgba(123, 63, 242, 0.16);
  color: #b598ff;
  border-color: rgba(123, 63, 242, 0.3);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .65rem;
}

/* ── Ações: grid 2 col no desktop, com cores semânticas ──────────────── */
.series-actions-books {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  padding: 1.1rem 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.series-actions-books .action-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .95rem 1.1rem;
  font-weight: 700;
  font-size: .92rem;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--trans), background var(--trans), box-shadow var(--trans), border-color var(--trans);
}

.series-actions-books .action-pill svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.series-actions-books .action-pill:hover {
  transform: translateY(-1px);
}

.series-actions-books .action-pill:disabled {
  opacity: .55;
  cursor: progress;
  transform: none;
}

/* Ler agora — verde gradiente */
.series-actions-books .action-pill.action-read {
  background: linear-gradient(135deg, #7ed957, #96f56a);
  color: #091008;
  box-shadow: 0 12px 28px rgba(126, 217, 87, 0.22);
}
.series-actions-books .action-pill.action-read:hover {
  background: linear-gradient(135deg, #96f56a, #aafd7a);
  box-shadow: 0 14px 32px rgba(126, 217, 87, 0.32);
}

/* Prateleira — roxo */
.series-actions-books .action-pill.action-shelf {
  background: linear-gradient(135deg, #7b3ff2, #925cff);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(123, 63, 242, 0.22);
}
.series-actions-books .action-pill.action-shelf:hover {
  background: linear-gradient(135deg, #925cff, #a474ff);
  box-shadow: 0 14px 32px rgba(123, 63, 242, 0.34);
}
.series-actions-books .action-pill.action-shelf.is-active {
  background: linear-gradient(135deg, #5b2ec7, #7b3ff2);
}

/* Favoritar — outline rosa */
.series-actions-books .action-pill.action-favorite {
  background: rgba(229, 99, 134, 0.06);
  border-color: rgba(229, 99, 134, 0.32);
  color: #ff8aa6;
}
.series-actions-books .action-pill.action-favorite:hover {
  background: rgba(229, 99, 134, 0.12);
  border-color: rgba(229, 99, 134, 0.55);
}
.series-actions-books .action-pill.action-favorite.is-active {
  background: linear-gradient(135deg, rgba(229, 99, 134, 0.85), rgba(255, 124, 158, 0.95));
  border-color: transparent;
  color: #2a070f;
  box-shadow: 0 12px 26px rgba(229, 99, 134, 0.28);
}

/* Reportar — âmbar discreto */
.series-actions-books .action-pill.action-report {
  background: rgba(240, 180, 41, 0.08);
  border-color: rgba(240, 180, 41, 0.28);
  color: #f0b429;
}
.series-actions-books .action-pill.action-report:hover {
  background: rgba(240, 180, 41, 0.14);
  border-color: rgba(240, 180, 41, 0.5);
}

/* ── Card "Por que ler?" ─────────────────────────────────────────────── */
.why-read-card {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.why-read-title {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-2, #7ed957);
  margin-bottom: .6rem;
}

.why-read-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem .9rem;
}

.why-read-list li {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .84rem;
  color: var(--text2);
}

.why-read-dot {
  color: var(--green-2, #7ed957);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
}

/* ── Dica do rodapé ──────────────────────────────────────────────────── */
.series-footer-tip {
  margin-top: 1.2rem;
  padding: .65rem .9rem;
  border-radius: 10px;
  background: rgba(126, 217, 87, 0.07);
  border: 1px solid rgba(126, 217, 87, 0.18);
  color: var(--text2);
  font-size: .78rem;
  text-align: center;
}

/* ── Responsivo: até 720px, hero vira 1 col com capa centralizada ────── */
@media (max-width: 720px) {
  .books-modal-v2.series-shell {
    padding: 1rem 1rem 1.3rem;
  }
  /* Hero: capa lado a lado com info pra economizar altura.
     Antes era 1col empilhado (capa em cima → info embaixo). */
  .books-modal-v2 .series-hero {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: .85rem;
    align-items: start;
  }
  .books-modal-v2 .series-cover-wrap {
    max-width: 100px;
    margin: 0;
  }
  .books-modal-v2 .series-info h2 {
    text-align: left;
    font-size: 1.18rem;
    line-height: 1.15;
  }
  .books-modal-v2 .series-badges,
  .books-modal-v2 .series-meta-inline-row {
    justify-content: flex-start;
  }

  /* Sinopse: clamp em 2 linhas com fade. Tap pra expandir. */
  .books-modal-v2 .series-desc {
    -webkit-line-clamp: 2;
    position: relative;
    cursor: pointer;
    margin: 0;
    padding-right: .1rem;
  }
  .books-modal-v2 .series-desc::after {
    content: '…ler mais';
    position: absolute;
    right: 0;
    bottom: 0;
    padding-left: 1.6rem;
    background: linear-gradient(90deg, transparent, rgba(17, 18, 17, 0.96) 38%);
    color: var(--green-2);
    font-weight: 700;
    font-size: .76rem;
  }
  .books-modal-v2 .series-desc.is-expanded {
    -webkit-line-clamp: unset;
    display: block;
  }
  .books-modal-v2 .series-desc.is-expanded::after {
    content: 'recolher';
    position: static;
    display: inline;
    background: none;
    margin-left: .3rem;
  }

  /* Meta: 4 boxes (Progresso/Pagina/Volume/Formato) → 2 boxes (Progresso/Pagina).
     Formato e Volume são redundantes com os badges do header. */
  .books-modal-v2 .series-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: .55rem;
  }
  .books-modal-v2 .meta-card {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: .55rem .7rem;
  }
  .books-modal-v2 .meta-card:nth-child(2n) { border-right: none; }
  .books-modal-v2 .meta-card:nth-child(n+3) { display: none; }
  .books-modal-v2 .meta-label { font-size: .68rem; }
  .books-modal-v2 .meta-value { font-size: .92rem; }

  /* Ações: "Ler agora" full-width em cima; 3 secundários em linha embaixo. */
  .series-actions-books {
    grid-template-columns: 1fr 1fr 1fr;
    gap: .5rem;
    padding-top: .8rem;
  }
  .series-actions-books .action-pill.action-read {
    grid-column: 1 / -1;
    padding: .9rem 1rem;
    font-size: .92rem;
  }
  .series-actions-books .action-pill {
    flex-direction: column;
    gap: .25rem;
    padding: .6rem .4rem;
    font-size: .72rem;
    line-height: 1.1;
  }
  .series-actions-books .action-pill.action-read {
    flex-direction: row;
    gap: .55rem;
  }

  /* Cards opcionais: em mobile, ocultos pra encurtar scroll.
     "Por que ler?" duplica os badges; "Preferência de leitura" e a dica
     rodapé são informações avançadas/óbvias. */
  .books-modal-v2 ~ .why-read-card,
  .books-modal-v2 .why-read-card,
  .books-modal-v2 .series-footer-tip,
  .series-shell-book .why-read-card,
  .series-shell-book .series-footer-tip,
  .series-shell-book #seriesReaderPresetCard {
    display: none !important;
  }
}

.chapters-list {
  padding: 1rem 0 0;
}

.chapters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
}

.chapters-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.chapters-subtitle {
  font-size: .76rem;
  color: var(--text3);
}

.chapters-filter-btn {
  padding: .52rem .82rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text2);
  font-size: .78rem;
  font-weight: 600;
  transition: all var(--trans);
}

.chapters-filter-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.chapters-filter-btn.active {
  background: var(--green-dim);
  color: var(--green-2);
  border-color: var(--green-glow);
}

.series-view-tabs {
  margin-bottom: .8rem;
}

.chapters-search-wrap {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 42px;
  padding: 0 .9rem;
  margin: 0 0 .8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text2);
  transition: border-color var(--trans), box-shadow var(--trans);
}

.chapters-search-wrap:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--green-dim);
}

.chapters-search-wrap svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .55; }

.chapters-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: .86rem;
  font-family: var(--font);
}

.chapters-search-input::placeholder { color: var(--text3); }

.chapters-search-empty {
  padding: 1rem;
  font-size: .82rem;
  color: var(--text3);
  text-align: center;
}

.book-modal-footer {
  margin-top: 1.4rem;
  display: flex;
  justify-content: center;
}

.book-modal-open-series {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text2);
  font-size: .85rem;
  padding: .7rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--trans);
}

.book-modal-open-series:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.chapter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .82rem .9rem;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--trans);
}

.chapter-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(114, 219, 98, 0.11);
}

.chapter-item.read {
  opacity: .62;
}

.chapter-item.current {
  background: linear-gradient(90deg, rgba(114, 219, 98, 0.14), transparent 62%);
  border-color: rgba(114, 219, 98, 0.16);
}

.chapters-more-btn {
  width: 100%;
  min-height: 44px;
  margin-top: .45rem;
  border-radius: 14px;
  border: 1px solid rgba(114, 219, 98, 0.18);
  background: rgba(114, 219, 98, 0.08);
  color: var(--green-2);
  font-family: var(--font);
  font-size: .84rem;
  font-weight: 800;
  cursor: pointer;
}

.chapters-more-btn:hover {
  background: rgba(114, 219, 98, 0.14);
}

.chapter-num {
  min-width: 64px;
  font-size: .82rem;
  font-weight: 700;
}

.chapter-name {
  flex: 1;
  min-width: 0;
  color: var(--text2);
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-name strong {
  display: block;
  font-size: .88rem;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-name small {
  display: block;
  margin-top: .2rem;
  font-size: .75rem;
  color: var(--text3);
}

.chapter-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  min-width: 132px;
}

.chapter-progress {
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .16rem .42rem;
  border-radius: 999px;
  background: var(--green-dim);
  border: 1px solid var(--green-glow);
  color: var(--green-2);
  font-size: .68rem;
  font-weight: 700;
}

/* Badge "Lido" — pilula verde solida, distinta do "%" da leitura em andamento. */
.chapter-progress.is-read {
  background: #45d67a;
  border-color: #45d67a;
  color: #052012;
  gap: .15rem;
}

.chapter-date {
  font-size: .72rem;
  color: var(--text3);
}

.chapter-shelf-badge {
  display: inline-flex;
  align-items: center;
  padding: .14rem .48rem;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.chapter-shelf-badge.shelf-reading {
  background: rgba(114, 219, 98, 0.16);
  color: var(--green-2, #72db62);
}
.chapter-shelf-badge.shelf-want_to_read {
  background: rgba(255, 196, 0, 0.14);
  color: #ffce4a;
}
.chapter-shelf-badge.shelf-finished {
  background: rgba(120, 140, 255, 0.16);
  color: #a4b3ff;
}

.chapter-shelf-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans);
}
.chapter-shelf-btn:hover {
  background: rgba(114, 219, 98, 0.12);
  border-color: rgba(114, 219, 98, 0.3);
  color: var(--green-2, #72db62);
}
.chapter-shelf-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Seção "Sua estante" no flow de Livros ──────────────────────────────── */
.shelf-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: .8rem 0 1.4rem;
}
.shelf-section-header {
  padding: 0 .25rem;
}
.shelf-section-header .section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.shelf-subsection {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.shelf-subsection-title {
  padding: 0 .25rem;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text2);
}
.shelf-reading .shelf-subsection-title {
  color: var(--green-2, #72db62);
}
.shelf-want-to-read .shelf-subsection-title {
  color: #ffce4a;
}
.shelf-finished .shelf-subsection-title {
  color: #a4b3ff;
}

/* ── Dropdown contextual da estante ─────────────────────────────────────── */
.shelf-menu-portal {
  min-width: 200px;
  background: rgba(15, 18, 16, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  padding: .35rem;
  display: flex;
  flex-direction: column;
  gap: .12rem;
}
.shelf-menu-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text2);
  padding: .4rem .6rem .35rem;
}
.shelf-menu-item {
  text-align: left;
  padding: .5rem .65rem;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--trans);
}
.shelf-menu-item:hover {
  background: rgba(114, 219, 98, 0.12);
}
.shelf-menu-item.is-current {
  color: var(--green-2, #72db62);
  font-weight: 700;
}
.shelf-menu-remove {
  color: #e57676;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: .15rem;
  padding-top: .55rem;
}
.shelf-menu-remove:hover {
  background: rgba(229, 118, 118, 0.12);
}

.chapter-read-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #091008;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(114, 219, 98, 0.22);
  transition: all var(--trans);
}

.chapter-read-btn svg {
  width: 13px;
  height: 13px;
}

.chapter-read-btn:hover {
  transform: translateY(-1px);
}

.chapter-mark-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.chapter-mark-btn svg { width: 16px; height: 16px; }
.chapter-mark-btn:hover {
  background: rgba(114, 219, 98, 0.12);
  border-color: rgba(114, 219, 98, 0.3);
  color: var(--green-2, #72db62);
}
.chapter-mark-btn:active { transform: scale(.9); }
.chapter-mark-btn.is-read {
  background: #45d67a;
  border-color: #45d67a;
  color: #052012;
}

.modal-settings {
  padding: 2rem 1.5rem 2.4rem;
}

.modal-settings h2 {
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 1.4rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: .95rem;
}

.profile-avatar-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .2rem 0 .35rem;
}

.profile-avatar-preview {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.user-avatar-img-lg,
.user-avatar-fallback-lg {
  width: 100%;
  height: 100%;
}

.profile-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  align-items: flex-start;
}

.avatar-pick-btn,
.avatar-remove-btn {
  min-height: 40px;
  padding: .68rem .9rem;
  border-radius: 12px;
  font-size: .8rem;
}

.settings-hint {
  font-size: .78rem;
  color: var(--text3);
  line-height: 1.5;
}

.settings-form label {
  display: flex;
  flex-direction: column;
  gap: .42rem;
  font-size: .82rem;
  color: var(--text2);
  font-weight: 600;
}

.settings-form input,
.settings-form select {
  padding: .72rem .88rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text);
  outline: none;
}

.settings-form input:focus,
.settings-form select:focus,
.filter-input:focus,
.filter-bar select:focus {
  border-color: rgba(114, 219, 98, 0.45);
}

.settings-form select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--text2) 50%) calc(100% - 18px) 52% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--text2) 50%, transparent 50%) calc(100% - 13px) 52% / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.03);
}

.profile-preferences {
  display: grid;
  gap: .85rem;
  margin-top: .35rem;
  padding: 1rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, var(--green-dim), transparent 36%),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
}

.profile-preferences-head {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  align-items: center;
}

.profile-preferences-head h3 {
  font-size: .96rem;
  color: rgba(241, 248, 237, 0.94);
}

.profile-preferences-head span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 .65rem;
  border-radius: 999px;
  color: var(--green-2);
  background: var(--green-dim);
  border: 1px solid var(--border-strong);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.preference-toggle {
  display: grid !important;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: .65rem !important;
  padding: .75rem .8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(229, 238, 225, 0.86) !important;
}

.preference-toggle input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--green);
}

.checkbox-row {
  flex-direction: row !important;
  align-items: flex-start;
  gap: .7rem !important;
  padding: .1rem 0;
  font-size: .78rem !important;
  font-weight: 500 !important;
  color: var(--text3) !important;
  line-height: 1.45;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: .05rem;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--green-2);
  flex: 0 0 auto;
}

.settings-actions {
  display: flex;
  gap: .7rem;
  margin-top: .25rem;
}

.settings-msg {
  min-height: 1.2em;
  font-size: .8rem;
  color: var(--green-2);
}

.settings-msg.error {
  color: var(--red);
}

.settings-msg.success {
  color: var(--green-2);
}

.push-test-btn {
  margin: 2px 0 0;
  align-self: flex-start;
}

.privacy-section {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.settings-section-title {
  margin: 0 0 .35rem;
  color: #9cfb72;
  font-size: 1rem;
}
.settings-section-hint {
  margin: 0 0 .85rem;
  color: var(--text2, #b3bcb1);
  font-size: .82rem;
  line-height: 1.5;
}
/* ── Perfil colapsável (mobile-first) ─────────────────────────────────────
   <details> nativo: em mobile vira accordion com seta; em desktop o summary
   é escondido e o conteúdo aparece sempre, mantendo o layout "página única"
   que existia antes (sem mudar nada de JS). */
.profile-collapsible {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.profile-collapsible + .profile-collapsible {
  margin-top: .65rem;
}
.profile-collapsible-head {
  list-style: none;
  cursor: pointer;
  padding: .9rem 1rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.profile-collapsible-head::-webkit-details-marker { display: none; }
.profile-collapsible-head::after {
  content: '';
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text2);
  border-bottom: 2px solid var(--text2);
  transform: rotate(45deg);
  margin-left: .6rem;
  transition: transform .2s ease;
}
.profile-collapsible[open] > .profile-collapsible-head::after {
  transform: rotate(-135deg);
}
.profile-collapsible-body {
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .95rem;
}
/* Desktop: neutraliza o <details> completamente — display: contents faz o
   browser ignorá-lo no layout, e filhos viram diretos do .settings-form.
   Resultado: layout idêntico ao perfil antigo, sem traço dos accordions.
   .profile-collapsible-body também usa display: contents para herdar o gap
   do .settings-form, evitando double-gap entre seções. */
@media (min-width: 761px) {
  .profile-collapsible,
  .profile-collapsible-body {
    display: contents;
  }
  .profile-collapsible-head { display: none; }
}

.privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.privacy-actions .btn-secondary,
.privacy-actions .btn-danger {
  flex: 1 1 calc(50% - .55rem);
  min-width: 140px;
  font-size: .85rem;
}
.btn-danger {
  background: rgba(255, 90, 80, 0.12);
  border: 1px solid rgba(255, 90, 80, 0.4);
  color: #ff8a7a;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: .9rem;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.btn-danger:hover { background: rgba(255, 90, 80, 0.22); border-color: rgba(255, 120, 100, 0.65); }
.btn-danger:disabled { opacity: .55; cursor: progress; }
.privacy-legal-links {
  margin: .8rem 0 0;
  font-size: .76rem;
  color: rgba(179, 188, 177, 0.55);
  text-align: center;
}
.privacy-legal-links a {
  color: rgba(179, 188, 177, 0.7);
  text-decoration: none;
  margin: 0 .15rem;
}
.privacy-legal-links a:hover { color: #9cfb72; text-decoration: underline; }
@media (max-width: 480px) {
  .privacy-actions .btn-secondary,
  .privacy-actions .btn-danger { flex-basis: 100%; }
}

#profileModal .profile-account-panel {
  width: min(1340px, calc(100vw - 34px));
  max-width: min(1340px, calc(100vw - 34px));
  max-height: 90vh;
  padding: 0;
  overflow: auto;
  background:
    radial-gradient(circle at 12% 0%, var(--green-glow), transparent 28%),
    linear-gradient(180deg, rgba(13, 16, 15, 0.98), rgba(6, 8, 8, 0.985));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.58);
}

#profileModal .profile-account-panel .modal-close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  box-shadow: 0 12px 26px rgba(214, 40, 40, 0.32);
}

#profileModal .profile-account-shell {
  display: grid;
  gap: 16px;
  padding: 28px 32px 18px;
}

.profile-account-header h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: 0;
}

.profile-account-header p {
  margin: 10px 0 0;
  font-size: 1rem;
  color: var(--text2);
}

.profile-hero-card,
.profile-shelf-cta-card,
.profile-info-card,
.profile-advanced-card,
.profile-danger-card,
.profile-request-card,
.profile-referral-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(9, 12, 11, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 20px 46px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.profile-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 20px;
  min-height: 192px;
  padding: 28px 34px;
  align-items: center;
}

.profile-hero-main,
.profile-shelf-cta-copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-avatar-block-hero {
  position: relative;
  z-index: 2;
}

.profile-hero-avatar-slot .profile-avatar-preview {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid var(--green-glow);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.24),
    0 18px 40px rgba(0, 0, 0, 0.34),
    0 0 0 3px color-mix(in srgb, var(--green) 70%, transparent),
    0 0 32px color-mix(in srgb, var(--green) 34%, transparent);
}

.profile-hero-copy {
  display: grid;
  gap: 12px;
}

.profile-hero-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.profile-hero-title-row h3 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.profile-tier-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 28%, transparent), color-mix(in srgb, var(--green-2) 18%, transparent));
  border: 1px solid var(--green-glow);
  color: var(--green-2);
  font-weight: 800;
  letter-spacing: .01em;
}

.profile-hero-meta {
  display: grid;
  gap: 14px;
  font-size: 18px;
  color: rgba(235, 241, 232, 0.88);
}

.profile-hero-meta-line {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.profile-hero-meta-line svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: rgba(245, 250, 242, 0.86);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.profile-hero-meta strong {
  font-weight: 700;
}

.profile-hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.profile-hero-photo-btn,
.profile-card-action,
.profile-danger-action,
.profile-account-panel .btn-secondary,
.profile-account-panel .btn-primary,
.profile-account-panel .btn-danger {
  min-height: 48px;
  border-radius: 12px;
  font-size: 16px;
}

.profile-hero-photo-btn {
  padding-inline: 18px;
  font-weight: 700;
}

.profile-hero-link-btn {
  border: none;
  background: transparent;
  color: var(--text3);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.profile-hero-link-btn:hover {
  color: var(--green-2);
}

.profile-hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 5, 4, 0) 32%, rgba(3, 5, 4, 0.2) 58%, rgba(3, 5, 4, 0.5) 100%),
    radial-gradient(circle at 80% 18%, color-mix(in srgb, var(--green) 34%, transparent), transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,0) 32%);
}

.profile-hero-art::before,
.profile-hero-art::after {
  content: "";
  position: absolute;
  right: clamp(26px, 7vw, 92px);
  bottom: 0;
  width: min(34vw, 340px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--green-glow) 35%, transparent), rgba(0, 0, 0, 0));
  opacity: .9;
  filter: drop-shadow(0 0 28px color-mix(in srgb, var(--green) 28%, transparent));
}

.profile-hero-art::before {
  height: 78%;
  clip-path: polygon(48% 0, 57% 12%, 61% 7%, 67% 20%, 73% 14%, 74% 30%, 84% 24%, 82% 43%, 92% 40%, 86% 56%, 95% 64%, 82% 69%, 86% 82%, 70% 84%, 67% 100%, 31% 100%, 28% 86%, 16% 84%, 18% 68%, 6% 64%, 14% 54%, 7% 41%, 19% 39%, 18% 26%, 31% 29%, 33% 16%, 41% 19%);
}

.profile-hero-art::after {
  width: min(30vw, 290px);
  height: 52%;
  right: clamp(44px, 8vw, 124px);
  bottom: -6px;
  opacity: .34;
  filter: blur(18px);
  clip-path: ellipse(46% 24% at 50% 50%);
}

.profile-shelf-cta-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 132px;
  padding: 22px 34px;
  border-color: color-mix(in srgb, var(--green) 50%, rgba(255,255,255,.08));
  background:
    radial-gradient(circle at 78% 50%, color-mix(in srgb, var(--green-glow) 55%, transparent), transparent 26%),
    linear-gradient(135deg, rgba(6, 10, 8, 0.92), rgba(9, 12, 10, 0.8));
}

.profile-upgrade-cta-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 118px;
  padding: 20px 30px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--green-2) 42%, rgba(255,255,255,.08));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--green) 14%, transparent), rgba(255,255,255,.015) 58%),
    rgba(10, 13, 12, 0.84);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,.04);
}

.profile-upgrade-cta-copy {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-upgrade-cta-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #081008;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  box-shadow: 0 16px 34px color-mix(in srgb, var(--green-glow) 60%, transparent);
  flex: 0 0 auto;
}

.profile-upgrade-cta-icon svg,
.profile-upgrade-cta-btn svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-upgrade-cta-copy h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.profile-upgrade-cta-copy p {
  margin: 8px 0 0;
  max-width: 760px;
  color: rgba(229, 238, 225, 0.78);
  font-size: 16px;
  line-height: 1.45;
}

.profile-upgrade-cta-btn {
  min-width: 260px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-weight: 900;
}

.profile-shelf-cta-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 1px solid var(--green-glow);
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.06), rgba(255,255,255,.015));
  color: var(--green-2);
  box-shadow: 0 0 0 1px rgba(0,0,0,.18), 0 18px 34px rgba(0,0,0,.22);
}

.profile-shelf-cta-icon svg {
  width: 36px;
  height: 36px;
}

.profile-shelf-cta-copy h3,
.profile-card-head h3,
.profile-danger-head h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.profile-shelf-cta-copy p,
.profile-card-head p,
.profile-danger-head p {
  margin: 8px 0 0;
  color: var(--text2);
  line-height: 1.48;
  font-size: 16px;
}

.profile-shelves-btn {
  min-width: 304px;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding-inline: 26px;
  font-weight: 800;
}

.profile-shelves-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.profile-info-card,
.profile-advanced-card,
.profile-danger-card,
.profile-request-card,
.profile-referral-card {
  padding: 22px 20px;
}

.profile-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-card-titleline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-card-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  color: var(--green-2);
  flex: 0 0 auto;
}

.profile-card-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-card-icon-purple {
  color: #a970ff;
}

.profile-card-icon-danger {
  color: #ff4138;
}

.profile-card-icon-gift {
  color: #ffc857;
}

.profile-area-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--green-dim);
  border: 1px solid var(--green-glow);
  color: var(--green-2);
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.profile-account-panel label {
  display: grid;
  gap: 8px;
  font-size: .84rem;
  color: var(--text2);
  font-weight: 600;
}

.profile-profile-fields,
.profile-security-fields {
  display: grid;
  gap: 10px;
}

.profile-account-panel input,
.profile-account-panel select {
  width: 100%;
  min-height: 50px;
  padding: .76rem .9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.028);
  color: var(--text);
  outline: none;
}

.profile-account-panel input:focus,
.profile-account-panel select:focus {
  border-color: var(--green-glow);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-dim) 80%, transparent);
}

.profile-account-panel select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--text2) 50%) calc(100% - 20px) 52% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--text2) 50%, transparent 50%) calc(100% - 14px) 52% / 7px 7px no-repeat,
    rgba(255, 255, 255, 0.028);
}

.profile-card-action {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
}

.profile-preferences-card {
  display: grid;
  gap: 14px;
}

.profile-switch-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 20px !important;
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-switch-row strong {
  display: block;
  color: rgba(243, 248, 239, 0.96);
  font-size: 16px;
}

.profile-switch-row small {
  display: block;
  margin-top: 5px;
  color: var(--text3);
  line-height: 1.35;
}

.profile-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.profile-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.profile-switch-ui {
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color var(--trans), border-color var(--trans), box-shadow var(--trans);
}

.profile-switch-ui::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
  transition: transform var(--trans), background-color var(--trans);
}

.profile-switch input:checked + .profile-switch-ui {
  background: linear-gradient(135deg, var(--green-2), var(--green));
  border-color: color-mix(in srgb, var(--green) 60%, white);
  box-shadow: 0 0 0 4px var(--green-dim);
}

.profile-switch input:checked + .profile-switch-ui::before {
  transform: translateX(26px);
  background: #081008;
}

.profile-switch input:focus-visible + .profile-switch-ui {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-dim) 85%, transparent);
}

.profile-preferences-advanced {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-advanced-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-advanced-action {
  min-height: 62px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.022);
  color: var(--text);
  cursor: pointer;
  transition: transform var(--trans), border-color var(--trans), background-color var(--trans), box-shadow var(--trans);
}

.profile-advanced-action strong {
  display: block;
  font-size: 16px;
}

.profile-advanced-action small {
  display: block;
  margin-top: 2px;
  color: var(--text2);
  line-height: 1.4;
  font-size: 14px;
}

.profile-advanced-action svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #a970ff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-advanced-action:hover {
  transform: translateY(-2px);
  border-color: var(--green-glow);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.profile-advanced-panel {
  margin-top: 16px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-advanced-panel-copy strong {
  display: block;
  font-size: 1rem;
  color: rgba(244, 248, 241, 0.96);
}

.profile-advanced-panel-copy p {
  margin: 8px 0 0;
  color: var(--text2);
  line-height: 1.5;
}

.profile-subscription-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-inline-danger {
  min-width: 190px;
}

.profile-danger-card {
  border-color: rgba(255, 90, 80, 0.32);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 90, 80, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(44, 10, 10, 0.96), rgba(24, 7, 7, 0.92));
}

.profile-danger-head h3,
.profile-danger-head p,
.profile-danger-card small {
  color: #ffaea6;
}

.profile-danger-action-slot {
  display: grid;
}

.profile-danger-action {
  width: 100%;
  margin-top: 6px;
}

.profile-danger-card small {
  display: block;
  margin-top: 10px;
  line-height: 1.45;
}

.profile-account-footer {
  display: grid;
  gap: 8px;
}

.profile-footer-actions {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(280px, 1fr);
  gap: 14px;
}

.profile-footer-actions > * {
  width: 100%;
  justify-content: center;
}

.profile-account-panel .settings-msg {
  min-height: 1.4em;
  margin: 0;
  text-align: center;
  font-size: .88rem;
}

.profile-save-note {
  margin: 0;
  text-align: center;
  color: var(--text3);
  font-size: .84rem;
}

.profile-legal-links {
  margin-top: 2px;
}

@media (max-width: 1180px) {
  .profile-card-grid,
  .profile-advanced-actions {
    grid-template-columns: 1fr;
  }

  .profile-lower-grid {
    grid-template-columns: 1fr;
  }

  .profile-shelf-cta-card,
  .profile-upgrade-cta-card,
  .profile-hero-card,
  .profile-advanced-panel,
  .profile-footer-actions {
    grid-template-columns: 1fr;
  }

  .profile-shelves-btn,
  .profile-upgrade-cta-btn,
  .profile-subscription-actions,
  .profile-hero-actions {
    justify-self: stretch;
  }

  .profile-hero-actions {
    justify-items: start;
  }
}

@media (max-width: 760px) {
  #profileModal {
    align-items: stretch;
    padding: 8px;
  }

  #profileModal .profile-account-panel {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 22px;
    overscroll-behavior: contain;
  }

  #profileModal .profile-account-panel .modal-close {
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    z-index: 6;
  }

  #profileModal .profile-account-shell {
    gap: 12px;
    padding: 18px 12px 14px;
  }

  .profile-account-header {
    padding-right: 48px;
  }

  .profile-account-header h2 {
    font-size: clamp(1.85rem, 9vw, 2.35rem);
  }

  .profile-account-header p {
    margin-top: 6px;
    max-width: 19rem;
    font-size: .92rem;
    line-height: 1.35;
  }

  .profile-hero-card,
  .profile-shelf-cta-card,
  .profile-upgrade-cta-card,
  .profile-info-card,
  .profile-advanced-card,
  .profile-danger-card,
  .profile-referral-card {
    border-radius: 17px;
  }

  .profile-hero-card {
    min-height: 0;
    padding: 18px 14px;
    gap: 16px;
  }

  .profile-hero-main {
    gap: 14px;
    align-items: center;
  }

  .profile-hero-avatar-slot {
    flex: 0 0 auto;
  }

  .profile-hero-avatar-slot .profile-avatar-preview {
    width: 88px;
    height: 88px;
    border-radius: 50%;
  }

  .profile-hero-copy {
    min-width: 0;
    gap: 9px;
  }

  .profile-hero-title-row {
    gap: 8px;
  }

  .profile-hero-title-row h3 {
    max-width: 100%;
    font-size: clamp(1.45rem, 7vw, 1.8rem);
    overflow-wrap: anywhere;
  }

  .profile-tier-badge {
    min-height: 30px;
    padding: 0 10px;
    font-size: .76rem;
  }

  .profile-hero-meta {
    gap: 8px;
    font-size: .9rem;
  }

  .profile-hero-meta-line {
    min-width: 0;
    gap: 8px;
    overflow-wrap: anywhere;
  }

  .profile-hero-meta-line svg {
    width: 18px;
    height: 18px;
  }

  .profile-hero-actions {
    display: grid;
    width: 100%;
    justify-items: stretch;
    gap: 8px;
  }

  .profile-hero-photo-btn,
  .profile-hero-link-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .profile-hero-art {
    opacity: .42;
  }

  .profile-shelf-cta-card,
  .profile-upgrade-cta-card {
    min-height: 0;
    padding: 16px 14px;
    gap: 14px;
  }

  .profile-shelf-cta-copy,
  .profile-upgrade-cta-copy {
    gap: 13px;
    align-items: flex-start;
  }

  .profile-shelf-cta-icon,
  .profile-upgrade-cta-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }

  .profile-shelf-cta-icon svg,
  .profile-upgrade-cta-icon svg {
    width: 26px;
    height: 26px;
  }

  .profile-shelf-cta-copy h3,
  .profile-upgrade-cta-copy h3,
  .profile-card-head h3,
  .profile-danger-head h3 {
    font-size: 1.18rem;
  }

  .profile-shelf-cta-copy p,
  .profile-upgrade-cta-copy p,
  .profile-card-head p,
  .profile-danger-head p {
    margin-top: 5px;
    font-size: .9rem;
    line-height: 1.38;
  }

  .profile-shelves-btn,
  .profile-upgrade-cta-btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
  }

  .profile-card-grid,
  .profile-lower-grid,
  .profile-advanced-actions {
    gap: 12px;
  }

  .profile-info-card,
  .profile-advanced-card,
  .profile-danger-card {
    padding: 16px 14px;
  }

  .profile-card-head {
    gap: 10px;
    margin-bottom: 12px;
  }

  .profile-card-titleline {
    gap: 10px;
  }

  .profile-card-icon {
    width: 24px;
    height: 24px;
  }

  .profile-card-icon svg {
    width: 23px;
    height: 23px;
  }

  .profile-area-pill {
    min-height: 28px;
    padding: 0 9px;
    font-size: .72rem;
  }

  .profile-account-panel label {
    font-size: .78rem;
  }

  .profile-account-panel input,
  .profile-account-panel select {
    min-height: 46px;
    border-radius: 12px;
    font-size: 16px;
  }

  .profile-card-action,
  .profile-danger-action,
  .profile-account-panel .btn-secondary,
  .profile-account-panel .btn-primary,
  .profile-account-panel .btn-danger {
    min-height: 46px;
    font-size: .92rem;
  }

  .profile-switch-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px !important;
    padding: 12px;
  }

  .profile-switch-row strong {
    font-size: .9rem;
    line-height: 1.15;
  }

  .profile-switch-row small {
    font-size: .75rem;
  }

  .profile-switch-ui {
    width: 52px;
    height: 30px;
  }

  .profile-switch-ui::before {
    width: 20px;
    height: 20px;
  }

  .profile-switch input:checked + .profile-switch-ui::before {
    transform: translateX(22px);
  }

  .profile-preferences-advanced {
    padding: 12px;
  }

  .profile-advanced-action {
    min-height: 58px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  .profile-advanced-action svg {
    width: 25px;
    height: 25px;
  }

  .profile-advanced-action strong {
    font-size: .92rem;
  }

  .profile-advanced-action small {
    font-size: .78rem;
  }

  .profile-advanced-panel {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 12px;
  }

  .profile-subscription-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .profile-inline-danger {
    min-width: 0;
  }

  .profile-account-footer {
    position: sticky;
    bottom: -14px;
    z-index: 4;
    margin: 0 -12px -14px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background:
      linear-gradient(180deg, rgba(6, 8, 8, 0), rgba(6, 8, 8, 0.92) 16%),
      rgba(6, 8, 8, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .profile-footer-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
  }

  .profile-save-note {
    font-size: .78rem;
  }

  .profile-legal-links {
    font-size: .76rem;
    line-height: 1.4;
  }
}

@media (max-width: 430px) {
  .profile-hero-main {
    align-items: flex-start;
  }

  .profile-hero-avatar-slot .profile-avatar-preview {
    width: 78px;
    height: 78px;
  }

  .profile-hero-meta {
    font-size: .84rem;
  }

  .profile-shelf-cta-copy,
  .profile-upgrade-cta-copy {
    flex-direction: column;
  }
}

.admin-panel {
  width: min(1120px, calc(100vw - 28px));
  max-height: min(88vh, 980px);
  padding: 1.6rem 1.35rem 1.5rem;
  overflow: auto;
  background:
    radial-gradient(circle at 15% 0%, rgba(114, 219, 98, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(24, 28, 26, 0.98), rgba(13, 15, 14, 0.99));
  border-color: rgba(255, 255, 255, 0.08);
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.admin-content {
  display: grid;
  gap: 1rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .8rem;
}

.admin-grid-tight {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 16px;
  padding: 1rem 1.05rem;
}

.admin-card-label {
  display: block;
  color: var(--text3);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: .5rem;
}

.admin-card-value {
  font-size: 1.6rem;
  font-weight: 800;
}

.admin-section {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.05rem;
}

.admin-create-shell {
  display: grid;
  gap: .75rem;
}

.admin-section h3 {
  font-size: 1rem;
  margin-bottom: 0;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .85rem;
  flex-wrap: wrap;
}

.admin-inline-tools {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: .28rem .62rem;
  border-radius: 999px;
  background: rgba(114, 219, 98, 0.1);
  border: 1px solid rgba(114, 219, 98, 0.14);
  color: var(--green-2);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .8rem;
  color: var(--text2);
  font-weight: 600;
}

.admin-form input,
.admin-form select {
  padding: .72rem .82rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text);
  outline: none;
}

.admin-form input:focus,
.admin-form select:focus {
  border-color: rgba(114, 219, 98, 0.45);
}

.admin-range-select {
  min-width: 110px;
  padding: .5rem .7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .65rem;
}

.admin-table {
  display: grid;
  gap: .7rem;
}

.admin-user-row,
.admin-reading-row {
  display: grid;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.05rem;
  background: rgba(10, 12, 12, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.admin-user-row {
  grid-template-columns: minmax(230px, .95fr) minmax(360px, 1.2fr) minmax(330px, .95fr);
  align-items: center;
}

.admin-reading-row {
  grid-template-columns: minmax(150px, .8fr) minmax(0, 1.25fr) minmax(130px, .65fr) minmax(140px, .65fr);
}

.admin-reading-row-compact {
  grid-template-columns: minmax(180px, 1fr) minmax(140px, .6fr) minmax(170px, .7fr);
  align-items: center;
}

.admin-main {
  min-width: 0;
}

.admin-main strong,
.admin-reading-row strong {
  display: block;
  font-size: .95rem;
  overflow-wrap: anywhere;
}

.admin-main span,
.admin-reading-row span {
  display: block;
  color: var(--text2);
  font-size: .78rem;
  margin-top: .22rem;
  line-height: 1.45;
}

.admin-inline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .55rem;
}

.admin-user-identity {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.admin-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(114, 219, 98, 0.1);
  border: 1px solid rgba(114, 219, 98, 0.14);
}

.admin-soft-badge {
  display: inline-flex;
  align-items: center;
  padding: .24rem .56rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(208, 245, 183, 0.92);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .45rem;
  padding: .2rem 0;
}

.mini-btn {
  min-width: 96px;
  padding: .58rem .74rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: .77rem;
  font-weight: 700;
  text-align: center;
}

.admin-summary-grid .admin-card-value {
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  line-height: 1.18;
}

.admin-user-profile {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-width: 0;
}

.admin-user-identity > div {
  min-width: 0;
}

.admin-user-identity > div strong {
  display: block;
  color: rgba(240, 247, 236, 0.94);
  font-size: .98rem;
  line-height: 1.2;
}

.admin-user-identity > div span {
  display: block;
  margin-top: .18rem;
  color: var(--text3);
  font-size: .76rem;
}

.admin-user-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.admin-role-pill,
.admin-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: .32rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(237, 244, 232, 0.88);
}

.admin-role-pill {
  color: rgba(158, 251, 114, 0.92);
  background: rgba(114, 219, 98, 0.09);
  border-color: rgba(114, 219, 98, 0.18);
}

.admin-status-pill.is-active,
.admin-status-pill.is-ok {
  color: #bdf7b4;
  background: rgba(114, 219, 98, 0.08);
  border-color: rgba(114, 219, 98, 0.17);
}

.admin-status-pill.is-blocked,
.admin-status-pill.is-warn {
  color: #ffd39c;
  background: rgba(255, 170, 64, 0.08);
  border-color: rgba(255, 170, 64, 0.18);
}

.tier-toggle-btn {
  cursor: pointer;
  transition: opacity .15s;
}
.tier-toggle-btn:hover { opacity: .75; }
.tier-toggle-btn.is-premium {
  color: #ffc107;
  background: rgba(255,193,7,.1);
  border-color: rgba(255,193,7,.25);
}
.tier-toggle-btn.is-free {
  color: var(--text2);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}

.admin-user-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  min-width: 0;
}

.admin-user-meta > div {
  min-width: 0;
  padding: .7rem .75rem;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.admin-user-meta span {
  display: block;
  color: var(--text3);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: .25rem;
}

.admin-user-meta strong {
  display: block;
  color: rgba(238, 245, 234, 0.9);
  font-size: .82rem;
  line-height: 1.3;
}

.mini-btn:hover {
  background: rgba(114, 219, 98, 0.08);
  border-color: rgba(114, 219, 98, 0.22);
}

.mini-btn[data-tone="accent"] {
  color: var(--green-2);
  background: rgba(114, 219, 98, 0.1);
  border-color: rgba(114, 219, 98, 0.16);
}

.mini-btn[data-tone="ok"] {
  color: #c8ffc0;
  background: rgba(114, 219, 98, 0.08);
  border-color: rgba(114, 219, 98, 0.14);
}

.mini-btn[data-tone="warn"] {
  color: #ffd6a4;
  background: rgba(255, 170, 64, 0.08);
  border-color: rgba(255, 170, 64, 0.18);
}

.mini-btn[data-tone="danger"] {
  color: #ffb5b5;
  background: rgba(255, 88, 88, 0.08);
  border-color: rgba(255, 88, 88, 0.18);
}

.admin-panel {
  width: min(1180px, calc(100vw - 20px));
  max-height: min(92vh, 980px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.admin-head {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 64px;
  padding: 1rem 1.15rem .85rem;
  margin: 0;
  background: rgba(20, 24, 22, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
}

.admin-head h2 {
  font-size: 1.25rem;
  letter-spacing: .02em;
}

.admin-content {
  overflow: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1rem 1.15rem 1.2rem;
}

.admin-dashboard,
.admin-panel-page {
  display: grid;
  gap: 1rem;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .2rem 0 .75rem;
  background: linear-gradient(180deg, rgba(18, 21, 20, .98), rgba(18, 21, 20, .86));
}

.admin-tabs {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}

.admin-tab {
  min-height: 38px;
  padding: 0 .9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(230, 239, 225, 0.78);
  font-weight: 800;
  font-size: .8rem;
}

.admin-tab.active {
  color: #071008;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  border-color: transparent;
}

.admin-panel-page {
  display: none;
}

.admin-panel-page.active {
  display: grid;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: .75rem;
}

.admin-summary-layout,
.admin-ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.admin-ranking-grid {
  grid-template-columns: 1fr;
}

.admin-rank-card {
  min-width: 0;
  padding: .85rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.075);
}

.admin-rank-card h4 {
  margin: 0 0 .75rem;
  color: rgba(232, 242, 226, 0.9);
  font-size: .92rem;
}

.admin-feature-card {
  min-height: 130px;
  padding: 1.05rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(114, 219, 98, 0.09), transparent 35%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-feature-card strong {
  display: block;
  margin-top: .4rem;
  font-size: clamp(1.1rem, 2.2vw, 1.65rem);
  line-height: 1.14;
}

.admin-feature-card p {
  margin-top: .55rem;
  color: var(--text2);
  font-size: .84rem;
}

.admin-service-state {
  display: grid;
  gap: .9rem;
}

.admin-service-copy {
  margin-top: .3rem;
  color: var(--text2);
  font-size: .82rem;
  line-height: 1.5;
}

.admin-service-form {
  display: grid;
  gap: .85rem;
}

.admin-service-toggle {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: .75rem;
  padding: .9rem 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
}

.admin-service-toggle.is-on {
  background: rgba(114, 219, 98, 0.08);
  border-color: rgba(114, 219, 98, 0.22);
  box-shadow: inset 0 1px 0 rgba(114, 219, 98, 0.06);
}

.admin-service-toggle.is-off {
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(239, 68, 68, 0.22);
  box-shadow: inset 0 1px 0 rgba(239, 68, 68, 0.06);
}

.admin-service-toggle input {
  width: 18px;
  height: 18px;
  margin-top: .1rem;
  accent-color: var(--green);
}

.admin-service-toggle.is-off input {
  accent-color: #ef4444;
}

.admin-service-toggle strong,
.admin-service-note span {
  display: block;
  color: rgba(238, 245, 234, 0.94);
  font-size: .9rem;
}

.admin-service-toggle.is-on strong {
  color: #bdf7b4;
}

.admin-service-toggle.is-off strong {
  color: #ffb0b0;
}

.admin-service-toggle small {
  display: block;
  margin-top: .22rem;
  color: var(--text2);
  font-size: .78rem;
  line-height: 1.45;
}

.admin-service-note {
  display: grid;
  gap: .45rem;
}

.admin-service-note textarea {
  min-height: 84px;
  resize: vertical;
  padding: .8rem .9rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font: inherit;
  outline: none;
}

.admin-service-note textarea:focus {
  border-color: rgba(114,219,98,.35);
}

.admin-service-actions {
  display: flex;
  justify-content: flex-end;
}

.admin-users-search {
  margin-bottom: .85rem;
}

.admin-search-input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: .6rem .9rem;
  color: var(--text);
  font-size: .9rem;
  outline: none;
  transition: border-color .15s;
}

.admin-search-input:focus {
  border-color: rgba(114,219,98,.4);
}

.admin-create-compact {
  padding: .9rem;
}

.admin-create-shell {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.admin-create-shell .btn-primary {
  min-height: 43px;
  padding: .75rem 1rem;
  border-radius: 13px;
}

.admin-users-table {
  gap: .55rem;
}

.admin-users-table .admin-user-row {
  grid-template-columns: minmax(220px, .85fr) minmax(360px, 1fr) auto;
  gap: .85rem;
  align-items: center;
  padding: .85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.032);
}

.admin-user-meta > div {
  padding: .62rem .65rem;
}

.admin-user-actions {
  position: relative;
  justify-content: flex-end;
}

.admin-actions-menu {
  position: relative;
}

.admin-actions-menu summary {
  list-style: none;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .85rem;
  border-radius: 999px;
  border: 1px solid rgba(114, 219, 98, 0.18);
  background: rgba(114, 219, 98, 0.08);
  color: var(--green-2);
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-actions-menu summary::-webkit-details-marker {
  display: none;
}

.admin-user-actions-trigger {
  min-height: 42px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  padding: 0 .9rem;
  border-radius: 999px;
  border: 1px solid rgba(126, 229, 103, .16);
  background: rgba(126, 229, 103, .08);
  color: #b9f6a6;
  font-weight: 800;
  cursor: pointer;
}

.admin-actions-popover {
  position: absolute;
  right: 0;
  top: calc(100% + .45rem);
  z-index: 6;
  min-width: 190px;
  padding: .45rem;
  display: grid;
  gap: .35rem;
  border-radius: 16px;
  background: rgba(18, 21, 20, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.admin-actions-popover .mini-btn {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  border-radius: 12px;
  text-align: left;
}

.admin-empty {
  color: var(--text3);
  font-size: .84rem;
}

/* ─── ADMIN PANEL V2 ────────────────────────────────────────────── */

/* Tab badges */
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
}

.admin-tab-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 .38rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text2);
  font-size: .68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.admin-tab-badge.is-active {
  background: rgba(114, 219, 98, 0.22);
  color: var(--green-2);
  animation: tabPulse 2s ease-in-out infinite;
}

@keyframes tabPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .65; }
}

/* Metrics V2 */
.admin-metrics-v2 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1.1rem;
}

.admin-metric-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color var(--trans);
}

.admin-metric-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-metric-card.is-green {
  background: rgba(114, 219, 98, 0.06);
  border-color: rgba(114, 219, 98, 0.14);
}

.admin-metric-card.is-warn {
  background: rgba(255, 170, 64, 0.06);
  border-color: rgba(255, 170, 64, 0.14);
}

.admin-metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text2);
  flex-shrink: 0;
}

.admin-metric-card.is-green .admin-metric-icon {
  background: rgba(114, 219, 98, 0.12);
  color: var(--green-2);
}

.admin-metric-card.is-warn .admin-metric-icon {
  background: rgba(255, 170, 64, 0.12);
  color: #ffc97a;
}

.admin-metric-body {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}

.admin-metric-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text3);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-metric-value {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.admin-metric-card.is-green .admin-metric-value { color: var(--green-2); }
.admin-metric-card.is-warn .admin-metric-value  { color: #ffc97a; }

.admin-metric-sub {
  font-size: .7rem;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Summary V2 */
.admin-summary-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.admin-summary-block {
  padding: 1rem 1.05rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.075);
}

.admin-summary-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .9rem;
}

.admin-summary-block-head h4 {
  font-size: .9rem;
  font-weight: 700;
  color: rgba(235, 244, 230, 0.9);
}

/* Top series list */
.admin-top-series {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.admin-top-series-row {
  display: grid;
  grid-template-columns: 24px 1fr 40px;
  align-items: center;
  gap: .6rem;
}

.admin-top-rank {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  color: var(--text2);
}

.admin-top-series-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.admin-top-series-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-top-reads {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text2);
  text-align: right;
  white-space: nowrap;
}

/* Progress bar shared */
.admin-progress-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.admin-progress-bar.sm {
  height: 4px;
}

.admin-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-2), var(--green));
  border-radius: inherit;
  transition: width .4s ease;
}

.admin-progress-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--green-2);
  white-space: nowrap;
}

/* Latest logins */
.admin-logins-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.admin-login-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .52rem .6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-login-info {
  flex: 1;
  min-width: 0;
}

.admin-login-info strong {
  display: block;
  font-size: .84rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-login-info span {
  display: block;
  font-size: .7rem;
  color: var(--text3);
  margin-top: .08rem;
}

/* Online dot */
.admin-avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.admin-online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg2);
  box-shadow: 0 0 0 1px rgba(114, 219, 98, 0.4);
}

.admin-uid {
  font-size: .7rem;
  color: var(--text3);
}

.admin-role-pill.is-admin {
  color: var(--green-2);
  background: rgba(114, 219, 98, 0.1);
  border-color: rgba(114, 219, 98, 0.2);
}

.admin-meta-item {
  padding: .62rem .65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.045);
  min-width: 0;
}

.admin-meta-item.is-online {
  background: rgba(114, 219, 98, 0.06);
  border-color: rgba(114, 219, 98, 0.12);
}

.admin-meta-item > span {
  display: block;
  color: var(--text3);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: .25rem;
}

.admin-meta-item > strong {
  display: block;
  color: rgba(238, 245, 234, 0.9);
  font-size: .82rem;
  line-height: 1.3;
}

/* Reading rows V2 */
.admin-reading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: .7rem;
}

.admin-reading-row-v2 {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color var(--trans);
}

.admin-reading-row-v2:hover {
  border-color: rgba(114, 219, 98, 0.14);
}

.admin-reading-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  flex-shrink: 0;
}

.admin-reading-user-info {
  text-align: center;
}

.admin-reading-user-info strong {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  max-width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-reading-user-info span {
  display: block;
  font-size: .64rem;
  color: var(--text3);
  margin-top: .06rem;
}

.admin-reading-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .28rem;
}

.admin-reading-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-reading-chapter {
  font-size: .76rem;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-reading-progress {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: .18rem;
}

.admin-reading-progress .admin-progress-bar {
  flex: 1;
}

/* Leaderboard V2 */
.admin-lb-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.admin-lb-row {
  display: grid;
  grid-template-columns: 28px 32px 1fr auto;
  align-items: center;
  gap: .6rem;
  padding: .6rem .7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--trans);
}

.admin-lb-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.admin-medal-icon {
  font-size: 1.1rem;
  line-height: 1;
  text-align: center;
}

.admin-rank-num {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  color: var(--text2);
}

.admin-lb-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.admin-lb-info strong {
  font-size: .84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.admin-lb-score {
  text-align: right;
  flex-shrink: 0;
}

.admin-lb-score strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--green-2);
  line-height: 1;
}

.admin-lb-score span {
  font-size: .65rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.admin-rank-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .85rem;
}

.admin-rank-card-head h4 {
  font-size: .9rem;
  font-weight: 700;
}

.admin-badge.is-pulse {
  animation: tabPulse 2s ease-in-out infinite;
  color: var(--green-2);
  background: rgba(114, 219, 98, 0.14);
  border-color: rgba(114, 219, 98, 0.22);
}

.admin-badge.is-green {
  color: var(--green-2);
  background: rgba(114, 219, 98, 0.14);
  border-color: rgba(114, 219, 98, 0.22);
}

.admin-badge.is-warn {
  color: #ffc97a;
  background: rgba(255, 170, 64, 0.1);
  border-color: rgba(255, 170, 64, 0.22);
}

.admin-billing-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: .85rem;
}

.admin-health-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.05rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 85% 20%, rgba(114,219,98,.16), transparent 34%),
    rgba(255,255,255,.035);
}

.admin-health-hero.is-warn {
  background:
    radial-gradient(circle at 85% 20%, rgba(255,190,92,.18), transparent 34%),
    rgba(255,255,255,.035);
}

.admin-health-hero.is-danger {
  background:
    radial-gradient(circle at 85% 20%, rgba(255,80,80,.18), transparent 34%),
    rgba(255,255,255,.035);
}

.admin-health-hero h3 {
  margin: .2rem 0 .25rem;
  font-size: clamp(1.35rem, 2.1vw, 2.2rem);
}

.admin-health-hero p {
  margin: 0;
  color: var(--text2);
}

.admin-health-hero > strong {
  font-size: clamp(1.4rem, 2.2vw, 2.4rem);
  color: var(--green-2);
  white-space: nowrap;
}

.admin-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin-bottom: 1rem;
}

.admin-health-card {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: .75rem;
  padding: .95rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
}

.admin-health-dot {
  width: 12px;
  height: 12px;
  margin-top: .25rem;
  border-radius: 50%;
  background: var(--green-2);
  box-shadow: 0 0 0 5px rgba(114,219,98,.14);
}

.admin-health-card.is-warn .admin-health-dot {
  background: #ffc97a;
  box-shadow: 0 0 0 5px rgba(255,201,122,.14);
}

.admin-health-card.is-danger .admin-health-dot {
  background: #ff6b63;
  box-shadow: 0 0 0 5px rgba(255,107,99,.14);
}

.admin-health-card strong,
.admin-health-card b,
.admin-health-card small {
  display: block;
}

.admin-health-card strong {
  color: var(--text2);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.admin-health-card b {
  margin-top: .2rem;
  color: var(--text);
  font-size: 1rem;
}

.admin-health-card small {
  margin-top: .25rem;
  color: var(--text3);
  line-height: 1.35;
}

.admin-health-layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: .85rem;
}

.admin-health-actions {
  display: grid;
  gap: .55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-health-actions li {
  padding: .75rem .85rem;
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.06);
  color: var(--text2);
  line-height: 1.42;
}

.admin-billing-checks,
.admin-billing-events,
.admin-billing-table {
  display: grid;
  gap: .55rem;
}

.admin-billing-manual-sync {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  margin-top: .85rem;
}

.admin-billing-manual-sync input {
  min-height: 42px;
  padding: 0 .85rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  color: var(--text);
  outline: none;
}

.admin-billing-manual-sync input:focus {
  border-color: var(--green-glow);
  box-shadow: 0 0 0 4px var(--green-dim);
}

.admin-billing-check {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: .2rem .65rem;
  align-items: center;
  padding: .7rem .75rem;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

.admin-billing-check span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-billing-check.is-ok span {
  color: #071008;
  background: var(--green-2);
}

.admin-billing-check.is-warn span {
  color: #170f02;
  background: #ffc97a;
}

.admin-billing-check strong,
.admin-billing-event strong {
  color: var(--text);
  font-size: .86rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-billing-check small,
.admin-billing-event small {
  color: var(--text3);
  font-size: .72rem;
}

.admin-billing-event {
  display: grid;
  grid-template-columns: minmax(110px, .45fr) minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  padding: .62rem .7rem;
  border-radius: 13px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.055);
}

.admin-billing-event-type {
  color: #f0b429;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-billing-row {
  display: grid;
  grid-template-columns: minmax(180px, .85fr) minmax(220px, 1.15fr) minmax(128px, .5fr) auto;
  gap: .8rem;
  align-items: center;
  padding: .82rem;
  border-radius: 16px;
  background: rgba(255,255,255,.032);
  border: 1px solid rgba(255,255,255,.07);
}

.admin-billing-user {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

.admin-billing-user strong,
.admin-billing-title {
  display: block;
  color: var(--text);
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-billing-user span,
.admin-billing-sub,
.admin-billing-id,
.admin-billing-meta small {
  color: var(--text3);
  font-size: .72rem;
}

.admin-billing-main {
  min-width: 0;
  display: grid;
  gap: .2rem;
}

.admin-billing-meta {
  display: grid;
  gap: .24rem;
  justify-items: start;
}

.admin-billing-meta strong {
  color: #f0b429;
  font-size: .9rem;
}

.admin-payment-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 .58rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 900;
}

.admin-payment-status.is-approved {
  color: #bdf7b4;
  background: rgba(114, 219, 98, .1);
  border: 1px solid rgba(114, 219, 98, .2);
}

.admin-payment-status.is-pending,
.admin-payment-status.is-in_process,
.admin-payment-status.is-in_mediation {
  color: #ffd390;
  background: rgba(255, 170, 64, .1);
  border: 1px solid rgba(255, 170, 64, .2);
}

.admin-payment-status.is-rejected,
.admin-payment-status.is-cancelled,
.admin-payment-status.is-canceled,
.admin-payment-status.is-refunded,
.admin-payment-status.is-charged_back {
  color: #ffb5b5;
  background: rgba(255, 88, 88, .1);
  border: 1px solid rgba(255, 88, 88, .2);
}

.admin-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 3rem 1rem;
  color: var(--text3);
}

.admin-empty-state p {
  font-size: .88rem;
}

.admin-create-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 43px;
  padding: .72rem 1.1rem;
  border-radius: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Admin user row: actions with icon */
.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

/* Responsive admin V2 */
@media (max-width: 1100px) {
  .admin-metrics-v2 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .admin-panel {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }

  .admin-head {
    min-height: 54px;
    padding: .8rem .9rem .7rem;
  }

  .admin-content {
    padding: .8rem .8rem max(1rem, env(safe-area-inset-bottom));
  }

  .admin-toolbar {
    position: sticky;
    top: 0;
    z-index: 4;
    align-items: stretch;
    flex-direction: column;
    padding-bottom: .65rem;
  }

  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-tab {
    flex: 0 0 auto;
  }

  .admin-metrics-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-summary-v2 {
    grid-template-columns: 1fr;
  }

  .admin-billing-layout,
  .admin-health-layout {
    grid-template-columns: 1fr;
  }

  .admin-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-billing-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-billing-sync {
    width: 100%;
    justify-content: center;
  }

  .admin-billing-event {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .admin-create-shell {
    grid-template-columns: 1fr;
  }

  .admin-users-table .admin-user-row {
    grid-template-columns: 1fr;
  }

  .admin-user-meta {
    grid-template-columns: 1fr;
  }

  .admin-actions-menu summary {
    width: 100%;
  }

  .admin-actions-popover {
    position: static;
    margin-top: .45rem;
  }

  .admin-reading-grid {
    grid-template-columns: 1fr;
  }

  .admin-ranking-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .admin-health-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-health-grid {
    grid-template-columns: 1fr;
  }

  .admin-billing-manual-sync {
    grid-template-columns: 1fr;
  }

  .admin-metrics-v2 {
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
  }

  .admin-metric-card {
    flex-direction: column;
    align-items: flex-start;
    gap: .55rem;
    padding: .8rem;
  }

  .admin-metric-value {
    font-size: 1.35rem;
  }
}

.settings-advanced {
  margin-top: .4rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .75rem;
  padding: 4.2rem 1rem;
  color: var(--text2);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  opacity: .28;
}

.empty-state p {
  font-size: .92rem;
}

.login-shell {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 0 2.2rem;
}

.area-hub-shell {
  min-height: calc(100vh - 170px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem 0 2.6rem;
}

.area-hub-panel {
  position: relative;
  isolation: isolate;
  width: min(100%, 1040px);
  padding: 2.2rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(114, 219, 98, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(86, 190, 92, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(19, 24, 20, 0.97), rgba(10, 12, 11, 0.97));
  border: 1px solid rgba(114, 219, 98, 0.16);
  box-shadow: 0 36px 96px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255,255,255,.03);
}

.area-hub-panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 31px;
  border: 1px solid rgba(156, 251, 114, 0.08);
  pointer-events: none;
  z-index: -1;
}

.area-hub-panel::after {
  content: "";
  position: absolute;
  inset: auto 10% -24px 10%;
  height: 56px;
  background: radial-gradient(circle, rgba(114, 219, 98, 0.22), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
  z-index: -2;
}

.area-hub-head {
  text-align: center;
  margin-bottom: 1.85rem;
}

.area-hub-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .75rem;
  padding: .42rem .82rem;
  border-radius: 999px;
  border: 1px solid rgba(114, 219, 98, 0.18);
  background: rgba(114, 219, 98, 0.08);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-2);
  font-weight: 700;
}

.area-hub-head h1 {
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  line-height: .98;
  margin-bottom: .6rem;
  color: var(--text);
  text-wrap: balance;
}

.area-hub-head h2 {
  font-size: clamp(1.02rem, 2vw, 1.34rem);
  margin-bottom: .75rem;
  color: rgba(237, 243, 235, 0.92);
  font-weight: 600;
}

.area-hub-head p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text2);
  line-height: 1.6;
  font-size: .98rem;
}

.area-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 1.25rem;
}

@media (max-width: 780px) {
  .area-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
  }
}

.area-hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .95rem;
  min-height: 250px;
  padding: 1.28rem;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)),
    rgba(10, 12, 11, 0.76);
  color: var(--text2);
  text-align: left;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.area-hub-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -35% 25%;
  height: 140px;
  background: radial-gradient(circle, var(--hub-accent-soft, rgba(114,219,98,.18)), transparent 68%);
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}

.area-hub-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color .18s ease;
}

.area-hub-card:hover {
  transform: translateY(-5px);
  border-color: var(--hub-accent, rgba(114,219,98,.34));
  box-shadow: 0 22px 40px rgba(0,0,0,.34);
}

.area-hub-card:hover::before {
  transform: scale(1.08);
}

.area-hub-card:hover::after {
  border-color: var(--hub-accent, rgba(114,219,98,.36));
}

.area-hub-card--manga {
  --hub-accent: rgba(114, 219, 98, 0.38);
  --hub-accent-soft: rgba(114, 219, 98, 0.24);
}

.area-hub-card--books {
  --hub-accent: rgba(201, 143, 69, 0.4);
  --hub-accent-soft: rgba(201, 143, 69, 0.22);
}

.area-hub-card--comics {
  --hub-accent: rgba(96, 127, 255, 0.4);
  --hub-accent-soft: rgba(145, 96, 255, 0.24);
}

.area-hub-card-top {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
}

.area-hub-card-copy {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.area-hub-card strong {
  font-size: 1.22rem;
  color: var(--text);
}

.area-hub-desc {
  line-height: 1.55;
  font-size: .95rem;
}

.area-hub-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: .28rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--hub-accent, rgba(114,219,98,.28));
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.88);
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
}

.area-hub-icon {
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  color: var(--hub-accent, var(--green-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.area-hub-icon svg {
  width: 30px;
  height: 30px;
}

.area-hub-benefit {
  margin-top: auto;
  color: rgba(237, 243, 235, 0.86);
  line-height: 1.55;
  font-size: .88rem;
}

.area-hub-link {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  color: var(--hub-accent, var(--green-2));
  font-size: .82rem;
  font-weight: 700;
}

.area-hub-link::after {
  content: "->";
  font-size: .76rem;
}

.area-hub-actions {
  display: flex;
  justify-content: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.area-hub-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 1.4rem;
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: .94rem;
  font-weight: 800;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.area-hub-cta:hover {
  transform: translateY(-1px);
}

.area-hub-cta:disabled {
  opacity: .48;
  cursor: not-allowed;
  filter: grayscale(.08);
  transform: none;
  box-shadow: none;
}

.area-hub-cta-primary {
  min-width: 230px;
  color: #091008;
  background: linear-gradient(135deg, #b8ff8f 0%, #72db62 45%, #4ac152 100%);
  box-shadow: 0 18px 42px rgba(114, 219, 98, 0.28);
  overflow: hidden;
}

.area-hub-cta-primary::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -38%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.44), transparent);
  transform: skewX(-20deg);
  animation: hubCtaShine 3.2s ease-in-out infinite;
}

.area-hub-cta-secondary {
  color: var(--text);
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.area-hub-cta-secondary:hover {
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.07);
}

.area-hub-cta-login-green {
  color: #071a05;
  background: linear-gradient(135deg, #4ac152 0%, #2d8a3a 45%, #1f6128 100%);
  box-shadow: 0 18px 42px rgba(45, 138, 58, 0.22);
  overflow: hidden;
}

.area-hub-cta-login-green::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -38%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-20deg);
  animation: hubCtaShine 3.2s ease-in-out infinite;
  animation-delay: 1.6s;
}

.area-hub-cta-login-green:hover { filter: brightness(1.08); }

.area-hub-cta-premium {
  min-width: 230px;
  color: #07100a;
  background: linear-gradient(135deg, #f5e27d 0%, #f0b429 45%, #e8821a 100%);
  border-color: rgba(240, 180, 41, 0.5);
  box-shadow: 0 0 18px rgba(240, 180, 41, 0.28), inset 0 1px 0 rgba(255,255,255,.18);
  font-weight: 700;
  overflow: hidden;
  position: relative;
}

.area-hub-cta-premium::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -38%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transform: skewX(-18deg);
  animation: hubCtaShine 3.2s ease-in-out infinite;
}

.area-hub-cta-premium:hover {
  filter: brightness(1.08);
}

.area-hub-clarity {
  margin-top: 1.2rem;
  text-align: center;
  font-size: .9rem;
  color: rgba(237, 243, 235, 0.72);
  letter-spacing: .01em;
}

.area-hub-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: 1rem;
}

.area-hub-plan {
  padding: .9rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

.area-hub-plan--premium {
  border-color: rgba(240, 180, 41, 0.3);
  background: rgba(240, 180, 41, 0.05);
}

.area-hub-plan-name {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .55rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--text);
}

.area-hub-plan--premium .area-hub-plan-name {
  color: #f0b429;
}

.area-hub-plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.area-hub-plan-list li {
  font-size: .82rem;
  color: rgba(237, 243, 235, 0.75);
  padding-left: 1rem;
  position: relative;
}

.area-hub-plan-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: rgba(237, 243, 235, 0.45);
}

.area-hub-plan--premium .area-hub-plan-list li::before {
  content: "✓";
  color: #72db62;
  font-size: .72rem;
  top: 1px;
}

.area-hub-plan-price {
  margin-top: .65rem;
  font-size: .88rem;
  font-weight: 700;
  color: #f0b429;
}

.area-hub-offer {
  margin-top: 1.15rem;
  text-align: center;
  color: rgba(237, 243, 235, 0.78);
  font-size: .84rem;
  letter-spacing: .02em;
}

.area-hub-support,
.area-hub-support-note {
  margin-top: 1rem;
  text-align: center;
  color: var(--text2);
  font-size: .82rem;
}

.area-hub-support p + p,
.area-hub-support-note p + p,
.login-support p + p {
  margin-top: .22rem;
}

.support-contact {
  margin: .75rem 0 0;
  color: var(--text2);
  font-size: .82rem;
  line-height: 1.55;
}

.support-contact--center {
  text-align: center;
}

.support-contact a,
.area-hub-support a,
.area-hub-support-note a,
.login-support a {
  color: var(--green-2);
  font-weight: 700;
  text-decoration: none;
}

.support-contact a:hover,
.area-hub-support a:hover,
.area-hub-support-note a:hover,
.login-support a:hover {
  color: #c9ffa6;
  text-decoration: underline;
}

.area-entry-panel {
  width: min(100%, 1120px);
  padding: 2.4rem;
}

.area-entry-head h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -.04em;
}

.entry-trust-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.entry-trust-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 .78rem;
  border-radius: 999px;
  border: 1px solid rgba(114, 219, 98, 0.18);
  background: rgba(114, 219, 98, 0.08);
  color: rgba(237, 243, 235, 0.86);
  font-size: .78rem;
  font-weight: 800;
}

.entry-choice-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr .9fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.entry-choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 230px;
  padding: 1.4rem;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(9, 11, 12, 0.84);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.entry-choice-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -34% 22%;
  height: 150px;
  background: radial-gradient(circle, var(--entry-accent-soft, rgba(114,219,98,.18)), transparent 68%);
  pointer-events: none;
  transition: transform .22s ease;
}

.entry-choice-card:hover {
  transform: translateY(-4px);
  border-color: var(--entry-accent, rgba(255,255,255,.18));
  box-shadow: 0 24px 44px rgba(0,0,0,.28);
}

.entry-choice-card:hover::before,
.entry-choice-card.is-selected::before {
  transform: scale(1.08);
}

.entry-choice-card.is-selected {
  border-color: var(--entry-accent, rgba(255,255,255,.18));
  box-shadow: 0 0 0 1px var(--entry-accent, rgba(255,255,255,.12)) inset, 0 28px 52px rgba(0,0,0,.28);
}

.entry-choice-card--free {
  --entry-accent: rgba(114, 219, 98, 0.4);
  --entry-accent-soft: rgba(114, 219, 98, 0.24);
}

.entry-choice-card--premium {
  --entry-accent: rgba(240, 180, 41, 0.42);
  --entry-accent-soft: rgba(240, 180, 41, 0.22);
}

.entry-choice-card--login {
  --entry-accent: rgba(255,255,255,.18);
  --entry-accent-soft: rgba(255,255,255,.12);
}

.entry-choice-copy {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.entry-choice-copy h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1.05;
}

.entry-choice-copy p {
  margin: 0;
  color: rgba(237, 243, 235, 0.8);
  line-height: 1.65;
  font-size: .96rem;
}

.entry-choice-action {
  margin-top: auto;
  width: 100%;
}

.entry-stage-shell {
  margin-top: 1.35rem;
}

.entry-payment-shortcut {
  display: grid;
  grid-template-columns: minmax(220px, .95fr) minmax(280px, 1.15fr) auto;
  align-items: center;
  gap: 1rem;
  margin-top: 1.15rem;
  padding: 1.05rem;
  border-radius: 24px;
  border: 1px solid rgba(240, 180, 41, 0.2);
  background:
    radial-gradient(circle at 12% 20%, rgba(240, 180, 41, .16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018)),
    rgba(12, 11, 8, .88);
  box-shadow: 0 22px 44px rgba(0,0,0,.24);
}

.entry-payment-copy {
  display: grid;
  gap: .28rem;
}

.entry-payment-copy h3,
.entry-payment-copy p {
  margin: 0;
}

.entry-payment-copy h3 {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.1;
}

.entry-payment-copy p {
  color: rgba(237, 243, 235, 0.74);
  line-height: 1.5;
  font-size: .9rem;
}

.entry-payment-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

.entry-payment-plan {
  display: grid;
  gap: .12rem;
  min-height: 86px;
  padding: .75rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.035);
  text-align: left;
  color: rgba(237, 243, 235, .82);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.entry-payment-plan:hover,
.entry-payment-plan.is-selected {
  transform: translateY(-2px);
  border-color: rgba(240, 180, 41, .48);
  background: rgba(240, 180, 41, .1);
}

.entry-payment-plan strong {
  color: #f0b429;
  font-size: 1.04rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.entry-payment-plan span {
  color: var(--text);
  font-weight: 800;
  font-size: .84rem;
}

.entry-payment-plan small {
  color: rgba(237, 243, 235, .62);
  font-size: .72rem;
}

.entry-payment-main {
  min-width: 190px;
}

.mobile-payment-cta {
  display: none;
}

.entry-stage {
  position: relative;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)),
    rgba(10, 12, 12, 0.82);
  padding: 1.35rem;
  overflow: hidden;
}

.entry-stage-head {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
}

.entry-stage-kicker {
  margin: 0;
  color: var(--green-2);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.entry-stage-head h3 {
  margin: 0;
  font-size: 1.45rem;
  color: var(--text);
}

.entry-stage-head p,
.entry-stage-summary,
.entry-plan-note {
  margin: 0;
  color: rgba(237, 243, 235, 0.74);
  line-height: 1.6;
}

.entry-stage-intro {
  text-align: center;
  padding: 1rem 1.2rem;
}

.entry-area-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .95rem;
}

.entry-area-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
  min-height: 220px;
  padding: 1.15rem;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)),
    rgba(8, 10, 10, 0.82);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.entry-area-card::after {
  content: "";
  position: absolute;
  inset: auto 12% 0 12%;
  height: 54px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--entry-area-glow, rgba(114,219,98,.2)), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.entry-area-card:hover {
  transform: translateY(-4px);
  border-color: var(--entry-area-border, rgba(255,255,255,.18));
  box-shadow: 0 22px 42px rgba(0,0,0,.26);
}

.entry-area-card--manga {
  --entry-area-border: rgba(114, 219, 98, 0.36);
  --entry-area-glow: rgba(114, 219, 98, 0.22);
}

.entry-area-card--books {
  --entry-area-border: rgba(201, 146, 69, 0.36);
  --entry-area-glow: rgba(201, 146, 69, 0.2);
}

.entry-area-card--comics {
  --entry-area-border: rgba(155, 92, 255, 0.34);
  --entry-area-glow: rgba(155, 92, 255, 0.2);
}

.entry-area-card strong,
.entry-plan-card strong {
  color: var(--text);
}

.entry-area-meta,
.entry-area-count {
  color: rgba(237, 243, 235, 0.72);
  line-height: 1.55;
}

.entry-area-count {
  margin-top: auto;
  font-size: .8rem;
  font-weight: 700;
}

.entry-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .95rem;
}

.entry-plan-card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.15rem 1rem;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)),
    rgba(9, 11, 12, 0.78);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.entry-plan-card:hover,
.entry-plan-card.is-selected {
  transform: translateY(-3px);
  border-color: rgba(240, 180, 41, 0.42);
  box-shadow: 0 18px 36px rgba(0,0,0,.24);
}

.entry-plan-card.is-selected {
  background:
    linear-gradient(180deg, rgba(240, 180, 41, .12), rgba(255,255,255,.02)),
    rgba(12, 12, 10, 0.82);
}

.entry-plan-price {
  color: #f0b429;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.12;
}

.entry-plan-card p {
  margin: 0;
  color: rgba(237, 243, 235, 0.72);
  line-height: 1.55;
}

.entry-plan-areas {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

.entry-plan-areas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .8rem;
  color: rgba(237, 243, 235, 0.84);
}

.entry-plan-area-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}

.entry-plan-area {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 58px;
  padding: 0 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
  color: rgba(237, 243, 235, 0.86);
  font-weight: 700;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.entry-plan-area:hover,
.entry-plan-area.is-selected {
  transform: translateY(-2px);
  border-color: rgba(240, 180, 41, 0.42);
  background: rgba(240, 180, 41, 0.08);
}

.entry-plan-area-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: #f0b429;
}

.entry-plan-actions {
  display: flex;
  justify-content: flex-end;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.entry-catalog-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin-top: 1.1rem;
}

.entry-proof-card {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: .95rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)),
    rgba(9, 11, 12, 0.76);
  text-align: center;
}

.entry-proof-card strong {
  font-size: clamp(1.45rem, 3vw, 2rem);
  color: var(--text);
  line-height: 1;
}

.entry-proof-card span {
  color: rgba(237, 243, 235, 0.7);
  font-size: .9rem;
  font-weight: 600;
}

.entry-proof-card--manga strong { color: #9cfb72; }
.entry-proof-card--books strong { color: #e0b16d; }
.entry-proof-card--comics strong { color: #b28cff; }

.inline-upgrade-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.25rem;
  padding: 1.05rem 1.1rem;
  border-radius: 22px;
  border: 1px solid var(--border-strong, rgba(114, 219, 98, 0.18));
  background:
    radial-gradient(circle at 8% 20%, var(--green-glow, rgba(114, 219, 98, .12)), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018)),
    rgba(10, 14, 11, .9);
}

.inline-upgrade-banner-slim {
  padding: .82rem .95rem;
  margin: 0 0 1rem;
  border-radius: 16px;
  gap: .75rem;
  border-color: color-mix(in srgb, var(--green-2) 42%, rgba(255, 255, 255, .12));
  background:
    radial-gradient(circle at 86% 50%, color-mix(in srgb, var(--green-glow) 65%, transparent), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--green) 16%, rgba(255,255,255,.035)), rgba(255,255,255,.02)),
    rgba(13, 16, 12, .94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255,255,255,.05);
}

.inline-upgrade-copy-slim {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  min-width: 0;
}

.inline-upgrade-copy-slim span {
  display: inline-flex;
  align-items: center;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green-2) 22%, rgba(0, 0, 0, .2));
  color: #fff3c4;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.inline-upgrade-copy-slim p {
  margin: 0;
  color: rgba(237, 243, 235, .82);
  font-size: .88rem;
  line-height: 1.4;
  flex: 1 1 240px;
  min-width: 0;
}

.inline-upgrade-banner-slim .inline-upgrade-btn {
  min-height: 40px;
  padding: 0 1.05rem;
  border-color: color-mix(in srgb, var(--green-2) 72%, white);
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #071a05;
  font-size: .84rem;
  font-weight: 900;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--green-glow) 70%, transparent);
}

@media (max-width: 600px) {
  .inline-upgrade-banner-slim {
    flex-direction: column;
    align-items: stretch;
  }
  .inline-upgrade-banner-slim .inline-upgrade-btn {
    width: 100%;
  }
}

.inline-upgrade-copy {
  display: grid;
  gap: .2rem;
}

.inline-upgrade-copy span {
  color: var(--green-2, #88f281);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.inline-upgrade-copy strong {
  color: var(--text);
  font-size: 1.12rem;
}

.inline-upgrade-copy p {
  margin: 0;
  color: rgba(237, 243, 235, .72);
  font-size: .86rem;
  line-height: 1.45;
}

.inline-upgrade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 .95rem;
  border: 1px solid var(--border-strong, rgba(114, 219, 98, .28));
  border-radius: 999px;
  background: var(--green-dim, rgba(114, 219, 98, .1));
  color: var(--green-2, #baffab);
  font-weight: 700;
  font-size: .86rem;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.inline-upgrade-btn:hover {
  background: var(--green-glow, rgba(114, 219, 98, .16));
  border-color: var(--green, rgba(156, 251, 114, .42));
  color: var(--green-2, #e1ffd7);
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .entry-choice-grid,
  .entry-payment-shortcut,
  .entry-plan-grid,
  .entry-area-grid,
  .entry-plan-area-grid {
    grid-template-columns: 1fr;
  }

  .entry-payment-plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Stats ficam lado a lado mesmo no mobile */
  .entry-catalog-proof {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .entry-choice-card,
  .entry-area-card {
    min-height: 0;
  }

  .inline-upgrade-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-upgrade-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .area-entry-panel {
    padding: 1.3rem 1rem 5.2rem;
    border-radius: 24px;
  }

  .entry-choice-card,
  .entry-stage {
    border-radius: 20px;
  }

  .entry-plan-areas-head,
  .entry-plan-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .entry-payment-shortcut {
    padding: .9rem;
    border-radius: 20px;
  }

  .entry-payment-plans {
    grid-template-columns: 1fr;
  }

  .entry-payment-plan {
    min-height: 0;
  }

  .mobile-payment-cta {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    min-height: 58px;
    padding: .8rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(240, 180, 41, .42);
    background: linear-gradient(135deg, #f5e27d 0%, #f0b429 46%, #e8821a 100%);
    color: #07100a;
    box-shadow: 0 18px 44px rgba(0,0,0,.48), 0 0 24px rgba(240,180,41,.18);
    font-family: var(--font);
  }

  .mobile-payment-cta span {
    font-size: .78rem;
    font-weight: 800;
    opacity: .76;
  }

  .mobile-payment-cta strong {
    font-size: 1rem;
    font-weight: 950;
  }

  .inline-upgrade-banner {
    align-items: stretch;
    flex-direction: column;
    border-radius: 18px;
  }

  .inline-upgrade-btn {
    width: 100%;
  }
}

@keyframes hubCtaShine {
  0%, 100% {
    transform: translateX(0) skewX(-20deg);
    opacity: 0;
  }
  12% {
    opacity: .8;
  }
  28% {
    transform: translateX(420%) skewX(-20deg);
    opacity: 0;
  }
}

.login-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 460px);
  padding: 2rem;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(20, 25, 21, 0.94), rgba(12, 14, 13, 0.94)),
    radial-gradient(circle at top, rgba(114, 219, 98, 0.15), transparent 56%),
    rgba(12, 14, 13, 0.82);
  border: 1px solid rgba(114, 219, 98, 0.16);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,.03);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(114, 219, 98, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 22%);
  pointer-events: none;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: .85rem;
}

.login-brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.login-brand-title {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.1;
}

.login-brand-subtitle {
  font-size: .82rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--green-2);
  margin-top: .22rem;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  padding: .32rem .68rem;
  border-radius: 999px;
  background: rgba(114, 219, 98, 0.12);
  border: 1px solid rgba(114, 219, 98, 0.2);
  color: var(--green-2);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.login-title {
  margin-top: .1rem;
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1.02;
}

.login-copy {
  margin-top: .75rem;
  color: var(--text2);
  font-size: .95rem;
  line-height: 1.62;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text2);
  font-weight: 600;
}

.login-form label span {
  color: rgba(237, 243, 235, 0.86);
}

.login-form input {
  min-height: 54px;
  padding: .95rem 1rem;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-form input:focus {
  border-color: rgba(114, 219, 98, 0.52);
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 4px rgba(114, 219, 98, 0.1);
}

.password-visibility-field {
  position: relative;
  display: block;
  width: 100%;
}

/* width: 100% + box-sizing garantem que o input dentro do wrapper ocupe
   a mesma largura que os demais inputs do form (sem ele, o input fica com
   largura intrínseca e o ícone do olho aparece "fora da caixa"). */
.password-visibility-field input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 3.2rem !important;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: .62rem;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: rgba(237, 243, 235, .7);
  cursor: pointer;
  transition: background var(--trans), color var(--trans), border-color var(--trans), transform var(--trans);
}

.password-visibility-toggle:hover,
.password-visibility-toggle[aria-pressed="true"] {
  background: rgba(114, 219, 98, .12);
  border-color: rgba(114, 219, 98, .22);
  color: var(--green-2);
}

.password-visibility-toggle:focus-visible {
  outline: 2px solid var(--green-2);
  outline-offset: 2px;
}

.password-visibility-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-field-note {
  color: var(--text3);
  font-size: .74rem;
  line-height: 1.4;
}

.login-inline-links {
  display: flex;
  justify-content: flex-end;
  margin-top: -.15rem;
}

.login-link-disabled {
  color: rgba(179, 188, 177, 0.5);
  font-size: .78rem;
  cursor: not-allowed;
  user-select: none;
}

.login-link-action {
  background: none;
  border: 0;
  padding: 0;
  color: #9cfb72;
  font-size: .78rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
}
.login-link-action:hover { color: #b8ff8f; }
.login-link-action:focus-visible {
  outline: 2px solid #73df67;
  outline-offset: 2px;
  border-radius: 2px;
}

.login-msg.success { color: #9cfb72; }

/* Modal de recuperação de senha */
.forgot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 9, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1200;
  animation: forgotFadeIn 160ms ease-out;
}
@keyframes forgotFadeIn { from { opacity: 0; } to { opacity: 1; } }

.forgot-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #161a18;
  border: 1px solid #2a3530;
  border-radius: 14px;
  padding: 26px 22px 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  color: #e6f5dd;
}

.forgot-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: none;
  border: 0;
  color: #9aa49d;
  font-size: 22px;
  cursor: pointer;
  border-radius: 8px;
}
.forgot-close:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.forgot-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: #9cfb72;
}

.forgot-copy {
  margin: 0 0 14px;
  font-size: .9rem;
  line-height: 1.5;
  color: #b3bcb1;
}

.forgot-form { display: flex; flex-direction: column; gap: .7rem; }

.forgot-form label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .85rem;
  color: #b3bcb1;
}

.forgot-form input[type="email"] {
  background: #0f1110;
  border: 1px solid #2a3530;
  border-radius: 8px;
  padding: 10px 12px;
  color: #e6f5dd;
  font-size: .95rem;
  font-family: inherit;
}
.forgot-form input[type="email"]:focus {
  outline: 2px solid #73df67;
  outline-offset: 0;
  border-color: #73df67;
}

.forgot-msg {
  min-height: 1.2em;
  margin: 0;
  font-size: .85rem;
  color: #b3bcb1;
}
.forgot-msg.error { color: #ff8a7a; }
.forgot-msg.success { color: #9cfb72; }

.forgot-actions {
  display: flex;
  gap: .6rem;
  margin-top: .2rem;
}

.forgot-actions .btn-primary,
.forgot-actions .btn-secondary { flex: 1; }

body.forgot-locked { overflow: hidden; }

@media (max-width: 480px) {
  .forgot-card { padding: 22px 18px 18px; border-radius: 12px; }
  .forgot-actions { flex-direction: column; }
}

.login-actions {
  display: flex;
  gap: .7rem;
  margin-top: .2rem;
}

.login-actions .btn-primary,
.login-actions .btn-secondary {
  flex: 1 1 0;
}

.login-actions .btn-secondary {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.login-actions .btn-secondary:hover {
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.18);
}

.login-actions .btn-primary {
  min-height: 52px;
  font-size: 1rem;
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(114, 219, 98, 0.24);
}

.login-msg {
  min-height: 1.2em;
  font-size: .82rem;
  color: var(--text3);
}

.login-msg.error {
  color: var(--red);
}

.login-create-account {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: .15rem;
  color: var(--text2);
  font-size: .88rem;
}

.login-create-link {
  color: var(--green-2);
  font-size: .88rem;
  font-weight: 700;
}

.login-create-link:hover {
  color: #c4ff9f;
}

.login-create-link:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.login-support {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
  color: var(--text2);
  font-size: .83rem;
  line-height: 1.55;
}

.login-support p + p {
  margin-top: .16rem;
}

.login-legal-links {
  margin-top: .55rem !important;
  font-size: .76rem;
  color: rgba(179, 188, 177, 0.55);
}
.login-legal-links a {
  color: rgba(179, 188, 177, 0.7);
  text-decoration: none;
  margin: 0 .15rem;
}
.login-legal-links a:hover {
  color: #9cfb72;
  text-decoration: underline;
}

.register-terms-label {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .82rem;
  color: #b3bcb1;
  line-height: 1.4;
  margin-top: .35rem;
}
.register-terms-label input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #73df67;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.register-terms-label a {
  color: #9cfb72;
  text-decoration: underline;
}

.register-referral-note {
  font-size: .82rem;
  text-align: center;
  color: #9cfb72;
  background: rgba(115, 223, 103, .12);
  border: 1px solid rgba(115, 223, 103, .35);
  border-radius: 10px;
  padding: .55rem .75rem;
  margin: 0 0 .35rem;
  line-height: 1.4;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.filter-bar select,
.filter-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
}

.filter-bar select {
  padding: .48rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  cursor: pointer;
}

.filter-input {
  flex: 1 1 260px;
  min-width: 240px;
  padding: .6rem .92rem;
  border-radius: 999px;
  font-size: .85rem;
}

.filter-input::placeholder {
  color: var(--text3);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr);
  gap: .8rem;
  padding: .9rem;
  margin-bottom: 1.25rem;
  border-radius: 18px;
  background: rgba(8, 10, 9, 0.5);
  border: 1px solid rgba(114, 219, 98, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.filter-search {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 0 .9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(219, 234, 211, 0.72);
}

.filter-search:focus-within {
  border-color: rgba(114, 219, 98, 0.48);
  box-shadow: 0 0 0 3px rgba(114, 219, 98, 0.08);
}

.filter-search svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.filter-search .filter-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
}

.filter-search .filter-input::placeholder {
  color: rgba(218, 228, 211, 0.5);
}

.filter-chips,
.filter-selects {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip,
.filter-select {
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(232, 242, 226, 0.84);
  font-size: .8rem;
  font-weight: 700;
}

.filter-chip {
  padding: 0 .85rem;
}

.filter-chip.active {
  color: #071008;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  border-color: transparent;
}

.filter-select {
  padding: 0 .85rem;
  outline: none;
}

.filter-select option,
.admin-range-select option,
.admin-form select option {
  color: #e8f2e2;
  background: #151816;
}

.filter-select:focus {
  border-color: rgba(114, 219, 98, 0.48);
}

.card-title mark {
  color: #101408;
  background: linear-gradient(135deg, #e1ff8a, #78db62);
  border-radius: 5px;
  padding: 0 .12em;
}

.empty-inline {
  grid-column: 1 / -1;
  color: var(--text2);
  font-size: .85rem;
}

.reader-overlay {
  display: none;
}

.toast-container {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  padding: .68rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 18, 16, 0.96);
  color: var(--text);
  font-size: .84rem;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
  animation: toastIn .2s ease;
}

.toast.success {
  color: var(--green-2);
  border-color: rgba(114, 219, 98, 0.2);
}

.toast.error {
  color: var(--red);
  border-color: rgba(240, 113, 103, 0.18);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

@media (max-width: 900px) {
  .library-overview,
  .series-hero {
    grid-template-columns: 1fr;
  }

  .overview-stats,
  .series-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spotlight-title {
    font-size: 1.65rem;
  }

  .spotlight-shell {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .spotlight-aside {
    width: 100%;
    max-width: 100%;
  }

  .admin-user-row,
  .admin-reading-row {
    grid-template-columns: 1fr 1fr;
  }

  .admin-user-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .admin-user-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner {
    gap: .8rem;
    padding: 0 .9rem;
  }

  .lib-tabs {
    gap: .4rem;
    padding-bottom: .15rem;
  }

  .area-tabs,
  .library-tabs {
    gap: .3rem;
  }

  .library-tabs {
    padding-left: .45rem;
  }

  .area-tab,
  .lib-tab {
    padding: .4rem .72rem;
    font-size: .76rem;
  }

  #mainContent {
    padding-left: .9rem;
    padding-right: .9rem;
  }

  .logo-subtitle {
    display: none;
  }

  .library-overview {
    padding: 1rem;
  }

  .overview-title {
    font-size: 1.35rem;
  }

  .overview-stats,
  .series-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .spotlight {
    min-height: 224px;
    margin-bottom: 1.25rem;
    border-radius: 16px;
  }

  .spotlight::before {
    background:
      radial-gradient(circle at 80% 18%, rgba(124, 234, 104, 0.14), transparent 26%),
      linear-gradient(to right, rgba(0, 0, 0, 0.86) 20%, rgba(0, 0, 0, 0.5) 100%);
  }

  .spotlight-bg {
    filter: brightness(.32) saturate(1.08);
    transform: scale(1.02);
    transition: none;
  }

  .spotlight:hover .spotlight-bg {
    transform: scale(1.02);
  }

  .spotlight-cover {
    width: 74px;
    height: 108px;
    left: 1rem;
    bottom: 1rem;
  }

  .spotlight-info {
    margin-left: calc(74px + .8rem);
    max-width: none;
  }

  .spotlight-shell {
    min-height: 224px;
    padding: 1rem;
    display: block;
  }

  .spotlight-aside {
    display: none;
  }

  .spotlight-title {
    font-size: 1.12rem;
    max-width: 100%;
  }

  .spotlight-meta {
    font-size: .78rem;
    margin-bottom: .55rem;
  }

  .spotlight-tag {
    font-size: .75rem;
    margin-bottom: .45rem;
  }

  .card {
    width: 116px;
  }

  .top-series-card {
    width: 132px;
    padding: .4rem;
    border-radius: 15px;
  }

  .rank-badge {
    width: 28px;
    height: 28px;
    top: .6rem;
    left: .6rem;
  }

  .series-grid {
    grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  }

  .series-shell {
    padding: 1.1rem;
  }

  .series-actions,
  .chapters-head,
  .settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-avatar-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .preference-grid {
    grid-template-columns: 1fr;
  }

  .profile-preferences {
    padding: .85rem;
  }

  .series-actions .btn-primary,
  .series-actions .btn-secondary {
    width: 100%;
  }

  .area-hub-panel {
    padding: 1.15rem;
    border-radius: 22px;
  }

  .area-hub-grid {
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  .area-hub-card {
    min-height: 0;
    padding: 1.08rem;
  }

  .area-hub-actions {
    flex-direction: column;
  }

  .area-hub-cta {
    width: 100%;
  }

  .area-hub-plans {
    grid-template-columns: 1fr;
  }

  .admin-user-row,
  .admin-reading-row {
    grid-template-columns: 1fr;
  }

  .admin-user-actions {
    justify-content: stretch;
  }

  .admin-user-meta {
    grid-template-columns: 1fr;
  }

  .mini-btn {
    width: 100%;
  }

  .chapter-item {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .chapter-meta {
    min-width: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .admin-metrics,
  .admin-summary-layout,
  .admin-ranking-grid,
  .admin-users-table .admin-user-row {
    grid-template-columns: 1fr;
  }

  .admin-create-shell {
    grid-template-columns: 1fr;
  }

  .admin-user-actions {
    justify-content: flex-start;
  }

  .admin-actions-popover {
    left: 0;
    right: auto;
  }
}

@media (max-width: 620px) {
  .admin-panel {
    width: calc(100vw - 10px);
    max-height: 94vh;
  }

  .admin-head,
  .admin-content {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-tab {
    width: 100%;
  }

  .admin-user-pills,
  .filter-chips,
  .filter-selects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-chip,
  .filter-select {
    width: 100%;
  }

  .filter-panel {
    padding: .75rem;
    border-radius: 15px;
  }
}

/* ─── SAFE AREAS — iPhone notch / home bar ─────────────────────── */
:root {
  --safe-top:    env(safe-area-inset-top,    0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left,   0px);
  --safe-right:  env(safe-area-inset-right,  0px);
}

#appHeader {
  padding-top: var(--safe-top);
  height: calc(var(--header-h) + var(--safe-top));
}

#mainContent {
  padding-top:    calc(var(--header-h) + var(--safe-top) + 1.45rem);
  padding-left:   calc(1.25rem + var(--safe-left));
  padding-right:  calc(1.25rem + var(--safe-right));
  padding-bottom: calc(3rem + var(--safe-bottom));
}

.toast-container {
  bottom: calc(1.5rem + var(--safe-bottom));
}

/* ─── TOUCH: elimina delay de 300ms em taps ────────────────────── */
button,
a,
.card,
.book-card,
.book-lib-card,
.digest-card,
.top-series-card,
.chapter-item,
.filter-chip,
.recent-update-card,
.recent-update-chapter,
.area-tab,
.lib-tab,
.area-hub-card,
.entry-choice-card,
.spotlight-strip-item,
.entry-area-card,
.entry-plan-card,
.area-hub-cta,
.search-item,
[role="button"] {
  touch-action: manipulation;
}

/* ─── TOUCH: evita seleção de texto ao arrastar cards ─────────── */
.card,
.book-card,
.digest-card,
.top-series-card,
.chapter-item,
.search-item {
  -webkit-user-select: none;
  user-select: none;
}

/* ─── TOUCH: feedback visual em mobile (hover não existe) ──────── */
@media (hover: none) {
  .card:active          { transform: scale(.96) translateY(-2px); }
  .book-card:active     { transform: scale(.97); }
  .digest-card:active   { transform: scale(.97); }
  .top-series-card:active { transform: scale(.97); border-color: rgba(158, 251, 114, 0.24); }
  .chapter-item:active  { background: rgba(255, 255, 255, 0.04); border-color: rgba(114, 219, 98, 0.14); }
  .filter-chip:active   { opacity: .75; }
  .area-tab:active,
  .lib-tab:active       { background: rgba(255, 255, 255, 0.07); }
  .btn-read:active,
  .btn-primary:active   { opacity: .85; transform: scale(.98); }
  .btn-secondary:active { opacity: .75; }
}

/* ─── SCROLL HORIZONTAL: comportamento nativo no touch ─────────── */
.h-scroll,
.book-strip,
.digest-strip,
.top-series-strip {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}

.h-scroll > .card {
  scroll-snap-align: start;
}

/* book-lib-card inside horizontal scroll strips needs a fixed width */
.h-scroll > .book-lib-card {
  width: 132px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

@media (max-width: 560px) {
  .h-scroll > .book-lib-card {
    width: 104px;
  }
}

@media (max-width: 420px) {
  .h-scroll > .book-lib-card {
    width: 88px;
  }
}

.book-strip > .book-card,
.digest-strip > .digest-card,
.top-series-strip > .top-series-card {
  scroll-snap-align: start;
}

/* ─── TAP TARGETS mínimos 44px ─────────────────────────────────── */
@media (pointer: coarse) {
  .modal-close,
  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .chapter-read-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .card-order-btn {
    width: 36px;
    height: 36px;
  }

  .area-tab,
  .lib-tab {
    padding: .52rem .9rem;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  .filter-chip {
    min-height: 44px;
    padding: 0 1rem;
  }

  .filter-select {
    min-height: 44px;
  }
}

/* ─── MOBILE ≤ 480px: ajustes de tamanho e espaçamento ─────────── */
@media (max-width: 480px) {
  #mainContent {
    padding-left:  calc(.75rem + var(--safe-left));
    padding-right: calc(.75rem + var(--safe-right));
  }

  /* Logo: oculta texto para poupar espaço */
  .logo-copy {
    display: none;
  }

  /* Cards da grade */
  .card {
    width: 104px;
  }

  body.cards-compact .card {
    width: 96px;
  }

  .series-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: .75rem;
  }

  /* Book cards no strip */
  .book-card {
    width: clamp(140px, 38vw, 174px);
  }

  .digest-card {
    width: clamp(128px, 35vw, 156px);
  }

  .top-series-card {
    width: clamp(120px, 33vw, 178px);
  }

  .recent-update-card {
    width: clamp(136px, 40vw, 156px);
  }

  /* Seções: menos margin */
  .section {
    margin-bottom: 1.6rem;
  }

  .section-title {
    font-size: .96rem;
  }

  /* Series modal: menos padding */
  .series-shell {
    padding: .9rem .9rem 1.4rem;
  }

  .series-info h2 {
    font-size: 1.22rem;
  }

  .series-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
  }

  .meta-card {
    padding: .62rem .68rem;
  }

  .meta-value {
    font-size: .92rem;
  }

  /* Capítulos: número menor */
  .chapter-num {
    min-width: 48px;
    font-size: .76rem;
  }

  .chapter-name strong {
    font-size: .82rem;
  }

  /* Filtros: chips em linha scroll */
  .filter-chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: .45rem;
    padding-bottom: .1rem;
  }

  .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex-shrink: 0;
  }

  /* Busca: padding top menor */
  .search-overlay {
    padding-top: calc(3.5rem + var(--safe-top));
  }

  /* Spotlight mobile mínimo */
  .spotlight {
    border-radius: 14px;
  }

  .btn-read {
    min-height: 44px;
    font-size: .84rem;
  }

  /* Toast position */
  .toast-container {
    left: .75rem;
    right: .75rem;
    transform: none;
    width: auto;
  }

  .toast {
    text-align: center;
  }
}

/* ─── LANDSCAPE MOBILE ──────────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  #appHeader {
    height: calc(50px + var(--safe-top));
    --header-h: 50px;
  }

  #mainContent {
    padding-top: calc(50px + var(--safe-top) + 1rem);
  }

  .spotlight {
    min-height: 180px;
  }

  .spotlight-shell {
    min-height: 180px;
    padding: .75rem;
  }

  .spotlight-cover {
    width: 60px;
    height: 88px;
  }

  .spotlight-info {
    margin-left: calc(60px + .65rem);
  }

  .spotlight-title {
    font-size: 1rem;
  }
}

/* ─── HEADER: esconde nome do usuário em telas muito apertadas ─── */
@media (max-width: 380px) {
  .user-chip-name {
    display: none;
  }

  .header-user-chip {
    padding-left: .35rem;
    padding-right: .35rem;
  }

  .header-chip {
    padding: 0 .6rem;
    font-size: .7rem;
  }

  .header-login-chip {
    padding: 0 .72rem;
  }

  .card {
    width: 96px;
  }

  .series-grid {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  }
}


/* ─── BIBLIOTECA DE LIVROS ──────────────────────────────────────── */

.book-lib-header { margin-bottom: 1.4rem; }

.book-lib-title-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.1rem;
}

.book-lib-icon {
  width: 22px;
  height: 22px;
  color: var(--green);
  flex-shrink: 0;
}

.book-lib-heading {
  font-size: 1.18rem;
  font-weight: 800;
}

.book-lib-count {
  margin-left: auto;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: var(--green-dim);
  border: 1px solid var(--border-strong);
  color: var(--green-2);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  white-space: nowrap;
}

.book-lib-filter-panel {
  display: grid;
  gap: .75rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-strong);
}

.book-lib-search-wrap {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text2);
  transition: border-color var(--trans), box-shadow var(--trans);
}

.book-lib-search-wrap:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--green-dim);
}

.book-lib-search-wrap svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .6; }

.book-lib-search {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: .92rem;
  font-family: var(--font);
}

.book-lib-search::placeholder { color: var(--text3); }

.book-lib-chips {
  display: flex;
  gap: .42rem;
  flex-wrap: wrap;
}

.book-lib-chip {
  min-height: 36px;
  padding: 0 .95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text2);
  font-size: .8rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--trans);
  touch-action: manipulation;
}

.book-lib-chip.active {
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #0d0902;
  border-color: transparent;
  box-shadow: 0 6px 18px var(--green-dim);
}

.book-lib-chip:not(.active):hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }

.book-lib-selects { display: flex; gap: .5rem; flex-wrap: wrap; }

.book-lib-filter-advanced {
  display: grid;
  gap: .65rem;
}

.book-lib-filter-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  min-height: 42px;
  padding: 0 .95rem;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.035);
  color: var(--text2);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.book-lib-filter-toggle::-webkit-details-marker {
  display: none;
}

.book-lib-filter-toggle::after {
  content: "+";
  font-size: 1rem;
  color: var(--green-2);
}

.book-lib-filter-advanced[open] .book-lib-filter-toggle::after {
  content: "-";
}

.book-lib-select {
  min-height: 38px;
  padding: 0 2rem 0 .85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: .8rem;
  font-family: var(--font);
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color var(--trans);
  appearance: none;
}

.book-lib-select:focus { border-color: var(--border-strong); }
.book-lib-select option { color: var(--text); background: #1b130c; }

/* Grid */
.book-lib-grid {
  /* Mobile: capas menores, mais arejado. Usa minmax pra escalar até 4 colunas
     em telas comuns (~390px+) e 3 colunas em telas estreitas (~360px). */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: .55rem .5rem;
}

@media (min-width: 561px) {
  .book-lib-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.1rem;
  }
}

/* Card */
.book-lib-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  cursor: pointer;
  transition: transform var(--trans);
  position: relative;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

.book-lib-card:hover { transform: translateY(-4px); }
@media (hover: none) { .book-lib-card:active { transform: scale(.96) translateY(-2px); } }

.book-lib-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px 14px 14px 10px;
  overflow: hidden;
  background: var(--bg3);
  box-shadow: -4px 4px 14px rgba(0,0,0,.6), inset -2px 0 8px rgba(0,0,0,.35);
}

/* Lombada do livro */
.book-lib-cover-wrap::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 8px;
  background: linear-gradient(to right, rgba(0,0,0,.5), rgba(0,0,0,.06));
  z-index: 1;
  border-radius: 10px 0 0 10px;
}

.book-lib-cover { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.book-lib-card:hover .book-lib-cover { transform: scale(1.04); }

.book-lib-fmt {
  position: absolute;
  top: .45rem; right: .45rem;
  z-index: 2;
  padding: .18rem .42rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .05em;
  background: rgba(0,0,0,.78);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--green-2);
}

.book-lib-done {
  position: absolute;
  bottom: .45rem; right: .45rem;
  z-index: 2;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #071008;
  font-size: .72rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-lib-reading {
  position: absolute;
  bottom: .45rem; right: .45rem;
  z-index: 2;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green-2);
  box-shadow: 0 0 0 3px var(--green-dim);
  animation: tabPulse 2s ease-in-out infinite;
}

.book-lib-body { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }

.book-lib-title {
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.32;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  min-height: 2.64em;
}

.book-lib-author {
  font-size: .72rem;
  color: var(--green-2);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  opacity: .9;
}

.book-lib-collection {
  font-size: .68rem;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.book-lib-pages { font-size: .66rem; color: var(--text3); margin: 0; }

/* Mobile: aperta tipografia + reduz gap interno pra cards ficarem leves
   visualmente, casando com a sensação dos strips "Livros famosos". */
@media (max-width: 560px) {
  .book-lib-card { gap: .35rem; }
  .book-lib-title {
    font-size: .74rem;
    line-height: 1.22;
    min-height: 2.2em;
  }
  .book-lib-author { font-size: .66rem; }
  .book-lib-collection { font-size: .62rem; }
  .book-lib-fmt {
    top: .3rem; right: .3rem;
    padding: .12rem .32rem;
    font-size: .62rem;
  }
}

.book-lib-progress {
  margin-top: .1rem;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}

.book-lib-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-2), var(--green));
  border-radius: inherit;
}

.book-lib-footer { display: flex; justify-content: center; margin-top: 1.5rem; }
.book-lib-footer.hidden { display: none; }

.book-lib-more-btn {
  min-height: 44px;
  padding: .75rem 2rem;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--green-dim);
  color: var(--green-2);
  font-size: .88rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--trans);
}

.book-lib-more-btn:hover { background: rgba(114,219,98,.18); }

.book-lib-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1.2rem;
  color: var(--text3);
  font-size: .84rem;
}

.book-lib-loading.hidden { display: none; }

.book-lib-empty {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text3);
  font-size: .88rem;
}

@media (max-width: 560px) {
  .book-lib-title-row {
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: .8rem;
  }
  .book-lib-count {
    margin-left: 0;
    order: 3;
  }
  .book-lib-filter-panel {
    gap: .6rem;
    padding: .85rem;
    border-radius: 16px;
  }
  .book-lib-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .book-lib-chips::-webkit-scrollbar { display: none; }
  .book-lib-chip { flex-shrink: 0; }
  .book-lib-filter-toggle {
    display: flex;
  }
  .book-lib-filter-advanced {
    display: block;
  }
  .book-lib-filter-advanced:not([open]) .book-lib-selects {
    display: none;
  }
  .book-lib-filter-advanced .book-lib-selects {
    margin-top: .6rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .book-lib-collection,
  .book-lib-pages { display: none; }
}

@media (max-width: 480px) {
  /* Grade fina: 4 colunas em telas comuns (~412px) — capas menores, mais
     próximas do visual dos strips "Livros famosos / Novos na biblioteca". */
  .book-lib-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .55rem .45rem;
  }
  .book-lib-cover-wrap {
    border-radius: 8px 12px 12px 8px;
  }
  .book-lib-body { gap: .12rem; }
  .book-lib-title {
    font-size: .72rem;
    -webkit-line-clamp: 2;
  }
  .book-lib-author {
    font-size: .67rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    white-space: normal;
    line-height: 1.3;
  }
  .book-lib-fmt {
    top: .35rem;
    right: .35rem;
    font-size: .58rem;
    padding: .12rem .32rem;
  }
}

@media (max-width: 420px) {
  /* Mantém 4 colunas, só aperta gap em telas mais estreitas. */
  .book-lib-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .4rem .35rem;
  }
  .book-lib-title { font-size: .68rem; }
  .book-lib-author { font-size: .62rem; }
}

@media (max-width: 380px) {
  /* Em telas muito estreitas (~360px), volta a 3 colunas pra capas legíveis. */
  .book-lib-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .4rem;
  }
  .book-lib-title { font-size: .7rem; }
  .book-lib-author { font-size: .64rem; }
}

/* In books area, make series cards same width as book cards in h-scroll strips */
body[data-area="books"] .h-scroll > .card {
  width: 132px;
}

@media (max-width: 480px) {
  body[data-area="books"] .h-scroll > .card {
    width: 102px;
  }
}

/* ── Related books strips ─────────────────────────────────────────────────── */
.related-section > .section-header { margin-bottom: .25rem; }
.related-section > .section-header .section-title { color: var(--text2); font-size: .92rem; }

.series-related-strip {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 1.1rem;
  margin-top: 1rem;
}

.series-related-strip .section-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: .75rem;
  display: block;
}

.series-related-strip .h-scroll {
  gap: .85rem;
}

.series-related-strip .book-lib-card {
  width: 112px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.book-related-strip {
  margin-bottom: 1.5rem;
}

.book-related-strip .section-title {
  font-size: .96rem;
  margin-bottom: .85rem;
}

.book-related-strip .h-scroll {
  gap: .85rem;
}

.book-related-strip .book-lib-card {
  width: 120px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* ── Spotlight dots ──────────────────────────────────────────────────────── */
.spotlight-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .55rem;
  padding: .6rem 0 .15rem;
}

.spotlight-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .3s, transform .3s, width .3s;
  flex-shrink: 0;
}

.spotlight-dot.active {
  background: var(--green-2);
  width: 20px;
  border-radius: 999px;
}

.spotlight-dot:hover:not(.active) {
  background: rgba(255,255,255,.5);
}

/* ── Card "NOVO" badge ───────────────────────────────────────────────────── */
.card-new-badge {
  position: absolute;
  top: .45rem;
  left: .45rem;
  z-index: 2;
  padding: .18rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  background: var(--green);
  color: #071006;
  text-transform: uppercase;
}

/* ── Card "DISPONÍVEL" highlight badge (destaque do ADM) ─────────────────── */
.card-highlight-badge {
  position: absolute;
  bottom: .5rem;
  left: .5rem;
  right: .5rem;
  z-index: 2;
  padding: .28rem .5rem;
  border-radius: 8px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: center;
  background: linear-gradient(135deg, #ffb347, #ff7a18);
  color: #2a1400;
  box-shadow: 0 8px 18px rgba(255, 122, 24, .35);
}

.card.is-highlighted .card-cover {
  outline: 2px solid #ff7a18;
  outline-offset: 2px;
  box-shadow: 0 10px 28px rgba(255, 122, 24, .4);
}

/* ── Card progress label ─────────────────────────────────────────────────── */
.card-progress-label {
  font-size: .68rem;
  color: rgba(158,251,114,.78);
  font-weight: 600;
  margin-top: .18rem;
}

.continue-reading-card {
  cursor: pointer;
}

.continue-reading-card .card-sub,
.continue-reading-card .book-lib-pages {
  display: none;
}

.continue-reading-info {
  display: grid;
  gap: .28rem;
  margin-top: .42rem;
  padding: .62rem .68rem;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(158, 251, 114, .105), rgba(255, 255, 255, .035));
  border: 1px solid rgba(158, 251, 114, .16);
}

.continue-reading-info strong {
  color: rgba(244, 249, 240, .92);
  font-size: .78rem;
  line-height: 1.25;
  font-weight: 850;
}

.continue-reading-info span {
  width: max-content;
  max-width: 100%;
  color: #9efb72;
  font-size: .72rem;
  font-weight: 900;
}

.book-lib-card.continue-reading-card .continue-reading-info {
  margin-top: .58rem;
}

.book-lib-card.continue-reading-card .book-lib-progress {
  margin-top: .55rem;
}

.recent-updates-strip {
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: .15rem;
  scrollbar-width: none;
}

.recent-updates-strip::-webkit-scrollbar {
  display: none;
}

.recent-update-card {
  width: 156px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  scroll-snap-align: start;
}

.recent-update-card .card {
  width: 100%;
}

.recent-update-card .card-title {
  min-height: 2.22rem;
}

.recent-update-card .card-sub,
.recent-update-card .progress-bar,
.recent-update-card .card-progress-label {
  display: none;
}

.recent-update-card .card-cover .badge {
  left: .45rem;
  right: auto;
  z-index: 2;
  background: linear-gradient(135deg, #ff5263, #d92f41);
  color: #fff5f6;
  border: none;
  box-shadow: 0 8px 18px rgba(217, 47, 65, .24);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .01em;
  text-transform: none;
}

.recent-update-chapters {
  display: grid;
  gap: .35rem;
}

.recent-update-loading,
.recent-update-chapter {
  width: 100%;
  min-height: 30px;
  border-radius: 9px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.06);
}

.recent-update-loading {
  display: grid;
  place-items: center;
  padding: .45rem .5rem;
  color: var(--text3);
  font-size: .68rem;
  text-align: center;
}

.recent-update-chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .16rem .5rem;
  padding: .5rem .58rem;
  color: var(--text2);
  text-align: left;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.recent-update-chapter:hover {
  transform: translateY(-1px);
  background: rgba(158,251,114,.08);
  border-color: rgba(158,251,114,.18);
}

.recent-update-chapter span {
  min-width: 0;
  color: rgba(255, 251, 239, .92);
  font-size: .66rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-update-chapter small {
  color: var(--text3);
  font-size: .62rem;
  line-height: 1;
}

.recent-update-chapter strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  padding: .13rem .4rem;
  border-radius: 999px;
  background: rgba(217, 47, 65, .96);
  color: #fff5f6;
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .01em;
  text-transform: none;
}

/* ── Mobile spotlight tweaks ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .spotlight-shell {
    grid-template-columns: 1fr;
    padding: 1.4rem 1rem 1rem;
    min-height: 320px;
  }
  .spotlight-aside { display: none; }
  .spotlight-cover {
    width: 88px;
    height: 130px;
    left: 1rem;
    bottom: 1rem;
  }
  .spotlight-info {
    margin-left: calc(88px + .9rem);
  }
  .spotlight-title { font-size: 1.35rem; }
  .spotlight { min-height: 320px; }
  /* ── Mobile manga/comics spotlight — layout vertical ── */
  .spotlight-mount-manga .spotlight,
  .spotlight-mount-comics .spotlight {
    min-height: 420px;
  }
  .spotlight-mount-manga .spotlight-shell,
  .spotlight-mount-comics .spotlight-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 420px;
    padding: 2rem 1rem 1.5rem;
    gap: 0;
  }

  /* Capa: centralizada e mais alta */
  .spotlight-mount-manga .spotlight-cover,
  .spotlight-mount-comics .spotlight-cover {
    position: relative;
    left: auto; top: auto; bottom: auto;
    transform: none;
    width: 130px;
    height: 190px;
    margin: 0 auto 0;
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(0,0,0,.7);
  }

  /* Info: sobreposição na parte de baixo */
  .spotlight-mount-manga .spotlight-info,
  .spotlight-mount-comics .spotlight-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    margin-left: 0;
    max-width: 100%;
    padding: 2.5rem 1rem .85rem;
    background: linear-gradient(to top, rgba(0,0,0,.85) 60%, transparent);
  }

  .spotlight-mount-manga .spotlight-title,
  .spotlight-mount-comics .spotlight-title {
    font-size: 1.3rem;
  }

  /* Sinopse: mostra de forma compacta no mobile */
  .spotlight-mount-manga .spotlight-aside,
  .spotlight-mount-comics .spotlight-aside {
    display: none;
  }
}

/* ── h-scroll snap + mobile padding ─────────────────────────────────────── */
@media (max-width: 480px) {
  .section { margin-bottom: 1.6rem; }
  .section-title { font-size: .94rem; }
  .h-scroll { padding-bottom: .55rem; }
  .h-scroll > .book-lib-card { width: 118px; }
}

/* ── Spotlight melhorado ─────────────────────────────────────────────────── */
.spotlight-progress-wrap {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: .5rem 0 .75rem;
}
.spotlight-progress-bar {
  flex: 1;
  max-width: 160px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  overflow: hidden;
}
.spotlight-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-2), var(--green));
  border-radius: inherit;
}
.spotlight-progress-label {
  font-size: .72rem;
  color: rgba(158,251,114,.85);
  font-weight: 600;
  white-space: nowrap;
}
.spotlight-genres {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .6rem;
}
.spotlight-genre-pill {
  padding: .28rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text2);
}
.spotlight-collection {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: var(--text2);
  margin-top: .55rem;
}
.spotlight-status-pill {
  display: inline-block;
  margin-left: .45rem;
  padding: .14rem .52rem;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 700;
  background: rgba(114,219,98,.14);
  color: var(--green-2);
  border: 1px solid rgba(114,219,98,.2);
  vertical-align: middle;
}

/* ── Controle de acesso por área ─────────────────────────────────────────── */
.admin-user-areas {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .45rem;
}

.admin-area-pill {
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .04em;
  border: 1px solid transparent;
  cursor: default;
  transition: all .2s;
}

button.admin-area-pill {
  cursor: pointer;
}

.admin-area-pill.granted {
  background: rgba(114,219,98,.15);
  border-color: rgba(114,219,98,.3);
  color: var(--green-2);
}

.admin-area-pill.denied {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
  color: var(--text3);
  text-decoration: line-through;
  opacity: .6;
}

.admin-area-pill.full-access {
  background: rgba(114,219,98,.08);
  border-color: rgba(114,219,98,.15);
  color: rgba(158,251,114,.6);
}

button.admin-area-pill.granted:hover { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.35); color: #f87171; }
button.admin-area-pill.denied:hover  { background: rgba(114,219,98,.18); border-color: rgba(114,219,98,.35); color: var(--green-2); opacity: 1; text-decoration: none; }

/* ── Area checkboxes no form de criar usuário ────────────────────────────── */
.admin-areas-label {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.admin-area-checks {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.admin-area-check {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text2);
}

.admin-area-check input[type=checkbox] {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.admin-areas-hint {
  font-size: .7rem;
  color: var(--text3);
  margin-top: .1rem;
}

/* ── Admin: Livros em destaque (famous books) ────────────────────────────── */
.admin-famous-add {
  display: flex;
  gap: .65rem;
  margin-bottom: .75rem;
  align-items: center;
}

.admin-famous-input {
  flex: 1;
  padding: .6rem .9rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: var(--text);
  font-size: .88rem;
  outline: none;
}

.admin-famous-input:focus {
  border-color: rgba(114,219,98,.35);
  background: rgba(114,219,98,.05);
}

.admin-famous-add-btn {
  white-space: nowrap;
  padding: .58rem 1rem;
  font-size: .82rem;
  border-radius: 10px;
}

.admin-famous-hint {
  font-size: .76rem;
  color: var(--text3);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.admin-famous-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.admin-famous-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .65rem .28rem .75rem;
  border-radius: 999px;
  background: rgba(114,219,98,.1);
  border: 1px solid rgba(114,219,98,.22);
  color: var(--text2);
  font-size: .78rem;
  font-weight: 500;
}

.admin-famous-remove {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.1);
  color: var(--text3);
  font-size: .6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}

.admin-famous-remove:hover {
  background: rgba(239,68,68,.3);
  color: #f87171;
}


/* ── Area switcher bottom sheet ──────────────────────────────────────────── */
.area-sheet {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}
.area-sheet.hidden { display: none; }
.area-sheet.open   { pointer-events: all; }

.area-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  transition: opacity .25s ease;
}
.area-sheet.open .area-sheet-backdrop { opacity: 1; }

.area-sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  background: var(--bg2);
  border-radius: 20px 20px 0 0;
  padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -8px 32px rgba(0,0,0,.35);
}
.area-sheet.open .area-sheet-panel { transform: translateY(0); }

.area-sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,.18);
  border-radius: 2px;
  margin: 0 auto .9rem;
}

.area-sheet-title {
  text-align: center;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: .9rem;
}

.area-sheet-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.area-sheet-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
  width: 100%;
}
.area-sheet-item:active { background: rgba(255,255,255,.1); }
.area-sheet-item.active {
  background: rgba(114,219,98,.1);
  border-color: rgba(114,219,98,.28);
  color: var(--green-2);
}

.area-sheet-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  flex-shrink: 0;
}
.area-sheet-item.active .area-sheet-icon { background: rgba(114,219,98,.16); }
.area-sheet-label { flex: 1; text-align: left; }
.area-sheet-check { flex-shrink: 0; color: var(--green-2); }

/* Only for mobile — on desktop the header tabs handle switching */
@media (min-width: 769px) {
  .area-sheet { display: none !important; }
  .logo { cursor: default !important; }
}

@media (max-width: 768px) {
  /* Make header more compact on mobile */
  .header-inner { gap: .5rem; }
  .logo-subtitle { display: none; }
}

/* ── Mobile UX improvements ──────────────────────────────────────────────── */
/* Touch targets mínimos 44px para todos os botões interativos */
@media (pointer: coarse) {
  .book-lib-chip,
  .spotlight-dot,
  .area-tab,
  .lib-tab,
  .admin-area-pill,
  .admin-famous-remove,
  .mini-btn,
  .chapter-read-btn {
    min-height: 44px;
    min-width: 44px;
  }
  .spotlight-dot {
    min-width: 28px;
    min-height: 28px;
    padding: 6px;
    box-sizing: content-box;
  }
  .book-lib-chip {
    padding: .55rem .9rem;
  }
}

/* Spotlight cursor hint on mobile */
.spotlight-mount {
  touch-action: pan-y;
  user-select: none;
}

/* Series modal: smooth scroll inside on mobile */
#modalContent {
  overscroll-behavior: contain;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Better card touch feedback */
@media (hover: none) {
  .card:active,
  .book-lib-card:active,
  .digest-card:active {
    transform: scale(.97);
    transition: transform .12s;
  }
}

/* Toast on mobile — full width at bottom */
@media (max-width: 600px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + .75rem);
    width: auto;
  }
  .toast {
    width: 100%;
    text-align: center;
  }
}

/* Admin panel: scrollable on mobile */
@media (max-width: 600px) {
  .admin-panel-inner {
    max-height: 90vh;
    overflow-y: auto;
  }
  .admin-metrics-v2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
}

/* ── Spotlight 3-colunas ─────────────────────────────────────────────────── */
.spotlight-mount {
  margin-bottom: 1.6rem;
}

/* ── Fundo do strip ── */
.spotlight-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  padding: 2rem 2rem 1.6rem;
  background: linear-gradient(135deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.01) 100%);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  backdrop-filter: blur(6px);
}

/* ── Todos os itens iguais ── */
.spotlight-strip-item {
  flex: 1;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}

.spotlight-strip-item:hover {
  opacity: .85;
  transform: translateY(-3px);
}

.spotlight-strip-item .spotlight-strip-cover-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg3);
  box-shadow: 0 10px 28px rgba(0,0,0,.5);
}

/* Destaque sutil na capa ativa */
.spotlight-strip-item.active .spotlight-strip-cover-wrap {
  box-shadow: 0 14px 38px rgba(0,0,0,.6), 0 0 0 2px rgba(255,255,255,.14);
}

.spotlight-strip-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Título igual para todos */
.spotlight-strip-title {
  text-align: center;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.spotlight-strip-item.active .spotlight-strip-title {
  color: var(--text);
  font-weight: 700;
}

/* ── Sinopse abaixo do strip (modo livros) ── */
.spotlight-strip-info {
  text-align: center;
  padding: .85rem .5rem .2rem;
}
.spotlight-strip-info-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .15rem;
}
.spotlight-strip-info-author {
  font-size: .82rem;
  color: var(--accent);
  margin-bottom: .4rem;
}
.spotlight-strip-info-desc {
  font-size: .8rem;
  color: var(--text2);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .search-overlay {
    padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + .75rem) .85rem calc(1rem + env(safe-area-inset-bottom, 0px));
    gap: .7rem;
  }

  .search-box {
    padding: .72rem .8rem;
    border-radius: 14px;
  }

  .search-item {
    padding: .62rem .7rem;
    gap: .68rem;
  }

  .search-item img {
    width: 36px;
    height: 50px;
  }

  .spotlight-strip {
    gap: .5rem;
    padding: .85rem .6rem .7rem;
    border-radius: 14px;
  }
  .spotlight-strip-item { max-width: 88px; gap: .35rem; }
  .spotlight-strip-title { font-size: .64rem; }
  .spotlight-strip-info { padding: .5rem .35rem .1rem; }
  .spotlight-strip-info-title { font-size: .88rem; }
  .spotlight-strip-info-author { font-size: .74rem; margin-bottom: .25rem; }
  .spotlight-strip-info-desc { -webkit-line-clamp: 2; }
}

/* ── Paywall / Register modals ───────────────────────────────────────────── */
.paywall-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.paywall-modal.hidden { display: none; }

#registerModal {
  --register-accent: #72db62;
  --register-accent-2: #9cfb72;
  --register-accent-soft: rgba(114, 219, 98, 0.16);
  --register-accent-glow: rgba(86, 190, 92, 0.14);
  --register-accent-border: rgba(114, 219, 98, 0.2);
  --register-accent-ring: rgba(156, 251, 114, 0.08);
  --register-button-text: #101410;
}

#registerModal[data-area="books"] {
  --register-accent: #c79245;
  --register-accent-2: #e0b16d;
  --register-accent-soft: rgba(201, 146, 69, 0.16);
  --register-accent-glow: rgba(176, 122, 47, 0.14);
  --register-accent-border: rgba(201, 146, 69, 0.22);
  --register-accent-ring: rgba(224, 177, 109, 0.08);
  --register-button-text: #1a140c;
}

#registerModal[data-area="comics"] {
  --register-accent: #9b5cff;
  --register-accent-2: #63b7ff;
  --register-accent-soft: rgba(155, 92, 255, 0.18);
  --register-accent-glow: rgba(99, 183, 255, 0.14);
  --register-accent-border: rgba(155, 92, 255, 0.22);
  --register-accent-ring: rgba(99, 183, 255, 0.08);
  --register-button-text: #140f1b;
}

.paywall-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px);
}

.paywall-panel {
  position: relative; z-index: 1;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 2.5rem 2rem 2rem;
  max-width: 420px; width: 90%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  animation: paywall-in .25s ease;
}

#registerModal .paywall-panel {
  background:
    radial-gradient(circle at top left, var(--register-accent-soft), transparent 34%),
    radial-gradient(circle at bottom right, var(--register-accent-glow), transparent 36%),
    linear-gradient(180deg, rgba(16, 20, 26, 0.98), rgba(12, 15, 22, 0.98));
  border-color: var(--register-accent-border);
  box-shadow:
    0 24px 64px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.03);
}

#registerModal .paywall-panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 19px;
  border: 1px solid var(--register-accent-ring);
  pointer-events: none;
}
@keyframes paywall-in {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.paywall-panel-form { text-align: left; max-width: 460px; }

.paywall-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; color: var(--text2);
  font-size: 1.1rem; cursor: pointer; padding: .25rem .5rem;
  border-radius: 6px;
}
.paywall-close:hover { background: rgba(255,255,255,.08); }

.paywall-icon { font-size: 2.5rem; margin-bottom: .75rem; }

#registerModal .paywall-icon {
  filter: drop-shadow(0 0 18px var(--register-accent-soft));
}

.paywall-title {
  font-size: 1.35rem; font-weight: 800;
  color: var(--text); margin-bottom: .5rem;
}

#registerModal .paywall-title {
  text-shadow: 0 0 22px rgba(0,0,0,.18);
}

.paywall-subtitle {
  font-size: .9rem; color: var(--text2);
  line-height: 1.5; margin-bottom: 1.5rem;
}

.paywall-meta {
  font-size: .8rem; color: var(--text2);
  margin-bottom: 1.25rem;
}

.paywall-actions { display: flex; flex-direction: column; gap: .75rem; }

.paywall-btn-primary {
  width: 100%; padding: .85rem 1rem;
  background: var(--green-2); color: #111;
  border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: opacity .15s;
}

.paywall-btn-premium {
  background: linear-gradient(135deg, #f5e27d 0%, #f0b429 46%, #e8821a 100%);
  color: #07100a;
  box-shadow: 0 12px 28px rgba(240, 180, 41, .22);
}

#registerModal .paywall-btn-primary {
  background: linear-gradient(135deg, var(--register-accent), var(--register-accent-2));
  color: var(--register-button-text);
  box-shadow: 0 14px 28px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.04) inset;
}
.paywall-btn-primary:hover { opacity: .88; }

.paywall-btn-secondary {
  width: 100%; padding: .75rem 1rem;
  background: rgba(255,255,255,.07); color: var(--text);
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  font-size: .95rem; font-weight: 500;
  cursor: pointer; transition: background .15s;
}
.paywall-btn-secondary:hover { background: rgba(255,255,255,.12); }

.paywall-btn-primary:disabled,
.paywall-btn-secondary:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

.area-hub-card:focus-visible {
  outline: 2px solid var(--green-2);
  outline-offset: 3px;
}

.register-area-card:focus-visible,
.upgrade-plan-option:focus-visible .upgrade-plan-card {
  outline: 2px solid var(--green-2);
  outline-offset: 2px;
}

.pix-copy-btn.is-copied {
  background: rgba(114,219,98,.22);
  border-color: rgba(114,219,98,.5);
  color: var(--green-2);
}

/* ── PIX screen ── */
.pix-header {
  display: flex; align-items: center; gap: .6rem;
  justify-content: center; margin-bottom: .5rem;
}
.pix-instructions {
  text-align: center; color: var(--text2); font-size: .88rem; margin-bottom: 1rem;
}
.pix-qr-wrap {
  display: flex; justify-content: center; margin-bottom: 1rem;
}
.pix-qr-img {
  width: 200px; height: 200px; border-radius: 10px;
  border: 2px solid rgba(255,255,255,.1);
  background: #fff; padding: 6px;
}
.pix-copy-wrap {
  display: flex; gap: .5rem; margin-bottom: 1rem;
}
.pix-copy-input {
  flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; padding: .55rem .75rem; color: var(--text); font-size: .78rem;
  font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pix-copy-btn {
  flex: 0 0 auto; background: rgba(114,219,98,.15); border: 1px solid rgba(114,219,98,.3);
  border-radius: 8px; color: var(--green-2); font-size: .82rem; font-weight: 600;
  padding: .55rem .9rem; cursor: pointer; transition: background .15s;
}
.pix-copy-btn:hover { background: rgba(114,219,98,.25); }
.pix-status-wrap {
  display: flex; align-items: center; gap: .6rem;
  justify-content: center; margin-bottom: .75rem;
  font-size: .88rem; color: var(--text2);
}
.pix-spinner {
  width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--green-2); border-radius: 50%;
  animation: spin .8s linear infinite; flex: 0 0 auto;
}
.pix-status--success .pix-spinner { display: none; }
.pix-status--success { color: var(--green-2); font-weight: 600; }
.pix-status--success #pixStatusText::before { content: "✓ "; }
.pix-note {
  text-align: center; font-size: .78rem; color: var(--text2); margin-bottom: .5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.paywall-login-link {
  text-align: center; font-size: .85rem;
  color: var(--text2); margin-top: 1rem;
}
.paywall-link-btn {
  background: none; border: none; color: var(--green-2);
  cursor: pointer; font-size: .85rem; text-decoration: underline;
}

/* ── Formulário de cadastro ── */
.register-form { display: flex; flex-direction: column; gap: .85rem; }

.register-area-picker {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem;
  margin-bottom: .25rem;
}

.register-area-option input { display: none; }

.register-area-card {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .9rem .5rem;
  border: 2px solid rgba(255,255,255,.1);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: .78rem; color: var(--text2);
  user-select: none;
}
.register-area-card:hover { border-color: rgba(114,219,98,.4); }
.register-area-option input:checked + .register-area-card {
  border-color: var(--green-2);
  background: rgba(114,219,98,.1);
  color: var(--green-2);
}

#registerModal .register-area-card:hover {
  border-color: var(--register-accent-border);
  background: rgba(255,255,255,.03);
}

#registerModal .register-area-option input:checked + .register-area-card {
  border-color: var(--register-accent);
  background: var(--register-accent-soft);
  color: var(--register-accent-2);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.register-input {
  width: 100%; padding: .75rem 1rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; color: var(--text);
  font-size: .95rem; outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.register-input:focus { border-color: var(--green-2); }

#registerModal .register-input:focus {
  border-color: var(--register-accent);
  box-shadow: 0 0 0 3px var(--register-accent-ring);
}

#registerModal .password-visibility-toggle:hover,
#registerModal .password-visibility-toggle[aria-pressed="true"] {
  background: var(--register-accent-soft);
  border-color: var(--register-accent-border);
  color: var(--register-accent-2);
}

#registerModal .password-visibility-toggle:focus-visible {
  outline-color: var(--register-accent-2);
}

.register-msg {
  font-size: .82rem; min-height: 1.2em;
  color: var(--red); text-align: center;
}
.register-msg.ok { color: var(--green-2); }

#registerModal .register-msg.ok {
  color: var(--register-accent-2);
}

#registerModal .paywall-link-btn {
  color: var(--register-accent-2);
}

.maintenance-shell {
  min-height: calc(100dvh - 120px);
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.maintenance-card {
  width: min(680px, 100%);
  padding: clamp(1.35rem, 4vw, 2.4rem);
  border: 1px solid rgba(143, 232, 105, .2);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 0%, rgba(130, 255, 92, .14), transparent 34%),
    linear-gradient(145deg, rgba(16, 25, 18, .95), rgba(8, 10, 9, .96));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
  text-align: center;
}

.maintenance-kicker {
  display: inline-flex;
  margin-bottom: .8rem;
  padding: .4rem .75rem;
  border-radius: 999px;
  background: rgba(130, 255, 92, .1);
  color: var(--green-2);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.maintenance-card h1 {
  margin: 0 0 .65rem;
  color: var(--text);
  font-size: clamp(1.55rem, 7vw, 2.45rem);
  line-height: 1.05;
}

.maintenance-card p {
  margin: 0 auto;
  max-width: 520px;
  color: var(--text2);
  line-height: 1.55;
}

.maintenance-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1.25rem 0 1rem;
}

.maintenance-actions .area-hub-cta {
  min-width: 148px;
}

.maintenance-note {
  font-size: .86rem;
}

.maintenance-note a {
  color: var(--gold);
  font-weight: 800;
}

.paywall-panel-upgrade {
  max-width: 680px;
}

#upgradeModal .paywall-panel-upgrade {
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.upgrade-fast-strip {
  display: flex;
  justify-content: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin: .8rem 0 .15rem;
}

.upgrade-fast-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 .7rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 180, 41, .22);
  background: rgba(240, 180, 41, .08);
  color: rgba(255, 225, 150, .95);
  font-size: .74rem;
  font-weight: 850;
}

.upgrade-launch-note {
  margin: .65rem 0 .25rem;
  padding: .72rem .85rem;
  border-radius: 14px;
  border: 1px solid rgba(240, 180, 41, .18);
  background: rgba(240, 180, 41, .06);
  color: rgba(255, 231, 184, .84);
  font-size: .78rem;
  line-height: 1.45;
  text-align: center;
}

.upgrade-form {
  margin-top: .8rem;
}

.upgrade-subscription-summary {
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  color: var(--text2);
  font-size: .84rem;
  line-height: 1.45;
}

.upgrade-subscription-summary strong,
.upgrade-subscription-summary span,
.upgrade-subscription-summary small {
  display: block;
}

.upgrade-subscription-summary strong {
  color: var(--text);
  font-size: .98rem;
  margin-bottom: .2rem;
}

.upgrade-subscription-summary span {
  color: var(--green-2);
  font-weight: 800;
  font-size: .96rem;
  margin-bottom: .2rem;
}

.upgrade-subscription-summary small {
  color: var(--text2);
  font-size: .8rem;
}

.upgrade-preserve-note {
  margin: -.15rem 0 .9rem;
  color: var(--text2);
  font-size: .82rem;
  line-height: 1.5;
  text-align: center;
}

.upgrade-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
}

.upgrade-area-option input { display: none; }

.upgrade-plan-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  min-height: 118px;
  padding: 1rem .9rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text2);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.upgrade-plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: .1rem .5rem;
  border-radius: 999px;
  background: rgba(114, 219, 98, .12);
  color: #99f977;
  font-size: .7rem;
  font-weight: 800;
}

.upgrade-plan-card strong {
  color: var(--text);
  font-size: .98rem;
}

.upgrade-plan-price {
  color: #9cfb72;
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.12;
}

.upgrade-plan-note {
  color: rgba(237, 243, 235, .68);
  font-size: .72rem;
  line-height: 1.35;
}

.upgrade-plan-card small {
  font-size: .76rem;
  line-height: 1.45;
}

.upgrade-plan-card:hover {
  transform: translateY(-2px);
  border-color: rgba(114,219,98,.35);
}

.upgrade-plan-option {
  display: block;
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.upgrade-plan-option.is-selected .upgrade-plan-card {
  border-color: rgba(114, 219, 98, .58);
  background: rgba(114, 219, 98, .1);
  box-shadow: 0 12px 30px rgba(0,0,0,.18), 0 0 0 1px rgba(114,219,98,.16) inset;
}

.upgrade-area-picker {
  display: grid;
  gap: .85rem;
  padding: .95rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(114, 219, 98, .09), transparent 32%),
    rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.1);
}

.upgrade-area-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  font-size: .78rem;
  color: var(--text2);
}

.upgrade-area-head strong {
  color: var(--text);
  font-size: .9rem;
}

.upgrade-area-head span {
  flex: 0 0 auto;
  padding: .28rem .6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .72);
  font-weight: 750;
}

.upgrade-area-picker.is-complete .upgrade-area-head span {
  background: rgba(114, 219, 98, .12);
  color: var(--green-2);
}

.upgrade-area-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
}

.upgrade-area-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  min-height: 76px;
  padding: .8rem .85rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .035);
  color: var(--text2);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, color .16s ease;
}

.upgrade-area-card:hover {
  border-color: rgba(114, 219, 98, .32);
  background: rgba(114, 219, 98, .06);
}

.upgrade-area-option.is-disabled {
  cursor: default;
}

.upgrade-area-option.is-disabled .upgrade-area-card:hover {
  border-color: rgba(114, 219, 98, .2);
  background: rgba(114, 219, 98, .08);
  transform: none;
}

.upgrade-area-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  color: var(--gold);
  font-size: 1.15rem;
}

.upgrade-area-card-copy {
  display: grid;
  gap: .14rem;
  min-width: 0;
}

.upgrade-area-card-copy strong {
  color: var(--text);
  font-size: .88rem;
}

.upgrade-area-card-copy small {
  overflow: hidden;
  color: var(--text2);
  font-size: .72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upgrade-area-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  color: transparent;
  font-size: .82rem;
  font-weight: 900;
}

.upgrade-area-option input:checked + .upgrade-area-card {
  border-color: var(--green-2);
  background: rgba(114,219,98,.12);
  color: var(--green-2);
  box-shadow: 0 0 0 1px rgba(114, 219, 98, .16) inset;
}

.upgrade-area-option input:checked + .upgrade-area-card .upgrade-area-card-icon {
  background: rgba(114, 219, 98, .14);
  color: var(--green-2);
}

.upgrade-area-option input:checked + .upgrade-area-card .upgrade-area-check {
  border-color: rgba(114, 219, 98, .56);
  background: var(--green-2);
  color: #071009;
}

.upgrade-area-card.is-locked {
  border-color: rgba(114, 219, 98, .2);
  background: rgba(114, 219, 98, .08);
  cursor: default;
}

.upgrade-area-card.is-locked .upgrade-area-card-icon {
  background: rgba(114, 219, 98, .12);
  color: #9cfb72;
}

.upgrade-area-card.is-locked .upgrade-area-check {
  border-color: rgba(114, 219, 98, .42);
  background: rgba(114, 219, 98, .18);
  color: #a8ff83;
}

.upgrade-area-state {
  position: absolute;
  top: .55rem;
  right: .65rem;
  padding: .14rem .42rem;
  border-radius: 999px;
  background: rgba(114, 219, 98, .14);
  color: #a6ff7f;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .03em;
}

/* ── Tier badge no perfil ── */
.tier-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .55rem; border-radius: 20px;
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
}
.tier-badge.free    { background: rgba(255,255,255,.1); color: var(--text2); }
.tier-badge.premium { background: rgba(255,190,0,.15);  color: #ffc107; }

@media (max-width: 700px) {
  #upgradeModal {
    align-items: flex-end;
    justify-content: stretch;
  }

  #upgradeModal .paywall-backdrop {
    background: rgba(0, 0, 0, .78);
  }

  #upgradeModal .paywall-panel-upgrade {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 10px);
    border-radius: 22px 22px 0 0;
    padding: 1rem .95rem calc(1rem + env(safe-area-inset-bottom));
    text-align: left;
  }

  #upgradeModal .paywall-icon {
    display: none;
  }

  #upgradeModal .paywall-title {
    margin-bottom: .25rem;
    font-size: 1.2rem;
  }

  #upgradeModal .paywall-subtitle {
    margin-bottom: .65rem;
    font-size: .84rem;
  }

  #upgradeModal .support-contact {
    margin: .65rem 0;
    font-size: .76rem;
    line-height: 1.45;
  }

  .upgrade-fast-strip {
    justify-content: flex-start;
    gap: .35rem;
    margin: .55rem 0 0;
  }

  .upgrade-fast-strip span {
    min-height: 26px;
    padding: 0 .58rem;
    font-size: .68rem;
  }

  .upgrade-launch-note {
    margin: .55rem 0 .65rem;
    padding: .62rem .7rem;
    font-size: .74rem;
    text-align: left;
  }

  .upgrade-form {
    margin-top: .55rem;
    gap: .6rem;
  }

  .upgrade-plan-grid,
  .upgrade-area-grid {
    grid-template-columns: 1fr;
  }

  .upgrade-plan-card {
    min-height: 78px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .28rem .65rem;
    padding: .85rem .9rem;
    border-radius: 15px;
  }

  .upgrade-plan-card strong {
    font-size: .95rem;
  }

  .upgrade-plan-price {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    text-align: right;
    font-size: .95rem;
    max-width: 136px;
    line-height: 1.12;
  }

  .upgrade-plan-card small {
    grid-column: 1;
    font-size: .74rem;
  }

  .upgrade-area-picker {
    padding: .8rem;
    gap: .65rem;
  }

  .upgrade-area-grid {
    gap: .45rem;
  }

  .upgrade-area-card {
    min-height: 62px;
    padding: .7rem .75rem;
    border-radius: 15px;
  }

  .upgrade-area-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 1.02rem;
  }

  .upgrade-area-card-copy strong {
    font-size: .86rem;
  }

  .upgrade-area-card-copy small {
    font-size: .69rem;
  }

  .upgrade-area-head {
    flex-direction: row;
    align-items: center;
  }

  #upgradeEmail {
    min-height: 46px;
  }

  #upgradeModal .paywall-actions {
    position: sticky;
    bottom: calc(-1rem - env(safe-area-inset-bottom));
    z-index: 3;
    margin: .2rem -.95rem calc(-1rem - env(safe-area-inset-bottom));
    padding: .75rem .95rem calc(.85rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(17,18,17,0), rgba(17,18,17,.98) 18%);
  }
}

/* ── Admin: Destaques — book picker ──────────────────────────────────────── */
.admin-famous-search-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .6rem;
  padding: .5rem .75rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
}

.admin-famous-search-label svg { flex-shrink: 0; opacity: .5; }

.admin-famous-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
  min-height: 0;
}

.admin-famous-no-results {
  grid-column: 1 / -1;
  color: var(--text3);
  font-size: .82rem;
  padding: .5rem 0;
}

/* Result cards (search hits) */
.admin-famous-result-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  transition: transform .15s;
}
.admin-famous-result-card:hover { transform: translateY(-3px); }

.admin-famous-result-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg3);
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.admin-famous-result-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.admin-famous-result-add {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 300;
  color: #fff;
  background: rgba(114,219,98,.55);
  opacity: 0;
  transition: opacity .15s;
}
.admin-famous-result-card:hover .admin-famous-result-add { opacity: 1; }

.admin-famous-result-title {
  font-size: .72rem;
  color: var(--text2);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

/* Added books grid */
.admin-famous-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .75rem;
  margin-top: .5rem;
}

.admin-famous-book-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.admin-famous-book-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg3);
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  border: 1.5px solid rgba(114,219,98,.25);
}
.admin-famous-book-cover img { width:100%; height:100%; object-fit:cover; display:block; }

.admin-famous-book-remove {
  position: absolute;
  top: .3rem;
  right: .3rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(239,68,68,.85);
  color: #fff;
  font-size: .7rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s;
}
.admin-famous-book-card:hover .admin-famous-book-remove { opacity: 1; }

.admin-famous-book-title {
  font-size: .72rem;
  color: var(--text2);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

body.landing-mode #appHeader {
  background: rgba(7, 8, 7, 0.64);
}

body.landing-mode .header-inner {
  justify-content: center;
}

body.landing-mode .lib-tabs,
body.landing-mode .header-actions {
  display: none;
}

body.landing-mode .logo {
  margin: 0 auto;
}

body.landing-mode #mainContent {
  padding-top: calc(var(--header-h) + var(--safe-top) + .45rem);
}

body.landing-mode .login-shell,
body.landing-mode .area-hub-shell {
  min-height: calc(100vh - 122px);
  padding-top: 1rem;
}

@media (max-width: 768px) {
  body.landing-mode #mainContent {
    padding-top: calc(var(--header-h) + var(--safe-top) + .3rem);
  }

  body.landing-mode .area-hub-panel,
  body.landing-mode .login-card {
    border-radius: 22px;
  }

  body.landing-mode .header-inner {
    padding-left: .9rem;
    padding-right: .9rem;
  }
}

@media (max-width: 480px) {
  .area-hub-head h1 {
    font-size: 2rem;
  }

  .area-hub-head h2 {
    font-size: .98rem;
  }

  .area-hub-head p {
    font-size: .9rem;
  }

  .area-hub-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .area-hub-badge {
    white-space: normal;
  }

  .area-hub-offer {
    font-size: .82rem;
  }

  .login-shell {
    padding: .55rem 0 1.4rem;
  }

  .login-card {
    width: min(100%, 100%);
    padding: 1.2rem;
    border-radius: 22px;
  }

  .login-title {
    font-size: 1.72rem;
  }

  .login-copy {
    font-size: .9rem;
  }

  .login-actions {
    flex-direction: column;
  }

  .login-actions .btn-primary,
  .login-actions .btn-secondary {
    width: 100%;
  }

  .login-create-account,
  .login-support {
    font-size: .8rem;
  }

  .area-entry-panel {
    padding: 1rem .85rem .9rem;
  }

  .entry-trust-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: .42rem;
    margin-top: .75rem;
  }

  .entry-trust-list span {
    justify-content: center;
    min-height: 30px;
    font-size: .72rem;
  }

  .entry-choice-grid {
    grid-template-columns: 1fr 1fr;
    margin-top: 1rem;
    gap: .8rem;
  }

  .entry-choice-card--free {
    grid-column: 1 / -1;
  }

  .entry-choice-card {
    padding: 1rem;
    border-radius: 20px;
    gap: .8rem;
  }

  .entry-choice-card--premium,
  .entry-choice-card--login {
    padding: .85rem;
  }

  .entry-choice-copy h3 {
    font-size: 1.2rem;
  }

  .entry-choice-copy p {
    font-size: .88rem;
    line-height: 1.5;
  }

  .entry-choice-card--premium .entry-choice-copy p,
  .entry-choice-card--login .entry-choice-copy p {
    display: none;
  }

  .entry-choice-action {
    min-width: 0;
    min-height: 42px;
    padding: .65rem .55rem;
    font-size: .76rem;
  }

  .entry-stage-shell {
    margin-top: .9rem;
  }

  .entry-stage {
    padding: 1rem;
    border-radius: 20px;
  }

  .entry-stage-head h3 {
    font-size: 1.15rem;
  }

  .entry-area-card,
  .entry-plan-card {
    padding: 1rem .9rem;
    border-radius: 18px;
  }

  .entry-plan-area {
    min-height: 50px;
    border-radius: 14px;
  }

  .entry-catalog-proof {
    gap: .45rem;
    margin-top: .85rem;
  }

  .entry-proof-card {
    min-height: 74px;
    padding: .65rem .42rem;
    border-radius: 14px;
  }

  .entry-proof-card strong {
    font-size: 1.08rem;
  }

  .entry-proof-card span {
    font-size: .72rem;
    line-height: 1.24;
  }

  .area-hub-support-note {
    margin-top: .85rem;
    font-size: .78rem;
    line-height: 1.45;
  }
}

/* ═══ MOBILE FIXES (rodada de auditoria) ═══════════════════════════ */

/* ── Header: esconder scrollbar das abas ── */
.lib-tabs {
  scrollbar-width: none;
}
.lib-tabs::-webkit-scrollbar { display: none; }

/* ── Admin panel 480px: single-column ── */
@media (max-width: 480px) {
  .admin-panel {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 18px 18px 0 0;
    margin-top: auto;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    font-size: .78rem;
  }

  .admin-user-row {
    grid-template-columns: 1fr !important;
    gap: .6rem;
  }

  .admin-user-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .4rem;
  }

  .admin-user-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-metrics-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-summary-v2 {
    grid-template-columns: 1fr;
  }

  .admin-head {
    padding: .75rem;
  }

  .admin-content {
    padding: .75rem;
  }
}

/* ── Series meta: 1 coluna em 420px ── */
@media (max-width: 420px) {
  .series-meta-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Register area picker: 1 linha em mobile ── */
@media (max-width: 500px) {
  .register-area-picker {
    grid-template-columns: 1fr;
  }
  .register-area-card {
    padding: .65rem 1rem;
    min-height: 0;
    flex-direction: row;
    gap: .75rem;
  }
}

/* ── Modais: padding reduzido em telas pequenas ── */
@media (max-width: 420px) {
  .paywall-panel {
    padding: 1.5rem 1.1rem 1.2rem;
    border-radius: 18px;
  }

  .modal-panel {
    padding: 1.1rem;
  }

  .pix-qr-img {
    width: 160px;
    height: 160px;
  }

  .pix-copy-wrap {
    flex-direction: column;
  }

  .pix-copy-btn {
    width: 100%;
    text-align: center;
    padding: .65rem;
  }
}

/* ── Teclado virtual: evitar zoom em iOS ── */
@media (max-width: 600px) {
  #paywallModal,
  #registerModal {
    align-items: flex-end;
    justify-content: stretch;
  }

  #paywallModal .paywall-panel,
  #registerModal .paywall-panel {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 12px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-radius: 22px 22px 0 0;
    padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  #paywallModal .paywall-icon,
  #registerModal .paywall-icon {
    font-size: 1.9rem;
    margin-bottom: .45rem;
  }

  #paywallModal .paywall-subtitle,
  #registerModal .paywall-subtitle {
    margin-bottom: .9rem;
  }

  input, select, textarea {
    font-size: max(16px, 1rem);
  }
}

/* ── Area-hub-actions: garantir que botões não saiam da tela ── */
@media (max-width: 500px) {
  .area-hub-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .area-hub-cta {
    width: 100%;
    min-width: 0;
  }
}

/* ── Spotlight: cobertura em telas muito pequenas ── */
@media (max-width: 380px) {
  .spotlight-mount-books .spotlight-strip-item {
    width: 76px;
  }
  .spotlight-mount-books .spotlight-strip-cover {
    width: 76px;
    height: 112px;
  }
}

/* ── Livros mobile: primeira dobra mais compacta ───────────────────────── */
@media (max-width: 600px) {
  body[data-area="books"] .spotlight {
    min-height: 0;
    margin-bottom: 1rem;
  }

  body[data-area="books"] .spotlight-mount {
    margin-bottom: 1rem;
  }

  body[data-area="books"] .spotlight-strip {
    gap: .45rem;
    padding: .75rem .55rem .65rem;
  }

  body[data-area="books"] .spotlight-strip-item {
    max-width: 84px;
  }

  body[data-area="books"] .spotlight-strip-cover-wrap {
    border-radius: 10px;
  }

  body[data-area="books"] .spotlight-strip-info {
    padding-top: .45rem;
  }

  body[data-area="books"] .book-lib-header {
    margin-bottom: 1rem;
  }
}

/* ── Landscape mobile: altura máxima dos modais ── */
@media (max-height: 500px) and (orientation: landscape) {
  .paywall-modal .paywall-panel {
    max-height: 90dvh;
    overflow-y: auto;
  }
  .modal-panel {
    max-height: 90dvh;
    overflow-y: auto;
  }
}

/* Mobile performance: prioriza rolagem fluida em aparelhos mais fracos. */
@media (max-width: 768px) {
  html {
    scroll-behavior: auto;
  }

  body {
    overscroll-behavior-y: contain;
  }

  .fx-layer,
  .fx-particle,
  .fx-orb {
    display: none;
  }

  #appHeader,
  .paywall-backdrop,
  .paywall-panel,
  .modal-panel,
  .search-modal,
  .login-card,
  .area-hub-panel,
  .admin-panel,
  .admin-head {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .area-hub-cta::after,
  .area-hub-cta-primary::after,
  .area-hub-cta-premium::after,
  .area-hub-cta-login-green::after,
  .admin-tab-badge.is-active,
  .admin-badge.is-pulse,
  .top-series-card.rank-1,
  .top-series-card.rank-2,
  .top-series-card.rank-3 {
    animation: none !important;
  }

  .lib-tabs,
  .spotlight-strip,
  .book-lib-chips,
  .admin-tabs,
  .entry-payment-plans,
  .volume-strip {
    scroll-snap-type: none !important;
    -webkit-overflow-scrolling: touch;
  }

  .book-lib-section,
  .series-all-section,
  .series-section,
  .entry-catalog-proof,
  .admin-panel-page {
    content-visibility: auto;
    contain-intrinsic-size: 1px 620px;
  }

  .card,
  .book-lib-card,
  .volume-card,
  .entry-choice-card,
  .entry-plan-card,
  .entry-payment-plan,
  .area-hub-card,
  .admin-user-row,
  .admin-card,
  .metric-card {
    contain: layout paint style;
  }

  .card:hover,
  .entry-choice-card:hover,
  .entry-plan-card:hover,
  .entry-payment-plan:hover,
  .area-hub-card:hover,
  .book-lib-card:hover,
  .volume-card:hover {
    transform: none !important;
  }

  .spotlight-bg,
  .spotlight-card,
  .card-cover img,
  .book-lib-cover,
  .volume-cover {
    transition-duration: .08s !important;
  }

  .mobile-payment-cta,
  .paywall-panel,
  .modal-panel,
  .admin-panel {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
  }
}

/* ────────────────────────────────────────────────────────────────────────────
   PERFORMANCE MOBILE — desliga efeitos caros para evitar travamento de scroll
   em dispositivos com GPU fraca (Android barato, iPhone antigo).

   Critério: tela ≤ 768px OU touch sem hover (smartphone/tablet).
   Custo desses efeitos no mobile:
     - backdrop-filter: ~5-10ms por frame (mobile mid-tier)
     - filter: blur(20px+): ~3-8ms por frame
     - 17 animações infinitas em fundo: repaint constante
   ──────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  /* fx-layer (orbs e partículas) é puramente decorativo — esconde em mobile */
  .fx-layer {
    display: none !important;
  }

  /* backdrop-filter é o vilão #1 de scroll travado em mobile.
     Substitui por fundo sólido com alpha similar. */
  *,
  *::before,
  *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Reduz blur de filter (mantém efeito visual mas com custo aceitável) */
  .login-card,
  .modal-panel,
  .paywall-panel,
  .area-sheet-panel,
  .upgrade-modal-panel {
    filter: none;
  }

  /* ─────────────────────────────────────────────────────────────────────────
     CORREÇÃO DE GESTO/TOQUE (vilão #2 de scroll travado em mobile)
     touch-action: pan-x nos carrosseis fazia o browser sequestrar TODO gesto
     iniciado em cima deles como horizontal, bloqueando rolagem vertical da
     pagina. Tambem havia scroll-snap-type: x proximity que aumentava a sensacao
     de "tela presa".

     Solucao em mobile:
       - touch-action: pan-x pan-y → browser decide pelo angulo do gesto
       - scroll-snap-type: none → carrossel rola livre, sem snap forcado
       - touch-action: manipulation nos cards → remove delay 300ms do tap
       - overscroll-behavior-y: auto → rolagem natural do Android/Chrome
     ───────────────────────────────────────────────────────────────────────── */
  .h-scroll,
  .book-strip,
  .digest-strip,
  .top-series-strip {
    touch-action: pan-x pan-y !important;
    scroll-snap-type: none !important;
    overscroll-behavior-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Cards: touch-action: manipulation acelera tap (remove o delay 300ms) e
     evita que o card "pegue" o gesto antes do scroll responder */
  .card,
  .book-card,
  .digest-card,
  .top-series-card,
  .book-lib-card,
  .upgrade-plan-option,
  .register-area-option {
    touch-action: manipulation;
  }

  /* Body: overscroll-behavior-y: contain (definido em outro lugar) atrapalha
     o "bounce/pull-to-refresh" e o scroll continuo do Chrome Android.
     Em mobile, deixa default (auto). */
  body {
    overscroll-behavior-y: auto !important;
  }

  /* `transition: all` força o browser a observar TODA propriedade animável.
     No mobile, restringe pra apenas as 4 que importam visualmente. */
  .card,
  .book-card,
  .digest-card,
  .top-series-card,
  .book-lib-card,
  .upgrade-plan-option,
  .register-area-option,
  .admin-tab,
  .admin-user-row,
  .admin-mobile-bottom-nav button,
  .admin-billing-row,
  .admin-reading-row-v2,
  .mini-btn,
  .btn-primary,
  .btn-secondary,
  .inline-upgrade-btn {
    transition-property: transform, opacity, background-color, border-color !important;
    transition-duration: .15s !important;
    transition-timing-function: ease !important;
  }

  /* Animações infinitas decorativas: tira no mobile (mantém spinner que é funcional). */
  .top-series-card.rank-3,
  .admin-tab-badge.is-active,
  .admin-badge.is-pulse,
  .hub-cta-shine,
  .hub-cta-strip::after,
  .hub-cta-foot::after {
    animation: none !important;
  }

  /* Sombras pesadas em cards de lista é outra fonte de jank no scroll mobile. */
  .admin-user-row,
  .admin-billing-row,
  .admin-billing-event,
  .admin-reading-row-v2,
  .admin-lb-row,
  .admin-login-row,
  .admin-card,
  .admin-metric-card {
    box-shadow: none !important;
  }
}

/* Em scroll ativo, pausa animações decorativas para liberar GPU.
   JavaScript adiciona/remove a classe `is-scrolling` no body. */
body.is-scrolling .fx-orb,
body.is-scrolling .fx-particle {
  animation-play-state: paused !important;
}

/* Containers de listagem grandes ganham contain para isolar repaints
   (browser não recalcula layout do mundo inteiro a cada scroll dentro). */
.lib-grid,
.book-list-grid,
.area-library-shell,
#mainContent {
  contain: layout style;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  /* Reduced-motion também desliga fx-layer (acessibilidade + bateria) */
  .fx-layer {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .modal {
    align-items: flex-end;
  }

  .modal-panel {
    width: 100%;
    max-height: calc(100dvh - 46px);
    border-radius: 24px 24px 0 0;
  }

  .series-shell-book {
    padding: 1rem .95rem calc(1rem + env(safe-area-inset-bottom));
  }

  .series-shell-book .series-hero {
    /* Capa um pouco maior (114px) e gap menor — reduz o "espaço vazio" ao
       lado da capa quando o título do livro é curto. */
    grid-template-columns: 114px minmax(0, 1fr);
    gap: .7rem .8rem;
    align-items: start;
  }

  .series-shell-book .series-cover-wrap {
    grid-column: 1;
    grid-row: 1 / span 5;
  }

  .series-shell-book .series-cover {
    width: 110px;
    border-radius: 13px;
  }

  /* Título com line-clamp pra não estourar a altura quando for muito longo
     (ex: "depressão é uma doença real! E outras oito..." inteiro). */
  .series-shell-book .series-info h2 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }


  .series-shell-book .series-cover-glow {
    left: 8px;
    right: 8px;
    bottom: -6px;
    height: 18px;
    filter: blur(12px);
  }

  .series-shell-book .series-info {
    display: contents;
  }

  .series-shell-book .series-kicker,
  .series-shell-book .series-info h2,
  .series-shell-book .series-badges,
  .series-shell-book .series-meta-inline-row {
    grid-column: 2;
  }

  /* Sinopse: full-width sempre — aproveita o espaço embaixo da capa
     ao invés de ficar presa em "grid-column: 2". */
  .series-shell-book .series-desc {
    grid-column: 1 / -1;
    margin-top: .35rem;
  }

  .series-shell-book .series-kicker {
    font-size: .62rem;
    letter-spacing: .14em;
  }

  .series-shell-book .series-info h2 {
    font-size: 1.18rem;
    line-height: 1.08;
  }

  .series-shell-book .series-badges {
    gap: .26rem;
  }

  .series-shell-book .badge-pill {
    padding: .2rem .48rem;
    font-size: .66rem;
  }

  .series-shell-book .series-meta-inline-row {
    gap: .32rem;
  }

  .series-shell-book .series-meta-inline {
    padding: .28rem .5rem;
    font-size: .69rem;
  }

  .series-shell-book .series-desc {
    font-size: .82rem;
    line-height: 1.6;
    -webkit-line-clamp: 4;
    /* Texto justificado pra eliminar bordas direitas irregulares (ragged).
       hyphens: auto quebra palavras longas pra evitar "rios" de espaço. */
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    padding: 0 .1rem;
  }

  .series-shell-book .series-meta-grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    margin-top: .1rem;
  }

  .series-shell-book .meta-card {
    padding: .5rem .6rem;
    border-radius: 11px;
  }

  .series-shell-book .meta-label {
    font-size: .58rem;
  }

  .series-shell-book .meta-value {
    font-size: .84rem;
  }

  .series-shell-book .series-actions {
    padding: .6rem 0 .55rem;
    gap: .45rem;
  }

  /* Autor + Coleção: comprimir pra caber numa linha só, com ellipsis. */
  .series-shell-book .series-meta-inline {
    padding: .22rem .48rem;
    font-size: .66rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .series-shell-book .chapters-list {
    padding-top: .75rem;
  }
}

/* Meruem mobile polish */
body.ui-overlay-open .fx-layer,
body.ui-overlay-open .fx-particle,
body.ui-overlay-open .fx-orb {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity .14s ease, visibility .14s ease;
}

.chapter-main {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
  flex: 1;
}

.chapter-name.is-muted {
  display: none;
}

@media (max-width: 720px) {
  .admin-panel {
    width: 100vw !important;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh !important;
    margin: 0;
    border-radius: 0 !important;
    border-left: none;
    border-right: none;
    border-bottom: none;
    overflow: hidden;
    background:
      linear-gradient(180deg, rgba(16, 20, 17, 0.995), rgba(9, 11, 10, 0.992)) !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 56px rgba(0, 0, 0, 0.46);
  }

  .admin-head {
    top: 0;
    padding: calc(.85rem + env(safe-area-inset-top, 0px)) 1rem .8rem;
    background: rgba(11, 14, 12, 0.985) !important;
  }

  .admin-content {
    padding: .9rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
  }

  .admin-toolbar,
  .admin-panel-page,
  .admin-summary-block,
  .admin-section,
  .admin-rank-card,
  .admin-reading-grid,
  .admin-users-table {
    min-width: 0;
    overflow-x: hidden;
  }

  .admin-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: .45rem;
    padding: .1rem 0 .2rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .admin-tab {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 .78rem;
    font-size: .74rem;
    border-color: rgba(255, 255, 255, 0.11);
    background: rgba(255, 255, 255, 0.05);
  }

  .admin-tab.active {
    box-shadow: inset 0 0 0 1px rgba(158, 251, 114, 0.16);
  }

  .admin-tab-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 .32rem;
    font-size: .62rem;
  }

  .admin-metrics,
  .admin-metrics-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .7rem;
  }

  .admin-card,
  .admin-metric-card,
  .admin-summary-block,
  .admin-section,
  .admin-rank-card,
  .admin-users-table .admin-user-row,
  .admin-reading-row-v2,
  .admin-billing-row,
  .admin-billing-event,
  .admin-billing-check,
  .admin-login-row,
  .admin-lb-row {
    background: rgba(14, 17, 15, 0.94) !important;
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: none;
  }

  .admin-user-row,
  .admin-users-table .admin-user-row,
  .admin-reading-row,
  .admin-reading-row-v2,
  .admin-billing-row,
  .admin-billing-event,
  .admin-billing-check {
    grid-template-columns: 1fr !important;
    align-items: stretch;
  }

  .admin-user-actions {
    justify-content: flex-start !important;
    align-items: flex-start;
  }

  .admin-actions-menu,
  .admin-actions-menu summary {
    width: 100%;
  }

  .admin-actions-popover {
    position: static !important;
    top: auto;
    right: auto;
    min-width: 0;
    margin-top: .45rem;
  }

  .admin-user-pills,
  .admin-inline-badges,
  .admin-user-areas,
  .admin-area-checks {
    flex-wrap: wrap;
  }

  .admin-user-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-summary-v2,
  .admin-ranking-grid,
  .admin-billing-layout {
    grid-template-columns: 1fr !important;
  }

  .admin-billing-check span {
    grid-row: auto;
    justify-self: flex-start;
  }

  .admin-reading-grid {
    grid-template-columns: 1fr;
  }

  .chapters-head {
    align-items: flex-start;
    gap: .65rem;
  }

  .chapters-filter-btn {
    min-height: 34px;
    padding: .35rem .68rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text2);
    box-shadow: none;
  }

  .chapter-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .32rem .75rem;
    padding: .82rem .85rem;
    border-radius: 16px;
  }

  .chapter-main {
    display: grid;
    gap: .18rem;
  }

  .chapter-num {
    min-width: 0;
    font-size: .96rem;
    font-weight: 800;
    color: rgba(242, 248, 238, 0.96);
  }

  .chapter-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .chapter-name strong {
    white-space: normal;
    font-size: .8rem;
    line-height: 1.35;
  }

  .chapter-name small {
    margin-top: .08rem;
    font-size: .68rem;
  }

  .chapter-meta {
    grid-column: 1;
    justify-content: flex-start;
    flex-wrap: wrap;
    min-width: 0;
    gap: .35rem .5rem;
  }

  .chapter-date {
    font-size: .68rem;
  }

  .chapter-progress {
    min-width: 0;
  }

  .chapter-read-btn {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    width: 44px;
    height: 44px;
  }

  .h-scroll,
  .book-strip,
  .digest-strip,
  .top-series-strip,
  .recent-updates-strip {
    gap: .75rem;
    padding-inline: .1rem;
    padding-bottom: .35rem;
    scroll-padding-inline: .1rem;
    scroll-snap-type: x proximity !important;
  }

  .card {
    width: 132px;
  }

  .book-card {
    width: 150px;
  }

  .digest-card {
    width: 128px;
  }

  .recent-update-card {
    width: 144px;
  }

  body.cards-compact .card {
    width: 118px;
  }

  body.cards-compact .digest-card {
    width: 120px;
  }

  .recent-update-chapters {
    gap: .3rem;
  }

  .recent-update-chapter {
    min-height: 0;
    padding: .38rem .45rem;
    border-radius: 11px;
    gap: .12rem .35rem;
  }

  .recent-update-chapter span {
    font-size: .66rem;
  }

  .recent-update-chapter small {
    font-size: .6rem;
  }

  .recent-update-chapter strong {
    padding: .08rem .3rem;
    font-size: .55rem;
  }
}

@media (max-width: 560px) {
  .header-inner {
    gap: .55rem;
    padding: 0 .75rem;
  }

  .logo {
    gap: .45rem;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .logo-copy {
    display: none !important;
  }

  .lib-tabs {
    gap: .35rem;
    min-width: 0;
  }

  .library-tabs {
    padding-left: .35rem;
  }

  .area-tab,
  .lib-tab {
    padding: .38rem .62rem;
    font-size: .74rem;
  }

  .header-actions {
    gap: .25rem;
    min-width: 0;
  }

  .header-chip {
    height: 36px;
    padding: 0 .62rem;
    font-size: .72rem;
  }

  .header-user-chip {
    padding-left: .35rem;
    padding-right: .38rem;
  }

  .header-user-chip .user-chip-name {
    display: none;
  }

  .user-chip-avatar {
    width: 26px;
    height: 26px;
  }

  .header-install-chip {
    padding: 0 .5rem;
  }

  .header-upgrade-chip {
    min-height: 36px;
    padding: 0 .62rem;
  }

  .header-upgrade-chip-label {
    display: none;
  }

  .header-upgrade-chip-label-short {
    display: inline;
  }

  .modal-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 22px 22px 0 0;
  }

  .series-shell {
    padding: 1rem .95rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .series-hero {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: .75rem .85rem;
  }

  .series-cover {
    width: 96px;
    border-radius: 12px;
  }

  .series-actions {
    gap: .55rem;
  }

  .series-actions .btn-primary {
    min-width: 0;
  }

  .card {
    width: 122px;
  }

  .book-card {
    width: 140px;
  }

  .digest-card {
    width: 118px;
  }

  .recent-update-card {
    width: 132px;
  }
}

@media (max-width: 420px) {
  .admin-metrics,
  .admin-metrics-v2,
  .admin-user-meta {
    grid-template-columns: 1fr !important;
  }

  .admin-content {
    padding-left: .85rem;
    padding-right: .85rem;
  }

  .admin-tab {
    padding: 0 .72rem;
    font-size: .72rem;
  }

  .header-inner {
    padding: 0 .65rem;
  }

  .header-chip {
    padding: 0 .56rem;
    font-size: .7rem;
  }

  .header-install-chip {
    display: none !important;
  }

  .card {
    width: 112px;
  }

  .book-card {
    width: 128px;
  }

  .digest-card {
    width: 110px;
  }

  .recent-update-card {
    width: 120px;
  }

  .recent-update-chapter {
    padding: .36rem .42rem;
  }
}

/* Support center */
.support-bell-btn {
  position: relative;
}

.support-bell-badge {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #98f06f, #4dc867);
  color: #081008;
  font-size: .68rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(84, 214, 110, .3);
}

.support-modal-panel,
.support-inbox-panel {
  max-width: 720px;
}

.header-chip-badge {
  margin-left: .18rem;
}

.support-form select,
.support-form textarea,
.admin-support-note-input,
.admin-support-composer textarea,
.admin-support-composer input,
.admin-support-composer select,
.admin-support-filters input,
.admin-support-filters select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(30, 34, 30, .96), rgba(18, 21, 18, .98));
  color: var(--text);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.support-form select,
.admin-support-composer input,
.admin-support-composer select,
.admin-support-filters input,
.admin-support-filters select {
  min-height: 46px;
  padding: 0 .92rem;
}

.support-form textarea {
  min-height: 132px;
  resize: vertical;
  padding: .95rem 1rem;
  line-height: 1.62;
}

.support-form textarea::placeholder,
.admin-support-note-input::placeholder,
.admin-support-composer textarea::placeholder,
.admin-support-composer input::placeholder,
.admin-support-filters input::placeholder {
  color: rgba(203, 213, 199, .48);
}

.support-form select:focus,
.support-form textarea:focus,
.admin-support-note-input:focus,
.admin-support-composer textarea:focus,
.admin-support-composer input:focus,
.admin-support-composer select:focus,
.admin-support-filters input:focus,
.admin-support-filters select:focus {
  outline: none;
  border-color: rgba(126, 216, 80, .34);
  box-shadow: 0 0 0 3px rgba(126, 216, 80, .12);
}

.support-report-meta,
.support-login-hint {
  margin: 0;
  font-size: .87rem;
  color: var(--text2);
}

.support-login-hint {
  color: #b8d8a9;
}

.support-inbox-head {
  margin-bottom: 1rem;
}

.support-inbox-head.notif-inbox-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.notif-inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.inbox-tabs {
  display: flex;
  gap: .4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.inbox-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1rem;
  border: none;
  background: none;
  color: var(--text2);
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.inbox-tab-btn:hover {
  color: var(--text);
}

.inbox-tab-btn.is-active {
  color: var(--text);
  border-bottom-color: #7ed850;
}

.push-cta {
  display: flex !important;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  margin-bottom: .9rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(126, 216, 80, .14), rgba(126, 216, 80, .04));
  border: 1px solid rgba(126, 216, 80, .28);
  cursor: pointer;
}

.push-cta-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.push-cta-copy {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  flex: 1;
}

.push-cta-copy strong {
  font-size: .92rem;
}

.push-cta-copy small {
  color: var(--text2);
  font-size: .78rem;
}

.push-cta input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.inbox-tab-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #98f06f, #4dc867);
  color: #081008;
  font-size: .68rem;
  font-weight: 800;
}

.notif-prefs-panel {
  display: grid;
  gap: .6rem;
  margin-bottom: 1rem;
  padding: .9rem;
  border: 1px solid rgba(126, 216, 80, .14);
  border-radius: 16px;
  background: rgba(13, 18, 15, .82);
}

.support-inbox-list {
  display: grid;
  gap: .85rem;
}

.support-empty {
  padding: 1rem;
  border: 1px solid rgba(126, 216, 80, .12);
  border-radius: 16px;
  background: rgba(14, 19, 15, .78);
  color: var(--text2);
}

.support-message-card {
  padding: 1rem 1rem .95rem;
  border-radius: 18px;
  border: 1px solid rgba(126, 216, 80, .14);
  background: rgba(13, 18, 15, .92);
  display: grid;
  gap: .7rem;
}

.support-message-card.is-unread {
  border-color: rgba(126, 216, 80, .34);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
}

.support-message-card.is-important {
  border-color: rgba(255, 195, 92, .26);
  background:
    linear-gradient(180deg, rgba(255, 195, 92, .075), rgba(255, 255, 255, .026)),
    rgba(10, 13, 12, .96);
}

.support-message-head,
.support-message-meta,
.support-message-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.support-message-head strong {
  display: block;
  margin-top: .18rem;
}

.support-message-type {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .52rem;
  border-radius: 999px;
  background: rgba(126, 216, 80, .14);
  color: #bff0a8;
  font-size: .72rem;
  font-weight: 700;
}

.support-message-date,
.support-message-meta {
  color: var(--text2);
  font-size: .82rem;
}

.support-message-body {
  margin: 0;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

.support-surface-stack {
  display: grid;
  gap: .7rem;
  margin-bottom: .85rem;
}

.support-surface-banner {
  padding: .9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(126, 216, 80, .18);
  background: linear-gradient(180deg, rgba(18, 28, 20, .96), rgba(10, 15, 11, .96));
}

.support-surface-banner strong,
.support-surface-banner p {
  display: block;
}

.support-surface-kicker {
  display: inline-flex;
  margin-bottom: .35rem;
  color: #9de77b;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.support-surface-banner p {
  margin: .35rem 0 0;
  color: var(--text2);
  line-height: 1.55;
}

.support-action-pill {
  min-width: 0;
}

.admin-support-shell,
.admin-notice-shell {
  display: grid;
  gap: 1.15rem;
}

.admin-ticket-list-panel,
.admin-ticket-detail-panel,
.admin-ticket-actions-panel,
.admin-support-composer,
.admin-notice-list {
  border: 1px solid rgba(126, 216, 80, .1);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.01)),
    rgba(8, 12, 11, .96);
  padding: 1.08rem;
  box-shadow: 0 22px 48px rgba(0, 0, 0, .2);
}

.admin-ticket-board {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(250px, .9fr) minmax(0, 1.18fr) minmax(280px, .8fr);
  align-items: start;
}

.admin-ticket-list,
.admin-support-delivery,
.admin-support-scope {
  display: grid;
  gap: .75rem;
}

/* ── Picker de obra (com capa) no composer de avisos ─────────────────────── */
.admin-series-picker-field {
  position: relative;
}

.admin-series-picker-results {
  position: static;
  margin-top: .35rem;
  max-height: 280px;
  overflow-y: auto;
  display: grid;
  gap: .25rem;
  padding: .4rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: #1b2419;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .5);
}

.admin-series-picker-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .4rem .5rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-series-picker-item:hover,
.admin-series-picker-item:focus-visible {
  background: rgba(255, 255, 255, .06);
}

.admin-series-picker-item img {
  width: 32px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
}

.admin-series-picker-item span {
  display: grid;
  gap: .12rem;
  min-width: 0;
}

.admin-series-picker-item strong {
  font-size: .82rem;
  color: #f4f7f2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-series-picker-item small {
  font-size: .7rem;
  color: rgba(209, 216, 205, .6);
}

.admin-series-picker-empty {
  padding: .6rem;
  font-size: .8rem;
  color: rgba(209, 216, 205, .6);
  text-align: center;
}

.admin-series-picker-selected {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .7rem;
  border-radius: 12px;
  border: 1px solid rgba(127, 227, 95, .25);
  background: rgba(127, 227, 95, .08);
}

.admin-series-picker-selected img {
  width: 36px;
  height: 50px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
}

.admin-series-picker-selected-title {
  flex: 1;
  min-width: 0;
  font-size: .85rem;
  font-weight: 700;
  color: #f4f7f2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-support-filters {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.admin-ticket-list {
  max-height: 68dvh;
  overflow: auto;
  padding-right: .2rem;
}

.admin-ticket-list-item {
  width: 100%;
  text-align: left;
  padding: .95rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.055);
  background: linear-gradient(180deg, rgba(18, 24, 20, .92), rgba(11, 16, 13, .98));
  color: inherit;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.admin-ticket-list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(114, 219, 98, .18);
}

.admin-ticket-list-item.is-active {
  border-color: rgba(114, 219, 98, .28);
  background: linear-gradient(180deg, rgba(18, 31, 22, .96), rgba(9, 15, 12, .98));
  box-shadow: inset 0 0 0 1px rgba(114, 219, 98, .08);
}

.admin-ticket-list-top,
.admin-ticket-detail-head,
.admin-notice-head,
.admin-notice-actions,
.admin-support-actions,
.admin-notice-meta,
.admin-ticket-quick-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.admin-ticket-list-top strong,
.admin-ticket-detail-head h3,
.admin-notice-head strong {
  display: block;
  color: #f0f6ec;
}

.admin-ticket-list-top span,
.admin-ticket-list-middle,
.admin-ticket-list-bottom,
.admin-ticket-detail-head p,
.admin-ticket-detail-label,
.admin-ticket-meta-strip,
.admin-ticket-quick-meta span,
.admin-notice-meta span {
  color: rgba(222, 232, 217, .7);
}

.admin-ticket-list-top span,
.admin-ticket-list-bottom,
.admin-notice-meta span {
  font-size: .74rem;
}

.admin-ticket-list-middle {
  margin-top: .45rem;
  color: #eef5ea;
  font-size: .88rem;
  font-weight: 700;
}

.admin-ticket-list-bottom {
  margin-top: .42rem;
}

.admin-ticket-detail-card,
.admin-ticket-actions-card {
  display: none;
}

.admin-ticket-detail-card.is-active,
.admin-ticket-actions-card.is-active {
  display: grid;
  gap: 1rem;
}

.admin-ticket-back {
  display: none;
}

.admin-ticket-kicker {
  display: inline-block;
  margin-bottom: .2rem;
  color: #90e76f;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-ticket-detail-head h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.15;
}

.admin-ticket-detail-head p {
  margin: .3rem 0 0;
}

.admin-ticket-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.admin-ticket-detail-section,
.admin-ticket-message-block,
.admin-ticket-quick-meta > div {
  padding: .9rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.05);
  background: rgba(255,255,255,.025);
}

.admin-ticket-detail-label {
  display: block;
  margin-bottom: .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.admin-ticket-detail-section strong,
.admin-ticket-quick-meta strong {
  color: #f0f6ec;
  font-size: .92rem;
}

.admin-ticket-message-block p,
.admin-notice-message {
  margin: 0;
  color: #eef5ea;
  line-height: 1.6;
  white-space: pre-wrap;
}

.admin-ticket-meta-strip {
  padding: .75rem .85rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.045);
  background: rgba(255,255,255,.018);
  font-size: .78rem;
  word-break: break-word;
}

.admin-ticket-field,
.admin-support-composer > label,
.admin-support-composer-grid label {
  display: grid;
  gap: .42rem;
}

.admin-ticket-field > span {
  color: rgba(222, 232, 217, .74);
  font-size: .78rem;
  font-weight: 700;
}

.admin-ticket-actions-buttons,
.admin-support-actions,
.admin-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.admin-ticket-actions-buttons .btn-primary,
.admin-ticket-actions-buttons .btn-secondary {
  min-height: 42px;
}

.admin-ticket-quick-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-notice-shell {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: start;
}

/* ── Subtabs da aba Avisos ──────────────────────────────────────────────── */
.admin-notice-subtabs {
  display: flex;
  gap: .35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding-bottom: .15rem;
  flex-wrap: wrap;
}
.admin-notice-subtab {
  padding: .55rem 1rem;
  background: transparent;
  color: var(--text2);
  font-size: .88rem;
  font-weight: 700;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: color var(--trans), border-color var(--trans), background var(--trans);
}
.admin-notice-subtab:hover { color: var(--text); }
.admin-notice-subtab.is-active {
  color: var(--green-2);
  border-bottom-color: var(--green-2);
  background: rgba(126, 217, 87, .06);
}
.admin-notice-subpanel.hidden { display: none; }

/* ── Editor de boas-vindas ──────────────────────────────────────────────── */
.admin-welcome-editor {
  padding: 1.25rem;
  border: 1px solid rgba(126, 217, 87, .25);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(126, 217, 87, .04), rgba(255, 255, 255, .01));
}
.admin-welcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: .8rem;
}
.admin-welcome-card {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.admin-welcome-card legend {
  padding: 0 .45rem;
  font-size: .82rem;
  font-weight: 800;
  color: var(--green-2);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.admin-welcome-card label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .78rem;
  color: var(--text2);
  font-weight: 600;
}
.admin-welcome-card input[type="text"],
.admin-welcome-card textarea {
  padding: .68rem .82rem;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: .88rem;
  outline: none;
  resize: vertical;
}
.admin-welcome-card input:focus,
.admin-welcome-card textarea:focus {
  border-color: rgba(114, 219, 98, .45);
}
.admin-welcome-toggle {
  flex-direction: row !important;
  align-items: center;
  gap: .5rem !important;
}
.admin-welcome-toggle input { width: 18px; height: 18px; }
.admin-welcome-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.mini-btn.is-success {
  background: rgba(126, 217, 87, .15);
  border-color: rgba(126, 217, 87, .35);
  color: var(--green-2);
}
.mini-btn.is-success:hover {
  background: rgba(126, 217, 87, .25);
}

.admin-notice-list {
  display: grid;
  gap: .85rem;
}

.admin-notice-row {
  display: grid;
  gap: .8rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.055);
  background: linear-gradient(180deg, rgba(18, 24, 20, .92), rgba(11, 16, 13, .98));
}

.admin-notice-message {
  padding: .85rem .95rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.04);
  background: rgba(255,255,255,.024);
}

.admin-support-note-input,
.admin-ticket-actions-card textarea,
.admin-ticket-actions-card select,
.admin-support-composer textarea,
.admin-support-composer input,
.admin-support-composer select,
.admin-support-filters input,
.admin-support-filters select {
  color-scheme: dark;
}

.admin-support-note-input,
.admin-ticket-actions-card textarea,
.admin-support-composer textarea {
  min-height: 110px;
  resize: vertical;
  padding: .88rem .95rem;
  line-height: 1.6;
}

.admin-support-composer {
  display: grid;
  gap: 1rem;
}

.admin-support-composer-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-support-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}

.admin-support-route-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  padding: .9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(126, 216, 80, .18);
  background:
    linear-gradient(135deg, rgba(126, 216, 80, .1), rgba(82, 132, 255, .06)),
    rgba(255, 255, 255, .025);
}

.admin-support-route-card strong,
.admin-support-route-card small {
  display: block;
}

.admin-support-route-card strong {
  color: #f4f7f2;
  font-size: .9rem;
}

.admin-support-route-card small {
  margin-top: .18rem;
  color: rgba(209, 216, 205, .68);
  line-height: 1.45;
}

.admin-support-active-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
  color: #bfffa9;
  font-size: .82rem;
  font-weight: 800;
}

.admin-support-active-toggle input {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  accent-color: #7fe35f;
}

.admin-support-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: .72rem;
  padding: .78rem .9rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .03);
  color: #dce8d7;
  min-height: 56px;
}

.admin-support-check input {
  margin-top: .12rem;
  accent-color: #7fe35f;
}

.admin-support-check span {
  display: grid;
  gap: .18rem;
  min-width: 0;
}

.admin-support-check strong {
  color: #f4f7f2;
  font-size: .88rem;
  line-height: 1.2;
}

.admin-support-check small {
  color: rgba(209, 216, 205, .6);
  line-height: 1.45;
}

.admin-support-status {
  display: inline-flex;
  align-items: center;
  padding: .28rem .62rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  background: rgba(210, 74, 74, .12);
  color: #ffb0b0;
}

.admin-support-status.is-open {
  background: rgba(210, 74, 74, .12);
  color: #ffb0b0;
}

.admin-support-status.is-in_review,
.admin-support-status.is-needs_details {
  background: rgba(255, 195, 92, .14);
  color: #ffd699;
}

.admin-support-status.is-fixed {
  background: rgba(85, 214, 108, .16);
  color: #c5f8b0;
}

.admin-support-status.is-not_found {
  background: rgba(121, 172, 255, .14);
  color: #bdd8ff;
}

.admin-ticket-list-panel .admin-section-head,
.admin-ticket-actions-card .admin-section-head,
.admin-support-composer .admin-section-head,
.admin-notice-list .admin-section-head {
  margin-bottom: .95rem;
}

.series-reader-preset-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  margin: 0 0 14px;
  border-radius: 20px;
  border: 1px solid rgba(130, 232, 117, .14);
  background: linear-gradient(180deg, rgba(18, 28, 20, .94), rgba(10, 16, 11, .96));
}

.series-reader-preset-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.series-reader-preset-kicker {
  color: #90e76f;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.series-reader-preset-copy strong {
  color: #f3f9ef;
  font-size: 1rem;
  line-height: 1.2;
}

.series-reader-preset-copy p {
  margin: 0;
  color: rgba(229, 238, 225, .82);
  font-size: .92rem;
  line-height: 1.55;
}

.series-reader-preset-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(130, 232, 117, .16);
  background: rgba(130, 232, 117, .08);
  color: #a7ef84;
  font-size: .82rem;
  font-weight: 700;
}

.series-reader-preset-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.action-pill-ghost {
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .08);
}

.action-pill:disabled {
  opacity: .54;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .support-message-head,
  .support-message-meta,
  .support-message-actions,
  .admin-support-route-card,
  .admin-support-actions,
  .admin-ticket-list-top,
  .admin-ticket-detail-head,
  .admin-notice-head,
  .admin-notice-meta,
  .admin-notice-actions,
  .admin-ticket-quick-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-ticket-board,
  .admin-notice-shell,
  .admin-support-composer-grid,
  .admin-ticket-detail-grid,
  .admin-ticket-quick-meta,
  .admin-support-filters {
    grid-template-columns: 1fr;
  }

  .admin-ticket-board.has-mobile-focus .admin-ticket-list-panel {
    display: none;
  }

  .admin-ticket-board:not(.has-mobile-focus) .admin-ticket-detail-panel,
  .admin-ticket-board:not(.has-mobile-focus) .admin-ticket-actions-panel {
    display: none;
  }

  .admin-ticket-back {
    display: inline-flex;
  }

  .series-reader-preset-card {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .series-reader-preset-actions {
    justify-content: stretch;
  }

  .series-reader-preset-actions .action-pill {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .support-inbox-panel,
  .support-modal-panel {
    width: min(100vw - 12px, 100%);
  }

  .support-surface-banner {
    padding: .82rem .85rem;
  }
}

@media (max-width: 420px) {
  .support-message-card,
  .admin-ticket-list-panel,
  .admin-ticket-detail-panel,
  .admin-ticket-actions-panel,
  .admin-support-composer,
  .admin-notice-list,
  .admin-notice-row {
    padding: .82rem;
  }
}

/* ADMIN SHELL REFINEMENT */
.admin-panel {
  width: min(1380px, calc(100vw - 28px));
  max-height: min(94vh, 1040px);
  background:
    radial-gradient(circle at top left, rgba(94, 115, 255, .08), transparent 30%),
    radial-gradient(circle at top right, rgba(120, 230, 138, .05), transparent 28%),
    rgba(11, 14, 13, .985);
}

.admin-head {
  padding: 1.1rem 1.35rem .9rem;
  background: rgba(13, 16, 15, .94);
  border-bottom-color: rgba(255, 255, 255, .06);
}

.admin-content {
  padding: 1.15rem 1.25rem 1.3rem;
  background: transparent;
}

.admin-dashboard {
  gap: 0;
}

.admin-workspace {
  position: relative;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 1.2rem;
  min-height: 0;
}

.admin-sidebar-backdrop {
  display: none;
}

.admin-sidebar-shell {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 26px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  min-height: calc(94vh - 150px);
}

.admin-sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .9rem;
}

.admin-sidebar-brand {
  display: grid;
  gap: .26rem;
}

.admin-sidebar-kicker,
.admin-main-kicker {
  color: rgba(197, 206, 243, .7);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.admin-sidebar-brand strong {
  color: #f5f8f3;
  font-size: 1.18rem;
  line-height: 1.18;
}

.admin-sidebar-brand small {
  color: rgba(214, 220, 211, .62);
  line-height: 1.55;
  font-size: .86rem;
}

.admin-sidebar-close,
.admin-sidebar-toggle {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035);
  color: rgba(235, 241, 232, .86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.admin-sidebar-close:hover,
.admin-sidebar-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
}

.admin-sidebar-close {
  display: none;
}

.admin-sidebar-scope {
  display: grid;
  gap: .45rem;
  color: rgba(213, 219, 209, .72);
  font-size: .78rem;
  font-weight: 700;
}

.admin-sidebar-nav {
  display: grid;
  gap: .35rem;
}

.admin-workspace .admin-tab {
  min-height: 46px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: .72rem;
  width: 100%;
  padding: 0 .95rem;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: rgba(223, 230, 220, .74);
  font-size: .9rem;
  font-weight: 700;
  text-align: left;
}

.admin-workspace .admin-tab:hover {
  background: rgba(255, 255, 255, .04);
  color: rgba(244, 248, 242, .92);
}

.admin-workspace .admin-tab.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
  color: #f7faf5;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}

.admin-workspace .admin-tab svg {
  flex-shrink: 0;
  opacity: .82;
}

.admin-tab-label {
  min-width: 0;
}

.admin-workspace .admin-tab-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, .08);
  color: rgba(244, 248, 243, .82);
  min-width: 22px;
}

.admin-workspace .admin-tab-badge.is-active {
  background: rgba(255, 190, 92, .18);
  color: #ffe0a8;
  animation: none;
}

.admin-main-shell {
  display: grid;
  gap: 1.15rem;
  min-width: 0;
}

.admin-main-top {
  display: flex;
  align-items: flex-start;
  gap: .95rem;
  padding: .25rem 0 .15rem;
}

.admin-main-copy {
  display: grid;
  gap: .22rem;
}

.admin-main-copy h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.1;
  color: #f6f9f4;
}

.admin-main-copy p {
  margin: 0;
  max-width: 70ch;
  color: rgba(219, 225, 216, .67);
  line-height: 1.55;
  font-size: .94rem;
}

.admin-sidebar-toggle {
  display: none;
}

.admin-main-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-exit-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 0 .95rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(239, 245, 235, .86);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.admin-exit-btn:hover {
  background: rgba(255, 255, 255, .07);
  color: #f7fbf4;
}

.admin-main-pages,
.admin-panel-page.active {
  display: grid;
  gap: 1.25rem;
}

.admin-panel-page {
  display: none;
}

.admin-dashboard .admin-section,
.admin-dashboard .admin-summary-block,
.admin-dashboard .admin-rank-card,
.admin-dashboard .admin-ticket-list-panel,
.admin-dashboard .admin-ticket-detail-panel,
.admin-dashboard .admin-ticket-actions-panel,
.admin-dashboard .admin-support-composer,
.admin-dashboard .admin-notice-list,
.admin-dashboard .admin-billing-row,
.admin-dashboard .admin-reading-row-v2,
.admin-dashboard .admin-users-table .admin-user-row {
  background: rgba(255, 255, 255, .028);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 24px;
  box-shadow: none;
}

.admin-dashboard .admin-badge {
  padding: .32rem .62rem;
  letter-spacing: .02em;
  text-transform: none;
  font-size: .74rem;
  background: rgba(152, 171, 255, .1);
  border-color: transparent;
  color: #cfd8ff;
}

.admin-dashboard .admin-badge.is-green {
  background: rgba(98, 211, 129, .14);
  color: #b4f1c5;
}

.admin-dashboard .admin-badge.is-warn,
.admin-dashboard .admin-badge.is-pulse {
  background: rgba(255, 190, 92, .14);
  color: #ffd99d;
}

.admin-section-head {
  align-items: flex-start;
  margin-bottom: 1rem;
}

.admin-section-head h3,
.admin-summary-block-head h4,
.admin-rank-card h4 {
  margin: 0;
  color: #f2f6f0;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
}

.admin-range-select,
.admin-search-input,
.admin-support-composer textarea,
.admin-support-composer input,
.admin-support-composer select,
.admin-ticket-actions-card textarea,
.admin-ticket-actions-card select {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .08);
  color: #f2f6ef;
}

.admin-range-select:focus,
.admin-search-input:focus,
.admin-support-composer textarea:focus,
.admin-support-composer input:focus,
.admin-support-composer select:focus,
.admin-ticket-actions-card textarea:focus,
.admin-ticket-actions-card select:focus {
  border-color: rgba(145, 164, 255, .38);
  box-shadow: 0 0 0 3px rgba(145, 164, 255, .08);
}

.admin-metrics-v2 {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 0;
}

.admin-metric-card {
  min-height: 118px;
  align-items: flex-start;
  padding: 1.15rem 1.2rem;
  gap: .95rem;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .055);
}

.admin-metric-card.is-green {
  background: rgba(88, 205, 123, .08);
  border-color: rgba(88, 205, 123, .08);
}

.admin-metric-card.is-warn {
  background: rgba(255, 190, 92, .08);
  border-color: rgba(255, 190, 92, .08);
}

.admin-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
}

.admin-metric-label {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  text-transform: none;
  letter-spacing: .01em;
  font-size: .82rem;
  color: rgba(221, 227, 219, .66);
}

.admin-metric-value {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  line-height: .96;
}

.admin-metric-sub {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  color: rgba(204, 211, 200, .55);
  font-size: .8rem;
  line-height: 1.45;
}

.admin-summary-v2,
.admin-billing-layout,
.admin-notice-shell {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-summary-block,
.admin-rank-card,
.admin-support-composer,
.admin-notice-list {
  padding: 1.25rem 1.3rem;
}

.admin-top-series-row,
.admin-login-row,
.admin-lb-row,
.admin-billing-row,
.admin-reading-row-v2 {
  min-height: 76px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .04);
}

.admin-top-series-row,
.admin-login-row,
.admin-lb-row {
  padding: .78rem .86rem;
}

.admin-top-series-title,
.admin-billing-title,
.admin-reading-title {
  color: #f2f6f0;
  font-size: .98rem;
  font-weight: 700;
}

.admin-reading-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-reading-row-v2 {
  padding: 1rem 1.05rem;
}

.admin-support-shell,
.admin-notice-shell {
  gap: 1.1rem;
}

.admin-support-metrics {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.admin-ticket-board {
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.25fr) minmax(280px, .82fr);
  gap: 1rem;
  align-items: start;
}

.admin-support-filters {
  gap: .7rem;
}

.admin-ticket-list-panel,
.admin-ticket-detail-panel,
.admin-ticket-actions-panel {
  padding: 1.1rem;
  min-width: 0;
}

.admin-ticket-list-item {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid transparent;
}

.admin-ticket-list-item.is-active {
  background: rgba(255, 255, 255, .045);
  border-color: rgba(146, 163, 255, .18);
}

.admin-ticket-list-middle strong,
.admin-ticket-detail-title {
  color: #f5f8f3;
}

.admin-ticket-list-middle strong {
  font-size: .98rem;
}

.admin-ticket-list-middle p,
.admin-ticket-detail-copy,
.admin-ticket-message-block p,
.admin-notice-message {
  color: rgba(215, 222, 211, .72);
  line-height: 1.65;
}

.admin-ticket-detail-card,
.admin-ticket-actions-card {
  gap: 1rem;
}

.admin-ticket-detail-head {
  gap: .8rem;
  align-items: flex-start;
}

.admin-ticket-kicker {
  color: rgba(156, 170, 255, .74);
  letter-spacing: .12em;
}

.admin-ticket-detail-title {
  font-size: 1.38rem;
  line-height: 1.18;
}

.admin-ticket-detail-subtitle {
  font-size: 1rem;
  color: #eef3eb;
}

.admin-ticket-detail-grid {
  grid-template-columns: 1fr;
  gap: .8rem;
}

.admin-ticket-detail-section,
.admin-ticket-message-block,
.admin-ticket-field {
  padding: 0;
  background: transparent;
  border: 0;
}

.admin-ticket-message-block {
  padding-top: .1rem;
}

.admin-ticket-meta-strip {
  gap: .45rem;
}

.admin-ticket-meta-pill {
  background: rgba(255, 255, 255, .05);
  color: rgba(235, 239, 233, .75);
}

.admin-ticket-actions-buttons {
  gap: .7rem;
}

.admin-ticket-actions-buttons .mini-btn,
.admin-notice-actions .mini-btn,
.admin-actions-popover .mini-btn,
.admin-billing-sync {
  min-height: 42px;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
}

.admin-support-checks {
  gap: .7rem;
}

.admin-support-check {
  min-height: 44px;
  padding: .72rem .9rem;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .03);
}

.admin-notice-row {
  padding: 1rem 1.05rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, .022);
  border: 1px solid rgba(255, 255, 255, .05);
}

.admin-empty-state {
  padding: 1.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, .02);
  border: 1px dashed rgba(255, 255, 255, .08);
}

@media (max-width: 1280px) {
  .admin-support-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .admin-ticket-board {
    grid-template-columns: minmax(260px, .82fr) minmax(0, 1fr);
  }

  .admin-ticket-actions-panel {
    grid-column: 2;
  }

  .admin-notice-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .admin-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .admin-support-metrics,
  .admin-metrics-v2 {
    grid-template-columns: 1fr 1fr;
  }

  .admin-ticket-board,
  .admin-reading-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin-metrics-v2,
  .admin-summary-v2,
  .admin-billing-layout,
  .admin-notice-shell {
    grid-template-columns: 1fr;
  }

  .admin-support-metrics {
    grid-template-columns: 1fr;
  }

  .admin-support-checks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-panel {
    width: min(100vw - 10px, 100%);
    max-height: 100dvh;
  }

  .admin-content {
    padding: .95rem;
  }

  .admin-workspace {
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  .admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 4, 5, .62);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    display: block;
    z-index: 14;
  }

  .admin-sidebar-shell {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, calc(100vw - 34px));
    min-height: 100dvh;
    border-radius: 0 24px 24px 0;
    transform: translateX(-108%);
    transition: transform .22s ease;
    z-index: 15;
    padding-top: calc(1rem + env(safe-area-inset-top));
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .admin-workspace.is-sidebar-open .admin-sidebar-shell {
    transform: translateX(0);
  }

  .admin-workspace.is-sidebar-open .admin-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-sidebar-close,
  .admin-sidebar-toggle {
    display: inline-flex;
  }

  .admin-main-top {
    align-items: center;
  }

  .admin-exit-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 14px;
  }

  .admin-exit-btn span {
    display: none;
  }

  .admin-main-copy h3 {
    font-size: 1.24rem;
  }

  .admin-metric-card {
    min-height: 104px;
  }

  .admin-ticket-board.has-mobile-focus .admin-ticket-list-panel {
    display: none;
  }

  .admin-ticket-board:not(.has-mobile-focus) .admin-ticket-detail-panel,
  .admin-ticket-board:not(.has-mobile-focus) .admin-ticket-actions-panel {
    display: none;
  }

  .admin-ticket-detail-panel,
  .admin-ticket-actions-panel {
    padding: 1rem;
  }
}

@media (max-width: 420px) {
  .admin-content {
    padding: .8rem;
  }

  .admin-metric-card,
  .admin-summary-block,
  .admin-rank-card,
  .admin-ticket-list-panel,
  .admin-ticket-detail-panel,
  .admin-ticket-actions-panel,
  .admin-support-composer,
  .admin-notice-list {
    padding: .95rem;
    border-radius: 20px;
  }

  .admin-metric-value {
    font-size: 1.52rem;
  }
}

@media (max-width: 720px) {
  .admin-main-top {
    position: sticky;
    top: 0;
    z-index: 4;
    margin: -.2rem -.1rem 0;
    padding: .2rem .1rem .75rem;
    background: linear-gradient(180deg, rgba(11, 14, 13, .98), rgba(11, 14, 13, .84));
    backdrop-filter: blur(10px);
  }

  .admin-main-copy {
    min-width: 0;
  }

  .admin-main-copy p {
    font-size: .88rem;
  }

  .admin-section-head,
  .admin-summary-block-head,
  .admin-rank-card-head,
  .admin-billing-row,
  .admin-notice-head,
  .admin-notice-actions,
  .admin-ticket-detail-head,
  .admin-ticket-actions-buttons,
  .admin-inline-tools {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-inline-tools,
  .admin-inline-tools > * {
    width: 100%;
  }

  .admin-range-select,
  .admin-search-input,
  .admin-form input,
  .admin-form select,
  .admin-support-composer input,
  .admin-support-composer select,
  .admin-support-composer textarea,
  .admin-ticket-actions-card textarea,
  .admin-ticket-actions-card select {
    width: 100%;
  }

  .admin-form,
  .admin-create-shell,
  .admin-user-meta,
  .admin-support-scope,
  .admin-support-composer-grid,
  .admin-ranking-grid,
  .admin-billing-layout,
  .admin-notice-shell {
    grid-template-columns: 1fr !important;
  }

  .admin-create-shell .btn-primary,
  .admin-support-actions .btn-primary,
  .admin-ticket-actions-buttons .mini-btn,
  .admin-actions-popover .mini-btn,
  .admin-billing-sync {
    width: 100%;
    justify-content: center;
  }

  .admin-users-table .admin-user-row,
  .admin-reading-row-v2,
  .admin-billing-row,
  .admin-summary-block,
  .admin-rank-card,
  .admin-support-composer,
  .admin-notice-list {
    padding: 1rem;
  }

  .admin-user-actions,
  .admin-actions-menu,
  .admin-actions-menu summary,
  .admin-actions-popover {
    width: 100%;
  }

  .admin-reading-user,
  .admin-reading-content,
  .admin-billing-user,
  .admin-billing-main,
  .admin-billing-meta {
    min-width: 0;
    width: 100%;
  }

  .admin-reading-title,
  .admin-reading-chapter,
  .admin-billing-title,
  .admin-billing-sub,
  .admin-billing-id {
    overflow-wrap: anywhere;
  }

  .admin-ticket-list-item {
    padding: .95rem;
  }

  .admin-ticket-detail-title {
    font-size: 1.18rem;
  }

  .admin-ticket-actions-card textarea,
  .admin-support-composer textarea {
    min-height: 132px;
  }

  .admin-support-checks {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-support-check {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-notice-row {
    padding: .95rem;
  }

  .admin-top-series-row,
  .admin-login-row,
  .admin-lb-row {
    grid-template-columns: 28px 1fr auto;
  }
}

@media (max-width: 560px) {
  .admin-head {
    padding: .95rem 1rem .78rem;
  }

  .admin-head h2 {
    font-size: 1.08rem;
  }

  .admin-main-copy h3 {
    font-size: 1.12rem;
  }

  .admin-main-copy p {
    font-size: .84rem;
    line-height: 1.5;
  }

  .admin-metrics-v2 {
    grid-template-columns: 1fr;
  }

  .admin-metric-card {
    min-height: 96px;
    padding: 1rem;
  }

  .admin-ticket-list-top,
  .admin-ticket-list-middle,
  .admin-ticket-list-bottom,
  .admin-ticket-quick-meta {
    gap: .42rem;
  }
}

/* ADMIN FIT FIXES */
.admin-billing-metrics {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.admin-billing-metrics .admin-metric-card,
.admin-support-metrics .admin-metric-card {
  min-width: 0;
}

.admin-billing-metrics .admin-metric-value {
  font-size: clamp(1.45rem, 2vw, 1.95rem);
}

.admin-ticket-detail-panel,
.admin-ticket-actions-panel,
.admin-notice-list,
.admin-support-composer,
.admin-summary-block,
.admin-rank-card,
.admin-metric-card {
  overflow: hidden;
}

.admin-ticket-detail-card,
.admin-ticket-actions-card,
.admin-notice-row,
.admin-ticket-list-item,
.admin-billing-row,
.admin-reading-row-v2,
.admin-login-row,
.admin-lb-row,
.admin-top-series-row {
  min-width: 0;
}

.admin-ticket-list-top > div,
.admin-ticket-detail-head > div,
.admin-notice-head > div,
.admin-billing-user > div,
.admin-reading-user-info,
.admin-login-info,
.admin-lb-info {
  min-width: 0;
}

.admin-notice-shell > *,
.admin-ticket-board > * {
  min-width: 0;
}

.admin-support-composer-grid,
.admin-support-scope {
  align-items: start;
}

.admin-support-composer-grid label,
.admin-support-scope label,
.admin-ticket-field {
  min-width: 0;
}

.admin-support-filters input,
.admin-support-filters select,
.admin-support-composer input,
.admin-support-composer select,
.admin-support-composer textarea,
.admin-ticket-actions-card textarea,
.admin-ticket-actions-card select {
  min-width: 0;
}

.admin-notice-meta,
.admin-ticket-meta-strip,
.admin-ticket-list-bottom {
  row-gap: .38rem;
}

.admin-ticket-actions-buttons {
  grid-template-columns: 1fr;
}

@media (max-width: 1460px) {
  .admin-workspace {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .admin-billing-metrics,
  .admin-support-metrics,
  .admin-metrics-v2 {
    grid-template-columns: 1fr 1fr;
  }

  .admin-ticket-board {
    grid-template-columns: minmax(280px, .92fr) minmax(0, 1fr);
  }

  .admin-ticket-actions-panel {
    grid-column: 2;
  }

  .admin-notice-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .admin-ticket-board {
    grid-template-columns: 1fr;
  }

  .admin-ticket-actions-panel,
  .admin-ticket-detail-panel {
    grid-column: 1;
  }

  .admin-billing-metrics {
    grid-template-columns: 1fr;
  }

  .admin-support-filters,
  .admin-support-composer-grid,
  .admin-support-scope {
    grid-template-columns: 1fr;
  }
}

/* FULL PAGE ADMIN */
body.admin-page-mode {
  min-height: 100dvh;
  overflow: auto;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(113, 143, 255, .07), transparent 32rem),
    linear-gradient(180deg, #090c0b 0%, #0d1110 48%, #090b0a 100%);
}

body.admin-page-mode .fx-layer,
body.admin-page-mode #searchOverlay,
body.admin-page-mode #readerOverlay,
body.admin-page-mode #seriesModal,
body.admin-page-mode #adminModal {
  display: none !important;
}

.admin-page {
  min-height: 100dvh;
  width: 100%;
  padding: clamp(16px, 2vw, 28px);
  color: var(--text);
}

.admin-page.hidden {
  display: none;
}

.admin-page-content {
  width: min(1720px, 100%);
  min-height: calc(100dvh - clamp(32px, 4vw, 56px));
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

.admin-page .admin-dashboard {
  min-height: inherit;
}

.admin-page .admin-workspace {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(18px, 2vw, 28px);
  min-height: inherit;
}

.admin-page .admin-sidebar-shell {
  top: clamp(16px, 2vw, 28px);
  min-height: calc(100dvh - clamp(32px, 4vw, 56px));
  border-radius: 18px;
}

.admin-page .admin-main-shell {
  gap: 1.4rem;
}

.admin-page .admin-main-top {
  min-height: 78px;
  align-items: center;
  padding: .4rem 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.admin-page .admin-main-copy h3 {
  font-size: clamp(1.55rem, 1.8vw, 2.1rem);
}

.admin-page .admin-main-pages,
.admin-page .admin-panel-page.active {
  gap: 1.35rem;
}

.admin-page .admin-metrics-v2 {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
}

.admin-page .admin-support-metrics {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.admin-page .admin-billing-metrics {
  grid-template-columns: repeat(4, minmax(210px, 1fr));
}

.admin-page .admin-ticket-board {
  grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.25fr) minmax(300px, .82fr);
}

.admin-page .admin-ticket-list {
  max-height: calc(100dvh - 330px);
}

.admin-page .admin-notice-shell {
  grid-template-columns: minmax(420px, .9fr) minmax(420px, 1.1fr);
}

.admin-route-gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.admin-route-gate-card {
  width: min(460px, 100%);
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08);
}

.admin-route-gate-card h1 {
  margin: 0;
  font-size: 1.55rem;
}

.admin-route-gate-card p {
  margin: 0;
  color: rgba(222, 229, 219, .72);
  line-height: 1.55;
}

.admin-route-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

@media (max-width: 1460px) {
  .admin-page .admin-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .admin-page .admin-metrics-v2,
  .admin-page .admin-billing-metrics {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .admin-page .admin-ticket-board {
    grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr);
  }

  .admin-page .admin-ticket-actions-panel {
    grid-column: 2;
  }

  .admin-page .admin-notice-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .admin-page .admin-ticket-board {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-ticket-actions-panel,
  .admin-page .admin-ticket-detail-panel {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  .admin-page {
    padding: 0;
  }

  .admin-page-content {
    min-height: 100dvh;
    padding: .9rem;
  }

  .admin-page .admin-workspace {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-main-top {
    position: sticky;
    top: 0;
    margin: -.9rem -.9rem 0;
    padding: calc(.85rem + env(safe-area-inset-top)) .9rem .8rem;
    background: rgba(10, 13, 12, .94);
    z-index: 9;
  }

  .admin-page .admin-metrics-v2,
  .admin-page .admin-support-metrics,
  .admin-page .admin-billing-metrics {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-ticket-list {
    max-height: none;
  }
}

/* ADMIN USER ACTIONS PORTAL */
body.admin-action-open,
body.admin-nav-open {
  overflow: hidden;
}

body.admin-action-open .fx-layer,
body.admin-action-open .fx-particle,
body.admin-action-open .fx-orb,
body.admin-nav-open .fx-layer,
body.admin-nav-open .fx-particle,
body.admin-nav-open .fx-orb {
  opacity: 0 !important;
  pointer-events: none !important;
}

.admin-user-actions-portal,
.admin-direct-message-portal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  pointer-events: none;
}

.admin-action-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, .18);
  pointer-events: auto;
}

.admin-user-actions-sheet,
.admin-direct-message-sheet {
  position: fixed;
  pointer-events: auto;
  background: rgba(18, 21, 20, .985);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .48);
  color: var(--text);
}

.admin-user-actions-sheet {
  left: var(--menu-left, 16px);
  top: var(--menu-top, 72px);
  width: min(320px, calc(100vw - 24px));
  padding: .72rem;
  border-radius: 18px;
}

.admin-sheet-handle {
  display: none;
  width: 42px;
  height: 4px;
  margin: .1rem auto .8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
}

.admin-user-action-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: .72rem;
  padding: .35rem .42rem .75rem;
}

.admin-user-action-head strong,
.admin-user-action-head span {
  display: block;
  overflow-wrap: anywhere;
}

.admin-user-action-head strong {
  color: #f5f8f2;
  font-size: .98rem;
}

.admin-user-action-head span {
  color: rgba(218, 225, 214, .62);
  font-size: .76rem;
}

.admin-user-action-list {
  display: grid;
  gap: .42rem;
}

.admin-user-action-list button,
.admin-sheet-cancel {
  width: 100%;
  min-height: 52px;
  display: grid;
  gap: .12rem;
  justify-items: start;
  padding: .72rem .82rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .035);
  color: #eef4eb;
  text-align: left;
  cursor: pointer;
}

.admin-user-action-list button:hover,
.admin-sheet-cancel:hover {
  background: rgba(255, 255, 255, .06);
}

.admin-user-action-list button span {
  font-weight: 800;
  font-size: .92rem;
}

.admin-user-action-list button small {
  color: rgba(213, 221, 209, .58);
  line-height: 1.35;
}

.admin-user-action-list button.is-danger span {
  color: #ffb5b5;
}

.admin-sheet-cancel {
  margin-top: .58rem;
  justify-items: center;
  text-align: center;
  color: rgba(235, 241, 232, .76);
}

.admin-direct-message-sheet {
  left: 50%;
  top: 50%;
  width: min(620px, calc(100vw - 28px));
  max-height: min(86dvh, 760px);
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: 1.15rem;
  border-radius: 22px;
}

.admin-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-sheet-head h3 {
  margin: .18rem 0 .2rem;
  color: #f6faf3;
  font-size: 1.22rem;
  line-height: 1.2;
}

.admin-sheet-head p {
  margin: 0;
  color: rgba(219, 226, 216, .66);
  line-height: 1.5;
}

.admin-sheet-close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(236, 242, 233, .8);
  cursor: pointer;
}

.admin-message-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .82rem;
}

.admin-message-form label {
  display: grid;
  gap: .42rem;
  color: rgba(222, 229, 219, .78);
  font-size: .82rem;
  font-weight: 800;
}

.admin-message-body-label,
.admin-message-form .settings-msg {
  grid-column: 1 / -1;
}

.admin-message-form input,
.admin-message-form select,
.admin-message-form textarea {
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  outline: none;
}

.admin-message-form input,
.admin-message-form select {
  min-height: 46px;
  padding: 0 .9rem;
}

.admin-message-form textarea {
  min-height: 140px;
  padding: .9rem;
  resize: vertical;
  line-height: 1.58;
}

.admin-sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: .7rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .admin-action-backdrop {
    background: rgba(0, 0, 0, .62);
  }

  .admin-user-actions-sheet,
  .admin-direct-message-sheet {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: min(88dvh, 720px);
    transform: none;
    border-radius: 22px 22px 0 0;
    padding: .95rem .95rem calc(.95rem + env(safe-area-inset-bottom));
    overflow: auto;
  }

  .admin-sheet-handle {
    display: block;
  }

  .admin-user-action-list button,
  .admin-sheet-cancel {
    min-height: 58px;
  }

  .admin-message-form {
    grid-template-columns: 1fr;
  }

  .admin-sheet-actions .btn-primary,
  .admin-sheet-actions .btn-secondary {
    width: 100%;
  }

  .admin-workspace.is-sidebar-open .admin-sidebar-backdrop {
    opacity: 1;
    background: rgba(0, 0, 0, .72);
  }

  .admin-sidebar-shell {
    background: rgba(15, 18, 17, .99);
    box-shadow: 24px 0 80px rgba(0, 0, 0, .62);
  }
}

/* ADM MOBILE APP EXPERIENCE */
.admin-mobile-revenue-card,
.admin-mobile-stat-grid,
.admin-mobile-bottom-nav,
.admin-mobile-user-status-line,
.admin-user-mobile-actions,
.admin-mobile-drawer-footer,
.admin-mobile-create-toggle,
.admin-mobile-create-close,
.admin-mobile-create-backdrop,
.admin-mobile-load-more,
.admin-mobile-see-all,
.admin-mobile-login-time {
  display: none;
}

.admin-user-row.is-search-hidden {
  display: none !important;
}

.admin-panel-page[data-admin-panel="users"] .admin-create-compact {
  order: 1;
}

.admin-mobile-users-toolbar {
  order: 2;
}

.admin-users-table {
  order: 3;
}

.admin-mobile-users-toolbar .admin-users-search {
  display: block;
}

.admin-mobile-users-toolbar .admin-users-search svg {
  display: none;
}

@media (max-width: 760px) {
  /* Scroll único no body — sem overflow:hidden, sem container interno com 100dvh+overflow:auto.
     iOS Safari respeita pull-to-refresh e o address bar colapsa naturalmente. */
  body.admin-page-mode {
    background: #050706;
    min-height: 100dvh;
    overflow-x: hidden;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  body.admin-page-mode .fx-layer,
  body.admin-page-mode .fx-particle,
  body.admin-page-mode .fx-orb {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .admin-page {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    padding: 0 !important;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .admin-page-content {
    width: 100%;
    min-height: 100%;
    padding: 0 !important;
    overflow: visible;
  }

  .admin-mobile-shell,
  .admin-page .admin-dashboard,
  .admin-page .admin-workspace,
  .admin-page .admin-main-shell {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .admin-page .admin-workspace {
    display: block;
    min-height: 100%;
    background: #050706;
    touch-action: pan-y pinch-zoom;
  }

  .admin-page .admin-main-shell {
    display: block;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .admin-page .admin-main-top {
    position: relative !important;
    top: auto !important;
    z-index: 18;
    min-height: 0;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: calc(env(safe-area-inset-top) + 18px) 18px 22px !important;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
    background: rgba(5, 7, 6, .98) !important;
    backdrop-filter: none;
  }

  .admin-sidebar-toggle,
  .admin-exit-btn {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    padding: 0 !important;
    border-radius: 18px !important;
    border: 1px solid rgba(255, 255, 255, .1) !important;
    background: rgba(255, 255, 255, .045) !important;
    color: #eef4eb !important;
    box-shadow: none;
  }

  .admin-sidebar-toggle {
    display: inline-flex !important;
  }

  .admin-exit-btn {
    margin-left: 0 !important;
  }

  .admin-exit-btn span {
    display: none !important;
  }

  .admin-main-copy {
    display: grid;
    justify-items: center;
    gap: 7px;
    min-width: 0;
    text-align: center;
  }

  .admin-main-kicker {
    color: #8ef36b;
    font-size: .76rem;
    letter-spacing: .26em;
    font-weight: 900;
  }

  .admin-main-copy h3 {
    max-width: 100%;
    margin: 0;
    color: #f6f8f4;
    font-size: clamp(2.05rem, 9vw, 3.6rem) !important;
    line-height: .95;
    letter-spacing: -.05em;
    text-wrap: balance;
  }

  .admin-main-copy p {
    width: min(520px, 100%);
    margin: 0 auto;
    color: rgba(231, 236, 229, .66);
    font-size: clamp(.98rem, 3.7vw, 1.28rem) !important;
    line-height: 1.38;
    text-wrap: balance;
  }

  .admin-main-pages {
    display: block !important;
    padding: 18px 16px 0;
    min-height: calc(100dvh - 152px);
    touch-action: pan-y pinch-zoom;
  }

  .admin-panel-page.active {
    display: grid !important;
    gap: 16px !important;
    min-width: 0;
    touch-action: pan-y pinch-zoom;
  }

  .admin-panel-page:not(.active) {
    display: none !important;
  }

  .admin-panel-page[data-admin-panel="summary"] > .admin-metrics-v2 {
    display: none !important;
  }

  .admin-mobile-revenue-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 16px;
    min-height: 128px;
    padding: 22px;
    border-radius: 28px;
    border: 1px solid rgba(142, 243, 107, .28);
    background: rgba(16, 22, 18, .96);
    box-shadow: none;
  }

  .admin-mobile-revenue-icon,
  .admin-mobile-stat-icon,
  .admin-mobile-drawer-icon {
    display: inline-grid;
    place-items: center;
    color: #8ef36b;
    background: rgba(142, 243, 107, .14);
    border: 1px solid rgba(142, 243, 107, .2);
  }

  .admin-mobile-revenue-icon {
    width: 76px;
    height: 76px;
    border-radius: 24px;
  }

  .admin-mobile-revenue-icon svg,
  .admin-mobile-stat-icon svg,
  .admin-mobile-drawer-icon svg {
    width: 42px;
    height: 42px;
  }

  .admin-mobile-revenue-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .admin-mobile-revenue-copy small,
  .admin-mobile-stat-copy span {
    color: rgba(231, 236, 229, .62);
    font-size: 1rem;
    line-height: 1.2;
  }

  .admin-mobile-revenue-copy strong {
    color: #8ef36b;
    font-size: clamp(2.05rem, 8vw, 3.1rem);
    line-height: .95;
    letter-spacing: -.04em;
  }

  .admin-mobile-revenue-copy em,
  .admin-mobile-stat-copy small {
    color: rgba(231, 236, 229, .58);
    font-style: normal;
    line-height: 1.25;
  }

  .admin-mobile-revenue-next {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    border: 1px solid rgba(142, 243, 107, .22);
    background: rgba(142, 243, 107, .075);
    color: #8ef36b;
    display: inline-grid;
    place-items: center;
  }

  .admin-mobile-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .admin-mobile-stat-card {
    min-height: 148px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(15, 19, 17, .96);
    box-shadow: none;
  }

  .admin-mobile-stat-card.is-success {
    border-color: rgba(142, 243, 107, .22);
    background: rgba(18, 28, 20, .96);
  }

  .admin-mobile-stat-card.is-danger .admin-mobile-stat-icon {
    color: #ff7171;
    background: rgba(255, 91, 91, .13);
    border-color: rgba(255, 91, 91, .2);
  }

  .admin-mobile-stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 999px;
  }

  .admin-mobile-stat-icon svg {
    width: 30px;
    height: 30px;
  }

  .admin-mobile-stat-copy {
    display: grid;
    min-width: 0;
  }

  .admin-mobile-stat-copy strong {
    color: #f6f8f4;
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: .98;
    letter-spacing: -.05em;
  }

  .admin-panel-page[data-admin-panel="summary"] .admin-summary-v2 {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .admin-panel-page[data-admin-panel="summary"] .admin-summary-block:first-child {
    display: none;
  }

  .admin-summary-block {
    padding: 18px !important;
    border-radius: 26px !important;
    background: rgba(255, 255, 255, .035) !important;
    border-color: rgba(255, 255, 255, .09) !important;
  }

  .admin-summary-block-head {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
  }

  .admin-summary-block-head h4 {
    font-size: 1.15rem !important;
  }

  .admin-summary-block-head .admin-badge {
    display: none;
  }

  .admin-mobile-see-all {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(142, 243, 107, .2);
    background: rgba(142, 243, 107, .07);
    color: #8ef36b;
    font-weight: 900;
  }

  .admin-login-row {
    grid-template-columns: 48px minmax(0, 1fr) auto !important;
    min-height: 66px !important;
    padding: 10px 12px !important;
    border-radius: 17px !important;
    background: rgba(255, 255, 255, .027) !important;
  }

  .admin-login-info span {
    display: none;
  }

  .admin-mobile-login-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(231, 236, 229, .62);
    white-space: nowrap;
  }

  .admin-mobile-login-time i,
  .admin-mobile-user-status-line i,
  .admin-mobile-drawer-footer small i {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 999px;
    background: #79e75f;
    box-shadow: 0 0 14px rgba(121, 231, 95, .5);
  }

  .admin-panel-page[data-admin-panel="users"] {
    gap: 0 !important;
  }

  .admin-mobile-users-toolbar {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
    border-radius: 24px 24px 0 0;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(12, 15, 14, .98);
  }

  .admin-mobile-users-toolbar .admin-users-search {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 56px;
    padding: 0 14px;
    border-radius: 17px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .035);
    color: rgba(239, 245, 235, .78);
  }

  .admin-mobile-users-toolbar .admin-search-input {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 16px !important;
  }

  .admin-mobile-create-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 56px;
    padding: 0 18px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(135deg, #9cfb72, #65dc58);
    color: #071106;
    font-weight: 950;
    box-shadow: none;
    white-space: nowrap;
  }

  .admin-mobile-user-status-line {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-inline: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .025);
    color: rgba(239, 245, 235, .72);
  }

  .admin-mobile-user-status-line span,
  .admin-mobile-user-status-line button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
  }

  .admin-mobile-user-status-line button {
    border: 0;
    background: transparent;
    color: rgba(239, 245, 235, .72);
    font: inherit;
  }

  .admin-panel-page[data-admin-panel="users"] .admin-create-compact {
    order: 3;
    position: static;
    z-index: auto;
    display: none;
    max-height: none;
    margin: 0;
    overflow: visible;
    opacity: 0;
    pointer-events: none;
    transform: none;
    transition: opacity .14s ease;
  }

  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2450 !important;
    display: block;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 18px calc(env(safe-area-inset-bottom, 0px) + 24px) !important;
    border-radius: 0 !important;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(9, 12, 11, .995) !important;
    opacity: 1;
    pointer-events: auto;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
  }

  .admin-mobile-create-backdrop {
    display: none !important;
  }

  .admin-panel-page[data-admin-panel="users"].is-creating-user .admin-mobile-users-toolbar,
  .admin-panel-page[data-admin-panel="users"].is-creating-user .admin-mobile-user-status-line,
  .admin-panel-page[data-admin-panel="users"].is-creating-user .admin-users-table,
  .admin-panel-page[data-admin-panel="users"].is-creating-user .admin-mobile-load-more {
    display: none !important;
  }

  /* Quando o card é portalizado pro body, o seletor com parent não casa mais.
     Regra direta no .is-mobile-create-open garante fullscreen onde quer que esteja. */
  .admin-create-compact.is-mobile-create-open {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483600 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 18px calc(env(safe-area-inset-bottom, 0px) + 24px) !important;
    border-radius: 0 !important;
    border: 1px solid rgba(255, 255, 255, .1) !important;
    background: rgba(9, 12, 11, .995) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
  }
  .admin-create-compact.is-mobile-create-open .admin-section-head {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
  }
  .admin-create-compact.is-mobile-create-open .admin-section-head h3 {
    color: #f2f7ef !important;
    font-size: 1.15rem;
    margin: 0;
  }
  .admin-create-compact.is-mobile-create-open .admin-create-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px;
  }
  .admin-create-compact.is-mobile-create-open .admin-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px;
    width: 100%;
  }
  .admin-create-compact.is-mobile-create-open .admin-form label {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    color: rgba(239, 245, 235, 0.86) !important;
    font-size: 0.82rem;
    font-weight: 600;
  }
  .admin-create-compact.is-mobile-create-open .admin-form input,
  .admin-create-compact.is-mobile-create-open .admin-form select {
    display: block !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #f2f7ef !important;
    padding: 0.78rem 0.85rem !important;
    border-radius: 12px !important;
    min-height: 52px;
    font-size: 16px;
  }
  .admin-create-compact.is-mobile-create-open .admin-area-checks {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0 0;
  }
  .admin-create-compact.is-mobile-create-open .admin-area-check {
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: #f2f7ef !important;
    font-weight: 500;
    font-size: 0.95rem;
  }
  .admin-create-compact.is-mobile-create-open .admin-area-check input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    margin: 0;
    accent-color: #7ed957;
  }
  .admin-create-compact.is-mobile-create-open .admin-areas-hint {
    display: block;
    color: rgba(239, 245, 235, 0.55);
    font-size: 0.72rem;
    margin-top: 4px;
  }
  .admin-create-compact.is-mobile-create-open .admin-create-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 56px;
    margin-top: 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7ed957, #5fb840);
    color: #071a05;
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-size: 1rem;
  }
  .admin-create-compact.is-mobile-create-open .admin-mobile-create-close {
    margin-left: auto;
  }

  /* As regras antigas, no contexto original (caso o portal falhe por algum motivo) */
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-section-head {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-section-head h3 {
    color: #f2f7ef !important;
    font-size: 1.15rem;
    margin: 0;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-create-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px;
    width: 100%;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-form label {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    color: rgba(239, 245, 235, 0.86) !important;
    font-size: 0.82rem;
    font-weight: 600;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-form input,
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-form select {
    display: block !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #f2f7ef !important;
    padding: 0.78rem 0.85rem !important;
    border-radius: 12px !important;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-area-checks {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0 0;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-area-check {
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: #f2f7ef !important;
    font-weight: 500;
    font-size: 0.95rem;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-area-check input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    margin: 0;
    accent-color: #7ed957;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-areas-hint {
    display: block;
    color: rgba(239, 245, 235, 0.55);
    font-size: 0.72rem;
    margin-top: 4px;
  }
  .admin-panel-page[data-admin-panel="users"] .admin-create-compact.is-mobile-create-open .admin-create-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 56px;
    margin-top: 6px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7ed957, #5fb840);
    color: #071a05;
    font-weight: 800;
    border: none;
  }

  .admin-mobile-create-close {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .045);
    color: #f2f7ef;
  }

  .admin-panel-page[data-admin-panel="users"] .admin-create-shell,
  .admin-panel-page[data-admin-panel="users"] .admin-form {
    grid-template-columns: 1fr !important;
    min-width: 0;
  }

  .admin-panel-page[data-admin-panel="users"] .admin-create-shell {
    gap: 14px;
    padding-bottom: 10px;
  }

  .admin-panel-page[data-admin-panel="users"] .admin-form input,
  .admin-panel-page[data-admin-panel="users"] .admin-form select {
    min-height: 54px;
    font-size: 16px !important;
  }

  .admin-panel-page[data-admin-panel="users"] .admin-create-btn {
    position: static !important;
    min-height: 56px;
    margin-top: 4px;
  }

  .admin-users-table {
    order: 4;
    display: grid;
    gap: 12px;
    margin-top: 16px;
    background: rgba(12, 15, 14, .98);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 0 0 24px 24px;
    padding: 12px;
    touch-action: pan-y pinch-zoom;
  }

  .admin-users-table .admin-user-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 96px !important;
    gap: 12px;
    align-items: start;
    padding: 16px !important;
    border-radius: 22px !important;
    background:
      rgba(255, 255, 255, .025) !important;
    border-color: rgba(255, 255, 255, .08) !important;
    touch-action: pan-y pinch-zoom;
  }

  .admin-user-profile {
    min-width: 0;
    gap: 9px;
  }

  .admin-user-identity {
    align-items: center;
    gap: 12px;
  }

  .admin-user-identity strong {
    color: #f4f7f2;
    font-size: 1.18rem;
    line-height: 1.05;
  }

  .admin-uid {
    color: rgba(231, 236, 229, .58);
    font-size: .9rem;
  }

  .admin-user-pills,
  .admin-user-areas {
    gap: 7px;
  }

  .admin-role-pill,
  .admin-status-pill,
  .admin-area-pill {
    min-height: 30px;
    padding: 0 10px !important;
    border-radius: 9px !important;
    font-size: .82rem !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  .admin-area-pill.granted::before,
  .admin-area-pill.denied::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 7px;
    border: 1px solid rgba(255, 255, 255, .16);
    vertical-align: -4px;
  }

  .admin-area-pill.granted::before {
    background: linear-gradient(135deg, #9cfb72, #5fd65a);
    box-shadow: inset 0 0 0 3px rgba(7, 17, 6, .22);
  }

  .admin-user-meta {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .075);
  }

  .admin-user-meta .admin-meta-item:first-child {
    display: none;
  }

  .admin-meta-item {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    min-height: 0;
  }

  .admin-meta-item span {
    color: rgba(231, 236, 229, .48);
    font-size: .82rem;
    letter-spacing: 0;
    text-transform: none;
  }

  .admin-meta-item strong {
    color: rgba(244, 247, 242, .86);
    font-size: .9rem;
  }

  .admin-user-actions {
    width: 96px !important;
  }

  .admin-user-actions-trigger-desktop {
    display: none !important;
  }

  .admin-user-mobile-actions {
    display: grid;
    gap: 7px;
    width: 100%;
  }

  .admin-user-mobile-action {
    min-height: 47px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 10px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .035);
    color: #9cfb72;
    font-weight: 900;
  }

  .admin-user-row.is-mobile-page-hidden {
    display: none !important;
  }

  .admin-mobile-load-more {
    order: 5;
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    border-radius: 16px;
    border: 1px solid rgba(142, 243, 107, .18);
    background: rgba(142, 243, 107, .07);
    color: #9cfb72;
    font-weight: 900;
  }

  .admin-mobile-load-more.hidden {
    display: none !important;
  }

  .admin-user-mobile-action:last-child {
    color: rgba(244, 247, 242, .86);
  }

  .admin-sidebar-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2500 !important;
    display: block !important;
    background: rgba(0, 0, 0, .72) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .admin-sidebar-shell {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(85vw, 390px) !important;
    min-height: 100dvh !important;
    max-height: 100dvh;
    z-index: 2510 !important;
    display: flex !important;
    flex-direction: column;
    gap: 18px;
    padding: calc(env(safe-area-inset-top) + 28px) 22px calc(env(safe-area-inset-bottom) + 22px) !important;
    border-radius: 0 30px 30px 0 !important;
    border: 1px solid rgba(255, 255, 255, .1) !important;
    border-left: 0 !important;
    background:
      rgba(7, 10, 9, .985) !important;
    box-shadow: 18px 0 44px rgba(0, 0, 0, .55) !important;
    overflow-y: auto;
    transform: translateX(-106%);
  }

  .admin-workspace.is-sidebar-open .admin-sidebar-shell {
    transform: translateX(0);
  }

  .admin-workspace.is-sidebar-open .admin-sidebar-backdrop {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .admin-sidebar-top {
    align-items: start;
  }

  .admin-sidebar-kicker {
    color: #8ef36b;
    letter-spacing: .28em;
    font-size: .86rem;
  }

  .admin-sidebar-brand strong {
    font-size: 2rem;
    letter-spacing: -.04em;
  }

  .admin-sidebar-brand small {
    max-width: 250px;
    color: rgba(231, 236, 229, .63);
    font-size: 1rem;
  }

  .admin-sidebar-close {
    display: inline-flex !important;
    width: 58px;
    height: 58px;
    border-radius: 20px;
  }

  .admin-sidebar-scope {
    gap: 12px;
    font-size: 1rem;
  }

  .admin-sidebar-scope span {
    color: rgba(231, 236, 229, .62);
  }

  .admin-sidebar-scope select {
    min-height: 64px;
    border-radius: 20px;
    padding-inline: 60px 18px;
    border-color: rgba(142, 243, 107, .28);
    background: rgba(142, 243, 107, .045);
    color: #f2f7ef;
    font-size: 1.06rem;
  }

  .admin-sidebar-scope::before {
    content: "";
    position: absolute;
  }

  .admin-sidebar-nav {
    display: grid;
    gap: 8px;
  }

  .admin-workspace .admin-tab {
    position: relative;
    min-height: 62px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .028);
    color: rgba(242, 247, 239, .86);
    font-size: 1.08rem;
  }

  .admin-workspace .admin-tab svg {
    width: 28px;
    height: 28px;
    color: #8ef36b;
    opacity: 1;
  }

  .admin-workspace .admin-tab.active {
    border-color: rgba(142, 243, 107, .34);
    background:
      rgba(255, 255, 255, .03);
    color: #9cfb72;
  }

  .admin-workspace .admin-tab.active::before {
    content: "";
    width: 5px;
    height: 40px;
    border-radius: 999px;
    background: #8ef36b;
    position: absolute;
    left: 0;
  }

  .admin-tab-badge {
    min-width: 34px !important;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(142, 243, 107, .16) !important;
    color: #9cfb72 !important;
    font-size: .9rem;
  }

  .admin-mobile-drawer-footer {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(142, 243, 107, .18);
    background: rgba(142, 243, 107, .045);
  }

  .admin-mobile-drawer-icon {
    width: 58px;
    height: 58px;
    border-radius: 17px;
  }

  .admin-mobile-drawer-icon svg {
    width: 30px;
    height: 30px;
  }

  .admin-mobile-drawer-footer strong,
  .admin-mobile-drawer-footer small {
    display: block;
  }

  .admin-mobile-drawer-footer strong {
    color: #f4f7f2;
    font-size: 1rem;
  }

  .admin-mobile-drawer-footer small {
    color: rgba(231, 236, 229, .62);
  }

  .admin-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    min-height: calc(76px + env(safe-area-inset-bottom));
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: rgba(6, 9, 8, .965);
    box-shadow: none;
    pointer-events: auto;
  }

  .admin-mobile-bottom-nav button {
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: rgba(231, 236, 229, .62);
    display: grid;
    place-items: center;
    gap: 4px;
    font-size: .77rem;
    pointer-events: auto;
    touch-action: manipulation;
  }

  .admin-mobile-bottom-nav svg {
    width: 25px;
    height: 25px;
  }

  .admin-mobile-bottom-nav button.active {
    color: #8ef36b;
  }

  .admin-mobile-bottom-nav button.active svg {
    padding: 4px;
    border-radius: 10px;
    background: rgba(142, 243, 107, .14);
  }

  body.admin-action-open .admin-mobile-bottom-nav,
  body.admin-nav-open .admin-mobile-bottom-nav,
  body.admin-keyboard-open .admin-mobile-bottom-nav {
    pointer-events: none;
    opacity: 0;
    transform: translateY(110%);
  }

  .admin-mobile-bottom-nav {
    transition: opacity .14s ease, transform .14s ease;
  }
}

@media (max-width: 430px) {
  .admin-page .admin-main-top {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    padding-inline: 14px !important;
  }

  .admin-sidebar-toggle,
  .admin-exit-btn {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-radius: 16px !important;
  }

  .admin-main-copy h3 {
    font-size: clamp(1.82rem, 8vw, 2.7rem) !important;
  }

  .admin-main-copy p {
    font-size: .96rem !important;
  }

  .admin-main-pages {
    padding-inline: 12px;
  }

  .admin-mobile-revenue-card {
    grid-template-columns: 62px minmax(0, 1fr) 42px;
    gap: 12px;
    min-height: 112px;
    padding: 16px;
    border-radius: 24px;
  }

  .admin-mobile-revenue-icon {
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }

  .admin-mobile-revenue-icon svg {
    width: 34px;
    height: 34px;
  }

  .admin-mobile-stat-grid {
    gap: 10px;
  }

  .admin-mobile-stat-card {
    min-height: 128px;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 10px;
    padding: 14px;
  }

  .admin-mobile-stat-icon {
    width: 48px;
    height: 48px;
  }

  .admin-mobile-stat-copy strong {
    font-size: 2.25rem;
  }

  .admin-mobile-users-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-mobile-create-toggle {
    width: 100%;
  }

  .admin-users-table .admin-user-row {
    grid-template-columns: minmax(0, 1fr) 82px !important;
    padding: 13px !important;
  }

  .admin-user-actions {
    width: 82px !important;
  }

  .admin-user-mobile-action {
    min-height: 43px;
    font-size: .86rem;
  }

  .admin-user-mobile-action svg {
    width: 14px;
    height: 14px;
  }

  .admin-user-meta {
    grid-template-columns: 1fr !important;
  }
}


/* ──────────────────────────────────────────────────────────────────────────
   Books Modal v2 — redesign da ficha de livros (Estante / Por que ler / Dica)
   ────────────────────────────────────────────────────────────────────────── */

/* Container premium pra livros */
.books-modal-v2 {
  padding: 1.6rem 1.6rem 1.8rem;
}

/* Botão fechar circular vermelho (afeta o modal global de séries) */
#seriesModal .modal-close {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #ff4d4d, #d62828);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  box-shadow: 0 6px 16px rgba(214, 40, 40, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: transform var(--trans), box-shadow var(--trans), background var(--trans);
}
#seriesModal .modal-close:hover {
  background: linear-gradient(135deg, #ff6b6b, #e63a3a);
  box-shadow: 0 8px 22px rgba(214, 40, 40, 0.5);
  transform: scale(1.05);
  color: #fff;
}

/* Badge de formato (EPUB/PDF) */
.badge-pill.badge-format {
  background: rgba(180, 180, 180, 0.12);
  color: rgba(238, 243, 237, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .68rem;
  font-weight: 700;
}

/* Ações em 2x2 desktop, stack mobile */
.series-actions-books {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-top: 1rem;
}
.series-actions-books .action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .65rem 1rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: .92rem;
  border: 1px solid transparent;
  transition: transform var(--trans), background var(--trans), border-color var(--trans), box-shadow var(--trans);
  cursor: pointer;
}
.series-actions-books .action-pill svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.series-actions-books .action-pill:hover {
  transform: translateY(-1px);
}
.series-actions-books .action-pill:focus-visible {
  outline: 2px solid rgba(158, 251, 114, 0.7);
  outline-offset: 2px;
}

/* Ler agora — verde primário */
.series-actions-books .action-read {
  background: linear-gradient(135deg, #96f56a, #7ed957);
  color: #0c1810;
  border-color: rgba(158, 251, 114, 0.35);
  box-shadow: 0 8px 22px rgba(126, 217, 87, 0.28);
}
.series-actions-books .action-read:hover {
  background: linear-gradient(135deg, #a3ff75, #8be861);
  box-shadow: 0 10px 26px rgba(126, 217, 87, 0.4);
}

/* Adicionar à prateleira — roxo destacado */
.series-actions-books .action-shelf {
  background: linear-gradient(135deg, #925cff, #7b3ff2);
  color: #fff;
  border-color: rgba(146, 92, 255, 0.45);
  box-shadow: 0 8px 22px rgba(123, 63, 242, 0.32);
}
.series-actions-books .action-shelf:hover {
  background: linear-gradient(135deg, #a679ff, #8a52ff);
  box-shadow: 0 10px 26px rgba(123, 63, 242, 0.45);
}
.series-actions-books .action-shelf.is-active {
  background: linear-gradient(135deg, rgba(146, 92, 255, 0.22), rgba(126, 217, 87, 0.2));
  color: #d9c8ff;
  border-color: rgba(146, 92, 255, 0.55);
  box-shadow: 0 4px 14px rgba(123, 63, 242, 0.22) inset;
}

/* Favoritar — secundário rosado */
.series-actions-books .action-favorite {
  background: rgba(255, 90, 130, 0.06);
  color: rgba(238, 243, 237, 0.92);
  border-color: rgba(255, 120, 150, 0.18);
}
.series-actions-books .action-favorite:hover {
  background: rgba(255, 90, 130, 0.12);
  border-color: rgba(255, 120, 150, 0.32);
}
.series-actions-books .action-favorite.is-active {
  background: rgba(255, 90, 130, 0.16);
  color: #ffb8c8;
  border-color: rgba(255, 120, 150, 0.45);
}
.series-actions-books .action-favorite svg {
  color: #ff7896;
}

/* Reportar — âmbar discreto */
.series-actions-books .action-report {
  background: rgba(240, 180, 41, 0.06);
  color: rgba(238, 243, 237, 0.92);
  border-color: rgba(240, 180, 41, 0.18);
}
.series-actions-books .action-report:hover {
  background: rgba(240, 180, 41, 0.12);
  border-color: rgba(240, 180, 41, 0.32);
  color: #f0b429;
}
.series-actions-books .action-report svg {
  color: #f0b429;
}

/* Por que ler — card lateral/inferior */
.why-read-card {
  margin-top: 1.1rem;
  padding: .95rem 1.05rem;
  background: linear-gradient(135deg, rgba(126, 217, 87, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(126, 217, 87, 0.16);
  border-radius: 16px;
  backdrop-filter: blur(6px);
}
.why-read-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-2, #9efb72);
  margin-bottom: .55rem;
}
.why-read-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .35rem .9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.why-read-list li {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: rgba(238, 243, 237, 0.88);
}
.why-read-dot {
  color: var(--green-2, #9efb72);
  font-weight: 900;
}

/* Dica do rodapé */
.series-footer-tip {
  margin-top: 1.1rem;
  padding: .65rem 1rem;
  font-size: .8rem;
  color: rgba(183, 192, 180, 0.85);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-align: center;
}

/* Labels alternativos: full (desktop) vs short (mobile). Os botões secundários
   ficam em 3 colunas em mobile, então textos longos como "Adicionar à minha
   prateleira" não cabem. Cada botão tem dois <span>; CSS escolhe qual mostra. */
.action-label-short { display: none; }
.action-label-full { display: inline; }

/* Mobile: "Ler agora" full-width em cima; os 3 secundários (Prateleira,
   Favoritar, Reportar) numa linha só de 3 colunas, em modo compacto.
   Antes era stack vertical (1 col), o que ocupava 4 linhas inteiras. */
@media (max-width: 720px) {
  .series-actions-books {
    grid-template-columns: 1fr 1fr 1fr;
    gap: .5rem;
    margin-top: .85rem;
  }
  .series-actions-books .action-pill.action-read {
    grid-column: 1 / -1;
    min-height: 50px;
    padding: .85rem 1rem;
    font-size: .94rem;
  }
  .series-actions-books .action-pill {
    flex-direction: column;
    gap: .28rem;
    min-height: 64px;
    padding: .55rem .25rem;
    font-size: .7rem;
    line-height: 1.15;
    text-align: center;
    overflow: hidden;
  }
  .series-actions-books .action-pill.action-read {
    flex-direction: row;
    gap: .55rem;
  }
  /* Troca pros labels curtos só em mobile */
  .series-actions-books .action-pill .action-label-full { display: none; }
  .series-actions-books .action-pill .action-label-short { display: inline; }
  /* action-read continua com seu próprio span (sem full/short — texto já é
     curto: "Ler agora" / "Continuar livro") */
  .books-modal-v2 {
    padding: 1.1rem 1.1rem 1.4rem;
  }
  .why-read-list {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Estante: indicador visual nas cards + visual da seção "Sua estante"
   ────────────────────────────────────────────────────────────────────────── */

.book-lib-shelf-badge {
  position: absolute;
  top: .45rem;
  left: .45rem;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #925cff, #7b3ff2);
  color: #fff;
  box-shadow: 0 4px 14px rgba(123, 63, 242, 0.45), 0 0 0 2px rgba(11, 21, 17, 0.85);
  z-index: 2;
  pointer-events: none;
}
.book-lib-shelf-badge svg {
  width: 14px;
  height: 14px;
}

.book-lib-card.is-on-shelf .book-lib-cover-wrap {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), 0 0 0 2px rgba(146, 92, 255, 0.45);
}

.shelf-section {
  margin-block: 1.4rem;
  padding: 1.1rem 1.2rem 1.3rem;
  background:
    linear-gradient(180deg, rgba(146, 92, 255, 0.05), rgba(255, 255, 255, 0.01)),
    rgba(12, 22, 18, 0.55);
  border: 1px solid rgba(146, 92, 255, 0.12);
  border-radius: 18px;
  position: relative;
}
.shelf-section::before {
  content: "";
  position: absolute;
  inset-inline: 1.2rem;
  bottom: .35rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(146, 92, 255, 0.35), transparent);
  opacity: .6;
  pointer-events: none;
}
.shelf-section-header {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .85rem;
}
.shelf-section-header .section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.shelf-section-header .section-title::before {
  content: "📚";
  font-size: 1.1rem;
}
.shelf-subsection {
  margin-top: .9rem;
}
.shelf-subsection:first-of-type {
  margin-top: 0;
}
.shelf-subsection-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(238, 243, 237, 0.78);
  margin-bottom: .55rem;
  padding-left: .15rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.shelf-subsection.shelf-reading .shelf-subsection-title { color: #9efb72; }
.shelf-subsection.shelf-want-to-read .shelf-subsection-title { color: #c8a8ff; }
.shelf-subsection.shelf-finished .shelf-subsection-title { color: #b7c0b4; }
.shelf-subsection .h-scroll {
  display: flex;
  overflow-x: auto;
  gap: .9rem;
  padding-bottom: .55rem;
  scrollbar-width: thin;
}
.shelf-subsection .book-lib-card {
  flex-shrink: 0;
  width: 138px;
}

@media (max-width: 720px) {
  .shelf-section {
    padding: .85rem .9rem 1.05rem;
    border-radius: 14px;
  }
  .shelf-subsection .book-lib-card {
    width: 118px;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Página dedicada "Minha prateleira" (acessada pelo perfil)
   ────────────────────────────────────────────────────────────────────────── */

.my-shelves-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.4rem 3rem;
  color: var(--text);
}

.my-shelves-header {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.4rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(146, 92, 255, 0.16), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(126, 217, 87, 0.06), transparent 60%),
    rgba(11, 21, 17, 0.7);
  border: 1px solid rgba(146, 92, 255, 0.16);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.my-shelves-back {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: background var(--trans), border-color var(--trans), transform var(--trans);
}
.my-shelves-back:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(146, 92, 255, 0.35);
  transform: translateX(-2px);
}
.my-shelves-back svg { width: 18px; height: 18px; }

.my-shelves-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(146, 92, 255, 0.12);
  border: 2px solid rgba(146, 92, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.my-shelves-avatar img { width: 100%; height: 100%; object-fit: cover; }

.my-shelves-title-wrap {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.my-shelves-kicker {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(200, 168, 255, 0.85);
}

.my-shelves-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -.01em;
}

.my-shelves-sub {
  margin: 0;
  font-size: .85rem;
  color: rgba(238, 243, 237, 0.7);
}

/* Empty state */
.my-shelves-empty {
  text-align: center;
  padding: 4rem 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.015);
}
.my-shelves-empty svg {
  width: 56px;
  height: 56px;
  color: rgba(146, 92, 255, 0.35);
  margin-bottom: .9rem;
}
.my-shelves-empty p {
  margin: 0 0 1rem;
  color: rgba(238, 243, 237, 0.7);
}
.my-shelves-empty .btn-primary {
  background: linear-gradient(135deg, #96f56a, #7ed957);
  color: #0c1810;
  border: none;
  padding: .65rem 1.4rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Grid de 3 colunas no desktop, stack no mobile */
.my-shelves-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.my-shelves-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.my-shelf-column {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1rem 1rem 1.1rem;
  background: rgba(12, 22, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  min-height: 260px;
}
.shelf-col-reading { border-color: rgba(126, 217, 87, 0.25); }
.shelf-col-want { border-color: rgba(146, 92, 255, 0.3); }
.shelf-col-finished { border-color: rgba(255, 200, 80, 0.22); }

.my-shelf-col-head {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.my-shelf-col-icon { font-size: 1.2rem; }
.my-shelf-col-title {
  margin: 0;
  font-size: .98rem;
  font-weight: 700;
  flex: 1;
}
.my-shelf-col-count {
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(238, 243, 237, 0.8);
}
.shelf-col-reading .my-shelf-col-count { background: rgba(126, 217, 87, 0.16); color: #9efb72; }
.shelf-col-want .my-shelf-col-count { background: rgba(146, 92, 255, 0.18); color: #c8a8ff; }
.shelf-col-finished .my-shelf-col-count { background: rgba(255, 200, 80, 0.16); color: #ffcb5c; }

.my-shelf-col-body {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.my-shelf-col-empty {
  color: rgba(238, 243, 237, 0.45);
  font-size: .82rem;
  font-style: italic;
  text-align: center;
  padding: 1.5rem .5rem;
}

/* Linhas (capa + detalhes) */
.my-shelf-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: .75rem;
  padding: .65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--trans), border-color var(--trans);
}
.my-shelf-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(146, 92, 255, 0.18);
}

.my-shelf-cover-wrap {
  width: 72px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}
.my-shelf-cover { width: 100%; height: 100%; object-fit: cover; }

.my-shelf-row-body {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 0;
}

.my-shelf-row-title {
  margin: 0;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.my-shelf-row-author {
  margin: 0;
  font-size: .75rem;
  color: rgba(238, 243, 237, 0.6);
}
.my-shelf-row-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .8rem;
  font-size: .72rem;
  color: rgba(238, 243, 237, 0.75);
  margin-top: .15rem;
}
.my-shelf-row-pct strong { color: #9efb72; }

.my-shelf-row-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-top: .25rem;
}
.my-shelf-row-progress > div {
  height: 100%;
  background: linear-gradient(90deg, #7ed957, #96f56a);
}

.my-shelf-row-actions {
  display: flex;
  gap: .4rem;
  margin-top: .45rem;
}
.my-shelf-row-read,
.my-shelf-row-remove {
  border: none;
  padding: .35rem .65rem;
  border-radius: 8px;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--trans);
}
.my-shelf-row-read {
  background: linear-gradient(135deg, #96f56a, #7ed957);
  color: #0c1810;
}
.my-shelf-row-read:hover { filter: brightness(1.08); }
.my-shelf-row-remove {
  background: rgba(255, 90, 90, 0.08);
  color: rgba(255, 130, 130, 0.85);
  border: 1px solid rgba(255, 90, 90, 0.18);
}
.my-shelf-row-remove:hover {
  background: rgba(255, 90, 90, 0.15);
  border-color: rgba(255, 90, 90, 0.4);
}

@media (max-width: 980px) {
  .my-shelves-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .my-shelves-header {
    grid-template-columns: auto 1fr;
    gap: .8rem;
  }
  .my-shelves-avatar { display: none; }
  .my-shelves-title { font-size: 1.35rem; }
}

/* Botão "Minha prateleira" no perfil */
.profile-account-panel .profile-shelves-btn {
  background: linear-gradient(135deg, var(--green-2), var(--green)) !important;
  border-color: var(--green-glow) !important;
  color: #081008 !important;
}
.profile-account-panel .profile-shelves-btn:hover {
  filter: brightness(1.08);
}

/* ──────────────────────────────────────────────────────────────────────────
   Pacote D — Drill-down de eventos no admin Saúde
   ────────────────────────────────────────────────────────────────────────── */

.admin-event-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .8rem;
  flex-wrap: wrap;
}

.admin-event-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.admin-event-filter {
  padding: .32rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(238, 243, 237, 0.7);
  font-size: .74rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--trans), color var(--trans), border-color var(--trans);
}
.admin-event-filter:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.admin-event-filter.is-active {
  background: rgba(126, 217, 87, 0.18);
  color: #9efb72;
  border-color: rgba(126, 217, 87, 0.45);
}

/* Filtragem via atributos no container — esconde rows que não batem */
.admin-billing-events[data-active-filter="error"] .admin-billing-event:not(.is-error) { display: none; }
.admin-billing-events[data-active-filter="webhook"] .admin-billing-event:not(.is-webhook):not(.is-error) { display: none; }
.admin-billing-events[data-active-filter="payment"] .admin-billing-event:not(.is-payment) { display: none; }

/* Row expansível com <details> nativa */
details.admin-billing-event {
  display: block;
  padding: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: .45rem;
  overflow: hidden;
  transition: border-color var(--trans);
}
details.admin-billing-event:hover {
  border-color: rgba(146, 92, 255, 0.18);
}
details.admin-billing-event.is-error {
  border-left: 3px solid rgba(255, 145, 80, 0.6);
}
details.admin-billing-event.is-payment {
  border-left: 3px solid rgba(126, 217, 87, 0.55);
}
details.admin-billing-event.is-webhook {
  border-left: 3px solid rgba(146, 92, 255, 0.5);
}

details.admin-billing-event > summary {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .65rem .85rem .65rem 1.4rem;
  cursor: pointer;
  list-style: none;
  position: relative;
}
details.admin-billing-event > summary::-webkit-details-marker { display: none; }
details.admin-billing-event > summary::before {
  content: "▸";
  position: absolute;
  left: .6rem;
  top: .75rem;
  font-size: .7rem;
  color: rgba(238, 243, 237, 0.4);
  transition: transform var(--trans);
}
details.admin-billing-event[open] > summary::before {
  transform: rotate(90deg);
}

.admin-billing-event-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.admin-billing-event-badge {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
}
.admin-billing-event.is-error .admin-billing-event-badge { color: #ffa37a; }
.admin-billing-event.is-payment .admin-billing-event-badge { color: #9efb72; }
.admin-billing-event.is-webhook .admin-billing-event-badge { color: #c8a8ff; }

.admin-billing-event-when {
  font-size: .72rem;
  color: rgba(238, 243, 237, 0.5);
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-billing-event-detail {
  font-size: .8rem;
  color: rgba(238, 243, 237, 0.72);
  line-height: 1.45;
  word-break: break-word;
}
.admin-billing-event-detail strong {
  color: var(--text);
  font-weight: 600;
}

.admin-billing-event-payload {
  margin: 0;
  padding: .65rem .85rem .85rem;
  background: rgba(0, 0, 0, 0.32);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace;
  font-size: .72rem;
  line-height: 1.45;
  color: rgba(238, 243, 237, 0.78);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
}

@media (max-width: 720px) {
  details.admin-billing-event > summary {
    grid-template-columns: 1fr;
    gap: .25rem;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Pacote C — Visão de assinaturas no admin Saúde
   ────────────────────────────────────────────────────────────────────────── */

.admin-subs-section {
  margin-top: 1.4rem;
  padding: 1.2rem 1.3rem 1.4rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.admin-subs-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.admin-subs-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.admin-subs-sub {
  font-size: .78rem;
  color: rgba(238, 243, 237, 0.6);
}

.admin-subs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .8rem;
  margin-bottom: 1.2rem;
}

.admin-subs-card {
  padding: .85rem 1rem;
  border-radius: 12px;
  background: rgba(12, 22, 18, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: .25rem;
  transition: border-color var(--trans);
}
.admin-subs-card.is-good {
  border-left: 3px solid rgba(126, 217, 87, 0.6);
}
.admin-subs-card.is-warn {
  border-left: 3px solid rgba(255, 200, 80, 0.6);
}
.admin-subs-card.is-revenue {
  border-left: 3px solid rgba(146, 92, 255, 0.55);
}
.admin-subs-card.is-neutral {
  border-left: 3px solid rgba(255, 255, 255, 0.1);
}
.admin-subs-card.is-bad {
  border-left: 3px solid rgba(255, 100, 100, 0.6);
}
.admin-subs-card.is-soon {
  border-left: 3px solid rgba(255, 200, 80, 0.6);
}

.admin-runtime-section {
  margin-top: 1.4rem;
  padding: 1.2rem 1.3rem 1.4rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}
.admin-runtime-section .admin-subs-head { margin-bottom: .9rem; }
.admin-runtime-section .admin-summary-block { margin-top: 1rem; }

.admin-subs-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(238, 243, 237, 0.65);
}
.admin-subs-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1;
}
.admin-subs-detail {
  font-size: .72rem;
  color: rgba(238, 243, 237, 0.55);
}

.admin-subs-detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 880px) {
  .admin-subs-detail-row { grid-template-columns: 1fr; }
}

.admin-subs-table {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.admin-subs-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: .6rem;
  padding: .5rem .7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: .78rem;
}
.admin-subs-row strong {
  font-size: .82rem;
  color: var(--text);
}
.admin-subs-row span {
  color: rgba(238, 243, 237, 0.65);
}
.admin-subs-row-when {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.admin-subs-row.is-urgent {
  border-color: rgba(255, 100, 100, 0.3);
}
.admin-subs-row.is-urgent .admin-subs-row-when {
  color: #ff9b80;
}
.admin-subs-row.is-soon {
  border-color: rgba(255, 200, 80, 0.25);
}
.admin-subs-row.is-soon .admin-subs-row-when {
  color: #ffcb5c;
}
.admin-subs-row.is-stale {
  border-color: rgba(255, 145, 80, 0.25);
}
.admin-subs-row.is-stale .admin-subs-row-when {
  color: #ff9b80;
}

@media (max-width: 720px) {
  .admin-subs-row {
    grid-template-columns: 1fr 1fr;
    gap: .35rem .7rem;
  }
}

/* ── Perfil: grid do topo (Prateleira / Pedir obra / Pedidos recentes) ── */
.profile-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.profile-top-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 168px;
}
.profile-top-grid .profile-shelf-cta-card {
  padding: 22px 20px;
}
.profile-top-grid .profile-shelf-cta-copy {
  align-items: flex-start;
  gap: 14px;
}
.profile-top-grid .profile-shelf-cta-copy h3 {
  font-size: 1.05rem;
  margin: 0 0 4px;
}
.profile-top-grid .profile-shelf-cta-copy p {
  font-size: 0.85rem;
  margin: 0;
}
.profile-top-grid .profile-shelf-cta-action {
  margin-top: auto;
}

/* Pedir obra: card compacto com botão grande */
.profile-request-card .profile-card-icon {
  color: #7ed957;
}
.profile-request-card .profile-card-head {
  margin-bottom: 0;
}
.profile-request-card p {
  font-size: 0.85rem;
  color: rgba(239, 245, 235, 0.62);
  line-height: 1.4;
  margin: 4px 0 0;
}
.profile-request-new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #7ed957, #5fb840);
  color: #071a05;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s;
}
.profile-request-new-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(126, 217, 87, 0.32);
}
.profile-request-new-btn svg {
  width: 16px;
  height: 16px;
}

/* Pedidos recentes: lista compacta com badges */
.profile-recent-requests-card .profile-card-head {
  margin-bottom: 8px;
}
.profile-card-icon.profile-card-icon-recent {
  color: #ffb84a;
}
.profile-recent-requests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-recent-request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.profile-recent-request-title {
  font-size: 0.88rem;
  color: rgba(239, 245, 235, 0.88);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.profile-recent-request-status {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.profile-recent-request-status.is-open {
  color: #ffd6a4;
  background: rgba(255, 170, 64, 0.14);
}
.profile-recent-request-status.is-review {
  color: #c2e0ff;
  background: rgba(100, 170, 255, 0.14);
}
.profile-recent-request-status.is-added {
  color: #c8ffc0;
  background: rgba(114, 219, 98, 0.16);
}
.profile-recent-request-status.is-rejected {
  color: #ffb5b5;
  background: rgba(255, 88, 88, 0.13);
}
.profile-recent-requests-empty {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(239, 245, 235, 0.5);
  font-style: italic;
}

.profile-referral-link-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.profile-referral-link-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  padding: .7rem .9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.028);
  color: var(--text);
  font-size: .85rem;
  outline: none;
}
.profile-referral-link-input:focus {
  border-color: var(--green-glow);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-dim) 80%, transparent);
}
.profile-referral-copy-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.profile-referral-copy-btn.is-copied {
  color: var(--green-2);
  border-color: var(--green-glow);
}
.profile-referral-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.profile-referral-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 120px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
.profile-referral-stat strong {
  font-size: 1.3rem;
  line-height: 1.1;
  color: var(--green-2);
}
.profile-referral-stat span {
  font-size: .76rem;
  color: var(--text2);
}
.profile-referral-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.profile-referral-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.profile-referral-row-name {
  font-size: 0.88rem;
  color: rgba(239, 245, 235, 0.88);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-referral-row-status {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
}
.profile-referral-row-status.is-converted {
  color: #c8ffc0;
  background: rgba(114, 219, 98, 0.16);
}
.profile-referral-row-status.is-pending {
  color: rgba(239, 245, 235, 0.55);
  background: rgba(255, 255, 255, 0.05);
}
.profile-referral-empty {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(239, 245, 235, 0.5);
  font-style: italic;
}
@media (max-width: 640px) {
  .profile-referral-link-row {
    flex-direction: column;
  }
  .profile-referral-stat {
    flex: 1 1 100%;
  }
}

@media (max-width: 960px) {
  .profile-top-grid {
    grid-template-columns: 1fr 1fr;
  }
  .profile-top-grid .profile-recent-requests-card {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .profile-top-grid {
    grid-template-columns: 1fr;
  }
  .profile-top-grid .profile-recent-requests-card {
    grid-column: auto;
  }
}

/* ── Modal: Pedir nova obra ──────────────────────────────────────────── */
.modal-request-panel {
  width: min(440px, calc(100vw - 32px));
  max-height: min(90vh, 720px);
  padding: 28px 26px 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 22, 19, 0.98), rgba(9, 12, 11, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}
.request-modal-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.request-modal-icon {
  width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(126, 217, 87, 0.12);
  color: #7ed957;
}
.request-modal-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.request-modal-head h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #f2f7ef;
}
.request-modal-head p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(239, 245, 235, 0.62);
  max-width: 320px;
}
.request-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.request-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: rgba(239, 245, 235, 0.78);
  font-weight: 600;
}
.request-field input,
.request-field select,
.request-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  padding: 12px 14px;
  color: #f2f7ef;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color .15s, background .15s;
}
.request-field input:focus,
.request-field select:focus,
.request-field textarea:focus {
  outline: none;
  border-color: rgba(126, 217, 87, 0.5);
  background: rgba(255, 255, 255, 0.06);
}
.request-field textarea {
  resize: vertical;
  min-height: 5rem;
  line-height: 1.5;
}
.request-details {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}
.request-details > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(239, 245, 235, 0.78);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.request-details > summary::-webkit-details-marker { display: none; }
.request-details > summary::after {
  content: '⌃';
  display: inline-block;
  transform: rotate(180deg);
  font-size: 0.85rem;
  color: rgba(239, 245, 235, 0.5);
  transition: transform .15s;
}
.request-details[open] > summary::after {
  transform: rotate(0deg);
}
.request-details-body {
  padding: 4px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.request-form-msg {
  margin: 0;
  min-height: 1.1em;
  font-size: 0.82rem;
}
.request-form-submit {
  width: 100%;
  min-height: 50px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #7ed957, #5fb840);
  color: #071a05;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 4px;
  transition: transform .12s, box-shadow .15s;
}
.request-form-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(126, 217, 87, 0.34);
}
.request-form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
@media (max-width: 480px) {
  .modal-request-panel {
    padding: 22px 18px 20px;
    border-radius: 18px;
  }
  .request-modal-head h2 {
    font-size: 1.15rem;
  }
}

/* ── Admin: aba Pedidos ───────────────────────────────────────────────── */
.admin-requests-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-requests-panel {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.admin-request-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  max-height: min(70vh, 720px);
  overflow-y: auto;
  padding-right: .25rem;
}
.admin-request-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.admin-request-row[data-request-status="added"] {
  border-color: rgba(114, 219, 98, 0.22);
  background: rgba(114, 219, 98, 0.04);
}
.admin-request-row[data-request-status="rejected"] {
  border-color: rgba(255, 88, 88, 0.18);
  background: rgba(255, 88, 88, 0.03);
  opacity: .78;
}
.admin-request-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}
.admin-request-row-title strong {
  display: block;
  color: var(--text-primary, #fff);
  font-size: .98rem;
  font-weight: 700;
}
.admin-request-row-title small {
  color: var(--text-muted, #98a2b3);
  font-size: .78rem;
}
.admin-request-status {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .25rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.admin-request-status.is-open {
  color: #ffd6a4;
  background: rgba(255, 170, 64, 0.12);
}
.admin-request-status.is-in_review {
  color: #c2e0ff;
  background: rgba(100, 170, 255, 0.12);
}
.admin-request-status.is-added {
  color: #c8ffc0;
  background: rgba(114, 219, 98, 0.14);
}
.admin-request-status.is-rejected {
  color: #ffb5b5;
  background: rgba(255, 88, 88, 0.12);
}
.admin-request-line {
  font-size: .85rem;
  color: var(--text-secondary, #cdd5df);
  line-height: 1.45;
}
.admin-request-line span {
  color: var(--text-muted, #98a2b3);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: .35rem;
}
.admin-request-note-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .78rem;
  color: var(--text-muted, #98a2b3);
}
.admin-request-note-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 2.6rem;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-primary, #fff);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: .5rem .65rem;
  font: inherit;
  font-size: .85rem;
}
.admin-request-row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.admin-request-row-foot small {
  color: var(--text-muted, #98a2b3);
  font-size: .75rem;
}
.admin-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
@media (max-width: 540px) {
  .admin-request-row-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-request-actions {
    width: 100%;
  }
  .admin-request-actions .mini-btn {
    flex: 1 0 calc(50% - .4rem);
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   PRATELEIRA PESSOAL (v2) — 5 modos: Resumo / Lista / Grid / Estante / Timeline
   ═══════════════════════════════════════════════════════════════════════ */

.shelf-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  color: #f2f7ef;
  contain: layout style;
}
/* Hint pro browser: o body troca de conteúdo com frequência */
.shelf-body {
  contain: layout style;
  animation: shelfBodyFade .18s ease;
}
@keyframes shelfBodyFade {
  from { opacity: 0.6; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Cards isolam paint pra reduzir reflow ao trocar de modo */
.shelf-compact-row,
.shelf-grid-card,
.shelf-stand-card,
.shelf-timeline-row {
  contain: layout style paint;
}

.shelf-page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.shelf-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f2f7ef;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s;
}
.shelf-back-btn:hover { background: rgba(255, 255, 255, 0.08); }
.shelf-back-btn svg { width: 18px; height: 18px; }
.shelf-page-title-wrap { flex: 1; min-width: 0; }
.shelf-page-title { margin: 0; font-size: 1.65rem; font-weight: 800; letter-spacing: -0.01em; }
.shelf-page-sub { margin: 4px 0 0; font-size: 0.92rem; color: rgba(239, 245, 235, 0.6); }

/* Switcher de área (Mangás/Livros/HQs) - aparece abaixo do header da prateleira */
.shelf-area-switcher {
  display: flex;
  gap: 6px;
  margin: 0 0 22px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.shelf-area-switcher::-webkit-scrollbar { display: none; }
.shelf-area-btn {
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(239, 245, 235, 0.62);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.shelf-area-btn:hover { color: #f2f7ef; background: rgba(255, 255, 255, 0.04); }
.shelf-area-btn.is-active {
  background: linear-gradient(135deg, #7ed957, #5fb840);
  color: #071a05;
  box-shadow: 0 4px 12px rgba(126, 217, 87, 0.25);
}

/* "Modo prateleira" no overlay de busca */
.search-overlay.is-shelf-add-mode::before {
  content: '+ Toque para adicionar a prateleira';
  display: block;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c8ffc0;
  padding: 8px 16px;
  background: rgba(126, 217, 87, 0.12);
  border-bottom: 1px solid rgba(126, 217, 87, 0.2);
  letter-spacing: 0.02em;
}

/* Seletor de modos */
.shelf-view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.shelf-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(239, 245, 235, 0.62);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.shelf-view-btn:hover { color: #f2f7ef; background: rgba(255, 255, 255, 0.04); }
.shelf-view-btn.is-active {
  background: rgba(126, 217, 87, 0.16);
  color: #c8ffc0;
}
.shelf-view-icon svg { width: 14px; height: 14px; display: block; }

/* Resumo grande */
.shelf-summary-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 26px;
  border-radius: 22px;
  border: 1px solid rgba(126, 217, 87, 0.24);
  background:
    linear-gradient(135deg, rgba(126, 217, 87, 0.14), rgba(126, 217, 87, 0.03)),
    rgba(9, 12, 11, 0.78);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  margin-bottom: 18px;
}
.shelf-summary-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  background: rgba(126, 217, 87, 0.16);
  color: #7ed957;
}
.shelf-summary-icon svg { width: 32px; height: 32px; }
.shelf-summary-body { flex: 1; min-width: 0; }
.shelf-summary-kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: #7ed957;
  font-weight: 700;
  margin-bottom: 6px;
}
.shelf-summary-headline {
  margin: 0;
  font-size: 1.15rem;
  color: #f2f7ef;
  line-height: 1.45;
  font-weight: 500;
}
.shelf-summary-headline strong { color: #c8ffc0; font-weight: 800; }
.shelf-summary-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  width: 130px;
  height: 60px;
  opacity: 0.85;
  flex: 0 0 auto;
}
.shelf-chart-bar {
  flex: 1;
  height: var(--h, 50%);
  background: linear-gradient(180deg, #7ed957, rgba(126, 217, 87, 0.25));
  border-radius: 4px;
  animation: shelfChartGrow .5s ease;
  animation-delay: calc(var(--i, 0) * 60ms);
  animation-fill-mode: backwards;
}
@keyframes shelfChartGrow {
  from { transform: scaleY(0.1); opacity: 0; }
  to   { transform: scaleY(1); opacity: 0.85; }
}

/* Stats row (4 cards) */
.shelf-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.shelf-stats-row-compact { margin-bottom: 18px; }
.shelf-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  min-height: 84px;
}
.shelf-stat-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: rgba(126, 217, 87, 0.1);
  color: #7ed957;
}
.shelf-stat-icon svg { width: 22px; height: 22px; }
.shelf-stat-icon-streak { background: rgba(255, 138, 67, 0.12); color: #ff8a43; }
.shelf-stat-icon-calendar { background: rgba(149, 128, 255, 0.12); color: #b6a8ff; }
.shelf-stat-icon-chap { background: rgba(149, 128, 255, 0.12); color: #b6a8ff; }
.shelf-stat-label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: rgba(239, 245, 235, 0.6);
  font-weight: 600;
  margin-bottom: 3px;
}
.shelf-stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #f2f7ef;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* Lista compacta (modo 1 / 5) */
.shelf-list-section { display: flex; flex-direction: column; gap: 12px; }
.shelf-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}
.shelf-list-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #f2f7ef; }
.shelf-sort-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  color: #f2f7ef;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.shelf-compact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shelf-compact-row {
  display: grid;
  grid-template-columns: 52px 1.4fr 1.2fr 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.shelf-compact-row:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(126, 217, 87, 0.18);
}
.shelf-compact-cover {
  position: relative;
  width: 52px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}
.shelf-compact-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shelf-cover-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: rgba(239, 245, 235, 0.4);
  background: linear-gradient(135deg, rgba(126, 217, 87, 0.18), rgba(149, 128, 255, 0.14));
}
.shelf-compact-info { min-width: 0; }
.shelf-compact-title {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
  color: #f2f7ef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shelf-compact-chapter {
  display: block;
  font-size: 0.78rem;
  color: #7ed957;
  font-weight: 600;
  margin-top: 2px;
}
.shelf-compact-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shelf-progress-bar {
  flex: 1;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}
.shelf-progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7ed957, #c8ffc0);
  border-radius: inherit;
  transition: width .4s ease;
}
.shelf-progress-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(239, 245, 235, 0.85);
  white-space: nowrap;
}
.shelf-compact-meta {
  font-size: 0.78rem;
  color: rgba(239, 245, 235, 0.55);
  white-space: nowrap;
}
.shelf-compact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shelf-continue-btn {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(126, 217, 87, 0.32);
  background: rgba(126, 217, 87, 0.12);
  color: #c8ffc0;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.shelf-continue-btn:hover {
  background: linear-gradient(135deg, #7ed957, #5fb840);
  color: #071a05;
  border-color: transparent;
}
.shelf-row-menu {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(239, 245, 235, 0.55);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.shelf-row-menu:hover { background: rgba(255, 255, 255, 0.05); color: #f2f7ef; }
.shelf-row-menu svg { width: 16px; height: 16px; }
.shelf-add-btn {
  align-self: stretch;
  margin-top: 6px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(126, 217, 87, 0.32);
  background: transparent;
  color: #7ed957;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.shelf-add-btn:hover {
  background: rgba(126, 217, 87, 0.06);
  border-color: rgba(126, 217, 87, 0.55);
}
.shelf-add-btn-center { align-self: center; max-width: 320px; width: 100%; }

/* Modo Grid (2) */
.shelf-grid-section { }
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.shelf-grid-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.shelf-grid-card:hover {
  transform: translateY(-4px);
  border-color: rgba(126, 217, 87, 0.32);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}
.shelf-grid-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.shelf-grid-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shelf-grid-gradient {
  position: absolute;
  inset: auto 0 0 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.65));
  pointer-events: none;
}
.shelf-grid-continue {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #7ed957, #5fb840);
  color: #071a05;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(126, 217, 87, 0.32);
}
.shelf-grid-menu {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}
.shelf-grid-menu .shelf-row-menu {
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  backdrop-filter: blur(6px);
}
.shelf-grid-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shelf-grid-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #f2f7ef;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shelf-grid-chapter { font-size: 0.82rem; color: #7ed957; font-weight: 600; }
.shelf-grid-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(239, 245, 235, 0.65);
}
.shelf-grid-stats-foot {
  font-size: 0.76rem;
  color: rgba(239, 245, 235, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
  margin-top: 2px;
}
.shelf-grid-add {
  border: 1px dashed rgba(126, 217, 87, 0.3);
  background: transparent;
  color: #7ed957;
  font-weight: 700;
  border-radius: 18px;
  cursor: pointer;
  min-height: 280px;
  transition: background .15s, border-color .15s;
}
.shelf-grid-add:hover {
  background: rgba(126, 217, 87, 0.06);
  border-color: rgba(126, 217, 87, 0.55);
}

/* Modo Estante vertical (3) */
.shelf-stand-section { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.shelf-stand-row {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 4px;
}
.shelf-stand-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 168px;
}
.shelf-stand-cover-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.shelf-stand-cover {
  position: relative;
  width: 168px;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(126, 217, 87, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(126, 217, 87, 0.06);
  transition: transform .15s, box-shadow .15s;
}
.shelf-stand-cover-btn:hover .shelf-stand-cover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(126, 217, 87, 0.25);
}
.shelf-stand-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shelf-stand-pct {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  color: #c8ffc0;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}
.shelf-stand-body { display: flex; flex-direction: column; gap: 4px; }
.shelf-stand-title { font-size: 0.92rem; font-weight: 700; color: #f2f7ef; }
.shelf-stand-chapter { font-size: 0.76rem; color: #7ed957; font-weight: 600; }
.shelf-stand-when { font-size: 0.72rem; color: rgba(239, 245, 235, 0.5); }
.shelf-stand-board {
  width: 100%;
  max-width: 1100px;
  height: 14px;
  margin-top: 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(139, 92, 56, 0.5), rgba(78, 53, 32, 0.5));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

/* Modo Timeline (4) */
.shelf-timeline-section { padding: 8px 0; }
.shelf-timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.shelf-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, rgba(126, 217, 87, 0.45), rgba(126, 217, 87, 0.05));
}
.shelf-timeline-group { margin-bottom: 22px; position: relative; }
.shelf-timeline-day {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(239, 245, 235, 0.65);
}
.shelf-timeline-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.shelf-timeline-row {
  display: grid;
  grid-template-columns: 14px 52px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}
.shelf-timeline-row:hover { background: rgba(255, 255, 255, 0.045); }
.shelf-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7ed957;
  box-shadow: 0 0 0 4px rgba(126, 217, 87, 0.18);
  margin-left: -22px;
}
.shelf-timeline-cover {
  position: relative;
  width: 52px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.shelf-timeline-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shelf-timeline-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shelf-timeline-body strong { font-size: 0.92rem; color: #f2f7ef; font-weight: 700; }
.shelf-timeline-body span { font-size: 0.76rem; color: rgba(239, 245, 235, 0.6); }
.shelf-timeline-meta { color: #7ed957 !important; }
.shelf-timeline-empty {
  text-align: center;
  color: rgba(239, 245, 235, 0.5);
  padding: 40px;
}

/* Popover do menu de 3 pontos */
.shelf-row-popover {
  position: absolute;
  z-index: 1000;
  min-width: 200px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 24, 22, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shelf-row-popover button {
  text-align: left;
  padding: 10px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #f2f7ef;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.shelf-row-popover button:hover { background: rgba(255, 255, 255, 0.06); }
.shelf-row-popover button.is-danger { color: #ffb5b5; }
.shelf-row-popover button.is-danger:hover { background: rgba(255, 88, 88, 0.1); }

.shelf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 80px 20px;
  text-align: center;
  color: rgba(239, 245, 235, 0.6);
}
.shelf-empty svg { width: 56px; height: 56px; opacity: 0.4; }

/* ── Offline (downloads Premium) ────────────────────────────────────── */
.shelf-offline-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(126, 217, 87, 0.22);
  background: rgba(126, 217, 87, 0.06);
  color: #c8ffc0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background .15s, border-color .15s;
}
.shelf-offline-filter:hover { background: rgba(126, 217, 87, 0.12); }
.shelf-offline-filter.is-active {
  background: linear-gradient(135deg, #7ed957, #5fb840);
  color: #071a05;
  border-color: transparent;
}
.shelf-offline-filter svg { width: 13px; height: 13px; }

/* Botão de download (na linha compacta + grid) */
.shelf-download-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(239, 245, 235, 0.7);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
  position: relative;
}
.shelf-download-btn:hover {
  background: rgba(126, 217, 87, 0.12);
  color: #c8ffc0;
  border-color: rgba(126, 217, 87, 0.32);
}
.shelf-download-btn svg { width: 16px; height: 16px; }
.shelf-download-btn.is-downloaded {
  background: linear-gradient(135deg, #7ed957, #5fb840);
  color: #071a05;
  border-color: transparent;
}
.shelf-download-btn.is-downloaded:hover {
  background: rgba(255, 88, 88, 0.18);
  color: #ffb5b5;
  border-color: rgba(255, 88, 88, 0.32);
}
.shelf-download-btn.is-downloading {
  background: rgba(126, 217, 87, 0.18);
  color: #c8ffc0;
  border-color: rgba(126, 217, 87, 0.4);
  cursor: wait;
}
.shelf-download-btn.is-downloading svg { display: none; }
.shelf-download-pct {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.shelf-download-btn.is-loading { opacity: 0.5; cursor: wait; }

/* Badge "Offline" no título da linha compacta */
.shelf-offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(126, 217, 87, 0.18);
  color: #c8ffc0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.shelf-offline-badge svg { width: 10px; height: 10px; }

.shelf-new-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 196, 87, 0.16);
  color: #ffd27a;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.shelf-updates-card {
  position: relative;
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 196, 87, 0.18);
  background:
    radial-gradient(circle at top left, rgba(255, 196, 87, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(29, 25, 15, 0.92), rgba(10, 14, 12, 0.94));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}
.shelf-updates-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding-right: 44px;
}
.shelf-updates-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 244, 216, 0.72);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.shelf-updates-close:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #fff4d8;
  border-color: rgba(255, 196, 87, 0.26);
}
.shelf-updates-close:active { transform: scale(0.95); }
.shelf-updates-kicker {
  color: #ffd27a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.shelf-updates-head strong {
  color: #fff4d8;
  font-size: 1rem;
}
.shelf-updates-head small {
  color: rgba(239, 245, 235, 0.62);
  font-weight: 600;
}
.shelf-updates-list {
  display: grid;
  gap: 8px;
}
.shelf-update-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.shelf-update-row:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 196, 87, 0.2);
}
.shelf-update-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.shelf-update-row strong {
  color: #f5f2e8;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shelf-update-row small {
  color: rgba(239, 245, 235, 0.56);
  font-size: 0.76rem;
}
.shelf-update-row em {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 196, 87, 0.16);
  color: #ffd27a;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

/* Badge offline no grid card (sobre a capa, canto superior esquerdo) */
.shelf-grid-offline-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7ed957, #5fb840);
  color: #071a05;
  box-shadow: 0 4px 12px rgba(126, 217, 87, 0.45);
}
.shelf-grid-offline-badge svg { width: 14px; height: 14px; }

@media (max-width: 600px) {
  .shelf-offline-filter { width: 100%; justify-content: center; min-height: 44px; }
  .shelf-download-btn { width: 40px; height: 40px; }
}

/* ── Modal: Chapter Picker pra download seletivo ─────────────────────── */
.modal-chapter-picker {
  width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 740px);
  padding: 26px 24px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 22, 19, 0.98), rgba(9, 12, 11, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chapter-picker-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding-bottom: 4px;
}
.chapter-picker-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(126, 217, 87, 0.14);
  color: #7ed957;
}
.chapter-picker-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.chapter-picker-head h2 { margin: 0; font-size: 1.15rem; color: #f2f7ef; }
.chapter-picker-head p { margin: 0; font-size: 0.82rem; color: rgba(239, 245, 235, 0.6); }
.chapter-picker-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.chapter-picker-mini {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f2f7ef;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.chapter-picker-mini:hover { background: rgba(126, 217, 87, 0.12); border-color: rgba(126, 217, 87, 0.32); color: #c8ffc0; }
.chapter-picker-summary {
  text-align: center;
  font-size: 0.84rem;
  font-weight: 700;
  color: #c8ffc0;
}
.chapter-picker-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
  min-height: 200px;
  max-height: 50vh;
}
.chapter-picker-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.chapter-picker-row:hover { background: rgba(255, 255, 255, 0.045); }
.chapter-picker-row.is-selected { background: rgba(126, 217, 87, 0.1); border-color: rgba(126, 217, 87, 0.32); }
.chapter-picker-row.is-downloaded { opacity: 0.65; cursor: not-allowed; }
.chapter-picker-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #7ed957;
  cursor: pointer;
}
.chapter-picker-row.is-downloaded input[type="checkbox"] { cursor: not-allowed; }
.chapter-picker-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chapter-picker-info strong { font-size: 0.92rem; color: #f2f7ef; font-weight: 700; }
.chapter-picker-info small { font-size: 0.76rem; color: rgba(239, 245, 235, 0.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-picker-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chapter-picker-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(239, 245, 235, 0.6);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.chapter-picker-downloaded {
  font-size: 0.72rem;
  font-weight: 700;
  color: #c8ffc0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(126, 217, 87, 0.18);
}
.chapter-picker-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
}
.chapter-picker-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.chapter-picker-progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #7ed957, #c8ffc0);
  transition: width .25s ease;
}
#chapterPickerProgressText {
  font-size: 0.8rem;
  color: rgba(239, 245, 235, 0.65);
  text-align: center;
}
.chapter-picker-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.chapter-picker-actions .btn-primary,
.chapter-picker-actions .btn-secondary {
  min-height: 44px;
  padding: 0 18px;
}
.chapter-picker-actions .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.chapter-picker-empty,
.chapter-picker-error {
  text-align: center;
  color: rgba(239, 245, 235, 0.55);
  padding: 28px;
  font-style: italic;
}
@media (max-width: 480px) {
  .modal-chapter-picker { padding: 22px 18px 18px; border-radius: 18px; }
  .chapter-picker-list { max-height: 55vh; }
  .chapter-picker-actions { flex-direction: column-reverse; }
  .chapter-picker-actions .btn-primary,
  .chapter-picker-actions .btn-secondary { width: 100%; }
}

/* ── Indicador de sincronização pendente ─────────────────────────────── */
.sync-pending-indicator {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 138, 67, 0.16);
  border: 1px solid rgba(255, 138, 67, 0.4);
  color: #ffd6a4;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  animation: syncIndPulse 1.8s ease-in-out infinite;
}
.sync-pending-indicator svg { width: 14px; height: 14px; animation: syncIndSpin 2.4s linear infinite; }
@keyframes syncIndSpin { to { transform: rotate(360deg); } }
@keyframes syncIndPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32), 0 0 0 0 rgba(255, 138, 67, 0); }
  50% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32), 0 0 0 6px rgba(255, 138, 67, 0.18); }
}
@media (max-width: 480px) {
  .sync-pending-indicator { bottom: 14px; padding: 7px 12px; font-size: 0.78rem; }
}

/* Toolbar por modo (Grid, Timeline, Estante) */
.shelf-mode-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 2px;
  flex-wrap: wrap;
}
.shelf-toolbar-count {
  font-size: 0.85rem;
  color: rgba(239, 245, 235, 0.6);
  font-weight: 500;
}
.shelf-toolbar-actions { display: flex; gap: 8px; align-items: center; }
.shelf-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f2f7ef;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.shelf-toolbar-btn:hover { background: rgba(126, 217, 87, 0.08); border-color: rgba(126, 217, 87, 0.25); }
.shelf-toolbar-btn svg { width: 14px; height: 14px; }

/* Counts e meta extras na linha compacta */
.shelf-compact-counts {
  display: block;
  font-size: 0.74rem;
  color: rgba(239, 245, 235, 0.5);
  margin-top: 2px;
}
.shelf-compact-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  font-size: 0.78rem;
  color: rgba(239, 245, 235, 0.55);
}
.shelf-meta-when, .shelf-meta-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.shelf-meta-when svg, .shelf-meta-time svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Estante foot */
.shelf-stand-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
}
.shelf-stand-time { color: rgba(239, 245, 235, 0.45); }

/* Timeline: aside (advance + button) */
.shelf-timeline-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.shelf-timeline-advance {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(126, 217, 87, 0.14);
  color: #c8ffc0;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Tabs (Livros: Lendo/Quero ler/Finalizados) */
.shelf-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.shelf-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(239, 245, 235, 0.65);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.shelf-tab:hover { color: #f2f7ef; background: rgba(255, 255, 255, 0.04); }
.shelf-tab.is-active {
  background: rgba(126, 217, 87, 0.16);
  color: #c8ffc0;
}
.shelf-tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(239, 245, 235, 0.78);
}
.shelf-tab.is-active .shelf-tab-count { background: rgba(126, 217, 87, 0.28); color: #c8ffc0; }
.shelf-tab-empty {
  text-align: center;
  color: rgba(239, 245, 235, 0.5);
  padding: 60px 20px;
  font-style: italic;
}

/* Responsivo */
@media (max-width: 960px) {
  .shelf-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf-summary-hero { flex-wrap: wrap; }
  .shelf-summary-chart { width: 100%; height: 50px; }
  .shelf-compact-row {
    grid-template-columns: 56px 1fr auto;
    grid-template-rows: auto auto auto;
    row-gap: 8px;
    padding: 14px;
  }
  .shelf-compact-cover { grid-row: 1 / 3; }
  .shelf-compact-info { grid-column: 2 / 3; grid-row: 1; }
  .shelf-compact-actions { grid-column: 3 / 4; grid-row: 1; align-self: start; }
  .shelf-compact-progress { grid-column: 2 / -1; grid-row: 2; }
  .shelf-compact-meta {
    grid-column: 1 / -1;
    grid-row: 3;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }
  .shelf-timeline-row {
    grid-template-columns: 14px 56px 1fr;
    grid-template-rows: auto auto;
    row-gap: 8px;
  }
  .shelf-timeline-dot { grid-row: 1; grid-column: 1; align-self: start; margin-top: 6px; }
  .shelf-timeline-cover { grid-row: 1; grid-column: 2; }
  .shelf-timeline-body { grid-row: 1; grid-column: 3; }
  .shelf-timeline-aside {
    grid-row: 2;
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }
  .shelf-timeline-aside .shelf-continue-btn { min-height: 44px; padding: 0 18px; }
}
@media (max-width: 600px) {
  .shelf-page { padding: 16px 14px 100px; }
  .shelf-page-head {
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    gap: 10px 12px;
    margin-bottom: 18px;
  }
  .shelf-back-btn { grid-row: 1; grid-column: 1; }
  .shelf-page-title-wrap { grid-row: 1; grid-column: 2; min-width: 0; }
  .shelf-view-switcher {
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .shelf-view-switcher::-webkit-scrollbar { display: none; }
  .shelf-page-title { font-size: 1.3rem; }
  .shelf-page-sub { font-size: 0.85rem; }
  .shelf-view-label { display: none; }
  .shelf-view-btn { padding: 11px 13px; min-height: 44px; flex: 1; justify-content: center; }
  .shelf-view-icon svg { width: 16px; height: 16px; }
  .shelf-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shelf-stat-card { padding: 12px; min-height: 72px; gap: 10px; }
  .shelf-stat-icon { width: 36px; height: 36px; }
  .shelf-stat-icon svg { width: 18px; height: 18px; }
  .shelf-stat-value { font-size: 1.1rem; }
  .shelf-stat-label { font-size: 0.7rem; }
  .shelf-summary-hero { padding: 18px 18px; gap: 14px; }
  .shelf-summary-icon { width: 48px; height: 48px; }
  .shelf-summary-icon svg { width: 24px; height: 24px; }
  .shelf-summary-headline { font-size: 1rem; }
  .shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shelf-grid-body { padding: 12px; }
  .shelf-grid-title { font-size: 0.92rem; }
  .shelf-grid-continue { padding: 9px 14px; font-size: 0.8rem; min-height: 38px; }
  .shelf-grid-menu .shelf-row-menu { width: 36px; height: 36px; }
  /* Estante: scroll horizontal com snap em telas estreitas */
  .shelf-stand-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 18px;
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
    scrollbar-width: none;
  }
  .shelf-stand-row::-webkit-scrollbar { display: none; }
  .shelf-stand-card { width: 138px; flex-shrink: 0; scroll-snap-align: start; }
  .shelf-stand-cover { width: 138px; height: 196px; }
  .shelf-stand-board { display: none; }
  .shelf-area-switcher { width: 100%; margin-bottom: 16px; }
  .shelf-area-btn { flex: 1; padding: 12px 14px; min-height: 44px; text-align: center; }
  .shelf-tabs { width: 100%; }
  .shelf-tab { flex: 1; justify-content: center; padding: 12px 10px; min-height: 44px; }
  .shelf-tab-label { font-size: 0.82rem; }
  .shelf-mode-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .shelf-mode-toolbar .shelf-toolbar-actions { width: 100%; }
  .shelf-sort-select { width: 100%; min-height: 44px; padding: 10px 14px; }
  .shelf-toolbar-btn { min-height: 44px; padding: 10px 16px; justify-content: center; }
  .shelf-compact-list { gap: 12px; }
  .shelf-compact-row {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-areas:
      "cover info"
      "cover progress"
      "cover meta"
      "actions actions";
    gap: 10px 14px;
    align-items: start;
    padding: 16px;
    min-height: 166px;
    border-radius: 18px;
    background:
      linear-gradient(135deg, rgba(126, 217, 87, 0.055), transparent 38%),
      rgba(255, 255, 255, 0.028);
  }
  .shelf-compact-cover {
    grid-area: cover;
    width: 76px;
    height: 108px;
    border-radius: 12px;
  }
  .shelf-compact-info {
    grid-area: info;
    min-width: 0;
    padding-top: 1px;
  }
  .shelf-compact-title {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.18;
    font-size: 1rem;
  }
  .shelf-compact-chapter {
    margin-top: 5px;
    font-size: 0.82rem;
  }
  .shelf-compact-counts {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    color: rgba(239, 245, 235, 0.62);
  }
  .shelf-compact-progress {
    grid-area: progress;
    width: 100%;
    gap: 9px;
  }
  .shelf-progress-bar { height: 8px; }
  .shelf-compact-meta {
    grid-area: meta;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px 12px;
    flex-wrap: wrap;
    padding-top: 0;
    border-top: 0;
    white-space: normal;
    font-size: 0.75rem;
  }
  .shelf-compact-actions {
    grid-area: actions;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    width: 100%;
    padding-top: 4px;
  }
  .shelf-compact-actions .shelf-download-btn { display: none; }
  .shelf-continue-btn {
    min-height: 44px;
    padding: 0 16px;
    justify-content: center;
    text-align: center;
  }
  .shelf-row-menu {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
  }
  .shelf-add-btn { min-height: 50px; padding: 16px; }
}
@media (max-width: 420px) {
  .shelf-grid { grid-template-columns: 1fr; }
  .shelf-page-title { font-size: 1.15rem; }
  .shelf-compact-row {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px 12px;
    padding: 14px;
  }
  .shelf-compact-cover { width: 68px; height: 98px; }
  .shelf-compact-actions { gap: 8px; }
  .shelf-continue-btn { padding: 0 14px; font-size: 0.84rem; }
}

/* Popover mobile: vira bottom-sheet pra fácil acesso */
@media (max-width: 600px) {
  .shelf-row-popover.is-mobile-sheet {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    min-width: 0;
    border-radius: 18px 18px 0 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.5);
    animation: shelfSheetUp .22s ease;
  }
  .shelf-row-popover.is-mobile-sheet::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.18);
    margin: 0 auto 12px;
  }
  .shelf-row-popover.is-mobile-sheet button {
    padding: 14px 16px;
    font-size: 0.95rem;
    min-height: 48px;
  }
}
@keyframes shelfSheetUp {
  from { transform: translateY(100%); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════
   SWITCH MODE — Nintendo Switch via NSP/forwarder (?device=switch ou UA)
   Adiciona via JS: document.documentElement.classList.add('switch-mode')
   Otimizado pra 1280x720, foco D-pad, touch grande, sem hover, sem blur.
   ═══════════════════════════════════════════════════════════════════════ */

/* — Visual base: tipo maior, sem blur, sem partículas, sem anims pesadas — */
html.switch-mode { font-size: 17px; }
html.switch-mode body { background: #050805; }

html.switch-mode .fx-layer,
html.switch-mode .fx-orb,
html.switch-mode .fx-particle { display: none !important; }

html.switch-mode * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.switch-mode *,
html.switch-mode *::before,
html.switch-mode *::after {
  animation-duration: 0.001s !important;
  animation-delay: 0s !important;
  transition-duration: 80ms !important;
}
/* manter barra de progresso/leitura com transição suave */
html.switch-mode .shelf-progress-bar > span,
html.switch-mode .my-shelf-row-progress > div,
html.switch-mode .chapter-picker-progress-bar > div {
  transition-duration: 280ms !important;
}

/* — Foco D-pad bem visível — */
html.switch-mode *:focus-visible {
  outline: 3px solid #7ed957 !important;
  outline-offset: 3px;
  border-radius: 6px;
}

/* — Botões e clicáveis grandes (touch + D-pad) — */
html.switch-mode button,
html.switch-mode .btn-secondary,
html.switch-mode .icon-btn,
html.switch-mode .header-chip,
html.switch-mode .area-tab,
html.switch-mode select,
html.switch-mode input[type="text"],
html.switch-mode input[type="password"],
html.switch-mode input[type="email"],
html.switch-mode input[type="search"] {
  min-height: 56px !important;
  font-size: 1rem !important;
}
html.switch-mode .btn-primary,
html.switch-mode .action-pill {
  min-height: 72px !important;
  font-size: 1.05rem !important;
  padding: 0 28px !important;
}
html.switch-mode .icon-btn { min-width: 56px; }

/* — Esconder ruído visual e elementos que não fazem sentido no console — */
html.switch-mode #installPromptOverlay,
html.switch-mode #installAppBtn,
html.switch-mode .logo-tutorial,
html.switch-mode .header-upgrade-chip-label-short {
  display: none !important;
}
html.switch-mode #notifInboxBtn .support-bell-badge { display: none !important; }

/* — Header sempre confortável, tabs grandes mesmo em mobile-like — */
html.switch-mode #appHeader {
  background: rgba(5, 8, 5, 0.98) !important;
}
html.switch-mode .lib-tabs {
  display: flex !important;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
html.switch-mode .area-tab {
  min-height: 60px !important;
  padding: 0 28px !important;
  font-size: 1rem !important;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* — Spotlight (banner hero) mais discreto pra não roubar a tela — */
html.switch-mode .spotlight,
html.switch-mode .spotlight-bg {
  min-height: 240px !important;
}
html.switch-mode .spotlight-bg { filter: none !important; }

/* — Grids: 4 cols em 1280px, 6 cols em ≥1920px — */
html.switch-mode .lib-grid,
html.switch-mode .series-grid,
html.switch-mode .grid {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 22px !important;
}
@media (min-width: 1920px) {
  html.switch-mode .lib-grid,
  html.switch-mode .series-grid,
  html.switch-mode .grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
}
html.switch-mode .card {
  padding: 14px;
  border-radius: 16px;
}
html.switch-mode .card-title {
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}
html.switch-mode .card-actions { gap: 10px; }

/* — Modais (request, profile, upgrade) com tamanhos confortáveis — */
html.switch-mode .modal-panel,
html.switch-mode .paywall-panel,
html.switch-mode .modal-settings,
html.switch-mode .modal-request-panel,
html.switch-mode .modal-chapter-picker {
  max-width: 820px;
  padding: 36px 32px;
  border-radius: 24px;
}
html.switch-mode .request-form input,
html.switch-mode .request-form select,
html.switch-mode .request-form textarea {
  min-height: 56px;
  font-size: 1.02rem;
  padding: 14px 18px;
}

/* — Prateleira: cards e linhas ampliadas — */
html.switch-mode .shelf-page { padding: 36px 32px 100px; }
html.switch-mode .shelf-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 22px; }
html.switch-mode .shelf-compact-row {
  padding: 18px 22px;
  grid-template-columns: 64px 1.4fr 1.2fr 1fr auto;
  gap: 22px;
}
html.switch-mode .shelf-compact-cover { width: 64px; height: 88px; }
html.switch-mode .shelf-stand-card { width: 200px; }
html.switch-mode .shelf-stand-cover { width: 200px; height: 290px; }
html.switch-mode .shelf-view-btn { padding: 12px 18px; }
html.switch-mode .shelf-view-label { display: inline; }

/* — Admin (caso o admin acesse pelo Switch — improvável mas mantém funcional) — */
html.switch-mode .admin-tab { min-height: 56px; }

.admin-role-pill.is-manager {
  background: rgba(99, 102, 241, .14);
  border-color: rgba(129, 140, 248, .36);
  color: #c7d2fe;
}

.admin-status-pill.is-paid {
  background: rgba(132, 255, 110, .14);
  border-color: rgba(132, 255, 110, .32);
  color: #9dff8e;
}

.admin-status-pill.is-muted,
.admin-status-pill.is-free {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
  color: rgba(236, 245, 235, .72);
}

.admin-user-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 14px;
}

.admin-user-filterbar label {
  display: grid;
  gap: 5px;
  min-width: 150px;
  color: rgba(219, 237, 214, .74);
  font-size: .78rem;
  font-weight: 800;
}

.admin-subscription-list {
  display: grid;
  gap: 12px;
}

.admin-subscription-row {
  display: grid;
  grid-template-columns: minmax(210px, .9fr) minmax(240px, 1.2fr) minmax(190px, .8fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(11, 17, 15, .96), rgba(18, 30, 21, .82));
}

.admin-subscription-main,
.admin-subscription-meta {
  display: grid;
  gap: 5px;
}

.admin-subscription-main strong,
.admin-subscription-meta strong {
  color: #fff;
  font-size: .98rem;
}

.admin-subscription-main span,
.admin-subscription-meta span {
  color: rgba(219, 237, 214, .7);
  font-size: .86rem;
}

@media (max-width: 760px) {
  .admin-user-filterbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-user-filterbar label {
    min-width: 0;
  }

  .admin-subscription-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }
}

/* — Home Hub Switch (renderSwitchHome em app.js) — */
html.switch-mode .switch-hub {
  max-width: 1180px;
  margin: 40px auto 80px;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
html.switch-mode .switch-hub-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7ed957;
  text-align: center;
}
html.switch-mode .switch-hub-title {
  margin: 0;
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f2f7ef;
}
html.switch-mode .switch-hub-sub {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  color: rgba(239, 245, 235, 0.62);
}
html.switch-mode .switch-hub-row {
  display: grid;
  gap: 22px;
}
html.switch-mode .switch-hub-row.row-3 { grid-template-columns: repeat(3, 1fr); }
html.switch-mode .switch-hub-row.row-2 { grid-template-columns: repeat(2, 1fr); }
html.switch-mode .switch-hub-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 200px;
  padding: 28px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(160deg, rgba(126, 217, 87, 0.06), rgba(126, 217, 87, 0.01)),
    rgba(9, 12, 11, 0.85);
  color: #f2f7ef;
  cursor: pointer;
  text-align: center;
  transition: transform 80ms ease, border-color 80ms ease, background 80ms ease;
}
html.switch-mode .switch-hub-btn:focus-visible,
html.switch-mode .switch-hub-btn:active {
  border-color: rgba(126, 217, 87, 0.55);
  background:
    linear-gradient(160deg, rgba(126, 217, 87, 0.16), rgba(126, 217, 87, 0.04)),
    rgba(9, 12, 11, 0.92);
  transform: translateY(-2px);
}
html.switch-mode .switch-hub-btn-icon {
  width: 72px;
  height: 72px;
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(126, 217, 87, 0.16);
  color: #7ed957;
}
html.switch-mode .switch-hub-btn-icon svg { width: 38px; height: 38px; }
html.switch-mode .switch-hub-btn strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
}
html.switch-mode .switch-hub-btn small {
  display: block;
  font-size: 0.88rem;
  color: rgba(239, 245, 235, 0.62);
}
html.switch-mode .switch-hub-row.row-2 .switch-hub-btn {
  flex-direction: row;
  text-align: left;
  justify-content: flex-start;
  min-height: 160px;
}
html.switch-mode .switch-hub-row.row-2 .switch-hub-btn-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* — Login Switch (renderSwitchLoginScreen) — */
html.switch-mode .switch-login {
  max-width: 580px;
  margin: 60px auto;
  padding: 40px 36px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 12, 11, 0.92);
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: stretch;
}
html.switch-mode .switch-login-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto;
}
html.switch-mode .switch-login h2 {
  margin: 0;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
}
html.switch-mode .switch-login label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
  color: rgba(239, 245, 235, 0.78);
  font-weight: 600;
}
html.switch-mode .switch-login input {
  min-height: 64px !important;
  padding: 14px 18px !important;
  font-size: 1.1rem !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #f2f7ef;
}
html.switch-mode .switch-login .btn-primary {
  min-height: 72px !important;
  font-size: 1.1rem !important;
  background: linear-gradient(135deg, #7ed957, #5fb840);
  color: #071a05;
  border: none;
  border-radius: 14px;
  font-weight: 800;
}
html.switch-mode .switch-login-hint {
  text-align: center;
  font-size: 0.84rem;
  color: rgba(239, 245, 235, 0.5);
  font-style: italic;
}
html.switch-mode .switch-login-msg {
  text-align: center;
  font-size: 0.92rem;
  min-height: 1.4em;
}
html.switch-mode .switch-login-msg.error { color: #ffb5b5; }
html.switch-mode .switch-login-msg.ok { color: #c8ffc0; }

/* — Upgrade Modal Switch (QR Code pra pagar pelo celular) — */
html.switch-mode .switch-upgrade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  text-align: center;
}
html.switch-mode .switch-upgrade h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}
html.switch-mode .switch-upgrade-instr {
  margin: 0;
  max-width: 500px;
  font-size: 0.98rem;
  color: rgba(239, 245, 235, 0.75);
  line-height: 1.5;
}
html.switch-mode .switch-upgrade-qr-frame {
  padding: 18px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
html.switch-mode .switch-upgrade-qr-frame img {
  display: block;
  width: 320px;
  height: 320px;
}
html.switch-mode .switch-upgrade-url {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.95rem;
  color: #c8ffc0;
  padding: 14px 18px;
  background: rgba(126, 217, 87, 0.08);
  border: 1px solid rgba(126, 217, 87, 0.25);
  border-radius: 12px;
  word-break: break-all;
  max-width: 100%;
}
html.switch-mode .switch-upgrade-actions {
  display: flex;
  gap: 16px;
  width: 100%;
  justify-content: center;
}
html.switch-mode .switch-upgrade-actions .btn-primary {
  flex: 0 0 auto;
  min-width: 220px;
}

/* — Mobile-style elements que não devem aparecer em 1280x720 — */
html.switch-mode .admin-mobile-bottom-nav,
html.switch-mode .admin-mobile-drawer-footer { display: none !important; }

/* — Hover desligado, active reforçado pra touch/click — */
html.switch-mode *:hover { /* hover é unreliable em touch; manter neutro */ }
html.switch-mode button:active,
html.switch-mode .card:active,
html.switch-mode .shelf-compact-row:active {
  transform: translateY(0.5px);
}
