/* ============================================================
   OPS-CONSOLE SKIN — heraxles.dev (visual-only layer, v93)
   Konsep: panel operasi API gateway. Flat, tegas, signal-color.
   Brand dipertahankan: oranye #e9783f + limau #c8ef72 (opsi A,
   keputusan Beben 2026-08-25). Struktur/layout dirombak total.
   Existing routes, data, forms, handlers tetap utuh.
   ============================================================ */

:root,
[data-theme="dark"] {
  /* Netral gelap hangat (kehijauan), konsisten dengan identitas lama. */
  --bg: #0e100f;
  --bg-soft: #141715;
  --surface: #141715;
  --surface-2: #191d1a;
  --card: #151816;
  --card-2: #1a1e1b;
  --line: rgba(242, 238, 231, .14);
  --line-soft: rgba(242, 238, 231, .07);
  --text: #f2eee7;
  --text-2: #a8ada6;
  --text-3: #848a83;
  --brand: #e9783f;
  --brand-2: #f0904f;
  --brand-ink: #16120f;
  --orange-soft: rgba(233, 120, 63, .13);
  --lime: #c8ef72;
  --lime-soft: rgba(200, 239, 114, .12);
  --ok: #c8ef72;
  --warn: #e9a13f;
  --bad: #f28a78;
  --info: #e9783f;
  --grid-line: rgba(242, 238, 231, .03);
  --grain-opacity: .035;
  --kilau: rgba(242, 238, 231, .06);
  /* Ops-console: radius lebih rapat, bayangan minimal. */
  --radius: 10px;
  --radius-lg: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .28);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .2);
  --step: .25s cubic-bezier(.4, 0, .2, 1);
}

[data-theme="light"] {
  --bg: #f4f3ef;
  --bg-soft: #fbfaf7;
  --surface: #fbfaf7;
  --surface-2: #f0eee9;
  --card: #fbfaf7;
  --card-2: #f1efe9;
  --line: rgba(28, 26, 22, .14);
  --line-soft: rgba(28, 26, 22, .08);
  --text: #1d1b17;
  --text-2: #5c5a52;
  --text-3: #8a877d;
  --brand: #d96a33;
  --brand-2: #b9551f;
  --brand-ink: #fff8f2;
  --orange-soft: rgba(217, 106, 51, .11);
  --lime: #6f9430;
  --lime-soft: rgba(111, 148, 48, .12);
  --ok: #4d7c0f;
  --warn: #b45309;
  --bad: #b91c1c;
  --info: #d96a33;
  --grid-line: rgba(28, 26, 22, .04);
  --grain-opacity: .03;
  --kilau: rgba(255, 255, 255, .5);
}

/* ---------- dasar ---------- */
body { background: var(--bg); }
body::before, body::after { opacity: var(--grain-opacity); }

h1, h2, h3, h4 { letter-spacing: -.02em; }
h1 { font-weight: 800; }
h2 { font-weight: 750; }

/* ---------- kartu & tombol ---------- */
.card, .panel, .plan, .metric, .notice, .auth-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card { border: 1px solid var(--line); }
.card-head { border-bottom: 1px solid var(--line-soft); }
.card-head h3 { font-weight: 650; font-size: 13.5px; }

.btn { border-radius: 8px; font-weight: 600; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--card-2); }
.btn-quiet { border-color: var(--line); color: var(--text-2); background: transparent; }
.btn-quiet:hover { color: var(--text); border-color: var(--line); background: var(--card-2); }

.badge {
  border-radius: 6px; font-weight: 600; font-size: 11px;
  letter-spacing: .02em;
}

/* ---------- topbar publik ---------- */
.topbar { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.topbar .inner { gap: 18px; }
.topbar .brand .mark { border-radius: 7px; }
.brand .mark svg, .member-topbar-mark svg { stroke-width: 1.8; }
.nav-links a { font-weight: 550; font-size: 13.5px; }
.nav-links a:hover { color: var(--text); }
.hamburger { display: none; }
.mobile-menu { display: none; }

/* ---------- chip akun (member login di topbar publik) ----------
   Avatar + nama harus terbaca sebagai SATU tombol link ke dashboard:
   gap jelas, kontras kuat, touch target >= 36px di semua breakpoint. */
.public-account-chip {
  display: flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 4px 12px 4px 4px;
  border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  color: var(--text); text-decoration: none;
  transition: border-color .15s, background .15s;
}
.public-account-chip:hover {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  background: var(--card-2);
}
.public-account-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.public-account-avatar {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center;
  border-radius: 7px; background: var(--brand); color: var(--brand-ink);
  font-weight: 800; font-size: 11px; letter-spacing: .02em;
}
.public-account-copy { display: grid; gap: 1px; line-height: 1.2; text-align: left; }
.public-account-copy strong { font-size: 12.5px; font-weight: 650; letter-spacing: .01em; }
.public-account-copy small {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--brand); font-size: 10.5px; font-weight: 600;
}
.public-account-copy small::after { content: '›'; font-size: 11px; }

/* ---------- homepage (hero / model / harga) ---------- */
.public-active .hero { padding: 56px 0 64px; display: grid; align-items: center; }
.public-active .hero-grid { grid-template-columns: minmax(0,1.06fr) minmax(400px,.94fr); gap: clamp(40px,6vw,84px); align-items: center; }
.public-active .hero-grid > div:first-child { padding-left: clamp(0px,2vw,30px); }
.public-active .hero h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; }
/* Matikan gradien pelangi berjalan pada judul hero — bikin kesan AI-generik.
   Judul jadi solid dengan aksen brand di kata kunci. */
.public-active .hero h1 {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: initial;
  color: var(--text);
  animation: hx-fade-up .6s cubic-bezier(.22, 1, .36, 1) forwards;
}
.public-active .hero h1 em { color: var(--brand); font-style: normal; }
.public-active .hero .lede { max-width: 600px; color: var(--text-2); font-size: 16.5px; line-height: 1.55; }
.public-active .hero-stats {
  display: flex; gap: 38px; margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--line-soft); flex-wrap: wrap;
}
.public-active .hero-stats .hs-num { font-size: 21px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.public-active .hero-stats .hs-lbl { margin-top: 2px; color: var(--text-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
/* Matikan glow ambient lama (inset -20% melebar keluar viewport → overflow X). */
.public-active .hero::before,
.public-active .section::before { content: none; }
.public-active .hero .card { background: var(--card); border-color: var(--line); box-shadow: var(--shadow); border-radius: var(--radius-lg); }
.public-active .hero .code { background: #0b0d0c; border: 1px solid var(--line); border-radius: 8px; }
.public-active .section { padding: 76px 0; border-top: 1px solid var(--line-soft); }
.public-active .section.terangkat { background: var(--bg-soft); }
.public-active .free-hero { padding: 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.public-active .model-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; border-top: 1px solid var(--line); }
.public-active .model-card { min-height: 62px; padding: 16px 4px; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: transparent; }
.public-active .model-card:nth-child(odd) { padding-right: 22px; }
.public-active .model-card:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--line-soft); }
.public-active .pricing { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; max-width: 1040px; margin: 0 auto; }
.public-active .plan { min-height: 270px; padding: 24px; border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.public-active .plan > .btn { margin-top: auto; }
.public-active .plan ul { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.public-active .pricing > :last-child:nth-child(odd) { grid-column: 1 / -1; width: calc((100% - 14px)/2); justify-self: center; }
.site { border-top-color: var(--line); background: var(--bg-soft); }

/* ============================================================
   MEMBER SHELL
   ============================================================ */
body.member-active > .topbar,
body.member-active > .site { display: none; }
.member-shell {
  min-height: 100dvh; display: grid; grid-template-columns: 258px minmax(0,1fr);
  background: var(--bg); transition: grid-template-columns .2s ease;
}
.member-shell.member-sidebar-collapsed { grid-template-columns: 96px minmax(0,1fr); }

.member-sidebar {
  position: sticky; top: 0; height: 100dvh; min-width: 0;
  display: flex; flex-direction: column; overflow-y: auto;
  border-right: 1px solid var(--line); background: var(--bg-soft);
  padding: 18px 14px 14px;
}
.member-sidebar-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 14px; border-bottom: 1px solid var(--line-soft); }
.member-topbar-brand { min-width: 0; display: flex; align-items: center; gap: 10px; }
.member-topbar-mark { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 7px; background: var(--brand); color: var(--brand-ink); font-weight: 800; }
.member-topbar-brand-copy { min-width: 0; display: grid; line-height: 1.15; }
.member-topbar-brand-copy strong { font-size: 14px; white-space: nowrap; letter-spacing: -.01em; }
.member-topbar-brand-copy span { margin-top: 3px; color: var(--text-3); font-size: 10px; white-space: nowrap; }

.member-collapse-button, .admin-collapse-button {
  width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 7px; background: var(--card-2);
  color: var(--text-2); cursor: pointer; font-size: 16px;
}
.member-collapse-button:hover, .admin-collapse-button:hover { color: var(--text); border-color: var(--line); }

.member-nav {
  display: flex; flex-direction: column; gap: 3px; flex: 0 1 auto;
  min-width: 0; padding: 16px 0;
}
.member-nav .grp {
  font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-3); padding: 14px 10px 5px; user-select: none;
}
.member-nav a, .member-public-link, .member-logout-link {
  width: 100%; min-height: 38px; display: flex; align-items: center; gap: 11px;
  padding: 0 10px; border: 1px solid transparent; border-radius: 7px;
  color: var(--text-2); font: inherit; font-weight: 550; white-space: nowrap;
  font-size: 13.5px;
}
.member-logout-link { background: transparent; cursor: pointer; text-align: left; }
.member-nav a:hover, .member-public-link:hover, .member-logout-link:hover { background: var(--card-2); color: var(--text); }
.member-logout-link:hover .member-nav-icon { color: var(--bad); }
.member-nav a[aria-current="page"] {
  border-color: var(--line); background: var(--card-2); color: var(--text);
  font-weight: 650; box-shadow: inset 3px 0 0 var(--brand);
}
.member-nav-icon, .admin-nav-icon {
  width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center;
  color: var(--brand-2);
}
.member-nav a[aria-current="page"] .member-nav-icon { color: var(--brand); }
.member-nav-icon svg, .admin-nav-icon svg,
.member-collapse-button svg, .admin-collapse-button svg,
.member-mobile-public svg, .admin-mobile-top a svg,
.member-mobile-menu svg, .admin-mobile-menu svg { width: 17px; height: 17px; }
.member-nav-label { overflow: hidden; text-overflow: ellipsis; }

.member-sidebar-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.member-sidebar-user { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border-radius: 7px; }
.member-sidebar-user:hover { background: var(--card-2); }
.member-sidebar-avatar { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 7px; background: var(--brand); color: var(--brand-ink); font-size: 10px; font-weight: 800; }
.member-sidebar-user-copy { min-width: 0; display: grid; line-height: 1.15; }
.member-sidebar-user-copy strong, .member-sidebar-user-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-sidebar-user-copy strong { font-size: 12px; font-weight: 650; }
.member-sidebar-user-copy small { margin-top: 3px; color: var(--text-3); font-size: 10px; }

.member-sidebar-collapsed .member-topbar-brand-copy,
.member-sidebar-collapsed .member-nav-label,
.member-sidebar-collapsed .member-sidebar-user-copy,
.member-sidebar-collapsed .member-nav .grp { display: none; }
.member-sidebar-collapsed .member-sidebar-head { justify-content: center; }
.member-sidebar-collapsed .member-topbar-brand { display: none; }
.member-sidebar-collapsed .member-nav a,
.member-sidebar-collapsed .member-public-link,
.member-sidebar-collapsed .member-logout-link,
.member-sidebar-collapsed .member-sidebar-user { justify-content: center; padding-inline: 0; }

.member-main { min-width: 0; }
.member-mobile-top { display: none; }
.member-content { width: min(1280px,100%); min-width: 0; margin: 0 auto; padding: 30px 34px 72px; }
.member-stack { max-width: none; margin: 0; gap: 16px; }
.member-stack > .card, .member-stack > .grid > .card, .member-stack .card { border-radius: var(--radius); }

.home-welcome, .akun-head {
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(125deg, var(--orange-soft), var(--card) 55%, var(--bg-soft));
}
.home-welcome::after, .akun-head::after { background: var(--lime-soft); }
.home-welcome h2, .akun-head h2 { font-size: 23px; }
.home-kicker { color: var(--brand); font-weight: 800; letter-spacing: .13em; }
.home-box-grid { gap: 14px; }

.member-content .metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.member-content .metrics .metric {
  border: 0;
  border-radius: 0;
  background: var(--card);
  padding: 16px 14px;
}
.member-content .card { box-shadow: none; }

.member-content .tabs, .doc-body .tabs {
  max-width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start;
  overflow: visible; gap: 2px; border-bottom: 1px solid var(--line-soft);
}
.member-content .tabs button, .doc-body .tabs button {
  flex: 0 0 auto; border-radius: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--text-2); font-weight: 550; padding: 9px 14px;
}
.member-content .tabs button:hover, .doc-body .tabs button:hover { color: var(--text); }
.member-content .tabs button[aria-selected="true"], .doc-body .tabs button[aria-selected="true"] {
  color: var(--text); border-bottom-color: var(--brand); font-weight: 650;
}
.member-plans { max-width: 1080px; margin-inline: auto; }
.member-plans > :last-child:nth-child(odd) { max-width: none; }
.member-nav-backdrop { display: none; }

/* ============================================================
   ADMIN SHELL
   ============================================================ */
body.admin-active { background: var(--bg); }
.admin-shell { min-height: 100dvh; display: grid; grid-template-columns: 258px minmax(0,1fr); transition: grid-template-columns .2s ease; }
.admin-shell.admin-sidebar-collapsed { grid-template-columns: 96px minmax(0,1fr); }
.admin-workspace { min-width: 0; }

.admin-shell .side {
  position: sticky; top: 0; width: auto; height: 100dvh; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg-soft); border-right: 1px solid var(--line);
  padding: 18px 14px 14px; overflow-y: auto;
}
.admin-side-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 14px; border-bottom: 1px solid var(--line-soft); }
.admin-side-head .brand { min-width: 0; padding: 0; white-space: nowrap; font-weight: 750; letter-spacing: -.01em; }
.admin-side-head .brand .mark { border-radius: 7px; }

.admin-shell .side .grp {
  display: block; flex: none; padding: 14px 10px 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-3); user-select: none;
}
.admin-shell .side .grp:first-of-type { padding-top: 8px; }
.admin-shell .side a {
  display: flex; align-items: center; gap: 10px; flex: none; width: 100%;
  min-height: 34px; padding: 0 10px; border: 1px solid transparent;
  white-space: nowrap; font-size: 13.5px; font-weight: 550; color: var(--text-2);
  border-radius: 7px;
}
.admin-shell .side .side-foot { display: block; flex: none; margin-top: auto !important; }
.admin-shell .side a:hover { background: var(--card-2); color: var(--text); }
.admin-shell .side a[aria-current="page"] {
  color: var(--text); background: var(--card-2); border-color: var(--line);
  font-weight: 650; box-shadow: inset 3px 0 0 var(--brand);
}
.admin-shell .side a[aria-current="page"] .admin-nav-icon { color: var(--brand); }

.admin-sidebar-collapsed .admin-brand-copy,
.admin-sidebar-collapsed .side .grp,
.admin-sidebar-collapsed .side-foot { display: none; }
.admin-sidebar-collapsed .admin-side-head { justify-content: center; }
.admin-sidebar-collapsed .admin-side-head .brand { display: none; }
.admin-sidebar-collapsed .side a { justify-content: center; padding: 0; font-size: 0; }
.admin-sidebar-collapsed .side a::before { content: none; }

.admin-mobile-top { display: none; }
.admin-side-backdrop { display: none; }
.admin-shell .main { width: min(1480px,100%); margin: 0 auto; padding: 28px 32px 72px; }
.admin-shell .page-head { padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.admin-shell .page-head h2 { font-size: 21px; font-weight: 750; }
.admin-shell .page-head > .row,
.admin-shell .page-head > div:last-child { min-width: 0; max-width: 100%; flex-wrap: wrap; }
.admin-shell .page-head .btn { max-width: 100%; white-space: normal; }
.admin-shell .card, .admin-shell .panel { box-shadow: none; }

/* ---------- tabel (sortable) ---------- */
.table-wrap { border-radius: var(--radius); overflow: hidden; }
table { font-size: 13px; }
th, td { padding: 9px 12px; }
th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3); font-weight: 700; background: var(--card-2);
  position: sticky; top: 0; cursor: pointer; user-select: none; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
th:hover { color: var(--text-2); }
th .srt { color: var(--brand); font-size: 9px; }
th.srt-on { color: var(--text); }
td { border-bottom: 1px solid var(--line-soft); }
tbody tr:hover td { background: var(--card-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- responsif ---------- */
@media (max-width: 1000px) {
  .public-active .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .public-active .hero-grid > div:first-child { padding-left: 0; }
  .public-active .hero .card { max-width: 720px; }
  .member-content .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  /* Touch target ponsel: 29px terlalu gepeng untuk aksi utama. */
  .topbar .btn,
  .doc-page .btn,
  .site .btn,
  .member-shell .btn-sm,
  .admin-shell .btn-sm,
  .member-shell button.btn,
  .admin-shell button.btn,
  .member-shell a.btn,
  .admin-shell a.btn { min-height: 36px; padding-block: 8px; }
  .admin-shell .pager .btn,
  .admin-shell button[aria-label] { min-width: 36px; }
  .nav-links { display: none; }
  /* Burger tampil hanya di layar sempit; konten ikonnya digambar via CSS. */
  .hamburger { display: grid; }
  .hamburger::before { content: ''; width: 16px; height: 12px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
  .hamburger[aria-expanded="true"]::before { border-top: 0; border-bottom: 0; border: 0; height: 0; }
  .mobile-menu {
    position: fixed; top: 62px; left: 0; right: 0; z-index: 39;
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 14px 14px;
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .18s, transform .18s;
  }
  .mobile-menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .mobile-menu a { padding: 11px 10px; border-radius: 8px; color: var(--text-2); font-weight: 550; }
  .mobile-menu a:hover { background: var(--card-2); color: var(--text); }
  body.menu-open { overflow: hidden; }
  .topbar .inner { padding-inline: 14px; }
  #akun-aksi, #akun-aksi .btn { flex-shrink: 0; }
  /* Chip akun tetap terbaca di ponsel: nama + label dashboard utuh,
     avatar tetap ada — gak ada lagi nama yang disembunyiin. */
  .public-account-chip { gap: 7px; }
  .public-account-copy small { display: none; }
  .public-account-copy strong { font-size: 12px; }
  .public-account-avatar { width: 30px; height: 30px; }
  .public-account-chip { min-height: 38px; }
  .public-active .hero { min-height: auto; padding: 48px 0 56px; }
  .public-active .section { padding: 58px 0; }
  .public-active .pricing { grid-template-columns: 1fr; }
  .public-active .pricing > :last-child:nth-child(odd) { grid-column: auto; width: 100%; }

  .member-shell, .member-shell.member-sidebar-collapsed { display: block; }
  .member-sidebar {
    position: fixed; z-index: 70; inset: 0 auto 0 0; width: min(292px,calc(100vw - 40px));
    height: 100dvh; margin: 0; border-right: 1px solid var(--line);
    transform: translateX(calc(-100% - 24px)); transition: transform .2s ease;
    box-shadow: var(--shadow);
  }
  .member-shell.member-nav-open .member-sidebar { transform: none; }
  .member-sidebar-collapsed .member-topbar-brand-copy,
  .member-sidebar-collapsed .member-nav-label,
  .member-sidebar-collapsed .member-sidebar-user-copy,
  .member-sidebar-collapsed .member-nav .grp { display: grid; }
  .member-sidebar-collapsed .member-topbar-brand { display: flex; }
  .member-sidebar-collapsed .member-sidebar-head { justify-content: space-between; }
  .member-sidebar-collapsed .member-nav a,
  .member-sidebar-collapsed .member-public-link,
  .member-sidebar-collapsed .member-sidebar-user { justify-content: flex-start; padding-inline: 10px; }
  .member-collapse-button { display: none; }
  .member-mobile-top {
    position: sticky; top: 0; z-index: 45; min-height: 58px;
    display: grid; grid-template-columns: 40px minmax(0,1fr) 40px;
    align-items: center; gap: 10px; padding: 0 16px;
    background: color-mix(in srgb,var(--bg) 96%,transparent); border-bottom: 1px solid var(--line);
  }
  .member-mobile-top strong { text-align: center; font-size: 14px; }
  .member-mobile-menu, .member-mobile-public, .admin-mobile-menu, .admin-mobile-top a {
    width: 36px; height: 36px; display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 7px; background: var(--card-2);
    color: var(--text-2); font: 700 10px var(--mono);
  }
  .member-menu-lines { width: 18px; height: 18px; display: grid; place-items: center; border: 0; }
  .member-menu-lines svg { width: 18px; height: 18px; }
  .admin-mobile-menu span { width: 15px; height: 10px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }
  .member-nav-backdrop { position: fixed; z-index: 65; inset: 0; background: rgba(0,0,0,.58); border: 0; }
  .member-nav-open .member-nav-backdrop { display: block; }
  .member-content { padding: 24px 18px 58px; }

  .admin-shell, .admin-shell.admin-sidebar-collapsed { display: block; }
  .admin-shell .side {
    position: fixed; z-index: 70; inset: 0 auto 0 0; width: min(310px,calc(100vw - 40px));
    height: 100dvh; margin: 0; border-right: 1px solid var(--line);
    transform: translateX(calc(-100% - 24px)); transition: transform .2s ease;
    box-shadow: var(--shadow);
  }
  .admin-shell .side .grp, .admin-shell .side .side-foot { display: block; }
  .admin-shell .side a { width: 100%; min-height: 36px; }
  .admin-side-head { width: 100%; flex: none; min-height: 52px; }
  .admin-shell.admin-nav-open .side { transform: none; }
  .admin-sidebar-collapsed .admin-brand-copy,
  .admin-sidebar-collapsed .side .grp,
  .admin-sidebar-collapsed .side-foot { display: block; }
  .admin-sidebar-collapsed .admin-side-head { justify-content: space-between; }
  .admin-sidebar-collapsed .admin-side-head .brand { display: flex; }
  .admin-sidebar-collapsed .side a { justify-content: flex-start; padding: 0 10px; font-size: 13.5px; }
  .admin-sidebar-collapsed .side a::before { content: none; }
  .admin-collapse-button { display: none; }
  .admin-mobile-top {
    position: sticky; top: 0; z-index: 45; min-height: 58px;
    display: grid; grid-template-columns: 40px minmax(0,1fr) 40px;
    align-items: center; gap: 10px; padding: 0 16px;
    background: color-mix(in srgb,var(--bg) 96%,transparent); border-bottom: 1px solid var(--line);
  }
  .admin-mobile-top strong { text-align: center; font-size: 14px; }
  .admin-side-backdrop { position: fixed; z-index: 65; inset: 0; border: 0; background: rgba(0,0,0,.58); }
  .admin-nav-open .admin-side-backdrop { display: block; }
  .admin-shell .main { padding: 24px 16px 64px; }
}

.sync-provider-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2)}
.sync-provider-row.disabled{opacity:.58}.sync-provider-main{display:flex;flex-direction:column;min-width:0}.route-baris{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2)}
.route-target{width:100%;min-width:0}

/* Aturan FUP: kolom eksplisit supaya label token/RPM tidak terjepit. */
.fup-tier-row {
  display: grid;
  grid-template-columns: minmax(150px,1fr) auto minmax(88px,110px) auto 36px;
  align-items: center;
  gap: 8px;
}
.fup-tier-row input { min-width: 0; width: 100%; }
.level-tier-row {
  display: grid;
  grid-template-columns: minmax(110px,130px) auto minmax(70px,90px) auto minmax(70px,90px) auto;
  align-items: center;
  gap: 8px;
}
.level-tier-row input { min-width: 0; width: 100%; }

@media (max-width: 560px) {
  .topbar .inner { padding-inline: 12px; }
  .fup-tier-row {
    grid-template-columns: minmax(0,1fr) auto 36px;
    grid-template-areas: "ceil unit unit" "rpm rpmunit del";
  }
  .fup-tier-row > :nth-child(1) { grid-area: ceil; }
  .fup-tier-row > :nth-child(2) { grid-area: unit; }
  .fup-tier-row > :nth-child(3) { grid-area: rpm; }
  .fup-tier-row > :nth-child(4) { grid-area: rpmunit; }
  .fup-tier-row > :nth-child(5) { grid-area: del; }
  .level-tier-row {
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-areas:
      "name name"
      "from fromval"
      "points discount"
      "pct pct";
  }
  .level-tier-row > :nth-child(1) { grid-area: name; }
  .level-tier-row > :nth-child(2) { grid-area: from; }
  .level-tier-row > :nth-child(3) { grid-area: fromval; }
  .level-tier-row > :nth-child(4) { grid-area: points; }
  .level-tier-row > :nth-child(5) { grid-area: discount; }
  .level-tier-row > :nth-child(6) { grid-area: pct; }
  .admin-shell .card-head > .btn { flex-shrink: 0; }
  .admin-shell input[type="checkbox"],
  .member-active input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; }
  /* Semua item daftar isi harus terlihat. Strip swipe 1.4k px bikin menu tampak hilang. */
  .doc-page .doc-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
    padding: 0 0 14px;
  }
  .doc-page .doc-nav a {
    min-width: 0;
    white-space: normal;
    line-height: 1.25;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    padding: 8px 9px;
  }
  .doc-page .doc-nav a[aria-current="true"] {
    border-color: var(--brand);
    background: var(--brand-soft);
  }
  .seg { display: none; }
  .sync-provider-row{grid-template-columns:auto minmax(0,1fr)}
  .sync-provider-row>.badge{grid-column:2}
  .topbar .nama { font-size: 13px; }
  #akun-aksi .btn { padding-inline: 10px; }
  .public-active .hero .cta { display: grid; }
  .public-active .hero .cta .btn { width: 100%; }
  .public-active .model-grid { grid-template-columns: 1fr; }
  .public-active .model-card:nth-child(n) { padding-inline: 4px; border-left: 0; }
  .member-content .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .member-content .metrics .metric { border: 0; }
  .home-box-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .member-shell, .member-sidebar, .admin-shell, .admin-shell .side { transition: none !important; }
}
