/* frontend/css/theme.css
   Dipakai bersama oleh index.html, login.html, dashboard.html, admin.html.
   Gaya: neobrutalism (kartu membulat, border tebal, shadow keras, aksen kuning).
   Dark/light lewat atribut data-theme di <html>. Tanpa Tailwind -- semua utilitas ada di sini. */

:root,
html[data-theme="light"] {
  --ink: #000000;
  --paper: #FFFFFF;
  --accent: #FFEB00;
  --accent-soft: #FFF9B8;
  --accent-dark: #8A6F00;
  --yellow: #FFF176;
  --success: #3ECF8E;
  --success-dark: #1F8F5E;
  --pink: #FF6B9D;
  --red: #FF4D4D;
  --card-bg: #FFFFFF;
  --chip-bg: #F1F1F1;
  --field-bg: #F5F5F5;
  --logo-bg: #FFFFFF;
}
html[data-theme="dark"] {
  --ink: #F5F5F5;
  --paper: #000000;
  --accent: #FFEB00;
  --accent-soft: #2E2A00;
  --accent-dark: #FFEB00;
  --yellow: #FFE600;
  --success: #3ECF8E;
  --success-dark: #5EE0A6;
  --pink: #FF6B9D;
  --red: #FF6B6B;
  --card-bg: #0D0D0D;
  --chip-bg: #1E1E1E;
  --field-bg: #171717;
  --logo-bg: #000000;
}

/* ---------- Reset & dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background-color: var(--paper); color: var(--ink);
  line-height: 1.5; -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
table { border-collapse: collapse; }
.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace; }
.no-scroll { overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex-shrink: 0; }
.ico-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { opacity: 0.6; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
html[data-theme="dark"] :focus-visible { outline-color: var(--accent); }

/* ---------- Komponen dasar (kompatibel dengan nama lama) ---------- */
.brutal-block { border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 22px; }
.card-bg { background-color: var(--card-bg); }
.text-muted-1 { opacity: 0.45; } .text-muted-2 { opacity: 0.5; } .text-muted-3 { opacity: 0.55; }
.text-muted-4 { opacity: 0.6; }  .text-muted-5 { opacity: 0.4; } .text-muted-6 { opacity: 0.35; }

.btn, .brutal-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  background: var(--card-bg); color: var(--ink);
  font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 14px; line-height: 1.2;
  white-space: nowrap; transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover, .brutal-btn:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active, .brutal-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled, .brutal-btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.btn-primary { background: var(--accent); color: #111; }
.btn-danger { background: color-mix(in srgb, var(--red) 28%, var(--card-bg)); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 12px; box-shadow: 2px 2px 0 var(--ink); }
.btn-block { width: 100%; }

.input, .brutal-input, .brutal-select {
  width: 100%; padding: 12px 16px;
  border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink);
  background-color: var(--field-bg); color: var(--ink); font: inherit; font-size: 15px;
}
.input:focus, .brutal-input:focus, .brutal-select:focus { outline: none; box-shadow: 3px 3px 0 var(--accent-dark); }
html[data-theme="dark"] .input:focus { box-shadow: 3px 3px 0 var(--accent); }
textarea.input { min-height: 120px; resize: vertical; }
input[type="file"].input { padding: 10px 12px; font-size: 13px; }

.sticker { display: inline-block; padding: 2px 10px; border: 2.5px solid var(--ink); box-shadow: 2.5px 2.5px 0 var(--ink); border-radius: 14px; font-family: 'Space Grotesk', sans-serif; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill { border: 2.25px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); border-radius: 999px; }

.icon-chip {
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--chip-bg); color: var(--ink);
  transition: transform 0.08s ease;
}
.icon-chip:active { transform: scale(0.94); }

.role-badge {
  display: inline-flex; align-items: center; padding: 3px 12px;
  background: var(--accent); color: #111; border: 2px solid var(--ink); border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.icon-tile {
  width: 46px; height: 46px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #111;
  border: 2.25px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); border-radius: 14px;
}
.icon-tile.sm { width: 36px; height: 36px; border-radius: 11px; }
.action-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.55; }
.action-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; line-height: 1.15; }
.action-sub { font-size: 12px; font-weight: 600; opacity: 0.7; }
.mini-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  background: var(--accent); color: #111; border: 2.25px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.mini-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.mini-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.panel { background: var(--card-bg); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 22px; padding: 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head .grow { flex: 1; min-width: 0; }
.hint { font-size: 12.5px; opacity: 0.6; line-height: 1.5; }
.label, .form-field > label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.6; margin-bottom: 6px; }
.form-field { margin-bottom: 14px; }
.alert { padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; margin-top: 14px; }
.alert-err { background: color-mix(in srgb, var(--red) 15%, transparent); border: 2px solid var(--red); color: var(--red); }
.alert-ok { background: var(--accent-soft); border: 2px solid var(--ink); }

.info-list { border: 2.25px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--field-bg); }
.info-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.info-row + .info-row { border-top: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.info-ico { width: 22px; display: inline-flex; justify-content: center; }
.info-label { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; opacity: 0.55; }
.info-value { font-size: 12.5px; font-weight: 700; text-align: right; margin-left: auto; }
.row-gap { display: flex; gap: 12px; }
.row-gap > * { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }

.table-wrap { border: 2.25px solid var(--ink); border-radius: 16px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; background: var(--card-bg); }
.table-wrap table { width: 100%; min-width: 520px; font-size: 14px; }
.table-wrap thead th {
  background: var(--accent-soft); padding: 10px 12px; text-align: left; white-space: nowrap;
  border-bottom: 2.25px solid var(--ink);
  font-family: 'Space Grotesk', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.table-wrap tbody td { padding: 10px 12px; text-align: left; border-bottom: 1.5px solid color-mix(in srgb, var(--ink) 15%, transparent); vertical-align: middle; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-empty { text-align: center !important; opacity: 0.45; padding: 24px 12px !important; }
.table-error { text-align: center !important; color: var(--red); padding: 24px 12px !important; }
.st-pending { background: color-mix(in srgb, var(--yellow) 45%, transparent); }
.st-ok { background: color-mix(in srgb, var(--success) 40%, transparent); }
.st-warm { background: color-mix(in srgb, var(--success) 20%, transparent); }
.st-bad { background: color-mix(in srgb, var(--red) 25%, transparent); }
.st-off { background: color-mix(in srgb, var(--ink) 10%, transparent); }

/* ---------- Logo & brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 42px; height: 42px; flex-shrink: 0; overflow: hidden; background: var(--logo-bg);
  border: 2.5px solid var(--ink); border-radius: 13px; box-shadow: 2px 2px 0 var(--ink);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-logo.lg { width: 104px; height: 104px; border-radius: 26px; box-shadow: 4px 4px 0 var(--ink); }
.logo-for-dark { display: none; }
html[data-theme="dark"] .logo-for-light { display: none; }
html[data-theme="dark"] .logo-for-dark { display: block; }
.brand-text { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; line-height: 1; }
.brand-gradient {
  background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--yellow), var(--accent), var(--accent-dark));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; animation: brand-run 4s linear infinite;
}
@keyframes brand-run { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
html[data-theme="light"] .brand-gradient { background-image: linear-gradient(90deg, #7a6000, #c9a400, #7a6000); }
@media (prefers-reduced-motion: reduce) { .brand-gradient, .ico-spin, .live-dot { animation: none; } }

/* ---------- Header situs (landing, login) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--card-bg); border-bottom: 3px solid var(--ink); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav { display: none; gap: 4px; margin-inline: auto; }
.nav a { padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0.75; transition: background 0.15s, opacity 0.15s; }
.nav a:hover { background: var(--accent-soft); opacity: 1; }
.hide-sm { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .site-header .nav-toggle { display: none; }
  .header-actions { margin-left: 0; }
  .hide-sm { display: inline-flex; }
}

/* ---------- Drawer / sidebar (kiri) ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 290; background: color-mix(in srgb, #000 55%, transparent);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease;
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
  width: min(86vw, 304px); display: flex; flex-direction: column;
  background: var(--card-bg); border-right: 3px solid var(--ink); box-shadow: 6px 0 0 var(--ink);
  transform: translateX(-105%); visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.65, 0, 0.35, 1), visibility 0.28s;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; border-bottom: 3px solid var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.drawer-foot { padding: 14px; border-top: 3px solid var(--ink); }
.nav-label { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.45; margin: 14px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px;
  border: 2px solid transparent; border-radius: 14px; font-weight: 600; font-size: 14.5px; text-align: left;
  transition: background 0.12s;
}
.nav-item:hover { background: var(--field-bg); }
.nav-item.is-active { background: var(--accent); color: #111; border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.nav-item.is-danger { color: var(--red); }
.workspace-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 2.25px solid var(--ink); border-radius: 16px; background: var(--field-bg); }
.workspace-card .t { font-weight: 700; font-size: 14px; line-height: 1.2; }
.workspace-card .s { font-size: 12px; opacity: 0.6; }

/* ---------- Shell dashboard ---------- */
.shell { min-height: 100vh; }
.main-col { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--card-bg); border-bottom: 3px solid var(--ink);
}
.topbar-title .eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.5; }
.topbar-title h1 { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; line-height: 1.1; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar-chip { width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--field-bg); object-fit: cover; }
.page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 20px; }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 284px minmax(0, 1fr); }
  .drawer.sidebar-fixed {
    position: sticky; top: 0; height: 100vh; width: auto; z-index: 45;
    transform: none; visibility: visible; box-shadow: none; transition: none;
  }
  .sidebar-fixed .drawer-close { display: none; }
  .topbar .nav-toggle { display: none; }
  .drawer-backdrop { display: none; }
  .topbar { padding: 16px 32px; }
  .page { padding: 28px 32px 56px; }
}

.welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 24px 28px; background: var(--accent); color: #111;
  border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 26px;
}
.welcome .eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.65; }
.welcome h2 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(26px, 4vw, 38px); font-weight: 700; line-height: 1.1; margin: 4px 0 6px; }
.welcome p { font-size: 14px; opacity: 0.75; max-width: 46ch; }
.welcome .btn { background: #fff; color: #111; border-color: #000; box-shadow: 3px 3px 0 #000; }
.welcome .brand-logo { border-color: #000; box-shadow: 4px 4px 0 #000; display: none; }
@media (min-width: 760px) { .welcome .brand-logo { display: block; } }

.stat-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 1024px) { .stat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-card { display: flex; flex-direction: column; gap: 6px; min-height: 130px; padding: 16px; background: var(--card-bg); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 22px; min-width: 0; }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.stat-eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.55; }
.stat-value { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.1; margin-top: auto; overflow-wrap: anywhere; }
.stat-sub { font-size: 12px; opacity: 0.6; }
.bar { height: 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--field-bg); overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s ease; }

.two-col { display: grid; gap: 20px; align-items: stretch; }
@media (min-width: 1180px) { .two-col { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }

/* ---------- Pemilih script ---------- */
.script-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.script-opt { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 2.5px solid var(--ink); border-radius: 16px; background: var(--card-bg); cursor: pointer; transition: transform 0.08s, box-shadow 0.08s, background 0.12s; box-shadow: 3px 3px 0 var(--ink); }
.script-opt:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.script-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.script-opt .name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; line-height: 1.15; }
.script-opt .desc { font-size: 11.5px; opacity: 0.65; line-height: 1.4; }
.script-opt.is-selected { background: var(--accent); color: #111; }
.script-opt.is-selected .desc { opacity: 0.8; }
.script-opt.is-selected::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  background: #111 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFEB00' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat;
}
.script-opt.is-soon { opacity: 0.55; cursor: not-allowed; box-shadow: 3px 3px 0 color-mix(in srgb, var(--ink) 40%, transparent); }
.script-opt.is-soon input { cursor: not-allowed; }
.script-opt.is-soon:hover { transform: none; }
.soon-chip { align-self: flex-start; padding: 1px 8px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.script-opt.is-invalid { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.pairing { margin-top: 16px; padding: 16px; background: var(--accent-soft); border: 2.5px solid var(--ink); box-shadow: 2.5px 2.5px 0 var(--ink); border-radius: 14px; }
.pairing-code { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: clamp(26px, 6vw, 34px); letter-spacing: 0.12em; text-align: center; padding: 8px 0; }

/* ---------- Live console ---------- */
.console {
  display: flex; flex-direction: column; min-height: 340px; min-width: 0;
  background: #0b0f14; color: #d7e0ea; border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  border-radius: 22px; overflow: hidden;
}
.console-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #151b23; border-bottom: 2px solid #263040; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #9fb0c3; }
.console-dots { display: inline-flex; gap: 6px; }
.console-dots i { width: 10px; height: 10px; border-radius: 50%; display: block; background: #d97b86; }
.console-dots i:nth-child(2) { background: #e0b25a; } .console-dots i:nth-child(3) { background: #5aa0e0; }
.live-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: #8be5b4; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ecf8e; animation: pulse 1.6s ease-in-out infinite; }
.live-pill.is-off { color: #f0a0a0; } .live-pill.is-off .live-dot { background: #ff6b6b; animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.5); } 50% { opacity: 0.6; box-shadow: 0 0 0 5px rgba(62, 207, 142, 0); } }
.console-body { flex: 1; overflow-y: auto; padding: 10px 14px; min-height: 240px; max-height: 400px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.7; }
.console-body::-webkit-scrollbar { width: 8px; } .console-body::-webkit-scrollbar-thumb { background: #2a3544; border-radius: 4px; }
.log-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 1px 0; animation: logIn 0.25s ease; }
@keyframes logIn { from { opacity: 0; transform: translateY(4px); } }
.log-time { color: #6f8197; font-size: 11.5px; }
.tag { padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; }
.tag-cmd { background: var(--accent); color: #111; } .tag-sys { background: #26323f; color: #9fb0c3; }
.log-text { overflow-wrap: anywhere; color: #d7e0ea; }
.log-text .who { color: #7d8da1; margin-left: 8px; }
.log-text .scr { color: #7d8da1; margin-right: 8px; }
.log-ok .log-text { color: #7ee3ab; } .log-err .log-text { color: #ff8f8f; } .log-warn .log-text { color: #ffd75e; }
.log-ms { color: #6f8197; font-size: 11.5px; white-space: nowrap; }
.console-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; min-height: 200px; text-align: center; color: #7d8da1; font-family: 'Inter', sans-serif; font-size: 13px; padding: 12px; }
.console-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 2px solid #263040; font-size: 12px; color: #7d8da1; }
.console-foot button { color: #9fb0c3; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.console-foot button:hover { background: #1c2530; color: #fff; }
@media (max-width: 560px) {
  .log-row { grid-template-columns: auto auto minmax(0, 1fr); }
  .log-ms { grid-column: 3; }
}

/* ---------- Loading screen ---------- */
#pageLoader { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: var(--paper); transition: opacity 0.45s ease, visibility 0.45s ease; }
#pageLoader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
#pageLoader::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 3px, color-mix(in srgb, var(--ink) 4%, transparent) 3px 4px); }
.pl-corner { position: absolute; width: 22px; height: 22px; border: 0 solid color-mix(in srgb, var(--ink) 45%, transparent); }
.pl-tl { top: 30px; left: 30px; border-top-width: 2px; border-left-width: 2px; }
.pl-tr { top: 30px; right: 30px; border-top-width: 2px; border-right-width: 2px; }
.pl-bl { bottom: 30px; left: 30px; border-bottom-width: 2px; border-left-width: 2px; }
.pl-br { bottom: 30px; right: 30px; border-bottom-width: 2px; border-right-width: 2px; }
.pl-inner { position: relative; width: min(300px, 78vw); }
.pl-mark { width: 104px; height: 104px; margin: 0 auto 22px; overflow: hidden; background: var(--logo-bg); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 4px 4px 0 var(--ink); animation: pl-pulse 1.4s ease-in-out infinite; }
.pl-mark img { width: 100%; height: 100%; object-fit: cover; }
@keyframes pl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.pl-status { font-size: 11px; font-weight: 800; letter-spacing: 0.22em; opacity: 0.55; margin-bottom: 8px; }
.pl-track { height: 4px; background: color-mix(in srgb, var(--ink) 15%, transparent); overflow: hidden; }
.pl-fill { height: 100%; width: 0%; background: var(--ink); }
.pl-pct { margin-top: 8px; text-align: right; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; opacity: 0.55; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .pl-mark { animation: none; } }

/* ---------- Kartu paket ---------- */
.pricing-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--card-bg); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 22px; position: relative; }
.pricing-card.is-current { border-color: var(--accent-dark); box-shadow: 4px 4px 0 var(--accent-dark); }
.pricing-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 20px; }
.pricing-desc { font-size: 12.5px; opacity: 0.65; line-height: 1.4; min-height: 2.8em; }
.pricing-price { font-family: 'Space Grotesk', sans-serif; font-weight: 800; font-size: 30px; line-height: 1; }
.pricing-price .idr { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 13px; opacity: 0.55; margin-right: 4px; }
.pricing-feat { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.pricing-div { height: 1px; background: var(--ink); opacity: 0.15; }
.current-chip { position: absolute; top: -11px; right: 16px; background: var(--success); color: #06281a; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.pricing-hint { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; opacity: 0.5; margin: 0 2px 8px; }
@media (min-width: 640px) { .pricing-hint { display: none; } }
.pricing-carousel { display: flex; gap: 16px; overflow-x: auto; overflow-y: visible; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 14px 50vw; scrollbar-width: none; }
.pricing-carousel::-webkit-scrollbar { display: none; }
.pricing-carousel .pricing-card { flex: 0 0 min(78vw, 300px); scroll-snap-align: center; filter: blur(4px); opacity: 0.5; transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease; }
.pricing-carousel .pricing-card.is-active { filter: blur(0); opacity: 1; }
@media (min-width: 1024px) {
  .pricing-carousel { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); overflow: visible; padding: 14px 0; gap: 18px; max-width: 1040px; margin-inline: auto; }
  .pricing-carousel .pricing-card { flex-basis: auto; filter: none !important; opacity: 1 !important; }
}
@media (hover: hover) and (pointer: fine) {
  .pricing-carousel .pricing-card:hover { transform: scale(1.02) translateY(-2px); box-shadow: 5px 6px 0 var(--ink); z-index: 2; }
}

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-end; justify-content: center; background: color-mix(in srgb, #000 55%, transparent); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
@media (min-width: 640px) { .modal-overlay { align-items: center; } }
.modal-sheet { width: min(440px, 100%); max-height: 92vh; overflow-y: auto; background: var(--card-bg); border: 2.5px solid var(--ink); border-radius: 24px 24px 0 0; box-shadow: 0 -6px 0 var(--ink); padding: 22px 20px 26px; }
.modal-sheet.wide { width: min(720px, 100%); }
@media (min-width: 640px) { .modal-sheet { border-radius: 24px; box-shadow: 6px 6px 0 var(--ink); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.qris-box { background: #fff; border: 2.25px solid var(--ink); border-radius: 16px; padding: 14px; display: flex; align-items: center; justify-content: center; }
.qris-box img { width: 100%; max-width: 260px; }

/* ---------- Toast ---------- */
#toastHost { position: fixed; z-index: 600; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 380px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card-bg); border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); border-radius: 14px; font-size: 14px; font-weight: 600; animation: logIn 0.25s ease; transition: opacity 0.3s; }
.toast-err { border-color: var(--red); color: var(--red); }
.toast.is-out { opacity: 0; }

/* =====================  LANDING  ===================== */
.hero { display: grid; gap: 40px; align-items: center; padding: 48px 0 40px; }
@media (min-width: 960px) { .hero { grid-template-columns: 1.05fr 0.95fr; padding: 72px 0 56px; gap: 56px; } }
.hero h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(40px, 7vw, 76px); line-height: 1.02; letter-spacing: -0.02em; margin: 16px 0; }
.hl { background: var(--accent); color: #111; padding: 0 12px; border-radius: 16px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero .lead { font-size: clamp(15px, 2vw, 18px); line-height: 1.65; opacity: 0.72; max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 18px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; font-weight: 600; }
.checks span { display: inline-flex; align-items: center; gap: 6px; }
.checks .ico { color: var(--success-dark); }
.badge-live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--accent); color: #111; font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; box-shadow: 2px 2px 0 var(--ink); }

.stats-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; background: var(--card-bg); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 26px; }
@media (min-width: 860px) { .stats-strip { grid-template-columns: 1.3fr repeat(3, 1fr); padding: 24px 28px; align-items: center; } }
.stats-strip .intro { grid-column: 1 / -1; }
@media (min-width: 860px) { .stats-strip .intro { grid-column: auto; } }
.stat-mini { display: flex; align-items: center; gap: 12px; }
.stat-mini .num { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 26px; line-height: 1; }
.stat-mini .lbl { font-size: 12px; opacity: 0.6; margin-top: 2px; }

.section { padding: 56px 0; }
@media (min-width: 900px) { .section { padding: 80px 0; } }
.eyebrow-lbl { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.55; }
.h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -0.015em; margin: 8px 0 12px; }
.section-lead { max-width: 56ch; opacity: 0.7; line-height: 1.65; }
.card-grid { display: grid; gap: 16px; margin-top: 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--card-bg); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 22px; }
.feature h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 19px; }
.feature p { font-size: 14px; opacity: 0.68; line-height: 1.6; }
.steps { display: grid; gap: 16px; margin-top: 32px; counter-reset: s; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding: 22px; background: var(--card-bg); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 22px; }
.step .n { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13px; letter-spacing: 0.1em; display: inline-block; padding: 2px 10px; background: var(--accent); color: #111; border: 2px solid var(--ink); border-radius: 999px; margin-bottom: 12px; }
.step h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 19px; margin-bottom: 6px; }
.step p { font-size: 14px; opacity: 0.68; line-height: 1.6; }

.faq-grid { display: grid; gap: 14px; margin-top: 32px; align-items: start; }
@media (min-width: 860px) { .faq-grid { grid-template-columns: 1fr 1fr; } }
.faq-item { background: var(--card-bg); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 22px; }
.faq-item summary { display: flex; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; list-style: none; font-weight: 600; font-size: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .num { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; opacity: 0.55; }
.faq-item .tog { margin-left: auto; transition: transform 0.2s; }
.faq-item[open] .tog { transform: rotate(45deg); }
.faq-item .ans { padding: 0 20px 20px 54px; font-size: 14.5px; line-height: 1.7; opacity: 0.72; }

.script-cards { display: grid; gap: 16px; margin-top: 32px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.script-card { display: flex; gap: 14px; align-items: flex-start; padding: 20px; background: var(--card-bg); border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 22px; }
.script-card h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 19px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.script-card p { font-size: 14px; opacity: 0.68; line-height: 1.55; margin-top: 4px; }

.demo-note { font-size: 11px; opacity: 0.55; margin-top: 10px; text-align: center; }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 32px; background: var(--accent); color: #111; border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); border-radius: 28px; }
.cta-band h2 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(26px, 4vw, 38px); font-weight: 700; line-height: 1.1; }
.cta-band p { opacity: 0.75; margin-top: 6px; }
.cta-band .btn { background: #111; color: #fff; border-color: #000; box-shadow: 3px 3px 0 rgba(0,0,0,0.6); }

/* Footer (referensi Shiroko) */
.site-footer { margin-top: 40px; background: #0d0d0d; color: #f2f2f2; border-top: 3px solid var(--ink); }
.footer-grid { display: grid; gap: 32px; padding: 48px 0 36px; }
@media (min-width: 600px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; } }
.site-footer .brand-text { color: #fff; }
.site-footer .desc { margin-top: 16px; font-size: 14.5px; line-height: 1.7; color: #b9b9b9; max-width: 34ch; }
.site-footer h4 { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 14px; color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.site-footer ul a { color: #b9b9b9; font-size: 14.5px; transition: color 0.15s; }
.site-footer ul a:hover { color: var(--accent); }
.status-card { padding: 18px; border: 2px solid #2e2e2e; border-radius: 20px; background: #161616; }
.status-card .t { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #e6e6e6; }
.status-card .d { width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.status-card .d.off { background: var(--red); }
.status-card p { margin-top: 10px; font-size: 14px; color: #b9b9b9; line-height: 1.6; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 20px 0 28px; border-top: 1px solid #2e2e2e; font-size: 13px; color: #9a9a9a; }

/* =====================  AUTH  ===================== */
.auth { min-height: 100vh; display: grid; }
@media (min-width: 960px) { .auth { grid-template-columns: 1.05fr 0.95fr; } }
.auth-side { display: none; flex-direction: column; justify-content: space-between; gap: 32px; padding: 48px; background: #0d0d0d; color: #f2f2f2; border-right: 3px solid var(--ink); }
@media (min-width: 960px) { .auth-side { display: flex; } }
.auth-side h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(38px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -0.02em; margin: 14px 0 16px; }
.auth-side .lead { color: #b9b9b9; font-size: 16px; line-height: 1.7; max-width: 46ch; }
.auth-side .brand-text { color: #fff; }
.auth-side .tagline { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 10px; }
.auth-side .tagline::before { content: ""; width: 28px; height: 3px; background: var(--accent); }
.check-list { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.check-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.check-list .tick { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--accent); color: #111; flex-shrink: 0; }
.mini-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-steps div { padding: 14px; border: 2px solid #2e2e2e; border-radius: 16px; background: #161616; font-size: 13px; color: #b9b9b9; }
.mini-steps b { display: block; font-family: 'JetBrains Mono', monospace; font-size: 18px; color: #fff; margin-bottom: 4px; }
.auth-main { display: flex; flex-direction: column; min-height: 100vh; }
.auth-main .site-header { position: static; }
@media (min-width: 960px) { .auth-main .site-header { background: transparent; border-bottom: 0; } .auth-main .brand { visibility: hidden; } }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px 40px; }
.auth-card { width: min(100%, 440px); }
.auth-card h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(34px, 5vw, 44px); line-height: 1.02; letter-spacing: -0.02em; margin: 14px 0 10px; }
.auth-foot { text-align: center; font-size: 11.5px; font-weight: 600; opacity: 0.45; padding: 0 16px 24px; }

/* ---------- Admin ---------- */
.admin-wrap { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 20px 0 48px; display: grid; gap: 20px; }
@media (min-width: 1024px) { .admin-wrap { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: start; } .admin-wrap .span-all { grid-column: 1 / -1; } }

/* Loader landing mengunci scroll lewat class ini */
body.is-loading { overflow: hidden; }

/* Grid fitur: 3 kolom di layar lebar supaya 6 kartu rapi (2 baris x 3) */
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }