/* ============================================================
   GUTTER — Base Design System
   Dark mode, low-contrast antar elemen (ketentuan roadmap §6)
   Signature: "gutter lines" — garis diagonal tipis ala speed-line
   panel manga, dipakai sebagai divider & hover accent.

   File ini dipakai bersama di semua halaman (Library, Detail,
   Reader, dst). Style khusus per-halaman ada di file terpisah
   (mis. library.css) atau <style> di halaman masing-masing.
   ============================================================ */

:root{
  --bg:            #131219;
  --bg-elevated:   #1a1922;
  --bg-elevated-2: #21202b;
  --bg-elevated-3: #292735;
  --border:        #2a2836;
  --border-soft:   #211f2b;
  --text:          #e8e6f0;
  --text-dim:      #9895a9;
  --text-faint:    #615e72;
  --accent:        #ff4f68;
  --accent-soft:   rgba(255,79,104,0.14);
  --accent-line:   rgba(255,79,104,0.35);
  --gold:          #e2b25a;
  --gold-soft:     rgba(226,178,90,0.14);
  --green:         #5ec293;
  --font-display:  'Space Grotesk', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  --r-sm: 6px; --r-md: 10px; --r-lg: 18px;
  --shadow-card: 0 10px 30px -14px rgba(0,0,0,0.55);
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
@keyframes gutterFadeIn{ from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:translateY(0);} }
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  min-height:100vh;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  animation:gutterFadeIn .35s ease both;
}
img{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
::selection{ background:var(--accent); color:#14131a; }
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }

.wrap{ max-width:1320px; margin:0 auto; padding:0 28px; }

/* ---------- Speed-line texture (signature element) ---------- */
.speedlines{
  position:absolute; inset:0; pointer-events:none; opacity:0.5;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(255,255,255,0.028) 0px,
    rgba(255,255,255,0.028) 1px,
    transparent 1px,
    transparent 34px
  );
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
          mask-image: linear-gradient(to bottom, black, transparent 85%);
}

/* ---------- Top notice bar (skip in prod if unused) ---------- */
.topbar{
  background:var(--bg-elevated); border-bottom:1px solid var(--border-soft);
  font-size:12.5px; color:var(--text-faint); font-family:var(--font-mono);
}
.topbar .wrap{ padding:7px 28px; display:flex; justify-content:space-between; gap:12px; }
.topbar span.tag{ color:var(--gold); }

/* ---------- Navbar ---------- */
header.nav{
  position:sticky; top:0; z-index:50;
  background:rgba(19,18,25,0.86); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border-soft);
}
.nav-inner{ display:flex; align-items:center; gap:34px; padding:14px 28px; }
.logo{
  font-family:var(--font-display); font-weight:700; font-size:21px; letter-spacing:0.5px;
  display:flex; align-items:center; gap:9px; flex-shrink:0;
}
.logo .mark{
  width:20px; height:20px; position:relative; flex-shrink:0;
  background:var(--bg-elevated-3); border-radius:4px; border:1px solid var(--border);
}
.logo .mark::before{
  content:""; position:absolute; left:8px; top:2px; bottom:2px; width:1.5px;
  background:var(--accent);
}
.logo em{ font-style:normal; color:var(--accent); }

nav.primary{ display:flex; gap:4px; flex:1; }
nav.primary a{
  position:relative; font-size:14.5px; font-weight:500; color:var(--text-dim);
  padding:9px 14px; border-radius:var(--r-sm); transition:color .15s;
}
nav.primary a:hover{ color:var(--text); }
nav.primary a.active{ color:var(--text); }
nav.primary a.active::after{
  content:""; position:absolute; left:14px; right:14px; bottom:3px; height:2px;
  background:var(--accent); border-radius:2px;
}
nav.primary a .count{
  font-family:var(--font-mono); font-size:10.5px; color:var(--accent);
  background:var(--accent-soft); padding:1px 5px; border-radius:20px; margin-left:6px;
}

.nav-actions{ display:flex; align-items:center; gap:10px; flex-shrink:0; }
.icon-btn{
  width:36px; height:36px; display:flex; align-items:center; justify-content:center;
  background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--r-sm);
  color:var(--text-dim); transition:.15s;
}
.icon-btn:hover{ color:var(--text); border-color:var(--accent-line); }
.icon-btn.active{ color:var(--accent); border-color:var(--accent-line); background:var(--accent-soft); }
.avatar-chip{
  position:relative; display:flex; align-items:center; gap:8px; padding:5px 10px 5px 5px;
  background:var(--bg-elevated); border:1px solid var(--border); border-radius:24px; cursor:pointer;
}
.avatar-chip:hover{ border-color:var(--accent-line); }
.avatar-chip .av{
  width:26px; height:26px; border-radius:50%;
  background:conic-gradient(from 200deg, var(--gold), var(--accent), var(--gold));
  border:1.5px solid var(--gold);
}
.avatar-chip .lvl{
  font-family:var(--font-mono); font-size:10.5px; color:var(--gold); font-weight:600;
}

/* ---------- EXP & Level component (reusable) ---------- */
.level-popover{
  position:absolute; top:calc(100% + 10px); right:0; z-index:70; width:230px; display:none;
  background:var(--bg-elevated-2); border:1px solid var(--border); border-radius:var(--r-md); padding:15px;
  box-shadow:0 20px 40px -18px rgba(0,0,0,.65); cursor:default; text-align:left;
}
.level-popover.open{ display:block; }
.level-popover .lp-head{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.level-popover .lp-av{
  width:34px; height:34px; border-radius:50%; flex-shrink:0;
  background:conic-gradient(from 200deg, var(--gold), var(--accent), var(--gold)); border:1.5px solid var(--gold);
}
.level-popover .lp-lvl{ font-family:var(--font-display); font-weight:700; font-size:15px; }
.level-popover .lp-tier{
  font-family:var(--font-mono); font-size:10px; font-weight:700; letter-spacing:.4px; text-transform:uppercase;
  padding:1px 7px; border-radius:20px; display:inline-block; margin-top:2px;
}
.level-popover .lp-tier.bronze{ background:rgba(205,127,50,0.18); color:#cd7f32; }
.level-popover .lp-tier.silver{ background:rgba(199,205,214,0.18); color:#c7cdd6; }
.level-popover .lp-tier.gold{ background:var(--gold-soft); color:var(--gold); }
.level-popover .lp-tier.diamond{ background:rgba(127,216,232,0.18); color:#7fd8e8; }
.level-popover .lp-exp-row{ display:flex; justify-content:space-between; font-family:var(--font-mono); font-size:10.5px; color:var(--text-faint); margin-bottom:5px; }
.level-popover .lp-track{ height:7px; border-radius:20px; background:var(--bg-elevated-3); overflow:hidden; margin-bottom:10px; }
.level-popover .lp-fill{ height:100%; background:linear-gradient(90deg, var(--gold), var(--accent)); border-radius:20px; transition:width .5s ease; }
.level-popover .lp-link{ font-size:12px; color:var(--accent); font-weight:600; display:block; text-align:center; padding-top:8px; border-top:1px solid var(--border-soft); }

/* Level-up celebration toast */
.levelup-toast{
  position:fixed; top:76px; left:50%; z-index:200; display:flex; align-items:center; gap:13px;
  padding:14px 20px; border-radius:14px; background:linear-gradient(120deg, var(--gold), var(--accent));
  color:#1a0a0e; box-shadow:0 24px 50px -16px rgba(0,0,0,.55);
  opacity:0; pointer-events:none; transform:translate(-50%,-14px); transition:opacity .35s ease, transform .35s ease;
}
.levelup-toast.show{ opacity:1; transform:translate(-50%,0); }
.levelup-toast .lt-icon{
  width:38px; height:38px; border-radius:50%; background:rgba(26,10,14,0.15); flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
}
.levelup-toast .lt-title{ font-family:var(--font-display); font-weight:700; font-size:14px; }
.levelup-toast .lt-sub{ font-family:var(--font-mono); font-size:11px; opacity:.85; }

h1.section-title, h2.section-title{
  font-family:var(--font-display); font-weight:600; font-size:26px; letter-spacing:-0.2px;
}
.eyebrow{
  font-family:var(--font-mono); font-size:12px; letter-spacing:1.5px; color:var(--accent);
  text-transform:uppercase; margin-bottom:6px; display:block;
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  height:40px; padding:0 18px; border-radius:var(--r-sm); font-size:13.5px; font-weight:600;
  border:1px solid transparent; transition:filter .15s, transform .15s;
}
.btn:hover{ filter:brightness(1.08); }
.btn:active{ transform:scale(.98); }
.btn-accent{ background:var(--accent); color:#1a0a0e; }
.btn-ghost{ background:var(--bg-elevated); color:var(--text); border-color:var(--border); }
.btn-ghost:hover{ border-color:var(--accent-line); }
.btn-gold{ background:var(--gold); color:#1a0a0e; }

/* ---------- Pill button + dropdown/panel (reusable) ---------- */
.pill-btn{
  display:flex; align-items:center; gap:6px; height:38px; padding:0 13px;
  background:var(--bg); border:1px solid var(--border); border-radius:var(--r-sm);
  font-size:13px; color:var(--text-dim); font-weight:500; position:relative;
}
.pill-btn:hover{ color:var(--text); border-color:var(--accent-line); }
.pill-btn.active{ color:var(--accent); border-color:var(--accent-line); background:var(--accent-soft); }
.pill-btn .chev{ opacity:.6; transition:transform .15s; }
.pill-btn[aria-expanded="true"] .chev{ transform:rotate(180deg); }

.dropdown{ position:relative; }
.panel{
  position:absolute; top:calc(100% + 8px); left:0; z-index:40; min-width:240px;
  background:var(--bg-elevated-2); border:1px solid var(--border); border-radius:var(--r-md);
  padding:14px; box-shadow:0 20px 40px -18px rgba(0,0,0,.65); display:none;
}
.panel.open{ display:block; }
.panel.right{ left:auto; right:0; }
.panel.wide{ min-width:420px; }
.panel h4{ font-size:11px; text-transform:uppercase; letter-spacing:.8px; color:var(--text-faint); margin-bottom:9px; font-family:var(--font-mono); }
.check-row{ display:flex; align-items:center; gap:9px; padding:6px 2px; font-size:13.5px; color:var(--text-dim); cursor:pointer; }
.check-row:hover{ color:var(--text); }
.check-row input{ accent-color:var(--accent); width:15px; height:15px; }
.panel .divider{ height:1px; background:var(--border-soft); margin:10px 0; }
.sort-opt{
  display:flex; justify-content:space-between; align-items:center; padding:7px 8px; border-radius:6px;
  font-size:13.5px; color:var(--text-dim);
}
.sort-opt:hover{ background:var(--bg-elevated-3); color:var(--text); cursor:pointer; }
.sort-opt.selected{ color:var(--accent); }
.dir-toggle{
  display:flex; align-items:center; gap:8px; margin-top:10px; padding-top:10px; border-top:1px solid var(--border-soft);
  font-size:12.5px; color:var(--text-faint);
}
.mini-toggle{
  display:flex; border:1px solid var(--border); border-radius:6px; overflow:hidden; margin-left:auto;
}
.mini-toggle button{ background:var(--bg); color:var(--text-faint); border:0; font-size:11.5px; padding:4px 9px; }
.mini-toggle button.active{ background:var(--accent-soft); color:var(--accent); }

/* ---------- Card component (dipakai di grid manga & rail) ---------- */
.card{
  position:relative; background:none; border:none; transition:transform .18s;
}
.card:hover{ transform:translateY(-3px); }
.card:hover .cover{ box-shadow:0 0 0 1.5px var(--accent-line); }
.card .cover{ aspect-ratio:3/4.3; transition:box-shadow .18s; }
.card-body{ padding:10px 2px 0; }
.card-body .title{
  font-size:13px; font-weight:600; line-height:1.3; margin-bottom:5px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.card-body .sub{ display:flex; align-items:center; justify-content:space-between; font-size:11px; color:var(--text-faint); font-family:var(--font-mono); }

.cover{ position:relative; border-radius:var(--r-md); overflow:hidden; }
/* type-tag & src-badge harus jadi anak .cover (bukan .card) supaya posisinya nempel ke gambar */
.type-tag{
  position:absolute; bottom:8px; left:8px; z-index:1; font-family:var(--font-mono); font-size:9.5px;
  font-weight:600; letter-spacing:.5px; background:rgba(19,18,25,0.85); color:var(--text-dim);
  padding:2px 7px; border-radius:4px; border:1px solid var(--border);
}
.src-badge{
  position:absolute; top:8px; left:8px; z-index:1; width:20px; height:20px; border-radius:50%;
  background:rgba(19,18,25,0.9); border:1px solid var(--border); display:flex; align-items:center;
  justify-content:center; font-family:var(--font-mono); font-size:10px; color:var(--text-dim);
}
.corner-fold{
  position:absolute; top:0; right:0; z-index:2; width:0; height:0;
  border-style:solid; border-width:0 34px 34px 0; border-color:transparent var(--accent) transparent transparent;
}

/* ---------- Manga grid (reusable — dipakai Library & Update Feed) ---------- */
.grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); gap:18px;
}
.grid.list{ grid-template-columns:repeat(auto-fill, minmax(300px,1fr)); gap:28px 30px; }

@keyframes gutterCardIn{ from{ opacity:0; transform:translateY(10px);} to{ opacity:1; transform:translateY(0);} }
.grid .card{ animation:gutterCardIn .4s ease both; }
.grid .card:nth-child(1){ animation-delay:0ms; }
.grid .card:nth-child(2){ animation-delay:25ms; }
.grid .card:nth-child(3){ animation-delay:50ms; }
.grid .card:nth-child(4){ animation-delay:75ms; }
.grid .card:nth-child(5){ animation-delay:100ms; }
.grid .card:nth-child(6){ animation-delay:125ms; }
.grid .card:nth-child(7){ animation-delay:150ms; }
.grid .card:nth-child(8){ animation-delay:175ms; }
.grid .card:nth-child(9){ animation-delay:200ms; }
.grid .card:nth-child(10){ animation-delay:225ms; }
.grid .card:nth-child(n+11){ animation-delay:250ms; }

/* List view — grid multi-kolom: cover kiri, judul di atas, chapter terbaru di bawahnya */
.grid.list .card{
  display:flex; align-items:flex-start; gap:14px; padding:0; border-radius:var(--r-md);
}
.grid.list .card .cover{ width:96px; aspect-ratio:3/4.3; flex-shrink:0; padding:0; }
.grid.list .card .corner-fold{ transform:scale(0.75); transform-origin:top right; }
.grid.list .card .type-tag, .grid.list .card .src-badge{ display:none; }

.grid.list .card-body{
  flex:1; min-width:0; padding:0; display:flex; flex-direction:column; gap:9px; padding-top:2px;
}
.grid.list .title-row{ display:flex; align-items:flex-start; gap:7px; }
.grid.list .up-badge{
  flex-shrink:0; margin-top:2px; background:var(--accent); color:#1a0a0e; font-family:var(--font-mono);
  font-size:9px; font-weight:700; letter-spacing:.3px; padding:2px 6px; border-radius:4px;
}
.grid.list .card-body .title{
  -webkit-line-clamp:2; white-space:normal; margin-bottom:0; font-size:14.5px;
}
.grid.list .card-body .sub{ display:none; }

.chapter-list{ display:flex; flex-direction:column; gap:3px; }
.chapter-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.chapter-row .ch-pill{
  background:var(--bg-elevated-3); border:1px solid var(--border-soft); border-radius:5px;
  padding:2.5px 9px; font-family:var(--font-mono); font-size:10.5px; color:var(--text-dim);
  white-space:nowrap;
}
.chapter-row .ch-time{ font-size:10px; color:var(--text-faint); font-family:var(--font-mono); white-space:nowrap; flex-shrink:0; }

.count-line{ font-size:13px; color:var(--text-faint); margin-bottom:14px; font-family:var(--font-mono); }

/* ---------- Play button (akses langsung ke chapter, reusable di semua card) ---------- */
.play-btn{
  width:34px; height:34px; border-radius:50%; flex-shrink:0; z-index:3;
  background:rgba(10,9,14,0.6); border:1px solid rgba(255,255,255,0.28); color:#fff;
  display:flex; align-items:center; justify-content:center; backdrop-filter:blur(2px);
  transition:background .15s, border-color .15s, transform .15s;
}
.play-btn svg{ margin-left:2px; }
.play-btn:hover{ background:var(--accent); border-color:var(--accent); color:#1a0a0e; transform:scale(1.08); }
.card .cover .play-btn{ position:absolute; bottom:8px; right:8px; }
.card .cover .play-btn:hover{ transform:scale(1.08); }
.pop-card .play-btn{ margin-left:auto; }

/* ---------- Chip / tag ---------- */
.chip-select{ display:flex; flex-wrap:wrap; gap:6px; }
.chip-select span{
  font-size:12px; padding:5px 10px; border-radius:20px; border:1px solid var(--border);
  color:var(--text-dim); cursor:pointer;
}
.chip-select span.on{ background:var(--accent-soft); border-color:var(--accent-line); color:var(--accent); }

/* ---------- Skeleton loading ---------- */
.skel{ background:linear-gradient(100deg, var(--bg-elevated) 30%, var(--bg-elevated-3) 45%, var(--bg-elevated) 60%); background-size:200% 100%; animation:shimmer 1.4s infinite; }
@keyframes shimmer{ 0%{background-position:180% 0;} 100%{background-position:-20% 0;} }
.skel-card{ border-radius:var(--r-md); overflow:hidden; border:1px solid var(--border-soft); }
.skel-card .skel-cover{ aspect-ratio:3/4.3; }
.skel-card .skel-line{ height:11px; margin:11px 11px 8px; border-radius:4px; }
.skel-card .skel-line.w60{ width:60%; margin-bottom:11px; }

/* ---------- Pagination (reusable) ---------- */
.pagination{ display:flex; align-items:center; justify-content:center; gap:6px; margin-top:26px; }
.pagination button{
  min-width:36px; height:36px; padding:0 10px; border-radius:var(--r-sm); background:var(--bg-elevated);
  color:var(--text-dim); border:1px solid var(--border-soft); font-size:13px; font-family:var(--font-mono); font-weight:600;
}
.pagination button:hover:not(:disabled){ color:var(--text); border-color:var(--accent-line); }
.pagination button:disabled{ opacity:.35; cursor:default; }
.pagination button.active{ background:var(--accent); color:#1a0a0e; border-color:var(--accent); }

/* ---------- Komponen Iklan (Popup / Floating / Sponsor Footer) — reusable ---------- */
.ad-tag{
  font-family:var(--font-mono); font-size:9px; font-weight:700; letter-spacing:.5px; text-transform:uppercase;
  color:var(--text-faint); background:var(--bg-elevated-3); padding:2px 7px; border-radius:4px;
}

/* Popup / interstitial */
.ad-popup-overlay{
  position:fixed; inset:0; z-index:150; background:rgba(8,7,10,0.82); backdrop-filter:blur(3px);
  display:flex; align-items:center; justify-content:center; padding:20px;
  opacity:0; pointer-events:none; transition:opacity .2s ease;
}
.ad-popup-overlay.open{ opacity:1; pointer-events:auto; }
.ad-popup{
  width:100%; max-width:380px; background:var(--bg-elevated-2); border:1px solid var(--border);
  border-radius:var(--r-lg); overflow:hidden; box-shadow:0 30px 60px -20px rgba(0,0,0,.7);
}
.ad-popup-head{ display:flex; align-items:center; justify-content:space-between; padding:11px 14px; border-bottom:1px solid var(--border-soft); }
.ad-popup-close{
  width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:var(--bg-elevated-3); color:var(--text-faint); border:0; font-size:11px; font-family:var(--font-mono); font-weight:700;
}
.ad-popup-close:not(:disabled){ color:var(--text); cursor:pointer; }
.ad-popup-close:not(:disabled):hover{ background:var(--accent); color:#1a0a0e; }
.ad-popup-body{
  height:270px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; text-align:center; padding:20px;
  background:linear-gradient(150deg, #241a3a, #ff4f68 65%, #e2b25a);
}
.ad-popup-body h4{ font-family:var(--font-display); font-size:19px; font-weight:700; color:#fff; text-shadow:0 2px 10px rgba(0,0,0,.3); }
.ad-popup-body p{ font-size:12.5px; color:rgba(255,255,255,0.85); max-width:260px; }
.ad-popup-body .ad-cta{ background:#fff; color:#1a0a0e; font-weight:700; font-size:12.5px; padding:9px 20px; border-radius:20px; margin-top:6px; }
.ad-popup-foot{ padding:11px 14px; text-align:center; }
.ad-popup-foot a{ font-size:11.5px; color:var(--gold); font-weight:600; }

/* Floating */
.ad-floating{
  position:fixed; right:16px; bottom:16px; z-index:55; width:250px;
  background:var(--bg-elevated-2); border:1px solid var(--border); border-radius:var(--r-md);
  box-shadow:0 20px 40px -18px rgba(0,0,0,.6); overflow:hidden;
  opacity:0; transform:translateY(14px); transition:opacity .3s ease, transform .3s ease; pointer-events:none;
}
.ad-floating.show{ opacity:1; transform:translateY(0); pointer-events:auto; }
.ad-floating-head{ display:flex; align-items:center; justify-content:space-between; padding:6px 9px; background:var(--bg-elevated-3); }
.ad-floating-close{ background:none; border:0; color:var(--text-faint); width:20px; height:20px; display:flex; align-items:center; justify-content:center; }
.ad-floating-close:hover{ color:var(--accent); }
.ad-floating-body{
  height:96px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; text-align:center; padding:10px;
  background:linear-gradient(135deg, #123028, #5ec293);
}
.ad-floating-body b{ font-family:var(--font-display); font-size:13px; color:#fff; }
.ad-floating-body span{ font-size:10.5px; color:rgba(255,255,255,0.85); }

/* Sponsor footer banner */
.ad-sponsor{
  display:flex; align-items:center; gap:14px; padding:14px 18px; margin:0 0 18px;
  background:var(--bg-elevated); border:1px solid var(--border-soft); border-radius:var(--r-md);
}
.ad-sponsor .ad-sponsor-visual{
  width:60px; height:60px; border-radius:10px; flex-shrink:0;
  background:linear-gradient(140deg, #1a1440, #ff4f68 60%, #e2b25a);
}
.ad-sponsor .ad-sponsor-text{ flex:1; min-width:0; }
.ad-sponsor .ad-sponsor-text .st{ display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:600; margin-bottom:2px; }
.ad-sponsor .ad-sponsor-text .sd{ font-size:12px; color:var(--text-faint); }
.ad-sponsor .ad-cta-mini{ flex-shrink:0; height:34px; padding:0 16px; border-radius:7px; background:var(--accent); color:#1a0a0e; font-size:12px; font-weight:700; border:0; }

@media (max-width:600px){
  .ad-floating{ width:200px; right:10px; bottom:10px; }
  .ad-sponsor{ flex-wrap:wrap; }
}


/* ---------- Komponen Donasi (reusable) ---------- */
.amount-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.amount-grid button{ height:38px; border-radius:7px; border:1px solid var(--border); background:var(--bg); color:var(--text-dim); font-size:12.5px; font-weight:600; }
.amount-grid button.active{ background:var(--gold-soft); border-color:var(--gold); color:var(--gold); }
.field textarea{
  width:100%; background:var(--bg); border:1px solid var(--border); border-radius:6px;
  color:var(--text); font-size:13px; padding:9px 11px; font-family:var(--font-body); resize:vertical;
}
.field textarea::placeholder{ color:var(--text-faint); }

.donor-sort{ display:flex; gap:6px; margin-bottom:12px; }
.donor-sort button{
  flex:1; height:32px; border-radius:6px; border:1px solid var(--border); background:var(--bg);
  color:var(--text-dim); font-size:12px; font-weight:600;
}
.donor-sort button.active{ background:var(--accent-soft); color:var(--accent); border-color:var(--accent-line); }
.donor-row{
  display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--border-soft);
}
.donor-row:last-child{ border-bottom:0; }
.donor-row .rank{ width:20px; font-family:var(--font-mono); font-size:11px; color:var(--text-faint); flex-shrink:0; }
.donor-row .av{
  width:32px; height:32px; border-radius:50%; flex-shrink:0;
  background:conic-gradient(from 180deg, var(--gold), var(--accent), var(--gold));
}
.donor-row .info{ flex:1; min-width:0; }
.donor-row .name{ font-size:13px; font-weight:600; }
.donor-row .msg{ font-size:11.5px; color:var(--text-faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.donor-row .amt{ font-family:var(--font-mono); font-size:12.5px; color:var(--gold); font-weight:600; flex-shrink:0; }

/* Widget Donasi — kartu mengambang promosi, muncul di beberapa halaman */
.donation-widget{
  position:fixed; left:16px; bottom:16px; z-index:55; width:240px;
  background:var(--bg-elevated-2); border:1px solid var(--gold); border-radius:var(--r-md);
  box-shadow:0 20px 40px -18px rgba(0,0,0,.6); overflow:hidden;
  opacity:0; transform:translateY(14px); transition:opacity .3s ease, transform .3s ease; pointer-events:none;
}
.donation-widget.show{ opacity:1; transform:translateY(0); pointer-events:auto; }
.donation-widget-head{ display:flex; align-items:center; justify-content:space-between; padding:10px 12px 0; }
.donation-widget-head .dw-title{ display:flex; align-items:center; gap:6px; font-family:var(--font-display); font-weight:600; font-size:13px; }
.donation-widget-head .dw-title svg{ color:var(--gold); flex-shrink:0; }
.donation-widget-close{ background:none; border:0; color:var(--text-faint); width:20px; height:20px; display:flex; align-items:center; justify-content:center; }
.donation-widget-close:hover{ color:var(--accent); }
.donation-widget-body{ padding:10px 12px 12px; }
.donation-widget-body p{ font-size:11.5px; color:var(--text-faint); line-height:1.5; margin-bottom:9px; }
.dw-progress-row{ display:flex; justify-content:space-between; font-family:var(--font-mono); font-size:10px; color:var(--text-faint); margin-bottom:5px; }
.dw-track{ height:6px; border-radius:20px; background:var(--bg-elevated-3); overflow:hidden; margin-bottom:11px; }
.dw-fill{ height:100%; background:linear-gradient(90deg, var(--gold), var(--accent)); border-radius:20px; }
.dw-avatars{ display:flex; align-items:center; margin-bottom:11px; }
.dw-avatars span{
  width:22px; height:22px; border-radius:50%; margin-left:-7px; border:2px solid var(--bg-elevated-2);
  background:conic-gradient(from 180deg, var(--gold), var(--accent), var(--gold));
}
.dw-avatars span:first-child{ margin-left:0; }
.dw-avatars .dw-count{
  margin-left:5px; font-family:var(--font-mono); font-size:10px; color:var(--text-faint); border:0; background:none; width:auto;
}
.donation-widget .btn{ width:100%; height:34px; font-size:12px; }


/* ============================================================
   Admin Panel — layout sidebar (dipakai semua halaman di /admin)
   ============================================================ */
.admin-shell{ display:flex; min-height:100vh; }

.admin-sidebar{
  width:230px; flex-shrink:0; background:var(--bg-elevated); border-right:1px solid var(--border-soft);
  display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow-y:auto;
}
.admin-sidebar-head{ padding:18px 16px 14px; border-bottom:1px solid var(--border-soft); }
.admin-sidebar-head .logo{ font-family:var(--font-display); font-weight:700; font-size:18px; display:flex; align-items:center; gap:8px; }
.admin-sidebar-head .logo .mark{ width:17px; height:17px; position:relative; background:var(--bg-elevated-3); border-radius:4px; border:1px solid var(--border); }
.admin-sidebar-head .logo .mark::before{ content:""; position:absolute; left:6.5px; top:2px; bottom:2px; width:1.5px; background:var(--accent); }
.admin-sidebar-head .logo em{ font-style:normal; color:var(--accent); }
.admin-sidebar-head .badge-admin{
  display:inline-block; margin-top:8px; font-family:var(--font-mono); font-size:9.5px; font-weight:700; letter-spacing:.5px;
  background:var(--gold-soft); color:var(--gold); border:1px solid var(--gold); padding:2px 8px; border-radius:4px;
}

.admin-nav{ flex:1; padding:10px 10px 14px; display:flex; flex-direction:column; gap:1px; }
.admin-nav-section{
  font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:.6px;
  color:var(--text-faint); padding:16px 12px 6px;
}
.admin-nav a{
  display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px;
  color:var(--text-dim); font-size:13px; font-weight:500; transition:background .12s, color .12s;
}
.admin-nav a svg{ flex-shrink:0; opacity:.85; }
.admin-nav a:hover{ background:var(--bg-elevated-3); color:var(--text); }
.admin-nav a.active{ background:var(--accent-soft); color:var(--accent); font-weight:600; }
.admin-nav a .nav-badge{
  margin-left:auto; font-family:var(--font-mono); font-size:9.5px; font-weight:700; color:#1a0a0e;
  background:var(--accent); padding:1px 6px; border-radius:20px;
}

.admin-sidebar-foot{ padding:12px 14px; border-top:1px solid var(--border-soft); }
.admin-sidebar-foot a{
  display:flex; align-items:center; gap:9px; font-size:12.5px; color:var(--text-faint); padding:8px 4px;
}
.admin-sidebar-foot a:hover{ color:var(--text-dim); }

.admin-main{ flex:1; min-width:0; }
.admin-topbar{
  display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 26px;
  border-bottom:1px solid var(--border-soft); background:rgba(19,18,25,0.75); backdrop-filter:blur(8px);
  position:sticky; top:0; z-index:20;
}
.admin-topbar h1{ font-family:var(--font-display); font-size:19px; font-weight:600; }
.admin-topbar .atb-sub{ font-size:12px; color:var(--text-faint); margin-top:2px; }
.admin-content{ padding:26px; max-width:1200px; }

.admin-menu-toggle{ display:none; }

/* Stat cards */
.stat-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(190px,1fr)); gap:16px; margin-bottom:26px; }
.stat-card{ background:var(--bg-elevated); border:1px solid var(--border-soft); border-radius:var(--r-lg); padding:20px; }
.stat-card .sc-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.stat-card .sc-label{ font-family:var(--font-mono); font-size:10.5px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.4px; }
.stat-card .sc-icon{
  width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.stat-card .sc-value{ font-family:var(--font-display); font-size:26px; font-weight:700; margin-bottom:5px; }
.stat-card .sc-delta{ font-size:11.5px; font-family:var(--font-mono); display:flex; align-items:center; gap:4px; }
.sc-delta.up{ color:var(--green); }
.sc-delta.down{ color:var(--accent); }

/* Panel/card umum di dalam admin content */
.admin-panel{ background:var(--bg-elevated); border:1px solid var(--border-soft); border-radius:var(--r-lg); padding:22px; margin-bottom:20px; }
.admin-panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; gap:12px; flex-wrap:wrap; }
.admin-panel-head h3{ font-family:var(--font-display); font-size:15.5px; font-weight:600; }
.admin-panel-head .aph-link{ font-size:12.5px; color:var(--accent); font-weight:600; }

.admin-table{ width:100%; border-collapse:collapse; }
.admin-table th{
  text-align:left; font-family:var(--font-mono); font-size:10.5px; text-transform:uppercase; letter-spacing:.4px;
  color:var(--text-faint); padding:0 10px 10px; border-bottom:1px solid var(--border-soft); font-weight:600;
}
.admin-table td{ padding:12px 10px; border-bottom:1px solid var(--border-soft); font-size:13px; vertical-align:middle; }
.admin-table tr:last-child td{ border-bottom:0; }
.admin-table tr:hover td{ background:var(--bg-elevated-3); }

.activity-feed{ display:flex; flex-direction:column; gap:2px; }
.activity-row{ display:flex; align-items:flex-start; gap:12px; padding:11px 4px; border-bottom:1px solid var(--border-soft); }
.activity-row:last-child{ border-bottom:0; }
.activity-row .ar-icon{
  width:30px; height:30px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  background:var(--bg-elevated-3); color:var(--text-dim);
}
.activity-row .ar-text{ font-size:13px; color:var(--text-dim); }
.activity-row .ar-text b{ color:var(--text); font-weight:600; }
.activity-row .ar-time{ font-size:11px; color:var(--text-faint); font-family:var(--font-mono); margin-top:2px; }

@media (max-width:900px){
  .admin-sidebar{
    position:fixed; left:0; top:0; bottom:0; z-index:80; transform:translateX(-100%);
    transition:transform .22s ease; box-shadow:20px 0 40px -20px rgba(0,0,0,.5);
  }
  .admin-sidebar.open{ transform:translateX(0); }
  .admin-menu-toggle{ display:flex; }
  .admin-content{ padding:18px; }
  .admin-topbar{ padding:13px 16px; }
}


/* ---------- Footer ---------- */
footer.site-footer{
  border-top:1px solid var(--border-soft); padding:26px 0; text-align:center;
  color:var(--text-faint); font-size:12px; font-family:var(--font-mono);
}

/* ---------- Modal (dipakai utk Donatur, dsb) ---------- */
.modal-overlay{
  position:fixed; inset:0; z-index:100; background:rgba(10,9,14,0.72); backdrop-filter:blur(3px);
  display:flex; align-items:center; justify-content:center; padding:20px;
  opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .2s ease, visibility 0s linear .2s;
}
.modal-overlay.open{
  opacity:1; visibility:visible; pointer-events:auto;
  transition:opacity .2s ease, visibility 0s linear;
}
.modal{
  width:100%; max-width:460px; max-height:80vh; display:flex; flex-direction:column;
  background:var(--bg-elevated-2); border:1px solid var(--border); border-radius:var(--r-lg);
  box-shadow:0 30px 60px -20px rgba(0,0,0,.7);
  transform:scale(.96) translateY(6px); transition:transform .22s cubic-bezier(.2,.9,.3,1.3);
}
.modal-overlay.open .modal{ transform:scale(1) translateY(0); }
.modal-head{
  display:flex; align-items:center; justify-content:space-between; padding:16px 18px;
  border-bottom:1px solid var(--border-soft); flex-shrink:0;
}
.modal-head h3{ font-family:var(--font-display); font-size:16px; font-weight:600; }
.modal-close{
  width:28px; height:28px; display:flex; align-items:center; justify-content:center;
  border-radius:6px; color:var(--text-faint); background:transparent; border:0;
}
.modal-close:hover{ color:var(--text); background:var(--bg-elevated-3); }
.modal-body{ padding:14px 18px 18px; overflow-y:auto; }

@media (max-width:860px){
  .nav-inner{ gap:14px; }
  nav.primary{ display:none; }
  .wrap{ padding:0 16px; }
}

/* ---------- Hormati preferensi user yang sensitif terhadap motion ---------- */
@media (prefers-reduced-motion: reduce){
  body{ animation:none; }
  .grid .card{ animation:none; }
  .pop-card{ animation:none; }
  *{ scroll-behavior:auto !important; }
}
