/* Glass Eyes — dark professional UI */
:root {
  --bg: #0b0e14;
  --bg2: #11151f;
  --bg3: #171c29;
  --line: #232a3d;
  --txt: #dbe2f0;
  --muted: #8b94ab;
  --accent: #7dd3fc;
  --accent-dim: #38bdf8;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 15px; line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--bad); }

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 36px; width: 340px; }
.login-card input { width: 100%; margin: 12px 0; }

/* topbar */
.topbar {
  display: flex; align-items: center; gap: 28px;
  padding: 12px 24px; background: var(--bg2); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 18px; color: var(--txt); display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-eye { color: var(--accent); font-size: 22px; }
.topbar nav { display: flex; gap: 18px; }
.topbar nav a { color: var(--muted); font-weight: 500; }
.topbar nav a.active, .topbar nav a:hover { color: var(--accent); text-decoration: none; }

main { max-width: 1080px; margin: 0 auto; padding: 28px 24px 60px; }
.foot { text-align: center; padding: 24px; border-top: 1px solid var(--line); font-size: 13px; }

/* generic */
h1 { font-size: 24px; margin: 0 0 6px; font-weight: 700; }
h2 { font-size: 18px; margin: 28px 0 12px; font-weight: 650; }
h3 { font-size: 15px; margin: 20px 0 8px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  main { padding: 20px 14px 50px; }
  h1 { font-size: 20px; }
  .topbar { gap: 14px; padding: 10px 14px; overflow-x: auto; }
  .brand { font-size: 16px; flex-shrink: 0; }
  .topbar nav { gap: 12px; flex-shrink: 0; }
  .topbar nav a { font-size: 14px; white-space: nowrap; }
  /* Tabel: scroll horizontal di dalam card, jangan jebol layout */
  .card { overflow-x: auto; padding: 14px; }
  table { min-width: 620px; font-size: 13px; }
  th, td { padding: 8px 10px; white-space: nowrap; }
  td .mono { font-size: 12px; }
  .badge { white-space: nowrap; }
  .steps { flex-direction: column; }
  .kv { grid-template-columns: 110px 1fr; }
}

input, select, textarea {
  background: var(--bg3); border: 1px solid var(--line); color: var(--txt);
  border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-dim); }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 500; }

.btn {
  background: var(--bg3); border: 1px solid var(--line); color: var(--txt);
  border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn:hover { border-color: var(--accent-dim); }
.btn.primary { background: var(--accent-dim); border-color: var(--accent-dim); color: #04121c; }
.btn.primary:hover { background: var(--accent); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; border: 1px solid var(--line); color: var(--muted);
}
.badge.ok { color: var(--ok); border-color: #1d4d2e; background: #0f2417; }
.badge.warn { color: var(--warn); border-color: #5a4517; background: #241c0c; }
.badge.bad { color: var(--bad); border-color: #5c2323; background: #261011; }
.badge.info { color: var(--accent); border-color: #1e4a5f; background: #0c1c26; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: var(--bg3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.ev { font-size: 12px; color: var(--muted); }
.ev b { color: var(--accent-dim); font-weight: 600; }

.steps { display: flex; gap: 8px; margin: 20px 0; }
.step { flex: 1; text-align: center; font-size: 13px; color: var(--muted); padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.step.on { color: var(--accent); border-color: var(--accent-dim); background: #0c1c26; font-weight: 600; }
.step.done { color: var(--ok); }

.progress { height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; margin: 8px 0; }
.progress > div { height: 100%; background: var(--accent-dim); transition: width 0.4s; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

#graph-svg { width: 100%; height: 520px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); }
#graph-svg .node { cursor: pointer; }
#graph-svg .node circle { fill: var(--bg3); stroke: var(--accent-dim); stroke-width: 1.5; }
#graph-svg .node.seed circle { stroke: var(--accent); stroke-width: 2.5; }
#graph-svg .node text { fill: var(--txt); font-size: 11px; }
#graph-svg .edge { stroke: var(--line); stroke-width: 1; }
#graph-svg .edge-label { fill: var(--muted); font-size: 9px; }

.claim { border-left: 3px solid var(--ok); padding: 10px 14px; margin: 10px 0; background: var(--bg2); border-radius: 0 8px 8px 0; }
.claim.withheld { border-left-color: var(--bad); opacity: 0.75; }
.claim .conf { font-size: 12px; color: var(--muted); }

.corr { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 10px 0; background: var(--bg2); }
.corr .rule { font-size: 12px; color: var(--accent-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--bg3);
  border: 1px solid var(--accent-dim); color: var(--txt); padding: 12px 18px;
  border-radius: 10px; z-index: 50; max-width: 360px;
}
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 12px; }
