/* LexKas — gaya aplikasi */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fb; --border: #e3e6eb; --text: #1b2430; --muted: #667085;
  --brand: #16324f; --brand-2: #1f4a73; --accent: #c9a45c; --accent-soft: #f6eedd;
  --c1: #2f7d6d; --c2: #c2603f;
  --ok: #1f7a4d; --ok-bg: #e3f4ea; --bad: #b42318; --bad-bg: #fde8e7; --warn: #a15c07; --warn-bg: #fdf1dc; --info: #1f5fa8; --info-bg: #e5eefb;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1520; --surface: #161e2b; --surface-2: #1b2534; --border: #273244; --text: #e6eaf0; --muted: #98a2b3;
    --brand: #8fb8e6; --brand-2: #a9c9ee; --accent: #e3c27f; --accent-soft: #2b2617;
    --c1: #4fb39d; --c2: #e0835f;
    --ok: #5ccf94; --ok-bg: #133024; --bad: #f97066; --bad-bg: #3a1714; --warn: #f5b74f; --warn-bg: #352710; --info: #7cb2f2; --info-bg: #132840;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] { --bg: #0f1520; --surface: #161e2b; --surface-2: #1b2534; --border: #273244; --text: #e6eaf0; --muted: #98a2b3; --brand: #8fb8e6; --accent: #e3c27f; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 700; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mt { margin-top: 12px; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.row { display: flex; align-items: center; flex-wrap: wrap; } .gap { gap: 8px; } .between { justify-content: space-between; } .end { justify-content: flex-end; margin-top: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }

/* Controls */
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-height: 38px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand-2) 35%, transparent); border-color: var(--brand-2); }
input[type=checkbox] { width: auto; min-height: auto; }
input[type=file] { padding: 6px; }
.btn { font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; padding: 8px 14px; min-height: 38px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand-2); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; } .btn.danger.ghost { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: transparent; }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0f1520; } }
.icon-btn { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--muted); padding: 6px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-2); }

/* Shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--brand); color: #dfe7f1; display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sidebar { background: #0b1019; border-right: 1px solid var(--border); } }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 16px; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #16324f; display: grid; place-items: center; font: 600 22px var(--serif); flex: none; }
.logo.big { width: 56px; height: 56px; font-size: 34px; border-radius: 14px; }
.brand-name { font: 600 18px var(--serif); color: #fff; } .brand-sub { font-size: 11.5px; opacity: .7; }
.brand.big .brand-name { font-size: 26px; color: var(--text); } .brand.big .brand-sub { color: var(--muted); opacity: 1; font-size: 13px; }
.office-switch { display: flex; flex-direction: column; gap: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .9; padding: 0 6px 12px; }
.office-switch select { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); font-size: 13px; text-transform: none; letter-spacing: 0; }
.office-switch option { color: #1b2430; }
.nav-group { margin-bottom: 10px; }
.nav-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 8px 10px 4px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #dfe7f1; font-weight: 500; }
.nav-link:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.nav-link.active { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav-link[aria-disabled=true] { opacity: .4; pointer-events: none; }
.ico { width: 18px; text-align: center; opacity: .85; }
.side-foot { margin-top: auto; padding: 8px 6px 0; }
.side-foot .btn { color: #dfe7f1; border-color: rgba(255,255,255,.2); width: 100%; }
.warnbox { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 8px 10px; font-size: 12px; margin: 0 6px 10px; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar-title { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.role-chip { font-size: 11.5px; background: var(--accent-soft); color: var(--warn); padding: 3px 8px; border-radius: 99px; font-weight: 600; }
.user-chip { font-weight: 600; color: var(--text); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; }
main { padding: 24px; max-width: 1400px; width: 100%; outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty.small { padding: 16px; border: 0; }

/* Cards & KPI */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h2 { margin-bottom: 10px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; } .card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi-val { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.pos .kpi-val { color: var(--ok); } .kpi.neg .kpi-val { color: var(--bad); }
.alerts { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.alerts li { padding: 10px 14px; border-radius: 10px; font-size: 13.5px; }
.a-bad { background: var(--bad-bg); color: var(--bad); } .a-warn { background: var(--warn-bg); color: var(--warn); }
.alerts a { font-weight: 600; color: inherit; text-decoration: underline; }
.ytd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.ytd span { display: block; font-size: 11.5px; color: var(--muted); } .ytd b { font-variant-numeric: tabular-nums; }
.legend { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; } .dot.c1 { background: var(--c1); } .dot.c2 { background: var(--c2); margin-left: 8px; }
.chart { width: 100%; height: auto; } .chart .grid { stroke: var(--border); } .chart .axis { fill: var(--muted); font-size: 11px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 120px; } .spark div { flex: 1; background: var(--c1); border-radius: 3px 3px 0 0; min-height: 2px; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .table-wrap { box-shadow: none; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border); }
.tbl .num, .mini .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.clickable { cursor: pointer; } .tbl tr.clickable:hover td { background: var(--surface-2); }
.tbl tr.grp td { font-weight: 700; background: var(--accent-soft); font-size: 12px; letter-spacing: .05em; }
.tbl tr.subtotal td { font-weight: 700; border-top: 1px solid var(--muted); }
.tbl tr.grand td { font-weight: 800; background: var(--surface-2); font-size: 14px; border-top: 2px solid var(--text); }
.wide-tbl td:first-child, .wide-tbl th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 220px; }
.wide-tbl tr.grp td:first-child { background: var(--accent-soft); }
.mini { width: 100%; border-collapse: collapse; } .mini td { padding: 7px 0; border-bottom: 1px solid var(--border); }
.mini tr.sep td { border-top: 2px solid var(--border); } .mini tr.total td { font-weight: 800; font-size: 15px; border-bottom: 0; color: var(--ok); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); } .b-bad { background: var(--bad-bg); color: var(--bad); } .b-warn { background: var(--warn-bg); color: var(--warn); }
.b-info { background: var(--info-bg); color: var(--info); } .b-neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.warn-dot { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 800; }
.bar-cell { position: relative; min-width: 110px; } .bar-cell span { position: absolute; left: 0; top: 2px; bottom: 2px; background: color-mix(in srgb, var(--c1) 20%, transparent); border-radius: 4px; z-index: 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1 1 260px; width: auto; } .toolbar select { width: auto; }
.sumbar { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); margin-bottom: 10px; } .sumbar b { font-variant-numeric: tabular-nums; }
.period { display: flex; gap: 6px; } .period select { width: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--text); border-color: var(--accent); } .tabs a:hover { text-decoration: none; color: var(--text); }
.chips { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 3px 4px 3px 10px; font-size: 12.5px; display: flex; align-items: center; gap: 2px; }
.chip-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 6px; border-radius: 99px; } .chip-x:hover { color: var(--bad); }
.add-chip input { flex: 1; min-height: 32px; padding: 4px 8px; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); } .danger-zone hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.roles { margin-top: 12px; line-height: 1.7; }
.prose ol, .prose ul { padding-left: 20px; margin: 0; } .prose li { margin-bottom: 6px; }

/* Forms & modal */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 4px; } .field label { font-weight: 600; font-size: 12.5px; }
.col-full { grid-column: 1 / -1; }
.field.invalid input, .field.invalid select { border-color: var(--bad); }
.req { color: var(--bad); } .help { color: var(--muted); font-size: 11.5px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.money { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.money span { padding: 0 8px 0 10px; color: var(--muted); font-size: 13px; } .money input { border: 0; text-align: right; font-variant-numeric: tabular-nums; }
.money:focus-within { outline: 2px solid color-mix(in srgb, var(--brand-2) 35%, transparent); }
.calc { margin-top: 12px; padding: 10px 12px; background: var(--accent-soft); border-radius: 8px; font-size: 13px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 16, 26, .5); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 14px; width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal-wide { width: min(760px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 18px; overflow-y: auto; } .modal-body p:first-child { margin-top: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot .danger.ghost { margin-right: auto; }
@keyframes fade { from { opacity: 0 } }
#toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); max-width: 360px; transition: opacity .3s, transform .3s; font-weight: 500; }
.toast-err { background: var(--bad); color: #fff; } .toast.out { opacity: 0; transform: translateY(8px); }
.okbox { background: var(--ok-bg); color: var(--ok); padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; }
.errbox { background: var(--bad-bg); color: var(--bad); padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; }

/* Auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: var(--brand); color: #e6edf5; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 28px;
  background-image: radial-gradient(circle at 85% 15%, rgba(201,164,92,.25), transparent 45%), radial-gradient(circle at 10% 90%, rgba(47,125,109,.3), transparent 40%); }
.auth-hero .brand.big .brand-name { color: #fff; } .auth-hero .brand.big .brand-sub { color: #c9d6e6; }
.hero-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 15px; }
.hero-list li { padding-left: 28px; position: relative; } .hero-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.auth-card { background: var(--surface); padding: 48px; display: flex; flex-direction: column; justify-content: center; max-width: 480px; width: 100%; margin: auto; }
.auth-card h1 { margin-bottom: 16px; }
.auth-wrap > .auth-card.wide { grid-column: 1 / -1; max-width: 620px; border-radius: 16px; border: 1px solid var(--border); margin: 48px auto; gap: 16px; }
.steps { padding-left: 20px; line-height: 1.9; margin: 0; }
.splash { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); }

/* Print */
.print-head { display: none; }
@media print {
  .sidebar, .topbar, .page-head .row, .tabs, .toolbar, #toasts { display: none !important; }
  .shell { display: block; } main { padding: 0; } .print-head { display: block; margin-bottom: 12px; }
  .table-wrap { box-shadow: none; border: 0; overflow: visible; } .tbl { font-size: 10px; } body { background: #fff; }
}

/* Responsive */
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .menu-btn { display: inline-block; }
  .topbar { padding: 8px 16px; } .user-chip, .role-chip { display: none; }
  main { padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-hero { padding: 32px 20px; } .auth-card { padding: 28px 20px; }
  .ytd { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  /* Tabel menjadi kartu di layar kecil */
  .tbl:not(.wide-tbl) thead { display: none; }
  .tbl:not(.wide-tbl), .tbl:not(.wide-tbl) tbody, .tbl:not(.wide-tbl) tr, .tbl:not(.wide-tbl) td { display: block; width: 100%; }
  .tbl:not(.wide-tbl) tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .tbl:not(.wide-tbl) td { border: 0; padding: 3px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl:not(.wide-tbl) td::before { content: attr(data-label); color: var(--muted); font-size: 11.5px; text-align: left; flex: none; }
  .tbl:not(.wide-tbl) td[data-label=""]::before { content: none; }
  .tbl:not(.wide-tbl) tfoot { display: block; } .tbl:not(.wide-tbl) tfoot td::before { content: none; }
}
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr; } .kpi-val { font-size: 20px; } }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.or[hidden] { display: none; }
.oauth-google { gap: 10px; }
.btn[hidden], [hidden] { display: none !important; }

/* Langganan & pembayaran */
.paybar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 24px; font-weight: 600; font-size: 13.5px; }
.paybar.warn { background: var(--warn-bg); color: var(--warn); } .paybar.bad { background: var(--bad-bg); color: var(--bad); }
.paybar:empty { display: none; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.plan { position: relative; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.plan:hover { border-color: var(--brand-2); } .plan.hl { border-color: var(--accent); }
.plan-price { font-size: 24px; font-weight: 800; } .plan-price small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.plan-badge { position: absolute; top: -10px; right: 12px; background: var(--accent); color: #16324f; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 99px; }
.order-card { border: 2px solid var(--accent); }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 12px; }
.pay-grid > div { background: var(--surface-2); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.big-amount { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
label.btn input[type=file] { display: none; }
h3 { font-size: 14px; margin: 16px 0 8px; }
@media (max-width: 860px) { .pay-grid { grid-template-columns: 1fr; } .paybar { padding: 10px 16px; } }

/* =====================================================================
   Gerak & interaksi (rujukan: Nuris liquid glass) — palet LexKas
   ===================================================================== */
:root { --ease: cubic-bezier(.2,.8,.2,1); --spring: cubic-bezier(.34,1.56,.64,1); --tab-bg: #16324f; --tab-ink: #a9bdd3; --gold: #c9a45c; }
:root[data-theme="dark"] {
  --bg: #0f1520; --surface: #161e2b; --surface-2: #1b2534; --border: #273244; --text: #e6eaf0; --muted: #98a2b3;
  --brand: #8fb8e6; --brand-2: #a9c9ee; --accent: #e3c27f; --accent-soft: #2b2617; --c1: #4fb39d; --c2: #e0835f;
  --ok: #5ccf94; --ok-bg: #133024; --bad: #f97066; --bad-bg: #3a1714; --warn: #f5b74f; --warn-bg: #352710; --info: #7cb2f2; --info-bg: #132840;
  --tab-bg: #0b1019; color-scheme: dark;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tab-bg: #0b1019; } }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] .sidebar { background: #0b1019; border-right: 1px solid var(--border); }
:root[data-theme="dark"] .btn.primary { color: #0f1520; }
.theme-anim, .theme-anim * { transition: background-color .35s ease, color .35s ease, border-color .35s ease !important; }

/* Tombol aksen (emas) — padanan tombol saffron di rujukan */
.btn.accent { background: var(--gold); border-color: var(--gold); color: #16324f; }
.btn.accent:hover { background: #d6b46f; }
.btn { transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .15s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.has-ripple { overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); pointer-events: none; animation: ripple .6s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* Bilah atas kaca */
.topbar { background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); min-height: 64px; }
.topbar-title { display: flex; flex-direction: column; line-height: 1.2; }
.eyebrow-sm { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.theme-btn { width: 36px; height: 36px; border-radius: 12px; font-size: 16px; transition: transform .3s var(--spring), background .15s; }
.theme-btn:hover { transform: rotate(20deg); background: var(--surface-2); }
.user-chip { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--warn); font-weight: 800; font-size: 13px; flex: none; }

/* Sidebar: lensa putih meluncur di menu aktif */
.sidebar nav { position: relative; }
.nav-link { position: relative; z-index: 1; border-radius: 12px; transition: color .2s, background .15s; }
.nav-link.active { background: transparent; box-shadow: none; color: #16324f; font-weight: 700; }
.nav-link.active .ico { opacity: 1; }
:root[data-theme="dark"] .nav-link.active { color: #0f1520; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-link.active { color: #0f1520; } }
.lens { position: absolute; top: 0; left: 0; z-index: 0; width: 0; height: 0; opacity: 0; pointer-events: none; border-radius: 12px; will-change: transform, width, height; transition: opacity .2s ease; }
.lens-side { background: linear-gradient(180deg, #fffffff7 0%, #ffffffe0 60%, #ffffffee 100%); box-shadow: inset 0 1px .5px #fff, inset 0 -1px 1px #ffffff80, 0 0 0 .5px #00000030, 0 10px 24px -12px #000a; }
:root[data-theme="dark"] .lens-side { background: linear-gradient(180deg, #e8eef5 0%, #cfdbe8 100%); }
.lens-shine { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.lens-shine::before { content: ""; position: absolute; left: 6%; right: 6%; top: 1px; height: 50%; border-radius: 99px; background: radial-gradient(120% 100% at var(--shine-x, 50%) 0%, #ffffffe6 0%, #ffffff40 45%, transparent 72%); }
.nav-link:not(.active):hover { background: rgba(255,255,255,.07); }

/* Masuk halaman & bertahap */
main.page-in > * { animation: rise .45s var(--ease) both; }
main.page-in > *:nth-child(2) { animation-delay: .04s; } main.page-in > *:nth-child(3) { animation-delay: .08s; } main.page-in > *:nth-child(4) { animation-delay: .12s; } main.page-in > *:nth-child(n+5) { animation-delay: .16s; }
.st { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tbl tbody tr { animation: fadein .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Intro dashboard (eyebrow + judul besar) */
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 4px 0 20px; flex-wrap: wrap; }
.intro .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.intro h1 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.2; max-width: 640px; margin: 0 0 8px; }
.intro h1 .hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--gold) 45%, transparent) 0); padding: 0 2px; }
.intro p { margin: 0; }
.intro-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Kartu: sudut 18px, angkat saat hover, sorotan mengikuti kursor */
.card, .kpi, .table-wrap { border-radius: 18px; }
.kpi, .card { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--gold) 18%, transparent), transparent 65%); }
.kpi:hover::after { opacity: 1; }
.kpi:hover, .card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(22, 50, 79, .45); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kpi-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--warn); font-weight: 800; transition: transform .3s var(--spring); }
.kpi:hover .kpi-ico { transform: scale(1.12) rotate(-6deg); }
.alerts li { transition: transform .2s var(--ease); } .alerts li:hover { transform: translateX(3px); }
.tbl tr.clickable td { transition: background .15s; }
.tbl tr.clickable:hover td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

/* Grafik: batang tumbuh dari bawah */
.chart .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .7s var(--ease) both; animation-delay: var(--d, 0ms); transition: opacity .15s; }
.chart .bar:hover { opacity: .78; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Kerangka pemuatan */
.sk-page { display: grid; gap: 14px; }
.sk { border-radius: 14px; background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 40%, var(--border)) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.sk-title { height: 30px; width: 46%; } .sk-sub { height: 14px; width: 30%; }
.sk-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; } .sk-card { height: 96px; border-radius: 18px; }
.sk-block { height: 220px; border-radius: 18px; } .sk-block.short { height: 120px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Modal: muncul & menutup halus */
.modal-backdrop { animation: fade .18s ease; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal { animation: pop .26s var(--spring); }
.modal-backdrop.closing { animation: fadeout .18s ease forwards; } .modal-backdrop.closing .modal { animation: popout .18s ease forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes popout { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes fadeout { to { opacity: 0; } }
.modal { border-radius: 20px; }

/* Toast: ikon, bilah waktu, geser masuk/keluar */
.toast { display: flex; align-items: center; gap: 10px; position: relative; overflow: hidden; padding: 12px 12px 14px; border-radius: 14px; animation: toastin .35s var(--spring); }
.toast.out { opacity: 0; transform: translateX(24px); transition: opacity .25s, transform .25s; }
.toast-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--c1); color: #fff; font-size: 12px; font-weight: 800; flex: none; }
.toast-err .toast-ico { background: #fff; color: var(--bad); }
.toast-msg { flex: 1; }
.toast-x { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 2px 4px; font-size: 12px; } .toast-x:hover { opacity: 1; }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--gold); transform-origin: left; animation: tbar 3.6s linear forwards; }
.toast-err .toast-bar { animation-duration: 5.2s; background: #fff; }
.toast.hold .toast-bar { animation-play-state: paused; }
@keyframes toastin { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes tbar { to { transform: scaleX(0); } }

/* Tab, chip, paket: transisi */
.tabs a { position: relative; transition: color .2s; }
.tabs a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .25s var(--ease); }
.tabs a.active { border-color: transparent; } .tabs a.active::after, .tabs a:hover::after { transform: scaleX(1); }
.tabs a:hover::after { opacity: .5; } .tabs a.active::after { opacity: 1; }
.plan { transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; position: relative; overflow: hidden; }
.plan:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -18px rgba(22, 50, 79, .5); }
.chips li { animation: fadein .3s var(--ease) both; }
.paybar { animation: slidedown .4s var(--ease); }
@keyframes slidedown { from { opacity: 0; transform: translateY(-8px); } }

/* Mobile: drawer + scrim, bilah tab melayang, tombol catat (FAB) */
.scrim { display: none; }
.tabbar, .qa-sheet { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: none; }
  .sidebar { transition: transform .32s var(--ease); }
  .sidebar.open { box-shadow: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(10, 16, 26, .45); opacity: 0; pointer-events: none; transition: opacity .25s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
  .scrim.show { opacity: 1; pointer-events: auto; }
  main { padding-bottom: 110px; }
  .topbar .btn.ghost.sm#logoutBtn, .uname { display: none; }
  .user-chip { display: flex; }
  /* Bilah tab melayang: lingkaran emas menonjol meluncur ke tab yang dipilih */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 30; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); height: 68px; padding: 0 4px; border-radius: 26px;
    background: var(--tab-bg); box-shadow: inset 0 1px 0 #ffffff1a, 0 20px 40px -14px #16324fa8; overflow: visible; }
  .tab-item { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; padding: 0 0 11px; border: 0; background: none;
    color: var(--tab-ink); font: inherit; text-decoration: none !important; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tab-item b { font-size: 11px; line-height: 14px; height: 14px; font-weight: 600; letter-spacing: .01em; transition: color .25s; white-space: nowrap; }
  .tab-ico { display: grid; place-items: center; width: 26px; height: 26px; transition: transform .5s var(--spring), color .25s; }
  .tab-item:active .tab-ico { transform: scale(.9); }
  .tab-item.lift .tab-ico { transform: translateY(var(--lift-y, -21px)); color: #16324f; }
  .tab-item.lift b { color: #fff; font-weight: 800; }
  .lens-tab { border-radius: 50%; background: linear-gradient(180deg, #dcbc7c 0%, var(--gold) 100%);
    box-shadow: 0 10px 22px -8px rgba(201, 164, 92, .75); transition: opacity .2s; }
  .lens-tab .lens-shine { display: none; }
  .tabbar.has-lens .tab-item.lift::after { content: none; }
  .tab-item { overflow: visible !important; }
  .tabbar:has(.fab.on) { z-index: 46; }
  .qa-sheet { display: block; position: fixed; inset: 0; z-index: 45; }
  .qa-sheet[hidden] { display: none; }
  .qa-back { position: absolute; inset: 0; background: rgba(10, 16, 26, .45); opacity: 0; transition: opacity .22s; }
  .qa-panel { position: absolute; left: 10px; right: 10px; bottom: calc(112px + env(safe-area-inset-bottom)); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 10px 14px 16px;
    transform: translateY(24px) scale(.97); opacity: 0; transition: transform .3s var(--spring), opacity .2s; box-shadow: 0 24px 50px -20px #000a; }
  .qa-sheet.open .qa-back { opacity: 1; } .qa-sheet.open .qa-panel { transform: none; opacity: 1; }
  .qa-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--border); margin: 2px auto 10px; }
  .qa-title { margin: 0 4px 10px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .qa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .qa-item { position: relative; overflow: hidden; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
  .qa-item:active { transform: scale(.97); }
  .qa-ico { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--warn); font-size: 17px; }
  .qa-item b { font-size: 13.5px; } .qa-item small { color: var(--muted); font-size: 11px; }
  .qa-item:last-child { grid-column: 1 / -1; }
  #toasts { bottom: calc(86px + env(safe-area-inset-bottom)); left: 12px; right: 12px; }
  .toast { max-width: none; }
  .sk-row { grid-template-columns: repeat(2, 1fr); }
  .intro { align-items: flex-start; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
.theme-btn { font-size: 18px; }

/* =====================================================================
   Notifikasi (lonceng + panel) & pasang aplikasi
   ===================================================================== */
.bell-btn { position: relative; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--text); }
.bell-btn:hover { background: var(--surface-2); }
.bell-btn svg { transform-origin: 50% 2px; }
.bell-btn.ring svg { animation: ring .9s var(--ease); }
@keyframes ring { 0%,100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.bell-dot { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--c2); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--surface); transform: scale(0); transition: transform .3s var(--spring); }
.bell-dot.on { transform: scale(1); }
.notif-panel { position: fixed; z-index: 60; top: 62px; right: 16px; width: min(380px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 30px 60px -24px rgba(10, 20, 35, .45); overflow: hidden;
  opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: top right; transition: opacity .2s ease, transform .28s var(--spring); }
.notif-panel.open { opacity: 1; transform: none; }
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px; }
.np-head b { font-size: 15px; }
.link-btn { background: none; border: 0; color: var(--brand-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px; }
.np-push { margin: 0 12px 8px; padding: 12px; border-radius: 14px; background: var(--accent-soft); display: grid; gap: 4px; font-size: 13px; }
.np-push span { color: var(--muted); font-size: 12px; } .np-push .btn { justify-self: start; margin-top: 6px; }
.np-list { overflow-y: auto; padding: 0 6px 6px; flex: 1; }
.np-item { width: 100%; display: flex; gap: 10px; text-align: left; padding: 10px; border: 0; background: none; border-radius: 14px; cursor: pointer; color: var(--text); font: inherit; position: relative;
  animation: fadein .3s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.np-item:hover { background: var(--surface-2); }
.np-item.unread::after { content: ""; position: absolute; right: 12px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.np-ico { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; font-size: 14px; color: var(--brand); }
.np-ico.k-payment, .np-ico.k-success { background: var(--ok-bg); color: var(--ok); }
.np-ico.k-overdue, .np-ico.k-warn { background: var(--bad-bg); color: var(--bad); }
.np-ico.k-due, .np-ico.k-billing, .np-ico.k-order { background: var(--accent-soft); color: var(--warn); }
.np-txt { display: grid; gap: 2px; padding-right: 14px; min-width: 0; }
.np-txt b { font-size: 13.5px; font-weight: 700; } .np-item:not(.unread) .np-txt b { font-weight: 600; color: var(--muted); }
.np-txt span { font-size: 12.5px; color: var(--muted); } .np-txt small { font-size: 11px; color: var(--muted); opacity: .8; }
.np-empty { padding: 36px 20px; text-align: center; display: grid; gap: 6px; justify-items: center; color: var(--muted); font-size: 13px; }
.np-empty b { color: var(--text); } .np-empty-ico { font-size: 30px; opacity: .5; }
.np-foot { border-top: 1px solid var(--border); padding: 10px 16px; font-size: 12.5px; } .np-foot a { font-weight: 600; }

.install-card { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 10px; border-radius: 14px; cursor: pointer; font: inherit;
  border: 1px solid rgba(201, 164, 92, .45); background: linear-gradient(135deg, rgba(201, 164, 92, .22), rgba(201, 164, 92, .06)); color: inherit; transition: transform .2s var(--ease), background .2s; }
.install-card:hover { transform: translateY(-1px); background: linear-gradient(135deg, rgba(201, 164, 92, .32), rgba(201, 164, 92, .1)); }
.install-card[hidden] { display: none !important; }
.install-card b { display: block; font-size: 13px; } .install-card small { display: block; font-size: 11px; opacity: .75; }
.ic-ico { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--gold); color: #16324f; font-weight: 900; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
.auth-install { margin: 16px 0 0; color: var(--text); }
.install-guide ol { padding-left: 20px; } .install-guide li { margin: 6px 0; }
.ig-steps { display: grid; gap: 10px; margin-bottom: 10px; }
.ig-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--surface-2); animation: rise .4s var(--ease) both; }
.ig-step:nth-child(2) { animation-delay: .08s; } .ig-step:nth-child(3) { animation-delay: .16s; }
.ig-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 13px; }
:root[data-theme="dark"] .ig-n { color: #0f1520; }
.ig-ico { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; vertical-align: middle; }
.dev-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.dev-row:last-child { border-bottom: 0; } .dev-row p { margin: 4px 0 0; max-width: 460px; }
@media (max-width: 860px) {
  .notif-panel { top: calc(60px + env(safe-area-inset-top)); right: 8px; left: 8px; width: auto; max-height: calc(100vh - 170px); }
  .topbar-right { gap: 4px; }
  .role-chip { display: none; }
}
/* PWA terpasang: ruang aman poni/home indicator */
@media (display-mode: standalone) { .topbar { padding-top: max(10px, env(safe-area-inset-top)); } }

/* ===== Menu "Lainnya" (HP & tablet): lembar dari bawah ===== */
.ms { position: fixed; inset: 0; z-index: 55; }
.ms-back { position: absolute; inset: 0; background: rgba(10, 16, 26, .42); opacity: 0; transition: opacity .28s ease; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ms-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 28px 28px 0 0;
  padding: 6px 20px calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .42s var(--spring); box-shadow: 0 -20px 50px -20px #0008; touch-action: pan-y; }
.ms.open .ms-back { opacity: 1; } .ms.open .ms-panel { transform: none; }
.ms-grab { display: grid; place-items: center; padding: 8px 0 6px; cursor: grab; } .ms-grab span { width: 42px; height: 5px; border-radius: 5px; background: var(--border); }
.ms-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.ms-head b { display: block; font-size: 18px; letter-spacing: -.01em; } .ms-head small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.ms-head > div { flex: 1; min-width: 0; } .ms-head small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-avatar { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--brand); color: var(--gold); font-weight: 800; font-size: 18px; }
:root[data-theme="dark"] .ms-avatar { background: #22344a; }
.ms-x { flex: none; width: 42px; height: 42px; border-radius: 14px; border: 0; background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.ms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ms-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 104px; padding: 14px 8px; border-radius: 20px;
  background: var(--surface-2); color: var(--text); text-decoration: none !important; border: 0; font: inherit; cursor: pointer; text-align: center; transition: transform .18s var(--ease), background .2s; }
.ms-tile:active { transform: scale(.96); }
.ms-tile b { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.ms-ico { color: var(--brand-2); display: grid; place-items: center; transition: transform .35s var(--spring); }
:root[data-theme="dark"] .ms-ico { color: var(--brand); }
.ms-tile:hover .ms-ico { transform: translateY(-2px) scale(1.06); }
.ms-tile.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 55%, transparent); } .ms-tile.on .ms-ico { color: var(--warn); }
.ms-tile.gold { background: linear-gradient(145deg, #f3e4c4, #e7cf9b); color: #16324f; } .ms-tile.gold .ms-ico { color: #16324f; }
.ms-tile.danger { background: var(--bad-bg); color: var(--bad); } .ms-tile.danger .ms-ico { color: var(--bad); }
.ms-tile[aria-disabled] { opacity: .45; }
.ms-sec { margin: 24px 0 6px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-left: 6px; }
.ms-offices { display: grid; gap: 4px; }
.ms-office { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 16px; border: 0; background: none; font: inherit; font-size: 15.5px; color: var(--text); cursor: pointer; text-align: left; }
.ms-office:hover { background: var(--surface-2); }
.ms-office i { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot) 22%, transparent); }
.ms-office span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-office.on { background: color-mix(in srgb, var(--c1) 12%, transparent); color: var(--c1); font-weight: 600; }
.ms-office em { font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c1) 18%, transparent); }
.ms-office em.off { background: var(--surface-2); color: var(--muted); }
.ms-office.add { color: var(--brand-2); font-weight: 600; margin-top: 4px; }
.ms-office .plus { background: none; box-shadow: none; width: 14px; font-style: normal; font-weight: 800; display: grid; place-items: center; }
@media (min-width: 600px) and (max-width: 860px) {
  .ms-panel { left: 50%; right: auto; width: min(640px, 92vw); margin-left: calc(min(640px, 92vw) / -2); bottom: 16px; border-radius: 28px; max-height: 80vh; transform: translateY(calc(100% + 40px)); }
  .ms-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Pembayaran otomatis (Scalev) */
.pay-methods { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pay-methods span { padding: 5px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; }
.btn.lg { padding: 12px 22px; font-size: 15px; }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; vertical-align: -2px; margin-right: 6px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#scFound .okbox { margin-top: 8px; } #scFound .row { align-items: center; flex-wrap: wrap; margin-top: 4px; }
