/* SITATA remake — design tokens & stylesheet modul login */
:root {
  --ink: #0b1c2c;
  --navy: #10305a;
  --navy-700: #16406f;
  --navy-300: #416894;
  --paper: #f7f6f2;
  --card: #ffffff;
  --line: #dfe3ea;
  --muted: #64748b;
  --gold: #c9a227;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --danger-line: #f0c3bd;
  --success: #12805c;
  --success-bg: #ecfdf3;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(11, 28, 44, .06), 0 1px 3px rgba(11, 28, 44, .06);
  --shadow-lg: 0 18px 50px -18px rgba(11, 28, 44, .35);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-700); }

/* ---------- layout ---------- */
.shell {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(400px, 1fr);
  min-height: 100vh;
}

/* ---------- brand panel ---------- */
.brand {
  position: relative;
  overflow: hidden;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #eaf0f7;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(201, 162, 39, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(65, 104, 148, .45), transparent 65%),
    linear-gradient(160deg, #0b1c2c 0%, #10305a 55%, #0d2540 100%);
}

.brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("motif.svg");
  background-size: 520px;
  background-repeat: repeat;
  opacity: .16;
  pointer-events: none;
}

.brand__top, .brand__mid, .brand__foot { position: relative; z-index: 1; }

.brand__crest {
  display: flex;
  align-items: center;
  gap: 14px;
}

.crest-mark {
  width: 46px;
  height: 46px;
  flex: none;
}

.brand__inst {
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(234, 240, 247, .72);
  max-width: 320px;
}

.brand__mid { margin: 40px 0; }

.brand__wordmark {
  font-size: clamp(52px, 6.4vw, 84px);
  font-weight: 800;
  letter-spacing: .16em;
  line-height: .95;
  margin: 0;
  color: #fff;
}

.brand__wordmark span { color: var(--gold); }

.brand__tagline {
  margin: 14px 0 0;
  font-size: 17px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(234, 240, 247, .78);
}

.brand__rule {
  width: 64px;
  height: 3px;
  margin: 26px 0;
  background: var(--gold);
  border-radius: 2px;
}

.brand__note {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(234, 240, 247, .66);
  max-width: 430px;
}

.brand__foot {
  display: flex;
  gap: 26px;
  font-size: 12px;
  color: rgba(234, 240, 247, .5);
  letter-spacing: .02em;
}

/* ---------- form panel ---------- */
.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

.card {
  width: 100%;
  max-width: 420px;
}

.card__head { margin-bottom: 22px; }

.card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy-300);
  margin-bottom: 12px;
}

.card h1 {
  margin: 0 0 8px;
  font-size: 25px;
  letter-spacing: -.01em;
  font-weight: 700;
}

.card__sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pill--ok { color: var(--success); background: var(--success-bg); border-color: #c6efd8; }
.pill--warn { color: var(--muted); background: #f1f5f9; border-color: var(--line); }
.pill--bad { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-line); }

.upstream {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #8593a6;
  letter-spacing: .01em;
}

.upstream.warn { color: #8a6d12; }

/* form */
form { margin-top: 24px; }

.field { margin-bottom: 16px; }

.field__label {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .02em;
  margin-bottom: 7px;
  color: #22364d;
}

.control {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}

.control:focus-within {
  border-color: var(--navy-300);
  box-shadow: 0 0 0 3px rgba(16, 48, 90, .1);
}

.control svg.lead {
  width: 18px;
  height: 18px;
  margin: 0 2px 0 13px;
  flex: none;
  color: #8a9bb0;
}

.control input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 13px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
}

.control input::placeholder { color: #a7b3c2; }

.control--invalid { border-color: var(--danger-line); background: #fffafa; }

.icon-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  color: #7b8b9e;
  display: inline-flex;
  border-radius: 8px;
}

.icon-btn:hover { color: var(--navy); background: #f1f5f9; }
.icon-btn:focus-visible { outline: 2px solid var(--navy-300); outline-offset: 1px; }

/* captcha */
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .control { flex: 1; }

.captcha-img {
  height: 46px;
  min-width: 132px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #eef1f5 center/contain no-repeat;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.captcha-img img { display: block; height: 44px; width: auto; }

/* checkbox */
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: #3d4f66;
  margin: 2px 0 20px;
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
  cursor: pointer;
}

/* button */
.btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .06s, background .15s, box-shadow .15s;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--navy-700), var(--navy));
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover:not(:disabled) { background: linear-gradient(180deg, #1a4a80, #123865); }
.btn--primary:active:not(:disabled) { transform: translateY(1px); }

.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn--ghost {
  background: #f1f5f9;
  color: var(--navy);
  border: 1px solid var(--line);
}

.btn--ghost:hover { background: #e8eef6; }

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* alert */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 16px;
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: #7a2018;
}

.alert svg { flex: none; width: 17px; height: 17px; margin-top: 1px; }
.alert[hidden] { display: none; }

.alert--info {
  border-color: #cfe0f2;
  background: #eff6fd;
  color: #1d3f63;
}

/* footer */
.card__foot {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
  color: #8593a6;
}

/* ---------- OTP dialog ---------- */
dialog {
  border: 0;
  padding: 0;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: min(430px, calc(100vw - 32px));
  background: var(--card);
  color: var(--ink);
}

dialog::backdrop { background: rgba(11, 28, 44, .55); backdrop-filter: blur(2px); }

.dialog__body { padding: 26px 26px 22px; }
.dialog__body h2 { margin: 0 0 8px; font-size: 19px; }
.dialog__body p { margin: 0 0 18px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }

.otp-grid { display: flex; gap: 9px; margin-bottom: 16px; }

.otp-grid input {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  text-align: center;
  font-size: 21px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--navy);
  background: #fbfcfd;
}

.otp-grid input:focus {
  border-color: var(--navy-300);
  box-shadow: 0 0 0 3px rgba(16, 48, 90, .1);
  background: #fff;
}

.dialog__actions { display: flex; gap: 10px; }
.dialog__actions .btn { flex: 1; }

.dialog__hint {
  font-size: 12px;
  color: #8593a6;
  margin: 14px 0 0;
  display: flex;
  justify-content: space-between;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--navy-700);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:disabled { color: #a7b3c2; cursor: not-allowed; text-decoration: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .brand { padding: 30px 24px 26px; }
  .brand__mid { margin: 22px 0 6px; }
  .brand__note, .brand__foot { display: none; }
  .brand__wordmark { font-size: 42px; }
  .panel { padding: 26px 20px 40px; align-items: flex-start; }
  .card { max-width: 460px; margin: 0 auto; }
}

/* layar pendek (laptop 13" / jendela kecil): rapatkan agar tidak perlu scroll */
@media (min-width: 901px) and (max-height: 780px) {
  .brand { padding: 34px 48px; }
  .brand__mid { margin: 16px 0 8px; }
  .brand__note { display: none; }
  .brand__rule { margin: 16px 0; }
  .panel { padding: 22px 28px; }
  .card__head { margin-bottom: 16px; }
  form { margin-top: 18px; }
  .field { margin-bottom: 12px; }
  .check { margin-bottom: 16px; }
  .card__foot { margin-top: 18px; padding-top: 12px; }
}

/* ======================= workspace verval ======================= */
.ws { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 62px); }
.ws__side {
  border-right: 1px solid var(--line); background: #fff; padding: 18px 14px;
  display: flex; flex-direction: column; gap: 18px;
}
.ws__side h4 {
  margin: 0 0 8px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #8593a6;
}
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.menu a, .menu span {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px;
  font-size: 13px; color: #3d4f66; text-decoration: none;
}
.menu a:hover { background: #f1f5f9; }
.menu a.is-active { background: #eef4fb; color: var(--navy); font-weight: 650; }
.menu span.is-off { color: #a7b3c2; cursor: default; }
.menu em { margin-left: auto; font-size: 9.5px; font-style: normal; letter-spacing: .06em; color: #a7b3c2; }

.ws__main { padding: 22px 26px 50px; max-width: 1180px; }

/* stepper */
.stepper { display: flex; align-items: center; gap: 0; margin: 4px 0 22px; }
.step { display: flex; align-items: center; gap: 10px; }
.step__num {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; background: #e8edf4; color: #7b8b9e; flex: none;
  border: 1px solid #dbe3ec;
}
.step__label { font-size: 12px; font-weight: 650; letter-spacing: .04em; color: #8593a6; text-transform: uppercase; }
.step.is-active .step__num { background: var(--navy); color: #fff; border-color: var(--navy); }
.step.is-active .step__label { color: var(--navy); }
.step.is-done .step__num { background: var(--success-bg); color: var(--success); border-color: #c6efd8; }
.step.is-done .step__label { color: var(--success); }
.step__bar { width: 46px; height: 2px; background: #e2e8f0; margin: 0 10px; }
.step__bar.is-done { background: #c6efd8; }

/* panel */
.panel-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px;
  box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.panel-card h3 { margin: 0 0 4px; font-size: 15.5px; }
.panel-card p.hint { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.form-row .field { margin: 0; }
select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font: inherit; font-size: 14px; color: var(--ink); background: #fff;
}
select:focus { outline: none; border-color: var(--navy-300); box-shadow: 0 0 0 3px rgba(16,48,90,.1); }

/* tabel */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 10px 12px; background: #f7f9fc; color: #516176;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid #eef1f6; vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover { background: #f7f9fc; }
table.data tbody tr.is-selected { background: #eef4fb; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.badge--ok { background: var(--success-bg); color: var(--success); }
.badge--bad { background: var(--danger-bg); color: var(--danger); }
.badge--warn { background: #fff8e5; color: #8a6d12; }
.badge--info { background: #eef4fb; color: var(--navy-700); }

/* skor */
.score { display: flex; align-items: center; gap: 18px; margin-bottom: 6px; }
.score__ring {
  --p: 100; width: 74px; height: 74px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--success) calc(var(--p) * 1%), #e8edf4 0);
  display: grid; place-items: center; position: relative;
}
.score__ring::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff;
}
.score__ring b { position: relative; z-index: 1; font-size: 17px; color: var(--ink); }
.score__meta { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.score__meta strong { color: var(--ink); }

.rule-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rule-list li {
  display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.55;
  padding: 8px 10px; border-radius: 8px; background: #fbfcfe; border: 1px solid #eef1f6;
}
.rule-list li.is-bad { background: var(--danger-bg); border-color: var(--danger-line); color: #7a2018; }
.rule-list li.is-ok { background: var(--success-bg); border-color: #c6efd8; color: #0f5c44; }
.rule-list code { font-size: 10.5px; color: #8593a6; margin-right: 2px; }
.rule-list li.is-bad code, .rule-list li.is-ok code { color: inherit; opacity: .7; }

.kv2 { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; font-size: 12.5px; }
.kv2 dt { color: var(--muted); }
.kv2 dd { margin: 0; font-weight: 600; }

.actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.actions .btn { width: auto; padding: 10px 18px; font-size: 13.5px; }
.btn--sm { padding: 9px 15px !important; font-size: 13px !important; }

.empty { padding: 22px; text-align: center; color: #8593a6; font-size: 13px; }

@media (max-width: 900px) {
  .ws { grid-template-columns: 1fr; }
  .ws__side { border-right: 0; border-bottom: 1px solid var(--line); }
  .ws__main { padding: 16px; }
  .stepper { flex-wrap: wrap; gap: 8px; }
  .step__bar { width: 22px; }
}
