/* ══════════════════════════════════════════════════════
   KOMIKHUB POLISH LAYER (2026-09-25) — upgrade visual
   Dipakai setelah style.css (base.html).
   Hanya properti dekoratif (bg/border/shadow/transition/
   transform/cursor) supaya aturan media-query mobile di
   style.css (padding/font-size/width) tidak tertimpa.
   ══════════════════════════════════════════════════════ */

/* ── Base & a11y ── */
body {
  background:
    radial-gradient(1100px 480px at 50% -180px, rgba(255, 122, 61, 0.07), transparent 62%),
    var(--bg);
}
::selection { background: rgba(255, 122, 61, 0.35); color: #fff; }
* { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
html {
  scrollbar-width: thin;
  scrollbar-color: #2c313d transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #2c313d;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #3b4254; background-clip: padding-box; }

/* ── Nav ── */
.nav { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.logo { text-shadow: 0 2px 14px rgba(255, 122, 61, 0.28); }
.nav-link {
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 122, 61, 0.4);
  text-decoration: none;
}
.nav-burger {
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.nav-burger:hover {
  background: rgba(255, 122, 61, 0.12);
  border-color: rgba(255, 122, 61, 0.5);
  transform: translateY(-1px);
}
.search input { transition: border-color .15s ease, box-shadow .15s ease; }
.search input:focus {
  outline: none;
  border-color: rgba(255, 122, 61, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.14);
}
.search button {
  cursor: pointer;
  transition: filter .15s ease, transform .12s ease, box-shadow .15s ease;
  box-shadow: 0 4px 14px rgba(255, 106, 31, 0.28);
}
.search button:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(255, 106, 31, 0.38); }
.search button:active { transform: translateY(1px); }

/* ── Kartu komik (home / rekomendasi grid) ── */
.card {
  transition: transform .18s cubic-bezier(.2, .7, .3, 1),
              box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 61, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 122, 61, 0.16);
}
.cover img { transition: transform .35s cubic-bezier(.2, .7, .3, 1); }
.card:hover .cover img { transform: scale(1.06); }
.meta h3 { transition: color .15s ease; }
.card:hover .meta h3 { color: #ffffff; }

/* ── Strip "Baca Terbanyak" ── */
.strip-cover {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.strip-cover img { transition: transform .3s ease; }
.strip-title { transition: color .15s ease; }
.strip-card:hover .strip-cover {
  transform: translateY(-3px);
  border-color: rgba(255, 122, 61, 0.4);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}
.strip-card:hover .strip-cover img { transform: scale(1.06); }
.strip-card:hover .strip-title { color: #fff; }

/* ── Kartu rekomendasi ── */
.rec-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.rec-card img { transition: transform .3s ease; }
.rec-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 122, 61, 0.4);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}
.rec-card:hover img { transform: scale(1.05); }

/* ── Tombol ── */
.btn {
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease,
              background .15s ease, border-color .15s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.primary {
  background: linear-gradient(135deg, #ff8a4c 0%, #ff6a1f 100%);
  box-shadow: 0 6px 18px rgba(255, 106, 31, 0.32);
}
.btn.primary:hover {
  filter: brightness(1.07);
  box-shadow: 0 8px 22px rgba(255, 106, 31, 0.42);
}
/* .btn polos (admin/search): tanpa .primary & .danger */
.btn:not(.primary):not(.danger) {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn:not(.primary):not(.danger):hover {
  background: #20242f;
  border-color: rgba(255, 122, 61, 0.45);
}
.btn.danger:hover {
  background: rgba(240, 74, 94, 0.14);
  border-color: #8a3a50;
}
.pill { transition: background .15s ease, border-color .15s ease, transform .12s ease; }
.pill:hover { transform: translateY(-1px); }

/* ── Pager ── */
.pager a, .pager .cur {
  transition: background .15s ease, border-color .15s ease,
              transform .12s ease, box-shadow .15s ease;
}
.pager a:hover {
  border-color: rgba(255, 122, 61, 0.55);
  background: var(--panel-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  text-decoration: none;
}
.pager .cur { box-shadow: 0 4px 14px rgba(255, 122, 61, 0.35); }

/* ── Genre & tag ── */
.genre-tag { transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.genre-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35);
  text-decoration: none;
}
.genre-pill { transition: background .15s ease, border-color .15s ease, transform .12s ease; }
.genre-pill:hover { transform: translateY(-1px); }
.tag { transition: background .15s ease, border-color .15s ease, transform .12s ease; }
.tag.g:hover { border-color: rgba(167, 243, 208, 0.5); }
.tag.g:hover, .tag.ch:hover { transform: translateY(-1px); }

/* ── Chapter list ── */
.chap {
  transition: background .15s ease, border-color .15s ease,
              transform .1s ease, color .15s ease, box-shadow .15s ease;
}
.chap:hover {
  border-color: rgba(255, 122, 61, 0.5);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.more-btn { transition: background .15s ease, border-color .15s ease, transform .12s ease; }
.more-btn:hover { border-color: rgba(255, 122, 61, 0.45); transform: translateY(-1px); }

/* ── Drawer (menu burger mobile) ── */
.drawer {
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.55);
}
.drawer-item { transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.drawer-item:hover {
  background: rgba(255, 122, 61, 0.1);
  border-color: rgba(255, 122, 61, 0.35);
  transform: translateX(3px);
}
.drawer-burger { transition: border-color .15s ease, background .15s ease; }
.drawer-burger:hover { background: rgba(255, 122, 61, 0.12); border-color: rgba(255, 122, 61, 0.5); }

/* ── Input seragam (login/account/search) ── */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="search"]:focus {
  outline: none;
  border-color: rgba(255, 122, 61, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.14);
}
select:focus {
  outline: none;
  border-color: rgba(255, 122, 61, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.14);
}

/* ── Admin panel ── */
.admin-card {
  background: linear-gradient(180deg, #171b24 0%, #12151c 100%);
  border-color: #262c38;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}
.admin-card .section-title,
.section-title { border-left: 3px solid var(--accent); padding-left: 9px; border-radius: 2px; }
.stat-row:not(.warn) b { color: var(--accent); font-weight: 800; }
.user-row { transition: background .15s ease; border-radius: 8px; }
.user-row:hover { background: rgba(255, 255, 255, 0.03); }
.tag.admin {
  background: linear-gradient(135deg, #ff8a4c, #ff6a1f);
  box-shadow: 0 2px 8px rgba(255, 106, 31, 0.35);
}
.log {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.6;
  color: #c9d1d9;
  background: #0a0c11;
  border: 1px solid #232834;
}
.log::-webkit-scrollbar { width: 8px; height: 8px; }
.log::-webkit-scrollbar-thumb { background: #2c313d; border-radius: 999px; }
.action-status:empty { margin-bottom: 14px; }

/* ── Login box ── */
.login-box {
  background: linear-gradient(180deg, #171b24, #12151c);
  border-color: #262c38;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.login-box button {
  background: linear-gradient(135deg, #ff8a4c, #ff6a1f);
  box-shadow: 0 6px 18px rgba(255, 106, 31, 0.32);
  transition: filter .15s ease, transform .12s ease, box-shadow .15s ease;
}
.login-box button:hover { filter: brightness(1.07); box-shadow: 0 8px 22px rgba(255, 106, 31, 0.42); }
.login-box button:active { transform: translateY(1px); }
.acc-form .btn {
  background: linear-gradient(135deg, #ff8a4c, #ff6a1f);
  box-shadow: 0 6px 18px rgba(255, 106, 31, 0.32);
}

/* ── Reader ── */
.r-body img {
  border-radius: 0;
  box-shadow: none;      /* shadow antar panel flush = bayangan gelap nyambung */
}
.r-header { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.r-nav { box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4); }
.r-nav-btn { transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.r-nav-btn:hover { border-color: rgba(255, 122, 61, 0.45); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }
.r-nav-btn.primary {
  background: linear-gradient(135deg, #ff8a4c, #ff6a1f);
  box-shadow: 0 4px 14px rgba(255, 106, 31, 0.32);
}
.r-fab {
  background: linear-gradient(135deg, #ff8a4c, #ff6a1f);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(255, 106, 31, 0.4);
}

/* ── Section title & footer ── */
.topbar h1 { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4); }
.foot {
  border-top-color: rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, transparent, rgba(255, 122, 61, 0.05));
}

/* ── Aksesibilitas: hormati prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Admin: pencarian user — input & tombol SeIMBANG ──
   Rule lama .admin-card .btn { display:block; width:100% } bikin tombol
   Cari full-width kegedean; taruh di .user-search (specificity sama,
   polish.css dimuat SETELAH style.css → menang tanpa !important). */
.user-search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}
.user-search input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
}
.user-search input::placeholder { color: var(--muted); }
.user-search .btn {
  display: inline-flex;
  width: auto;
  flex: 0 0 auto;
  height: 44px;
  min-height: 44px;
  padding: 0 24px;
  text-align: center;
}
.user-search .btn:hover { text-decoration: none; }

/* ═══════════════════════════════════════════════════════════
   KOMIKHUB GLOW-UP — lapisan estetika (urutan terakhir = menang)
   Arah: dark modern (refs: Linear/Spotify) — layered surfaces,
   aksen oranye-amber gradient, frosted glass, micro-interaction.
   ═══════════════════════════════════════════════════════════ */

:root {
  --accent-grad: linear-gradient(135deg, #ffb347 0%, #ff7a3d 55%, #ff5e2a 100%);
  --accent-soft: rgba(255, 122, 61, 0.12);
  --hairline: rgba(255, 255, 255, 0.07);
  --card-grad: linear-gradient(180deg, #161a24 0%, #10131b 100%);
  --glow: 0 8px 28px rgba(255, 106, 26, 0.28);
}

/* ── Base: font + ambient background ── */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1100px 520px at 50% -8%, rgba(255, 122, 61, 0.10), transparent 62%),
    radial-gradient(800px 460px at 100% 8%, rgba(124, 92, 255, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(255, 122, 61, 0.35); color: #fff; }
a { transition: color .18s ease, border-color .18s ease, background .18s ease; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* scrollbar ramping */
* { scrollbar-width: thin; scrollbar-color: #2c3140 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2f3546, #232837);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: #3a4156; }

/* ── Nav: frosted + hairline gradien ── */
.nav {
  background: linear-gradient(180deg, rgba(10, 12, 18, 0.92), rgba(10, 12, 18, 0.78));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: none;
  position: sticky;
}
.nav::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 61, 0.55), rgba(124, 92, 255, 0.35), transparent);
}

/* ── Logo: gradient text ── */
.logo {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 122, 61, 0.35));
  letter-spacing: -0.2px;
}

/* ── Search: pill + glow fokus ── */
.search input {
  border-radius: 999px;
  border-color: var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  padding: 11px 18px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.search input:hover { border-color: rgba(255, 122, 61, 0.4); }
.search input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 122, 61, 0.15), 0 4px 24px rgba(0, 0, 0, 0.35);
}
.search button {
  border-radius: 999px;
  background: var(--accent-grad);
  border: 0;
  font-weight: 700;
  box-shadow: var(--glow);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.search button:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 32px rgba(255, 106, 26, 0.38); }
.search button:active { transform: translateY(0); }

/* ── Section title: aksen bar ── */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-title::before {
  content: "";
  width: 5px; height: 18px;
  border-radius: 99px;
  background: var(--accent-grad);
  box-shadow: 0 0 12px rgba(255, 122, 61, 0.55);
  flex: 0 0 auto;
}

/* ── Kartu manga: surface + hover premium ── */
.card {
  border-radius: 16px;
  border-color: var(--hairline);
  background: var(--card-grad);
  transition: transform .28s cubic-bezier(.2, .7, .3, 1),
              box-shadow .28s ease, border-color .28s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 122, 61, 0.45);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 122, 61, 0.18),
              0 0 34px rgba(255, 122, 61, 0.12);
}
.card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.10), transparent 42%);
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
}
.card:hover::after { opacity: 1; }
.cover { background: linear-gradient(160deg, #1b2434, #0e1219); }
.cover img { transition: transform .45s cubic-bezier(.2, .7, .3, 1); }
.card:hover .cover img { transform: scale(1.07); }
.meta h3 { font-weight: 700; letter-spacing: -0.01em; transition: color .2s ease; }
.card:hover .meta h3 { color: #ffffff; }
.card-sub .ch {
  display: inline-flex; align-items: center; gap: 4px;
  color: #ffb98a; font-weight: 600;
}

/* placeholder shimmer */
.ph {
  background: linear-gradient(100deg, #151a25 30%, #202636 48%, #151a25 66%);
  background-size: 240% 100%;
  animation: kh-shimmer 1.6s ease-in-out infinite;
  -webkit-text-fill-color: initial;
}
@keyframes kh-shimmer { 0% { background-position: 130% 0; } 100% { background-position: -60% 0; } }

/* ── Chips & pills ── */
.tag, .genres .tag, .genre-tag, .genre-pill {
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 61, 0.28);
  background: var(--accent-soft);
  color: #ffd2ae;
  font-weight: 600;
  transition: all .18s ease;
}
.tag:hover, .genre-tag:hover, .genre-pill:hover {
  background: rgba(255, 122, 61, 0.22);
  border-color: rgba(255, 122, 61, 0.6);
  transform: translateY(-1px);
}
.genre-pill.active {
  background: var(--accent-grad);
  color: #1a0e06;
  border-color: transparent;
  box-shadow: var(--glow);
}

/* ── Tombol ── */
.btn { border-radius: 12px; transition: all .2s cubic-bezier(.2, .7, .3, 1); }
.btn:not(.primary) {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  color: var(--ink);
}
.btn:not(.primary):hover {
  border-color: rgba(255, 122, 61, 0.55);
  background: rgba(255, 122, 61, 0.10);
  transform: translateY(-1px);
}
.btn.primary, .primary {
  background: var(--accent-grad);
  box-shadow: var(--glow);
}
.btn.primary:hover, .primary:hover {
  background: var(--accent-grad);
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 12px 34px rgba(255, 106, 26, 0.42);
}
.btn.primary:active, .primary:active { transform: translateY(0); }

/* ── Detail page ── */
.cover-big {
  border-radius: 18px;
  border: 1px solid var(--hairline);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 122, 61, 0.10),
              0 0 44px rgba(255, 122, 61, 0.10);
  transition: transform .3s ease, box-shadow .3s ease;
}
.cover-big:hover { transform: translateY(-4px); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 54px rgba(255, 122, 61, 0.16); }
.info h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.desc { color: #b7bfcd; }

/* ── Daftar chapter ── */
.chaplist h2 { font-weight: 800; letter-spacing: -0.01em; }
.chgrid-wrap {
  border-radius: 16px;
  border-color: var(--hairline);
  background: linear-gradient(180deg, #131721, #10131b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.chap {
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all .16s ease;
}
.chap:hover {
  background: rgba(255, 122, 61, 0.10);
  border-color: rgba(255, 122, 61, 0.35);
  transform: translateX(4px);
}
.chsearch input { border-radius: 999px; border-color: var(--hairline); }
.chsearch input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 122, 61, 0.15); }

/* ── Reader: nav atas/bawah frosted, panel tetap flush ── */
.r-header {
  background: linear-gradient(180deg, rgba(10, 12, 18, 0.94), rgba(10, 12, 18, 0.75));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.r-nav {
  background: rgba(14, 17, 24, 0.82);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid var(--hairline);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
}
.r-nav-btn {
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.05);
  transition: all .18s ease;
}
.r-nav-btn:hover {
  border-color: rgba(255, 122, 61, 0.55);
  background: rgba(255, 122, 61, 0.12);
  transform: translateY(-2px);
}

/* ── Admin cards ── */
.admin-card {
  border-radius: 16px;
  border-color: var(--hairline);
  background: var(--card-grad);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.action-status { font-weight: 600; }

/* ── Drawer items ── */
.drawer-item { border-radius: 12px; transition: all .16s ease; }
.drawer-item:hover { background: rgba(255, 122, 61, 0.12); border-color: rgba(255, 122, 61, 0.3); transform: translateX(3px); }

/* ── Entrance micro-animation (hormati reduced-motion) ── */
@keyframes kh-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* backwards (bukan both): setelah animasi selesai, transform lepas ->
   hover lift kartu tetap jalan (fill-mode both itu menang atas :hover) */
.grid > .card { animation: kh-fade-up .45s cubic-bezier(.2, .7, .3, 1) backwards; }
.grid > .card:nth-child(2) { animation-delay: .05s; }
.grid > .card:nth-child(3) { animation-delay: .1s; }
.grid > .card:nth-child(4) { animation-delay: .15s; }
.grid > .card:nth-child(5) { animation-delay: .2s; }
.grid > .card:nth-child(6) { animation-delay: .25s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   READER FOOTER NAV — Sebelumnya / Daftar Chapter / Selanjutnya
   Segmented bar: ghost | hub outline | gradient-primary
   ═══════════════════════════════════════════════════════════ */
.r-nav {
  height: auto;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
}
.r-nav-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 46px;
  padding: 0 8px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.r-nav-btn span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1);
}
/* Sebelumnya — ghost kiri, anak panah meluncur ke kiri saat hover */
.r-nav-btn:not(.primary):not(.disabled):hover {
  background: rgba(255, 122, 61, 0.12);
  border-color: rgba(255, 122, 61, 0.55);
  transform: translateY(-2px);
}
.r-nav-btn:nth-child(1):hover span { transform: translateX(-4px); }

/* Daftar Chapter — hub outline di tengah */
.r-nav-btn:nth-child(2) {
  background: transparent;
  border: 1px solid rgba(255, 122, 61, 0.5);
  color: #ffd2ae;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
}
.r-nav-btn:nth-child(2):hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 122, 61, 0.25);
}

/* Selanjutnya — gradient primary + glow, panah meluncur kanan */
.r-nav-btn.primary, .r-nav-btn.primary:hover {
  background: var(--accent-grad);
  background-size: 140% 100%;
}
.r-nav-btn.primary {
  border: 1px solid transparent;
  color: #2a1508;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.r-nav-btn.primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 12px 34px rgba(255, 106, 26, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  background-position: 20% 0;
}
.r-nav-btn:nth-child(3):hover span { transform: translateX(4px); }

.r-nav-btn.disabled {
  opacity: 0.35;
  box-shadow: none;
  transform: none;
}
.r-nav-btn:active:not(.disabled) { transform: translateY(0) scale(0.98); }

/* kontras "Daftar Chapter" vs "Sebelumnya": hub diberi tint oranye permanen */
.r-nav-btn:nth-child(2) {
  background: rgba(255, 122, 61, 0.14);
  border-color: rgba(255, 122, 61, 0.75);
}
.r-nav-btn:nth-child(2):hover { background: rgba(255, 122, 61, 0.24); }

/* FAB: angkat di atas bar nav biar gak nyenggol tombol Selanjutnya */
.r-fab {
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  background: rgba(16, 19, 26, 0.92);
  border: 1px solid rgba(255, 122, 61, 0.5);
  color: #ffb98a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(255, 122, 61, 0.22);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.r-fab:hover {
  transform: translateY(-2px);
  background: rgba(255, 122, 61, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 122, 61, 0.4);
}

/* ═══════════════════════════════════════════════════════════
   ADMIN: menu General | System (tab switcher) + form pengaturan
   ═══════════════════════════════════════════════════════════ */
.admin-tabs {
  display: flex;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto 14px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  width: fit-content;
}
.admin-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s ease;
}
.admin-tab:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.admin-tab.active {
  background: var(--accent-grad);
  color: #2a1508;
  box-shadow: var(--glow);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: kh-fade-up .3s ease both; }
#action-status { max-width: 1200px; margin: 0 auto 10px; font-weight: 600; }

.set-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffb98a;
  margin: 14px 0 6px;
}
.set-label input, .set-label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.set-label input:focus, .set-label textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 61, 0.15);
}
.set-label input[type="file"] { padding: 8px; background: transparent; }
.set-preview {
  margin-top: 8px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.set-preview img { display: block; width: 100%; max-height: 180px; object-fit: cover; }

/* ── Foto header/banner di halaman utama ── */
.site-banner {
  margin: 4px auto 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 122, 61, 0.35);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 122, 61, 0.12);
  background: var(--card-grad);
}
.site-banner img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  object-position: center;
}

/* poles form General: lebar nyaman + tombol file picker ikut tema */
#f-settings { max-width: 660px; }
#f-settings input[type="file"]::file-selector-button {
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-radius: 10px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  margin-left: 10px;
  transition: all .16s ease;
}
#f-settings input[type="file"]::file-selector-button:hover {
  border-color: rgba(255, 122, 61, 0.6);
  background: rgba(255, 122, 61, 0.12);
}

/* strip carousel: scrollbar disembunyikan — muncul tipis saat hover
   (buang visual 'double scrollbar' di bawah judul section) */
.strip { scrollbar-width: none; -ms-overflow-style: none; }
.strip::-webkit-scrollbar { height: 0; }
.strip:hover::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: rgba(255, 122, 61, 0.5); border-radius: 99px; }
.strip::-webkit-scrollbar-track { background: transparent; }

/* Preview kanan (General): SERP + share card + quick links */
.set-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 0 8px;
}
.set-sub:first-of-type { margin-top: 4px; }
.serp {
  background: #12151d;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 14px 16px;
}
.serp-title {
  color: #8ab4f8;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.serp-url { color: #7d8698; font-size: 12.5px; margin-bottom: 6px; word-break: break-all; }
.serp-desc {
  color: #aeb6c4;
  font-size: 13.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-card {
  display: flex;
  gap: 12px;
  background: #12151d;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
}
.share-img {
  flex: 0 0 132px;
  height: 92px;
  background: linear-gradient(135deg, #232a3a, #171c27);
  display: grid;
  place-items: center;
  font-size: 26px;
}
.share-img.empty::after { content: "📚"; opacity: .6; }
.share-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-meta { padding: 10px 12px 10px 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.share-site { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.share-title {
  font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.share-desc {
  font-size: 12px; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qlink {
  font-size: 12.5px; font-weight: 700; color: #ffd2ae;
  border: 1px solid rgba(255,122,61,.4); background: var(--accent-soft);
  padding: 7px 13px; border-radius: 999px; text-decoration: none;
  transition: all .16s ease;
}
.qlink:hover { background: rgba(255,122,61,.22); border-color: var(--accent); transform: translateY(-1px); }

/* Preview kanan sticky: nempel di viewport pas scroll form kiri
   (hanya saat grid 2 kolom / desktop — mobile stack gak dikasih) */
@media (min-width: 601px) {
  #pane-general .admin-grid > .admin-card:last-child {
    position: sticky;
    top: 66px;              /* di bawah nav sticky */
    align-self: start;      /* jangan stretch: biar tinggi kartu sendiri */
  }
}

/* Form Merge Duplikat (System > Data Hygiene) */
.merge-input {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 13.5px;
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.merge-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 61, 0.15);
}
.merge-keep {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 6px 0 10px;
  font-size: 13.5px;
  color: var(--ink);
}
.merge-keep label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 7px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition: all .16s ease;
}
.merge-keep label:hover { border-color: rgba(255, 122, 61, 0.5); }
.merge-keep input { accent-color: var(--accent); }

/* ── Suggest pencarian live (max5, ketik = muncul) ── */
.search { position: relative; }
.suggest-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #12151d;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  z-index: 300;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  display: none;
}
.suggest-box.open { display: block; animation: kh-fade-up .18s ease both; }
.suggest-item {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: background .14s ease;
}
.suggest-item:first-child { border-top: 0; }
.suggest-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggest-item::before { content: "→ "; color: var(--accent); font-weight: 800; }
.suggest-item:hover { background: rgba(255, 122, 61, 0.14); }

/* Meta kartu: DUA BARIS + center — "Ch. 31" di atas, waktu di bawah
   (dulu satu baris 'Ch. 31• 5 jam lalu' ngikut lebar kartu) */
.card-sub {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: normal;
  text-align: center;
}
.card-sub .ch,
.card-sub .ts {
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════ Admin: Kesehatan Source + Grafik Aktivitas14 hari (#12/#13) ══════ */
.health-rows { display: flex; flex-direction: column; }
.health-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--hairline);
}
.health-row:last-child { border-bottom: 0; }
.health-row b { flex: 1; font-weight: 600; }
.health-row .muted { font-size: 11.5px; }
.hbadge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  padding: 3px 9px;
  border-radius: 999px;
  min-width: 44px;
  text-align: center;
}
.hbadge.ok { background: rgba(74, 222, 128, 0.14); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.4); }
.hbadge.bad { background: rgba(248, 113, 113, 0.14); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.45); }
.mini-btn { font-size: 12px; padding: 6px 14px; min-height: 0; }

.vchart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  flex-wrap: wrap;
}
.vcol {
  flex: 1;
  min-width: 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}
.vbar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--accent-grad);
  box-shadow: 0 4px 14px rgba(255, 106, 26, 0.3);
  transition: height .4s cubic-bezier(.2, .7, .3, 1);
  min-height: 2px;
}
.vbar.empty { background: rgba(255, 255, 255, 0.07); box-shadow: none; }
.vlabel { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.vtotal {
  flex-basis: 100%;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffb98a;
  margin-top: 6px;
}

/* ══════ #5 Sort pills (homepage/genre) + #6 Katalog A–Z ══════ */
.sort-pills {
  max-width: 1100px;
  margin: -6px auto 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.spill {
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  text-decoration: none;
  transition: all .16s ease;
}
.spill:hover { color: var(--ink); border-color: rgba(255, 122, 61, 0.5); transform: translateY(-1px); }
.spill.active {
  background: var(--accent-grad);
  color: #2a1508;
  border-color: transparent;
  box-shadow: var(--glow);
}

.letter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.lpill {
  min-width: 34px;
  text-align: center;
  padding: 7px 9px;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  text-decoration: none;
  transition: all .15s ease;
}
.lpill:hover { border-color: rgba(255, 122, 61, 0.55); color: var(--ink); transform: translateY(-1px); }
.lpill.active {
  background: var(--accent-grad);
  color: #2a1508;
  border-color: transparent;
  box-shadow: var(--glow);
}

.klist {
  background: var(--card-grad);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
}
.krow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  transition: background .14s ease, padding-left .16s ease;
}
.krow:first-child { border-top: 0; }
.krow:hover { background: rgba(255, 122, 61, 0.10); padding-left: 22px; }
.ktitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.kch {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffb98a;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 122, 61, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ══════ #10 Folder bookmark + #11 Backup (account) ══════ */
.folder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 16px;
  align-items: center;
}
.fchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  text-decoration: none;
  transition: all .16s ease;
}
.fchip > a { color: inherit; text-decoration: none; display: inline-flex; gap: 6px; }
.fchip span {
  font-size: 10.5px;
  background: rgba(255, 122, 61, 0.18);
  color: #ffb98a;
  padding: 1px 7px;
  border-radius: 999px;
}
.fchip:hover { border-color: rgba(255, 122, 61, 0.55); color: var(--ink); transform: translateY(-1px); }
.fchip.active {
  background: var(--accent-grad);
  color: #2a1508;
  border-color: transparent;
  box-shadow: var(--glow);
}
.fchip.active span { background: rgba(0, 0, 0, 0.22); color: #ffe6cf; }
.chip-x { padding-right: 6px; }
.fchip-x {
  border: 0;
  background: transparent;
  color: #f87171;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
}
.fchip-x:hover { background: rgba(248, 113, 113, 0.22); }
.fnew { display: inline-flex; gap: 6px; }
.fnew input {
  width: 150px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 122, 61, 0.5);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 13px;
}
.fnew input:focus { outline: none; border-color: var(--accent); }
.fnew .btn { padding: 8px 16px; min-height: 0; font-size: 13px; }

.bm-folder {
  align-self: center;
  max-width: 150px;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .16s ease;
}
.bm-folder:hover, .bm-folder:focus { border-color: rgba(255, 122, 61, 0.6); outline: none; }
.bm-folder option { background: #141821; color: var(--ink); }

.backup-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.imp-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.imp-form input[type="file"] {
  font-size: 12.5px;
  color: var(--muted);
  border: 1px dashed var(--hairline);
  border-radius: 10px;
  padding: 8px;
}
.imp-form input[type="file"]::file-selector-button {
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  margin-right: 8px;
}

/* ══════ Admin: Job&Worker + Alarm Autocheck + Volume/Source + strip riwayat ══════ */
.hbadge.run {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.45);
  animation: pulse-run 1.6s ease-in-out infinite;
}
@keyframes pulse-run {
  0%, 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(96, 165, 250, 0); }
}
.hbadge.warn {
  background: rgba(250, 204, 21, 0.14);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.4);
}
.stop-btn {
  margin-left: auto;
  min-height: 0;
  padding: 4px 11px;
  font-size: 12px;
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.5);
}
.stop-btn:hover { background: rgba(248, 113, 113, 0.18); color: #fecaca; }
.job-idle {
  color: #4ade80;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 0;
}
.hstrip {
  display: inline-flex;
  gap: 3px;
  margin-left: auto;
  align-items: center;
}
.hstrip .hdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  cursor: help;
}
.hstrip .hdot.ok { background: rgba(74, 222, 128, 0.75); }
.hstrip .hdot.bad { background: rgba(248, 113, 113, 0.9); }

/* ══════ #9 Strip "Lanjutkan Baca" (homepage) ══════ */
.cont-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.cont-strip::-webkit-scrollbar { height: 6px; }
.cont-strip::-webkit-scrollbar-thumb { background: rgba(255, 122, 61, 0.35); border-radius: 999px; }
.cont-card {
  flex: 0 0 108px;
  scroll-snap-align: start;
  text-decoration: none;
  color: var(--ink);
  transition: transform .16s ease;
}
.cont-card:hover { transform: translateY(-3px); }
.cont-cover {
  position: relative;
  width: 108px;
  height: 150px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--hairline);
}
.cont-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cont-pct {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffb98a;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.cont-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cont-meta { font-size: 11px; color: var(--accent); font-weight: 700; margin-top: 3px; }

/* ══════ #6/#7/#8 Reader: pager, auto-load chapter, lapor ══════ */
.ch-sentinel {
  text-align: center;
  padding: 14px 12px;
  font-size: 13px;
}
.ch-spin {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 122, 61, 0.35);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin-ch .8s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}
@keyframes spin-ch { to { transform: rotate(360deg); } }
.ch-divider {
  text-align: center;
  margin: 26px auto 10px;
  position: relative;
}
.ch-divider span {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 4px 16px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  border: 1px solid rgba(255, 122, 61, 0.45);
  border-radius: 999px;
}
.r-report-wrap { text-align: center; padding: 8px 12px 2px; }
.r-report {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: var(--muted);
  font-size: 12.5px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .16s ease;
}
.r-report:hover { border-color: rgba(255, 122, 61, 0.6); color: var(--ink); }
.r-report.sent { color: #4ade80; border-color: rgba(74, 222, 128, 0.5); cursor: default; }

/* ══════ Job & Worker — kartu premium ══════ */
.live-chip {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .07em;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 2px 9px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
  animation: live-blink 1.5s ease-in-out infinite;
}
@keyframes live-blink { 50% { opacity: .4; } }
.job-list { display: flex; flex-direction: column; }
.job-row {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  padding: 11px 13px 0;
  margin-bottom: 10px;
  overflow: hidden;
  position: relative;
  transition: border-color .2s ease;
}
.job-row:hover { border-color: rgba(255, 122, 61, 0.45); }
.job-top { display: flex; align-items: center; gap: 9px; }
.job-icon { font-size: 16px; filter: drop-shadow(0 0 6px rgba(255, 122, 61, 0.35)); }
.job-name { font-size: 13.5px; flex: 1; word-break: break-word; letter-spacing: .01em; }
.job-timer {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffb98a;
  background: rgba(255, 122, 61, 0.13);
  border: 1px solid rgba(255, 122, 61, 0.32);
  padding: 3px 10px;
  border-radius: 8px;
  min-width: 52px;
  text-align: center;
}
.job-sub {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
}
.job-sub i { font-style: normal; color: rgba(255, 255, 255, 0.28); }
.job-sub span { white-space: nowrap; }
.job-bar {
  height: 4px;
  margin: 10px -13px 0;
  background: linear-gradient(90deg,
    rgba(255, 122, 61, 0) 0%, rgba(255, 122, 61, 0.75) 35%,
    rgba(255, 205, 130, 0.95) 50%, rgba(255, 122, 61, 0.75) 65%,
    rgba(255, 122, 61, 0) 100%);
  background-size: 220% 100%;
  animation: job-shimmer 1.7s linear infinite;
}
@keyframes job-shimmer { to { background-position: -220% 0; } }
.stop-btn {
  margin-left: auto;
  min-height: 0;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.08);
  border-radius: 9px;
}
.stop-btn:hover { background: rgba(248, 113, 113, 0.22); color: #fecaca; }
.stop-btn:disabled { opacity: .55; cursor: wait; }
.job-idle-big {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 8px;
}
.idle-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.13);
  border: 1px solid rgba(74, 222, 128, 0.42);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 19px;
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.18);
}
.job-idle-big b { display: block; font-size: 14.5px; color: #4ade80; }
.job-idle-big span:not(.idle-icon) { font-size: 12.5px; color: var(--muted); }

/* ══════ Job & Worker — PERBAIKAN wrap-per-huruf + rapikan ══════
   Akar masalah: rule LAMA style.css `.admin-card .btn {width:100%}`
   bikin tombol Stop makan seluruh baris -> nama job (flex basis0)
   jatuh ke min-content =1 huruf per baris. Override di sini (file ini
   dimuat SETELAH style.css -> menang tanpa !important). */
.job-top { flex-wrap: nowrap; }
.job-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14.5px;
  background: rgba(255, 122, 61, 0.12);
  border: 1px solid rgba(255, 122, 61, 0.3);
  border-radius: 9px;
  filter: none;
}
.job-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.job-timer { flex: 0 0 auto; }
.job-top .stop-btn {
  display: inline-flex;
  width: auto;
  flex: 0 0 auto;
  margin-left: 0;
  padding: 6px 13px;
  white-space: nowrap;
}
.job-sub { gap: 8px; }
.job-sub i { font-size: 10px; }
/* Laporan Pembaca */
.rep-title {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rep-title:hover { color: var(--accent); }

/* Laporan Pembaca — override .admin-card .btn {width:100%} (rule lama
   style.css:1263) yg bikin tombol ✕ melebar penuh -> teks wrap per-kata
   & tumpang tindih. Specificity 0,3,0 > 0,2,0 -> menang tanpa !important. */
#report-rows .btn.stop-btn {
  display: inline-flex;
  width: auto;
  flex: 0 0 auto;
  margin-left: auto;
  text-align: center;
  align-items: center;
  justify-content: center;
}
#report-rows .rep-note { color: var(--ink); opacity: .85; }

/* ══════ #8v2 Modal "Lapor Gambar Rusak" ══════ */
.rep-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rep-modal[hidden] { display: none; }
.rep-bd {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: rep-fade .18s ease;
}
.rep-box {
  position: relative;
  width: min(440px, calc(100vw - 24px));
  max-height: 88vh;
  overflow: auto;
  background: linear-gradient(180deg, #171a22, #12141b);
  border: 1px solid rgba(255, 122, 61, 0.4);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), 0 0 34px rgba(255, 122, 61, 0.14);
  animation: rep-pop .22s cubic-bezier(.2, .9, .3, 1.25);
}
@keyframes rep-fade { from { opacity: 0; } }
@keyframes rep-pop { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.rep-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15.5px;
}
.rep-x {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  padding: 4px 9px;
  border-radius: 9px;
}
.rep-x:hover { background: rgba(255, 255, 255, 0.09); color: var(--ink); }
.rep-ctx { font-size: 12.5px; color: var(--accent); font-weight: 700; margin-top: 4px; }
.rep-lbl { font-size: 13px; font-weight: 700; margin: 15px 0 9px; }
.rep-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.rep-chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
}
.rep-chip:hover { border-color: rgba(255, 122, 61, 0.55); color: var(--ink); transform: translateY(-1px); }
.rep-chip.on {
  background: var(--accent-grad);
  color: #2a1508;
  border-color: transparent;
  box-shadow: var(--glow);
}
.rep-box textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 13px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: 13px;
  padding: 11px 13px;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
}
.rep-box textarea:focus { outline: none; border-color: rgba(255, 122, 61, 0.6); }
.rep-turnstile { margin-top: 13px; display: flex; justify-content: center; }
.rep-err {
  margin-top: 11px;
  font-size: 12.5px;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.42);
  padding: 9px 13px;
  border-radius: 11px;
}
.rep-actions { display: flex; gap: 10px; margin-top: 15px; }
.rep-actions .btn { flex: 1; min-height: 43px; }
.rep-batal { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.rep-batal:hover { background: rgba(255, 255, 255, 0.11); color: var(--ink); }
.rep-kirim:disabled { opacity: .6; cursor: wait; }
.rep-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  padding: 18px 6px 8px;
}
.rep-done[hidden] { display: none; }
.rep-done-ic {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.5);
  color: #4ade80;
  font-size: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 28px rgba(74, 222, 128, 0.3);
}
.rep-done b { color: #4ade80; font-size: 16.5px; }
.rep-done span { font-size: 13px; color: var(--muted); max-width: 300px; }
.rep-done .btn { margin-top: 9px; min-width: 170px; }

/* #8v3: tombol lapor muncul saat gambar gagal load — kedip pelan biar kebaca */
.r-report-wrap[hidden] { display: none; }
.r-report-wrap.flash .r-report {
  color: var(--ink);
  border-style: solid;
  border-color: rgba(255, 122, 61, 0.65);
  background: rgba(255, 122, 61, 0.1);
  animation: rep-warn 1.7s ease-in-out infinite;
}
@keyframes rep-warn {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 122, 61, 0); }
  50% { box-shadow: 0 0 18px rgba(255, 122, 61, 0.45); }
}

/* ══════ Auto-load chapter berikutnya: saklar per-user (#7b) ══════ */
.al-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px 2px;
}
.al-btn {
  background: rgba(74, 222, 128, 0.10);
  border: 1px solid rgba(74, 222, 128, 0.42);
  color: #4ade80;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
}
.al-btn b { color: #86efac; }
.al-btn:hover { transform: translateY(-1px); box-shadow: 0 0 14px rgba(74, 222, 128, 0.18); }
.al-btn.off {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--hairline);
  color: var(--muted);
}
.al-btn.off b { color: var(--muted); }

/* ══════ Panel ⚙ Pengaturan Baca (reader header) ══════ */
.r-set-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 34px;
  margin-left: 6px;
  border-radius: 11px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  transition: all .15s ease;
}
.r-set-btn:hover {
  border-color: rgba(255, 122, 61, 0.6);
  color: var(--accent);
  transform: rotate(30deg);
}
.rset-sheet {
  position: fixed;
  inset: 0;
  z-index: 330;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rset-sheet[hidden] { display: none; }
.rset-bd {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: rep-fade .18s ease;
}
.rset-box {
  position: relative;
  width: min(430px, calc(100vw - 24px));
  background: linear-gradient(180deg, #171a22, #12141b);
  border: 1px solid rgba(255, 122, 61, 0.4);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), 0 0 34px rgba(255, 122, 61, 0.14);
  animation: rep-pop .22s cubic-bezier(.2, .9, .3, 1.25);
}
.rset-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15.5px;
  margin-bottom: 12px;
}
.rset-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 14px;
  border-radius: 15px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.rset-row:hover { border-color: rgba(74, 222, 128, 0.5); }
.rset-txt { flex: 1; min-width: 0; display: block; }
.rset-txt b { display: block; font-size: 14px; }
.rset-txt span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
/* switch */
.rset-sw {
  flex: 0 0 auto;
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.28);
  border: 1px solid rgba(74, 222, 128, 0.55);
  position: relative;
  transition: all .18s ease;
}
.rset-sw i {
  position: absolute;
  top: 2px;
  left: 24px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  transition: all .18s ease;
}
.rset-row.off .rset-sw { background: rgba(255, 255, 255, 0.08); border-color: var(--hairline); }
.rset-row.off .rset-sw i { left: 3px; background: #9aa0b4; box-shadow: none; }
.rset-row.off .rset-txt b { color: var(--muted); }
.rset-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--hairline);
  border-radius: 12px;
}
.rset-note b { color: var(--accent); }

/* ══════ Pengaturan Baca #1-#5 (panel ⚙ reader) ══════ */
.rset-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.rset-item:last-of-type { border-bottom: 0; }
.rset-lbl {
  flex: 1 1 100%;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
/* segmented control */
.rseg {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hairline);
  border-radius: 11px;
  padding: 3px;
  gap: 3px;
}
.rseg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
}
.rseg button:hover { color: var(--ink); }
.rseg button.on {
  background: var(--accent-grad);
  color: #2a1508;
  box-shadow: var(--glow);
}
.rseg-mini button { padding: 6px 9px; font-size: 11.5px; }
/* slider kecerahan */
.rset-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,122,61,.75), rgba(255,122,61,.2));
  outline: none;
  cursor: pointer;
}
.rset-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 0 10px rgba(255,122,61,.5);
  cursor: pointer;
}
.rset-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); cursor: pointer;
}
.rset-val {
  min-width: 42px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.rset-play {
  margin-left: auto;
  border: 1px solid rgba(74, 222, 128, 0.5);
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s ease;
}
.rset-play:hover { background: rgba(74, 222, 128, 0.22); box-shadow: 0 0 14px rgba(74,222,128,.25); }

/* reader: ukuran gambar #1 + jarak panel #2 + kecerahan #3 */
.r-body {
  overflow-x: auto;                     /* gambar >100% bisa digeser, gak kepotong */
  gap: var(--panel-gap, 0px);           /* #2 rapat/normal/lebar */
  filter: brightness(calc(1 - var(--read-dim, 0)));   /* #3 kecerahan malam */
}
.r-body::-webkit-scrollbar { height: 5px; }
.r-body::-webkit-scrollbar-thumb { background: rgba(255,122,61,.35); border-radius:999px; }
.r-body img {
  width: calc(100% * var(--img-scale, 1));   /* #1 .85 /1 /1.2 */
  max-width: none;
  margin-inline: auto;   /* center pas <=100%; auto jadi0 pas overflow -> gak clip kiri */
}

/* ══════ #6 Review Duplikat + #5 Chapter Bolong ══════ */
.dup-row { align-items: flex-start; }
.dup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dup-score {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 900;
  color: #2a1508;
  background: var(--accent-grad);
  padding: 2px 9px;
  border-radius: 999px;
  box-shadow: var(--glow);
}
.dup-title { font-size: 13.5px; }
.dup-line {
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dup-why { font-size: 11.5px; color: var(--muted); opacity: .75; margin-top: 3px; }
.dup-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.dup-keep {
  min-height: 0;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.10);
  color: #4ade80;
  border-radius: 9px;
}
.dup-keep:hover { background: rgba(74, 222, 128, 0.2); }
.gap-title {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
}
.gap-title:hover { color: var(--accent); }
.gap-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.gap-miss {
  font-size: 11.5px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border: 1px dashed rgba(251, 191, 36, 0.4);
  border-radius: 8px;
  padding: 4px 9px;
  margin-top: 6px;
  font-family: ui-monospace, Menlo, monospace;
}

/* 🗑 Hapus Komik (aksi destruktif) */
.btn-kill {
  background: rgba(248, 113, 113, 0.10) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(248, 113, 113, 0.55) !important;
}
.btn-kill:hover { background: rgba(248, 113, 113, 0.24) !important; }
.btn-kill:disabled { opacity: .5; cursor: wait; }

/* hasil inline tombol Fix / Scrape Manual */
.fix-msg {
  display: block;
  margin-top: 10px;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  word-break: break-word;
}
.fix-msg.ok {
  background: rgba(74, 222, 128, 0.10);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #4ade80;
}
.fix-msg.err {
  background: rgba(248, 113, 113, 0.10);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}

/* permalink slug A/B di kartu Review Duplikat */
.dup-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
}
.dup-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.dup-link::after { content: ' ↗'; font-size: 10px; opacity: .65; }

/* Chapter Bolong: judul + tombol ➕ Isi sejajar */
.gap-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gap-head .gap-title { flex: 1; min-width: 0; }
.gap-fill {
  flex: 0 0 auto;
  min-height: 0;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(74, 222, 128, 0.5) !important;
  background: rgba(74, 222, 128, 0.10) !important;
  color: #4ade80 !important;
  border-radius: 9px;
}
.gap-fill:hover { background: rgba(74, 222, 128, 0.22) !important; }
.gap-fill.done {
  border-color: rgba(96, 165, 250, 0.5) !important;
  background: rgba(96, 165, 250, 0.12) !important;
  color: #93c5fd !important;
  cursor: progress;
}

/* override .admin-card .btn {width:100%; min-height:44px} utk tombol isi gap
   (specificity .gap-head .gap-fill =0,2,0 = sama, polish.css dimuat SETELAH
   style.css -> menang urutan; jadi tombol ringkas, bukan full-width44px) */
.gap-head .gap-fill {
  display: inline-flex;
  width: auto;
  min-height: 0;
  padding: 4px 11px;
  font-size: 11.5px;
  line-height: 1.2;
  gap: 4px;
}
.gap-head { gap: 8px; }

/* ═══════════════════════════════════════════════════════════
   ADMIN PANEL — MOBILE FRIENDLY (<=600px)
   Fokus: input font>=16px (anti auto-zoom iOS), tap target >=44px,
   tab sticky, kartu padding rapat, tombol aksi numpuk rapi.
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* 1) iOS auto-zoom: input/select/textarea HARUS >=16px */
  .admin-card input:not([type=checkbox]):not([type=radio]):not([type=file]),
  .admin-card select,
  .admin-card textarea,
  .fnew input,
  .merge-input,
  #fix-slug,
  #scrape-title-input {
    font-size: 16px !important;
    min-height: 44px;
  }
  .admin-card input[type=file] { font-size: 14px; }

  /* 2) Tabs: sticky di atas, 2 kolom sama lebar, gede buat jempol */
  .admin-tabs {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    box-sizing: border-box;
    gap: 6px;
    padding: 8px 6px;
    margin: 0 -6px 10px;
    background: rgba(11, 13, 18, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--hairline);
  }
  .admin-tab {
    width: 100%;
    min-height: 46px;
    font-size: 14px;
    border-radius: 12px;
  }

  /* 3) Topbar & heading lebih rapet */
  .topbar { margin-bottom: 12px; padding: 0; gap: 8px; }
  .topbar h1 { font-size: 19px; }
  .topbar .clear-link { margin-left: auto; }

  /* 4) Kartu: padding & radius lebih kecil biar konten lega */
  .admin-card { padding: 13px; border-radius: 14px; }
  .admin-grid { gap: 10px; }
  .section-title { font-size: 15px; }

  /* 5) Label + nilai statistik tetap sejajar, angka gak mepet */
  .stat-row { font-size: 13.5px; }

  /* 6) Log update: font kecil tapi gak bikin halaman melebar */
  .log { font-size: 10.5px; max-height: 46vh; padding: 8px; }

  /* 7) Baris job/health: tombol Stop turun ke baris sendiri */
  .job-top { flex-wrap: wrap; }
  .job-top .stop-btn { width: 100%; margin-top: 6px; }

  /* 8) Review Duplikat: slug panjang di-wrap (bukan dipotong) */
  .dup-line {
    white-space: normal;
    word-break: break-all;
    overflow: visible;
  }
  .dup-btns { width: 100%; margin-top: 8px; }
  .dup-keep { flex: 1; min-height: 42px; }
  .dup-row { flex-wrap: wrap; }

  /* 9) Chapter Bolong: tombol Isi gede, badge di kanan tetap */
  .gap-head { flex-wrap: wrap; }
  .gap-head .gap-fill { min-height: 38px; padding: 6px 14px; font-size: 12.5px; }
  .gap-row { flex-wrap: wrap; }
  .gap-miss { font-size: 10.5px; }

  /* 10) Semua grup tombol aksi: full-width bertumpuk biar gampang dipencet */
  .admin-card form > div[style*="display:flex"] {
    flex-direction: column;
    align-items: stretch !important;
  }
  .admin-card form > div[style*="display:flex"] > .btn { width: 100%; }

  /* 11) Laporan pembaca & fix inline message */
  .fix-msg, .rep-title { font-size: 13px; }
  .fix-msg { padding: 11px 12px; }
}

/* ══════ #6 Kesehatan Konten (bar per field) ══════ */
.ch-sum {
  font-size: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  margin-bottom: 10px;
}
.ch-sum b { color: var(--ok, #4ade80); font-size: 17px; }
.ch-row {
  display: grid;
  grid-template-columns: 88px 1fr 62px 44px;
  align-items: center;
  gap: 8px;
  padding: 5px 2px;
  font-size: 12.5px;
}
.ch-lbl { color: var(--muted); font-weight: 600; }
.ch-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.ch-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff8a4c, #ff6a1f);
  box-shadow: 0 0 8px rgba(255, 122, 61, 0.35);
}
.ch-row b {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
}
@media (max-width: 600px) {
  .ch-row { grid-template-columns: 74px 1fr 54px; font-size: 12px; }
  .ch-row > .muted.small { display: none; }
}

/* ══════ SUB-MENU di dalam pane System ══════ */
.sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}
.sub-tab {
  flex: 1 1 auto;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.sub-tab:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.sub-tab.active {
  background: var(--accent-grad);
  color: #2a1508;
  box-shadow: var(--glow);
}
/* Tab System yang berupa LINK (pindah halaman) — dibedakan dari tab biasa
   biar user paham ini bukan kartu, tapi halaman lain. */
.sub-tab.sub-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  border: 1px dashed rgba(255, 122, 61, 0.45);
  color: #ffb98a;
}
.sub-tab.sub-link:hover {
  background: rgba(255, 122, 61, 0.12);
  border-style: solid;
  color: var(--ink);
}
.sub-link-arrow {
  font-size: 10px;
  opacity: .75;
  line-height: 1;
  transform: translateY(-1px);
}
@media (max-width: 600px) {
  .sub-tab.sub-link { flex: 0 0 auto; }
}
.sub-sec[hidden] { display: none; }
/* display:contents bikin kartu langsung jadi item grid induk -> tetap 2 kolom */
.sub-sec { display: contents; }
/* kartu di luar sub aktif harus benar-benar hilang (display:contents bikin
   `hidden` gak ngaruh kalau anaknya masih di-render) */
.sub-sec[hidden] > .admin-card { display: none !important; }
@media (max-width: 600px) {
  .sub-nav {
    position: sticky;
    top: 56px;              /* nempel di bawah tab General/System */
    z-index: 30;
    background: rgba(11, 13, 18, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .sub-nav::-webkit-scrollbar { display: none; }
  .sub-tab { flex: 0 0 auto; min-height: 40px; padding: 8px 13px; font-size: 12.5px; }
}

/* kartu yang gak masuk sub aktif -> beneran hilang */
.admin-card[hidden] { display: none !important; }

/* ══════ Perbaikan grafik Aktivitas Baca ══════
   Bug: .vtotal (flex-basis:100%) gak pernah pindah baris karena .vcol
   punya `flex:1` di container flex-wrap -> total "ngambang" nyempil di
   baris batang. Sekalian: batang terlalu pendek pas datanya kecil
   (mis. 1-2 bacaan) sehingga chart kelihatan kosong. */
.vchart {
  align-items: flex-end;
  padding-top: 16px;         /* ruang buat angka di atas batang */
  height: 170px;
}
.vcol {
  flex: 0 1 74px;            /* boleh menyusut, gak maksa satu baris */
  position: relative;
}
.vbar {
  min-height: 4px;           /* batang data terkecil pun tetap kelihatan */
}
.vbar.empty { min-height: 3px; }
.vnum {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 3px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.vtotal {
  width: 100%;               /* paksa baris sendiri */
  flex: 0 0 auto;
  border-top: 1px dashed var(--hairline);
  padding-top: 7px;
  margin-top: 10px;
  text-align: right;
}

/* .vcol: kunci area batang biar tinggi px konsisten & label nempel bawah */
.vcol { justify-content: flex-end; height: 100%; }
.vbar { flex: 0 0 auto; }

/* track tinggi tetap + fill px (solusi pasti utk chart) */
.vtrack {
  height: 118px;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.vfill {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--accent-grad);
  box-shadow: 0 4px 14px rgba(255, 106, 26, 0.28);
  transition: height .4s cubic-bezier(.2, .7, .3, 1);
}

/* Solusi PASTI: fill pakai position:absolute -> ukuran gak diganggu flex
   (height px inline sebelumnya ke-stretch jadi120px di hari kosong) */
.vtrack {
  position: relative;
  height: 118px;
  width: 100%;
  display: block;
}
.vfill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 6px 6px 0 0;
  background: var(--accent-grad);
  box-shadow: 0 4px 14px rgba(255, 106, 26, 0.28);
}

/* ══════ Kartu Action: grup berjudul biar gak numpuk ══════ */
.act-group {
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 12px;
}
.act-group:last-child { margin-bottom: 0; }
.act-label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .02em;
  margin-bottom: 9px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.act-label .muted { font-weight: 600; }
/* tombol lebar penuh (update otomatis) */
.act-wide {
  display: block !important;
  width: 100% !important;
  text-align: left;
  min-height: 40px;
  margin-bottom: 6px;
}
.act-wide:last-child { margin-bottom: 0; }
.btn.ok-btn {
  background: rgba(74, 222, 128, 0.12) !important;
  border-color: rgba(74, 222, 128, 0.55) !important;
  color: #86efac !important;
}
/* grid tombol: 2 kolom rapi */
.act-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.act-grid > form { display: contents; }
.act-grid .btn {
  width: 100% !important;
  min-height: 38px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
}
.act-span2 { grid-column: 1 / -1; }
/* input + select */
.act-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font-size: 13.5px;
}
.act-input:focus { outline: none; border-color: rgba(255, 122, 61, 0.6); }
.act-scrape {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 7px;
  align-items: start;
}
.act-scrape .act-input { margin-bottom: 0; }
.act-select {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font-size: 13px;
  min-height: 40px;
}
.act-scrape .btn { min-height: 40px; white-space: nowrap; }
@media (max-width: 600px) {
  .act-grid { grid-template-columns: 1fr; }
  .act-span2 { grid-column: auto; }
  .act-scrape { grid-template-columns: 1fr; }
  .act-scrape .btn, .act-scrape .act-select { width: 100%; }
}

/* Action full-width dengan grup 2 kolom (biar gak tinggi banget) */
.act-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.act-groups > .act-group { margin-bottom: 0; }
/* grup Fix Per Komik & Scrape Manual butuh lebar (input) -> span 2 */
.act-groups > .act-group:nth-child(4),
.act-groups > .act-group:nth-child(5) { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .act-groups { grid-template-columns: 1fr; }
  .act-groups > .act-group { grid-column: auto !important; }
}

/* hint kecil di form General */
.set-hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  margin: -4px 0 6px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--hairline);
  border-radius: 9px;
}
.set-hint code {
  background: rgba(255, 122, 61, 0.14);
  color: #ffb98a;
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 11px;
}
.admin-card textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
}
.admin-card textarea:focus { outline: none; border-color: rgba(255, 122, 61, 0.6); }

/* Sub-menu General: bagian dalam satu kartu */
.gen-sec {
  padding: 12px 13px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
  margin-bottom: 12px;
}
.gen-sec:last-of-type { margin-bottom: 0; }
.gen-sec-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .02em;
  margin-bottom: 10px;
}
.gen-sec[hidden] { display: none !important; }
.gen-sec .set-sub { margin-top: 6px !important; }

/* form merge: pilihan "pertahankan" */
.merge-keep {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
  font-size: 13px;
}
.merge-keep label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--muted);
}
.merge-keep input { accent-color: var(--accent); width: 16px; height: 16px; }
.merge-keep b { color: var(--ink); }

/* Chapter Bolong: baris klasifikasi */
.gap-batch, .gap-subch {
  font-size: 11px;
  margin-top: 5px;
  padding: 4px 9px;
  border-radius: 8px;
  line-height: 1.45;
}
.gap-batch {
  color: #a5b4fc;
  background: rgba(129, 140, 248, 0.09);
  border: 1px dashed rgba(129, 140, 248, 0.35);
}
.gap-subch {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.08);
  border: 1px dashed rgba(56, 189, 248, 0.32);
}

/* ══════ Nomor urut + pager di kartu Review Duplikat / Chapter Bolong ══════ */
.row-num {
  flex: 0 0 auto;
  min-width: 30px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 3px 6px;
  align-self: flex-start;
}
.row-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}
.row-pager .muted { margin-right: auto; }
.pg-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 5px 9px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  transition: all .14s ease;
}
.pg-btn:hover:not(:disabled) { border-color: rgba(255, 122, 61, 0.55); color: var(--ink); }
.pg-btn.cur {
  background: var(--accent-grad);
  color: #2a1508;
  border-color: transparent;
  box-shadow: var(--glow);
}
.pg-btn:disabled { opacity: .38; cursor: not-allowed; }
@media (max-width: 600px) {
  .pg-btn { min-width: 40px; min-height: 40px; font-size: 13px; }
  .row-pager .muted { width: 100%; margin-bottom: 4px; }
}

/* sub-nav tingkat-2 (Konten) */
.sub-nav-2 {
  margin-top: -6px;
  background: rgba(255, 122, 61, 0.05);
  border-color: rgba(255, 122, 61, 0.22);
}
.sub-nav-2[hidden] { display: none; }
.sub-nav-2 .sub-tab { min-height: 34px; font-size: 12.5px; padding: 6px 12px; }
.sub-nav-2 .sub-tab.active {
  background: rgba(255, 122, 61, 0.16);
  color: var(--accent);
  box-shadow: none;
  border-color: rgba(255, 122, 61, 0.4);
}

/* ══════ Judul super panjang (1 kata tanpa spasi) ══════
   Mis. "The Tsuntsuntsuntsuntsuntsun...undere Girl Getting Less and Less
   Tsun Day by Day" (95 huruf, 40+ huruf pertama nyambung tanpa spasi).
   Tanpa overflow-wrap, kata panjang GAK bisa di-wrap -> -webkit-line-clamp:2
   gak jalan -> judul meleber keluar kartu. */
.meta h3,
.cont-title,
.acc-title,
.gap-title,
.rep-title,
.dup-title,
.strip-title,
.chaplist a,
h1, h2, h3 {
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* judul di kartu grid: tetap 2 baris (line-clamp sudah ada di style.css) */
.meta h3 { overflow: hidden; }
