/* Satu Konsultan — sistem desain
   Motif: matriks 2×2 khas konsultan dan stabilo kuning untuk hal yang perlu perhatian. */
:root {
  --paper: #f1f3f6;
  --surface: #ffffff;
  --surface-2: #f6f7fa;
  --ink: #141d2e;
  --ink-2: #4d586b;
  --ink-3: #8590a2;
  --line: #dde2ea;
  --line-2: #eaedf2;
  --pine: #17766c;
  --pine-2: #1e8b7f;
  --pine-ink: #ffffff;
  --pine-soft: #dcefec;
  --deep: #14213a;
  --deep-2: #1d2d4c;
  --deep-ink: #e6ebf4;
  --deep-ink-2: #9aa8c2;
  --graphite: #1f2633;
  --pencil: #f2b53a;
  --pencil-soft: #fdf0d2;
  --sky: #2f63b5;
  --sky-soft: #e3ebf8;
  --danger: #b4372b;
  --danger-soft: #f9e3df;
  --shadow: 0 1px 2px rgba(20, 33, 58, .06), 0 4px 16px rgba(20, 33, 58, .06);
  --shadow-lg: 0 12px 40px rgba(20, 33, 58, .2);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c111b;
    --surface: #131a27;
    --surface-2: #192131;
    --ink: #e5eaf2;
    --ink-2: #a4afc2;
    --ink-3: #74809a;
    --line: #273248;
    --line-2: #1e2738;
    --pine: #4cc1b2;
    --pine-2: #6ad0c3;
    --pine-ink: #04201c;
    --pine-soft: #143632;
    --deep: #0a1020;
    --deep-2: #16213a;
    --graphite: #e5eaf2;
    --pencil-soft: #3b3017;
    --sky: #82aef0;
    --sky-soft: #172640;
    --danger: #ef8b7c;
    --danger-soft: #3b1c18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 750; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
a { color: var(--pine); }
.muted { color: var(--ink-2); }
.small { font-size: .84rem; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Kontrol ---------- */
button, .btn {
  font: inherit; font-weight: 650; line-height: 1.2;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: .6rem 1rem; border-radius: var(--radius-s);
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: .45rem;
  transition: background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--ink-3); }
button.primary, .btn.primary { background: var(--pine); border-color: var(--pine); color: var(--pine-ink); box-shadow: 0 2px 8px rgba(23, 118, 108, .25); }
button.primary:hover, .btn.primary:hover { background: var(--pine-2); border-color: var(--pine-2); }
button.danger, .btn.danger { color: var(--danger); }
button.ghost, .btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
button.ghost:hover, .btn.ghost:hover { background: var(--surface-2); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.sm, .btn.sm { padding: .38rem .7rem; font-size: .84rem; border-radius: 7px; }
button.icon-only { padding: .45rem; }
:focus-visible { outline: 3px solid var(--pencil); outline-offset: 2px; }

label { display: block; font-weight: 650; font-size: .88rem; margin-bottom: .35rem; }
input, select, textarea {
  font: inherit; width: 100%;
  padding: .62rem .8rem;
  border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px var(--pine-soft); }
textarea { min-height: 5rem; resize: vertical; }
input[type='checkbox'], input[type='radio'] { width: auto; accent-color: var(--pine); }
.field { margin-bottom: 1rem; }
.field .hint { font-size: .8rem; color: var(--ink-3); margin-top: .3rem; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.input-icon input { padding-left: 2.4rem; }
.row { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.row > .grow, .grow { flex: 1 1 200px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.error-box { background: var(--danger-soft); color: var(--danger); padding: .75rem .95rem; border-radius: var(--radius-s); margin-bottom: 1rem; font-weight: 550; }
.switch { display: flex; gap: .6rem; align-items: center; font-weight: 550; }

/* ---------- Motif bulatan LJK ---------- */
.ljk { display: grid; grid-template-columns: repeat(5, 1.5rem); gap: .55rem .8rem; }
.ljk span { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid currentColor; opacity: .45; display: grid; place-items: center; font-size: .66rem; font-weight: 800; }
.ljk span.fill { background: var(--pencil); border-color: var(--pencil); color: var(--deep); opacity: 1; }
.logo { width: 28px; height: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; flex: none; }
.logo i { border-radius: 4px; border: 2px solid currentColor; opacity: .5; }
.logo i:nth-child(2) { background: var(--pencil); border-color: var(--pencil); opacity: 1; }
.logo i:nth-child(3) { background: currentColor; opacity: 1; }
.brand { font-weight: 800; font-size: 1.05rem; display: flex; gap: .6rem; align-items: center; letter-spacing: -0.01em; }

/* ---------- Halaman masuk ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-side {
  background: var(--deep); color: var(--deep-ink);
  padding: 3rem clamp(2rem, 5vw, 4.5rem);
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  position: relative; overflow: hidden;
}
.auth-side::after {
  content: ''; position: absolute; right: -80px; bottom: -80px; width: 380px; height: 380px;
  background: linear-gradient(rgba(242, 181, 58, .1) 0 0) 0 0 / 48% 48% no-repeat, linear-gradient(rgba(255,255,255,.04) 0 0) 100% 0 / 48% 48% no-repeat,
    linear-gradient(rgba(255,255,255,.04) 0 0) 0 100% / 48% 48% no-repeat, linear-gradient(rgba(255,255,255,.07) 0 0) 100% 100% / 48% 48% no-repeat;
  border-radius: 24px; transform: rotate(-8deg);
}
.auth-side h1 { font-size: clamp(2.2rem, 4vw, 3.3rem); max-width: 13ch; line-height: 1.05; color: #fff; letter-spacing: -0.03em; }
.auth-side p { max-width: 44ch; color: var(--deep-ink-2); }
.auth-hero { display: grid; grid-template-columns: 1fr auto; gap: 2.5rem; align-items: center; position: relative; z-index: 1; }
.auth-feats { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: .75rem; }
.auth-feats li { display: flex; gap: .7rem; align-items: center; color: var(--deep-ink); font-weight: 550; }
.auth-feats li span { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: grid; place-items: center; color: var(--pencil); }
.auth-main { display: grid; place-items: center; padding: 2rem; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 2.25rem; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 1.45rem; font-weight: 800; }
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { padding: 2rem; }
  .auth-hero { grid-template-columns: 1fr; }
  .auth-hero .ljk, .auth-feats { display: none; }
  .auth-card { padding: 1.5rem; box-shadow: none; }
}

/* ---------- Kerangka admin ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--deep); color: var(--deep-ink);
  padding: 1.4rem 1rem 1rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .brand { padding: 0 .5rem; color: #fff; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav .nav-label { font-size: .74rem; color: var(--deep-ink-2); padding: .9rem .75rem .35rem; font-weight: 650; }
.side nav a {
  color: var(--deep-ink-2); text-decoration: none;
  padding: .58rem .75rem; border-radius: 10px; font-weight: 600;
  display: flex; align-items: center; gap: .7rem; position: relative;
}
.side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side nav a.active { background: rgba(255, 255, 255, .1); color: #fff; }
.side nav a.active::before { content: ''; position: absolute; left: -1rem; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--pencil); transform: translateX(.35rem); }
.company-pick { background: rgba(255, 255, 255, .06); border-radius: 12px; padding: .7rem; }
.company-pick label { color: var(--deep-ink-2); font-size: .74rem; font-weight: 650; }
.company-pick select { background: var(--deep-2); border-color: rgba(255, 255, 255, .14); color: #fff; font-weight: 650; padding: .5rem .6rem; }
.side .who { margin-top: auto; display: flex; gap: .7rem; align-items: center; padding: .75rem .5rem 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .84rem; color: var(--deep-ink-2); }
.side .who b { color: #fff; display: block; font-size: .9rem; }
.side .who button { color: var(--deep-ink-2); margin-left: auto; }
.side .who button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.main { padding: 2.2rem clamp(1rem, 3vw, 2.75rem) 4rem; max-width: 1280px; width: 100%; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--ink-2); margin: .3rem 0 0; max-width: 64ch; }
.eyebrow { color: var(--ink-2); font-weight: 600; margin: 0 0 .25rem; }
.mobile-top { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 30; transform: translateX(-100%); transition: transform .22s; padding-top: calc(1.4rem + env(safe-area-inset-top, 0px)); }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .4); }
  .mobile-top { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; background: var(--deep); color: #fff; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
  .mobile-top button { color: #fff; }
  .main { padding-top: 1.4rem; }
}
body.admin::before { content: ''; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 25; background: var(--deep); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.35rem 1.4rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.25rem; }
.dash-grid > .panel { margin-bottom: 0; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }

/* kartu statistik */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; align-items: center; }
.stat .chip { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.stat b { font-size: 1.85rem; line-height: 1; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -0.02em; }
.stat span { color: var(--ink-2); font-size: .85rem; font-weight: 550; }
.stat.hero { background: var(--deep); border-color: var(--deep); color: #fff; }
.stat.hero .chip { background: rgba(255, 255, 255, .1); color: var(--pencil); }
.stat.hero span { color: var(--deep-ink-2); }
.stat .chip.pine { background: var(--pine-soft); color: var(--pine); }
.stat .chip.pencil { background: var(--pencil-soft); color: #8a5d00; }
.stat .chip.sky { background: var(--sky-soft); color: var(--sky); }
@media (prefers-color-scheme: dark) { .stat .chip.pencil { color: var(--pencil); } }

/* grafik ringan */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 1rem; }
.chart-bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; }
.chart-bars .col i { width: 100%; max-width: 30px; border-radius: 6px 6px 2px 2px; background: var(--pine-soft); min-height: 3px; position: relative; }
.chart-bars .col i.has { background: var(--pine); }
.chart-bars .col i em { position: absolute; top: -1.3rem; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .72rem; font-weight: 700; color: var(--ink-2); }
.chart-bars .col small { font-size: .68rem; color: var(--ink-3); white-space: nowrap; }
.donut-wrap { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.legend li { display: flex; align-items: center; gap: .55rem; font-size: .9rem; }
.legend li i { width: 10px; height: 10px; border-radius: 50%; }
.legend li b { margin-left: auto; padding-left: 1rem; font-variant-numeric: tabular-nums; }
.stack { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line-2); }
.stack i { display: block; height: 100%; }
.pos-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2.2fr auto; gap: 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.pos-row:last-child { border-bottom: 0; }
.c-done { background: var(--pine); } .c-prog { background: var(--pencil); } .c-inv { background: var(--ink-3); opacity: .45; } .c-exp { background: var(--danger); opacity: .7; }

/* daftar orang */
.person { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.person b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; color: #fff; position: relative; letter-spacing: .02em; }
.avatar.lg { width: 44px; height: 44px; font-size: .95rem; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #3fbf7f; border: 2px solid var(--surface); }
.side .avatar .dot { border-color: var(--deep); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: .9rem; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.ring { flex: none; }
.ring text { font-weight: 800; font-size: 11px; fill: var(--ink); font-family: var(--font); }

/* tabel */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .8rem .95rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th { font-weight: 700; color: var(--ink-2); background: var(--surface-2); white-space: nowrap; font-size: .8rem; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--ink-2); }
.empty .ljk { justify-content: center; margin: 0 auto 1rem; color: var(--ink-3); grid-template-columns: repeat(5, 1.1rem); gap: .4rem; }
.empty .ljk span { width: 1.1rem; height: 1.1rem; font-size: 0; }
.toolbar { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar .input-icon { flex: 1 1 240px; }
.toolbar select { width: auto; min-width: 160px; }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs button { border: 0; background: none; border-radius: 0; padding: .75rem .9rem; color: var(--ink-2); border-bottom: 2.5px solid transparent; margin-bottom: -1px; box-shadow: none; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--pine); }
.tabs button .count { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.badge.ok { background: var(--pine-soft); color: var(--pine); border-color: transparent; }
.badge.warn { background: var(--pencil-soft); color: #7a5806; border-color: transparent; }
.badge.bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--sky-soft); color: var(--sky); border-color: transparent; }
@media (prefers-color-scheme: dark) { .badge.warn { color: var(--pencil); } }

.progress-dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.progress-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.progress-dots i.done { background: var(--graphite); border-color: var(--graphite); }
.progress-dots i.started { background: var(--pencil); border-color: var(--pencil); }

/* menu aksi */
.menu { position: relative; display: inline-block; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .35rem; min-width: 210px; width: max-content; max-width: 290px; z-index: 40; text-align: left; }
.menu-pop button { white-space: nowrap; width: 100%; border: 0; background: none; justify-content: flex-start; padding: .55rem .7rem; font-weight: 600; box-shadow: none; }
.menu-pop button:hover { background: var(--surface-2); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line-2); margin: .3rem 0; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(8, 25, 19, .5); display: grid; place-items: center; padding: 1rem; z-index: 50; backdrop-filter: blur(2px); }
.modal { background: var(--surface); border-radius: var(--radius-l); width: min(720px, 100%); max-height: 92vh; overflow: auto; padding: 1.6rem 1.75rem; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.modal.wide { width: min(1000px, 100%); }
.modal h2 { font-size: 1.3rem; font-weight: 800; }
.modal-foot { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; position: sticky; bottom: -1.6rem; background: var(--surface); padding: 1rem 0 .3rem; border-top: 1px solid var(--line-2); flex-wrap: wrap; align-items: center; }
.toast { position: fixed; bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--deep); color: #fff; padding: .7rem 1.15rem; border-radius: 999px; z-index: 60; font-weight: 650; max-width: 90vw; box-shadow: var(--shadow-lg); display: flex; gap: .5rem; align-items: center; }
.toast::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--pencil); }

.test-pick { border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: start; margin-bottom: .45rem; cursor: pointer; transition: border-color .15s, background .15s; }
.test-pick:hover { border-color: var(--ink-3); }
.test-pick.on { border-color: var(--pine); background: var(--pine-soft); }
.test-pick input[type='number'] { width: 6rem; }
.cat-head { font-weight: 750; margin: 1.1rem 0 .45rem; color: var(--ink-2); font-size: .85rem; }
.q-edit { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: .75rem; background: var(--surface-2); }
.q-edit .opt { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; margin-bottom: .35rem; }
.q-edit .opt input[type='number'] { width: 4.5rem; }
.pw-box { display: flex; gap: .5rem; }
.pw-box input { font-family: ui-monospace, Consolas, monospace; }

/* ---------- Portal kandidat ---------- */
.cand-top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
body.cand::before { content: ''; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.cand-top .in { max-width: 880px; margin: 0 auto; padding: .75rem 1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.cand-top .brand { color: var(--pine); }
.cand-top .brand span.name { color: var(--ink); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.1rem; padding: .3rem .8rem; border-radius: 999px; border: 2px solid var(--ink); display: inline-flex; gap: .4rem; align-items: center; }
.timer.low { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.cand-main { max-width: 880px; margin: 0 auto; padding: 1.75rem 1rem 5rem; }
.welcome h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.cand-hero {
  background: var(--deep); color: var(--deep-ink); border-radius: var(--radius-l);
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem); display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
  position: relative; overflow: hidden; margin-bottom: 1.5rem;
}
.cand-hero::after { content: ''; position: absolute; right: -50px; top: -60px; width: 220px; height: 220px; border-radius: 22px; background: linear-gradient(rgba(242,181,58,.12) 0 0) 0 0 / 48% 48% no-repeat, linear-gradient(rgba(255,255,255,.05) 0 0) 100% 100% / 48% 48% no-repeat; transform: rotate(10deg); }
.cand-hero h1 { color: #fff; margin-bottom: .4rem; }
.cand-hero p { color: var(--deep-ink-2); margin: 0; max-width: 56ch; }
.cand-hero .ring text { fill: #fff; }
.cand-hero .eyebrow { color: var(--pencil); }
@media (max-width: 600px) { .cand-hero { grid-template-columns: 1fr; } }
.test-list { list-style: none; padding: 0; margin: 0 0 1.5rem; counter-reset: t; display: grid; gap: .65rem; }
.test-list li { counter-increment: t; display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow); }
.test-list li::before { content: counter(t); width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid var(--graphite); display: grid; place-items: center; font-weight: 800; }
.test-list li.done { box-shadow: none; background: var(--surface-2); }
.test-list li.done::before { content: '✓'; background: var(--graphite); color: var(--surface); }
.test-list li.next { border-color: var(--pine); box-shadow: 0 0 0 3px var(--pine-soft); }
.test-list li.next::before { border-color: var(--pencil); background: var(--pencil); color: #2a2f37; }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.tips div { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; color: var(--ink-2); }
.tips svg { color: var(--pine); margin-top: .1rem; }

.question { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); }
.q-no { color: var(--ink-2); font-weight: 650; margin-bottom: .7rem; display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; }
.q-progress { height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-bottom: 1.25rem; }
.q-progress i { display: block; height: 100%; background: var(--pine); transition: width .25s; }
.q-text { font-size: 1.15rem; font-weight: 650; margin-bottom: 1.35rem; max-width: 70ch; line-height: 1.5; }
.choices { display: flex; flex-direction: column; gap: .55rem; }
.choice { white-space: normal; display: grid; grid-template-columns: 2.2rem 1fr; gap: .85rem; align-items: center; text-align: left; font-weight: 500; padding: .75rem .9rem; width: 100%; background: var(--surface); border-radius: 12px; }
.choice:hover { border-color: var(--pine); background: var(--surface-2); }
.bubble { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 2px solid var(--graphite); display: grid; place-items: center; font-weight: 800; font-size: .85rem; transition: background .12s, transform .12s; }
.choice[aria-pressed='true'] { border-color: var(--graphite); background: var(--surface-2); }
.choice[aria-pressed='true'] .bubble { background: var(--graphite); color: var(--surface); transform: scale(1.05); }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; }
.likert .choice { grid-template-columns: 1fr; justify-items: center; text-align: center; font-size: .8rem; padding: .85rem .3rem; gap: .5rem; }
@media (max-width: 560px) { .likert { grid-template-columns: 1fr; } .likert .choice { grid-template-columns: 2.2rem 1fr; justify-items: start; text-align: left; font-size: .9rem; } }
.disc-table { width: 100%; border-collapse: separate; border-spacing: 0 .45rem; }
.disc-table td, .disc-table th { border: 0; padding: .3rem .4rem; background: transparent; }
.disc-table tbody tr:hover { background: transparent; }
.disc-table th { text-align: center; font-size: .8rem; background: transparent; }
.disc-table td.word { background: var(--surface-2); border-radius: 10px; padding: .8rem .9rem; font-weight: 600; }
.disc-table td.pick { text-align: center; width: 4.5rem; }
.disc-table .bubble { margin: 0 auto; cursor: pointer; background: var(--surface); padding: 0; justify-content: center; color: var(--ink); }
.disc-table .bubble[aria-pressed='true'] { background: var(--graphite); color: var(--surface); }
.q-nav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.25rem; flex-wrap: wrap; }
.sheet { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .4rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.sheet button { width: 2.35rem; height: 2.35rem; padding: 0; justify-content: center; border-radius: 50%; font-size: .8rem; border: 2px solid var(--line); }
.sheet button.ans { background: var(--graphite); color: var(--surface); border-color: var(--graphite); }
.sheet button.flag { background: var(--pencil); border-color: var(--pencil); color: #2a2f37; }
.sheet button.cur { outline: 3px solid var(--pine); outline-offset: 2px; }
.flag-btn[aria-pressed='true'] { background: var(--pencil); border-color: var(--pencil); color: #2a2f37; }
.krae { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: start; }
.krae-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 1rem 1.25rem; font-variant-numeric: tabular-nums; font-size: 1.65rem; font-weight: 800; display: flex; flex-direction: column; align-items: center; min-width: 8rem; box-shadow: var(--shadow); }
.krae-col .d { height: 2.4rem; display: flex; align-items: center; gap: .8rem; color: var(--ink-3); }
.krae-col .d.on { color: var(--ink); }
.krae-col .gap { height: 2rem; width: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.krae-col .gap .a { position: absolute; left: calc(50% + 1.6rem); font-size: 1rem; font-weight: 800; color: var(--pine); }
.krae-col .gap.cur span { width: 2.2rem; height: 2.2rem; border: 2px dashed var(--pencil); border-radius: 50%; }
.keypad { display: grid; grid-template-columns: repeat(5, 3.6rem); gap: .5rem; }
.keypad button { height: 3.6rem; font-size: 1.35rem; justify-content: center; padding: 0; border-radius: 14px; font-weight: 750; }
.keypad button:active { background: var(--graphite); color: var(--surface); }
.krae-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: .8rem 0; }
.krae-bar i { display: block; height: 100%; background: var(--pine); }
@media (max-width: 640px) { .krae { grid-template-columns: 1fr; } .keypad { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Laporan ---------- */
.report { max-width: 920px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.report-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-bottom: 1rem; }
.report-head { background: var(--deep); color: var(--deep-ink); border-radius: var(--radius-l); padding: 1.75rem 2rem; margin-bottom: 1.75rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.report-head h1 { margin: .2rem 0; color: #fff; }
.report-head .muted { color: var(--deep-ink-2); }
.report-head b { color: #fff; }
.verdict { text-align: right; }
.verdict b { display: block; font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; margin: .2rem 0 .4rem; }
.r-section { margin-bottom: 1.5rem; break-inside: avoid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.35rem 1.5rem; }
.r-section h2 { margin-bottom: .3rem; }
.r-section .table-wrap { box-shadow: none; }
.bar-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) 3fr 3.2rem; gap: .75rem; align-items: center; margin-bottom: .5rem; font-size: .9rem; }
.bar { height: 12px; background: var(--line-2); border-radius: 6px; overflow: hidden; position: relative; }
.bar i { display: block; height: 100%; background: var(--pine); border-radius: 6px; }
.bar .min { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--danger); }
.dim-desc { font-size: .84rem; color: var(--ink-2); margin: -.2rem 0 .8rem; }
.signoff { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3rem; }
.signoff div { border-top: 1px solid var(--ink); padding-top: .4rem; font-size: .85rem; color: var(--ink-2); }
.disclaimer { font-size: .8rem; color: var(--ink-2); border-left: 3px solid var(--pencil); padding-left: .8rem; }

@media print {
  :root { --paper: #fff; --surface: #fff; --surface-2: #f4f6f5; --ink: #111; --ink-2: #444; --line: #ccc; --line-2: #e3e3e3; --pine: #1e5b49; --graphite: #222; --deep: #0f3328; color-scheme: light; --shadow: none; }
  body { background: #fff; font-size: 12px; }
  .no-print, .report-actions { display: none !important; }
  .report { padding: 0; max-width: none; }
  .report-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .r-section { page-break-inside: avoid; border: 0; padding: 0 0 1rem; border-bottom: 1px solid #ddd; border-radius: 0; }
  .bar i, .bar .min, .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  textarea { border: 0; padding: 0; min-height: 0; resize: none; }
  @page { margin: 16mm 14mm; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Komponen tambahan Satu Konsultan ---------- */
.quad { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 180px; }
.quad i { aspect-ratio: 1; border-radius: 14px; border: 2px solid rgba(255,255,255,.18); }
.quad i:nth-child(2) { background: var(--pencil); border-color: var(--pencil); }
.quad i:nth-child(3) { background: rgba(255,255,255,.12); border-color: transparent; }
.hl { background: linear-gradient(transparent 55%, var(--pencil-soft) 55%); padding: 0 .1em; }
.kv { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: .55rem 1rem; margin: 0; }
.kv dt { color: var(--ink-2); font-size: .86rem; font-weight: 600; }
.kv dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.kv dd:empty::after { content: '–'; color: var(--ink-3); }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: .1rem; } .kv dd { margin-bottom: .6rem; } }
.detail-head { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.25rem; }
.crumb { display: inline-flex; gap: .35rem; align-items: center; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .88rem; margin-bottom: .5rem; }
.crumb:hover { color: var(--ink); }
.meta-line { display: flex; gap: .5rem 1rem; flex-wrap: wrap; color: var(--ink-2); font-size: .88rem; margin-top: .4rem; align-items: center; }
.meta-line span { display: inline-flex; gap: .35rem; align-items: center; }
.progress { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--pine); border-radius: 4px; }
.proj-row { display: grid; grid-template-columns: 1fr 140px auto; gap: 1rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; }
.proj-row:last-child { border-bottom: 0; }
.proj-row:hover b { color: var(--pine); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 10px 1fr; gap: .8rem; padding: .55rem 0; position: relative; font-size: .9rem; }
.feed li::before { content: ''; width: 9px; height: 9px; border-radius: 2px; background: var(--line); margin-top: .45rem; }
.feed li:first-child::before { background: var(--pencil); }
.feed b { font-weight: 700; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: .9rem; overflow-x: auto; padding-bottom: .5rem; align-items: start; }
.lane { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: .75rem; min-height: 120px; }
.lane-head { display: flex; justify-content: space-between; align-items: center; font-weight: 750; font-size: .88rem; margin: 0 .2rem .7rem; }
.lane-head .count { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 .5rem; font-size: .75rem; color: var(--ink-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .75rem .85rem; margin-bottom: .55rem; box-shadow: var(--shadow); cursor: pointer; transition: border-color .15s; }
.card:hover { border-color: var(--pine); }
.card b { display: block; font-weight: 700; margin-bottom: .35rem; line-height: 1.35; }
.card .card-meta { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; font-size: .8rem; color: var(--ink-2); }
.card .late { color: var(--danger); font-weight: 700; }
.card select { font-size: .8rem; padding: .3rem .4rem; margin-top: .55rem; }
.chat { display: flex; flex-direction: column; gap: .7rem; padding: 1rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); max-height: 60vh; overflow-y: auto; }
.msg { max-width: min(78%, 620px); display: flex; gap: .6rem; align-items: flex-end; }
.msg .bubble-text { background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: .6rem .85rem; white-space: pre-wrap; word-break: break-word; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble-text { background: var(--pine); color: var(--pine-ink); border-color: var(--pine); border-radius: 14px 14px 4px 14px; }
.msg .who-line { font-size: .74rem; color: var(--ink-3); margin-bottom: .2rem; }
.msg.me .who-line { text-align: right; }
.composer { display: flex; gap: .6rem; margin-top: .8rem; align-items: flex-end; }
.composer textarea { min-height: 3rem; }
.scale-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line-2); }
.scale-row:last-child { border-bottom: 0; }
.scale { display: flex; gap: .35rem; }
.scale button { width: 2.4rem; height: 2.4rem; padding: 0; justify-content: center; border-radius: 10px; font-weight: 800; }
.scale button[aria-pressed='true'] { background: var(--deep); border-color: var(--deep); color: #fff; }
@media (prefers-color-scheme: dark) { .scale button[aria-pressed='true'] { background: var(--pine); color: var(--pine-ink); border-color: var(--pine); } }
@media (max-width: 640px) { .scale-row { grid-template-columns: 1fr; } }
.scale-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: var(--ink-2); }
.items-table input { padding: .45rem .55rem; }
.items-table td { padding: .35rem; vertical-align: middle; }
.items-table th { padding: .45rem .35rem; }
.items-total { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1.5rem; justify-content: end; margin: .8rem 0 0 auto; max-width: 340px; font-size: .92rem; }
.items-total b { text-align: right; font-variant-numeric: tabular-nums; }
.gbars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 1rem; }
.gbars .grp { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: .35rem; }
.gbars .bars { display: flex; gap: 2px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.gbars .bars i { width: 30%; max-width: 14px; border-radius: 3px 3px 0 0; min-height: 2px; }
.gbars small { font-size: .68rem; color: var(--ink-3); }
.c-a { background: var(--sky); } .c-b { background: var(--pine); } .c-c { background: var(--pencil); }
.hbar { display: grid; grid-template-columns: minmax(110px, 160px) 1fr auto; gap: .8rem; align-items: center; font-size: .88rem; margin-bottom: .5rem; }
.hbar .track { height: 12px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--pine); border-radius: 6px; }
.notice { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; background: var(--pencil-soft); border-radius: 12px; margin-bottom: 1.25rem; }
.notice svg { color: #8a5d00; margin-top: .1rem; }
@media (prefers-color-scheme: dark) { .notice svg { color: var(--pencil); } }
.gap-item { padding: .9rem 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: start; }
.gap-item:last-child { border-bottom: 0; }
.score-chip { width: 2.2rem; height: 2.2rem; border-radius: 8px; display: grid; place-items: center; font-weight: 800; background: var(--danger-soft); color: var(--danger); }
.score-chip.mid { background: var(--pencil-soft); color: #8a5d00; }
.link-row { cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips label { display: inline-flex; gap: .4rem; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .75rem; font-weight: 600; font-size: .85rem; margin: 0; cursor: pointer; }
.chips label:has(input:checked) { border-color: var(--pine); background: var(--pine-soft); color: var(--pine); }
.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Dokumen cetak ---------- */
.paper { max-width: 820px; margin: 1.5rem auto 3rem; background: #fff; color: #111; padding: 2.75rem 3rem; border-radius: 4px; box-shadow: var(--shadow); font-size: 13.5px; }
.paper h1 { font-size: 1.5rem; color: #111; }
.paper table th { background: #f3f5f8; color: #333; }
.paper td, .paper th { border-bottom: 1px solid #e3e6eb; color: #111; }
.paper tbody tr:hover { background: transparent; }
.letterhead { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 3px solid #14213a; padding-bottom: 1rem; margin-bottom: 1.5rem; }
.letterhead .firm { font-weight: 800; font-size: 1.2rem; color: #14213a; }
.paper .muted { color: #555; }
.paper .badge { border: 1px solid #ccc; }
@media print {
  body { background: #fff; }
  .paper { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .print-bar { display: none !important; }
}

.stat.hero .ring text { fill: #fff; }
@media (max-width: 600px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stat { grid-template-columns: 1fr; padding: .9rem; gap: .4rem; }
  .stat .chip { grid-row: auto; width: 36px; height: 36px; }
  .stat b { font-size: 1.45rem; }
  .cand-hero .ring { display: none; }
}
