/* =====================================================================
 *  style.css — Tema terinspirasi claude.ai (mode terang & gelap)
 * ===================================================================== */

/* ---------- Variabel Tema ---------- */
:root {
  --bg:           #faf9f5;
  --bg-elev:      #ffffff;
  --surface:      #f3f1ea;
  --surface-2:    #eeece3;
  --text:         #1f1e1d;
  --text-soft:    #565049;
  --muted:        #8a877e;
  --border:       #e7e3d8;
  --border-soft:  #efece3;
  --accent:       #c96442;
  --accent-hover: #b5532f;
  --accent-soft:  rgba(201, 100, 66, 0.10);
  --code-bg:      #f4f2ec;
  --code-border:  #e7e3d8;
  --shadow:       0 1px 2px rgba(40, 35, 25, 0.05), 0 4px 16px rgba(40, 35, 25, 0.05);
  --shadow-lg:    0 8px 40px rgba(40, 35, 25, 0.10);
  --radius:       14px;
  --radius-sm:    9px;
  --maxw:         720px;
  --maxw-wide:    1080px;
  --font-ui:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:   'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

html[data-theme="dark"] {
  --bg:           #262624;
  --bg-elev:      #30302e;
  --surface:      #2c2c29;
  --surface-2:    #34332f;
  --text:         #f2f0e9;
  --text-soft:    #cbc8bf;
  --muted:        #918e85;
  --border:       #3d3c38;
  --border-soft:  #343330;
  --accent:       #d97757;
  --accent-hover: #e2906f;
  --accent-soft:  rgba(217, 119, 87, 0.14);
  --code-bg:      #1f1e1c;
  --code-border:  #3d3c38;
  --shadow:       0 1px 2px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.25);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.4);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.ic { vertical-align: middle; flex-shrink: 0; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }

/* ---------- Header / Navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex; align-items: center; gap: 18px;
  height: 62px; max-width: var(--maxw-wide); margin: 0 auto; padding: 0 20px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1rem;
  font-family: var(--font-serif);
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-link {
  padding: 7px 13px; border-radius: 8px; color: var(--text-soft);
  font-size: .92rem; font-weight: 500; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid transparent; background: transparent;
  color: var(--text-soft); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }

.menu-toggle { display: none; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text); font-weight: 500; font-size: .92rem;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-danger { color: #c0392b; border-color: transparent; background: transparent; }
.btn-danger:hover { background: rgba(192,57,43,.1); }
.btn-sm { padding: 6px 11px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Hero (beranda) ---------- */
.hero { padding: 56px 0 28px; text-align: center; }
.hero h1 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.12; letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.hero p { color: var(--text-soft); font-size: 1.1rem; max-width: 540px; margin: 0 auto; }

/* ---------- Daftar Post / Kartu ---------- */
.post-grid { display: grid; gap: 14px; }
.post-card {
  display: block; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--border-soft); background: var(--bg-elev);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.post-card:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shadow); }
.post-card .cat {
  display: inline-block; font-size: .76rem; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 9px;
}
.post-card h2 {
  font-family: var(--font-serif); font-weight: 600; font-size: 1.32rem;
  line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 8px;
}
.post-card .excerpt { color: var(--text-soft); font-size: .95rem; margin-bottom: 14px; }
.post-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .82rem; }
.post-meta span { display: inline-flex; align-items: center; gap: 5px; }

.post-card-cover { aspect-ratio: 16/8; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px; background: var(--surface); }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Artikel ---------- */
.article-head { text-align: center; padding: 44px 0 8px; }
.article-head .cat {
  font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent);
}
.article-head h1 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem); line-height: 1.15; letter-spacing: -0.02em;
  margin: 14px 0 18px;
}
.article-cover { margin: 24px auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* Prose: badan tulisan */
.prose {
  font-family: var(--font-serif);
  font-size: 1.16rem; line-height: 1.75; color: var(--text);
}
.prose > * + * { margin-top: 1.35em; }
.prose h2 { font-size: 1.6rem; font-weight: 600; line-height: 1.25; margin-top: 2em; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.3rem; font-weight: 600; margin-top: 1.7em; }
.prose h4 { font-size: 1.1rem; font-weight: 700; margin-top: 1.5em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--accent-hover); }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-top: .4em; }
.prose img { border-radius: var(--radius-sm); margin: 1.6em auto; box-shadow: var(--shadow); }
.prose figure { margin: 1.8em auto; text-align: center; }
.prose figcaption { font-family: var(--font-ui); font-size: .85rem; color: var(--muted); margin-top: .6em; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }

/* Kutipan */
.prose blockquote {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 20px;
  color: var(--text-soft); font-style: italic;
}

/* Kode inline */
.prose :not(pre) > code {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--code-bg); border: 1px solid var(--code-border);
  padding: .12em .4em; border-radius: 6px; font-style: normal;
}

/* Blok kode */
.prose pre {
  background: var(--code-bg); border: 1px solid var(--code-border);
  border-radius: var(--radius-sm); padding: 0; overflow: hidden;
  font-family: var(--font-mono); position: relative;
}
.prose pre code {
  display: block; padding: 18px 18px; overflow-x: auto;
  font-family: var(--font-mono); font-size: .88rem; line-height: 1.6;
  background: transparent !important;
}
.code-wrap { position: relative; }
.code-copy {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  font-family: var(--font-ui); font-size: .72rem; font-weight: 500;
  padding: 4px 9px; border-radius: 7px; border: 1px solid var(--code-border);
  background: var(--bg-elev); color: var(--text-soft); opacity: 0; transition: opacity .15s, background .15s;
}
.code-wrap:hover .code-copy { opacity: 1; }
.code-copy:hover { background: var(--surface); color: var(--text); }
.code-lang {
  position: absolute; top: 9px; left: 14px; z-index: 1;
  font-family: var(--font-ui); font-size: .68rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- Badge / Tag ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag-chip {
  font-family: var(--font-ui); font-size: .82rem; padding: 5px 12px; border-radius: 999px;
  background: var(--surface); color: var(--text-soft); border: 1px solid var(--border-soft);
  transition: background .15s, color .15s;
}
.tag-chip:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 44px; }
.page-btn { padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); font-size: .9rem; }
.page-btn:hover { background: var(--surface); }
.page-info { color: var(--muted); font-size: .88rem; }

/* ---------- Komentar ---------- */
.comments { margin-top: 56px; }
.comments h3 { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 20px; }
.comment {
  padding: 16px 0; border-bottom: 1px solid var(--border-soft);
}
.comment-name { font-weight: 600; font-size: .92rem; }
.comment-date { color: var(--muted); font-size: .8rem; }
.comment-body { color: var(--text-soft); margin-top: 6px; font-size: .96rem; }

/* ---------- Form ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 7px; color: var(--text-soft); }
.input, .textarea, .select {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  font-family: var(--font-ui); font-size: .95rem; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 120px; }
.field-hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }

/* ---------- Flash ---------- */
.flash {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .92rem;
  border: 1px solid transparent;
}
.flash-success { background: rgba(46,160,67,.10); border-color: rgba(46,160,67,.3); color: #2ea043; }
.flash-error   { background: rgba(192,57,43,.10); border-color: rgba(192,57,43,.3); color: #c0392b; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft); margin-top: 64px; padding: 36px 0;
  color: var(--muted); font-size: .88rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: var(--text); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ic { margin: 0 auto 14px; opacity: .5; }

/* =====================================================================
 *  ADMIN
 * ===================================================================== */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; background: var(--bg-elev);
  border-right: 1px solid var(--border-soft); padding: 18px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { padding: 6px 8px 18px; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  color: var(--text-soft); font-size: .92rem; font-weight: 500; margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.side-link:hover { background: var(--surface); color: var(--text); }
.side-link.active { background: var(--accent-soft); color: var(--accent); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-soft); }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 26px;
  border-bottom: 1px solid var(--border-soft); position: sticky; top: 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); z-index: 20;
}
.admin-topbar h1 { font-size: 1.15rem; font-weight: 600; }
.admin-content { padding: 26px; max-width: 1000px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card { padding: 20px; border-radius: var(--radius); border: 1px solid var(--border-soft); background: var(--bg-elev); }
.stat-card .num { font-size: 2rem; font-weight: 700; font-family: var(--font-serif); }
.stat-card .lbl { color: var(--muted); font-size: .85rem; margin-top: 4px; }

.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; padding: 11px 12px; color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--border); }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tr:hover td { background: var(--surface); }
.table .title-cell { font-weight: 600; }
.row-actions { display: flex; gap: 4px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.badge-published { background: rgba(46,160,67,.12); color: #2ea043; }
.badge-draft { background: var(--surface-2); color: var(--muted); }
.badge-pending { background: rgba(217,119,87,.14); color: var(--accent); }
.badge-approved { background: rgba(46,160,67,.12); color: #2ea043; }

.card { background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 22px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }

/* ---------- Editor ---------- */
.editor-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 8px; background: var(--surface);
  border: 1px solid var(--border); border-bottom: none; border-radius: 10px 10px 0 0;
}
.etool {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px;
  background: transparent; border: none; color: var(--text-soft); font-size: .9rem; font-weight: 600;
}
.etool:hover { background: var(--bg-elev); color: var(--text); }
.etool-sep { width: 1px; background: var(--border); margin: 4px 4px; }
#editor {
  border-radius: 0 0 10px 10px; min-height: 380px; font-family: var(--font-mono);
  font-size: .92rem; line-height: 1.7; border-top-left-radius: 0; border-top-right-radius: 0;
}
.editor-preview {
  border: 1px solid var(--border); border-radius: 10px; padding: 20px; background: var(--bg-elev);
  max-height: 480px; overflow-y: auto;
}
.editor-tabs { display: flex; gap: 4px; margin-bottom: 0; }
.editor-tab { padding: 8px 16px; font-size: .86rem; font-weight: 500; color: var(--muted); border-radius: 8px 8px 0 0; }
.editor-tab.active { color: var(--accent); background: var(--surface); }

/* ---------- Modal (media/gambar) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,18,14,.5); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-elev); border-radius: var(--radius); border: 1px solid var(--border);
  width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-soft); }
.modal-head h3 { font-size: 1.1rem; font-weight: 600; }
.modal-body { padding: 22px; }
.size-options { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.size-opt { padding: 7px 14px; border: 1px solid var(--border); border-radius: 9px; font-size: .85rem; background: var(--bg-elev); }
.size-opt.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 10px; }
.media-item { aspect-ratio: 1; border-radius: 9px; overflow: hidden; border: 2px solid transparent; cursor: pointer; }
.media-item img { width: 100%; height: 100%; object-fit: cover; }
.media-item.sel { border-color: var(--accent); }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { justify-content: center; margin-bottom: 24px; font-size: 1.3rem; }

/* ---------- Responsif ---------- */
@media (max-width: 860px) {
  .menu-toggle { display: grid; }
  .nav-links {
    position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg-elev); border-bottom: 1px solid var(--border); padding: 8px; gap: 2px;
    display: none; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 11px 14px; }
  .sidebar { position: fixed; left: -260px; z-index: 80; transition: left .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .admin-content { padding: 18px; }
  .prose { font-size: 1.08rem; }
}
@media (max-width: 520px) {
  .hero { padding: 36px 0 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Aksesibilitas ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ===== Tambahan: pustaka media, pemilih, moderasi komentar ===== */

/* Pemilih media di modal editor */
.media-pick { aspect-ratio: 1; border-radius: 9px; overflow: hidden; border: 2px solid transparent; cursor: pointer; transition: border-color .15s; }
.media-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-pick:hover { border-color: var(--accent); }

/* Kartu pustaka media (halaman Media) */
.media-grid.lib { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 14px; }
.media-grid.lib .media-item { aspect-ratio: auto; cursor: default; border: 1px solid var(--border-soft); border-radius: 11px; overflow: hidden; background: var(--surface-2); }
.media-grid.lib .media-item img { aspect-ratio: 4/3; }
.media-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 10px; font-size: .76rem; color: var(--muted); }
.media-actions { display: flex; gap: 2px; }
.media-actions .copied { color: #2ea043; }

/* Moderasi komentar */
.comment-mod { padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.comment-mod:last-child { border-bottom: none; }
.comment-mod-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.comment-mod-body { color: var(--text); line-height: 1.6; margin-bottom: 10px; white-space: pre-wrap; }
.comment-mod-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge-spam { background: rgba(200,60,40,.13); color: #d2503a; }

/* Figure & caption di artikel */
.prose figure { margin: 24px auto; text-align: center; }
.prose figure img { border-radius: 10px; height: auto; }
.prose figcaption { margin-top: 8px; font-size: .88rem; color: var(--muted); font-style: italic; }

/* ===== Responsif tambahan ===== */
@media (max-width: 860px) {
  .split-cols { grid-template-columns: 1fr !important; }
}

/* ============================================================
   UPGRADE: editor dua-mode, pengaturan tulisan, hero unggulan
   ============================================================ */

/* ---- Layout editor (utama + sidebar) ---- */
.editor-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 20px; align-items: start; }
.editor-main { min-width: 0; }
.editor-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 78px; }
.editor-topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); padding-top: 10px; padding-bottom: 10px; }
.save-hint { font-size: .82rem; color: var(--muted); margin-right: 4px; }
.side-title { font-size: .95rem; font-weight: 600; margin: 0 0 12px; color: var(--text); }

/* ---- Judul & slug ---- */
.title-input { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; border: none; padding: 6px 2px; background: none; }
.title-input:focus { outline: none; box-shadow: none; }
.slug-field { display: flex; align-items: center; gap: 0; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.slug-base { padding: 0 4px 0 12px; font-size: .82rem; color: var(--muted); white-space: nowrap; font-family: var(--font-mono); }
.slug-input { border: none !important; background: none !important; box-shadow: none !important; padding-left: 2px; font-family: var(--font-mono); font-size: .85rem; }

/* ---- Pemilih mode ---- */
.mode-switch { display: flex; align-items: center; gap: 6px; margin: 18px 0 12px; }
.mode-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-soft); font-size: .85rem; font-weight: 500; cursor: pointer; transition: all .15s; }
.mode-btn:hover { border-color: var(--accent); color: var(--text); }
.mode-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mode-btn.active .ic { stroke: #fff; }
.mode-hint { font-size: .8rem; color: var(--accent); margin-left: 4px; }

/* ---- Kontainer TinyMCE ---- */
.tox-tinymce { border-radius: var(--radius-sm) !important; border-color: var(--border) !important; }
#paneHtml { min-height: 400px; }

/* ---- Toggle switch ---- */
.switch-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; font-size: .9rem; color: var(--text); }
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--border); flex: none; transition: background .18s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .18s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Kartu unggulan (beranda) ---- */
.featured-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; margin: 8px 0 28px; border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; background: var(--surface); text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; box-shadow: var(--shadow); }
.featured-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.featured-cover { min-height: 260px; overflow: hidden; }
.featured-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-body { padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.featured-flag { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.featured-flag .ic { stroke: var(--accent); fill: var(--accent-soft); }
.featured-body h2 { font-family: var(--font-serif); font-size: 1.7rem; line-height: 1.2; margin: 8px 0 10px; }
.featured-body .excerpt { color: var(--text-soft); line-height: 1.6; margin-bottom: 14px; }

/* ---- Tabel & elemen kaya dalam artikel (konten HTML/Word) ---- */
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.prose th { background: var(--surface-2); font-weight: 600; }
.prose figure { margin: 24px auto; text-align: center; }
.prose figure img { border-radius: 10px; height: auto; }
.prose figcaption { margin-top: 8px; font-size: .88rem; color: var(--muted); font-style: italic; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.prose u { text-decoration: underline; }

/* ---- Responsif ---- */
@media (max-width: 980px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-side { position: static; flex-direction: column; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-cover { min-height: 200px; max-height: 280px; }
}
@media (max-width: 560px) {
  .title-input { font-size: 1.3rem; }
  .featured-body { padding: 20px; }
  .featured-body h2 { font-size: 1.4rem; }
  .mode-switch { flex-wrap: wrap; }
  .editor-topbar .btn { padding-left: 12px; padding-right: 12px; }
}
