/* ==========================================================================
   RylGoStream — design system (Fase 0a)
   Tema: calm nocturnal, teal-cyan accent. Dark-first.
   Boldness dipusatkan di satu tempat: sinyal "live / broadcast uptime".
   ========================================================================== */

/* ---- Tokens ---------------------------------------------------------------*/
:root {
  /* surfaces (deep blue-slate, bukan hitam pekat = terasa calm) */
  --bg:        #0f1720;
  --bg-elev:   #131d28;
  --card:      #17212b;
  --surface:   #1e2b38;
  --border:    #253544;
  --border-soft: #1c2937;

  /* ink */
  --text:      #e6edf3;
  --text-muted:#93a4b3;
  --text-dim:  #5f7488;

  /* brand + semantic */
  --accent:      #2dd4bf;
  --accent-strong:#14b8a6;
  --accent-ink:  #04201c;
  --accent-glow: rgba(45, 212, 191, .16);

  --live:      #4ade80;
  --scheduled: #60a5fa;
  --warning:   #fbbf24;
  --danger:    #f87171;
  --offline:   #64748b;

  /* shape + depth */
  --radius:    14px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --shadow:    0 1px 0 rgba(255,255,255,.02) inset, 0 10px 30px -12px rgba(0,0,0,.6);
  --ring:      0 0 0 3px var(--accent-glow);

  /* type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* layout */
  --sidebar-w: 248px;
  --topbar-h:  64px;
  --content-max: 1160px;

  --space:     20px;
}

/* ---- Reset / base ---------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 1.6rem; }
p  { margin: 0; }
a  { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); font-size: .82em; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num  { text-align: right; font-variant-numeric: tabular-nums; }
.text-muted { color: var(--text-muted); }
.text-dim   { color: var(--text-dim); }
.lead { font-size: 1.08rem; color: var(--text); }

.eyebrow {
  display: inline-block;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
}

/* ---- App shell ------------------------------------------------------------*/
.app { display: flex; min-height: 100vh; position: relative; }

/* ambient hairline across the top — the calm "signal" motif */
.app__beam {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--live) 55%, transparent);
  opacity: .55;
}

/* ---- Sidebar --------------------------------------------------------------*/
.sidebar {
  width: var(--sidebar-w); flex: none;
  background: linear-gradient(180deg, var(--bg-elev), var(--bg));
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column;
  padding: 22px 16px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand__mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-strong));
  box-shadow: 0 0 0 1px rgba(45,212,191,.35), 0 6px 18px -6px var(--accent);
}
.brand__name { font-weight: 650; letter-spacing: -.01em; font-size: 1.02rem; }

.sidenav { display: flex; flex-direction: column; gap: 3px; }
.sidenav__item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--text-muted); font-weight: 500;
  transition: background .15s, color .15s;
}
.sidenav__item:hover { background: var(--surface); color: var(--text); }
.sidenav__item.is-active { background: var(--accent-glow); color: var(--text); }
.sidenav__item.is-active .icon { color: var(--accent); }
.sidenav__item .icon { color: var(--text-dim); flex: none; }

.sidebar__foot { margin-top: auto; padding-top: 16px; }
.uptime-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border-soft);
  font-size: .82rem; color: var(--text-muted);
}

/* ---- Topbar ---------------------------------------------------------------*/
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(15, 23, 32, .72);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 40;
}
.topbar__title { display: flex; flex-direction: column; line-height: 1.15; }
.topbar__title h1 { font-size: 1.18rem; }
.topbar__title .eyebrow { font-size: .6rem; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar__burger { display: none; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; font-size: .9rem;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

/* ---- Content --------------------------------------------------------------*/
.content { padding: 28px; width: 100%; max-width: var(--content-max); margin: 0 auto; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.row-gap { display: flex; gap: 10px; }
.row-gap.wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.mt { margin-top: 14px; }

.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }

/* ---- Card -----------------------------------------------------------------*/
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card__title { font-size: 1.1rem; margin-top: 4px; }
.card--accent {
  border-color: transparent;
  background:
    radial-gradient(120% 140% at 100% 0%, var(--accent-glow), transparent 55%),
    var(--card);
  box-shadow: var(--shadow), 0 0 0 1px rgba(45,212,191,.25);
}
.card--attention {
  border-color: transparent;
  background:
    linear-gradient(100% 100% at 0% 0%, rgba(251,191,36,.09), transparent 45%),
    var(--card);
  box-shadow: var(--shadow), 0 0 0 1px rgba(251,191,36,.28);
}

/* ---- Dashboard intro ------------------------------------------------------*/
.intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.intro__title { font-size: 1.5rem; margin: 4px 0 4px; }

/* ---- Attention list -------------------------------------------------------*/
.eyebrow--warn { color: var(--warning); }
.attn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.attn-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px; border-top: 1px solid var(--border-soft);
}
.attn-item:first-child { border-top: none; }
.attn-item__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.attn-item__channel { font-weight: 550; }

/* ---- Live caption (polling hint) -----------------------------------------*/
.live-caption { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--text-dim); }

/* ---- Badge: asset statuses -----------------------------------------------*/
.badge--ready      { color: var(--live);    background: rgba(74,222,128,.12);  border-color: rgba(74,222,128,.3); }
.badge--processing { color: var(--accent);  background: var(--accent-glow);    border-color: rgba(45,212,191,.32); }

/* ---- Tabs (segmented) -----------------------------------------------------*/
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-elev); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 550; font-size: .9rem; color: var(--text-muted);
  padding: 8px 15px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.tab__count { font-size: .72rem; color: var(--text-dim); background: var(--surface); padding: 1px 7px; border-radius: var(--radius-pill); }
.tab.is-active .tab__count { color: var(--accent); }

/* ---- Asset grid + cards ---------------------------------------------------*/
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.asset-grid--thumbs { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.asset {
  display: flex; flex-direction: column; text-align: left;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 0; overflow: hidden; cursor: pointer;
  font: inherit; color: var(--text);
  transition: border-color .15s, transform .06s, box-shadow .15s;
}
.asset:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shadow); }
.asset:focus-visible { outline: none; box-shadow: var(--ring); }

.asset__cover {
  position: relative; aspect-ratio: 16 / 9;
  display: grid; place-items: center; color: rgba(255,255,255,.5);
}
.asset__cover .icon { width: 30px; height: 30px; }
.asset__dur {
  position: absolute; right: 8px; bottom: 8px;
  font-size: .72rem; padding: 2px 7px; border-radius: 6px;
  background: rgba(6,11,16,.7); color: #dfe8ef;
}
.asset__info { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 6px; min-width: 0; }
.asset__name { font-weight: 550; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset__sub { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset__foot { display: flex; align-items: center; gap: 8px; padding: 8px 14px 14px; }
.asset__src { margin-left: auto; font-size: .72rem; color: var(--text-dim); }

.asset--add {
  align-items: center; justify-content: center; gap: 10px;
  min-height: 180px; color: var(--text-muted);
  background: transparent; border: 1px dashed var(--border);
}
.asset--add:hover { border-color: var(--accent); color: var(--accent); transform: none; box-shadow: none; }
.asset--add .icon { width: 22px; height: 22px; }
.asset--add span { font-size: .88rem; font-weight: 550; }
.asset__upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 180px; cursor: pointer; }

/* Broadcast-thumbnail pool cards: real image preview + size/delete footer. */
.asset--thumb { cursor: default; }
.asset--thumb:hover { transform: none; }
.asset__thumbimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--bg-elev); }
.asset__thumbmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 10px; }

/* Custom broadcast-thumbnail picker (radio-of-images + Acak). */
.thumb-picker { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; }
.thumb-opt { flex: 0 0 auto; cursor: pointer; }
.thumb-opt input { position: absolute; opacity: 0; pointer-events: none; }
.thumb-opt img,
.thumb-opt--rand span {
  display: block; width: 96px; height: 54px; border-radius: 8px; object-fit: cover;
  border: 2px solid var(--border); background: var(--bg-elev);
}
.thumb-opt--rand span {
  display: grid; place-content: center; text-align: center;
  font-size: .72rem; line-height: 1.1; color: var(--text-muted);
}
.thumb-opt input:checked + img,
.thumb-opt input:checked + span { border-color: var(--accent); box-shadow: var(--ring); }

/* Playlist builder (combo multi-audio) */
.playlist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.playlist__item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: var(--bg-elev); }
.playlist__no { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-content: center; border-radius: 50%; background: var(--accent); color: #04121a; font-size: .72rem; font-weight: 700; }
.playlist__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }

/* ---- Asset detail modal ---------------------------------------------------*/
.modal__dialog--wide { max-width: 520px; }
.asset-detail { display: grid; grid-template-columns: 1fr; gap: 16px; }
.asset-detail__cover {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}
.asset-detail__player {
  width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border-soft);
  background: #000; display: block;
}
video.asset-detail__player { aspect-ratio: 16 / 9; }
audio.asset-detail__player { background: var(--surface); }
.meta-list { margin: 0; display: flex; flex-direction: column; gap: 0; }
.meta-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.meta-list > div:first-child { border-top: none; }
.meta-list dt { color: var(--text-muted); font-size: .85rem; }
.meta-list dd { margin: 0; font-size: .85rem; font-weight: 500; text-align: right; text-transform: capitalize; }

/* ---- Schedule (Phase 0e) --------------------------------------------------*/
.badge--done { color: var(--text-muted); background: var(--surface); border-color: var(--border); }

.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.row-actions .iconbtn { width: 30px; height: 30px; }
.row-actions .iconbtn .icon { width: 15px; height: 15px; }

.stack-form { display: flex; flex-direction: column; gap: 16px; }

.note {
  font-size: .82rem; color: var(--text-muted); line-height: 1.5;
  padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--border-soft);
}
.note--warn { background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.28); color: #e8d9b0; }
.note--ok   { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.28); color: #b7e9c6; cursor: pointer; }

.modal__dialog--xwide { max-width: 720px; }

/* dropzone (UI only) */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 40px 24px; text-align: center;
  border: 1.5px dashed var(--border); border-radius: var(--radius);
  background: var(--bg-elev); color: var(--text-muted); margin-bottom: 14px;
}
.dropzone .icon { width: 34px; height: 34px; color: var(--text-dim); }
.dropzone__title { font-weight: 600; color: var(--text); }
.dropzone .btn { margin-top: 8px; }

/* import preview summary chips */
.import-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { font-size: .82rem; font-weight: 600; padding: 5px 12px; border-radius: var(--radius-pill); border: 1px solid transparent; }
.chip--ok   { color: var(--live);    background: rgba(74,222,128,.12);  border-color: rgba(74,222,128,.3); }
.chip--skip { color: var(--text-dim);background: var(--surface);         border-color: var(--border); }
.chip--err  { color: var(--danger);  background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.3); }

/* import step indicator */
.stepper { list-style: none; display: flex; gap: 8px; margin: 0 0 20px; padding: 0; }
.stepper li {
  display: inline-flex; align-items: center; gap: 8px; flex: 1;
  font-size: .85rem; color: var(--text-dim);
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--border-soft);
}
.stepper__no {
  display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none;
  border-radius: 50%; font-size: .72rem; font-weight: 600;
  background: var(--surface); color: var(--text-muted);
}
.stepper li.is-active { color: var(--text); border-color: rgba(45,212,191,.4); background: var(--accent-glow); }
.stepper li.is-active .stepper__no { background: var(--accent); color: var(--accent-ink); }
.stepper li.is-done { color: var(--text-muted); }
.stepper li.is-done .stepper__no { background: rgba(74,222,128,.2); color: var(--live); }

.import-context { font-size: .85rem; color: var(--text-muted); margin-bottom: 14px; }
.import-context strong { color: var(--text); }

.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--accent); }

/* ---- Buttons --------------------------------------------------------------*/
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 550; line-height: 1;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .06s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn .icon { width: 16px; height: 16px; }

.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -8px var(--accent); }
.btn--primary:hover { background: #38ded0; }
.btn--accent { background: var(--surface); color: var(--accent); border-color: rgba(45,212,191,.35); }
.btn--accent:hover { background: #223244; }
.btn--ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface); color: var(--text); }
.btn--danger { background: transparent; color: var(--danger); border-color: rgba(248,113,113,.4); }
.btn--danger:hover { background: rgba(248,113,113,.12); }
.btn--sm { padding: 7px 12px; font-size: .85rem; }

.iconbtn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: transparent; border: 1px solid var(--border-soft);
  color: var(--text-muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.iconbtn:hover { background: var(--surface); color: var(--text); }
.iconbtn:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---- Badges + live pulse (the signature) ---------------------------------*/
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px; border-radius: var(--radius-pill);
  font-size: .78rem; font-weight: 600;
  border: 1px solid transparent;
}
.badge--live      { color: var(--live);      background: rgba(74,222,128,.12);  border-color: rgba(74,222,128,.3); }
.badge--scheduled { color: var(--scheduled); background: rgba(96,165,250,.12);  border-color: rgba(96,165,250,.3); }
.badge--offline   { color: var(--text-dim);  background: var(--surface);        border-color: var(--border); }
.badge--error     { color: var(--danger);    background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.3); }

.dot { width: 8px; height: 8px; border-radius: 50%; position: relative; flex: none; }
.dot--live { background: var(--live); }
.dot--live::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--live); animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(2.6); opacity: 0; }
  100% { opacity: 0; }
}

/* ---- Health pill (YouTube healthStatus, TDD §5) --------------------------*/
.health { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.health__bar { width: 4px; border-radius: 2px; background: var(--border); }
.health__bar:nth-child(1) { height: 6px; }
.health__bar:nth-child(2) { height: 11px; }
.health__bar:nth-child(3) { height: 16px; }
.health--good .health__bar { background: var(--live); }
.health--ok   .health__bar { background: var(--accent); }
.health--ok   .health__bar:nth-child(3) { background: var(--border); }
.health--bad  .health__bar:nth-child(1) { background: var(--warning); }
.health--bad  .health__bar:nth-child(2),
.health--bad  .health__bar:nth-child(3) { background: var(--border); }
.health--noData .health__bar { background: var(--danger); opacity: .5; }
.health--noData .health__bar:nth-child(1) { opacity: 1; }

/* ---- Stat tile ------------------------------------------------------------*/
.stat {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 16px 18px;
}
.stat__label { font-size: .8rem; color: var(--text-muted); }
.stat__value {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em;
  margin-top: 6px; line-height: 1;
}
.stat__unit { font-size: .9rem; color: var(--text-dim); margin-left: 5px; font-weight: 500; }
.stat__trend { font-size: .78rem; margin-top: 8px; color: var(--text-dim); }
.stat__trend--up   { color: var(--live); }
.stat__trend--down { color: var(--danger); }

/* ---- Forms ----------------------------------------------------------------*/
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: .82rem; font-weight: 550; color: var(--text-muted); }
.field__hint  { font-size: .76rem; color: var(--text-dim); }
.input {
  font: inherit; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--text-dim); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
textarea.input { resize: vertical; min-height: 76px; }
select.input { appearance: none; cursor: pointer; }

/* ---- Table ----------------------------------------------------------------*/
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.table th {
  text-align: left; font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim);
  padding: 0 14px 10px; border-bottom: 1px solid var(--border-soft);
}
.table th.num { text-align: right; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--bg-elev); }
.cell-strong { font-weight: 550; }

/* ---- Swatches (styleguide) ------------------------------------------------*/
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.swatch {
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: 10px; display: flex; flex-direction: column; gap: 3px;
}
.swatch::before {
  content: ""; height: 42px; border-radius: 6px; background: var(--c);
  border: 1px solid rgba(255,255,255,.06); margin-bottom: 6px;
}
.swatch span { font-size: .82rem; font-weight: 550; }
.swatch code { color: var(--text-dim); }
.type-row { display: flex; flex-direction: column; gap: 12px; }

/* ---- Modal ----------------------------------------------------------------*/
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal__scrim { position: absolute; inset: 0; background: rgba(6, 11, 16, .66); backdrop-filter: blur(2px); }
.modal__dialog {
  position: relative; width: 100%; max-width: 440px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  /* Head & foot diam, hanya .modal__body yang scroll. Flex column + max-height
     mengunci tinggi ke viewport; overflow-y sebagai fallback untuk modal yang
     belum punya .modal__body (mis. detail aset). */
  display: flex; flex-direction: column;
  max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain;
}
.modal__head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal__foot { flex-shrink: 0; display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
/* Form pembungkus (head di luar, foot di dalam form) ikut jadi kolom flex supaya
   body-nya yang scroll dan foot tetap menempel di bawah. */
.modal__form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
/* Area tengah yang boleh scroll. Margin/padding negatif supaya scrollbar duduk di
   tepi dialog, bukan memotong teks. */
.modal__body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  margin: 0 -22px; padding: 2px 22px;
}

/* ---- Scrim for off-canvas sidebar ----------------------------------------*/
.scrim { display: none; }

/* ---- Auth (login / register) ---------------------------------------------*/
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }

.auth__aside {
  position: relative;
  display: flex; flex-direction: column;
  padding: 48px 52px;
  border-right: 1px solid var(--border-soft);
  background:
    radial-gradient(90% 60% at 15% 0%, var(--accent-glow), transparent 60%),
    linear-gradient(160deg, var(--bg-elev), var(--bg) 70%);
  overflow: hidden;
}
.auth__aside .brand { padding: 0 0 8px; }
.auth__pitch { margin: auto 0; max-width: 440px; }
.auth__tagline { font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.08; margin-bottom: 18px; }
.auth__points { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.auth__points li { display: flex; align-items: center; gap: 11px; color: var(--text-muted); font-size: .95rem; }
.tick {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: var(--accent-glow); border: 1px solid rgba(45,212,191,.45);
  position: relative;
}
.tick::after {
  content: ""; position: absolute; left: 5px; top: 2px;
  width: 4px; height: 8px; border: solid var(--accent);
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.auth__metric { display: flex; flex-direction: column; gap: 2px; }
.auth__metric .mono { font-size: 1.5rem; font-weight: 600; color: var(--live); letter-spacing: -.02em; }
.auth__metric .text-dim { font-size: .82rem; }

.auth__main { display: grid; place-items: center; padding: 32px 24px; }
.auth__card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 34px 32px; box-shadow: var(--shadow); }
.auth__mark-sm { display: none; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 22px; }
.auth__head h2 { font-size: 1.5rem; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .btn { width: 100%; justify-content: center; padding-top: 12px; padding-bottom: 12px; margin-top: 4px; }
.auth-form__row { display: flex; align-items: center; justify-content: space-between; }
.auth__fineprint { font-size: .76rem; text-align: center; line-height: 1.5; }
.auth__switch { margin-top: 22px; text-align: center; color: var(--text-muted); font-size: .9rem; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--text-muted); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.link { color: var(--accent); font-size: .88rem; font-weight: 500; }
.link:hover { text-decoration: underline; }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 18px; }
.alert--error { color: var(--danger); background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); }

.topbar__user { font-size: .9rem; color: var(--text-muted); font-weight: 500; }

/* ---- Responsive -----------------------------------------------------------*/
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .auth__mark-sm { display: flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 70;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.5);
  }
  .sidebar--open { transform: translateX(0); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(6,11,16,.6); }
  .topbar__burger { display: inline-grid; }
  .content { padding: 20px 16px; }
}

/* ---- Motion / a11y --------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
