/* ==========================================================================
   Wireframe — sistem desain modern
   Warna dasar: #672be1 (violet) · netral bernuansa violet · aksen emas
   ========================================================================== */

:root {
  /* brand utama */
  --brand: #672be1;
  --brand-strong: #5620c4;
  --brand-deep: #451a9e;
  --brand-soft: #f1ecff;
  --brand-softer: #f9f7ff;
  --brand-line: #ddd0ff;
  --brand-text: #5620c4;
  --brand-grad: linear-gradient(135deg, #672be1 0%, #8b5cf6 58%, #a78bfa 100%);
  --brand-grad-strong: linear-gradient(135deg, #5620c4 0%, #7c3aed 100%);

  /* gelap (header, panel ujian) */
  --dark: #171233;
  --dark-2: #221a52;
  --dark-grad: linear-gradient(120deg, #171233 0%, #241a56 55%, #332179 100%);

  /* netral bernuansa violet */
  --ink: #1d1940;
  --muted: #655f8c;
  --line: #e4e0f1;
  --soft: #f4f2fc;
  --gray-bg: #edeaf7;
  --bg: #f7f6fc;

  /* semantik */
  --ok: #0e8f60;
  --ok-bg: #d8f6e8;
  --warn: #a45a00;
  --warn-bg: #fff0d6;
  --bad: #c92a2a;
  --bad-bg: #fde5e5;

  /* aksen pendukung */
  --gold: #d99a00;
  --gold-bg: #fff5d6;

  --shadow-sm: 0 1px 2px rgba(29, 25, 64, .05);
  --shadow-md: 0 2px 4px rgba(29, 25, 64, .04), 0 14px 30px -18px rgba(29, 25, 64, .28);
  --shadow-lg: 0 10px 24px -10px rgba(29, 25, 64, .22), 0 30px 60px -30px rgba(74, 29, 149, .35);
  --ring: 0 0 0 4px rgba(103, 43, 225, .18);
  --radius: 14px;
  --radius-sm: 10px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box }

body {
  margin: 0; color: var(--ink); font: 15px/1.6 var(--font);
  background:
    radial-gradient(1100px 520px at 100% -80px, rgba(103, 43, 225, .07), transparent 60%),
    radial-gradient(900px 480px at -80px 10%, rgba(139, 92, 246, .06), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand-text); text-decoration-color: var(--brand-line); text-underline-offset: 2px }
h1 { font-size: 27px; line-height: 1.25; margin: 0 0 6px; font-weight: 800; letter-spacing: -.02em }
h2 { font-size: 19px; line-height: 1.3; margin: 0 0 10px; font-weight: 750; letter-spacing: -.01em }
h3 { font-size: 15.5px; line-height: 1.35; margin: 0 0 8px; font-weight: 700; letter-spacing: -.01em }
p { margin: 8px 0 }
ul { margin: 8px 0; padding-left: 20px }
li { margin: 4px 0 }
code { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .92em }
:focus-visible { outline: 3px solid rgba(103, 43, 225, .45); outline-offset: 2px; border-radius: 6px }

/* ---------- top bar ---------- */
header.top {
  background: var(--dark-grad); color: #fff; position: sticky; top: 0; z-index: 30;
  padding: 12px max(20px, calc((100% - 1240px) / 2));
  display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap;
  box-shadow: 0 10px 30px -18px rgba(23, 18, 51, .9);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
header.top .brand strong { font-size: 17px; display: block; letter-spacing: -.01em }
header.top .brand span { font-size: 12px; color: #b6accd }
header.top nav { display: flex; gap: 6px; flex-wrap: wrap }
header.top nav a {
  color: #d6cfee; text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05); transition: .16s ease;
}
header.top nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: translateY(-1px) }
header.top nav a.active {
  background: var(--brand-grad); border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px -8px rgba(103, 43, 225, .9);
}

/* ---------- structure ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 20px 64px }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px }
.page-head p { color: var(--muted); margin: 4px 0 0 }
.subnav {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
  position: sticky; top: 70px; background: rgba(247, 246, 252, .88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 10px 0; z-index: 20;
}
.screen { display: none; scroll-margin-top: 128px }
.screen.active { display: block; animation: screen-in .28s ease }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }

.subnav .tab {
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 99px;
  background: #fff; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: .16s ease;
}
.subnav .tab:hover { border-color: var(--brand-line); color: var(--brand-text); transform: translateY(-1px) }
.subnav .tab.active {
  background: var(--brand-grad); border-color: transparent; color: #fff;
  box-shadow: 0 8px 18px -10px rgba(103, 43, 225, .95);
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px }
.grid.g2 { grid-template-columns: repeat(2, 1fr) }
.grid.g4 { grid-template-columns: repeat(4, 1fr) }
.two { display: grid; grid-template-columns: 2fr 1fr; gap: 18px }
.two.rev { grid-template-columns: 1fr 2fr }
.layout { display: grid; grid-template-columns: 232px 1fr; gap: 18px; align-items: start }
.layout.narrow { grid-template-columns: 200px 1fr }

.card, .panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.card:hover { border-color: var(--brand-line) }
.card h3, .panel h2 { margin-top: 0 }
.stack > * + * { margin-top: 16px }

/* ---------- controls ---------- */
button, .button {
  padding: 9px 15px; border: 1px solid var(--brand-line); border-radius: var(--radius-sm);
  background: #fff; color: var(--brand-text); font-weight: 700; font-size: 14px;
  cursor: pointer; text-decoration: none; display: inline-block; font-family: inherit;
  transition: .16s ease; box-shadow: var(--shadow-sm);
}
button:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(103, 43, 225, .55); border-color: var(--brand) }
button:active, .button:active { transform: translateY(0) }
.primary {
  background: var(--brand-grad-strong); border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px -10px rgba(103, 43, 225, .85);
}
.primary:hover { color: #fff; border-color: transparent; box-shadow: 0 12px 26px -10px rgba(103, 43, 225, .95) }
.ghost { border-color: var(--line); color: var(--muted); background: #fff; box-shadow: none }
.ghost:hover { border-color: var(--muted); color: var(--ink); box-shadow: var(--shadow-sm) }
.danger { border-color: #f3c6c6; color: var(--bad); background: #fff }
.danger:hover { border-color: var(--bad); color: var(--bad); box-shadow: 0 8px 18px -10px rgba(201, 42, 42, .5) }
.small { padding: 5px 10px; font-size: 12px; border-radius: 8px }
button:disabled, .disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--ink); transition: .16s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring) }
input::placeholder, textarea::placeholder { color: #9b96b8 }
label { display: block; font-weight: 700; font-size: 13px; margin: 12px 0 5px }
label.option {
  display: block; font-weight: 500; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); margin: 10px 0; background: #fff; transition: .16s ease;
}
label.option:hover { border-color: var(--brand-line); background: var(--brand-softer) }
label.option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(103, 43, 225, .1) }
label:has(input[type=checkbox]) { font-weight: 500 }
.hint { font-size: 12px; color: var(--muted); font-weight: normal; margin-top: 4px }
.searchbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px }
.searchbar input, .searchbar select { width: auto; flex: 1; min-width: 150px }

/* ---------- bits ---------- */
.metric { font-size: 27px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em }
.muted { color: var(--muted) }
.small-txt { font-size: 13px }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap }
.row.start { align-items: flex-start }
.actions { display: flex; gap: 8px; flex-wrap: wrap }
.divider { border: 0; border-top: 1px solid var(--line); margin: 16px 0 }
.status {
  display: inline-block; padding: 4px 11px; border-radius: 99px;
  background: var(--gray-bg); color: var(--muted); font-size: 12px; font-weight: 700;
  border: 1px solid transparent; white-space: nowrap;
}
.status.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(14, 143, 96, .18) }
.status.wait { background: var(--warn-bg); color: var(--warn); border-color: rgba(164, 90, 0, .18) }
.status.bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(201, 42, 42, .18) }
.note {
  border-left: 4px solid var(--brand); padding: 11px 15px; background: var(--brand-softer);
  margin: 12px 0; font-size: 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-top: 1px solid var(--brand-line); border-right: 1px solid var(--brand-line);
  border-bottom: 1px solid var(--brand-line);
}
.note.warn { border-color: var(--warn-bg); border-left-color: var(--warn); background: var(--warn-bg) }
.note.bad { border-color: var(--bad-bg); border-left-color: var(--bad); background: var(--bad-bg) }
.anno {
  border: 1.5px dashed var(--brand-line); background: var(--brand-softer); color: #4b3f7a;
  border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px; margin: 12px 0;
}
.anno strong { color: var(--brand-text) }
.save { color: var(--ok); font-weight: 700 }
.save.err { color: var(--bad) }

/* ---------- tables ---------- */
.table-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: auto; box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; background: transparent }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top }
th {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  background: var(--brand-softer); font-weight: 700; border-bottom-color: var(--brand-line);
}
tbody tr:last-child td { border-bottom: 0 }
tbody tr { transition: background .12s ease }
tbody tr:hover { background: var(--brand-softer) }
td .actions button { margin-top: 4px }

/* ---------- sidebar menu ---------- */
.side {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; position: sticky; top: 132px; box-shadow: var(--shadow-sm);
}
.side a {
  display: block; padding: 9px 12px; border-radius: var(--radius-sm); text-decoration: none;
  color: var(--ink); font-size: 14px; font-weight: 500; transition: .14s ease;
  border-left: 3px solid transparent;
}
.side a:hover { background: var(--brand-softer); color: var(--brand-text) }
.side a.active {
  background: var(--brand-grad); color: #fff; font-weight: 700; border-left-color: transparent;
  box-shadow: 0 8px 18px -12px rgba(103, 43, 225, .95);
}
.side .group {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  padding: 12px 12px 5px; font-weight: 700;
}

/* ---------- landing page (public campaign) ---------- */
.lp {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; box-shadow: var(--shadow-md);
}
.lp-hero {
  background: linear-gradient(135deg, #451a9e 0%, #672be1 48%, #8b5cf6 100%);
  color: #fff; padding: 44px 34px; position: relative; overflow: hidden;
}
.lp-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(420px 220px at 88% -40px, rgba(255, 255, 255, .28), transparent 65%),
    radial-gradient(340px 200px at -40px 110%, rgba(217, 154, 0, .25), transparent 60%);
  pointer-events: none;
}
.lp-hero > * { position: relative }
.lp-hero h1 { font-size: 33px; margin: 0 0 10px; letter-spacing: -.025em }
.lp-hero .primary { background: #fff; border-color: #fff; color: var(--brand-text); box-shadow: 0 10px 24px -10px rgba(23, 18, 51, .55) }
.lp-hero .primary:hover { color: var(--brand-strong); box-shadow: 0 14px 30px -10px rgba(23, 18, 51, .6) }
.lp-hero .ghost { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .55); color: #fff; box-shadow: none }
.lp-body { padding: 26px 34px 34px }
.lp-price { font-size: 30px; font-weight: 800; color: var(--brand-text); letter-spacing: -.02em }
.lp-faq { border-top: 1px solid var(--line); padding-top: 14px }

/* ---------- exam ---------- */
.exam-head {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--dark-grad); color: #fff; padding: 15px 20px; border-radius: var(--radius);
  flex-wrap: wrap; box-shadow: var(--shadow-md);
}
.exam-head .timer { font-size: 21px; font-weight: 800; letter-spacing: -.01em }
.exam-head .save { color: #86efac }
.numbers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px }
.num {
  padding: 9px 4px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: .14s ease;
}
.num:hover { border-color: var(--brand-line); transform: translateY(-1px) }
.num.done { background: var(--ok-bg); border-color: rgba(14, 143, 96, .35); color: var(--ok) }
.num.current {
  background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); font-weight: 800;
  box-shadow: 0 0 0 3px rgba(103, 43, 225, .12);
}
.num.flag { background: var(--warn-bg); border-color: rgba(164, 90, 0, .4); color: var(--warn) }
.question { min-height: 280px }
.audio {
  display: flex; align-items: center; gap: 12px; background: var(--brand-softer);
  border: 1px solid var(--brand-line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0;
}
.audio .bar { flex: 1; height: 7px; background: var(--gray-bg); border-radius: 99px; position: relative; overflow: hidden }
.audio .bar::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 42%;
  background: var(--brand-grad-strong); border-radius: 99px;
}

/* ---------- dialogs (static wireframe) ---------- */
.dialog {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 22px; max-width: 560px; margin: 0 auto;
}
.dialog h2 { margin-top: 0 }
.dialog .actions { justify-content: flex-end; margin-top: 18px }
.overlay { background: rgba(23, 18, 51, .45); padding: 34px 16px; border-radius: var(--radius) }

/* ---------- code ---------- */
pre.code {
  background: #1a1440; color: #e6e0fb; padding: 15px; border-radius: var(--radius-sm);
  overflow: auto; font: 13px/1.55 "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap;
  border: 1px solid #2b2160;
}
.code-toolbar { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px }
.diff-add { background: rgba(20, 184, 122, .22); color: #7ff0be }
.diff-del { background: rgba(255, 107, 107, .18); color: #ff9d9d }

/* ---------- device preview ---------- */
.devices { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start }
.device-frame {
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  background: #fff; box-shadow: var(--shadow-sm);
}
.device-label {
  background: linear-gradient(180deg, var(--brand-softer), var(--soft));
  font-size: 12px; font-weight: 700; padding: 7px 11px; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.device-frame .inner { padding: 16px; font-size: 13px }

/* ---------- steps ---------- */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: 99px;
  padding: 7px 15px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.step.done { background: var(--ok-bg); border-color: rgba(14, 143, 96, .3); color: var(--ok) }
.step.current {
  background: var(--brand-grad); border-color: transparent; color: #fff; font-weight: 700;
  box-shadow: 0 8px 18px -10px rgba(103, 43, 225, .9);
}

/* ---------- index hub ---------- */
.hub-group { margin-bottom: 28px }
.hub-group h2 { border-bottom: 2px solid var(--brand-line); padding-bottom: 9px }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px }
.hub-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: .18s ease; position: relative; overflow: hidden;
}
.hub-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--brand-grad); opacity: 0; transition: .18s ease;
}
.hub-card:hover {
  border-color: var(--brand-line); transform: translateY(-3px);
  box-shadow: 0 2px 6px rgba(29, 25, 64, .05), 0 22px 40px -24px rgba(74, 29, 149, .5);
}
.hub-card:hover::before { opacity: 1 }
.hub-card strong { display: block; font-size: 15px; margin-bottom: 4px; color: var(--ink) }
.hub-card:hover strong { color: var(--brand-text) }
.hub-card span { font-size: 13px; color: var(--muted) }

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 11px; height: 11px }
::-webkit-scrollbar-track { background: transparent }
::-webkit-scrollbar-thumb { background: #d6d0ea; border-radius: 99px; border: 3px solid transparent; background-clip: padding-box }
::-webkit-scrollbar-thumb:hover { background: #bcb2df; background-clip: padding-box }

@media (max-width: 960px) {
  header.top { position: static }
  .subnav { top: 0 }
  .grid, .grid.g4, .hub-grid { grid-template-columns: 1fr 1fr }
  .two, .two.rev, .layout, .layout.narrow, .devices { grid-template-columns: 1fr }
  .side { position: static }
}
@media (max-width: 640px) {
  .grid, .grid.g2, .grid.g4, .hub-grid { grid-template-columns: 1fr }
  .wrap { padding: 16px 14px 50px }
  .subnav { position: static }
  table { font-size: 13px }
  .hide-sm { display: none }
  h1 { font-size: 23px }
  .lp-hero { padding: 30px 22px }
  .lp-hero h1 { font-size: 26px }
}
