/* ════════════════════════════════════════════
   Font & Reset
   ════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ════════════════════════════════════════════
   Theme tokens
   ════════════════════════════════════════════ */
:root {
  --bg: #070b14;
  --bg2: #0f1626;
  --bg3: #18223a;
  --bg4: #243150;
  --border: #1b2540;
  --border2: #2b3960;
  --text: #eef2f9;
  --text2: #9aa7c2;
  --text3: #64748b;
  --accent: #38bdf8;
  --accent2: #818cf8;
  --accent3: #c084fc;
  --green: #34d399;
  --orange: #fbbf24;
  --red: #f87171;
  --pink: #f472b6;

  --grad: linear-gradient(135deg, #38bdf8, #818cf8 55%, #c084fc);
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  --shadow-glow: 0 8px 40px -10px rgba(56,189,248,.35);
  --glass: rgba(7,11,20,.72);
  --card-bg: linear-gradient(180deg, #0f1626, rgba(15,22,38,.6));
  --code-bg: #060a13;

  /* warna per kategori */
  --cat-ai: #c084fc;
  --cat-termux: #34d399;
  --cat-vps: #38bdf8;
  --cat-web: #22d3ee;
  --cat-bot: #2dd4bf;
  --cat-database: #fbbf24;
  --cat-git: #fb923c;
  --cat-tools: #94a3b8;
}

/* ── Light theme ── */
[data-theme="light"] {
  --bg: #f5f7fb;
  --bg2: #ffffff;
  --bg3: #eef2f8;
  --bg4: #dde4ef;
  --border: #e6eaf2;
  --border2: #d3dbe8;
  --text: #0f1626;
  --text2: #4a5568;
  --text3: #8696ad;
  --shadow: 0 10px 30px -14px rgba(30,50,90,.22);
  --shadow-glow: 0 8px 36px -12px rgba(56,189,248,.4);
  --glass: rgba(255,255,255,.78);
  --card-bg: #ffffff;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(129,140,248,.12), transparent 60%),
    radial-gradient(1000px 500px at -10% 10%, rgba(56,189,248,.10), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}
a { -webkit-tap-highlight-color: transparent; }

/* ════════════════════════════════════════════
   Progress bar
   ════════════════════════════════════════════ */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--grad); z-index: 1100; transition: width .15s ease;
  box-shadow: 0 0 12px rgba(56,189,248,.6);
}

/* ════════════════════════════════════════════
   Top nav (glass)
   ════════════════════════════════════════════ */
.topnav {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topnav .brand {
  font-weight: 800; font-size: 1.08rem; color: var(--text);
  text-decoration: none; display: flex; align-items: center; gap: 9px; letter-spacing: -.02em;
}
.topnav .brand .logo-badge {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); color: #06101f; box-shadow: var(--shadow-glow);
}
.topnav .brand .logo-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-actions { display: flex; gap: 8px; align-items: center; }

/* ════════════════════════════════════════════
   Buttons
   ════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 18px; border-radius: 12px; font-size: .9rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  font-family: inherit; transition: transform .15s ease, opacity .2s, background .2s, box-shadow .2s;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--grad); color: #06101f; box-shadow: var(--shadow-glow); }
.btn-primary:hover { opacity: .92; }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--border2); }
.btn-ghost:hover { background: rgba(255,255,255,.09); }
.btn-danger { background: rgba(248,113,113,.14); color: #fca5a5; border-color: rgba(248,113,113,.35); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: .82rem; border-radius: 10px; }

/* ════════════════════════════════════════════
   Container
   ════════════════════════════════════════════ */
.container { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.section-pad { padding: 22px 0 90px; }

/* ════════════════════════════════════════════
   Hero
   ════════════════════════════════════════════ */
.hero {
  position: relative; overflow: hidden;
  padding: 46px 20px 34px; text-align: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 280px at 50% -30%, rgba(192,132,252,.20), transparent 70%),
    radial-gradient(500px 240px at 20% 120%, rgba(56,189,248,.16), transparent 70%);
}
.hero .pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem; font-weight: 600; color: var(--text2);
  background: rgba(255,255,255,.05); border: 1px solid var(--border2);
  padding: 6px 14px; border-radius: 20px; margin-bottom: 16px;
}
.hero .pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.hero h1 {
  font-size: 2.1rem; font-weight: 800; line-height: 1.12; letter-spacing: -.03em;
  margin-bottom: 12px;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--text2); font-size: 1rem; max-width: 560px; margin: 0 auto; }
.hero .stat-row { display: flex; gap: 22px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.hero .stat { text-align: center; }
.hero .stat b { display: block; font-size: 1.4rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .stat span { font-size: .76rem; color: var(--text3); }

/* ════════════════════════════════════════════
   Search
   ════════════════════════════════════════════ */
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 14px; padding: 6px 6px 6px 16px; margin: 6px 0 18px;
  box-shadow: var(--shadow); transition: border .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.search-box .ico { color: var(--text3); font-size: 1rem; }
.search-box input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: .95rem; font-family: inherit; padding: 8px 0;
}
.search-box input::placeholder { color: var(--text3); }

/* ════════════════════════════════════════════
   Filter chips (horizontal scroll on mobile)
   ════════════════════════════════════════════ */
.filters {
  display: flex; gap: 9px; margin-bottom: 22px;
  overflow-x: auto; padding-bottom: 4px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  padding: 9px 16px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: var(--bg2); color: var(--text2); border: 1px solid var(--border2);
  text-decoration: none; transition: all .18s ease; white-space: nowrap;
}
.filter-chip:hover { background: var(--bg3); color: var(--text); }
.filter-chip.active { background: var(--grad); color: #06101f; border-color: transparent; box-shadow: var(--shadow-glow); }

/* section label */
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.list-head h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; }
.list-head .count { font-size: .82rem; color: var(--text3); }

/* ════════════════════════════════════════════
   Tutorial cards
   ════════════════════════════════════════════ */
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  --c: var(--accent);
  position: relative; display: flex; flex-direction: column;
  text-decoration: none; color: inherit; overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; transition: transform .18s ease, border-color .2s, box-shadow .2s;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--c); opacity: .9;
}
.card:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 16px 40px -16px color-mix(in srgb, var(--c) 50%, transparent); }
.card .card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card .card-icon {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  color: var(--c);
  font-size: 1.5rem; background: color-mix(in srgb, var(--c) 16%, var(--bg3));
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.card .badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
}
.card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.02em; line-height: 1.3; }
.card p { color: var(--text2); font-size: .87rem; margin-bottom: 16px; flex: 1; }
.card .card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--text3); border-top: 1px solid var(--border); padding-top: 13px;
}
.card .card-meta .go { color: var(--c); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* kategori warna */
.cat-AI { --c: var(--cat-ai); }
.cat-Termux { --c: var(--cat-termux); }
.cat-VPS { --c: var(--cat-vps); }
.cat-Web { --c: var(--cat-web); }
.cat-Bot { --c: var(--cat-bot); }
.cat-Database { --c: var(--cat-database); }
.cat-Git { --c: var(--cat-git); }
.cat-Tools { --c: var(--cat-tools); }

/* ════════════════════════════════════════════
   Empty state
   ════════════════════════════════════════════ */
.empty { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty .ico { font-size: 3rem; margin-bottom: 12px; }

/* ════════════════════════════════════════════
   Detail header
   ════════════════════════════════════════════ */
.back-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--text2);
  text-decoration: none; font-size: .9rem; margin: 18px 0 4px; font-weight: 600;
}
.back-link:hover { color: var(--accent); }
.detail-head { padding: 22px 0 8px; }
.detail-head .badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .76rem; font-weight: 700; padding: 5px 13px; border-radius: 999px;
  background: rgba(255,255,255,.05); color: var(--accent); border: 1px solid var(--border2); margin-bottom: 14px;
}
.detail-head h1 { font-size: 1.85rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -.03em; line-height: 1.18; }
.detail-head p { color: var(--text2); }
.detail-head .specs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.detail-head .specs span {
  background: var(--bg3); padding: 6px 13px; border-radius: 999px;
  font-size: .78rem; color: var(--text2); border: 1px solid var(--border2);
}

/* ════════════════════════════════════════════
   TOC
   ════════════════════════════════════════════ */
.toc { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin: 26px 0; }
.toc h2 { font-size: .95rem; color: var(--text2); margin-bottom: 14px; }
.toc ol { list-style: none; counter-reset: item; }
.toc ol li { counter-increment: item; margin: 4px 0; }
.toc ol li a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px; color: var(--text2);
  text-decoration: none; font-size: .89rem; transition: all .18s;
}
.toc ol li a:hover { background: var(--bg3); color: var(--text); transform: translateX(4px); }
.toc ol li a::before {
  content: counter(item); width: 27px; height: 27px; border-radius: 8px;
  background: var(--bg3); color: var(--accent);
  display: grid; place-items: center; font-size: .76rem; font-weight: 700; flex-shrink: 0;
}

/* ════════════════════════════════════════════
   Steps
   ════════════════════════════════════════════ */
.step { margin: 16px 0; }
.step-header {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; background: var(--bg2); border-radius: 14px;
  border: 1px solid var(--border); cursor: pointer; user-select: none;
  transition: background .18s, border-color .18s;
}
.step-header:hover { background: var(--bg3); }
.step.open .step-header { border-color: var(--border2); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.step-number {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: var(--grad); color: #06101f; display: grid; place-items: center; font-weight: 800; font-size: 1rem;
}
.step-title { flex: 1; font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; }
.step-icon { color: var(--text3); transition: transform .25s; }
.step.open .step-icon { transform: rotate(180deg); }
.step-body { display: none; padding: 18px; background: var(--bg2); border: 1px solid var(--border2); border-top: none; border-radius: 0 0 14px 14px; }
.step.open .step-body { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.step-body h3 { font-size: 1rem; color: var(--accent); margin: 18px 0 10px; font-weight: 700; }
.step-body h3:first-child { margin-top: 0; }
.step-body p { color: var(--text2); margin: 10px 0; }
.step-body code { background: var(--bg3); padding: 2px 7px; border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: .85em; color: var(--pink); }

/* ════════════════════════════════════════════
   Code block
   ════════════════════════════════════════════ */
.code-block { background: var(--code-bg); border: 1px solid var(--border2); border-radius: 12px; overflow: hidden; margin: 14px 0; }
.code-header { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: #0d1422; border-bottom: 1px solid #1c2740; }
.code-header .lang { font-size: .72rem; font-weight: 600; color: #8aa0c4; text-transform: uppercase; letter-spacing: .6px; }
.copy-btn { background: #243150; color: #eef2f9; border: none; padding: 5px 13px; border-radius: 8px; font-size: .76rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .18s; display: inline-flex; align-items: center; gap: 5px; }
.copy-btn:hover { background: var(--accent); color: #06101f; }
.copy-btn.copied { background: var(--green); color: #06101f; }
.code-block pre { padding: 15px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: .84rem; line-height: 1.65; color: #cdd9ee; white-space: pre; }

/* ════════════════════════════════════════════
   Callouts
   ════════════════════════════════════════════ */
.tip, .warning, .info-box { border-radius: 12px; padding: 14px 16px; margin: 14px 0; font-size: .9rem; }
.tip { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); color: #a7f3d0; }
.tip::before { content: "💡 "; }
.warning { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3); color: #fde68a; }
.warning::before { content: "⚠️ "; }
.info-box { background: var(--bg2); border: 1px solid var(--border2); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-grid .label { font-size: .72rem; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; }
.info-grid .value { font-weight: 700; color: var(--text); }

/* ════════════════════════════════════════════
   Bottom navigation (mobile app style)
   ════════════════════════════════════════════ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  display: none; align-items: center; justify-content: space-around;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid var(--border);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text3); text-decoration: none; font-size: .68rem; font-weight: 600;
  padding: 6px 14px; border-radius: 12px; transition: color .18s, background .18s; min-width: 60px;
}
.bottom-nav a .bi { font-size: 1.25rem; line-height: 1; }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a:active { background: rgba(255,255,255,.06); }

@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  body { padding-bottom: 76px; }
  .hero h1 { font-size: 1.8rem; }
}

/* ════════════════════════════════════════════
   Footer
   ════════════════════════════════════════════ */
.footer { text-align: center; padding: 28px 20px; color: var(--text3); font-size: .82rem; border-top: 1px solid var(--border); }
.footer a { color: var(--text2); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ════════════════════════════════════════════
   Admin
   ════════════════════════════════════════════ */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--border); margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.admin-bar h1 { font-size: 1.3rem; letter-spacing: -.02em; }

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: top; }
table.admin-table th { color: var(--text3); font-size: .74rem; text-transform: uppercase; letter-spacing: .5px; }
table.admin-table tr:hover td { background: var(--bg2); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--text2); margin-bottom: 7px; }
.form-control { width: 100%; background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px; padding: 12px 14px; color: var(--text); font-family: inherit; font-size: .92rem; outline: none; transition: border .2s, box-shadow .2s; }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
textarea.form-control { resize: vertical; min-height: 130px; font-family: 'JetBrains Mono', monospace; font-size: .85rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.card-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card-panel h2 { font-size: 1.05rem; margin-bottom: 16px; letter-spacing: -.02em; }

.login-wrap { min-height: 78vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 390px; }

.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: .9rem; }
.alert-error { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); color: #fca5a5; }
.alert-success { background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3); color: #a7f3d0; }

.step-edit { background: var(--bg); border: 1px solid var(--border2); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.step-edit .step-edit-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.step-edit .pos { width: 30px; height: 30px; border-radius: 9px; background: var(--bg3); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar button { background: var(--bg3); color: var(--text2); border: 1px solid var(--border2); border-radius: 8px; padding: 5px 11px; font-size: .76rem; cursor: pointer; font-family: inherit; transition: all .15s; }
.toolbar button:hover { background: var(--bg4); color: var(--text); }
.muted { color: var(--text3); font-size: .85rem; }


/* ════════════════════════════════════════════
   SVG icons
   ════════════════════════════════════════════ */
.icn { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.btn .icn { width: 17px; height: 17px; }
.badge .icn { width: 13px; height: 13px; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; }
.filter-chip .icn { width: 15px; height: 15px; }
.card .badge { gap: 5px; }
.card-meta .icn { width: 14px; height: 14px; }
.list-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.detail-head .badge { gap: 6px; }
.search-box .ico .icn { width: 18px; height: 18px; color: var(--text3); }

/* Theme toggle */
.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid var(--border2);
  color: var(--text); cursor: pointer; transition: background .2s, transform .15s;
}
.theme-toggle:hover { background: rgba(255,255,255,.09); }
.theme-toggle:active { transform: scale(.92); }
.theme-toggle .icn { width: 19px; height: 19px; }
.theme-toggle .icn-sun { display: none; }
.theme-toggle .icn-moon { display: block; }
[data-theme="light"] .theme-toggle .icn-sun { display: block; }
[data-theme="light"] .theme-toggle .icn-moon { display: none; }

/* Step chevron as SVG */
.step-icon .icn { width: 20px; height: 20px; }

/* ════════════════════════════════════════════
   Callouts with SVG markers
   ════════════════════════════════════════════ */
.tip, .warning { position: relative; padding-left: 44px; }
.tip::before, .warning::before {
  content: ''; position: absolute; left: 15px; top: 15px;
  width: 18px; height: 18px; background-repeat: no-repeat; background-size: contain;
}
.tip::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14'/%3E%3C/svg%3E");
}
.warning::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23fbbf24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
}

/* ════════════════════════════════════════════
   Page transitions & entrance animations
   ════════════════════════════════════════════ */
@view-transition { navigation: auto; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.hero { animation: rise .5s ease both; }
.search-box { animation: rise .5s ease .04s both; }
.filters { animation: rise .5s ease .08s both; }
.list-head { animation: rise .5s ease .12s both; }
.cards .card { animation: rise .5s ease both; }
.cards .card:nth-child(1) { animation-delay: .14s; }
.cards .card:nth-child(2) { animation-delay: .2s; }
.cards .card:nth-child(3) { animation-delay: .26s; }
.cards .card:nth-child(4) { animation-delay: .32s; }
.cards .card:nth-child(5) { animation-delay: .38s; }
.cards .card:nth-child(6) { animation-delay: .44s; }
.cards .card:nth-child(n+7) { animation-delay: .5s; }
.detail-head { animation: rise .5s ease both; }
.toc { animation: rise .5s ease .08s both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* Icon alignment in headings */
.toc h2 { display: inline-flex; align-items: center; gap: 8px; }
.detail-head h1 { display: flex; align-items: center; gap: 10px; }
.detail-head h1 .title-ic { color: var(--accent); display: inline-grid; place-items: center; }
.back-link { align-items: center; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.bottom-nav a .bi { display: inline-grid; place-items: center; }


/* Generic badge (mis. tabel admin) */
.admin-table .badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--bg3); color: var(--accent); border: 1px solid var(--border2);
}
.admin-table .badge .icn { width: 13px; height: 13px; }
.admin-table strong { display: inline-flex; align-items: center; gap: 7px; }
.admin-table strong .icn { color: var(--accent); }


/* Heading icon alignment (admin) */
.admin-bar h1 { display: inline-flex; align-items: center; gap: 9px; }
.card-panel h2 { display: inline-flex; align-items: center; gap: 8px; }
.card-panel h2 .icn, .admin-bar h1 .icn { color: var(--accent); }
.row-actions .btn { align-items: center; }


/* ════════════════════════════════════════════
   Syntax highlighting tokens (selalu di atas bg code gelap)
   ════════════════════════════════════════════ */
.code-block pre .tok-comment { color: #5b6b88; font-style: italic; }
.code-block pre .tok-string  { color: #9ece6a; }
.code-block pre .tok-keyword { color: #7aa2f7; font-weight: 500; }
.code-block pre .tok-cmd     { color: #bb9af7; font-weight: 500; }
.code-block pre .tok-number  { color: #ff9e64; }
.code-block pre .tok-var     { color: #e0af68; }
.code-block pre .tok-flag    { color: #7dcfff; }

/* ════════════════════════════════════════════
   Share button & detail action row
   ════════════════════════════════════════════ */
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn-share { background: var(--bg2); color: var(--text); border: 1px solid var(--border2); }
.btn-share:hover { background: var(--bg3); border-color: var(--accent); }

/* ════════════════════════════════════════════
   Toast
   ════════════════════════════════════════════ */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: var(--bg3); color: var(--text); border: 1px solid var(--border2);
  padding: 12px 20px; border-radius: 12px; font-size: .9rem; font-weight: 600;
  box-shadow: var(--shadow); z-index: 2000; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 769px) { .toast { bottom: 30px; } }
