:root {
  --bg: #050614;
  --bg-2: #0b1027;
  --card: rgba(13, 18, 42, 0.78);
  --card-2: rgba(22, 29, 62, 0.8);
  --line: rgba(142, 93, 255, 0.22);
  --text: #f5f3ff;
  --muted: #a5a1c6;
  --primary: #8f5bff;
  --primary-2: #20a4ff;
  --accent: #ffd166;
  --danger: #ff5b7d;
  --shadow: 0 24px 80px rgba(34, 19, 88, .34);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 75% 5%, rgba(127, 84, 255, .26), transparent 34rem),
    radial-gradient(circle at 20% 70%, rgba(32, 164, 255, .14), transparent 28rem),
    linear-gradient(180deg, #030411 0%, #090d25 58%, #050614 100%);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.stars {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(143,91,255,.7) 1px, transparent 1.5px);
  background-size: 120px 120px, 180px 180px;
  background-position: 0 0, 40px 60px;
  opacity: .16;
  z-index: -2;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 74px;
  padding: 0 7vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(18px);
  background: rgba(3, 4, 17, .68);
  border-bottom: 1px solid var(--line);
}
.site-header.compact { height: 64px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 1.16rem;
}
.brand span span { color: var(--primary); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(143,91,255,.95), rgba(32,164,255,.85));
  box-shadow: 0 0 24px rgba(143,91,255,.55);
}
.nav { display: flex; align-items: center; gap: 8px; }
.nav a, .nav-button {
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 12px 16px;
  border-radius: 14px;
  transition: .2s ease;
}
.nav a:hover, .nav a.active, .nav-button:hover {
  color: #fff;
  background: rgba(143, 91, 255, .16);
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions button, .ghost, .primary {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,.04);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 42px;
}
.header-actions > button { width: 42px; padding: 0; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 36px rgba(32,164,255,.2);
}
.ghost:hover, .header-actions button:hover { background: rgba(255,255,255,.09); }
.wide { width: 100%; }

.genre-menu {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: min(760px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(9, 12, 31, .94);
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.genre-menu a {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
}
.hidden { display: none !important; }

.hero {
  min-height: 76vh;
  padding: 78px 7vw 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 7vw;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(32,164,255,.38);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .28;
  filter: saturate(1.15);
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(5,6,20,.96));
  z-index: -1;
}
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  color: #c9c2ff;
  background: rgba(143,91,255,.13);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .83rem;
  font-weight: 700;
}
.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.7rem, 7vw, 6.4rem);
  line-height: .95;
  letter-spacing: -.06em;
  text-shadow: 0 16px 60px rgba(0,0,0,.35);
}
.hero p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.02rem;
}
.hero-summary {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta { display: flex; gap: 20px; color: var(--muted); margin: 22px 0; flex-wrap: wrap; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  background: var(--card);
  box-shadow: 0 32px 80px rgba(0,0,0,.42), 0 0 70px rgba(143,91,255,.2);
}
.hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  border-radius: 16px;
  padding: 10px 12px;
  font-weight: 900;
}
.slider-dots { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 9px; }
.slider-dots button { width: 30px; height: 4px; border: 0; border-radius: 999px; background: rgba(255,255,255,.16); padding: 0; }
.slider-dots button.active { background: linear-gradient(90deg, var(--primary), var(--primary-2)); }

.section {
  padding: 48px 7vw;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section h2, .panel h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -.03em;
}
.section-sub { color: var(--muted); margin-top: 6px; }
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.card {
  display: block;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  transition: .24s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(143,91,255,.55); box-shadow: var(--shadow); }
.card-cover { height: 280px; background: rgba(255,255,255,.05); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 16px; }
.card h3 { margin: 0 0 8px; font-size: 1.04rem; line-height: 1.35; }
.card p { color: var(--muted); margin: 0; line-height: 1.6; font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
.tag { font-size: .76rem; color: #d8d1ff; background: rgba(143,91,255,.16); border: 1px solid rgba(143,91,255,.18); padding: 5px 9px; border-radius: 999px; }
.meta-line { display: flex; justify-content: space-between; color: var(--muted); font-size: .86rem; margin-top: 14px; }

.list-page { padding: 48px 7vw; }
.filter-bar {
  display: grid;
  grid-template-columns: 1fr 220px 140px;
  gap: 12px;
  margin: 24px 0;
}
.input, input, textarea, select {
  width: 100%;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  padding: 13px 15px;
  outline: none;
}
textarea { resize: vertical; line-height: 1.7; }
input:focus, textarea:focus, select:focus { border-color: rgba(32,164,255,.65); box-shadow: 0 0 0 3px rgba(32,164,255,.1); }

.detail {
  padding: 70px 7vw 40px;
}
.detail-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 24px;
  background: rgba(10,13,32,.74);
  box-shadow: var(--shadow);
}
.detail-cover { border-radius: 22px; overflow: hidden; aspect-ratio: 3/4; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail h1 { margin: 0 0 14px; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.detail-desc { color: var(--muted); line-height: 1.8; }
.chapter-list {
  margin-top: 28px;
  display: grid;
  gap: 10px;
}
.chapter-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.chapter-row:hover { background: rgba(143,91,255,.1); }

.reader {
  max-width: 900px;
  margin: 0 auto;
  padding: 54px 22px 80px;
}
.reader-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(8,11,26,.82);
  padding: clamp(22px, 5vw, 54px);
  box-shadow: var(--shadow);
}
.reader h1 { margin-top: 0; font-size: clamp(1.8rem, 5vw, 3.3rem); letter-spacing: -.04em; }
.reader-content { font-size: 1.08rem; line-height: 2.05; color: #eeeafb; white-space: pre-line; }
.reader-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }

.footer {
  margin-top: 50px;
  padding: 36px 7vw;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.footer strong { color: var(--text); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(8px);
}
.modal-box {
  width: min(440px, calc(100vw - 28px));
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #0b0f27;
  padding: 26px;
  box-shadow: var(--shadow);
}
.modal-box input { margin-bottom: 12px; }
.close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--text);
}
.muted { color: var(--muted); }
.error, .empty { color: var(--muted); padding: 24px; border: 1px dashed var(--line); border-radius: 18px; }

.admin-layout {
  padding: 40px 7vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(8,11,26,.82);
  box-shadow: var(--shadow);
  padding: 24px;
}
.panel label { display: block; color: var(--muted); margin: 16px 0 8px; }
.message { color: var(--accent); min-height: 24px; }

body.light {
  --bg: #f7f8ff;
  --bg-2: #fff;
  --card: rgba(255,255,255,.8);
  --card-2: rgba(255,255,255,.95);
  --line: rgba(74, 99, 170, .18);
  --text: #16182d;
  --muted: #656b8a;
  background: linear-gradient(180deg, #eff4ff 0%, #ffffff 100%);
}
body.light .site-header { background: rgba(255,255,255,.75); }
body.light .hero::after { background: linear-gradient(transparent, rgba(247,248,255,.96)); }
body.light .stars { opacity: .08; }

@media (max-width: 1100px) {
  .site-header { padding: 0 22px; }
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-left: 22px; padding-right: 22px; }
  .hero-cover { max-width: 310px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-layout { grid-template-columns: 1fr; padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 760px) {
  .header-actions .ghost { display: none; }
  .primary { padding: 10px 13px; }
  .hero { min-height: auto; padding-top: 44px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-cover { height: 210px; }
  .filter-bar { grid-template-columns: 1fr; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-cover { max-width: 240px; }
  .section, .list-page, .detail { padding-left: 22px; padding-right: 22px; }
  .footer { flex-direction: column; padding-left: 22px; padding-right: 22px; }
}

/* VIP + bulk import additions */
.card-cover, .detail-cover { position: relative; }
.vip-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1a102d;
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: 0 12px 28px rgba(255, 159, 28, .28);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 900;
}
.vip-mini {
  display: inline-flex;
  margin-left: 8px;
  vertical-align: middle;
  color: #1a102d;
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: .72rem;
  font-weight: 900;
}
.vip-pill {
  color: #ffe8a8;
  border-color: rgba(255,209,102,.32);
  background: rgba(255,209,102,.12);
}
.paywall {
  margin: 28px 0;
  padding: 28px;
  border: 1px solid rgba(255,209,102,.32);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,209,102,.12), rgba(255,255,255,.04));
}
.paywall h2 { margin-top: 0; }
.form-grid {
  display: grid;
  gap: 12px;
  align-items: end;
}
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted);
}
.check-row input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.check-row label { margin: 0; }
.inline-check { min-height: 50px; align-self: end; }
.small-note { margin: 10px 0 0; font-size: .9rem; }
.wide-panel { grid-column: 1 / -1; }
code {
  color: #ffe8a8;
  background: rgba(255,209,102,.08);
  border: 1px solid rgba(255,209,102,.16);
  border-radius: 8px;
  padding: 2px 6px;
}

@media (max-width: 760px) {
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .chapter-row { flex-direction: column; gap: 8px; }
}

/* V3: user wallet, purchase, combo full-story bundle */
.combo-badge {
  position: absolute;
  z-index: 2;
  top: 48px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  color: #07111f;
  background: linear-gradient(135deg, #7ee8fa, #80ff72);
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: 0 12px 28px rgba(126, 232, 250, .24);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
}
.combo-pill {
  color: #cffff8;
  border-color: rgba(126,232,250,.32);
  background: rgba(126,232,250,.12);
}
.combo-box {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(126,232,250,.26);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(126,232,250,.12), rgba(143,91,255,.08));
  box-shadow: var(--shadow);
}
.combo-box h3 { margin: 0 0 8px; }
.combo-box p { color: var(--muted); margin: 0 0 10px; line-height: 1.65; }
.owned-pill, .owned-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #07111f;
  background: linear-gradient(135deg, #80ff72, #7ee8fa);
  font-weight: 900;
}
.owned-pill { padding: 10px 14px; }
.owned-mini { margin-left: 8px; padding: 3px 8px; font-size: .72rem; vertical-align: middle; }
.wallet-balance {
  margin: 16px 0;
  padding: 22px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid rgba(255,209,102,.24);
  background: rgba(255,209,102,.08);
  color: #ffe8a8;
  font-size: 2rem;
  font-weight: 900;
}
.quick-topup button { min-height: 46px; }
.preview-text {
  border-left: 3px solid rgba(255,209,102,.55);
  padding: 10px 0 10px 14px;
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-line;
}
.modal-box .ghost.wide { margin-top: 10px; }

@media (max-width: 760px) {
  .combo-box { flex-direction: column; align-items: stretch; }
  .combo-badge { top: 46px; }
}

/* V4 custom UI for Phuvu's corner */
body.copy-protect,
body.copy-protect .reader-content,
body.copy-protect .card,
body.copy-protect .detail,
body.copy-protect .section,
body.copy-protect img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body.copy-protect input,
body.copy-protect textarea,
body.copy-protect select,
body.copy-protect .modal-box {
  -webkit-user-select: text;
  user-select: text;
}

.combo-offer {
  margin: 26px 0 8px;
  border: 2px solid rgba(126, 232, 250, .42);
  border-radius: 18px;
  padding: 12px;
  background: rgba(9, 22, 34, .62);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255,255,255,.04);
}
.combo-offer-title {
  display: inline-block;
  margin: -31px 0 6px 14px;
  padding: 0 10px;
  color: #fff3cf;
  background: #07101c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: .01em;
}
.combo-offer-card {
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  padding: 22px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(31, 64, 68, .72), rgba(11, 32, 23, .78));
}
.combo-offer-card p {
  margin: 0;
  color: #d9cfbf;
  font-size: clamp(1rem, 1.55vw, 1.3rem);
  line-height: 1.6;
}
.combo-offer-card strong { color: #f6e7c6; }
.gold-button {
  border: 0;
  min-width: 150px;
  color: #fff0b8;
  font-weight: 900;
  padding: 12px 22px;
  border-radius: 7px;
  background: linear-gradient(180deg, #caa300, #7d6500);
  box-shadow: 0 12px 28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.25);
}
.gold-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.admin-preview { margin-top: 28px; }
.admin-preview .combo-offer-card { min-height: 150px; }

.advanced-upload {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
}
.advanced-upload summary { cursor: pointer; color: var(--text); font-weight: 700; }
.file-import-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px dashed rgba(126,232,250,.32);
  border-radius: 18px;
  background: rgba(126,232,250,.05);
}
input[type="file"] {
  padding: 10px;
  border-style: dashed;
}

@media (max-width: 760px) {
  .combo-offer-title { margin-top: -28px; }
  .combo-offer-card { place-items: stretch; }
  .gold-button { width: 100%; }
}

/* V5 Góc Mê Truyện refinements */
.brand-mark.image-mark {
  padding: 4px;
  overflow: hidden;
  background: rgba(92, 255, 125, .11);
  border: 1px solid rgba(128, 255, 114, .28);
  box-shadow: 0 0 26px rgba(92, 255, 125, .34), 0 0 40px rgba(143, 91, 255, .16);
}
.brand-mark.image-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}
.brand { white-space: nowrap; }
.nav a { white-space: nowrap; }
.header-actions, .header-actions a, .header-actions button { white-space: nowrap; }
.header-actions .ghost { min-width: max-content; }

select,
select option,
select optgroup {
  color-scheme: dark;
  background: #10152f;
  color: #f5f3ff;
}
select option:checked,
select option:hover {
  background: #315fd9;
  color: #fff;
}
body.light select,
body.light select option,
body.light select optgroup {
  color-scheme: light;
  background: #fff;
  color: #16182d;
}
.filter-bar select { min-height: 52px; }

.admin-topbar { gap: 22px; }
.admin-key-inline {
  flex: 1;
  max-width: 430px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}
.admin-key-inline label { color: var(--muted); font-size: .9rem; }
.admin-key-inline input { min-height: 38px; padding: 9px 12px; border-radius: 12px; }
.admin-studio {
  padding: 34px 6vw 70px;
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.create-dock {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 106px);
  overflow: auto;
}
.dock-head h1 { margin: 0; }
.story-workspace { min-width: 0; display: grid; gap: 18px; }
.slim-panel { padding: 18px; }
.workspace-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}
.workspace-toolbar label { margin-top: 0; }
.toolbar-buttons { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.story-editor-shell { padding: 0; overflow: hidden; }
.admin-story-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(126,232,250,.14), transparent 22rem),
    linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  border-bottom: 1px solid rgba(126, 232, 250, .32);
}
.admin-cover-card {
  position: relative;
  width: 180px;
  aspect-ratio: 3/4;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  box-shadow: 0 24px 60px rgba(0,0,0,.34);
}
.admin-cover-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-upload-button {
  position: absolute;
  inset: auto 12px 12px;
  margin: 0 !important;
  display: grid !important;
  place-items: center;
  min-height: 40px;
  color: #fff;
  background: rgba(0,0,0,.58);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  font-weight: 800;
}
.cover-upload-button input { display: none; }
.admin-story-main { min-width: 0; }
.title-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.admin-title-input {
  border: 0;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  border-radius: 0;
  background: transparent;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 900;
  letter-spacing: -.04em;
}
.admin-title-input:focus { box-shadow: none; border-color: rgba(126,232,250,.6); }
.owner-chip {
  color: #d7fff5;
  background: rgba(126,232,250,.1);
  border: 1px solid rgba(126,232,250,.2);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
}
.admin-id-line { margin: 10px 0 18px; color: var(--muted); }
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.admin-stat-grid div {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(0,0,0,.16);
}
.admin-stat-grid span { display: block; color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.admin-stat-grid strong { display: block; color: #f6e7c6; }
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0 28px;
  border-bottom: 4px solid rgba(24, 219, 204, .85);
  background: rgba(0,0,0,.15);
}
.admin-tabs button {
  min-height: 54px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.08);
  color: #d6d2ec;
  background: rgba(255,255,255,.035);
  padding: 0 18px;
  font-weight: 800;
}
.admin-tabs button.active {
  color: #061822;
  background: linear-gradient(135deg, #26e0d1, #25b7ff);
}
.tab-panel { display: none; padding: 26px 28px 30px; }
.tab-panel.active { display: block; }
.tab-panel h2 { margin: 0 0 14px; }
.tag-editor-row { display: flex; gap: 10px; }
.chapter-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-chapter-list { display: grid; gap: 10px; }
.admin-chapter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.admin-chapter-row strong { display: block; margin-bottom: 5px; }
.admin-chapter-row span { color: var(--muted); font-size: .9rem; }
.admin-chapter-row .ghost { min-height: 38px; display: inline-flex; align-items: center; }

@media (max-width: 1200px) {
  .admin-studio { grid-template-columns: 1fr; }
  .create-dock { position: static; max-height: none; }
}
@media (max-width: 760px) {
  .admin-topbar { height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .admin-key-inline { order: 3; width: 100%; max-width: none; grid-template-columns: 1fr; gap: 6px; }
  .admin-studio { padding-left: 16px; padding-right: 16px; }
  .workspace-toolbar { grid-template-columns: 1fr; }
  .admin-story-hero { grid-template-columns: 1fr; padding: 20px; }
  .admin-cover-card { width: min(220px, 100%); }
  .title-line { grid-template-columns: 1fr; }
  .admin-stat-grid { grid-template-columns: 1fr; }
  .admin-tabs { padding: 0; overflow-x: auto; flex-wrap: nowrap; }
  .admin-tabs button { white-space: nowrap; }
  .tab-panel { padding: 20px; }
  .admin-chapter-row { grid-template-columns: 1fr; }
}

/* V6 reader/detail/follow/bulk-delete refinements */
.hero-bg {
  background-size: min(420px, 34vw) auto;
  background-repeat: no-repeat;
  background-position: right 15vw center;
  opacity: .18;
  filter: blur(12px) saturate(1.12);
  transform: scale(1.05);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 77% 48%, rgba(143,91,255,.26), transparent 28rem);
}
.story-description-full {
  margin: 18px 0 20px;
  padding: 20px 22px;
  border: 1px solid rgba(143, 91, 255, .22);
  border-radius: 22px;
  background: rgba(255,255,255,.035);
  color: #eeeafb;
  line-height: 1.95;
  font-size: 1.02rem;
  white-space: pre-wrap;
  word-break: break-word;
}
#followStoryBtn {
  min-width: 126px;
  font-weight: 800;
}
#followStoryBtn:hover {
  border-color: rgba(126,232,250,.55);
  background: rgba(126,232,250,.1);
}
.modal-box { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 60px); overflow: auto; }
.account-section {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}
.account-section h3 { margin: 0 0 10px; font-size: 1rem; }
.mini-list, .notice-list { display: grid; gap: 8px; }
.mini-list a, .notice-item {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}
.notice-item.unread { border-color: rgba(32,164,255,.45); background: rgba(32,164,255,.08); }
.notice-item strong { display: block; margin-bottom: 4px; }
.notice-item span { display: block; color: var(--muted); line-height: 1.5; }
.notice-item em { display: block; margin-top: 4px; color: #7f7a9e; font-style: normal; font-size: .82rem; }
.bulk-delete-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}
.admin-chapter-row.selectable { grid-template-columns: auto minmax(0, 1fr) auto; }
.chapter-select-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chapter-select-cell input { width: 18px; height: 18px; }
.danger-button {
  border: 1px solid rgba(255,91,125,.38);
  color: #ffe8ee;
  background: rgba(255,91,125,.14);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 42px;
  font-weight: 800;
}
.danger-button:hover { background: rgba(255,91,125,.22); }
select, select option, select optgroup {
  background-color: #10152f !important;
  color: #f5f3ff !important;
  color-scheme: dark;
}
select { appearance: auto; }
body.light select, body.light select option, body.light select optgroup {
  background-color: #fff !important;
  color: #16182d !important;
  color-scheme: light;
}

@media (max-width: 760px) {
  .bulk-delete-bar { align-items: stretch; flex-direction: column; }
  .admin-chapter-row.selectable { grid-template-columns: auto 1fr; }
  .admin-chapter-row.selectable .ghost { grid-column: 2; justify-content: center; }
}

/* V7: nạp xu ngân hàng & duyệt xu */
.topup-modal-box { width: min(780px, calc(100vw - 28px)); }
.payment-fail {
  text-align: center;
  padding: 16px 14px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 16px;
}
.payment-fail h2 {
  margin: 0 0 12px;
  color: #9b72ff;
  letter-spacing: .08em;
  font-size: clamp(1.4rem, 3vw, 2rem);
}
.payment-fail p { margin: 8px 0; color: #eeeafb; font-size: 1.08rem; line-height: 1.65; }
.payment-fail strong { color: #ff4b61; text-decoration: underline; }
.bank-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(126,87,255,.5);
  background: rgba(4,6,12,.84);
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
  margin-bottom: 18px;
}
.bank-title {
  background: linear-gradient(90deg, #31009b, #4c1dff);
  color: #fff;
  text-align: center;
  padding: 18px;
  font-weight: 900;
  letter-spacing: .08em;
  font-size: 1.2rem;
}
.bank-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px 18px;
  padding: 24px;
  align-items: center;
}
.bank-grid span { color: #f4f0ff; font-weight: 800; }
.bank-grid strong { color: #fff; font-weight: 900; word-break: break-word; }
.copy-btn {
  margin-left: 10px;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  color: #fff;
  background: #4c1dff;
  cursor: pointer;
}
.qr-box { text-align: center; padding: 0 24px 20px; color: var(--muted); }
.qr-box img {
  display: block;
  max-width: min(320px, 90%);
  margin: 10px auto 0;
  border-radius: 16px;
  border: 1px dashed rgba(126,87,255,.7);
  background: #fff;
  padding: 10px;
}
.bank-note { margin: 0; padding: 0 30px 24px 44px; color: #d4d0e8; line-height: 1.7; }
.topup-form { display: grid; gap: 10px; }
.topup-admin-list { display: grid; gap: 12px; margin-top: 14px; }
.topup-admin-item {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  overflow: hidden;
}
.topup-admin-item.pending { border-color: rgba(255,207,77,.35); }
.topup-admin-item.approved { border-color: rgba(72,220,147,.35); }
.topup-admin-item.rejected { border-color: rgba(255,91,125,.35); }
.topup-admin-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px;
  display: grid;
  gap: 5px;
}
.topup-admin-item summary::-webkit-details-marker { display: none; }
.topup-admin-item summary strong { color: #fff; font-size: 1.04rem; }
.topup-admin-item summary span, .topup-admin-item summary em { color: var(--muted); font-style: normal; }
.topup-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 18px;
  padding: 0 14px 14px;
}
.proof-preview {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: #fff;
}
.nested-panel { background: rgba(255,255,255,.025); }
.toolbar-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar-between h3 { margin: 0; }
@media (max-width: 760px) {
  .bank-grid { grid-template-columns: 1fr; gap: 8px; padding: 18px; }
  .topup-detail-grid { grid-template-columns: 1fr; }
  .toolbar-between { align-items: stretch; flex-direction: column; }
}

/* V8: mở rộng giao diện đọc, tài khoản user, chọn nhanh truyện và sửa chương */
.reader {
  max-width: 1180px;
  padding-inline: clamp(18px, 5vw, 70px);
}
.reader-card {
  padding: clamp(26px, 5vw, 70px);
}
.reader-content {
  max-width: 980px;
  margin-inline: auto;
  font-size: clamp(1.08rem, 1.1vw, 1.24rem);
  line-height: 2.15;
}
.account-modal-box {
  width: min(980px, calc(100vw - 28px));
}
.account-tab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.account-tab-grid a,
.account-tab-grid button {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
  background: rgba(255,255,255,.05);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}
.account-tab-grid a:hover,
.account-tab-grid button:hover {
  background: rgba(143,91,255,.16);
  border-color: rgba(143,91,255,.36);
}
.account-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.account-story-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.account-story-item img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
}
.account-story-item strong {
  display: block;
  color: var(--text);
  line-height: 1.35;
}
.account-story-item em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: .9rem;
}
.positive-tx strong { color: #74f2aa; }
.negative-tx strong { color: #ff9db1; }
.generated-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.generated-code-row input { margin-bottom: 0; }
.generated-code-row .copy-btn { height: 46px; }
.compact-check {
  margin-top: 10px;
  padding: 8px 0;
}
.chapter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-chapter-row.selectable {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
#storyQuickSearch {
  margin-bottom: 10px;
}
@media (max-width: 760px) {
  .account-tab-grid { grid-template-columns: 1fr 1fr; }
  .account-story-grid { grid-template-columns: 1fr; }
  .chapter-actions { justify-content: stretch; }
  .chapter-actions .ghost { flex: 1; justify-content: center; }
}


/* V9: tách tab user, duyệt xu admin độc lập, link truyện và rule tách chương chặt hơn */
.account-panel { display: none; }
.account-panel.active { display: block; }
.account-tab-grid button.active {
  background: linear-gradient(135deg, rgba(143,91,255,.92), rgba(32,164,255,.82));
  border-color: rgba(126,232,250,.62);
  color: #fff;
  box-shadow: 0 12px 30px rgba(32,164,255,.16);
}
.admin-mode-tabs {
  display: flex;
  gap: 12px;
  padding: 22px 6vw 0;
}
.admin-mode-tabs button {
  border: 1px solid rgba(255,255,255,.11);
  color: var(--text);
  background: rgba(255,255,255,.05);
  border-radius: 999px;
  min-height: 46px;
  padding: 10px 18px;
  font-weight: 900;
}
.admin-mode-tabs button.active {
  color: #061822;
  border-color: transparent;
  background: linear-gradient(135deg, #26e0d1, #25b7ff);
}
.admin-standalone-panel {
  padding: 24px 6vw 70px;
}
.admin-standalone-panel > .panel {
  max-width: 1440px;
  margin-inline: auto;
}
.admin-public-link-row {
  margin-top: 10px;
}
.inline-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.inline-copy-row input[readonly] {
  opacity: .95;
  color: #d8f6ff;
}
@media (max-width: 760px) {
  .admin-mode-tabs { padding-left: 16px; padding-right: 16px; flex-direction: column; }
  .admin-standalone-panel { padding-left: 16px; padding-right: 16px; }
  .inline-copy-row { grid-template-columns: 1fr; }
}

/* V11: Truyện hot, mục lục phân trang, đọc full màn hình, Google login, cảnh báo user */
.combo-badge {
  top: auto !important;
  right: 12px !important;
  bottom: 12px !important;
  max-width: calc(100% - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-cover .combo-badge,
.detail-cover .combo-badge,
.card-cover .combo-badge {
  bottom: 12px !important;
}
.chapter-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
}
.chapter-pager span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  font-weight: 800;
}
.reader {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 32px clamp(18px, 5vw, 96px) 90px !important;
}
.reader-card {
  width: 100% !important;
  max-width: none !important;
  min-height: calc(100vh - 150px);
  border-radius: 30px;
}
.reader-content {
  max-width: none !important;
  width: 100% !important;
  margin-inline: 0 !important;
  font-size: clamp(1.18rem, 1.25vw, 1.42rem) !important;
  line-height: 2.2 !important;
}
#loginBtn.user-has-alert {
  position: relative;
  border-color: rgba(255,91,125,.55);
  box-shadow: 0 0 0 1px rgba(255,91,125,.22), 0 0 18px rgba(255,91,125,.22);
}
#loginBtn.user-has-alert::after {
  content: '';
  position: absolute;
  top: -5px;
  right: -5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ff2d55;
  border: 2px solid #07081a;
  box-shadow: 0 0 16px rgba(255,45,85,.75);
}
.auth-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  margin: 14px 0;
}
.auth-separator::before,
.auth-separator::after {
  content: '';
  height: 1px;
  flex: 1;
  background: rgba(255,255,255,.1);
}
.google-login {
  min-height: 54px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.055);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.google-login:hover {
  border-color: rgba(32,164,255,.45);
  background: rgba(32,164,255,.12);
}
.google-g {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #4285f4;
  font-weight: 1000;
  font-family: Arial, sans-serif;
}
@media (max-width: 760px) {
  .chapter-pager { flex-direction: column; align-items: stretch; text-align: center; }
  .reader { padding-inline: 14px !important; }
  .reader-card { border-radius: 20px; padding: 24px 18px !important; }
}

/* V13: thu nhỏ card truyện tại trang chủ + bình luận độc giả */
.compact-section {
  padding-top: 42px;
  padding-bottom: 36px;
}
.compact-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.compact-story-card {
  display: block;
  min-width: 0;
  transition: transform .22s ease, filter .22s ease;
}
.compact-story-card:hover {
  transform: translateY(-5px);
  filter: drop-shadow(0 16px 32px rgba(91, 51, 255, .22));
}
.compact-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4.4;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
}
.compact-cover::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(2,4,14,.9));
  pointer-events: none;
}
.compact-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.status-ribbon {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 1000;
  letter-spacing: .08em;
  color: #fff;
  background: linear-gradient(135deg, #18c78a, #11a874);
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
}
.status-ribbon.serial {
  background: linear-gradient(135deg, #3e85ff, #7b5cff);
}
.view-pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  color: #fff;
  font-weight: 900;
  font-size: .9rem;
  text-shadow: 0 2px 10px rgba(0,0,0,.72);
}
.heart-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
}
.combo-price-tag {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  padding: 7px 11px;
  border-radius: 999px;
  color: #271200;
  background: linear-gradient(135deg, #ffe8a4, #ffad45);
  font-size: .78rem;
  font-weight: 1000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 18px rgba(0,0,0,.26);
}
.compact-info {
  padding: 13px 4px 0;
}
.compact-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.compact-meta span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-info h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.34;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.comments-panel {
  margin-top: 42px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255,255,255,.035);
}
.comments-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.comments-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
}
.comments-head p,
.comment-form-actions span {
  margin: 0;
  color: var(--muted);
}
.comment-form {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.comment-form textarea {
  min-height: 96px;
}
.comment-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.comment-list {
  display: grid;
  gap: 12px;
}
.comment-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(0,0,0,.16);
}
.comment-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 1000;
  background: linear-gradient(135deg, rgba(143,91,255,.95), rgba(32,164,255,.82));
  box-shadow: 0 10px 22px rgba(32,164,255,.13);
}
.comment-body { min-width: 0; }
.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.comment-meta strong { color: #fff; }
.comment-meta span { color: var(--muted); font-size: .88rem; }
.comment-body p {
  margin: 0;
  color: #eeeafb;
  white-space: pre-line;
  line-height: 1.72;
  word-break: break-word;
}
@media (min-width: 1500px) {
  .compact-story-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); }
}
@media (max-width: 900px) {
  .compact-story-grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 16px; }
}
@media (max-width: 520px) {
  .compact-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .status-ribbon { font-size: .68rem; padding: 6px 10px; }
  .heart-btn { width: 34px; height: 34px; font-size: 1.3rem; }
  .view-pill { font-size: .8rem; }
  .compact-info h3 { font-size: .94rem; }
  .comment-form-actions { flex-direction: column; align-items: stretch; }
  .comment-item { grid-template-columns: 38px minmax(0, 1fr); padding: 12px; }
  .comment-avatar { width: 38px; height: 38px; }
  .comment-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* V14: admin lượt xem & doanh thu */
.stats-head { align-items: center; margin-bottom: 18px; }
.stats-summary-grid { margin: 14px 0 22px; }
.stats-list { display: grid; gap: 12px; }
.stats-story-card {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  border-radius: 18px;
  overflow: hidden;
}
.stats-story-card summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
}
.stats-story-card summary::-webkit-details-marker { display: none; }
.stats-story-card summary strong { color: #fff; font-size: 1.05rem; display: block; margin-bottom: 4px; }
.stats-story-card summary span { color: var(--muted); }
.stats-row-numbers { display: flex; flex-wrap: wrap; gap: 8px; justify-content: end; }
.stats-row-numbers span {
  color: #f6e7c6;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.18);
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 800;
}
.stats-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 18px 14px;
}
.stats-detail-grid > div {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(0,0,0,.15);
  padding: 14px;
}
.stats-detail-grid h3 { margin: 0 0 10px; font-size: 1rem; }
.stats-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid rgba(255,255,255,.07);
}
.stats-mini-row:first-of-type { border-top: 0; }
.stats-mini-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.stats-mini-row strong { color: #f6e7c6; white-space: nowrap; }
.inline-stat-link { margin: 0 18px 18px; display: inline-flex; }
@media (max-width: 900px) {
  .stats-story-card summary { grid-template-columns: 1fr; }
  .stats-row-numbers { justify-content: start; }
  .stats-detail-grid { grid-template-columns: 1fr; }
}

/* V15: admin user/refund/revenue layers */
.stats-period-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
}
.period-row, .ledger-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) minmax(90px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.period-row em, .ledger-row em {
  color: var(--muted);
  font-style: normal;
  font-size: .9rem;
}
.period-bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.period-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c5cff, #26d9ff);
}
.user-admin-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.user-admin-card {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(9, 10, 30, .74);
  color: var(--text);
  cursor: pointer;
}
.user-admin-card strong { display: block; font-size: 1.05rem; }
.user-admin-card span { color: var(--muted); }
.user-detail-panel { margin-top: 18px; }
.user-ledger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ledger-row { grid-template-columns: minmax(170px, 1fr) auto minmax(180px, 1fr); }
.refund-admin-list { display: grid; gap: 12px; margin-top: 18px; }
.refund-rule-box {
  border: 1px solid rgba(124,92,255,.25);
  border-radius: 18px;
  padding: 18px;
  background: rgba(124,92,255,.08);
}
.refund-offer {
  margin: 22px 0;
  padding: 22px;
  border: 1px solid rgba(255, 210, 92, .28);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 193, 7, .09), rgba(124, 92, 255, .09));
}
.refund-offer h2 { margin: 0 0 8px; }
.refund-offer textarea { width: 100%; margin: 8px 0 12px; }
@media (max-width: 900px) {
  .stats-period-grid, .user-ledger-grid { grid-template-columns: 1fr; }
  .period-row, .ledger-row, .user-admin-card { grid-template-columns: 1fr; display: grid; }
  .user-admin-card { align-items: start; }
}

/* V17: giao diện trang chủ sáng hơn + bố cục đầy đủ */
body:not(.admin-body) {
  --bg: #f6f3ff;
  --bg-2: #ffffff;
  --card: rgba(255, 255, 255, .82);
  --card-2: rgba(255, 255, 255, .94);
  --line: rgba(123, 92, 255, .18);
  --text: #20204c;
  --muted: #6b6a91;
  --primary: #8b4dff;
  --primary-2: #26a8ff;
  --accent: #ff5fc8;
  background:
    radial-gradient(circle at 12% 8%, rgba(68, 178, 255, .24), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(172, 92, 255, .32), transparent 30rem),
    radial-gradient(circle at 20% 85%, rgba(255, 135, 221, .24), transparent 28rem),
    linear-gradient(180deg, #fbf8ff 0%, #eef6ff 45%, #fff8ff 100%);
}
body:not(.admin-body)::before {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 80% 4%, rgba(123, 92, 255, .18), transparent 14rem),
    radial-gradient(circle at 6% 40%, rgba(41, 169, 255, .12), transparent 22rem),
    linear-gradient(120deg, rgba(255,255,255,.6), transparent 34%, rgba(219, 210, 255, .3));
}
body:not(.admin-body) .stars { opacity: .18; filter: hue-rotate(25deg); }
body:not(.admin-body) .site-header {
  background: rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(123, 92, 255, .14);
  color: var(--text);
}
body:not(.admin-body) .brand-mark { background: linear-gradient(135deg, #ffffff, #dccfff); box-shadow: 0 10px 28px rgba(123,92,255,.22); }
body:not(.admin-body) .nav a,
body:not(.admin-body) .nav-button { color: #4f4b7c; }
body:not(.admin-body) .nav a:hover,
body:not(.admin-body) .nav a.active,
body:not(.admin-body) .nav-button:hover { color: #6b30ff; background: rgba(139,77,255,.11); }
body:not(.admin-body) .header-actions button,
body:not(.admin-body) .ghost,
body:not(.admin-body) .primary {
  color: var(--text);
  background: rgba(255,255,255,.75);
  border-color: rgba(123,92,255,.18);
  box-shadow: 0 10px 28px rgba(65, 88, 208, .08);
}
body:not(.admin-body) .primary {
  color: #fff;
  background: linear-gradient(135deg, #9358ff, #31b8ff);
}
.homepage-shell { padding: 22px min(5.6vw, 86px) 0; }
.home-hero {
  position: relative;
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: center;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(123,92,255,.22);
  background: linear-gradient(135deg, rgba(64, 153, 255, .84), rgba(150, 87, 255, .72));
  box-shadow: 0 30px 85px rgba(87, 75, 195, .24);
  padding: clamp(28px, 5vw, 62px) clamp(26px, 5vw, 82px);
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .62;
  filter: saturate(1.12) brightness(1.08);
}
.home-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(47, 42, 154, .78), rgba(83, 99, 245, .34) 48%, rgba(255,255,255,.15));
}
.home-hero-content, .hero-reading-panel, .hero-arrow, .slider-dots { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex;
  padding: 9px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
  font-weight: 900;
  letter-spacing: .04em;
  font-size: .82rem;
}
.home-hero h1 {
  margin: 16px 0 10px;
  max-width: 680px;
  font-family: Georgia, 'Times New Roman', serif;
  color: #fff;
  font-size: clamp(2.25rem, 5vw, 4.9rem);
  line-height: .98;
  text-shadow: 0 12px 35px rgba(27, 20, 88, .35);
}
.home-hero p { max-width: 620px; color: rgba(255,255,255,.92); line-height: 1.7; }
.home-hero-stats { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0; color: #fff; font-weight: 700; }
.hero-reading-panel {
  align-self: stretch;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.26);
  border: 1px solid rgba(255,255,255,.26);
  backdrop-filter: blur(12px);
  display: grid;
  gap: 12px;
}
.hero-reading-panel h3 { margin: 0 0 4px; color: #fff; font-size: .86rem; letter-spacing: .07em; }
.hero-reading-panel a { display: grid; grid-template-columns: 54px 30px 1fr; gap: 10px; align-items: center; color: #fff; }
.hero-reading-panel img { width: 54px; height: 70px; object-fit: cover; border-radius: 12px; }
.hero-reading-panel b { color: #fff; }
.hero-reading-panel small { display: block; color: rgba(255,255,255,.78); margin-top: 4px; }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.32); background: rgba(255,255,255,.16); color: #fff; font-size: 2rem; }
.hero-arrow.left { left: 18px; }
.hero-arrow.right { right: 18px; }
.home-hero .slider-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); }
.home-panel {
  padding: 20px;
  border: 1px solid rgba(123,92,255,.14);
  border-radius: 24px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 22px 64px rgba(102, 85, 196, .12);
  backdrop-filter: blur(10px);
}
.home-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.home-panel-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; color: #2f2d70; font-size: clamp(1.1rem, 1.55vw, 1.55rem); }
.home-panel-head a { color: #7b4dff; font-weight: 800; font-size: .88rem; }
.home-layout { display: grid; gap: 22px; margin-top: 22px; }
.home-layout.three { grid-template-columns: 1.1fr 1.1fr 1fr; }
.home-layout.lower { align-items: start; }
.home-card-row { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 18px; }
.homepage-shell > .home-panel { margin-top: 22px; }
body:not(.admin-body) .compact-cover { border-color: rgba(123,92,255,.18); box-shadow: 0 12px 28px rgba(88, 77, 168, .16); }
body:not(.admin-body) .compact-info h3 { color: #29255b; }
body:not(.admin-body) .compact-meta { color: #69649a; }
.home-mini-list { display: grid; gap: 10px; }
.home-mini-item {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(123,92,255,.10);
  background: rgba(255,255,255,.58);
}
.home-mini-item img { width: 58px; height: 72px; object-fit: cover; border-radius: 12px; }
.home-mini-item strong { display: block; color: #29255b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-mini-item span { display: block; color: var(--muted); font-size: .84rem; margin-top: 5px; }
.home-mini-item em { color: #ff437f; font-style: normal; font-weight: 900; font-size: .72rem; }
.home-combo-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.home-combo-card { display: block; padding: 10px; border-radius: 18px; background: rgba(255,255,255,.62); border: 1px solid rgba(123,92,255,.12); }
.home-combo-cover { position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 4 / 3; margin-bottom: 10px; }
.home-combo-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-combo-cover span { position: absolute; top: 8px; left: 8px; border-radius: 999px; padding: 5px 9px; color: #fff; background: linear-gradient(135deg, #ff5fc8, #8b4dff); font-weight: 900; font-size: .75rem; }
.home-combo-card strong { display: block; color: #29255b; line-height: 1.35; }
.home-combo-card small { display: block; color: var(--muted); margin: 5px 0; }
.home-combo-card p { margin: 0; display: flex; flex-wrap: wrap; gap: 7px; align-items: baseline; }
.home-combo-card del { color: #9a95bd; font-size: .78rem; }
.home-combo-card b { color: #8b4dff; }
.home-rank-list { display: grid; gap: 10px; }
.home-rank-item { display: grid; grid-template-columns: 28px 48px minmax(0,1fr); align-items: center; gap: 10px; padding: 9px; border-radius: 16px; background: rgba(255,255,255,.55); }
.home-rank-item > span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ffbd52, #ff5fc8); font-weight: 900; }
.home-rank-item img { width: 48px; height: 62px; object-fit: cover; border-radius: 10px; }
.home-rank-item strong { display: block; color: #29255b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-rank-item small { color: var(--muted); }
.home-empty-box, .home-benefits { padding: 16px; color: var(--muted); border-radius: 16px; background: rgba(255,255,255,.55); border: 1px dashed rgba(123,92,255,.18); line-height: 1.7; }
.home-benefits p { margin: 0 0 10px; }
.home-promo {
  margin: 26px 0 0;
  border-radius: 26px;
  padding: 28px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 24px;
  background: linear-gradient(135deg, rgba(139,77,255,.92), rgba(38,168,255,.82), rgba(255,95,200,.72));
  box-shadow: 0 26px 80px rgba(103, 78, 206, .22);
}
.home-promo h2 { margin: 0 0 8px; font-family: Georgia, 'Times New Roman', serif; }
.home-promo p { margin: 0; color: rgba(255,255,255,.86); }
.promo-features { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; align-items: stretch; }
.promo-features span { padding: 16px; border-radius: 18px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.16); font-weight: 800; text-align: center; }
.home-footer {
  margin-top: 28px;
  padding: 34px 0 50px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  color: #63608d;
}
.home-footer strong { display: block; margin-bottom: 10px; color: #29255b; }
.home-footer a, .home-footer p { display: block; margin: 6px 0; color: #63608d; }
.refund-ok { color: #168b65; font-weight: 800; }
.refund-warn { color: #b45a00; font-weight: 800; }
@media (max-width: 1100px) {
  .homepage-shell { padding-left: 18px; padding-right: 18px; }
  .home-hero { grid-template-columns: 1fr; }
  .hero-reading-panel { display: none; }
  .home-layout.three { grid-template-columns: 1fr; }
  .home-promo { grid-template-columns: 1fr; }
  .promo-features { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .home-footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .home-combo-grid, .promo-features, .home-footer { grid-template-columns: 1fr; }
  .home-card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-hero { padding: 28px 18px; }
  .hero-arrow { display: none; }
}

/* V18 - Trang tài khoản độc giả riêng */
.reader-account-page {
  padding: 28px 5.5vw 0;
  color: #28255f;
  background:
    radial-gradient(circle at 8% 12%, rgba(148, 116, 255, .18), transparent 28rem),
    radial-gradient(circle at 95% 10%, rgba(80, 191, 255, .16), transparent 30rem),
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(244,246,255,.96));
  min-height: calc(100vh - 74px);
}
.reader-account-page .home-footer { margin-left: 0; margin-right: 0; }
.account-login-page { display: grid; place-items: center; padding: 90px 5vw; }
.account-login-card {
  max-width: 720px;
  padding: 44px;
  text-align: center;
  border-radius: 32px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(123, 92, 255, .15);
  box-shadow: 0 26px 90px rgba(102, 85, 196, .18);
}
.account-login-card h1 { margin: 0 0 12px; font-size: clamp(2rem, 4vw, 3.6rem); color: #322a7e; }
.account-login-card p { color: #666091; line-height: 1.8; margin-bottom: 22px; }
.reader-account-hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1.1fr 1.6fr auto;
  gap: 24px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(131, 94, 255, .82), rgba(87, 178, 255, .76), rgba(255, 145, 213, .58)),
    url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?q=80&w=1600&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: 0 28px 90px rgba(103, 78, 206, .26);
  border: 1px solid rgba(255,255,255,.38);
}
.reader-account-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 50%, rgba(255,255,255,.34), transparent 16rem),
    radial-gradient(circle at 86% 20%, rgba(255,255,255,.26), transparent 18rem);
  pointer-events: none;
}
.reader-account-hero > * { position: relative; z-index: 1; }
.reader-profile-block { display: flex; align-items: center; gap: 18px; min-width: 0; }
.reader-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #7654ff, #35b4ff, #ff7ccf);
  border: 5px solid rgba(255,255,255,.42);
  box-shadow: 0 18px 46px rgba(51, 35, 145, .28);
}
.reader-profile-block h1 { margin: 0 0 4px; font-size: 2rem; color: #fff; }
.reader-profile-block p { margin: 0 0 8px; color: rgba(255,255,255,.82); }
.vip-chip { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.24); font-weight: 900; }
.reader-hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.reader-quick-actions { display: grid; gap: 12px; min-width: 210px; }
.reader-quick-actions .ghost { background: rgba(255,255,255,.72); color: #3b317f; border-color: rgba(255,255,255,.55); text-align: center; }
.reader-account-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; margin-top: 24px; }
.reader-account-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 26px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(123, 92, 255, .13);
  box-shadow: 0 22px 60px rgba(102, 85, 196, .12);
  backdrop-filter: blur(14px);
}
.reader-account-sidebar a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  color: #514b85;
  font-weight: 800;
}
.reader-account-sidebar a:hover, .reader-account-sidebar a.active { background: linear-gradient(135deg, rgba(135,91,255,.16), rgba(54,181,255,.12)); color: #6d43ff; }
.reader-account-sidebar b { color: #fff; min-width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: #ff4f7f; font-size: .78rem; }
.reader-account-main { display: grid; gap: 22px; }
.reader-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.reader-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(123,92,255,.13);
  box-shadow: 0 20px 55px rgba(102, 85, 196, .10);
}
.reader-stat-card span { display: block; color: #7a74a6; font-weight: 800; margin-bottom: 5px; }
.reader-stat-card strong { display: block; color: #332d7e; font-size: 1.45rem; }
.reader-stat-card em { display: block; font-style: normal; color: #7f4dff; font-size: .86rem; margin-top: 4px; font-weight: 800; }
.reader-stat-icon { width: 58px; height: 58px; flex: 0 0 auto; border-radius: 20px; display: grid; place-items: center; font-size: 1.55rem; background: linear-gradient(135deg, rgba(143,91,255,.16), rgba(32,164,255,.12)); }
.reader-account-grid { display: grid; gap: 22px; }
.reader-account-grid.two-columns { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .95fr); align-items: start; }
.reader-account-card {
  padding: 22px;
  border-radius: 26px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(123, 92, 255, .13);
  box-shadow: 0 22px 64px rgba(102, 85, 196, .11);
  backdrop-filter: blur(12px);
}
.reader-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.reader-card-head h2, .reader-card-head h3 { margin: 0; color: #312a7a; }
.reader-card-head p { margin: 7px 0 0; color: #716b9b; line-height: 1.65; }
.reader-card-head a, .reader-card-head span { color: #7d4dff; font-weight: 900; }
.reader-notice-list { display: grid; gap: 10px; }
.reader-notice-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(123,92,255,.11);
}
.reader-notice-item.unread { background: linear-gradient(135deg, rgba(143,91,255,.12), rgba(32,164,255,.08)); }
.reader-notice-icon { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: rgba(143,91,255,.12); font-size: 1.3rem; }
.reader-notice-item strong { display: block; color: #312a7a; }
.reader-notice-item p { margin: 5px 0 0; color: #716b9b; line-height: 1.55; }
.reader-notice-side { text-align: right; display: grid; gap: 8px; color: #7d78a2; font-size: .86rem; }
.reader-notice-side em { font-style: normal; justify-self: end; padding: 6px 10px; border-radius: 999px; color: #7d4dff; background: rgba(127,77,255,.11); font-weight: 900; }
.promo-banner-small {
  min-height: 164px;
  border-radius: 22px;
  padding: 22px;
  color: #fff;
  display: grid;
  align-content: center;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(120,75,255,.84), rgba(61,178,255,.68), rgba(255,99,203,.62)),
    url('https://images.unsplash.com/photo-1518709268805-4e9042af2176?q=80&w=1000&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
}
.promo-banner-small strong { font-size: 1.35rem; }
.promo-banner-small .primary { justify-self: start; }
.task-list { margin-top: 16px; display: grid; gap: 8px; }
.task-list h3 { color: #312a7a; margin: 0 0 6px; }
.task-list p { margin: 0; padding: 12px 14px; border-radius: 15px; background: rgba(255,255,255,.62); color: #625c8b; display: flex; justify-content: space-between; }
.task-list b { color: #ff8a00; }
.reader-table { display: grid; gap: 0; overflow: hidden; border-radius: 18px; border: 1px solid rgba(123,92,255,.12); }
.reader-table-head, .reader-table-row { display: grid; grid-template-columns: 150px minmax(0,1fr) 120px 120px; gap: 12px; align-items: center; padding: 12px 14px; }
.reader-table-head { background: rgba(143,91,255,.09); color: #625c8b; font-weight: 900; }
.reader-table-row { background: rgba(255,255,255,.60); border-top: 1px solid rgba(123,92,255,.09); color: #615c8f; }
.reader-table-row strong { color: #312a7a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-table-row em { font-style: normal; justify-self: start; color: #168b65; background: rgba(22,139,101,.1); padding: 6px 10px; border-radius: 999px; font-weight: 900; }
.tx-plus { color: #168b65; }
.tx-minus { color: #ea4569; }
.reader-refund-list { display: grid; gap: 14px; }
.reader-refund-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(123,92,255,.12);
}
.reader-refund-card > img { width: 78px; height: 104px; object-fit: cover; border-radius: 14px; box-shadow: 0 12px 26px rgba(72, 59, 145, .16); }
.reader-refund-title { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.reader-refund-title strong { color: #302a77; font-size: 1.04rem; }
.reader-refund-title span { padding: 6px 10px; border-radius: 999px; font-size: .78rem; font-weight: 900; }
.status-approved { color: #0c8a60; background: rgba(12,138,96,.11); }
.status-pending { color: #b45a00; background: rgba(255,184,77,.18); }
.status-rejected { color: #d8335b; background: rgba(216,51,91,.11); }
.reader-refund-main p { margin: 4px 0; color: #716b9b; line-height: 1.5; }
.progress-line { height: 9px; border-radius: 999px; overflow: hidden; background: rgba(143,91,255,.12); margin: 10px 0 6px; }
.progress-line i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8f5bff, #20a4ff, #ff6fcb); }
.reader-refund-main small { color: #716b9b; }
.reader-refund-action { text-align: right; display: grid; gap: 7px; justify-items: end; }
.reader-refund-action span { color: #8a84ac; }
.reader-refund-action strong { color: #6d43ff; font-size: 1.32rem; }
.reader-refund-action em { font-style: normal; color: #7a74a6; font-weight: 900; }
.reader-reading-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px; }
.reader-reading-card { display: grid; gap: 8px; padding: 10px; border-radius: 18px; background: rgba(255,255,255,.64); border: 1px solid rgba(123,92,255,.11); }
.reader-reading-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; }
.reader-reading-card strong { color: #302a77; line-height: 1.35; }
.reader-reading-card span { color: #756f9a; font-size: .86rem; }
.reader-reading-card em { font-style: normal; padding: 8px 10px; color: #fff; text-align: center; border-radius: 999px; background: linear-gradient(135deg, #8f5bff, #20a4ff); font-weight: 900; }
.account-story-grid.airy { grid-template-columns: 1fr; gap: 10px; }
.reader-comment-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.reader-comment-item { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 12px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.64); border: 1px solid rgba(123,92,255,.11); }
.reader-comment-item strong { color: #302a77; }
.reader-comment-item p { color: #625c8b; line-height: 1.6; margin: 5px 0; }
.reader-comment-item span { color: #938db4; font-size: .84rem; }
.account-empty { color: #716b9b; background: rgba(255,255,255,.55); border-radius: 18px; padding: 18px; }
@media (max-width: 1200px) {
  .reader-account-hero { grid-template-columns: 1fr; }
  .reader-quick-actions { display: flex; flex-wrap: wrap; }
  .reader-account-layout { grid-template-columns: 1fr; }
  .reader-account-sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .reader-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader-account-grid.two-columns { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .reader-account-page { padding-left: 16px; padding-right: 16px; }
  .reader-account-hero { padding: 22px; }
  .reader-profile-block { align-items: flex-start; }
  .reader-avatar { width: 82px; height: 82px; }
  .reader-hero-metrics, .reader-stat-grid { grid-template-columns: 1fr; }
  .reader-table-head { display: none; }
  .reader-table-row { grid-template-columns: 1fr; }
  .reader-notice-item, .reader-refund-card { grid-template-columns: 1fr; }
  .reader-refund-action { text-align: left; justify-items: start; }
}

/* V20 fixes: account tabs, task rewards, compact card labels, admin helpers */
.compact-badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  min-height: 26px;
  margin-bottom: 4px;
}
.status-chip, .combo-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.status-chip.full { background: linear-gradient(135deg, #00c896, #18e8ad); color: #fff; }
.status-chip.serial { background: linear-gradient(135deg, #4a8dff, #7b5cff); color: #fff; }
.combo-chip { background: linear-gradient(135deg, #ffe08a, #ffbe4b); color: #432900; box-shadow: 0 8px 20px rgba(255, 188, 70, .22); }
.compact-info h3 { margin-top: 6px; }
.dynamic-task-list { margin-top: 10px; }
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(126, 87, 255, .14);
}
.task-row + .task-row { margin-top: 8px; }
.task-row strong { display: block; color: #312a7a; }
.task-row span { color: #ff8a00; font-weight: 900; }
.task-row button[disabled] { opacity: .65; cursor: not-allowed; }
.task-row.claimed { background: rgba(230, 255, 239, .82); }
.inline-price-edit {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}
.inline-price-edit label {
  margin: 0;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
}
.inline-price-edit input[type="number"] {
  max-width: 130px;
  min-height: 38px;
  padding: 8px 10px;
}
.role-editor-row {
  display: grid;
  grid-template-columns: 160px minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.05);
}
.role-editor-row label { margin: 0; }
.stats-download-note { margin-top: 18px; }
.reader-account-main > .reader-account-card,
.reader-account-main > .reader-account-grid,
.reader-account-main > .reader-stat-grid { animation: fadeInAccount .18s ease; }
@keyframes fadeInAccount { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .role-editor-row { grid-template-columns: 1fr; }
  .inline-price-edit input[type="number"] { max-width: none; flex: 1; }
}

/* V21 reader/admin feature fixes */
.status-chip.free { background: linear-gradient(135deg, #16c784, #34e89e); color: #fff; }
.home-layout.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bulk-buy-offer,
.donate-modal-box,
.avatar-settings,
.bulk-schedule-box {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.05);
  padding: 18px;
  margin: 18px 0;
}
.bulk-buy-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.reader-avatar img,
.reader-avatar.small img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.reader-avatar.small { width: 72px; height: 72px; font-size: 1.8rem; }
.avatar-settings { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.avatar-settings input { margin: 8px 0; }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bulk-schedule-box { background: rgba(143,91,255,.07); }
.genre-suggest-box {
  position: relative;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 16, 35, .96);
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
.genre-suggest-box.hidden { display: none; }
.genre-suggest-box button {
  border: 1px solid rgba(143,91,255,.24);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text);
  background: rgba(143,91,255,.14);
}
.reader-account-page .reader-account-main { min-height: 520px; }
.donate-btn { border-color: rgba(255, 99, 178, .4); }
@media (max-width: 900px) {
  .home-layout.two,
  .bulk-buy-row,
  .form-grid.four,
  .avatar-settings { grid-template-columns: 1fr; }
}

/* V22 - mục Mới cập nhật hiển thị tối đa 15 truyện + thời gian tương đối */
.home-mini-list-long {
  max-height: none;
  gap: 8px;
}
.home-mini-list-long .home-mini-item {
  padding: 8px 10px;
}
.home-mini-list-long .home-mini-item img {
  width: 52px;
  height: 64px;
}
.home-mini-list-long .home-mini-item strong {
  font-size: .92rem;
}
.home-mini-list-long .home-mini-item span {
  font-size: .8rem;
}
