/* ============================================================
   Sesama News — design system
   ============================================================ */
:root {
  color-scheme: light;

  --brand: #1f3cff;
  --brand-strong: #1730c4;
  --brand-soft: #eef0ff;
  --brand-soft-2: #e2e6ff;
  --brand-line: #cbd2ff;
  --brand-ring: #1f3cff1a;

  --page: #f8f9fa;
  --surface: #fff;
  --surface-2: #fafafb;
  --surface-3: #f1f2f5;

  --text: #202124;
  --text-2: #555860;
  --muted: #747780;
  --faint: #a0a3aa;

  --border: #dadce0;
  --border-2: #e7e8ec;
  --field: #d8dae0;
  --field-strong: #b9bcc4;

  --ok: #177847;    --ok-bg: #e6f6ee;     --ok-line: #b7e0c8;
  --warn: #9b6305;  --warn-bg: #fff7e5;   --warn-line: #f0dfb4;
  --danger: #c5221f; --danger-strong: #a81b19; --danger-bg: #fdecea; --danger-line: #e3a9a6;
  --info: #344dc0;  --info-bg: #e9ecff;

  --read-width: 720px;
  --star-off: #dadce0;
  --ink-button: #303238;
  --tooltip-bg: #24262b;
  --scrim: #1c1f26a8;
  --shadow-sm: 0 1px 2px #3c40431f;
  --shadow-md: 0 1px 4px #3c40434d;
  --shadow-lg: 0 18px 48px #1a1d2426, 0 2px 8px #1a1d2412;
  --shadow-brand: 0 4px 12px #1f3cff2e;
}

/* Mengikuti setelan sistem selama pembaca belum memilih sendiri. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
  
    --brand: #8098ff;
    --brand-strong: #a3b3ff;
    --brand-soft: #1b2142;
    --brand-soft-2: #242c56;
    --brand-line: #39427a;
    --brand-ring: #8098ff33;
  
    --page: #101218;
    --surface: #181b22;
    --surface-2: #1e222a;
    --surface-3: #272c36;
  
    --text: #e7e9ef;
    --text-2: #b7bcc7;
    --muted: #8f95a2;
    --faint: #6b7181;
  
    --border: #2d323d;
    --border-2: #262a34;
    --field: #383e4b;
    --field-strong: #4c5464;
  
    --ok: #63cf92;    --ok-bg: #12301f;     --ok-line: #2b5b3e;
    --warn: #e3ae57;  --warn-bg: #322710;   --warn-line: #5d4a1f;
    --danger: #f2716a; --danger-strong: #f7938d; --danger-bg: #341a19; --danger-line: #62312e;
    --info: #96a7ff;  --info-bg: #1d2340;
  
    --star-off: #3f4553;
  --ink-button: #3b4252;
    --tooltip-bg: #39404e;
    --scrim: #080a0fd9;
    --shadow-sm: 0 1px 2px #00000059;
    --shadow-md: 0 1px 6px #00000073;
    --shadow-lg: 0 18px 48px #00000099, 0 2px 8px #00000066;
    --shadow-brand: 0 4px 12px #0000005e;
  }
}

/* Pilihan eksplisit lewat tombol, menang atas setelan sistem. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --brand: #8098ff;
  --brand-strong: #a3b3ff;
  --brand-soft: #1b2142;
  --brand-soft-2: #242c56;
  --brand-line: #39427a;
  --brand-ring: #8098ff33;

  --page: #101218;
  --surface: #181b22;
  --surface-2: #1e222a;
  --surface-3: #272c36;

  --text: #e7e9ef;
  --text-2: #b7bcc7;
  --muted: #8f95a2;
  --faint: #6b7181;

  --border: #2d323d;
  --border-2: #262a34;
  --field: #383e4b;
  --field-strong: #4c5464;

  --ok: #63cf92;    --ok-bg: #12301f;     --ok-line: #2b5b3e;
  --warn: #e3ae57;  --warn-bg: #322710;   --warn-line: #5d4a1f;
  --danger: #f2716a; --danger-strong: #f7938d; --danger-bg: #341a19; --danger-line: #62312e;
  --info: #96a7ff;  --info-bg: #1d2340;

  --star-off: #3f4553;
  --ink-button: #3b4252;
  --tooltip-bg: #39404e;
  --scrim: #080a0fd9;
  --shadow-sm: 0 1px 2px #00000059;
  --shadow-md: 0 1px 6px #00000073;
  --shadow-lg: 0 18px 48px #00000099, 0 2px 8px #00000066;
  --shadow-brand: 0 4px 12px #0000005e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* -------------------------------------------------- header ---------- */
.gn-header { position: sticky; top: 0; z-index: 50; background:var(--surface); box-shadow: var(--shadow-sm); }
.gn-top { display: grid; grid-template-columns: 185px minmax(280px, 650px) 1fr; align-items: center; gap: 26px; height: 72px; }
.gn-brand { flex: none; }

.gn-search {
  display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 16px;
  background:var(--surface-3); border-radius: 8px; transition: background .2s, box-shadow .2s;
}
.gn-search:focus-within { background:var(--surface); box-shadow: var(--shadow-md); }
.gn-search input { width: 100%; border: 0; outline: 0; background: none; color: var(--text); font-size: 15px; }
.search-hint { border: 0; background: none; color:var(--muted); font-size: 12px; }
.ui-search { position: relative; flex: none; width: 15px; height: 15px; border:2px solid var(--text-2); border-radius: 50%; }
.ui-search::after { content: ""; position: absolute; right: -5px; bottom: -2px; width: 6px; height: 2px; background:var(--text-2); rotate: 45deg; }

.gn-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.gn-actions button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color:var(--text-2); }
.gn-actions button:hover { background:var(--surface-3); }
.avatar {
  display: grid; place-items: center; width: 34px; height: 34px; margin-left: 6px;
  background: var(--brand); color:#fff; border-radius: 50%; font-size: 13px; font-weight: 700;
}

.gn-nav { border-top:1px solid var(--surface-3); }
.nav-scroll { display: flex; align-items: stretch; gap: 28px; height: 48px; overflow-x: auto; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-scroll a {
  display: flex; align-items: center; white-space: nowrap;
  color:var(--text-2); font-size: 13px; border-bottom: 3px solid transparent;
}
.nav-scroll a:hover, .nav-scroll a.active { color: var(--brand); border-color: var(--brand); }

/* -------------------------------------------------- page intro ------ */
.news-page { padding-block: 30px 64px; }
.page-intro { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.page-intro h1 { font-size: 28px; font-weight: 550; letter-spacing: -.025em; }
.page-intro p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.weather { display: grid; grid-template-columns: auto auto; gap: 2px 14px; text-align: right; }
.weather span { color: var(--muted); font-size: 12px; }
.weather b { grid-area: 1 / 2 / 3; font-size: 26px; font-weight: 450; }
.weather i { color:var(--muted); font-size: 11px; font-style: normal; }

/* -------------------------------------------------- sections -------- */
.section-title {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 56px; padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.section-title h2 { font-size: 18px; font-weight: 600; }
.section-title a { color: var(--brand); font-size: 12px; font-weight: 600; }

.top-news { overflow: hidden; }
.top-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(390px, .85fr); }
.lead-news { padding: 20px; border-right: 1px solid var(--border); }
.lead-news h2 { margin: 13px 0 8px; font-size: clamp(25px, 3vw, 36px); font-weight: 600; line-height: 1.15; letter-spacing: -.035em; }
.lead-news > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.lead-news h2:hover, .headline-list h3:hover, .feed-item h3:hover,
.topic-feature h3:hover, .more-grid h3:hover, .local-card h3:hover { color: var(--brand); }

.headline-list article {
  display: grid; grid-template-columns: 1fr 124px; gap: 16px;
  min-height: 152px; padding: 18px; border-bottom: 1px solid var(--border);
}
.headline-list article:last-child { border-bottom: 0; }
.headline-list h3 { margin: 7px 0 6px; font-size: 17px; font-weight: 600; line-height: 1.25; }
.headline-list p {
  margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* -------------------------------------------------- thumbnails ------ */
.news-thumb { position: relative; min-height: 170px; background:var(--surface-3); border-radius: 10px; overflow: hidden; }
.thumb-wide { aspect-ratio: 16 / 8.2; min-height: 250px; }
.thumb-small { width: 124px; min-height: 98px; aspect-ratio: 1.25; }
.news-thumb > span {
  position: absolute; top: 12px; left: 14px; z-index: 2; padding: 5px 8px;
  background:#ffffffe6; color:#3c4043; border-radius: 5px; font-size: 10px;
}
.news-thumb > b {
  position: absolute; bottom: -7px; left: 14px; color:#ffffffe6;
  font-size: clamp(58px, 8vw, 112px); font-weight: 700; line-height: 1; letter-spacing: -.08em;
}
.thumb-small > b { font-size: 48px; }
.news-thumb > i { position: absolute; display: block; border-radius: 50%; }
.news-thumb.has-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-thumb.has-image > i { display: none; }
.news-thumb.has-image > b { display: none; }

.tone-sun     { background: linear-gradient(145deg, #4d69ef, #2842bc); }
.tone-sun > i { width: 42%; aspect-ratio: 1; top: 17%; right: 8%; background: #fbbc04; }
.tone-money     { background: linear-gradient(145deg, #168a73, #0c5b4c); }
.tone-money > i { width: 45%; aspect-ratio: 1; right: -6%; bottom: -18%; background: #8bd9ba; box-shadow: 0 0 0 12px #fff3; }
.tone-tech     { background: linear-gradient(145deg, #6f52bf, #3f2e78); }
.tone-tech > i { width: 52%; aspect-ratio: 1; top: 12%; right: 7%; background: repeating-linear-gradient(45deg, #d7caff 0 7px, transparent 7px 14px); }
.tone-city     { background: linear-gradient(145deg, #e26c3b, #b44221); }
.tone-city > i { width: 40%; height: 72%; right: 12%; bottom: -10%; background: #ffc8a8; border-radius: 5px 5px 0 0; box-shadow: -48px 34px #ec9b70; }
.tone-rupiah     { background: linear-gradient(145deg, #287daf, #145374); }
.tone-rupiah > i { width: 45%; aspect-ratio: 1; top: 13%; right: 8%; background: #b6e3f5; box-shadow: inset 0 0 0 12px #fff6; }
.tone-sport     { background: linear-gradient(145deg, #2f9e5f, #14663a); }
.tone-sport > i { width: 46%; aspect-ratio: 1; top: 14%; right: 9%; background: #d6f5e3; box-shadow: inset -10px 8px 0 -2px #2f9e5f; }
.tone-life     { background: linear-gradient(145deg, #c94f8e, #8a2d5f); }
.tone-life > i { width: 40%; aspect-ratio: 1; bottom: -12%; right: 6%; background: #ffd7ea; box-shadow: -46px -30px 0 -12px #f0a8cb; }
.tone-health     { background: linear-gradient(145deg, #1f9298, #0d5c61); }
.tone-health > i { width: 20%; height: 55%; top: 22%; right: 20%; background: #cdeff1; border-radius: 4px; box-shadow: 0 0 0 0 transparent, -0 0 0 0 transparent; }
.tone-health::after {
  content: ""; position: absolute; top: 39%; right: 8%; width: 44%; height: 20%;
  background: #cdeff1; border-radius: 4px;
}
.tone-privacy     { background: linear-gradient(145deg, #3f6f8f, #244456); }
.tone-privacy > i { width: 34%; height: 48%; top: 25%; right: 12%; background: #bcd9ea; border-radius: 8px; box-shadow: 0 -26px 0 -8px #bcd9ea; }

/* -------------------------------------------------- meta ------------ */
.article-meta { display: flex; align-items: center; gap: 7px; margin-top: 13px; color: var(--muted); font-size: 11px; }
.article-meta.compact { margin-top: 0; font-size: 10px; }
.source-dot {
  display: grid; place-items: center; width: 18px; height: 18px;
  background: var(--brand); color:#fff; border-radius: 4px; font-size: 9px; font-weight: 700;
}
.category-label { color: var(--brand); font-size: 11px; font-weight: 700; }

/* -------------------------------------------------- feed layout ----- */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 18px; margin-top: 18px; }
.main-feed, .right-rail { display: grid; gap: 18px; align-content: start; }
.feed-section, .topic-block { overflow: hidden; }
.section-note { margin: 14px 20px 0; color: var(--muted); font-size: 12px; }
.feed-list { padding: 2px 20px 4px; }
.feed-item { display: grid; grid-template-columns: 1fr 190px; gap: 22px; min-height: 172px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-item h3 { margin: 7px 0 6px; font-size: 20px; font-weight: 600; line-height: 1.25; }
.feed-item p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.feed-item .thumb-small { width: 190px; min-height: 130px; }

.topic-feature { display: grid; grid-template-columns: 260px 1fr; gap: 20px; padding: 20px; }
.topic-feature .thumb-wide { aspect-ratio: 1.35; min-height: 176px; }
.topic-feature h3 { margin: 10px 0 8px; font-size: 22px; font-weight: 600; line-height: 1.2; }
.topic-feature p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* -------------------------------------------------- right rail ------ */
.brief-card { padding-bottom: 8px; overflow: hidden; }
.brief-card > p { margin: 16px 20px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.brief-card ol { margin: 0; padding: 0 20px; list-style: none; }
.brief-card li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.35; }
.brief-card li > span { color: var(--brand); font-weight: 700; }
.brief-card li a:hover { color: var(--brand); }

.local-card { padding: 20px; }
.local-card h2 { margin: 7px 0 18px; font-size: 20px; }
.local-card h3 { margin: 13px 0 11px; font-size: 18px; line-height: 1.25; }
.local-card .news-thumb { min-height: 190px; }

.newsletter-card { padding: 20px; }
.newsletter-card h2 { margin: 0 0 8px; font-size: 19px; }
.newsletter-card p { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.newsletter-card input { width: 100%; padding: 11px; border: 1px solid var(--border); border-radius: 6px; outline-color: var(--brand); }
.newsletter-card button { width: 100%; margin-top: 10px; padding: 11px; background: var(--brand); color:#fff; border: 0; border-radius: 6px; font-size: 12px; font-weight: 600; }
.newsletter-message { display: block; margin-top: 10px; color: var(--brand); font-size: 11px; line-height: 1.4; }

/* -------------------------------------------------- more news ------- */
.more-news { margin-top: 18px; overflow: hidden; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.more-grid article { padding: 20px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.more-grid article:nth-child(3n) { border-right: 0; }
.more-grid h3 { margin: 10px 0 0; font-size: 17px; font-weight: 600; line-height: 1.25; }
.more-grid .article-meta { margin-top: 10px; }

.empty-state { padding: 60px 24px; text-align: center; }
.empty-state h2 { font-size: 20px; }
.empty-state p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.empty-state a { color: var(--brand); }

/* -------------------------------------------------- footer ---------- */
.gn-footer { background:var(--surface); border-top: 1px solid var(--border); }
.footer-row { display: grid; grid-template-columns: 155px 1fr auto; align-items: center; gap: 25px; min-height: 118px; }

.footer-row p { margin: 0; color: var(--muted); font-size: 12px; }
.footer-row div { display: flex; gap: 18px; }
.footer-row a { color: var(--muted); font-size: 11px; }
.footer-row a:hover { color: var(--brand); }

/* -------------------------------------------------- article page ---- */
.article-page { padding-block: 24px 64px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin: 0 0 16px 4px; color: var(--muted); font-size: 12px; }
.breadcrumb a:hover { color: var(--brand); }
.reader-card { padding: clamp(24px, 5vw, 64px); }
.article-header { max-width: 850px; margin: 0 auto 34px; }
.demo-label {
  display: inline-block; margin-right: 10px; padding: 5px 8px; background:var(--brand-soft);
  color: var(--brand); border-radius: 5px; font-size: 9px; font-weight: 800; letter-spacing: .05em;
}
.article-header h1 { margin: 18px 0; font-size: clamp(38px, 5.2vw, 64px); font-weight: 620; line-height: 1.08; letter-spacing: -.045em; }
.article-deck { max-width: 780px; margin: 0; color: var(--muted); font-size: 19px; line-height: 1.5; }
.byline-row { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.author-avatar { display: grid; place-items: center; width: 40px; height: 40px; background: var(--brand); color:#fff; border-radius: 50%; font-size: 14px; font-weight: 700; }
.byline-row b { font-size: 12px; }
.byline-row .article-meta { margin-top: 4px; }
.share-actions { display: flex; gap: 8px; }
.share-actions button { padding: 8px 13px; background:var(--surface); border: 1px solid var(--border); border-radius: 18px; color: var(--muted); font-size: 11px; }
.reader-card > .news-thumb { max-width: var(--read-width); margin: 0 auto; }
.image-caption { max-width: var(--read-width); margin: 8px auto 0; color:var(--muted); font-size: 10px; }

.article-body { max-width: var(--read-width); margin: 40px auto 0; }
.article-body section { margin-top: 30px; }
.article-body h2 { margin: 42px 0 14px; font-size: 26px; line-height: 1.25; }
.article-body p { margin: 0 0 22px; color:var(--text); font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.82; }
.key-points { margin-bottom: 34px; padding: 22px 24px; background:var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 0 8px 8px 0; }
.key-points > span { color: var(--brand); font-size: 12px; font-weight: 700; }
.key-points ul { margin: 14px 0 0; padding-left: 19px; }
.key-points li { margin: 9px 0; font-size: 14px; line-height: 1.55; }
.article-note { margin-top: 45px; padding: 22px; background:var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.article-note b { font-size: 13px; }
.article-note p { margin: 8px 0 0; color: var(--muted); font-family: inherit; font-size: 12px; line-height: 1.55; }

.related { margin-top: 18px; overflow: hidden; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.related-grid article { padding: 20px; border-right: 1px solid var(--border); }
.related-grid article:last-child { border-right: 0; }
.related-grid .category-label { display: block; margin-top: 12px; }
.related-grid h3 { margin: 7px 0 0; font-size: 17px; line-height: 1.3; }
.related-grid h3:hover { color: var(--brand); }
.back-home { display: inline-block; margin: 22px 4px 0; color: var(--brand); font-size: 12px; font-weight: 600; }

/* ============================================================
   CMS
   ============================================================ */
.admin-shell { min-height: 100vh; background:var(--surface-2); color:var(--text); }
.admin-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column;
  width: 246px; padding: 24px 16px 18px; background:var(--surface); border-right:1px solid var(--border);
}
.admin-logo { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }

.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 13px;
  color:var(--text-2); border-radius: 8px; font-size: 13px; font-weight: 520;
}
.admin-sidebar nav a span { width: 20px; color:var(--muted); font-size: 17px; text-align: center; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background:var(--brand-soft); color: var(--brand); }
.admin-sidebar nav a.active span { color: var(--brand); }
.admin-user {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px;
  margin-top: auto; padding: 14px 8px 0; border-top:1px solid var(--border-2);
}
.admin-avatar, .team-avatar {
  display: grid; place-items: center; width: 36px; height: 36px;
  background: var(--brand); color:#fff; border-radius: 50%; font-size: 12px; font-weight: 750;
}
.admin-user div { min-width: 0; }
.admin-user b, .admin-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user b { font-size: 11px; }
.admin-user small { margin-top: 3px; color:var(--text-2); font-size: 9px; text-transform: capitalize; }
.link-button { border: 0; background: none; color:var(--muted); font-size: 14px; }

.admin-main { margin-left: 246px; min-height: 100vh; }
.admin-page { width: min(1240px, 100% - 64px); margin-inline: auto; padding: 44px 0 70px; }
.admin-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 35px; margin-bottom: 30px; }
.admin-page-head.compact { margin-bottom: 26px; }
.admin-page-head p { margin: 0 0 9px; color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.admin-page-head h1 { font-size: clamp(28px, 3vw, 40px); font-weight: 650; line-height: 1.15; letter-spacing: -.035em; }
.admin-page-head span { display: block; margin-top: 8px; color:var(--muted); font-size: 13px; }

.admin-primary {
  display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 0 18px;
  background: var(--brand); color:#fff; border: 0; border-radius: 8px;
  font-size: 12px; font-weight: 650; white-space: nowrap; box-shadow: var(--shadow-brand);
}
.admin-primary input[type=file] { display: none; }

.admin-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.admin-metrics article { padding: 20px; background:var(--surface); border:1px solid var(--border); border-radius: 12px; }
.admin-metrics span, .admin-metrics small { display: block; color:var(--muted); font-size: 11px; }
.admin-metrics b { display: block; margin: 10px 0 7px; font-size: 32px; font-weight: 620; line-height: 1; }
.admin-metrics small { font-size: 9px; }

.admin-panel { background:var(--surface); border:1px solid var(--border); border-radius: 12px; overflow: hidden; }
.admin-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 68px; padding: 15px 20px; border-bottom:1px solid var(--border-2);
}
.admin-panel-head h2 { font-size: 16px; font-weight: 650; }
.admin-panel-head p { margin: 5px 0 0; color:var(--muted); font-size: 10px; }
.panel-link { color: var(--brand); font-size: 11px; font-weight: 650; }

.admin-filters {
  display: grid; grid-template-columns: 1fr 190px 80px; gap: 10px;
  padding: 14px 20px; background:var(--surface-2); border-bottom:1px solid var(--border-2);
}
.admin-filters input, .admin-filters select,
.editor-settings input, .editor-settings select, .editor-settings textarea,
.invite-panel input, .invite-panel select,
.settings-body input, .settings-body textarea {
  min-height: 38px; padding: 9px 11px; background:var(--surface); color:var(--text);
  border:1px solid var(--field); border-radius: 7px; font-size: 11px; outline-color: var(--brand);
}
.admin-filters button { background:var(--ink-button); color:#fff; border: 0; border-radius: 7px; font-size: 10px; font-weight: 650; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.admin-table th {
  padding: 12px 18px; background:var(--surface-2); color:var(--muted); text-align: left;
  font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.admin-table td { padding: 15px 18px; border-top:1px solid var(--surface-3); color:var(--text-2); font-size: 11px; vertical-align: middle; }
.admin-table td:first-child { max-width: 370px; }
.admin-table td b, .admin-table td small { display: block; }
.admin-table td b { color:var(--text); font-size: 12px; line-height: 1.35; }
.admin-table td small { margin-top: 4px; color:var(--muted); font-size: 9px; }
.admin-table td a { color: var(--brand); font-weight: 650; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 12px; }
.row-actions button { border: 0; background: none; color:var(--danger); font-size: 10px; font-weight: 650; }
.tone-chip { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; }

.status, .role {
  display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px;
  border-radius: 12px; font-size: 9px; font-weight: 700; text-transform: capitalize;
}
.status-published, .role-owner { background:var(--ok-bg); color:var(--ok); }
.status-draft { background:var(--surface-3); color:var(--text-2); }
.status-review, .role-editor { background:var(--warn-bg); color:var(--warn); }
.status-scheduled, .role-reporter { background:var(--info-bg); color:var(--info); }

.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 18px; }
.popular-list { margin: 0; padding: 8px 20px 18px; list-style: none; }
.popular-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; padding: 13px 0; border-top:1px solid var(--surface-3); font-size: 12px; }
.popular-list li:first-child { border-top: 0; }
.popular-list span { color: var(--brand); font-weight: 700; }
.popular-list a:hover { color: var(--brand); }
.popular-list em { color:var(--muted); font-size: 10px; font-style: normal; }

/* -------------------------------------------------- editor ---------- */
.editor-page { min-height: 100vh; background:var(--surface-2); }
.editor-head {
  position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between;
  align-items: center; gap: 20px; min-height: 84px; padding: 0 34px;
  background:var(--surface); border-bottom:1px solid var(--border);
}
.editor-head > div:first-child a { color:var(--muted); font-size: 10px; }
.editor-head h1 { margin: 5px 0 0; font-size: 21px; font-weight: 630; }
.editor-actions { display: flex; gap: 8px; }
.editor-actions button {
  min-height: 38px; padding: 0 14px; background:var(--surface); color:var(--text-2);
  border:1px solid var(--field); border-radius: 7px; font-size: 10px; font-weight: 650;
}
.editor-actions button.publish { background: var(--brand); border-color: var(--brand); color:#fff; }
.editor-alert { margin: 18px 34px -4px; padding: 12px 15px; border-radius: 8px; font-size: 11px; }
.editor-alert.error { background:var(--danger-bg); color:var(--danger); }
.editor-alert.success { background:var(--ok-bg); color:var(--ok); }
.editor-alert.info { background:var(--brand-soft); color:var(--info); }

.editor-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start;
  gap: 22px; width: min(1120px, 100% - 68px); margin: 28px auto 70px;
}
.editor-form, .editor-settings section { padding: 24px; background:var(--surface); border:1px solid var(--border); border-radius: 11px; }
.editor-form { display: grid; gap: 22px; }
.editor-form label, .editor-settings label, .invite-panel label, .settings-body label { display: grid; gap: 8px; }
.editor-form label > span, .editor-settings label > span,
.invite-panel label > span, .settings-body label > span { color:var(--text-2); font-size: 10px; font-weight: 700; }
.editor-form input, .editor-form textarea {
  width: 100%; padding: 12px 13px; color:var(--text); border:1px solid var(--field);
  border-radius: 7px; font-size: 13px; line-height: 1.5; outline-color: var(--brand);
}
.editor-form > label:first-of-type input { font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
.editor-form textarea { min-height: 110px; resize: vertical; }
.editor-form textarea.summary-input { min-height: 90px; }
.editor-form label > small { justify-self: end; color:var(--muted); font-size: 9px; }
.field-help { margin: -4px 0 0; color:var(--muted); font-size: 10px; }
.slug-input { display: flex; align-items: center; border:1px solid var(--field); border-radius: 7px; overflow: hidden; }
.slug-input i { display: flex; align-items: center; align-self: stretch; padding: 0 10px; background:var(--surface-3); border-right:1px solid var(--field); color:var(--muted); font-size: 11px; font-style: normal; }
.slug-input input { border: 0; border-radius: 0; }

.editor-settings { display: grid; gap: 14px; }
.editor-settings section { display: grid; gap: 15px; padding: 19px; }
.editor-settings h2 { margin: 0 0 2px; font-size: 13px; }
.check-label { grid-template-columns: auto 1fr; align-items: center; }
.check-label input { width: 15px; min-height: 15px; }
.upload-box {
  display: flex !important; justify-content: center; align-items: center; min-height: 120px;
  padding: 18px; background:var(--surface-2); border:1px dashed var(--field); border-radius: 8px;
  text-align: center; cursor: pointer;
}
.upload-box input { display: none; }
.upload-box b { color: var(--brand); font-size: 11px; }
.upload-box span { color:var(--muted); font-size: 9px; }
.upload-preview { position: relative; background:var(--surface-3); border-radius: 8px; overflow: hidden; }
.upload-preview img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* -------------------------------------------------- team ------------ */
.team-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.team-summary article { padding: 17px 19px; background:var(--surface); border:1px solid var(--border); border-radius: 11px; }
.team-summary span, .team-summary small { display: block; color:var(--muted); font-size: 9px; }
.team-summary b { display: block; margin: 8px 0 6px; font-size: 25px; font-weight: 650; line-height: 1; }
.team-feedback { margin: 0 0 18px; padding: 12px 15px; border-radius: 8px; font-size: 10px; }
.team-feedback.success { background:var(--ok-bg); color:var(--ok); }
.team-feedback.error { background:var(--danger-bg); color:var(--danger); }
.team-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 18px; }
.team-count { padding: 5px 8px; background:var(--surface-3); color:var(--text-2); border-radius: 12px; font-size: 9px; font-weight: 700; }
.team-table-head, .team-rows article { grid-template-columns: minmax(250px, 1fr) 130px 120px 110px; }
.team-table-head {
  display: grid; gap: 14px; padding: 10px 18px; background:var(--surface-2); color:var(--muted);
  font-size: 8px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase;
}
.team-rows article { display: grid; align-items: center; gap: 14px; min-height: 82px; padding: 12px 18px; border-bottom:1px solid var(--surface-3); }
.team-rows article:last-child { border-bottom: 0; }
.team-rows article.is-disabled { background:var(--surface-2); }
.team-person { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 11px; min-width: 0; }
.team-person > div { min-width: 0; }
.team-rows b, .team-rows small, .team-rows em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-rows b { font-size: 12px; }
.team-rows small { margin-top: 3px; color:var(--muted); font-size: 9px; }
.team-rows em { margin-top: 4px; color:var(--muted); font-size: 8px; font-style: normal; }
.team-rows select { width: 100%; min-height: 32px; padding: 0 7px; background:var(--surface); color:var(--text-2); border:1px solid var(--border); border-radius: 6px; font-size: 9px; }
.member-state { display: inline-flex; align-items: center; gap: 6px; color:var(--text-2); font-size: 9px; white-space: nowrap; }
.member-state i { width: 7px; height: 7px; background:var(--faint); border-radius: 50%; }
.state-active i { background:var(--ok); }
.state-invited i { background:var(--warn); }
.state-disabled { color:var(--faint); }
.team-actions { text-align: right; }
.team-actions button { border: 0; background: none; color:var(--danger); font-size: 9px; }
.team-actions button.restore { color: var(--brand); }
.team-actions span { color:var(--muted); font-size: 8px; }
.team-side { display: grid; gap: 18px; }

.invite-panel form { display: grid; gap: 15px; padding: 20px; }
.invite-panel form button { min-height: 40px; background: var(--brand); color:#fff; border: 0; border-radius: 7px; font-size: 11px; font-weight: 650; }
.invite-panel form button:disabled { opacity: .5; }
.invite-panel form > small { margin-top: -7px; color:var(--muted); font-size: 9px; }
.invite-ready { margin: 0 20px 20px; padding: 13px; background:var(--brand-soft); border:1px solid var(--brand-line); border-radius: 8px; }
.invite-ready span, .invite-ready b { display: block; }
.invite-ready span { color:var(--muted); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.invite-ready b { margin: 5px 0 10px; color:var(--text); font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
.invite-open {
  display: block; width: 100%; min-height: 34px; padding: 9px 0; background:var(--surface);
  border:1px solid var(--brand-line); border-radius: 6px; color: var(--brand);
  font-size: 9px; font-weight: 700; text-align: center;
}
.onboarding-panel ol { margin: 0; padding: 18px 20px; list-style: none; counter-reset: activation; }
.onboarding-panel li { position: relative; padding: 0 0 17px 34px; counter-increment: activation; }
.onboarding-panel li:last-child { padding-bottom: 0; }
.onboarding-panel li::before {
  content: counter(activation); position: absolute; top: -2px; left: 0;
  display: grid; place-items: center; width: 22px; height: 22px;
  background:var(--brand-soft); color: var(--brand); border-radius: 50%; font-size: 9px; font-weight: 800;
}
.onboarding-panel li:not(:last-child)::after { content: ""; position: absolute; top: 21px; bottom: 1px; left: 10px; width: 1px; background:var(--border); }
.onboarding-panel li b, .onboarding-panel li span { display: block; }
.onboarding-panel li b { font-size: 10px; }
.onboarding-panel li span { margin-top: 4px; color:var(--muted); font-size: 9px; line-height: 1.45; }
.access-note { margin: 0 20px 20px; padding: 13px; background:var(--warn-bg); border-radius: 7px; }
.access-note b { font-size: 10px; }
.access-note p { margin: 5px 0 0; color:var(--warn); font-size: 9px; line-height: 1.5; }
.role-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.role-guide article { padding: 18px; background:var(--surface); border:1px solid var(--border); border-radius: 10px; }
.role-guide h3 { margin: 13px 0 6px; font-size: 12px; }
.role-guide p { margin: 0; color:var(--muted); font-size: 9px; line-height: 1.55; }

/* -------------------------------------------------- media & settings */
.media-panel { min-height: 300px; }
.media-upload label { cursor: pointer; }
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 20px; }
.media-grid article { border:1px solid var(--border); border-radius: 8px; min-width: 0; overflow: hidden; }
.media-grid img { width: 100%; aspect-ratio: 4 / 3; background:var(--surface-3); object-fit: cover; }
.media-grid article div { padding: 10px; }
.media-grid b, .media-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-grid b { font-size: 10px; }
.media-grid small { margin-top: 5px; color:var(--muted); font-size: 8px; }
.media-actions { display: flex; gap: 10px; margin-top: 8px; }
.media-actions a { color: var(--brand); font-size: 9px; font-weight: 650; }
.media-actions button { border: 0; background: none; color:var(--danger); font-size: 9px; font-weight: 650; }
.empty-media { padding: 70px 20px; color:var(--text-2); text-align: center; }
.empty-media b { color:var(--text); font-size: 14px; }
.empty-media p { font-size: 10px; }

.settings-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
.settings-body { display: grid; gap: 15px; padding: 20px; }
.settings-body textarea { min-height: 90px; resize: vertical; }
.settings-body .admin-primary { margin-top: 4px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (width <= 1050px) {
  .admin-sidebar { width: 78px; }
  .admin-logo { width: 54px; padding-inline: 2px; align-items: center; }
  .admin-logo .brand-word { display: none; }
  .admin-sidebar nav a:not(:last-child) { font-size: 0; }
  .admin-sidebar nav a { justify-content: center; padding: 0; }
  .admin-sidebar nav a span { font-size: 18px; }
  .admin-user { grid-template-columns: 38px auto; justify-content: center; gap: 8px; }
  .admin-user div, .admin-user > form { display: none; }
  .admin-main { margin-left: 78px; }
  .admin-metrics, .team-summary { grid-template-columns: 1fr 1fr; }
  .dashboard-layout, .editor-layout, .team-layout, .settings-layout { grid-template-columns: 1fr; }
  .editor-settings { grid-template-columns: 1fr 1fr; }
  .editor-settings section:last-child { grid-column: 1 / -1; }
  .media-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (width <= 900px) {
  .gn-top { grid-template-columns: 160px 1fr auto; }
  .gn-actions button { display: none; }
  .top-grid { grid-template-columns: 1fr; }
  .lead-news { border-right: 0; border-bottom: 1px solid var(--border); }
  .headline-list { display: grid; grid-template-columns: 1fr 1fr; }
  .headline-list article { border-right: 1px solid var(--border); }
  .content-layout { grid-template-columns: 1fr; }
  .right-rail { grid-template-columns: 1fr 1fr; }
  .newsletter-card { grid-column: 1 / -1; }
}

@media (width <= 700px) {
  .admin-sidebar {
    position: static; flex-direction: row; align-items: center; width: 100%; height: 66px;
    padding: 10px 12px; border-right: 0; border-bottom:1px solid var(--border);
  }
  .admin-logo { width: auto; padding: 0; }
  .admin-logo .brand-word { display: inline; }
    .admin-sidebar nav { display: flex; margin-left: auto; }
  .admin-sidebar nav a { display: none; }
  .admin-sidebar nav a:nth-child(2), .admin-sidebar nav a:last-child { display: flex; width: 38px; min-height: 38px; }
  .admin-user { margin: 0 0 0 4px; padding: 0; border: 0; }
  .admin-main { margin-left: 0; }
  .admin-page { width: calc(100% - 28px); padding-top: 26px; }
  .admin-page-head { flex-direction: column; align-items: flex-start; }
  .admin-filters { grid-template-columns: 1fr; }
  .admin-filters button { min-height: 36px; }
  .editor-head { position: static; flex-direction: column; align-items: flex-start; padding: 14px; }
  .editor-actions { width: 100%; overflow-x: auto; }
  .editor-actions button { flex: 1; white-space: nowrap; }
  .editor-actions .theme-toggle { flex: 0 0 38px; }
  .editor-alert { margin: 14px; }
  .editor-layout { width: calc(100% - 28px); margin-top: 14px; }
  .editor-form { padding: 16px; }
  .editor-settings { grid-template-columns: 1fr; }
  .editor-settings section:last-child { grid-column: auto; }
  .team-list { overflow-x: auto; }
  .team-list > .admin-panel-head, .team-table-head, .team-rows { min-width: 700px; }
  .role-guide { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr 1fr; }
}

@media (width <= 680px) {
  .container { width: min(100% - 24px, 640px); }
  .gn-header { position: relative; }
  .gn-top { grid-template-columns: 1fr auto; gap: 12px; height: auto; padding-block: 12px; }
  .gn-brand { width: 138px; }
  .gn-search { grid-area: 2 / 1 / auto / -1; }
  .avatar { margin: 0; }
  .nav-scroll { width: 100%; padding-inline: 12px; }
  .page-intro { margin-top: 4px; }
  .weather { display: none; }
  .top-news, .feed-section, .topic-block, .brief-card, .local-card,
  .newsletter-card, .more-news, .reader-card, .related { border-radius: 10px; }
  .lead-news { padding: 14px; }
  .lead-news h2 { font-size: 25px; }
  .thumb-wide { min-height: 190px; }
  .headline-list { grid-template-columns: 1fr; }
  .headline-list article { border-right: 0; }
  .headline-list p { display: none; }
  .feed-list { padding-inline: 14px; }
  .feed-item { grid-template-columns: 1fr 112px; gap: 14px; min-height: 140px; }
  .feed-item .thumb-small { width: 112px; min-height: 92px; }
  .feed-item h3 { font-size: 17px; }
  .feed-item p { display: none; }
  .topic-feature { grid-template-columns: 1fr; padding: 14px; }
  .right-rail { grid-template-columns: 1fr; }
  .newsletter-card { grid-column: auto; }
  .more-grid { grid-template-columns: 1fr 1fr; }
  .more-grid article:nth-child(3n) { border-right: 1px solid var(--border); }
  .more-grid article:nth-child(2n) { border-right: 0; }
  .more-grid .news-thumb { min-height: 120px; }
  .footer-row { grid-template-columns: 1fr; gap: 14px; padding-block: 28px; }
  .footer-row div { flex-wrap: wrap; }
  .reader-card { padding: 22px 16px; }
  .article-header h1 { font-size: 36px; }
  .article-deck { font-size: 16px; }
  .byline-row { align-items: center; }
  .article-body { margin-top: 30px; }
  .article-body p { font-size: 17px; }
  .related-grid { grid-template-columns: 1fr; }
  .related-grid article { display: block; padding: 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .related-grid article:last-child { border-bottom: 0; }
  .related-grid .news-thumb { width: 100%; min-height: 150px; }
  .related-grid .category-label { margin-top: 11px; }
  .related-grid h3 { font-size: 18px; line-height: 1.3; }
  .admin-metrics, .team-summary { grid-template-columns: 1fr; }
}

/* -------------------------------------------------- analytics ------- */
.chart-panel { margin-bottom: 18px; }
.chart-body { padding: 26px 20px 16px; overflow-x: auto; }
.chart-plot { min-width: 320px; }
.chart-plot {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
  align-items: end; height: 210px; border-bottom:1px solid var(--border-2);
}
.chart-col { position: relative; display: grid; grid-template-rows: 1fr auto; height: 100%; outline: 0; }
.chart-track { display: flex; align-items: flex-end; justify-content: center; height: 100%; padding: 0 2px; }
.chart-bar {
  width: 100%; max-width: 46px; min-height: 2px;
  background: var(--brand); border-radius: 4px 4px 0 0;
  transition: background .15s;
}
.chart-bar.is-empty { background:var(--surface-3); }
.chart-col:hover .chart-bar, .chart-col:focus-visible .chart-bar { background:var(--brand-strong); }
.chart-col:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.chart-value {
  position: absolute; top: -6px; left: 0; right: 0;
  color:var(--text-2); font-size: 9px; font-weight: 700; font-style: normal; text-align: center;
}
.chart-label { padding-top: 8px; color:var(--muted); font-size: 9px; text-align: center; }
.chart-tip {
  position: absolute; bottom: calc(100% - 14px); left: 50%; z-index: 5;
  transform: translateX(-50%); padding: 7px 10px; width: max-content;
  background:var(--tooltip-bg); color:#fff; border-radius: 6px;
  font-size: 10px; line-height: 1.45; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.chart-tip b { font-size: 11px; }
.chart-col:hover .chart-tip, .chart-col:focus-visible .chart-tip { opacity: 1; }

.analytics-layout { margin-bottom: 18px; }
.admin-table.narrow { min-width: 420px; }
.views-cell { width: 150px; }
.views-track { height: 6px; background:var(--surface-3); border-radius: 3px; overflow: hidden; }
.views-bar { height: 100%; background: var(--brand); border-radius: 3px; }

/* -------------------------------------------------- article figures - */
.article-figure { margin: 30px 0; max-width: 100%; }
.article-figure img {
  display: block;
  width: 100%;
  max-width: 100%;      /* tidak pernah melewati kolom, seberapa pun besar aslinya */
  height: auto;
  max-height: 560px;    /* batas tinggi pasti agar foto tinggi tidak mendominasi */
  object-fit: contain;  /* diperkecil utuh, bukan dipotong */
  border-radius: 10px;
  background:var(--surface-3);
}
.article-figure figcaption {
  margin-top: 9px; color:var(--muted);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 11px; line-height: 1.5;
}

/* -------------------------------------------------- confirm dialog -- */
.confirm-dialog {
  width: min(410px, 100% - 32px); padding: 0; border: 0; border-radius: 14px;
  background:var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
}
.confirm-dialog::backdrop { background:var(--scrim); backdrop-filter: blur(2px); }

.confirm-card { padding: 26px 26px 20px; }
.confirm-icon {
  display: grid; place-items: center; width: 44px; height: 44px;
  background:var(--danger-bg); color:var(--danger); border-radius: 50%;
}
.confirm-card h2 { margin: 17px 0 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.confirm-message { margin: 8px 0 0; color:var(--text-2); font-size: 12px; line-height: 1.6; }
.confirm-target {
  margin: 14px 0 0; padding: 10px 12px; background:var(--surface-2);
  border:1px solid var(--border-2); border-radius: 8px;
  color:var(--text); font-size: 11px; font-weight: 600; line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.confirm-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.confirm-actions button { min-height: 38px; padding: 0 16px; border-radius: 8px; font-size: 11px; font-weight: 650; }
.confirm-cancel { background:var(--surface); color:var(--text-2); border:1px solid var(--field); }
.confirm-cancel:hover { background:var(--surface-2); }
.confirm-ok { background:var(--danger); color:#fff; border:1px solid var(--danger); }
.confirm-ok:hover { background:var(--danger-strong); border-color:var(--danger-strong); }
.confirm-actions button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .confirm-dialog[open] { animation: confirm-in .16s ease-out; }
  .confirm-dialog[open]::backdrop { animation: confirm-fade .16s ease-out; }
}
@keyframes confirm-in { from { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes confirm-fade { from { opacity: 0; } }


/* -------------------------------------------------- nav switch ------ */
.nav-switch {
  display: inline-flex; align-items: center; gap: 9px; padding: 4px;
  background: none; border: 0; border-radius: 20px;
}
.nav-switch:not(:disabled):hover .switch-track { box-shadow: 0 0 0 3px var(--brand-ring); }
.nav-switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.switch-track {
  position: relative; flex: none; width: 34px; height: 19px;
  background:#c4c7cf; border-radius: 10px; transition: background .18s;
}
.switch-thumb {
  position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  background:var(--surface); border-radius: 50%; box-shadow: var(--shadow-sm);
  transition: transform .18s;
}
.nav-switch.is-on .switch-track { background: var(--brand); }
.nav-switch.is-on .switch-thumb { transform: translateX(15px); }
.switch-label { color:var(--text-2); font-size: 10px; font-weight: 650; white-space: nowrap; }
.nav-switch.is-on .switch-label { color:var(--ok); }
.nav-switch:disabled { cursor: default; opacity: .55; }

@media (prefers-reduced-motion: reduce) {
  .switch-track, .switch-thumb { transition: none; }
}

/* -------------------------------------------------- sortable table -- */
.admin-table th a { display: inline-flex; align-items: center; gap: 5px; color: inherit; }
.admin-table th a:hover { color: var(--brand); }
.admin-table th.is-sorted { color: var(--brand); }
.sort-mark { font-size: 9px; line-height: 1; }
.admin-table th a:hover .sort-mark::after { content: "⇅"; opacity: .45; }
.admin-table th.is-sorted a:hover .sort-mark::after { content: ""; }

.table-empty { text-align: center; padding: 46px 20px !important; }
.table-empty b { display: block; color:var(--text); font-size: 13px; }
.table-empty span { display: block; margin-top: 5px; color:var(--muted); font-size: 10px; }
.table-empty a { display: inline-block; margin-top: 12px; color: var(--brand); font-size: 10px; font-weight: 650; }

.table-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 13px 20px; background:var(--surface-2); border-top:1px solid var(--border-2);
  color:var(--muted); font-size: 10px;
}
.table-pager { display: flex; align-items: center; gap: 12px; }
.table-pager a { color: var(--brand); font-weight: 650; }
.table-pager a.is-off { color:var(--faint); pointer-events: none; }
.table-pager b { color:var(--text-2); font-size: 9px; font-weight: 650; }

@media (width <= 700px) {
  .table-foot { flex-direction: column; align-items: flex-start; gap: 9px; }
}

/* -------------------------------------------------- block editor ---- */
.block-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.block-section-head h2 { font-size: 13px; font-weight: 700; }
.block-section-head p { margin: 5px 0 0; color:var(--muted); font-size: 10px; line-height: 1.5; }
.block-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.block-tools button {
  padding: 8px 12px; background:var(--brand-soft); color: var(--brand);
  border: 0; border-radius: 7px; font-size: 10px; font-weight: 700;
}
.block-tools button:hover:not(:disabled) { background:var(--brand-soft-2); }
.block-tools button:disabled { background:var(--surface-3); color:var(--muted); cursor: default; }

.block-editor { display: grid; gap: 10px; }
.blk-empty {
  padding: 34px 20px; background:var(--surface-2); border:1px dashed var(--field);
  border-radius: 9px; text-align: center;
}
.blk-empty p { margin: 0; color:var(--muted); font-size: 11px; line-height: 1.6; }
.blk-template {
  margin-top: 13px; padding: 9px 15px; background:var(--brand-soft); color: var(--brand);
  border: 0; border-radius: 7px; font-size: 10px; font-weight: 700;
}
.blk-template:hover { background:var(--brand-soft-2); }
.blk-noscript {
  margin: 0; padding: 18px; background:var(--warn-bg); border-radius: 8px;
  color:var(--warn); font-size: 11px; line-height: 1.6;
}

.blk { background:var(--surface); border:1px solid var(--border); border-radius: 9px; overflow: hidden; }
.blk.is-dragging { opacity: .45; }
.blk.is-over { border-color: var(--brand); box-shadow: 0 -3px 0 -1px var(--brand); }
.blk-bar {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  background:var(--surface-2); border-bottom:1px solid var(--surface-3);
}
.blk-grip { color:var(--faint); font-size: 13px; cursor: grab; letter-spacing: -2px; }
.blk:active .blk-grip { cursor: grabbing; }
.blk-type {
  padding: 3px 7px; background:var(--brand-soft); color: var(--brand);
  border-radius: 4px; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.blk-tools { display: flex; gap: 3px; margin-left: auto; }
.blk-tools button {
  width: 26px; height: 26px; background: none; color:var(--muted);
  border: 0; border-radius: 6px; font-size: 11px; line-height: 1;
}
.blk-tools button:hover { background:var(--surface-3); color:var(--text); }
.blk-tools button.is-danger:hover { background:var(--danger-bg); color:var(--danger); }
.blk-tools button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.blk-body { padding: 13px 15px; }
/* Isi blok sengaja meniru tipografi halaman baca. */
.blk-text {
  width: 100%; min-height: 52px; padding: 0; border: 0; outline: 0; resize: none;
  color:var(--text); font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.75;
}
.blk-heading {
  width: 100%; padding: 0; border: 0; outline: 0;
  color:var(--text); font-size: 20px; font-weight: 620; line-height: 1.3; letter-spacing: -.02em;
}
.blk-text::placeholder, .blk-heading::placeholder { color:var(--faint); }
.blk-figure { border-radius: 8px; overflow: hidden; }
.blk-figure img { width: 100%; max-height: 260px; object-fit: cover; background:var(--surface-3); border-radius: 8px; }
.blk-figure figcaption { margin-top: 7px; color:var(--muted); font-size: 10px; }
.blk-figure.is-missing {
  padding: 18px; background:var(--warn-bg); border-radius: 8px;
  color:var(--warn); font-size: 10px; line-height: 1.55;
}
.blk-picker {
  width: 100%; margin-top: 10px; min-height: 34px; padding: 0 9px;
  background:var(--surface); color:var(--text-2); border:1px solid var(--field); border-radius: 6px; font-size: 10px;
}

@media (width <= 700px) {
  .block-section-head { flex-direction: column; }
}

/* -------------------------------------------------- preview bar ----- */
.preview-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  width: min(1180px, 100% - 40px); margin: 16px auto -6px;
  padding: 12px 16px; background:var(--warn-bg); border:1px solid var(--warn-line);
  border-radius: 10px; color:var(--warn); font-size: 11px;
}
.preview-tag {
  padding: 3px 7px; background:#9b6305; color:#fff;
  border-radius: 4px; font-size: 8px; font-weight: 800; letter-spacing: .08em;
}
.preview-bar b { color:var(--warn); font-size: 11px; text-transform: capitalize; }
.preview-bar > span:last-of-type { color:var(--muted); font-size: 10px; }
.preview-bar a { margin-left: auto; color: var(--brand); font-size: 11px; font-weight: 650; }
.editor-preview {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px;
  background:var(--surface); color:var(--text-2); border:1px solid var(--field); border-radius: 7px;
  font-size: 10px; font-weight: 650;
}
.editor-preview:hover { border-color: var(--brand); color: var(--brand); }

/* -------------------------------------------------- image block ----- */
.blk-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 120px; padding: 18px; background:var(--surface-2);
  border:1px dashed var(--field); border-radius: 8px; text-align: center; cursor: pointer;
}
.blk-drop:hover { border-color: var(--brand); background:var(--brand-soft); }
.blk-drop b { color: var(--brand); font-size: 11px; }
.blk-drop span { color:var(--muted); font-size: 9px; }
.blk-drop input { display: none; }
.blk-drop.is-busy { border-style: solid; cursor: progress; }
.blk-drop.is-error { border-color:var(--danger-line); background:var(--danger-bg); }
.blk-drop.is-error b { color:var(--danger); }

.blk-caption {
  width: 100%; margin-top: 9px; padding: 8px 10px;
  border:1px solid var(--field); border-radius: 6px; font-size: 11px; outline-color: var(--brand);
}
.blk-swap {
  margin-top: 8px; padding: 6px 11px; background:var(--surface); color:var(--text-2);
  border:1px solid var(--field); border-radius: 6px; font-size: 9px; font-weight: 650;
}
.blk-swap:hover { border-color: var(--brand); color: var(--brand); }

/* -------------------------------------------------- rating ---------- */
.rating-card { margin-top: 18px; overflow: hidden; }
.rating-body { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px; padding: 22px 20px; align-items: start; }
.rating-score { display: flex; align-items: center; gap: 14px; }
.rating-score > b { font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.rating-score span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.stars-static { color:var(--star-off); font-size: 15px; letter-spacing: 2px; }
.stars-static .is-on { color: #f5a623; }

.rating-form fieldset { border: 0; padding: 0; margin: 0; }
.rating-form legend { padding: 0 0 9px; color: var(--muted); font-size: 11px; font-weight: 600; }
/* Radios sit 5→1 in the DOM and are reversed visually, so ~ can light up every
   star at or below the one hovered or chosen. No JavaScript involved. */
.stars-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.stars-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.stars-input label { color:var(--star-off); font-size: 27px; line-height: 1; padding: 0 2px; cursor: pointer; transition: color .12s; }
.stars-input label:hover, .stars-input label:hover ~ label,
.stars-input input:checked ~ label { color: #f5a623; }
.stars-input input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.rating-form button {
  display: block; margin-top: 14px; padding: 10px 16px; background: var(--brand);
  color:#fff; border: 0; border-radius: 7px; font-size: 12px; font-weight: 600;
}
.form-note { margin: 10px 0 0; font-size: 11px; line-height: 1.5; }
.form-note.is-ok { color:var(--ok); }
.form-note.is-bad { color:var(--danger); }

/* -------------------------------------------------- comments -------- */
.comments { margin-top: 18px; overflow: hidden; }
.comment-form { display: grid; gap: 14px; padding: 20px; border-bottom: 1px solid var(--border); }
.comment-form label { display: grid; gap: 7px; }
.comment-form label > span { color:var(--text-2); font-size: 11px; font-weight: 700; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: 7px; font-size: 13px; line-height: 1.55; outline-color: var(--brand); resize: vertical;
}
.comment-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.comment-actions span { color: var(--muted); font-size: 11px; }
.comment-actions button {
  padding: 11px 18px; background: var(--brand); color:#fff;
  border: 0; border-radius: 7px; font-size: 12px; font-weight: 600;
}
.comment-empty { margin: 0; padding: 34px 20px; color: var(--muted); font-size: 12px; text-align: center; }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-list li { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.comment-list li:last-child { border-bottom: 0; }
.comment-head { display: flex; align-items: center; gap: 9px; }
.comment-avatar {
  display: grid; place-items: center; width: 28px; height: 28px;
  background:var(--brand-soft); color: var(--brand); border-radius: 50%; font-size: 10px; font-weight: 700;
}
.comment-head b { font-size: 13px; }
.comment-head time { color: var(--muted); font-size: 11px; }
.comment-list p { margin: 9px 0 0 37px; color:var(--text); font-size: 14px; line-height: 1.65; white-space: pre-wrap; }

@media (width <= 680px) {
  .rating-body { grid-template-columns: 1fr; gap: 18px; }
  .comment-list p { margin-left: 0; }
}

/* -------------------------------------------------- moderation ------ */
.nav-badge {
  margin-left: auto; padding: 2px 6px; background:var(--danger); color:#fff;
  border-radius: 9px; font-size: 8px; font-weight: 800; font-style: normal;
}
.admin-sidebar nav a.active .nav-badge { background: var(--brand); }

.moderation-tabs { display: flex; gap: 4px; padding: 12px 20px 0; border-bottom:1px solid var(--border-2); }
.moderation-tabs a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px;
  border-bottom: 2px solid transparent; color:var(--text-2); font-size: 11px; font-weight: 650;
}
.moderation-tabs a:hover { color: var(--brand); }
.moderation-tabs a.is-active { color: var(--brand); border-color: var(--brand); }
.moderation-tabs i {
  padding: 1px 6px; background:var(--surface-3); color:var(--text-2);
  border-radius: 8px; font-size: 9px; font-style: normal; font-weight: 700;
}
.moderation-tabs a.is-active i { background:var(--brand-soft); color: var(--brand); }

.moderation-list { margin: 0; padding: 0; list-style: none; }
.moderation-list li { padding: 17px 20px; border-bottom:1px solid var(--surface-3); }
.moderation-list li:last-child { border-bottom: 0; }
.moderation-meta { display: flex; align-items: center; gap: 10px; }
.moderation-meta b { display: block; font-size: 12px; }
.moderation-meta small { display: block; margin-top: 3px; color:var(--muted); font-size: 9px; }
.moderation-meta small a { color: var(--brand); font-weight: 650; }
.moderation-meta > .status { margin-left: auto; }
.moderation-body {
  margin: 11px 0 0 38px; padding: 12px 14px; background:var(--surface-2);
  border:1px solid var(--surface-3); border-radius: 8px;
  color:var(--text); font-size: 12px; line-height: 1.6; white-space: pre-wrap;
}
.moderation-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 11px 0 0 38px; }
.moderation-actions button {
  padding: 7px 12px; background:var(--surface); color:var(--text-2);
  border:1px solid var(--field); border-radius: 6px; font-size: 10px; font-weight: 650;
}
.moderation-actions button:hover { border-color:var(--field-strong); }
.moderation-actions button.is-approve { border-color:var(--ok-line); background:var(--ok-bg); color:var(--ok); }
.moderation-actions button.is-approve:hover { background:#e2f6ea; }
.moderation-actions button.is-delete { color:var(--danger); }
.moderation-actions button.is-delete:hover { border-color:var(--danger-line); background:var(--danger-bg); }
.moderation-readonly { margin: 11px 0 0 38px; color:var(--muted); font-size: 10px; }

@media (width <= 700px) {
  .moderation-body, .moderation-actions, .moderation-readonly { margin-left: 0; }
  .moderation-tabs { overflow-x: auto; }
}

/* -------------------------------------------------- theme toggle ---- */
.theme-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; padding: 0;
  background: none; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 50%;
  font-size: 14px; line-height: 1;
}
.theme-toggle:hover { background: var(--surface-3); color: var(--text); }
.theme-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Ikon mengikuti tema aktif: matahari saat terang, bulan saat gelap. */
.theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun { display: none; }
  :root:not([data-theme="light"]) .theme-moon { display: block; }
}
:root[data-theme="dark"] .theme-sun { display: none; }
:root[data-theme="dark"] .theme-moon { display: block; }

/* Tombol tema tetap terlihat di layar kecil walau aksi lain disembunyikan. */
.gn-actions .theme-toggle { display: inline-grid !important; }
.admin-user { grid-template-columns: 38px 1fr auto auto; }
.editor-actions .theme-toggle { width: 38px; height: 38px; border-radius: 7px; border-color: var(--field); }


/* -------------------------------------------------- brand lockup ---- */
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { flex: none; width: 32px; height: 32px; border-radius: 8px; }
.brand-word {
  font-size: 20px; line-height: 1; letter-spacing: -.025em; white-space: nowrap;
}
/* Nama situs memakai token teks, jadi ikut terbaca di mode gelap. */
.brand-word b { color: var(--text); font-weight: 700; }
.brand-word i { color: var(--muted); font-style: normal; font-weight: 400; margin-left: .28em; }

.brand-sm .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
.brand-sm .brand-word { font-size: 16px; }
.brand-lg .brand-mark { width: 40px; height: 40px; border-radius: 10px; }
.brand-lg .brand-word { font-size: 24px; }

/* Lambang berganti mengikuti tema: ubin biru di latar terang, ubin terang di gelap. */
.brand-mark.is-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark.is-light { display: none; }
  :root:not([data-theme="light"]) .brand-mark.is-dark { display: block; }
}
:root[data-theme="dark"] .brand-mark.is-light { display: none; }
:root[data-theme="dark"] .brand-mark.is-dark { display: block; }



@media (width <= 680px) {
  .gn-brand .brand-mark { width: 28px; height: 28px; }
  .gn-brand .brand-word { font-size: 17px; }
}


/* -------------------------------------------------- article share --- */
.article-share {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--border);
}
.article-share > span { color: var(--muted); font-size: 12px; font-weight: 600; }

@media (width <= 680px) {
  .article-share { flex-direction: column; align-items: flex-start; gap: 11px; }
  .share-actions { width: 100%; }
  .share-actions button { flex: 1; }
}


/* -------------------------------------------------- auth ------------ */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; background:var(--surface-2); }
.auth-shell {
  display: grid; grid-template-columns: 1fr 1fr;
  width: min(880px, 100%); overflow: hidden;
  background:var(--surface); border:1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg);
}
.auth-shell-solo { grid-template-columns: 1fr; width: min(420px, 100%); }

/* Panel kiri: identitas, dengan aksen merek tipis. */
.auth-brand {
  display: flex; flex-direction: column; gap: 26px; padding: 38px 34px;
  background:var(--brand-soft); border-right:1px solid var(--border);
}
.auth-brand-body h2 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.auth-brand-body p { margin: 7px 0 0; color:var(--text-2); font-size: 12px; line-height: 1.6; }
.auth-brand-body ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.auth-brand-body li {
  position: relative; padding-left: 22px;
  color:var(--text-2); font-size: 12px; line-height: 1.5;
}
.auth-brand-body li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 12px; height: 7px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  rotate: -45deg;
}
.auth-brand-foot { margin: auto 0 0; color:var(--muted); font-size: 11px; font-style: italic; }

/* Panel kanan: formulir. */
.auth-form-panel { display: flex; flex-direction: column; padding: 38px 34px; }
.auth-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.auth-form-head h1 { font-size: 27px; font-weight: 650; letter-spacing: -.03em; }
.auth-sub { display: block; margin-top: 7px; color:var(--muted); font-size: 12px; line-height: 1.55; }
.auth-form-panel .editor-alert { margin: 20px 0 0; }

.auth-form-panel form { display: grid; gap: 15px; margin: 26px 0 0; }
.auth-form-panel label { display: grid; gap: 7px; }
.auth-form-panel label > span { color:var(--text-2); font-size: 11px; font-weight: 700; }
.auth-form-panel input {
  min-height: 44px; padding: 0 13px; color:var(--text);
  background:var(--surface); border:1px solid var(--field); border-radius: 9px;
  font-size: 13px; transition: border-color .15s, box-shadow .15s;
}
.auth-form-panel input:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring);
}
.auth-form-panel form button {
  min-height: 46px; margin-top: 4px;
  background: var(--brand); color: #fff; border: 0; border-radius: 9px;
  font-size: 13px; font-weight: 650; box-shadow: var(--shadow-brand);
}
.auth-form-panel form button:hover { background: var(--brand-strong); }
.auth-foot { margin: 20px 0 0; color:var(--muted); font-size: 11px; line-height: 1.6; }
.auth-form-panel .back-home { margin: auto 0 0; padding-top: 18px; }

@media (width <= 760px) {
  .auth-page { padding: 16px; }
  .auth-shell { grid-template-columns: 1fr; width: min(420px, 100%); }
  /* Di layar sempit panel identitas cukup jadi kepala ringkas. */
  .auth-brand { padding: 26px 24px; border-right: 0; border-bottom:1px solid var(--border); gap: 16px; }
  .auth-brand-body ul, .auth-brand-foot { display: none; }
  .auth-form-panel { padding: 26px 24px; }
}
