/* LePost UI v3
   Palet gelap kehijauan-hangat. Aksen oranye (burnt amber) HANYA di titik keputusan.
   Tipografi: Inter untuk UI, Fraunces (serif display) untuk heading besar.
   v3 — Premium, minimalist. Kurangi radius, hapus box-shadow dekoratif,
   perketat spacing, bersihkan tombol qcard, rapikan stat cards.
*/
:root {
  --bg: #0a0b0f;
  --surface: #111318;
  --card: #15171e;
  --raised: #1c1f28;
  --line: #252934;
  --line-soft: #1a1d25;
  --text: #f2f1ed;
  --text2: #b8b9c1;
  --muted: #72737b;

  --flame: #c87a4a;
  --flame-hi: #d08a5c;
  --flame-ink: #1a0d07;
  --flame-soft: rgba(200,122,74,.09);
  --flame-line: rgba(200,122,74,.25);

  --go: #5a9b78;
  --go-soft: rgba(90,155,120,.09);
  --go-line: rgba(90,155,120,.28);

  --stop: #b85c5c;
  --stop-soft: rgba(184,92,92,.09);
  --stop-line: rgba(184,92,92,.28);

  --info: #5a7fa0;
  --info-soft: rgba(90,127,160,.09);
  --info-line: rgba(90,127,160,.26);

  /* Tightened radius — less bubbly, more intentional */
  --r: 8px;
  --r-lg: 12px;
  --tap: 42px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --serif: "Fraunces", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --surface2: #12141b;
  --border: #252934;
  --text3: #565860;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
.ico { width: 16px; height: 16px; flex-shrink: 0; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100; min-height: var(--tap);
  display: inline-flex; align-items: center;
  background: var(--flame); color: #fff; font-weight: 700;
  padding: 10px 14px; border-radius: var(--r); text-decoration: none;
  transform: translateY(-160%); transition: transform .15s var(--ease);
}
.skip:focus { transform: none; }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }
.tabnum { font-variant-numeric: tabular-nums; }

/* ---------- LOGIN ---------- */
#view-login { min-height: 100dvh; padding: 0 16px 32px; max-width: 1040px; margin: 0 auto; }
.login-card {
  position: relative; width: 100%; max-width: 360px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 30px 24px;
}
.login-title { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 20px; }
.login-sub { color: var(--muted); font-size: 13.5px; margin-top: 5px; margin-bottom: 24px; }

/* ---------- BRAND / HEADER ---------- */
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--flame); color: #1a0d07;
  display: grid; place-items: center; flex-shrink: 0;
}
.brand-mark svg { width: 15px; height: 15px; }
.brand-mark-lg { width: 42px; height: 42px; border-radius: 11px; }
.brand-mark-lg svg { width: 21px; height: 21px; }
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10,11,15,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar {
  max-width: 1040px; margin: 0 auto; height: 54px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.hdr-right { display: flex; align-items: center; gap: 8px; }

/* ---------- PILL ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  padding: 4px 10px 4px 8px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; line-height: 1.3;
  text-transform: uppercase; letter-spacing: .04em;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill-on { background: var(--go-soft); color: var(--go); border: 1px solid var(--go-line); }
.pill-on::before { animation: blink 1.8s ease-in-out infinite; }
.pill-off { background: var(--raised); color: var(--muted); border: 1px solid var(--line); }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- NAV ---------- */
.nav { background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.nav-list {
  list-style: none; margin: 0 auto; padding: 0 8px; max-width: 1040px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
.nav a, .nav-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; width: 100%; min-height: 58px; padding: 8px 2px; border: 0; border-radius: var(--r);
  background: none; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600;
  transition: color .15s var(--ease);
}
@media (hover: hover) { .nav a:hover, .nav-btn:hover { color: var(--text2); } }
.nav a > span, .nav-btn > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a .ico, .nav-btn .ico { width: 19px; height: 19px; }
.nav a.active { color: var(--flame-hi); }
.nav a.active::before {
  content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px;
  border-radius: 0 0 2px 2px; background: var(--flame);
}
@media (min-width: 768px) {
  .nav-list { display: flex; gap: 2px; padding: 0 16px; }
  .nav a, .nav-btn { flex-direction: row; gap: 7px; width: auto; min-height: 50px; padding: 0 14px; font-size: 13px; }
  .nav a .ico, .nav-btn .ico { width: 15px; height: 15px; }
  .nav a.active::before { top: auto; bottom: 0; left: 12px; right: 12px; border-radius: 2px 2px 0 0; }
}

/* ---------- LAYOUT ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 20px 16px 56px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: minmax(0,1fr); }
@media (min-width: 520px) { .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.sec-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
@media (min-width: 640px) { .sec-head { flex-direction: row; align-items: center; justify-content: space-between; } }
.sec-title { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.sec-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sec-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.sec-actions .btn { width: 100%; }
@media (min-width: 640px) { .sec-actions { display: flex; } .sec-actions .btn { width: auto; } }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--tap); padding: 0 15px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--raised); color: var(--text2);
  font-size: 13.5px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  touch-action: manipulation; user-select: none;
  transition: background-color .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease), opacity .12s;
}
.btn:hover { background: #222630; color: var(--text); border-color: #2e3340; }
.btn:active { opacity: .85; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--flame); border-color: var(--flame); color: #1a0d07;
  font-weight: 700;
}
.btn-primary:hover { background: var(--flame-hi); border-color: var(--flame-hi); color: #1a0d07; }
.btn-start {
  background: var(--go-soft); border-color: var(--go-line); color: #8ecfa6; font-weight: 700;
}
.btn-start:hover { background: rgba(90,155,120,.18); }
.btn-stop {
  background: var(--stop-soft); border-color: var(--stop-line); color: #e09898; font-weight: 700;
}
.btn-stop:hover { background: rgba(184,92,92,.18); }
.btn-danger { color: var(--muted); }
.btn-danger:hover { background: var(--stop-soft); border-color: var(--stop-line); color: var(--stop); }
.btn-icon { width: var(--tap); padding: 0; }
.link-btn, .link {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 5px; margin: 0 -5px;
  background: none; border: 0; color: var(--flame-hi); font-size: 13px; font-weight: 600; text-decoration: none;
  border-radius: var(--r);
}
.link-btn:hover, .link:hover { text-decoration: underline; }

/* ---------- FORMS ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.label {
  font-size: 11.5px; font-weight: 700; color: var(--text2);
  text-transform: uppercase; letter-spacing: .05em;
}
.input, .select, .textarea {
  width: 100%; min-height: var(--tap); padding: 9px 12px; font-size: 15px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); outline: none;
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--flame);
  box-shadow: 0 0 0 3px rgba(200,122,74,.14);
}
.select:disabled, .input:disabled, .input[readonly] { opacity: .65; }
.input[readonly] { color: var(--flame-hi); border-color: var(--flame-line); }
.hint { font-size: 12px; color: var(--muted); line-height: 1.45; }
.field-set { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-set legend { padding: 0; margin-bottom: 4px; }
.set-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pick-list { display: grid; gap: 7px; max-height: 260px; overflow: auto; padding: 2px; }
.pick {
  display: grid; gap: 7px; padding: 10px 12px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .12s var(--ease), background-color .12s var(--ease);
}
.pick.is-on { border-color: var(--flame-line); background: var(--flame-soft); }
.pick .textarea { min-height: 60px; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; font-size: 14px; min-width: 0; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--flame); flex-shrink: 0; }
.check .muted { font-size: 13px; }
.field-box { padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px dashed var(--line); }

/* ---------- DIALOG ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(4,4,6,.8); backdrop-filter: blur(4px);
}
.dlg {
  position: relative; width: 100%; max-width: 500px;
  max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px 22px;
  box-shadow: 0 24px 48px rgba(0,0,0,.5);
}
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dlg-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.dlg-actions { display: grid; gap: 8px; margin-top: 6px; }
.dlg-msg { font-size: 13.5px; color: var(--muted); margin-top: 5px; word-break: break-word; }
.dlg-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; left: 16px; right: 16px; z-index: 80; margin: 0 auto; max-width: 400px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r);
  background: var(--raised); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  font-size: 13.5px; color: var(--text);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: none; }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--go); flex-shrink: 0; }
.toast.err .toast-dot { background: var(--stop); }

/* ---------- NOTICE / EMPTY / SKELETON ---------- */
.notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 13px 15px; border-radius: var(--r); background: var(--stop-soft); border: 1px solid var(--stop-line);
}
.notice-title { font-weight: 700; color: #ffb4b4; font-size: 13.5px; }
.notice-msg { font-size: 13px; color: var(--text2); word-break: break-word; margin-top: 2px; }
.notice-inline { font-size: 13px; color: #ffb4b4; background: var(--stop-soft); border: 1px solid var(--stop-line); border-radius: var(--r); padding: 10px 12px; }
.empty {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px;
  padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--r-lg); background: var(--card);
}
.empty-ic {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--flame-soft); color: var(--flame-hi); margin-bottom: 4px;
}
.empty h3 { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.empty p { font-size: 13px; color: var(--muted); max-width: 300px; }
.empty .btn { margin-top: 10px; }
.inline-empty { padding: 20px 16px; text-align: center; }
.ie-title { font-size: 14px; font-weight: 600; color: var(--text2); }
.ie-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.skel {
  height: 120px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--card) 0%, var(--raised) 50%, var(--card) 100%);
  background-size: 200% 100%; animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- HERO + STATS ---------- */
.hero {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 20px 20px 22px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; --tone: var(--muted);
}
.hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--tone); }
.hero.is-live { --tone: var(--go); }
.hero-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tone); }
.hero-title { font-size: clamp(17px, 4.4vw, 21px); font-weight: 700; letter-spacing: -.02em; line-height: 1.3; color: var(--text); }
.hero-sub { font-size: 13px; color: var(--text2); }
.hero .link-btn { align-self: flex-start; margin-top: 2px; }
.ring { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; z-index: 1; --rtone: var(--muted); }
.ring.ring-good { --rtone: var(--go); }
.ring.ring-warn { --rtone: var(--flame); }
.ring.ring-bad { --rtone: var(--stop); }
.ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 5; }
.ring-fg { fill: none; stroke: var(--rtone); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 188.5; stroke-dashoffset: 188.5; transition: stroke-dashoffset .6s var(--ease); }
.ring-text { position: absolute; top: 0; height: 76px; width: 76px; display: grid; place-items: center; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--rtone); }
.ring-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.stats { display: grid; gap: 10px; margin-top: 12px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 15px 16px; display: flex; flex-direction: column; gap: 5px; min-width: 0;
  transition: border-color .15s var(--ease);
}
.stat-hero { position: relative; overflow: hidden; padding: 16px 18px 16px 20px; }
.stat-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--line); }
.stat-label { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-big { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 7px 0 3px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--muted); line-height: 1.4; }
.stat-hero .stat-sub { color: var(--text2); font-weight: 600; font-size: 12.5px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
/* stat icons — toned down: flat, no colorful backgrounds */
.stat-ic {
  width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center;
  margin-bottom: 6px; background: var(--raised); border: 1px solid var(--line);
}
.stat-ic svg { width: 14px; height: 14px; }
.ic-green { color: var(--go); }
.ic-red   { color: var(--stop); }
.ic-violet { color: var(--info); }
.stat-num { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.num-green { color: var(--text); }
.num-red   { color: var(--text); }
.num-violet { color: var(--text); }
.stat-lbl { font-size: 11.5px; font-weight: 700; color: var(--text2); margin-top: 1px; text-transform: uppercase; letter-spacing: .04em; }
.stat .stat-sub { font-size: 11.5px; }
#card-failed.is-alert { border-color: var(--stop-line); }
#card-active.is-live  { border-color: var(--go-line); }

/* ---------- PANELS ---------- */
.dash-grid { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 860px) { .dash-grid { grid-template-columns: minmax(0,2fr) minmax(0,1fr); } }
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; min-width: 0;
}
.panel + .panel { margin-top: 12px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
}
.panel-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.panel-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.panel-body { padding: 16px; }
.panel .loglist { border: 0; border-radius: 0; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-ok  { background: var(--go); }
.dot-err { background: var(--stop); }
.chart-empty { padding: 32px 8px; text-align: center; font-size: 13px; color: var(--muted); }
.bars {
  list-style: none; margin: 0; padding: 10px 6px 0; display: flex; align-items: flex-end; gap: 8px;
  border-bottom: 1px solid var(--line); min-height: 160px;
}
.bar-day { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bar-pair {
  height: 128px; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px;
  border-radius: 8px 8px 0 0;
}
.bar {
  width: min(14px, 46%); border-radius: 6px 6px 2px 2px; height: 0;
  transform-origin: bottom; transition: height .7s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 0 10px -2px currentColor;
}
.bar-ok  { background: linear-gradient(180deg, #7fc89a, var(--go)); color: rgba(90,155,120,.55); }
.bar-err { background: linear-gradient(180deg, #d58484, var(--stop)); color: rgba(184,92,92,.5); }
.bar-day:hover .bar { filter: brightness(1.15); }
.bar-lbl { font-size: 11px; color: var(--muted); padding-bottom: 7px; font-weight: 600; letter-spacing: .02em; }

.run-list { display: grid; gap: 7px; }
.run-item {
  position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 11px 13px 11px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--go-line); overflow: hidden;
}
.run-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--go); }
.run-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.run-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tag { font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 5px; flex-shrink: 0; letter-spacing: .04em; text-transform: uppercase; }
.tag-auto   { background: var(--info-soft); color: var(--info); border: 1px solid var(--info-line); }
.tag-bypass { background: var(--raised); color: var(--text2); border: 1px solid var(--line); }

/* ---------- QUERY CARDS ---------- */
.qlist { display: grid; gap: 12px; }
@media (min-width: 900px) { .qlist { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* Card itself — no decorative shadow, clean border */
.qcard {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 16px 16px 14px 20px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: border-color .15s var(--ease);
}
.qcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--line); }
.qcard.is-on { border-color: var(--go-line); }
.qcard.is-on::before { background: var(--go); }

.qhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.qtitle { font-size: 15px; font-weight: 700; line-height: 1.35; word-break: break-word; min-width: 0; letter-spacing: -.01em; }
.msg { font-size: 13px; color: var(--text2); line-height: 1.5; word-break: break-word; }
.msg-full {
  margin-top: 7px; max-height: 200px; overflow-y: auto; padding: 9px 11px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r);
}
.more { font-size: 13.5px; }
.more summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; min-height: 32px;
  color: var(--flame-hi); font-weight: 600; font-size: 12.5px; border-radius: var(--r);
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "▸"; font-size: 9px; transition: transform .15s var(--ease); }
.more[open] summary::before { transform: rotate(90deg); }
.acc-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.acc-line { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.acc-line > .chip { max-width: 100%; }
.meta { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 24px; max-width: 100%;
  padding: 2px 9px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line);
  color: var(--text2); font-size: 11.5px; line-height: 1.2; font-variant-numeric: tabular-nums; font-weight: 600;
}
.acc-line > .chip {
  background: transparent; border: 0; padding: 0; min-height: auto; color: var(--flame-hi);
  font-size: 12px; font-weight: 700;
}
.chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip .ico { width: 12px; height: 12px; color: var(--muted); }
.chip-auto   { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.chip-bypass { background: var(--raised); border-color: var(--line); color: var(--text2); font-weight: 700; }
.cd { font-size: 12px; color: var(--muted); margin-top: -2px; }
.is-on .cd { color: var(--go); font-weight: 600; }

/* Footer actions — compact, 4 buttons in 2×2 grid */
.qfoot {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px;
  padding-top: 11px; border-top: 1px solid var(--line-soft);
}
.qfoot .btn {
  flex-direction: row; gap: 6px;
  min-height: 36px; padding: 6px 10px;
  font-size: 12.5px; font-weight: 600;
  justify-content: center;
  border-radius: var(--r);
}
.qfoot .btn .ico { width: 13px; height: 13px; }
.qfoot .btn span { line-height: 1; }

/* ---------- LOGS ---------- */
.logbar { display: grid; gap: 10px; margin-bottom: 14px; }
@media (min-width: 720px) { .logbar { grid-template-columns: auto minmax(0,1fr) auto; align-items: center; } }

/* Segmented control — squared */
.seg {
  display: flex; gap: 3px; padding: 3px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.seg button {
  flex: 1; min-height: 36px; padding: 0 11px; border: 0; border-radius: calc(var(--r) - 2px);
  background: none; color: var(--muted); font-size: 12.5px; font-weight: 700; white-space: nowrap;
  transition: background-color .12s var(--ease), color .12s var(--ease);
}
.seg button:hover { color: var(--text2); }
.seg button[aria-pressed="true"] { background: var(--flame); color: #1a0d07; }

.loglist {
  list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.loglist li {
  display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 12px; row-gap: 5px;
  padding: 12px 16px; border-top: 1px solid var(--line-soft); align-items: center;
}
.loglist li:first-child { border-top: 0; }
.log-time { grid-column: 1; grid-row: 1; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.lvl { grid-column: 2; grid-row: 1; justify-self: end; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 5px; letter-spacing: .04em; text-transform: uppercase; }
.log-msg { grid-column: 1 / -1; grid-row: 2; font-size: 13.5px; color: var(--text2); word-break: break-word; min-width: 0; }
.log-msg.is-err { color: #ffb4b4; }
.lvl-ok   { background: var(--go-soft); color: var(--go); }
.lvl-err  { background: var(--stop-soft); color: var(--stop); }
.lvl-info { background: var(--raised); color: var(--muted); }
@media (min-width: 720px) {
  .loglist li { grid-template-columns: 108px minmax(0,1fr) 80px; }
  .log-time  { grid-column: 1; grid-row: 1; }
  .log-msg   { grid-column: 2; grid-row: 1; }
  .lvl       { grid-column: 3; grid-row: 1; }
}

/* ---------- ACCOUNTS ---------- */
.acc-list { display: grid; gap: 7px; margin-bottom: 16px; }
.acc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.acc-id { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.acc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--flame-soft); color: var(--flame-hi); border: 1px solid var(--flame-line);
  font-weight: 700; font-size: 13px;
}
.acc-text { min-width: 0; }
.acc-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-form { display: grid; gap: 13px; padding-top: 16px; border-top: 1px solid var(--line); }
.acc-form h3 { font-family: var(--serif); font-size: 14.5px; font-weight: 600; color: var(--flame-hi); }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- LANDING (sebelum login) ---------- */
html { scroll-behavior: smooth; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.land-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.land-brand { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.land-hero { display: grid; gap: 28px; padding: 24px 0 36px; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--flame-hi); }
.land-h1 { font-family: var(--serif); font-size: clamp(30px, 7vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin-top: 10px; }
.land-h1 em { color: var(--flame-hi); font-style: normal; }
.land-lead { color: var(--text2); font-size: 15px; line-height: 1.6; margin-top: 14px; max-width: 520px; }
.land-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.land-cta .btn { text-decoration: none; }
.land-hero .login-card { max-width: 400px; padding: 22px 20px; scroll-margin-top: 16px; }
.auth-seg { margin-bottom: 18px; width: 100%; }
.auth-seg button { flex: 1; }
.land-sec { padding: 40px 0 32px; border-top: 1px solid var(--line-soft); scroll-margin-top: 8px; }
.land-h2 { font-family: var(--serif); font-size: clamp(22px, 5vw, 28px); letter-spacing: -.02em; margin-bottom: 8px; }
.land-h2 + .land-lead { margin-top: 10px; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text2); }
.btn-ghost:hover { background: var(--raised); border-color: var(--flame-line); color: var(--flame-hi); }
.price-card-pop .btn-primary { letter-spacing: .02em; font-size: 14px; }

.land-pricing { position: relative; }
.price-grid { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; }
.price-card {
  position: relative; background: linear-gradient(180deg, var(--card), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 18px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.price-card { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; display: flex; flex-direction: column; }
.price-card:hover { transform: translateY(-4px); border-color: var(--flame-line); }
.price-feat { flex: 1; }
.price-card .btn { margin-top: 6px; }
.price-card-pop {
  border-color: var(--flame-line);
  box-shadow: 0 0 0 1px var(--flame-line), 0 20px 40px -24px rgba(200,122,74,.45);
}
.price-card-pop:hover { box-shadow: 0 0 0 1px var(--flame-line), 0 26px 48px -20px rgba(200,122,74,.6); }
.price-badge {
  position: absolute; top: -11px; left: 18px; background: var(--flame); color: var(--flame-ink);
  font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 3px 10px; border-radius: 999px;
  animation: badge-pulse 2.2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,122,74,.55); }
  50% { box-shadow: 0 0 0 6px rgba(200,122,74,0); }
}
@media (min-width: 640px) {
  .price-card-pop { transform: scale(1.03); }
  .price-card-pop:hover { transform: scale(1.03) translateY(-4px); }
}
.price-name { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.price-amt { font-family: var(--serif); font-size: 34px; font-weight: 600; color: var(--text); line-height: 1; }
.price-cur { font-size: 17px; font-weight: 600; margin-right: 2px; vertical-align: 6px; }
.price-k { font-size: 17px; margin-left: 2px; }
.price-per { display: block; font-family: var(--sans, Inter, sans-serif); font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 6px; }
.price-feat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.price-feat li { font-size: 13.5px; color: var(--text2); padding-left: 22px; position: relative; line-height: 1.55; }
.price-feat li::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px;
  background-color: var(--go-soft);
  border: 1px solid var(--go-line);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2l2 2 4-4' stroke='%235a9b78' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
}
@media (min-width: 640px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }

.feat-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.feat-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--flame-soft); border: 1px solid var(--flame-line); color: var(--flame-hi); margin-bottom: 10px; }
.feat-ico .ico { width: 20px; height: 20px; }
.feat h3 { font-size: 15px; font-weight: 700; }
.feat p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-top: 5px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-n { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--flame); color: var(--flame-ink); font-weight: 800; font-size: 14px; }
.step h3 { font-size: 15px; font-weight: 700; }
.step p { font-size: 13.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.contact-list { display: grid; gap: 10px; margin-top: 16px; }
.contact-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--r) + 2px);
  color: var(--text); text-decoration: none; min-height: var(--tap);
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.contact-item b { display: block; font-size: 14.5px; font-weight: 700; }
.contact-item span { font-size: 12px; color: var(--muted); word-break: break-all; }
.contact-item-body { flex: 1; min-width: 0; }
.contact-platform-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--platform-color, #888) 15%, transparent);
  color: var(--platform-color, #888);
  border: 1px solid color-mix(in srgb, var(--platform-color, #888) 25%, transparent);
}
.contact-platform-ico { width: 20px; height: 20px; }
.contact-arrow { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; transition: transform .15s; }
@media (hover: hover) {
  .contact-item:hover { border-color: var(--platform-color, var(--flame-line)); box-shadow: 0 2px 12px color-mix(in srgb, var(--platform-color, #888) 12%, transparent); transform: translateY(-1px); }
  .contact-item:hover .contact-arrow { transform: translateX(3px); }
}
.land-foot { text-align: center; color: var(--muted); font-size: 12px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
@media (min-width: 480px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid > li:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 50%; }
}
@media (min-width: 760px) {
  .land-hero { grid-template-columns: 1.2fr 1fr; gap: 48px; padding: 48px 0 56px; }
  .feat-grid { grid-template-columns: repeat(3, 1fr); }
  .feat-grid > li:last-child:nth-child(odd) { grid-column: unset; max-width: none; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .contact-list { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- ADMIN & LISENSI ---------- */
.dlg-wide { max-width: 640px; }
.dlg-sm { max-width: 400px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sub-h { font-size: 13px; font-weight: 700; margin: 18px 0 8px; color: var(--text2); }
.key-new { margin: 14px 0 0; padding: 12px; border: 1px dashed var(--flame-line); background: var(--flame-soft); border-radius: var(--r); display: grid; gap: 8px; }
.key-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--flame-hi); word-break: break-all; user-select: all; }
.row-col { display: grid; gap: 8px; width: 100%; min-width: 0; }
.row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.row-top .acc-name { white-space: normal; word-break: break-all; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-row.col { flex-direction: column; align-items: stretch; }
.badge { font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 5px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge-ok { background: var(--go-soft); color: var(--go); border: 1px solid var(--go-line); }
.badge-bad { background: var(--stop-soft); color: #ffb4b4; border: 1px solid var(--stop-line); }
.badge-adm { background: var(--info-soft); color: var(--info); border: 1px solid var(--info-line); }
button.pill { cursor: pointer; font: inherit; }
.pill-warn { background: rgba(200,150,60,.1); color: #d9a94c; border: 1px solid rgba(200,150,60,.3); }
.exp-banner { margin: 12px 0; }

/* ── hero stats counters ── */
.hero-stats {
  display: flex; gap: 0; margin-top: 32px; flex-wrap: nowrap; align-items: stretch;
  background: color-mix(in srgb, var(--flame-hi) 6%, transparent);
  border: 1px solid var(--flame-line); border-radius: calc(var(--r) + 4px);
  overflow: hidden; width: fit-content;
}
.hstat {
  display: flex; flex-direction: column; align-items: center; padding: 14px 20px;
  min-width: 0; flex-shrink: 0; gap: 2px;
  border-right: 1px solid var(--flame-line);
}
.hstat:last-child { border-right: none; }
.hstat-top { display: flex; align-items: baseline; gap: 2px; }
.hstat-n { font-size: 28px; font-weight: 800; color: var(--flame-hi); line-height: 1; font-family: 'Fraunces', Georgia, serif; }
.hstat-unit { font-size: 13px; font-weight: 700; color: var(--flame-hi); line-height: 1; opacity: .8; }
.hstat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.contact-ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--flame-soft); color: var(--flame-hi); flex-shrink: 0; border: 1px solid var(--flame-line); }
.contact-ico svg { width: 18px; height: 18px; }

/* ── admin stat grid ── */
.admin-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 4px; }
@media (min-width: 420px) { .admin-stat-grid { grid-template-columns: repeat(4, 1fr); } }
.admin-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; text-align: center; }
.admin-stat-n { font-size: 26px; font-weight: 800; color: var(--flame-hi); line-height: 1; }
.admin-stat-l { font-size: 11px; color: var(--text2); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* ── broadcast notice variants ── */
.notice-warn { background: rgba(200,150,30,.12); border-color: rgba(200,150,30,.3); }
.notice-warn .notice-title { color: #d9a94c; }
.notice-danger { background: rgba(220,50,50,.12); border-color: rgba(220,50,50,.3); }
.notice-danger .notice-title { color: #ff7070; }

/* ── canvas chart ── */
#chart canvas { display: block; border-radius: var(--r); }
