/* =====================================================================
   Blue Mecha · tema mecha navy/oranye (terang) & gunmetal/tembaga (gelap)
   Prinsip: bentuk (chamfer, bracket, seam, rivet) + tipografi teknis.
   Warna flat, tanpa gradient kilau. Kedua palet ada di file ini;
   html[data-mode] memilih salah satunya.
   ===================================================================== */

/* Urutan layer (kontrak v1). CSS project Anda yang tidak ber-layer selalu menang atas semua layer ini. */
@layer th.tokens, th.base, th.components, th.effects, th.pages;

@layer th.tokens {

/* ---------- Palet: LIGHT (Navy & Orange) ---------- */
html[data-mode="light"] {
  color-scheme: light;
  --bg: #eef0f5;
  --surface: #ffffff;
  --surface-2: #f3f4f8;
  --surface-3: #e6e9f0;
  --text: #1a2040;
  --muted: #5d647f;
  --border: #d4d8e3;
  --border-strong: #b9bfd0;
  --primary: #24307a;
  --primary-hover: #1d2766;
  --primary-active: #172055;
  --primary-fg: #ffffff;
  --accent: #f26a1b;
  --accent-hover: #e15f14;
  --accent-fg: #ffffff;
  --steel: #6b7391;
  --steel-strong: #3b4470;
  --rivet: #b9bfd0;
  --hud: #f26a1b;
  --success: #1f8f4e;
  --warning: #a86a00;
  --danger: #c9363b;
  --info: #1868b3;
  --sidebar-bg: #1e2864;
  --sidebar-fg: #c5cbe6;
  --sidebar-hover: #273381;
  --sidebar-active-bg: #2a3789;
  --sidebar-active-fg: #ffffff;
  --sidebar-line: #2f3b8f;
  --topbar-bg: #ffffff;
  --trace: rgba(36, 48, 122, 0.07);
  --trace-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260' fill='none' stroke='%2324307a' stroke-opacity='0.11' stroke-width='1.2'%3E%3Cpath d='M10 40h60l20 20h50M140 60v40l20 20h40M30 200h40l20-20h60v-40M200 220h40M200 220l-20-20v-40M60 120v40l20 20'/%3E%3Ccircle cx='10' cy='40' r='3'/%3E%3Ccircle cx='200' cy='120' r='3'/%3E%3Ccircle cx='30' cy='200' r='3'/%3E%3Ccircle cx='240' cy='220' r='3'/%3E%3Ccircle cx='60' cy='120' r='3'/%3E%3Ccircle cx='150' cy='140' r='3'/%3E%3C/svg%3E");
  /* Mark vektor #th-logo (sprite.js): pelat navy, tepi & pod biru, rivet, helm terang, crest/celah sensor oranye */
  --logo-plate: #24307a; --logo-edge: #6475da; --logo-rivet: #8d99e0; --logo-shell: #ffffff; --logo-accent: #f26a1b;
  --hatch: rgba(26, 32, 64, 0.08);
}

/* ---------- Palet: DARK (Gunmetal & Copper) ---------- */
html[data-mode="dark"] {
  color-scheme: dark;
  --bg: #14171c;
  --surface: #1b1f25;
  --surface-2: #232830;
  --surface-3: #2a3039;
  --text: #e6e9ee;
  --muted: #929aa5;
  --border: #343b45;
  --border-strong: #48515c;
  --primary: #eb6a1e;
  --primary-hover: #f77f33;
  --primary-active: #d65e17;
  --primary-fg: #14171c;
  --accent: #eb6a1e;
  --accent-hover: #f77f33;
  --accent-fg: #14171c;
  --steel: #aeb5bf;
  --steel-strong: #d9dde3;
  --rivet: #48515c;
  --hud: #eb6a1e;
  --success: #3ec27a;
  --warning: #e8b02f;
  --danger: #ef5350;
  --info: #4fa8e8;
  --sidebar-bg: #111418;
  --sidebar-fg: #aeb5bf;
  --sidebar-hover: #1a1e24;
  --sidebar-active-bg: #1f242b;
  --sidebar-active-fg: #ffffff;
  --sidebar-line: #232830;
  --topbar-bg: #1b1f25;
  --trace: rgba(255, 255, 255, 0.05);
  --trace-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260' fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1.2'%3E%3Cpath d='M10 40h60l20 20h50M140 60v40l20 20h40M30 200h40l20-20h60v-40M200 220h40M200 220l-20-20v-40M60 120v40l20 20'/%3E%3Ccircle cx='10' cy='40' r='3'/%3E%3Ccircle cx='200' cy='120' r='3'/%3E%3Ccircle cx='30' cy='200' r='3'/%3E%3Ccircle cx='240' cy='220' r='3'/%3E%3Ccircle cx='60' cy='120' r='3'/%3E%3Ccircle cx='150' cy='140' r='3'/%3E%3C/svg%3E");
  /* Mark #th-logo: pelat tetap navy (identitas "Blue"), helm baja, aksen tembaga */
  --logo-plate: #24307a; --logo-edge: #6475da; --logo-rivet: #8d99e0; --logo-shell: #d9dde3; --logo-accent: #eb6a1e;
  --hatch: rgba(255, 255, 255, 0.07);
}

/* ---------- Token bentuk & tipografi (sama di kedua mode) ---------- */
:root {
  --cut-sm: 6px;
  --cut-md: 7px;
  --cut-lg: 14px;
  --seam: 2px;
  --font-display: "Space Grotesk", "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-base: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", "Consolas", ui-monospace, monospace;
  /* Polygon standar */
  --cp-ctrl: polygon(var(--cut-md) 0, 100% 0, 100% calc(100% - var(--cut-md)), calc(100% - var(--cut-md)) 100%, 0 100%, 0 var(--cut-md));
  --cp-panel: polygon(var(--cut-lg) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-lg));
  --cp-tl: polygon(var(--cut-sm) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut-sm));
  --cp-hex: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  --cp-tab: polygon(0 0, calc(100% - 11px) 0, 100% 100%, 0 100%);
  --cp-badge: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%);
}

/* ---------- Token kontrak v1 (core/contract.json) ---------- */
:root {
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --dur: 120ms;
  --ease: ease;
  --drawer-bp: 760px;
  --overlay: rgba(8, 10, 14, .6);
}
html[data-mode="light"] {
  --primary-ink: var(--primary);
  --accent-fg: #1a2040;
  --accent-ink: #c2410c;
  --focus: var(--accent);
  --control-border: #858ca3;
  --success-ink: #157043;
  --warning-ink: #8f5a00;
  --danger-ink: #b42f35;
  --info-ink: var(--info);
  --success-fg: #ffffff;
  --accent-lg: color-mix(in srgb, var(--accent) 90%, #000); /* aksen untuk teks besar (>= 3:1 di --bg) */
  --sidebar-muted: #939bc5;
  --shadow-1: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 0 rgba(26, 32, 64, .06);
  --shadow-2: 0 18px 40px -18px rgba(26, 32, 64, .45);
}
html[data-mode="dark"] {
  --primary-ink: var(--primary);
  --accent-ink: #f07428;
  --focus: var(--accent);
  --control-border: #68707c;
  --success-ink: var(--success);
  --warning-ink: var(--warning);
  --danger-ink: #f87572;
  --info-ink: var(--info);
  --success-fg: #14171c;
  --accent-lg: var(--accent);
  --sidebar-muted: #80868f;
  --shadow-1: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 0 rgba(0, 0, 0, .4);
  --shadow-2: 0 20px 48px -18px rgba(0, 0, 0, .8);
}

} /* th.tokens */

@layer th.base {

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.45 var(--font-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0.01em; }
a:not(.btn) { color: var(--primary); }
html[data-mode="dark"] a:not(.btn) { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }

/* Scrollbar teknis */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) var(--surface-2); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border: 2px solid var(--surface-2); }

} /* th.base */

@layer th.components {

/* Tautan di dalam komponen: salinan aturan tautan base dengan spesifisitas sama (lihat README → kaskade) */
:where(.nav, .menu, .crumbs2, .launch, .card-head) a:not(.btn), a:where(.tile, .applogo):not(.btn) { color: var(--primary); }
html[data-mode="dark"] :where(.nav, .menu, .crumbs2, .launch, .card-head) a:not(.btn),
html[data-mode="dark"] a:where(.tile, .applogo):not(.btn) { color: var(--accent); }

.display { font-family: var(--font-display); letter-spacing: 0.01em; }
.mono { font-family: var(--font-mono); }
.tech { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; }
a.btn { text-decoration: none; }
svg.i { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* =====================================================================
   PRIMITIF MECHA
   ===================================================================== */

/* Garis diagonal 1px untuk sudut chamfer (border ikut terpotong clip-path) */
.diag::before, .diag::after {
  content: ""; position: absolute; height: 1px; background: var(--edge, var(--border)); pointer-events: none;
}
.diag::before { left: -1px; top: calc(var(--c-a, var(--cut-md)) - 1px); width: calc(var(--c-a, var(--cut-md)) * 1.4142); transform-origin: 0 0; transform: rotate(-45deg); }
.diag::after  { right: -1px; bottom: calc(var(--c-b, var(--cut-md)) - 1px); width: calc(var(--c-b, var(--cut-md)) * 1.4142); transform-origin: 100% 100%; transform: rotate(-45deg); }

/* Rivet heksagon */
.rivet { display: inline-block; width: 8px; height: 8px; background: var(--rivet); clip-path: var(--cp-hex); position: relative; }
.rivet::after { content: ""; position: absolute; inset: 2.5px; background: var(--surface); clip-path: var(--cp-hex); }
.rivets { display: inline-flex; gap: 4px; }

/* Seam line aksen pendek */
.seam { display: inline-block; width: 28px; height: var(--seam); background: var(--accent); vertical-align: middle; }

/* HUD bracket (2 sudut) */
.hud { position: relative; }
.hud::before, .hud::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--hud); pointer-events: none; z-index: 2; }
.hud::before { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.hud::after  { left: 0; bottom: 0; border-right: 0; border-top: 0; }

/* Segitiga aksen (marker) */
.tri { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 7px solid var(--accent); display: inline-block; }

/* LED status */
.led { display: inline-block; width: 8px; height: 8px; clip-path: var(--cp-hex); background: var(--success); box-shadow: 0 0 0 2px color-mix(in srgb, var(--success) 25%, transparent); }
.led.warn { background: var(--warning); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warning) 25%, transparent); }
.led.off { background: var(--border-strong); box-shadow: none; }

/* =====================================================================
   KOMPONEN
   ===================================================================== */

/* ---- Card / panel ---- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  clip-path: var(--cp-panel);
  --c-a: var(--cut-lg); --c-b: var(--cut-sm);
}
.card > .seam-tl { position: absolute; top: 0; left: var(--cut-lg); width: 34px; height: var(--seam); background: var(--accent); }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.card-head h2, .card-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.card-head .tech { color: var(--muted); }
.card-head .sp { flex: 1; }
.card-body { padding: 14px 16px 14px 18px; }
.card.hatch-top::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: repeating-linear-gradient(-45deg, var(--hatch) 0 4px, transparent 4px 8px); }

/* ---- Tombol ---- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 32px; padding: 0 14px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid transparent;
  clip-path: var(--cp-ctrl);
  background: var(--surface-2); color: var(--text);
  transition: background-color .12s ease, transform .08s ease, box-shadow .12s ease;
  user-select: none; white-space: nowrap;
}
.btn::after { /* seam bawah */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--seam); background: var(--btn-seam, transparent);
}
.btn:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-fg); --btn-seam: var(--accent); }
html[data-mode="dark"] .btn-primary { --btn-seam: #ffd2b3; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-active); }
.btn-accent { background: var(--accent); color: var(--accent-fg); --btn-seam: color-mix(in srgb, var(--accent) 55%, #000); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-steel { background: var(--steel-strong); color: var(--surface); --btn-seam: var(--accent); }
.btn-steel:hover { background: color-mix(in srgb, var(--steel-strong) 85%, var(--text)); }
.btn-ghost { background: transparent; border-color: var(--border-strong); --edge: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; --btn-seam: color-mix(in srgb, var(--danger) 55%, #000); }
html[data-mode="dark"] .btn-danger { background: color-mix(in srgb, var(--danger) 85%, #000); }
.btn-sm { min-height: 26px; padding: 0 10px; font-size: 12px; --cut-md: 5px; }
.btn-xs { min-height: 22px; padding: 0 8px; font-size: 11px; --cut-md: 4px; }
.btn-icon { padding: 0; width: 32px; }
.btn-icon.btn-sm { width: 26px; }

/* ---- Input ---- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.input {
  position: relative; width: 100%;
  min-height: 32px; padding: 6px 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-bottom: 2px solid var(--control-border);
  clip-path: var(--cp-tl);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
textarea.input { min-height: 84px; resize: vertical; }
select.input { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%236b7391'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input-wrap { position: relative; }
.input-wrap > .i { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-wrap > .input { padding-left: 30px; }
.input-wrap > kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 10px var(--font-mono); color: var(--muted); border: 1px solid var(--border); padding: 1px 5px; }

/* Checkbox & radio */
.check { appearance: none; width: 16px; height: 16px; border: 1px solid var(--border-strong); background: var(--surface); clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px); cursor: pointer; vertical-align: -3px; margin: 0 6px 0 0; }
.check:checked { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat; border-color: var(--accent); }
.radio { appearance: none; width: 16px; height: 16px; border: 1px solid var(--border-strong); background: var(--surface); clip-path: var(--cp-hex); cursor: pointer; vertical-align: -3px; margin: 0 6px 0 0; }
.radio:checked { background: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); border-color: var(--accent); }

/* Switch */
.switch { position: relative; display: inline-block; width: 38px; height: 20px; background: var(--border-strong); clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px); border: 0; padding: 0; transition: background .12s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--surface); clip-path: polygon(2px 0, 100% 0, 100% calc(100% - 2px), calc(100% - 2px) 100%, 0 100%, 0 2px); transition: transform .12s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

/* ---- Tabs ---- */
.tabs { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--border-strong); padding: 0 6px; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 22px 0 14px; margin-bottom: -1px; background: var(--surface-2); color: var(--muted); border: 0; font-weight: 600; font-size: 12.5px; clip-path: var(--cp-tab); letter-spacing: .02em; }
.tab:hover { color: var(--text); background: var(--surface-3); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: inset 0 var(--seam) 0 var(--accent); }
.tab-mark { position: absolute; bottom: -1px; height: 1px; background: var(--surface); }
.tab .n { font: 10.5px var(--font-mono); padding: 1px 5px; background: var(--surface-3); color: var(--muted); }
.tab[aria-selected="true"] .n { background: var(--accent); color: var(--accent-fg); }
.tab-tri { position: absolute; left: 50%; bottom: -8px; transform: translateX(-70%); display: none; }
.tab[aria-selected="true"] .tab-tri { display: block; }
.tabpanel[hidden] { display: none; }

/* ---- Badge ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 11px; font: 600 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; clip-path: var(--cp-badge); background: var(--surface-3); color: var(--text); white-space: nowrap; }
.badge-success { background: color-mix(in srgb, var(--success) 16%, var(--surface)); color: var(--success-ink); }
.badge-warning { background: color-mix(in srgb, var(--warning) 18%, var(--surface)); color: var(--warning-ink); }
.badge-danger  { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); color: var(--danger-ink); }
.badge-info    { background: color-mix(in srgb, var(--info) 16%, var(--surface)); color: var(--info-ink); }
.badge-accent  { background: var(--accent); color: var(--accent-fg); }
.badge-steel   { background: var(--steel-strong); color: var(--surface); }
.badge-solid-success { background: var(--success-ink); color: var(--success-fg); }

/* ---- Alert ---- */
.alert { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px 10px 14px; background: color-mix(in srgb, var(--tone) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 35%, var(--border)); border-left: 4px solid var(--tone); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.alert .i { color: var(--tone); margin-top: 1px; }
.alert b { display: block; font-size: 13px; }
.alert p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
html[data-mode="dark"] .alert a:not(.btn) { color: var(--accent-ink); }
.alert-success { --tone: var(--success); } .alert-warning { --tone: var(--warning); } .alert-danger { --tone: var(--danger); } .alert-info { --tone: var(--info); }

/* ---- Gauge / progress ---- */
.gauge { position: relative; height: 8px; background: repeating-linear-gradient(90deg, var(--surface-3) 0 6px, transparent 6px 8px); }
.gauge > i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--g, var(--accent)) 0 6px, transparent 6px 8px); }
.gauge.thin { height: 5px; }
.gauge-row { display: grid; grid-template-columns: 56px 1fr 44px; align-items: center; gap: 10px; font-size: 12px; }
.gauge-row .v { text-align: right; font-family: var(--font-mono); color: var(--muted); }
.gauge.indet > i { width: 30%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%);} to { transform: translateX(333%);} }

/* ---- Tabel ---- */
.table-wrap { overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; font-size: 13px; }
.dt th { text-align: left; padding: 8px 12px; background: var(--surface-2); color: var(--muted); font: 600 10.5px/1.2 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; border-bottom: 1px solid var(--border-strong); white-space: nowrap; user-select: none; }
.dt th.sort { color: var(--text); }
.dt th .tri { border-bottom-width: 5px; border-left-width: 3.5px; border-right-width: 3.5px; margin-left: 5px; vertical-align: 1px; }
.dt th .tri.desc { transform: rotate(180deg); }
.dt td { padding: 7px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dt tbody tr { position: relative; }
.dt tbody tr:hover td { background: var(--surface-2); }
.dt tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.dt tbody tr.sel td { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.dt td.num { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.dt .who { display: flex; align-items: center; gap: 9px; }
.av { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; clip-path: var(--cp-hex); background: var(--steel-strong); color: var(--surface); font: 700 10px var(--font-mono); flex-shrink: 0; }
.av.o { background: var(--accent); color: var(--accent-fg); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--border); }
.toolbar .sp { flex: 1; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; font-size: 12.5px; color: var(--muted); }
.pager .sp { flex: 1; }
.pages { display: inline-flex; gap: 3px; }
.pages .btn { min-width: 28px; }
.pages .btn[aria-current] { background: var(--steel-strong); color: var(--surface); }

/* ---- Modal & toast ---- */
.overlay { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 20px; background: var(--overlay); }
.overlay[data-open] { display: flex; }
.modal { width: 100%; max-width: 520px; }
.toasts { position: fixed; top: 16px; right: 16px; z-index: 70; display: flex; flex-direction: column; gap: 8px; width: 340px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border-strong); border-left: 4px solid var(--tone, var(--accent)); clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); font-size: 13px; animation: toast-in .18s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px);} }
.toast .x { margin-left: auto; }

/* ---- Skeleton / empty ---- */
.skel { height: 12px; background: var(--surface-3); position: relative; overflow: hidden; animation: pulse 1.4s ease-in-out infinite; background-image: repeating-linear-gradient(-45deg, var(--hatch) 0 3px, transparent 3px 8px); }
@keyframes pulse { 50% { opacity: .5; } }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px; text-align: center; color: var(--muted); }
.empty .hex { width: 52px; height: 52px; clip-path: var(--cp-hex); background: var(--surface-3); display: grid; place-items: center; color: var(--steel); }
.empty .hex svg { width: 22px; height: 22px; }

/* Tooltip statis */
.tip { position: relative; display: inline-block; }
.tip > span { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); background: var(--steel-strong); color: var(--surface); font: 11px var(--font-mono); padding: 4px 8px; white-space: nowrap; clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
.tip > span::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--steel-strong); }


/* =====================================================================
   LAYOUT
   ===================================================================== */
.app { display: flex; height: 100%; }

/* Sidebar */
.sidebar { position: relative; width: 236px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--sidebar-bg); color: var(--sidebar-fg); border-right: 1px solid var(--sidebar-line); transition: width .18s ease; overflow: hidden; }
.sidebar::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 3px; background: repeating-linear-gradient(180deg, var(--sidebar-line) 0 8px, transparent 8px 14px); }
.brand { position: relative; height: 62px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 10px; border-bottom: 1px solid var(--sidebar-line); overflow: hidden; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 8px 10px 8px; }
.grp { margin: 10px 4px 4px 8px; display: flex; align-items: center; gap: 8px; font: 600 9.5px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--sidebar-muted); }
.grp::before { content: "//"; opacity: .8; }
.grp::after { content: ""; flex: 1; height: 1px; background: var(--sidebar-line); opacity: .55; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px 0 12px; color: inherit; text-decoration: none; font-size: 13px; font-weight: 500; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%); }
.nav a:hover { background: var(--sidebar-hover); color: #fff; }
.nav a .n { margin-left: auto; font: 600 10px var(--font-mono); padding: 1px 6px; background: var(--accent); color: var(--accent-fg); clip-path: var(--cp-badge); padding: 2px 10px; }
.nav a.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-fg); box-shadow: inset 3px 0 0 var(--accent); }
.nav a.active::after { content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-right: 7px solid var(--accent); border-left: 0; }
.nav a .chev { margin-left: auto; opacity: .5; }
.nav .sub { margin-left: 22px; border-left: 1px solid var(--sidebar-line); padding-left: 2px; }
.nav .sub a { height: 30px; font-size: 12.5px; }
.sidebar-foot { padding: 10px 14px; border-top: 1px solid var(--sidebar-line); display: flex; align-items: center; gap: 8px; font: 10px var(--font-mono); letter-spacing: .08em; opacity: .7; }
.sidebar-foot .sp { flex: 1; }
.app.collapsed .sidebar { width: 58px; }
.app.collapsed .brand .applogo .name { display: none; }
.app.collapsed .grp, .app.collapsed .nav a span, .app.collapsed .nav a .n, .app.collapsed .nav a .chev, .app.collapsed .sidebar-foot span { display: none; }
/* ?full → layout mengalir (untuk screenshot halaman penuh) */
html.full, html.full body, html.full .app { height: auto; }
html.full .content { overflow: visible; }
html.full .sidebar { position: sticky; top: 0; height: 100vh; }
.app.collapsed .nav a { justify-content: center; padding: 0; }
.app.collapsed .nav .sub { margin-left: 0; border: 0; padding: 0; }

/* Kolom kanan */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: relative; height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--topbar-bg); border-bottom: 1px solid var(--border-strong); }
.topbar::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 140px; height: var(--seam); background: var(--accent); }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.crumbs .cur { color: var(--text); }
.topbar .sp { flex: 1; }
.status { display: flex; align-items: center; gap: 14px; font: 10.5px var(--font-mono); letter-spacing: .08em; color: var(--muted); }
.status span { display: inline-flex; align-items: center; gap: 6px; }
.user { display: inline-flex; align-items: center; gap: 9px; padding: 3px 10px 3px 4px; border: 1px solid var(--border-strong); clip-path: var(--cp-ctrl); background: var(--surface); }
.user .av { width: 28px; height: 28px; }
.user b { font-size: 12.5px; display: block; line-height: 1.1; }
.user small { font: 10px var(--font-mono); color: var(--muted); letter-spacing: .06em; }

.content { flex: 1; overflow-y: auto; background-color: var(--bg); background-image: var(--trace-img); }
.page { padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 2px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -0.005em; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.page-head .sp { flex: 1; }
.page-head .actions { display: flex; gap: 8px; }
.sec { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.sec h2 { margin: 0; font-size: 15px; }
.sec .tech { color: var(--muted); }
.sec::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }

.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
@media (max-width: 760px) { .sidebar { display: none; } .g4, .g2 { grid-template-columns: 1fr; } .status { display: none; } }

/* KPI */
.kpi .card-body { display: flex; gap: 12px; align-items: flex-start; }
.kpi .ic { width: 38px; height: 38px; clip-path: var(--cp-hex); background: var(--surface-3); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
html[data-mode="dark"] .kpi .ic { color: var(--accent); }
.kpi .lbl { font: 600 10.5px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi .val { font: 700 26px/1.1 var(--font-display); margin-top: 3px; letter-spacing: -0.01em; }
.kpi .val small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.kpi .foot { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.kpi .gauge { margin-top: 10px; }

/* Quick tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); background: var(--surface); clip-path: var(--cp-ctrl); --edge: var(--border); text-decoration: none; color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile:hover { border-color: var(--accent); --edge: var(--accent); background: var(--surface-2); }
.tile .ic { width: 28px; height: 28px; clip-path: var(--cp-hex); background: var(--surface-3); color: var(--primary); display: grid; place-items: center; }
html[data-mode="dark"] .tile .ic { color: var(--accent); }
.tile .k { margin-left: auto; font: 10px var(--font-mono); color: var(--muted); letter-spacing: .06em; }

/* Activity */
.act { list-style: none; margin: 0; padding: 0; }
.act li { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border); font-size: 12.5px; }
.act li:first-child { border-top: 0; }
.act code { font: 11px var(--font-mono); background: var(--surface-2); padding: 2px 6px; color: var(--text); }
.act .t { font: 11px var(--font-mono); color: var(--muted); }
.act .m { color: var(--muted); }

/* Form */
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
.form .full { grid-column: 1 / -1; }
.inline { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.inline label { display: inline-flex; align-items: center; }
.form-foot { display: flex; gap: 8px; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 4px; }

/* Gallery */
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.lab { font: 600 10.5px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.footer { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 8px 18px; border-top: 1px solid var(--border-strong); background: var(--topbar-bg); font: 11px var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.footer .sp { flex: 1; }

/* =====================================================================
   KATALOG KOMPONEN (components) — tambahan di atas primitif
   ===================================================================== */

/* ---- Tombol: state & komposisi ---- */
.spin { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin-hex { display: inline-block; width: 26px; height: 26px; clip-path: var(--cp-hex); background: var(--accent); animation: spin 1.1s linear infinite; position: relative; }
.spin-hex::after { content: ""; position: absolute; inset: 6px; clip-path: var(--cp-hex); background: var(--surface); }
.btn.is-hover.btn-primary { background: var(--primary-hover); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.btn.is-active.btn-primary { background: var(--primary-active); transform: translateY(1px); }
.btn.is-focus { box-shadow: inset 0 0 0 2px var(--accent); }
.btn-ghost.is-hover { background: var(--surface-2); }
.btn-group { display: inline-flex; }
.btn-group .btn { clip-path: none; margin-left: -1px; }
.btn-group .btn:first-child { margin-left: 0; clip-path: polygon(var(--cut-md) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut-md)); }
.btn-group .btn:last-child { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-md)), calc(100% - var(--cut-md)) 100%, 0 100%); }
.btn-group .btn.diag::after, .btn-group .btn:not(:first-child).diag::before { display: none; }
.btn-group .btn.on { background: var(--steel-strong); color: var(--surface); border-color: var(--steel-strong); }
.btn-link { background: transparent; color: var(--primary); clip-path: none; padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; }
html[data-mode="dark"] .btn-link { color: var(--accent); }
.btn-block { width: 100%; }

/* ---- Dropdown menu ---- */
.menu { position: relative; width: 220px; background: var(--surface); border: 1px solid var(--border-strong); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); padding: 4px 0; }
.menu .hd { padding: 6px 12px 4px; font: 600 9.5px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.menu a, .menu label, .menu .item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 12px; font-size: 13px; color: var(--text); text-decoration: none; background: none; border: 0; text-align: left; cursor: pointer; }
.menu a:hover, .menu .item:hover, .menu label:hover, .menu .on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.menu .sep { height: 1px; background: var(--border); margin: 4px 0; }
.menu kbd, .kbd { font: 10px var(--font-mono); color: var(--muted); border: 1px solid var(--border-strong); padding: 1px 5px; background: var(--surface-2); }
.menu kbd { margin-left: auto; }
.menu .danger { color: var(--danger); }
.menu-head { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); margin-top: -4px; }
.menu-head b { display: block; font-size: 13px; }
.menu-head small { font: 10px var(--font-mono); color: var(--muted); letter-spacing: .06em; }
.menu .check { margin-right: 0; }
.notif { display: flex; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 12.5px; }
.notif .led { margin-top: 5px; }
.notif b { display: block; font-weight: 600; }
.notif .t { font: 10px var(--font-mono); color: var(--muted); }

/* ---- Command palette ---- */
.cmd { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border-strong); clip-path: var(--cp-panel); }
.cmd .in { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 18px; border-bottom: 1px solid var(--border); }
.cmd .in input { flex: 1; border: 0; background: none; font-size: 15px; outline: none; }
.cmd .grp2 { padding: 8px 14px 2px 18px; font: 600 9.5px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cmd .it { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 18px; font-size: 13px; }
.cmd .it.on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.cmd .it kbd { margin-left: auto; }
.cmd .ft { display: flex; gap: 14px; padding: 8px 18px; border-top: 1px solid var(--border); font: 10.5px var(--font-mono); color: var(--muted); letter-spacing: .06em; }

/* ---- Input states & komposisi ---- */
.input.err { border-color: var(--danger); }
.input.ok { border-color: var(--success); }
.input.is-focus { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.input[readonly] { background: var(--surface-2); border-style: dashed; }
.field .msg { font-size: 11.5px; color: var(--muted); }
.field .msg.err { color: var(--danger-ink); }
.field .msg.ok { color: var(--success-ink); }
.field label .req { color: var(--accent-ink); }
.igroup { display: flex; }
.igroup .addon { display: inline-flex; align-items: center; padding: 0 10px; background: var(--surface-3); color: var(--muted); border: 1px solid var(--border-strong); border-bottom: 2px solid var(--control-border); font: 12px var(--font-mono); white-space: nowrap; }
.igroup .addon:first-child { border-right: 0; clip-path: var(--cp-tl); }
.igroup .addon:last-child { border-left: 0; }
.igroup .input { clip-path: none; }
.igroup .input:first-child { clip-path: var(--cp-tl); }
.igroup .btn { min-height: 32px; margin-left: -1px; }
.num { display: inline-flex; }
.num .input { width: 72px; text-align: center; clip-path: none; font-family: var(--font-mono); }
.num .btn { clip-path: none; width: 30px; padding: 0; }
.num .btn:first-child { clip-path: polygon(var(--cut-md) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut-md)); }
.num .btn:last-child { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-md)), calc(100% - var(--cut-md)) 100%, 0 100%); }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px; border: 1px dashed var(--border-strong); background-color: var(--surface-2); background-image: repeating-linear-gradient(-45deg, var(--hatch) 0 2px, transparent 2px 12px); clip-path: var(--cp-panel); text-align: center; color: var(--muted); font-size: 12.5px; }
.dropzone b { color: var(--text); font-size: 13px; }
.dropzone .hex { width: 40px; height: 40px; clip-path: var(--cp-hex); background: var(--surface-3); display: grid; place-items: center; color: var(--steel); }
.filelist { display: flex; flex-direction: column; gap: 6px; }
.filerow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--border); background: var(--surface); clip-path: var(--cp-ctrl); font-size: 12.5px; }
.filerow .fi { width: 28px; height: 28px; clip-path: var(--cp-hex); background: var(--surface-3); display: grid; place-items: center; color: var(--steel); flex-shrink: 0; }
.filerow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filerow .gauge { width: 120px; }
.filerow .sz { font: 11px var(--font-mono); color: var(--muted); }
input[type="range"].range { appearance: none; width: 100%; height: 8px; background: repeating-linear-gradient(90deg, var(--surface-3) 0 6px, transparent 6px 8px); outline: none; margin: 6px 0; }
input[type="range"].range::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; background: var(--accent); clip-path: var(--cp-hex); cursor: pointer; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px 8px; border: 1px solid var(--border-strong); border-bottom: 2px solid var(--control-border); clip-path: var(--cp-tl); background: var(--surface); min-height: 36px; align-items: center; }
.tags .badge { height: 22px; font-size: 10.5px; gap: 6px; }
.tags .badge svg { width: 11px; height: 11px; cursor: pointer; }
.tags input { border: 0; background: none; outline: none; flex: 1; min-width: 80px; font-size: 13px; }
.pwd { position: relative; }
.pwd .input { padding-right: 34px; }
.pwd .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); }
.meter { display: flex; gap: 3px; margin-top: 6px; }
.meter i { flex: 1; height: 4px; background: var(--surface-3); }
.meter i.on { background: var(--warning); }
.meter i.on.good { background: var(--success); }
.reqs { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.reqs li { display: flex; align-items: center; gap: 8px; }
.reqs li.ok { color: var(--success-ink); }
.reqs svg { width: 12px; height: 12px; }

/* ---- Kalender / pemilih tanggal ---- */
.cal { width: 268px; background: var(--surface); border: 1px solid var(--border-strong); clip-path: var(--cp-panel); padding: 10px 12px 12px; }
.cal .hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 600; font-size: 13px; }
.cal .dow, .cal .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal .dow span { font: 600 9.5px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.cal .days button { height: 30px; border: 0; background: none; font: 12px var(--font-mono); color: var(--text); clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px); }
.cal .days button:hover { background: var(--surface-2); }
.cal .days .o { color: var(--muted); opacity: .45; }
.cal .days .today { box-shadow: inset 0 0 0 1px var(--accent); }
.cal .days .sel { background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.cal .days .rng { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.cal .ft { display: flex; gap: 6px; margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; align-items: center; }
.cal .ft .sp { flex: 1; }
.time { display: inline-flex; align-items: center; gap: 4px; }
.time .input { width: 52px; text-align: center; font-family: var(--font-mono); clip-path: none; }

/* ---- Editor teks kaya ---- */
.editor { border: 1px solid var(--border-strong); clip-path: var(--cp-panel); background: var(--surface); }
.editor .tb { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.editor .tb button { width: 26px; height: 26px; border: 0; background: none; font: 700 12px var(--font-mono); color: var(--muted); display: grid; place-items: center; clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px); }
.editor .tb button:hover, .editor .tb button.on { background: var(--surface-3); color: var(--text); }
.editor .tb .sep { width: 1px; background: var(--border-strong); margin: 4px 6px; align-self: stretch; }
.editor .tb select { border: 0; background: none; font-size: 12px; color: var(--muted); }
.editor .body { padding: 12px 16px; min-height: 100px; font-size: 13.5px; }
.editor .body ul { margin: 4px 0; padding-left: 18px; }

/* ---- Markdown & chat (AI) ---- */
.md { font-size: 13.5px; }
.md h3 { margin: 10px 0 4px; font-size: 14px; }
.md p { margin: 6px 0; }
.md ul { padding-left: 18px; margin: 6px 0; }
.md code { font: 12px var(--font-mono); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; }
.md pre { position: relative; margin: 8px 0; padding: 10px 12px 10px 16px; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--steel); overflow-x: auto; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
.md pre code { background: none; border: 0; padding: 0; font-size: 12px; line-height: 1.5; display: block; }
.md pre .lang { position: absolute; right: 10px; top: 6px; font: 9.5px var(--font-mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.md blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--accent); color: var(--muted); }
.md table { border-collapse: collapse; margin: 8px 0; font-size: 12.5px; }
.md th, .md td { border: 1px solid var(--border); padding: 4px 8px; }
.md th { background: var(--surface-2); font: 600 10.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.k-str { color: var(--success-ink); } .k-kw { color: var(--primary); font-weight: 600; } html[data-mode="dark"] .k-kw { color: var(--accent); } .k-cm { color: var(--muted); font-style: italic; } .k-num { color: var(--info); }
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 10px; max-width: 88%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bub { padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); font-size: 13px; }
.msg.me .bub { background: var(--primary); color: var(--primary-fg); border-color: transparent; clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px); }
.msg .meta { font: 10px var(--font-mono); color: var(--muted); margin-top: 3px; letter-spacing: .06em; }
.msg.me .meta { text-align: right; }
.typing { display: inline-flex; gap: 3px; align-items: center; height: 12px; }
.typing i { width: 6px; height: 6px; background: var(--accent); clip-path: var(--cp-hex); animation: pulse 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 8px; border: 1px solid var(--border-strong); clip-path: var(--cp-panel); background: var(--surface); }
.composer textarea { flex: 1; border: 0; background: none; resize: none; outline: none; min-height: 40px; font-size: 13px; padding: 6px 8px; }

/* ---- Navigasi ---- */
.tabs.boxed { border: 0; padding: 0; gap: 0; }
.tabs.boxed .tab { clip-path: none; border: 1px solid var(--border-strong); margin: 0 -1px 0 0; padding: 0 14px; height: 30px; box-shadow: none; }
.tabs.boxed .tab:first-child { clip-path: polygon(var(--cut-md) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut-md)); }
.tabs.boxed .tab:last-child { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-md)), calc(100% - var(--cut-md)) 100%, 0 100%); }
.tabs.boxed .tab[aria-selected="true"] { background: var(--steel-strong); color: var(--surface); border-color: var(--steel-strong); }
.tabs.pills { border: 0; padding: 0; gap: 6px; }
.tabs.pills .tab { clip-path: var(--cp-badge); height: 26px; padding: 0 16px; font-size: 11.5px; box-shadow: none; }
.tabs.pills .tab[aria-selected="true"] { background: var(--accent); color: var(--accent-fg); }
.tabs.vert { flex-direction: column; align-items: stretch; border: 0; border-left: 1px solid var(--border-strong); padding: 0; width: 190px; }
.tabs.vert .tab { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); justify-content: flex-start; margin: 0 0 0 -1px; height: 32px; box-shadow: none; }
.tabs.vert .tab[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--accent); }
.steps { display: flex; align-items: center; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.step .no { width: 26px; height: 26px; clip-path: var(--cp-hex); background: var(--surface-3); color: var(--muted); display: grid; place-items: center; font: 700 11px var(--font-mono); }
.step.done .no { background: var(--success); color: #fff; }
.step.cur .no { background: var(--accent); color: var(--accent-fg); }
.step.cur { color: var(--text); font-weight: 600; }
.steps .ln { flex: 1; height: 2px; margin: 0 10px; background: repeating-linear-gradient(90deg, var(--border-strong) 0 6px, transparent 6px 9px); min-width: 24px; }
.steps .ln.done { background: var(--success); }
.acc { border: 1px solid var(--border); clip-path: var(--cp-panel); background: var(--surface); }
.acc details { border-top: 1px solid var(--border); }
.acc details:first-child { border-top: 0; }
.acc summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 18px; font-weight: 600; font-size: 13px; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ""; margin-left: auto; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--steel); transition: transform .15s; }
.acc details[open] summary { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.acc details[open] summary::after { transform: rotate(180deg); border-top-color: var(--accent); }
.acc .acc-body { padding: 10px 18px 14px; font-size: 13px; color: var(--muted); }
.crumbs2 { display: flex; align-items: center; gap: 2px; }
.crumbs2 a, .crumbs2 span { display: inline-flex; align-items: center; height: 24px; padding: 0 14px 0 18px; font: 600 10.5px var(--font-mono); letter-spacing: .09em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%); text-decoration: none; }
.crumbs2 a:first-child { padding-left: 12px; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); }
.crumbs2 span.cur { background: var(--steel-strong); color: var(--surface); }
.launch { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px 6px; }
.launch a { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; color: var(--text); font-size: 11.5px; text-align: center; line-height: 1.2; }
.launch .ic { position: relative; width: 56px; height: 56px; clip-path: var(--cp-hex); background: var(--surface-3); color: var(--primary); display: grid; place-items: center; }
html[data-mode="dark"] .launch .ic { color: var(--accent); }
.launch .ic svg { width: 24px; height: 24px; }
.launch .ic .n { position: absolute; top: 4px; right: 12px; font: 700 9px var(--font-mono); background: var(--accent); color: var(--accent-fg); padding: 1px 4px; }
.launch a:hover .ic { background: var(--primary); color: var(--primary-fg); }
.lang { display: inline-flex; border: 1px solid var(--border-strong); clip-path: var(--cp-ctrl); }
.lang button { border: 0; background: none; padding: 5px 10px; font: 600 10.5px var(--font-mono); letter-spacing: .1em; color: var(--muted); }
.lang button.on { background: var(--steel-strong); color: var(--surface); }

/* Mini frame layout */
.frame { position: relative; height: 190px; border: 1px solid var(--border-strong); background: var(--bg); overflow: hidden; clip-path: var(--cp-panel); }
.frame.tall { height: 360px; }
.frame .mini-side { position: absolute; left: 0; top: 0; bottom: 0; width: 52px; background: var(--sidebar-bg); display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 10px; }
.frame .mini-side i { width: 28px; height: 28px; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%); background: var(--sidebar-hover); }
.frame .mini-side i.on { background: var(--sidebar-active-bg); box-shadow: inset 3px 0 0 var(--accent); }
.frame .mini-top { position: absolute; left: 0; right: 0; top: 0; height: 28px; background: var(--topbar-bg); border-bottom: 1px solid var(--border-strong); }
.frame .mini-side ~ .mini-top { left: 52px; }
.frame .mini-top::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 60px; height: 2px; background: var(--accent); }
.frame .mini-body { position: absolute; left: 0; right: 0; top: 28px; bottom: 0; padding: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: start; }
.frame .mini-side ~ .mini-body { left: 52px; }
.frame .mini-body i { height: 34px; background: var(--surface); border: 1px solid var(--border); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 8px); }
.frame .dim { position: absolute; inset: 0; background: rgba(8,10,14,.55); }
.frame .center { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.frame .drawer { position: absolute; left: 0; top: 0; bottom: 0; width: 150px; background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-line); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.frame .drawer i { height: 20px; background: var(--sidebar-hover); clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%); }
.frame .drawer i.on { background: var(--sidebar-active-bg); box-shadow: inset 3px 0 0 var(--accent); }
.frame .sheet { position: absolute; right: 0; top: 0; bottom: 0; width: 52%; background: var(--surface); border-left: 1px solid var(--border-strong); padding: 12px 14px; font-size: 12px; }
.frame .sheet::before { content: ""; position: absolute; left: -1px; top: 0; width: 2px; height: 60px; background: var(--accent); }
.frame .sheet b { display: block; font-size: 13px; margin-bottom: 8px; }
.frame .sheet .skel { margin-bottom: 8px; }
.frame .cap { position: absolute; left: 8px; bottom: 6px; font: 9.5px var(--font-mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; z-index: 3; }
.frame .toasts2 { position: absolute; top: 12px; right: 12px; width: 240px; display: flex; flex-direction: column; gap: 6px; }
.frame .toasts2 .toast { font-size: 12px; padding: 7px 10px; }

/* ---- Tabel: varian ---- */
.dt .filters th { padding: 4px 8px; background: var(--surface); border-bottom: 1px solid var(--border); }
.dt .filters .input { min-height: 24px; padding: 2px 8px; font-size: 11.5px; }
.dt tr.exp td { background: var(--surface-2); white-space: normal; box-shadow: inset 3px 0 0 var(--steel); }
.dt.dense td { padding: 3px 10px; font-size: 12.5px; }
.dt.dense th { padding: 5px 10px; }
.exp-btn { width: 20px; height: 20px; border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; padding: 0; clip-path: polygon(3px 0, 100% 0, 100% calc(100% - 3px), calc(100% - 3px) 100%, 0 100%, 0 3px); }
.exp-btn svg { width: 11px; height: 11px; }
.hscroll { height: 8px; background: var(--surface-2); position: relative; border-top: 1px solid var(--border); }
.hscroll i { position: absolute; left: 20%; width: 45%; top: 1px; bottom: 1px; background: var(--border-strong); }

/* ---- List / data display ---- */
/* List group. :not(.applogo) — kelas .lg juga dipakai .applogo.lg (ukuran logo), jangan tertukar. */
.lg:not(.applogo) { border: 1px solid var(--border); clip-path: var(--cp-panel); background: var(--surface); }
.lg:not(.applogo) > div { display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 18px; border-top: 1px solid var(--border); font-size: 13px; }
.lg:not(.applogo) > div:first-child { border-top: 0; }
.lg:not(.applogo) > div:hover { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.lg:not(.applogo) .sp { flex: 1; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13px; margin: 0; }
.dl dt { font: 600 10.5px var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.dl dd { margin: 0; }
.tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border-strong); display: flex; flex-direction: column; gap: 14px; }
.tl li { position: relative; font-size: 13px; }
.tl li::before { content: ""; position: absolute; left: -25px; top: 3px; width: 11px; height: 11px; clip-path: var(--cp-hex); background: var(--steel); }
.tl li.on::before { background: var(--accent); }
.tl li.bad::before { background: var(--danger); }
.tl .t { font: 10.5px var(--font-mono); color: var(--muted); letter-spacing: .06em; }
.avgroup { display: inline-flex; }
.avgroup .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.avgroup .av:first-child { margin-left: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; font-size: 12px; border: 1px solid var(--border-strong); background: var(--surface); clip-path: var(--cp-badge); cursor: pointer; }
.chip.on { background: var(--steel-strong); color: var(--surface); border-color: var(--steel-strong); }
.chip svg { width: 12px; height: 12px; }
.stat2 { display: flex; gap: 14px; align-items: center; padding: 10px 14px 10px 18px; border: 1px solid var(--border); background: var(--surface); clip-path: var(--cp-panel); }
.stat2 .v { font: 700 22px var(--font-display); }
.stat2 .l { font: 600 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 26px; margin-left: auto; }
.spark i { width: 5px; background: var(--steel); }
.spark i.hi { background: var(--accent); }

/* ---- Feedback ---- */
.pdlg .log { margin-top: 10px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); font: 11px/1.6 var(--font-mono); color: var(--muted); max-height: 110px; overflow: auto; }
.pdlg .log .ok { color: var(--success-ink); }
.pdlg .log .cur { color: var(--text); }
.banner-imp { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 7px 14px; background: color-mix(in srgb, var(--warning) 94%, #000); color: #fff; font-size: 13px; clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
html[data-mode="dark"] .banner-imp { color: #14171c; background: var(--warning); }
.banner-imp .btn { min-height: 24px; font-size: 11px; background: rgba(0,0,0,.25); color: inherit; }
.pbanner { position: relative; padding: 22px 26px; background: var(--steel-strong); color: var(--surface); clip-path: var(--cp-panel); overflow: hidden; }
.pbanner::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); }
.pbanner::after { content: ""; position: absolute; right: -40px; top: -50px; width: 200px; height: 200px; clip-path: var(--cp-hex); background: rgba(255,255,255,.07); }
.pbanner h2 { margin: 0 0 4px; font-size: 20px; position: relative; }
.pbanner p { margin: 0; opacity: .8; position: relative; font-size: 13px; }
.pbanner .tech { position: relative; color: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.pin { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); font-size: 13px; }
.pin .pinic { width: 26px; height: 26px; clip-path: var(--cp-hex); background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; flex-shrink: 0; }
.pin .pinic svg { width: 13px; height: 13px; }
.pin b { display: block; }
.pin p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.pin .x { margin-left: auto; }

/* ---- Overlay ---- */
.pop { position: relative; display: inline-block; }
.pop .pp { position: absolute; top: calc(100% + 10px); left: 0; width: 250px; background: var(--surface); border: 1px solid var(--border-strong); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); padding: 10px 12px; font-size: 12.5px; z-index: 5; }
.pop .pp b { display: block; margin-bottom: 4px; }
.pop .pp p { margin: 0 0 8px; color: var(--muted); }
.tip.b > span { bottom: auto; top: calc(100% + 8px); }
.tip.b > span::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--steel-strong); }
.lightbox { position: relative; width: 100%; max-width: 520px; }
.lightbox .pv { height: 200px; display: grid; place-items: center; color: var(--steel); border: 1px solid var(--border-strong); }
.lightbox .pv svg { width: 40px; height: 40px; }
.lightbox .bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border-strong); border-top: 0; font: 11px var(--font-mono); color: var(--muted); }
.lightbox .bar .sp { flex: 1; }

/* ---- Halaman: auth ---- */
.auth-wrap { min-height: 100%; display: flex; flex-direction: column; background-color: var(--bg); background-image: var(--trace-img); }
.auth-split { flex: 1; display: grid; grid-template-columns: minmax(360px, 5fr) 6fr; }
@media (max-width: 860px) { .auth-split { grid-template-columns: 1fr; } .auth-brand { display: none; } }
.auth-brand { position: relative; background: var(--sidebar-bg); color: var(--sidebar-fg); padding: 40px 44px; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--sidebar-line); }
.auth-brand::before { content: ""; position: absolute; inset: 0; background-image: var(--trace-img); opacity: .8; }
.auth-brand .big-hex { position: absolute; right: -150px; bottom: -150px; width: 480px; height: 480px; clip-path: var(--cp-hex); background: var(--sidebar-hover); }
.auth-brand .big-hex::after { content: ""; position: absolute; inset: 40px; clip-path: var(--cp-hex); background: var(--sidebar-bg); }
.auth-brand > * { position: relative; }
.auth-brand h2 { color: #fff; font-size: 30px; margin: 0 0 10px; line-height: 1.1; }
.auth-brand h2 em { font-style: normal; color: var(--accent); }
.auth-brand p { margin: 0; font-size: 14px; opacity: .8; max-width: 380px; }
.auth-brand ul { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.auth-brand li { display: flex; gap: 10px; align-items: center; }
.auth-brand .bottom { margin-top: auto; padding-top: 18px; display: flex; gap: 16px; font: 10.5px var(--font-mono); letter-spacing: .1em; color: var(--sidebar-muted); }
.auth-form { display: flex; flex-direction: column; }
.auth-top { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 18px; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px 20px 50px; }
.auth { width: 100%; max-width: 400px; }
.auth h1 { font-size: 22px; margin: 0; }
.auth .sub { color: var(--muted); font-size: 13px; margin: 4px 0 18px; }
.auth .form1 { display: flex; flex-direction: column; gap: 12px; }
.auth .links { display: flex; justify-content: space-between; font-size: 12.5px; align-items: center; }
.auth .foot { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 16px; }
.auth .card { --c-a: var(--cut-lg); }
.auth .steps { margin-bottom: 18px; }
.captcha { display: flex; gap: 8px; align-items: center; }
.captcha .img { width: 120px; height: 34px; background-color: var(--surface-3); background-image: repeating-linear-gradient(-45deg, var(--hatch) 0 2px, transparent 2px 6px); clip-path: var(--cp-ctrl); display: grid; place-items: center; font: 700 16px var(--font-mono); letter-spacing: .3em; color: var(--steel-strong); flex-shrink: 0; }

/* ---- Halaman: error ---- */
.err-screen { position: relative; min-height: 440px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 50px 20px; border: 1px solid var(--border-strong); clip-path: var(--cp-panel); background-color: var(--bg); background-image: var(--trace-img); overflow: hidden; margin-bottom: 20px; }
.err-screen .hex-bg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 420px; height: 420px; clip-path: var(--cp-hex); background: var(--surface-2); opacity: .8; }
.err-screen .hex-bg::after { content: ""; position: absolute; inset: 34px; clip-path: var(--cp-hex); background: var(--bg); }
.err-screen > * { position: relative; }
.err-screen .code { font: 800 92px/1 var(--font-display); letter-spacing: -0.03em; color: var(--steel-strong); }
.err-screen .code em { font-style: normal; color: var(--accent-lg); }
.err-screen .code .seam { display: block; margin: 8px auto 0; width: 60px; }
.err-screen h2 { margin: 14px 0 6px; font-size: 22px; }
.err-screen p { margin: 0 0 20px; color: var(--muted); max-width: 460px; font-size: 13.5px; }
.err-screen .tag { position: absolute; top: 14px; left: 22px; color: var(--muted); }
.err-screen .tag2 { position: absolute; top: 14px; right: 22px; color: var(--muted); }
.err-screen .cta { display: flex; gap: 8px; }
.err-screen .diag-box { margin-top: 18px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); font: 11px var(--font-mono); color: var(--muted); text-align: left; clip-path: var(--cp-ctrl); }
.err-screen .diag-box b { color: var(--text); font-weight: 600; }
.err-screen .gauge { width: 260px; margin-bottom: 14px; }
.err-screen .ico { width: 64px; height: 64px; clip-path: var(--cp-hex); background: var(--surface-3); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.err-screen .ico svg { width: 28px; height: 28px; }
.err-screen.full { min-height: 100vh; border: 0; clip-path: none; margin: 0; }
.err-screen .brand-mini { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font: 10.5px var(--font-mono); letter-spacing: .14em; color: var(--muted); }

/* ---- Theme cards, editor rows, image cards ---- */
.tcard { position: relative; background: var(--surface); border: 1px solid var(--border); clip-path: var(--cp-panel); padding: 12px 14px 12px 18px; }
.tcard.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tcard .sw { display: flex; gap: 4px; margin: 8px 0 10px; }
.tcard .sw i { width: 30px; height: 18px; clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
.tcard b { font-size: 13px; display: block; }
.tcard .tech { color: var(--muted); }
.cprow { display: grid; grid-template-columns: 1fr 34px 110px 60px; gap: 8px; align-items: center; font-size: 12.5px; padding: 5px 0; border-top: 1px solid var(--border); }
.cprow:first-child { border-top: 0; }
.cprow .swb { width: 34px; height: 26px; clip-path: var(--cp-ctrl); border: 1px solid var(--border-strong); }
.cprow .input { min-height: 26px; padding: 2px 8px; font: 12px var(--font-mono); }
.cprow .ratio { font: 10.5px var(--font-mono); color: var(--success-ink); text-align: right; }
.cprow .ratio.bad { color: var(--danger-ink); }
.checker { background-image: conic-gradient(var(--surface-3) 25%, transparent 0 50%, var(--surface-3) 0 75%, transparent 0); background-size: 16px 16px; background-color: var(--surface); }
.imgcard { background: var(--surface); border: 1px solid var(--border); clip-path: var(--cp-panel); }
.imgcard .pv { height: 110px; display: grid; place-items: center; color: var(--steel); position: relative; }
.imgcard .pv .badge { position: absolute; top: 8px; right: 8px; }
.imgcard .pv svg { width: 30px; height: 30px; }
.imgcard .cap { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--border); font-size: 12px; }
.imgcard .cap .sp { flex: 1; }

/* ---- App logo: mark #th-logo + nama situs.
   html.logo-icon (atau ?logo=icon) = sembunyikan nama, hanya gambar. ---- */
.applogo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.applogo .mark { display: block; width: 34px; height: 34px; flex-shrink: 0; }
.applogo .name { font: 700 15px/1.1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.applogo .name small { display: block; font: 600 8.5px var(--font-mono); letter-spacing: .2em; opacity: .72; margin-top: 2px; }
.applogo.lg { gap: 14px; }
.applogo.lg .mark { width: 56px; height: 56px; }
.applogo.lg .name { font-size: 24px; }
.applogo.lg .name small { font-size: 10px; }
.applogo.xl { flex-direction: column; gap: 16px; }
.applogo.xl .mark { width: 128px; height: 128px; }
.applogo.xl .name { font-size: 32px; text-align: center; }
.applogo.xl .name small { font-size: 11px; }
html.logo-icon .applogo .name { display: none; }
.brand .applogo { padding-left: 2px; }
.brand .applogo .name { color: #fff; }
.brand .applogo .mark { width: 38px; height: 38px; }
.site-head .applogo .mark { width: 38px; height: 38px; }
.auth-brand .applogo { margin-bottom: 30px; }
.auth-brand .applogo .name { color: #fff; }
/* Mark = <svg class="mark" viewBox="0 0 48 48"><use href="#th-logo"/></svg>: vektor yang menggambar pelat chamfer-nya
   sendiri; warnanya dari --logo-* (th.tokens) yang diwarisi lewat <use>, jadi satu simbol untuk kedua mode. */

/* ---- Penyesuaian layar sempit (≤ 760 px: tanpa scroll horizontal di ponsel) ---- */
@media (max-width: 760px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .input-wrap { display: none; }
  .topbar .crumbs { min-width: 0; overflow: hidden; white-space: nowrap; }
  .user { padding: 3px; }
  .user > span:not(.av), .user > svg { display: none; }
  .page { padding: 18px 16px 36px; }
  .card-head { flex-wrap: wrap; row-gap: 4px; }
  .filerow { flex-wrap: wrap; }
  .filerow .nm { flex-basis: calc(100% - 40px); }
  .filerow .gauge { flex: 1; width: auto; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .auth-split { grid-template-columns: minmax(0, 1fr); }
  .footer { flex-wrap: wrap; row-gap: 2px; }
}
@media (max-width: 480px) {
  .step { gap: 6px; font-size: 12px; }
  .steps .ln { margin: 0 6px; min-width: 10px; }
}

/* ---- Drawer sidebar di layar sempit (kontrak: [data-collapse] → .app.nav-open) ---- */
@media (max-width: 760px) {
  .app.nav-open .sidebar { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(236px, 86vw); }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 49; background: var(--overlay); }
}

/* ---- Gerak: prefers-reduced-motion & .no-fx (kontrak) ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.no-fx *, .no-fx *::before, .no-fx *::after { animation: none !important; transition: none !important; }
@media (forced-colors: active) {
  .card, .btn, .input, .badge, .alert, .menu, .toast, .tab { border: 1px solid CanvasText; }
}

/* @topbar-fit */
/* Topbar di lebar sedang: tombol tidak boleh tergencet. Kotak pencarian menyusut lebih dulu, lalu item status
   tambahan, jam, seluruh status, pencarian, dan nama pengguna disembunyikan bertahap. Ambang diukur dari isi
   topbar demo; sesuaikan bila isi topbar Anda berbeda. Di ponsel: remah diringkas ke halaman aktif, lalu tombol
   teks logo dan remah disembunyikan bila tidak muat. */
@media (min-width: 761px) { .topbar > * { flex-shrink: 0; } .topbar > .sp { flex-shrink: 1; } .topbar > .input-wrap { flex-shrink: 1; min-width: 150px; } }
@media (min-width: 761px) and (max-width: 1150px) { .topbar > .status > :nth-child(n+2) { display: none; } }
@media (min-width: 761px) and (max-width: 1000px) { .topbar > .clock, .topbar > .hud-clock, .topbar > .readout { display: none; } }
@media (min-width: 761px) and (max-width: 1000px) { .topbar > .status { display: none; } }
@media (min-width: 761px) and (max-width: 930px) { .topbar > .input-wrap { display: none; } }
@media (max-width: 760px) { .topbar > * { flex-shrink: 0; } .topbar > .sp { flex-shrink: 1; } .topbar > .crumbs { flex-shrink: 1; min-width: 0; overflow: hidden; } .topbar > .input-wrap { flex-shrink: 1; min-width: 0; } }
@media (max-width: 380px) { .topbar > .crumbs > :not(.cur) { display: none; } }
/* @topbar-fit-end */
} /* th.components */

@layer th.pages {

/* Tautan header/footer situs: salinan aturan tautan base dengan spesifisitas sama */
:where(.site-head nav, .site-foot) a:not(.btn) { color: var(--primary); }
html[data-mode="dark"] :where(.site-head nav, .site-foot) a:not(.btn) { color: var(--accent); }

/* ---- Halaman: about ---- */
.about { max-width: 1100px; margin: 0 auto; width: 100%; padding: 0 28px; }
.about-hero { padding: 54px 0 34px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .about-hero { grid-template-columns: 1fr; } .about .g2 { grid-template-columns: 1fr; } }
.about-hero h1 { font-size: 38px; margin: 10px 0 12px; line-height: 1.08; }
.about-hero h1 em { font-style: normal; color: var(--accent-lg); }
.about-hero p { font-size: 15.5px; color: var(--muted); margin: 0; }
.about-hero .plate { position: relative; height: 200px; clip-path: var(--cp-panel); border: 1px solid var(--border-strong); }
.about-hero .plate .seam-tl { position: absolute; top: 0; left: var(--cut-lg); width: 40px; height: var(--seam); background: var(--accent); }
.about section { margin-bottom: 40px; }
.about .prose { font-size: 14px; line-height: 1.65; color: var(--text); }
.about .prose p { margin: 0 0 12px; }
.about .prose h3 { font-size: 16px; margin: 0 0 8px; }
.vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .vals { grid-template-columns: 1fr; } }
.val { position: relative; padding: 18px 18px 16px 22px; background: var(--surface); border: 1px solid var(--border); clip-path: var(--cp-panel); }
.val .no { font: 700 11px var(--font-mono); letter-spacing: .14em; color: var(--accent-ink); }
.val b { display: block; font-size: 15px; margin: 6px 0 4px; }
.val p { margin: 0; font-size: 12.5px; color: var(--muted); }
.stack-tbl td:first-child { font: 600 10.5px var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); width: 120px; }
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .team { grid-template-columns: repeat(2, 1fr); } }
.person { padding: 16px 14px 14px 18px; background: var(--surface); border: 1px solid var(--border); clip-path: var(--cp-panel); text-align: center; }
.person .av { width: 52px; height: 52px; font-size: 15px; margin: 0 auto 10px; }
.person b { display: block; font-size: 13.5px; }
.person .tech { color: var(--muted); }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* =====================================================================
   FRONT SITE (frontsite, about)
   ===================================================================== */
.site { min-height: 100%; display: flex; flex-direction: column; background-color: var(--bg); background-image: var(--trace-img); }
.site-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 28px; background: var(--topbar-bg); border-bottom: 1px solid var(--border-strong); }
.site-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 160px; height: var(--seam); background: var(--accent); }
.site-head nav { display: flex; gap: 4px; margin-left: 18px; }
.site-head nav a { font: 600 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 6px 12px; clip-path: var(--cp-badge); }
.site-head nav a:hover, .site-head nav a.on { color: var(--text); background: var(--surface-2); }
.site-head .sp { flex: 1; }
.hero { position: relative; padding: 64px 28px 54px; text-align: center; overflow: hidden; }
.hero .hex-bg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 560px; height: 560px; clip-path: var(--cp-hex); background: var(--surface-2); opacity: .8; }
.hero .hex-bg::after { content: ""; position: absolute; inset: 40px; clip-path: var(--cp-hex); background: var(--bg); }
.hero > * { position: relative; }
.hero .kicker { display: inline-flex; align-items: center; gap: 10px; font: 600 11px var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.hero h1 { font-size: 44px; margin: 0 0 12px; letter-spacing: -0.01em; line-height: 1.05; }
.hero h1 em { font-style: normal; color: var(--accent-lg); }
.hero p { font-size: 17px; color: var(--muted); max-width: 640px; margin: 0 auto 26px; }
.hero .cta { display: flex; justify-content: center; gap: 10px; }
.hero .cta .btn { min-height: 40px; padding: 0 22px; font-size: 14px; }
.strip { display: flex; margin: 0 28px; border: 1px solid var(--border-strong); background: var(--surface); clip-path: var(--cp-panel); }
.strip > div { flex: 1; padding: 14px 18px; border-left: 1px solid var(--border); text-align: center; }
.strip > div:first-child { border-left: 0; }
.strip b { display: block; font: 700 22px var(--font-display); }
.strip span { font: 600 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.strip .led { margin-right: 6px; vertical-align: 1px; }
.mods { padding: 46px 28px 20px; max-width: 1240px; margin: 0 auto; width: 100%; }
.mods .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .mods .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero h1 { font-size: 34px; } .strip { flex-wrap: wrap; } .strip > div { flex-basis: 50%; } }
.mod { position: relative; padding: 16px 16px 14px 20px; background: var(--surface); border: 1px solid var(--border); clip-path: var(--cp-panel); }
.mod .ic { width: 38px; height: 38px; clip-path: var(--cp-hex); background: var(--surface-3); color: var(--primary); display: grid; place-items: center; margin-bottom: 10px; }
html[data-mode="dark"] .mod .ic { color: var(--accent); }
.mod b { display: block; font-size: 14px; margin-bottom: 4px; }
.mod p { margin: 0; font-size: 12.5px; color: var(--muted); }
.mod .no { position: absolute; top: 10px; right: 12px; font: 600 10px var(--font-mono); letter-spacing: .1em; color: var(--muted); }
.mod:hover { border-color: var(--accent); }
.cta-band { position: relative; margin: 26px 28px 46px; padding: 30px 34px; background: var(--steel-strong); color: var(--surface); clip-path: var(--cp-panel); display: flex; align-items: center; gap: 24px; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; clip-path: var(--cp-hex); background: rgba(255,255,255,.07); }
.cta-band > * { position: relative; }
.cta-band h2 { margin: 0 0 4px; font-size: 22px; }
.cta-band p { margin: 0; opacity: .8; font-size: 13.5px; }
.cta-band .sp { flex: 1; }
.cta-band .btn-accent { min-height: 40px; padding: 0 22px; }
.site-foot { margin-top: auto; border-top: 1px solid var(--border-strong); background: var(--topbar-bg); padding: 16px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font: 11px var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.site-foot .sp { flex: 1; }
.site-foot a { color: inherit; text-decoration: none; }
.site-foot a:hover { color: var(--text); }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 20px; }
.section-head .tech { color: var(--muted); }
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }

/* App logo di hero & about */
.hero .applogo, .about-hero .applogo { margin: 0 auto 22px; }
/* Di hero, logo xl menjadi blok sendiri di tengah (bukan inline sebaris dengan .kicker) */
.hero .applogo.xl { display: flex; width: max-content; max-width: 100%; }
.about-hero .plate.logo-plate { display: grid; place-items: center; background: var(--surface); }

/* ---- Penyesuaian layar sempit ---- */
@media (max-width: 1000px) { .site-head nav, .site-head .lang { display: none; } .site-head { padding: 0 16px; } }
@media (max-width: 760px) { .contact { grid-template-columns: minmax(0, 1fr); } .about { padding: 0 16px; } .hero .cta { flex-wrap: wrap; } }
@media (max-width: 480px) { .site-head { gap: 8px; padding: 0 12px; } .site-head .applogo .name { display: none; } }

/* @sitehead-fit */
/* Header situs: tombol tidak boleh tergencet. Bila tidak muat, readout, pemilih bahasa, menu, tombol teks logo, tombol
   sekunder, tombol efek, lalu nama logo disembunyikan bertahap. Ambang diukur dari isi header demo. */
.site-head > * { flex-shrink: 0; }
.site-head > .sp { flex-shrink: 1; }
@media (max-width: 1060px) { .site-head > .readout { display: none; } }
@media (max-width: 1060px) { .site-head > .lang { display: none; } }
@media (max-width: 520px) { .site-head > nav { display: none; } }
@media (max-width: 520px) { .site-head > [data-logo-toggle] { display: none; } }
/* @sitehead-fit-end */
} /* th.pages */
