/* ============================================================
   APPNET — Template Preview  ·  "Nusantara" theme
   Light / Dark via CSS custom properties.
   Toggle: <html data-theme="dark"> (JS) — default follows OS.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light;

  /* Brand */
  --brand:          #2a78d6;
  --brand-strong:   #1c5cab;
  --brand-soft:     #e3eefb;
  --brand-contrast: #ffffff;

  /* Surfaces */
  --page:      #f4f6f9;
  --surface:   #ffffff;
  --surface-2: #f8f9fb;
  --sidebar:   #ffffff;
  --topbar:    rgba(255, 255, 255, .85);

  /* Ink */
  --ink:       #10151b;
  --ink-2:     #4c5560;
  --muted:     #8a929e;

  /* Lines & shadows */
  --border:      #e5e8ee;
  --border-soft: #eef0f4;
  --ring:        rgba(42, 120, 214, .25);
  --shadow-sm: 0 1px 2px rgba(16, 21, 27, .05);
  --shadow-md: 0 6px 24px -8px rgba(16, 21, 27, .12);

  /* Status (fixed — icon + label always accompany color) */
  --st-good:       #0ca30c;
  --st-good-soft:  #e2f5e2;
  --st-warn:       #b97800;
  --st-warn-soft:  #fdf0d3;
  --st-serious:      #cf5426;
  --st-serious-soft: #fcebe3;
  --st-crit:       #d03b3b;
  --st-crit-soft:  #fbe6e6;
  --st-off:        #667085;
  --st-off-soft:   #eceef2;

  /* Chart ink (dataviz tokens) */
  --viz-series-1: #2a78d6;
  --viz-grid:     #e1e0d9;
  --viz-axis:     #c3c2b7;
  --viz-label:    #898781;

  /* Metrics */
  --radius:    14px;
  --radius-sm: 9px;
  --sidebar-w: 264px;
  --topbar-h:  64px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* Dark tokens — one block, applied two ways (OS preference + manual toggle) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand:          #3987e5;
    --brand-strong:   #6da7ec;
    --brand-soft:     #1a2c42;
    --brand-contrast: #ffffff;

    --page:      #0c0f13;
    --surface:   #14181e;
    --surface-2: #1a1f26;
    --sidebar:   #101419;
    --topbar:    rgba(16, 20, 25, .85);

    --ink:   #eef1f5;
    --ink-2: #aeb6c0;
    --muted: #7d8590;

    --border:      #262c35;
    --border-soft: #1f242c;
    --ring:        rgba(57, 135, 229, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 8px 28px -10px rgba(0, 0, 0, .55);

    --st-good-soft:  rgba(12, 163, 12, .16);
    --st-warn:       #fab219;
    --st-warn-soft:  rgba(250, 178, 25, .14);
    --st-serious:      #ec835a;
    --st-serious-soft: rgba(236, 131, 90, .14);
    --st-crit-soft:  rgba(208, 59, 59, .16);
    --st-off:        #98a2b3;
    --st-off-soft:   rgba(152, 162, 179, .14);

    --viz-series-1: #3987e5;
    --viz-grid:     #2c2c2a;
    --viz-axis:     #383835;
    --viz-label:    #898781;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand:          #3987e5;
  --brand-strong:   #6da7ec;
  --brand-soft:     #1a2c42;
  --brand-contrast: #ffffff;

  --page:      #0c0f13;
  --surface:   #14181e;
  --surface-2: #1a1f26;
  --sidebar:   #101419;
  --topbar:    rgba(16, 20, 25, .85);

  --ink:   #eef1f5;
  --ink-2: #aeb6c0;
  --muted: #7d8590;

  --border:      #262c35;
  --border-soft: #1f242c;
  --ring:        rgba(57, 135, 229, .35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 28px -10px rgba(0, 0, 0, .55);

  --st-good-soft:  rgba(12, 163, 12, .16);
  --st-warn:       #fab219;
  --st-warn-soft:  rgba(250, 178, 25, .14);
  --st-serious:      #ec835a;
  --st-serious-soft: rgba(236, 131, 90, .14);
  --st-crit-soft:  rgba(208, 59, 59, .16);
  --st-off:        #98a2b3;
  --st-off-soft:   rgba(152, 162, 179, .14);

  --viz-series-1: #3987e5;
  --viz-grid:     #2c2c2a;
  --viz-axis:     #383835;
  --viz-label:    #898781;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
  transition: background-color .25s ease, color .25s ease;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; letter-spacing: -.01em; }

::selection { background: var(--ring); }

/* Ikon Lucide (SVG stroke): ukuran ikut font-size elemen, warna ikut currentColor */
svg.lucide { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.125em; }

/* ---------- App shell ---------- */
.app { min-height: 100vh; }

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .25s ease;
}
.content { padding: 24px 28px 48px; flex: 1; width: 100%; max-width: 1440px; margin-inline: auto; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform .25s ease, width .25s ease;
}
.sidebar-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.brand-name { font-weight: 700; font-size: 16.5px; letter-spacing: -.01em; white-space: nowrap; }
.brand-name small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.sidebar-nav { overflow-y: auto; padding: 14px 12px 24px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

.nav-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 18px 12px 7px;
}
.nav-item { list-style: none; }
.sidebar-nav ul { margin: 0; padding: 0; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  margin: 1px 0;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-weight: 500;
  position: relative;
  transition: background-color .15s, color .15s;
}
.nav-link .lucide { font-size: 18px; width: 20px; text-align: center; flex-shrink: 0; color: var(--muted); transition: color .15s; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link:hover .lucide { color: var(--ink-2); }
.nav-link.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}
.nav-link.active .lucide { color: var(--brand); }
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -12px; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}
.nav-link .nav-badge {
  margin-left: auto;
  background: var(--st-crit);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 7px;
}
.nav-link .nav-caret { margin-left: auto; font-size: 15px; color: var(--muted); transition: transform .2s; }
.nav-item.open > .nav-link .nav-caret { transform: rotate(90deg); }

.nav-sub { display: none; padding-left: 30px !important; }
.nav-item.open > .nav-sub { display: block; }
.nav-sub .nav-link { padding: 7px 12px; font-size: 13.5px; }
.nav-sub .nav-link::after {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--border);
  position: absolute;
  left: -14px; top: 50%;
  transform: translateY(-50%);
}
.nav-sub .nav-link.active::after { background: var(--brand); }
.nav-sub .nav-link.active::before { display: none; }

/* ---------- Topbar (gaya "detached" ala Materialize) ----------
   Default: transparan, menyatu dengan latar halaman.
   Saat digulir (body.win-scrolled): jadi kartu melayang dengan
   sudut bawah membulat + bayangan, selebar area konten. */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 56px);
  max-width: calc(1440px - 56px);
  margin-inline: auto;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0 0 14px 14px;
  z-index: 40;
  /* padding ikut dianimasikan → isi navbar "geser dari pinggir ke tengah"
     saat digulir, sama seperti .window-scrolled milik Materialize */
  transition: background-color .25s ease, box-shadow .25s ease, padding .25s ease;
}
body.win-scrolled .topbar {
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding-inline: 24px;
}
.icon-btn {
  width: 40px; height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  font-size: 19px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.topbar-search, .search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 99px;
  padding: 8px 16px;
  width: min(340px, 100%);
  color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
.topbar-search:focus-within, .search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.topbar-search input, .search-box input {
  border: none; outline: none; background: transparent;
  color: var(--ink); font: inherit; width: 100%;
}
/* search di area konten (filter tabel) — kotak, bukan pill */
.search-box {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border-color: var(--border);
  padding: 8.5px 14px;
  width: min(280px, 100%);
}
.topbar-search kbd {
  font: 600 10.5px/1 var(--font);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 6px;
  color: var(--muted);
}
/* search di topbar: minimalis ala Materialize — ikon + teks tanpa kotak,
   kotaknya baru muncul saat fokus */
.topbar .topbar-search { background: transparent; border-color: transparent; padding: 8px 10px; }
.topbar .topbar-search:focus-within { background: var(--surface-2); border-color: var(--brand); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.topbar-user {
  display: flex;
  align-items: center;
  padding: 0;
  margin-left: 8px;
  border: none;
  background: none;
  cursor: pointer;
}
.topbar-user .avatar { position: relative; width: 38px; height: 38px; }
.topbar-user .avatar::after {
  content: "";
  position: absolute;
  right: 0; bottom: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--st-good);
  border: 2px solid var(--page);
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #7c5cd6);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.topbar-user .u-name { font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.topbar-user .u-role { font-size: 11.5px; color: var(--muted); line-height: 1.2; }

/* theme toggle shows one icon per mode */
.icon-btn .ic-sun   { display: none; }
:root[data-theme="dark"] .icon-btn .ic-sun  { display: block; }
:root[data-theme="dark"] .icon-btn .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .ic-sun  { display: block; }
  :root:not([data-theme="light"]) .icon-btn .ic-moon { display: none; }
}

/* ---------- Page head / breadcrumb ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h1 { font-size: 21px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}
.breadcrumb .lucide { font-size: 13px; }
.breadcrumb .sep { opacity: .55; }
.breadcrumb .current { color: var(--ink-2); font-weight: 500; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.card-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-head h3 .lucide { color: var(--muted); font-size: 17px; }
.card-body { padding: 20px; }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 18px; }
.grid-tiles { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
@media (max-width: 1100px) { .grid-2-1 { grid-template-columns: 1fr; } }

/* ---------- Stat tiles ---------- */
.tile { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tile-label {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.tile-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.tile-value { font-size: 27px; font-weight: 700; letter-spacing: -.02em; margin-top: 5px; }
.tile-value small { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.tile-foot { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.tile-foot a { font-weight: 500; }

.ti-brand   { background: var(--brand-soft);      color: var(--brand); }
.ti-good    { background: var(--st-good-soft);    color: var(--st-good); }
.ti-warn    { background: var(--st-warn-soft);    color: var(--st-warn); }
.ti-serious { background: var(--st-serious-soft); color: var(--st-serious); }
.ti-crit    { background: var(--st-crit-soft);    color: var(--st-crit); }
.ti-off     { background: var(--st-off-soft);     color: var(--st-off); }

.delta { font-size: 12px; font-weight: 650; display: inline-flex; align-items: center; gap: 2px; }
.delta.up   { color: var(--st-good); }
.delta.down { color: var(--st-crit); }

/* ---------- Badges (status = icon + label, never color alone) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3.5px 10px;
  border-radius: 99px;
  white-space: nowrap;
}
.badge .lucide { font-size: 13px; }
.badge-good    { background: var(--st-good-soft);    color: var(--st-good); }
.badge-warn    { background: var(--st-warn-soft);    color: var(--st-warn); }
.badge-serious { background: var(--st-serious-soft); color: var(--st-serious); }
.badge-crit    { background: var(--st-crit-soft);    color: var(--st-crit); }
.badge-off     { background: var(--st-off-soft);     color: var(--st-off); }
.badge-brand   { background: var(--brand-soft);      color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: 600 13.5px/1 var(--font);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
  text-decoration: none;
}
.btn .lucide { font-size: 16px; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

.btn-primary { background: var(--brand); color: var(--brand-contrast); }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-contrast); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: var(--brand); color: var(--brand-contrast); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--st-crit); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-icon-sm {
  width: 30px; height: 30px; padding: 0;
  border-radius: 8px;
  font-size: 15px;
}
.btn-block { width: 100%; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { font-variant-numeric: tabular-nums; }
.cell-main { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.row-actions { display: flex; gap: 6px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
}
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field label .req { color: var(--st-crit); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9.5px 13px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}
.textarea { resize: vertical; min-height: 84px; }
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-icon { position: relative; }
.input-icon > .lucide {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 16px;
}
.input-icon .input { padding-left: 38px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.switch input { position: absolute; opacity: 0; }
.switch .track {
  width: 40px; height: 22px;
  background: var(--border);
  border-radius: 99px;
  position: relative;
  transition: background-color .2s;
  flex-shrink: 0;
}
.switch .track::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* ---------- Filter bar ---------- */
.filter-head { flex-wrap: wrap; gap: 10px; }
.chip-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.chip-row .chip { flex-shrink: 0; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font: 600 12.5px/1 var(--font);
  padding: 8.5px 14px;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .cnt { font-weight: 700; opacity: .75; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; gap: 5px; }
.page-btn {
  min-width: 34px; height: 34px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font: 600 13px/1 var(--font);
  cursor: pointer;
  transition: all .15s;
}
.page-btn:hover { border-color: var(--brand); color: var(--brand); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn:disabled { opacity: .45; cursor: default; }

/* ---------- Chart ---------- */
.viz { position: relative; }
.viz svg { display: block; width: 100%; height: auto; }
.viz .bar { fill: var(--viz-series-1); rx: 4; cursor: pointer; transition: opacity .12s; }
.viz .bar.dim { opacity: .35; }
.viz .gridline { stroke: var(--viz-grid); stroke-width: 1; }
.viz .baseline { stroke: var(--viz-axis); stroke-width: 1; }
.viz .tick { font: 500 11px var(--font); fill: var(--viz-label); }
.viz-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: var(--shadow-md);
  padding: 8px 12px;
  font-size: 12.5px;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .12s;
  white-space: nowrap;
  z-index: 10;
}
.viz-tooltip .t-label { color: var(--muted); font-size: 11.5px; }
.viz-tooltip .t-value { font-weight: 700; font-variant-numeric: tabular-nums; }

/* status composition bar */
.compo { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--page); }
.compo > span { display: block; }
.compo-legend { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 14px; }
.compo-legend .lg { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.compo-legend .sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.compo-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Progress ---------- */
.progress { height: 7px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }

/* ---------- Alert ---------- */
.alert {
  display: flex;
  gap: 11px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  align-items: flex-start;
}
.alert .lucide { font-size: 18px; margin-top: 1px; }
.alert-info { background: var(--brand-soft); color: var(--brand); }
.alert-warn { background: var(--st-warn-soft); color: var(--st-warn); }

/* ---------- Login page ---------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.auth-hero {
  background:
    radial-gradient(1000px 600px at 15% 10%, rgba(255,255,255,.14), transparent 55%),
    linear-gradient(150deg, #1c5cab, #103a6e 55%, #0c2b52);
  color: #fff;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -180px auto;
  width: 420px; height: 420px;
  border-radius: 50%;
  border: 60px solid rgba(255,255,255,.06);
}
.auth-hero .brand-row { display: flex; align-items: center; gap: 12px; }
.auth-hero .brand-mark { background: rgba(255,255,255,.15); backdrop-filter: blur(4px); }
.auth-hero h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.25; max-width: 420px; }
.auth-hero p { color: rgba(255,255,255,.72); max-width: 400px; }
.auth-hero .points { display: grid; gap: 12px; margin-top: 22px; }
.auth-hero .points li { list-style: none; display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,.85); font-size: 14px; }
.auth-hero .points .lucide { color: #8fd18f; font-size: 17px; }
.auth-form-side {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--page);
}
.auth-card { width: min(400px, 100%); }
.auth-card .card-body { padding: 30px 28px; }
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}

/* ---------- Map placeholder ---------- */
.map-ph {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 28px 28px;
  background-color: var(--surface-2);
  height: 230px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.map-ph .lucide { font-size: 30px; display: block; margin: 0 auto 6px; color: var(--brand); }

/* ---------- Footer ---------- */
.footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Sidebar collapse (desktop) & drawer (mobile) ---------- */
body.sb-collapsed .sidebar { width: 78px; }
body.sb-collapsed .main { margin-left: 78px; }
body.sb-collapsed .brand-name,
body.sb-collapsed .nav-link span,
body.sb-collapsed .nav-title,
body.sb-collapsed .nav-badge,
body.sb-collapsed .nav-caret,
body.sb-collapsed .nav-sub { display: none; }
body.sb-collapsed .nav-link { justify-content: center; padding: 11px; }
body.sb-collapsed .sidebar-brand { justify-content: center; padding: 0; }

.scrim {
  position: fixed; inset: 0;
  background: rgba(8, 10, 14, .5);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .main, body.sb-collapsed .main { margin-left: 0; }
  body.sb-open .sidebar { transform: translateX(0); width: var(--sidebar-w); }
  body.sb-open .scrim { opacity: 1; pointer-events: auto; }
  body.sb-open.sb-collapsed .brand-name,
  body.sb-open.sb-collapsed .nav-link span,
  body.sb-open.sb-collapsed .nav-title { display: block; }
  /* sejajarkan tepi navbar dengan tepi konten (padding .content = 16px) */
  .topbar { width: calc(100% - 32px); padding: 0; }
  body.win-scrolled .topbar { padding-inline: 12px; }
  .content { padding: 18px 16px 40px; }
  .topbar .topbar-search { display: none; } /* hanya search di topbar; search filter konten tetap tampil */

  /* Filter tabel: search penuh, chip digeser horizontal, dropdown penuh */
  .filter-head { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
  .filter-head .search-box { width: 100%; }
  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .filter-head .select { width: 100% !important; }

  /* Tabel: paksa lebar minimum supaya scroll ke samping, bukan kolom remuk */
  .table-wrap .table { min-width: 860px; }
  .table-wrap .table th, .table-wrap .table td { white-space: nowrap; }

  /* Footer tabel (info + pagination) bertumpuk rapi */
  .table-foot { flex-direction: column; align-items: center; gap: 10px; text-align: center; }
  .table-foot .pagination { justify-content: center; flex-wrap: wrap; }

  .page-head { align-items: stretch; flex-direction: column; }
  .page-head > .d-flex { flex-wrap: wrap; }
}

/* ---------- Icon animations (gaya "animated icons") ----------
   Ikon hidup seperti animated icons Flaticon/Lordicon, tapi murni CSS
   pada ikon Remix yang sudah ada — tanpa aset eksternal.
   - Loop terus-menerus: ikon stat tile, brand, lonceng notifikasi, badge kritis
   - Saat hover: ikon menu sidebar, tombol, chip, aksi tabel
   Semua dimatikan otomatis jika user memilih "reduce motion". */

@keyframes ic-bob     { 0%,100% { transform: translateY(0) }   50% { transform: translateY(-3px) } }
@keyframes ic-pulse   { 0%,100% { transform: scale(1) }        50% { transform: scale(1.18) } }
@keyframes ic-wiggle  { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-12deg) } 75% { transform: rotate(12deg) } }
@keyframes ic-ring    { 0%,100% { transform: rotate(0) } 10% { transform: rotate(14deg) } 20% { transform: rotate(-12deg) }
                        30% { transform: rotate(9deg) } 40% { transform: rotate(-6deg) } 50% { transform: rotate(0) } }
@keyframes ic-spin    { to { transform: rotate(360deg) } }
@keyframes ic-radar   { 0% { box-shadow: 0 0 0 0 var(--ring) } 100% { box-shadow: 0 0 0 12px transparent } }
@keyframes ic-blink   { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
@keyframes ic-beat    { 0%,20%,100% { transform: scale(1) } 10% { transform: scale(1.22) } 15% { transform: scale(1.08) } }

/* Loop kontinu */
.brand-mark { animation: ic-radar 2.8s ease-out infinite; }
.brand-mark .lucide { display: inline-block; animation: ic-pulse 2.8s ease-in-out infinite; }

.tile-icon .lucide { display: inline-block; animation: ic-bob 2.6s ease-in-out infinite; }
.tile:nth-child(2) .tile-icon .lucide { animation-delay: .3s; }
.tile:nth-child(3) .tile-icon .lucide { animation-name: ic-blink; animation-delay: .1s; }
.tile:nth-child(4) .tile-icon .lucide { animation-name: ic-wiggle; animation-duration: 3s; }
.tile:nth-child(5) .tile-icon .lucide { animation-name: ic-blink; animation-delay: .5s; }
.tile:nth-child(6) .tile-icon .lucide { animation-delay: .6s; }
.tile:nth-child(7) .tile-icon .lucide { animation-delay: .9s; }
.tile:nth-child(8) .tile-icon .lucide { animation-name: ic-beat; animation-duration: 2.2s; }

.ic-bell { display: inline-block; transform-origin: top center; animation: ic-ring 3.5s ease-in-out infinite; }
.badge-crit .lucide, .badge-warn .lucide { display: inline-block; animation: ic-blink 1.8s ease-in-out infinite; }
.alert .lucide { animation: ic-pulse 2.4s ease-in-out infinite; }

/* Saat hover / aktif */
.nav-link .lucide { transition: transform .2s; }
.nav-link:hover .lucide { animation: ic-wiggle .5s ease-in-out; }
.nav-link.active .lucide { animation: ic-bob 2.2s ease-in-out infinite; }

.btn .lucide, .chip .lucide, .page-btn .lucide { display: inline-block; }
.btn:hover .lucide { animation: ic-wiggle .45s ease-in-out; }
.btn:hover .ic-refresh,
.btn-soft:hover .ic-refresh { animation: ic-spin .7s linear; }
.chip:hover .lucide { animation: ic-pulse .4s ease-in-out; }
.btn-icon-sm:hover .lucide { animation: ic-pulse .35s ease-in-out; }

/* Micro-interaction ikon navbar (ala Materialize):
   ikon "pop" membal saat hover, hamburger berputar, globe berputar penuh,
   ikon tema berputar masuk saat mode diganti, avatar membesar halus. */
@keyframes ic-theme-in { from { transform: rotate(-100deg) scale(.4); opacity: 0 } to { transform: rotate(0) scale(1); opacity: 1 } }

.icon-btn .lucide { transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.icon-btn:hover .lucide { transform: scale(1.22); }
.icon-btn:hover .ic-menu { transform: scale(1.1) rotate(90deg); }
.icon-btn:hover .ic-globe { animation: ic-spin .6s ease-in-out; }
.icon-btn:hover .ic-bell { animation-duration: 1.2s; }
.icon-btn .ic-sun, .icon-btn .ic-moon { animation: ic-theme-in .45s cubic-bezier(.34, 1.56, .64, 1); }
.topbar-user .avatar { transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s; }
.topbar-user:hover .avatar { transform: scale(1.1); box-shadow: 0 0 0 3px var(--ring); }
.topbar-search:focus-within .lucide { animation: ic-pulse .4s ease-in-out; }

/* Hormati preferensi aksesibilitas */
@media (prefers-reduced-motion: reduce) {
  .brand-mark, .brand-mark .lucide, .tile-icon .lucide, .icon-btn .lucide, .badge .lucide, .alert .lucide,
  .nav-link .lucide, .btn .lucide, .chip .lucide { animation: none !important; }
}

/* ---------- Utilities ---------- */
.mt-1 { margin-top: 6px; }  .mt-2 { margin-top: 12px; }  .mt-3 { margin-top: 18px; }  .mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.text-muted { color: var(--muted); }
.text-2 { color: var(--ink-2); }
.fw-600 { font-weight: 600; }
.fs-12 { font-size: 12px; }
.d-flex { display: flex; }
.ai-center { align-items: center; }
.jc-between { justify-content: space-between; }
.gap-2 { gap: 10px; }
.w-100 { width: 100%; }

/* ---------- Refined shared details ---------- */
:root { --shadow-lg: 0 24px 70px -30px rgba(16, 39, 74, .3); }
:root[data-theme="dark"] { --shadow-lg: 0 24px 70px -30px rgba(0, 0, 0, .8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow-lg: 0 24px 70px -30px rgba(0, 0, 0, .8); } }
body { letter-spacing: -.005em; }
.card { box-shadow: 0 3px 18px -12px rgba(14, 36, 66, .16); }
.btn-primary { box-shadow: 0 7px 18px -10px var(--brand); }
.btn-primary:hover { box-shadow: 0 10px 20px -11px var(--brand); }
.btn, .icon-btn { transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s; }
.btn:active, .icon-btn:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible, .switch input:focus-visible + .track { outline: 3px solid var(--ring); outline-offset: 3px; }
.footer { align-items: center; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--brand); }
.footer-links { display: inline-flex; gap: 18px; flex-wrap: wrap; }
.footer-divider { margin: 0 4px; }
[hidden] { display: none !important; }

/* ---------- Topbar notifications ---------- */
.notification-wrap { position: relative; }
.notification-trigger { position: relative; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--st-crit); border: 2px solid var(--page); }
.notification-panel { position: absolute; right: -48px; top: calc(100% + 14px); width: min(390px, calc(100vw - 28px)); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 80; overflow: hidden; }
.notification-panel::before { content: ""; position: absolute; top: -7px; right: 61px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.notification-head { padding: 20px 20px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border-soft); }
.notification-head strong, .notification-head span { display: block; }
.notification-head strong { font-size: 16px; }
.notification-head div > span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.notification-count { background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.notification-item { display: flex; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--border-soft); }
.notification-item.unread { background: color-mix(in srgb, var(--brand-soft) 30%, var(--surface)); }
.notification-item strong { display: block; font-size: 13px; }
.notification-item p { margin: 3px 0; color: var(--ink-2); font-size: 12px; }
.notification-item small { color: var(--muted); font-size: 11px; }
.notification-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; font-size: 17px; }
.notification-icon.warning { background: var(--st-warn-soft); color: var(--st-warn); }
.notification-icon.success { background: var(--st-good-soft); color: var(--st-good); }
.notification-icon.info { background: var(--brand-soft); color: var(--brand); }
.notification-footer { width: 100%; border: 0; background: var(--surface); color: var(--brand); padding: 13px; cursor: pointer; font: 600 12px var(--font); display: flex; justify-content: center; gap: 6px; align-items: center; }
.notification-footer:hover { background: var(--surface-2); }

/* ---------- Dialogs and toasts ---------- */
body.modal-open { overflow: hidden; }
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(9, 24, 46, .56); backdrop-filter: blur(6px); }
.modal-box { width: min(480px, 100%); max-height: min(90vh, 760px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 32px 90px -26px rgba(3, 20, 44, .48); animation: modal-in .22s ease both; }
.modal-box.modal-wide { width: min(680px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-box .card-head { padding: 21px 24px; }
.modal-box .card-body { padding: 24px; }
.modal-box .card-head h3 { font-size: 16px; }
.modal-box .card-head h3 .lucide { color: var(--brand); }
.modal-foot { padding: 17px 24px 22px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--border-soft); }
.modal-intro { color: var(--ink-2); margin: 0 0 18px; line-height: 1.65; }
.modal-symbol { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; font-size: 26px; margin-bottom: 17px; }
.modal-symbol.danger { color: var(--st-crit); background: var(--st-crit-soft); }
.modal-symbol.success { color: var(--st-good); background: var(--st-good-soft); }
.modal-symbol.info { color: var(--brand); background: var(--brand-soft); }
.modal-box .field + .field { margin-top: 14px; }
.toast-stack { position: fixed; top: 22px; right: 22px; z-index: 120; width: min(370px, calc(100vw - 30px)); display: grid; gap: 10px; pointer-events: none; }
.toast { --toast-color: var(--brand); display: flex; align-items: flex-start; gap: 11px; padding: 14px 14px 14px 12px; border: 1px solid var(--border); border-left: 3px solid var(--toast-color); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-lg); animation: toast-in .25s ease both; pointer-events: auto; }
.toast-success { --toast-color: var(--st-good); }
.toast-error { --toast-color: var(--st-crit); }
.toast-warning { --toast-color: var(--st-warn); }
.toast-icon { color: var(--toast-color); font-size: 21px; line-height: 1; }
.toast-body { flex: 1; display: grid; gap: 2px; }
.toast-body strong { font-size: 13px; }
.toast-body span { color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.toast-close { display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 3px; font-size: 15px; border-radius: 6px; }
.toast-close:hover { background: var(--surface-2); color: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ---------- Public page system ---------- */
.public-page { min-height: 100vh; background: radial-gradient(600px 330px at 90% -8%, var(--brand-soft), transparent 72%), var(--page); }
.public-bar { width: min(1120px, calc(100% - 40px)); margin: auto; min-height: 85px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.public-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.public-brand:hover { color: var(--ink); }
.public-brand strong { display: block; font-size: 17px; letter-spacing: -.03em; line-height: 1.1; }
.public-brand small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.public-actions { display: flex; align-items: center; gap: 8px; }
.public-actions .icon-btn { border: 1px solid var(--border); background: var(--surface); }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: .16em; color: var(--brand); }
.eyebrow::before { content: ""; display: block; width: 17px; height: 2px; border-radius: 3px; background: var(--brand); }
.page-lead { color: var(--ink-2); line-height: 1.75; }
.public-foot { width: min(1120px, calc(100% - 40px)); margin: 50px auto 0; border-top: 1px solid var(--border); padding: 22px 0 30px; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.public-foot a { color: var(--ink-2); }

/* ---------- Login ---------- */
.auth-page { min-height: 100svh; grid-template-columns: minmax(420px, 1fr) minmax(440px, .92fr); }
.auth-hero { min-height: 100svh; padding: clamp(32px, 5vw, 68px); background: radial-gradient(500px 430px at 85% 76%, rgba(78, 168, 238, .18), transparent 72%), radial-gradient(340px 300px at 4% 0%, rgba(94, 172, 247, .18), transparent 75%), linear-gradient(145deg, #08254b, #0b3569 57%, #0a2c58); }
.auth-hero::before { content: ""; position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(to bottom, transparent, #000); pointer-events: none; }
.auth-hero::after { width: 530px; height: 530px; right: -190px; bottom: -300px; border-width: 1px; box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.018); }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
.auth-hero-content { max-width: 520px; margin-top: 50px; }
.auth-hero h2 { max-width: 530px; font-size: clamp(34px, 3.6vw, 53px); line-height: 1.13; letter-spacing: -.055em; font-weight: 720; }
.auth-hero h2 em { font-style: normal; color: #8cc6ff; }
.auth-hero p { max-width: 465px; font-size: 15px; line-height: 1.75; }
.hero-status { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 25px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); border-radius: 99px; color: rgba(255,255,255,.86); font-size: 11px; font-weight: 600; }
.hero-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #72dfb1; box-shadow: 0 0 0 4px rgba(114,223,177,.13); }
.hero-visual { display: grid; grid-template-columns: 1fr .7fr; gap: 13px; width: min(480px, 100%); margin-top: 36px; }
.hero-metric { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(12px); border-radius: 15px; padding: 15px 17px; }
.hero-metric span { display: block; color: rgba(255,255,255,.68); font-size: 11px; }
.hero-metric strong { display: block; font-size: 24px; letter-spacing: -.04em; margin-top: 3px; }
.hero-metric small { display: inline-flex; gap: 4px; align-items: center; color: #a8e7c9; font-size: 10px; }
.hero-metric .spark { width: 100%; height: 28px; margin-top: 9px; stroke: #91ceff; stroke-width: 2; fill: none; }
.auth-form-side { padding: 50px 30px; background: radial-gradient(330px 250px at 100% 0%, var(--brand-soft), transparent 80%), var(--page); }
.auth-card { width: min(440px, 100%); }
.auth-card .card { border-radius: 20px; border-color: var(--border); box-shadow: var(--shadow-lg); }
.auth-card .card-body { padding: clamp(28px, 4vw, 42px); }
.auth-card h1 { font-size: 29px; line-height: 1.2; letter-spacing: -.04em; }
.auth-card .field label { font-size: 13px; }
.auth-card .input { min-height: 44px; }
.auth-card .btn-block { min-height: 45px; }
.auth-note { text-align: center; font-size: 12px; color: var(--muted); margin: 22px 0 0; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 44px; }
.password-wrap .password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 7px; }
.password-wrap .password-toggle:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 900px) { .auth-page { display: block; } .auth-hero { display: none; } .auth-form-side { min-height: 100svh; } }

/* ---------- Registration ---------- */
.reg-container { width: min(1050px, calc(100% - 40px)); margin: 34px auto 0; }
.reg-intro { max-width: 620px; margin: 0 auto 28px; text-align: center; }
.reg-intro h1 { font-size: clamp(29px, 4vw, 39px); letter-spacing: -.05em; line-height: 1.2; margin: 10px 0; }
.reg-intro p { margin: 0; }
.reg-steps { display: flex; align-items: center; justify-content: center; max-width: 640px; margin: 0 auto 25px; }
.reg-step { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.reg-step .num { width: 29px; height: 29px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; }
.reg-step.active { color: var(--brand); }
.reg-step.active .num { background: var(--brand); color: #fff; border-color: var(--brand); }
.reg-step.done { color: var(--st-good); }
.reg-step.done .num { background: var(--st-good-soft); color: var(--st-good); border-color: transparent; }
.reg-line { flex: 1; min-width: 20px; height: 1px; background: var(--border); margin: 0 15px; }
.reg-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.reg-panel-head { padding: 27px 32px 23px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; gap: 14px; }
.reg-panel-head .panel-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 20px; }
.reg-panel-head h2 { font-size: 18px; }
.reg-panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.reg-panel-body { padding: 30px 32px; }
.reg-view[hidden] { display: none; }
.pkg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pkg-card { position: relative; display: flex; flex-direction: column; text-align: left; background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; padding: 22px; cursor: pointer; color: var(--ink); font: inherit; transition: border-color .2s, transform .2s, box-shadow .2s, background-color .2s; }
.pkg-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pkg-card.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 40%, var(--surface)); box-shadow: 0 0 0 3px var(--ring); }
.pkg-card .pkg-kicker { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.pkg-card h3 { font-size: 19px; margin: 5px 0; }
.pkg-card .pkg-price { font-size: 27px; font-weight: 750; letter-spacing: -.05em; color: var(--brand); margin: 9px 0 0; }
.pkg-card .pkg-price small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pkg-card .pkg-detail { color: var(--muted); font-size: 11px; }
.pkg-card ul { list-style: none; padding: 15px 0 0; margin: 17px 0 0; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.pkg-card li { display: flex; gap: 8px; color: var(--ink-2); font-size: 12px; }
.pkg-card li .lucide { color: var(--st-good); margin-top: 2px; }
.pkg-pop { position: absolute; right: 16px; top: -10px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: 99px; }
.reg-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 20px 32px; border-top: 1px solid var(--border-soft); }
.reg-actions .btn { min-width: 120px; }
.reg-hint { color: var(--muted); font-size: 12px; }
.reg-summary { display: flex; align-items: center; gap: 12px; background: var(--brand-soft); border-radius: 12px; padding: 12px 15px; margin-bottom: 22px; color: var(--brand); }
.reg-summary strong, .reg-summary span { display: block; }
.reg-summary span { font-size: 12px; margin-top: 2px; }
.reg-info { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 13px 15px; color: var(--ink-2); font-size: 12px; margin-top: 22px; }
.reg-form .field label { font-size: 12px; }
.reg-form .input, .reg-form .textarea { min-height: 43px; }
.reg-form input[type="file"] { padding: 9px; }
.reg-form .field-error { display: block; color: var(--st-crit); font-size: 11px; margin-top: 5px; }
.reg-form .input.invalid { border-color: var(--st-crit); }
.legal-check { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--ink-2); line-height: 1.6; margin-top: 21px; }
.legal-check input { accent-color: var(--brand); margin-top: 3px; }

/* ---------- Maintenance and copyright ---------- */
.maintenance-main { width: min(1080px, calc(100% - 40px)); min-height: calc(100svh - 173px); margin: 0 auto; display: grid; grid-template-columns: 1fr .9fr; align-items: center; gap: 65px; }
.maintenance-main h1 { font-size: clamp(38px, 5.3vw, 65px); line-height: 1.08; letter-spacing: -.06em; margin: 14px 0 18px; }
.maintenance-main .page-lead { max-width: 510px; font-size: 15px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 99px; background: var(--st-warn-soft); color: var(--st-warn); font-size: 11px; font-weight: 700; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.maintenance-meta { display: flex; gap: 24px; flex-wrap: wrap; margin: 25px 0 28px; }
.maintenance-meta div { border-left: 2px solid var(--border); padding-left: 13px; }
.maintenance-meta span, .maintenance-meta strong { display: block; }
.maintenance-meta span { color: var(--muted); font-size: 11px; }
.maintenance-meta strong { font-size: 13px; margin-top: 3px; }
.maintenance-art { aspect-ratio: 1; max-width: 450px; width: 100%; position: relative; display: grid; place-items: center; margin-inline: auto; }
.maintenance-art .orbit { position: absolute; inset: 8%; border: 1px solid var(--border); border-radius: 50%; }
.maintenance-art .orbit:nth-child(2) { inset: 20%; }
.maintenance-art .orbit:nth-child(3) { inset: 32%; }
.maintenance-art .central { width: 42%; aspect-ratio: 1; border-radius: 28px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #4694ed, #144c91); box-shadow: 0 26px 45px -26px var(--brand); font-size: clamp(50px, 7vw, 90px); transform: rotate(-8deg); }
.maintenance-art .central .lucide { transform: rotate(8deg); }
.maintenance-art .satellite { position: absolute; width: 55px; height: 55px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); border-radius: 16px; display: grid; place-items: center; color: var(--brand); font-size: 24px; }
.maintenance-art .satellite.one { top: 9%; right: 20%; transform: rotate(12deg); }
.maintenance-art .satellite.two { bottom: 16%; left: 7%; transform: rotate(-11deg); }
.maintenance-art .satellite.three { bottom: 10%; right: 11%; color: var(--st-good); transform: rotate(9deg); }
.copyright-main { width: min(1060px, calc(100% - 40px)); margin: 46px auto 0; }
.copyright-hero { padding: clamp(28px, 5vw, 58px); background: linear-gradient(140deg, #08254b, #0c376e); color: #fff; border-radius: 24px; position: relative; overflow: hidden; }
.copyright-hero::after { content: "©"; position: absolute; font-size: clamp(180px, 28vw, 360px); line-height: 1; right: 2%; top: -19%; font-weight: 800; color: rgba(255,255,255,.04); }
.copyright-hero h1 { max-width: 670px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.05em; line-height: 1.15; margin: 12px 0 14px; position: relative; z-index: 1; }
.copyright-hero p { max-width: 600px; color: rgba(255,255,255,.72); margin: 0; position: relative; z-index: 1; }
.copyright-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; margin-top: 20px; }
.copyright-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; }
.copyright-card h2 { font-size: 18px; margin-bottom: 13px; }
.copyright-card p { color: var(--ink-2); line-height: 1.75; margin: 0 0 13px; font-size: 13px; }
.copyright-card p:last-child { margin-bottom: 0; }
.copyright-card .note-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 20px; margin-bottom: 18px; }
.copyright-list { display: grid; gap: 12px; margin-top: 20px; }
.copyright-list div { display: flex; gap: 10px; color: var(--ink-2); font-size: 12px; }
.copyright-list .lucide { color: var(--st-good); flex: none; margin-top: 2px; }
.component-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.component-card { padding: 24px; }
.component-card h2 { font-size: 17px; margin-bottom: 7px; }
.component-card p { color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.component-buttons { display: flex; flex-wrap: wrap; gap: 9px; }
.topbar-page-label { font-size: 13px; font-weight: 650; color: var(--ink-2); letter-spacing: -.01em; }
.showcase-section, .component-card[id] { scroll-margin-top: 84px; }
.showcase-section { margin-bottom: 28px; }
.showcase-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 13px; }
.showcase-heading h2 { font-size: 20px; letter-spacing: -.03em; margin-top: 4px; }
.showcase-heading p { max-width: 340px; color: var(--muted); font-size: 12px; margin: 0; text-align: right; }
.showcase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.showcase-stat { padding: 19px 21px; }
.showcase-stat strong { display: block; font-size: 27px; line-height: 1.2; letter-spacing: -.05em; margin: 9px 0 5px; }
.showcase-section .table .cell-sub { display: block; }
.showcase-section .table td { white-space: nowrap; }
.showcase-section .component-buttons .badge { padding: 6px 10px; }
html { scroll-behavior: smooth; }
@media (max-width: 820px) { .showcase-grid { grid-template-columns: 1fr; } .showcase-heading { display: block; } .showcase-heading p { text-align: left; margin-top: 3px; } }
@media (max-width: 820px) { .pkg-grid, .copyright-grid, .component-grid { grid-template-columns: 1fr; } .maintenance-main { grid-template-columns: 1fr; gap: 0; padding-top: 50px; } .maintenance-art { max-width: 310px; margin-top: 15px; } }
@media (max-width: 600px) { .public-bar { min-height: 70px; } .public-actions .btn { padding: 9px; font-size: 0; } .public-actions .btn .lucide { font-size: 16px; } .reg-container { margin-top: 24px; } .reg-step { font-size: 0; } .reg-step .num { font-size: 12px; } .reg-panel-head { padding: 22px 20px; } .reg-panel-body { padding: 22px 20px; } .reg-actions { padding: 17px 20px; } .reg-actions .btn { min-width: 0; } .reg-hint { display: none; } .maintenance-main { min-height: auto; } .maintenance-main h1 { font-size: 40px; } .maintenance-art { max-width: 270px; } .copyright-main { margin-top: 22px; } .copyright-card { padding: 22px; } .notification-panel { position: fixed; right: 14px; top: 60px; } .notification-panel::before { display: none; } .toast-stack { top: 12px; right: 15px; } }
@media (prefers-reduced-motion: reduce) { .modal-box, .toast { animation: none; } .pkg-card { transition: none; } }
