:root{
  --brand:#174f53;--brand-deep:#10363a;--brand-darker:#0c2d31;--brand-soft:#e8f1f1;--brand-line:#bfd1d2;
  --ink:#172126;--ink-2:#34434a;--muted:#728087;--line:#e2e8ea;--line-strong:#d6dfe2;--soft:#f6f8f9;--surface:#ffffff;
  --danger:#a33a3a;--warn:#9a6726;--ok:#286b58;--info:#486773;
  --shadow:0 18px 48px rgba(23,33,38,.08);--shadow-soft:0 1px 2px rgba(23,33,38,.035);--radius:14px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink)
}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#f4f6f7;color:var(--ink)}body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}button,input,select,textarea{font:inherit}.hidden{display:none!important}.muted{color:var(--muted);font-size:12px}.app-shell{min-height:100vh}.nowrap{white-space:nowrap}.text-right{text-align:right}.danger-text{color:var(--danger)}

/* Icon system */
svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.nav-icon svg,.icon-btn svg,.sidebar-logout svg,.topbar-search svg{width:19px;height:19px}.nav-icon{width:22px;height:22px;display:grid;place-items:center;flex:none}

/* Sidebar */
.sidebar{position:fixed;inset:0 auto 0 0;width:258px;background:linear-gradient(180deg,#12383b 0%,#0d3034 100%);color:#fff;display:flex;flex-direction:column;padding:24px 14px 16px;z-index:30;border-right:1px solid rgba(255,255,255,.06)}
.brand{display:flex;align-items:center;gap:12px;padding:0 10px 24px}.brand strong{font-size:20px;display:block;letter-spacing:-.35px}.brand span{display:block;font-size:10.5px;color:#9eb6b8;margin-top:2px;letter-spacing:.02em}.brand-mark{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;font-weight:850;letter-spacing:-.7px;background:#153f43;color:#fff;border:1px solid rgba(255,255,255,.13);box-shadow:none}.brand-mark.small{width:37px;height:37px;border-radius:10px;font-size:12px;flex:none;background:rgba(255,255,255,.055)}
nav{display:flex;flex-direction:column;gap:2px;overflow:auto;padding:0 2px 12px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.13) transparent}.nav-label{padding:16px 12px 7px;font-size:9px;text-transform:uppercase;letter-spacing:.13em;color:#789a9d;font-weight:800}nav button{border:0;background:transparent;color:#c8d6d7;text-align:left;border-radius:11px;padding:10px 12px;cursor:pointer;display:flex;align-items:center;gap:11px;font-weight:570;font-size:13px;min-height:42px;transition:background .16s ease,color .16s ease,transform .16s ease}nav button:hover{background:rgba(255,255,255,.055);color:#fff}nav button.active{background:linear-gradient(90deg,rgba(77,133,137,.42),rgba(69,124,128,.27));color:#fff;box-shadow:inset 0 0 0 1px rgba(176,218,220,.08)}nav button.active .nav-icon{color:#e9f4f4}.badge{margin-left:auto;background:#dfecec;color:#1b4e52;border-radius:999px;padding:2px 7px;font-size:9px;font-weight:850;min-width:20px;text-align:center}
.sidebar-footer{margin-top:auto;border-top:1px solid rgba(255,255,255,.08);padding:14px 6px 0}.sidebar-user{display:flex;gap:10px;align-items:center;padding:7px 5px 13px}.sidebar-avatar{width:34px;height:34px;border-radius:9px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);display:grid;place-items:center;font-weight:800;font-size:12px;flex:none}.sidebar-footer #userMini{min-width:0}.sidebar-footer #userMini strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-footer .muted{color:#91aeb0;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.sidebar-logout{width:100%;height:40px;border:0;background:transparent;color:#b9ccce;border-radius:9px;display:flex;align-items:center;gap:11px;padding:0 10px;cursor:pointer;font-size:12px}.sidebar-logout:hover{background:rgba(255,255,255,.055);color:#fff}.sidebar-logout svg{width:18px;height:18px}

/* Main / top navigation */
.main{margin-left:258px;min-height:100vh;background:#f7f8f9}.topbar{height:82px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);display:grid;grid-template-columns:minmax(210px,.8fr) minmax(300px,1.35fr) minmax(280px,auto);align-items:center;gap:24px;padding:0 28px;position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}.topbar-start{display:flex;align-items:center;gap:12px;min-width:0}.page-context{min-width:0}.topbar h2{margin:0;font-size:18px;letter-spacing:-.25px;font-weight:760;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-context .muted{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.topbar-search{height:42px;border:1px solid var(--line-strong);border-radius:11px;background:#fbfcfc;display:flex;align-items:center;gap:9px;padding:0 13px;color:#7c8b91;max-width:520px;width:100%}.topbar-search svg{width:17px;height:17px;flex:none}.topbar-search input{border:0;background:transparent;padding:0;box-shadow:none!important;height:100%;font-size:12px;min-width:0}.topbar-search input:focus{border:0}.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.icon-btn{width:38px;height:38px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer;display:grid;place-items:center;color:#425159;transition:.15s;position:relative}.icon-btn:hover{border-color:#cbd6d9;background:#f8fafb}.notification-btn{margin-left:2px}.notify-dot{position:absolute;right:7px;top:6px;width:6px;height:6px;border-radius:50%;background:var(--brand);box-shadow:0 0 0 2px #fff}.profile-chip{display:flex;align-items:center;gap:9px;margin-left:4px;padding-left:13px;border-left:1px solid var(--line);min-width:142px}.profile-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#eef2f3;border:1px solid #d9e1e3;color:#435158;font-size:11px;font-weight:850}.profile-copy{display:grid;min-width:0}.profile-copy strong{font-size:11.5px;max-width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-copy span{font-size:9.5px;color:var(--muted);margin-top:1px}
.content{padding:26px 28px 38px;max-width:1580px;margin:auto}

/* General controls */
.btn{border:1px solid var(--line-strong);border-radius:9px;padding:9px 13px;font-weight:680;cursor:pointer;background:#fff;color:#26353b;transition:background .15s,border-color .15s,box-shadow .15s,transform .15s;font-size:12px;min-height:38px}.btn:hover{border-color:#bccbce;box-shadow:0 3px 10px rgba(23,33,38,.045)}.btn.primary{background:var(--brand);color:#fff;border-color:var(--brand)}.btn.primary:hover{background:#123f43;border-color:#123f43}.btn.soft{background:#f0f5f5;color:#244f52;border-color:#d9e5e6}.btn.ghost{background:transparent;border-color:rgba(148,163,184,.35);color:inherit}.btn.danger{background:#fffafa;color:var(--danger);border-color:#edd4d4}.btn.warn{background:#fffaf5;color:var(--warn);border-color:#eadbc8}.btn.sm{padding:6px 9px;font-size:10.5px;min-height:30px;border-radius:8px}.btn.wide{width:100%}.btn:disabled{opacity:.55;cursor:not-allowed}.login-submit{min-height:43px}
.field,input,select,textarea{width:100%;border:1px solid var(--line-strong);border-radius:9px;background:#fff;padding:10px 11px;outline:none;color:var(--ink);font-size:12px;min-height:40px;transition:border-color .15s,box-shadow .15s}input:focus,select:focus,textarea:focus{border-color:#7da5a8;box-shadow:0 0 0 3px rgba(23,79,83,.08)}textarea{min-height:90px;resize:vertical}input[type="color"]{padding:4px;height:40px}label{display:grid;gap:6px;font-size:10.5px;font-weight:720;color:#4b5a61;letter-spacing:.005em}.search{min-width:240px}.stack{display:grid;gap:14px}.split{display:flex;gap:12px;align-items:center}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.toolbar .spacer{flex:1}.toolbar h3,.toolbar strong{margin:0}

/* Cards, dashboards */
.grid{display:grid;gap:14px}.grid.cards{grid-template-columns:repeat(4,minmax(0,1fr))}.stat-card,.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-soft)}.stat-card{padding:18px;min-height:118px;position:relative;overflow:hidden}.stat-card .label{font-size:10px;color:#65757c;font-weight:720;text-transform:none;letter-spacing:0}.stat-card .value{font-size:23px;font-weight:820;letter-spacing:-.55px;margin-top:12px;color:#182329}.stat-card .hint{font-size:10.5px;color:var(--muted);margin-top:7px}.stat-card .metric-icon{width:32px;height:32px;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;color:#5d6b71;margin-bottom:10px}.stat-card .metric-icon svg{width:17px;height:17px}.card{padding:19px}.card h3{margin:0 0 15px;font-size:14px;letter-spacing:-.1px}.section-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:14px;margin-top:14px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(290px,.8fr);gap:14px}.dashboard-main{display:grid;gap:14px}.dashboard-side{display:grid;gap:14px;align-content:start}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}.panel-head h3{margin:0}.kicker{font-size:9.5px;text-transform:uppercase;color:var(--muted);font-weight:800;letter-spacing:.075em}.summary-note{padding:12px;border:1px solid #dbe7e8;border-radius:10px;background:#f4f8f8;color:#31565a;font-size:11px}.value-hero{font-size:26px;font-weight:820;letter-spacing:-.6px}

/* Tables */
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:11px;background:#fff}.table{width:100%;border-collapse:collapse;min-width:720px}.table th,.table td{padding:12px 13px;text-align:left;border-bottom:1px solid #edf0f1;font-size:11px;vertical-align:middle}.table th{font-size:9px;text-transform:none;letter-spacing:.015em;color:#738087;background:#fafbfb;position:sticky;top:0;font-weight:760}.table td strong{font-weight:720}.table tr:last-child td{border-bottom:0}.table tbody tr:hover td{background:#fbfdfd}.money{text-align:right!important;font-variant-numeric:tabular-nums}.actions{display:flex;gap:5px;flex-wrap:wrap}.empty{padding:42px 20px;text-align:center;color:var(--muted);font-size:12px}
.status{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:9.5px;font-weight:760;background:#f0f2f3;color:#58666c;border:1px solid #e3e8ea}.status.Lunas,.status.Disetujui,.status.Diterima,.status.Aktif,.status.Trial,.status.Cocok{background:#edf6f3;color:#286b58;border-color:#d9ebe5}.status.Jatuh-Tempo,.status.Ditolak,.status.Dibatalkan,.status.Suspended,.status.Nonaktif{background:#fbf1f1;color:#914848;border-color:#eedddd}.status.Sebagian,.status.Menunggu,.status.Belum-Cocok,.status.Belum-Bayar{background:#faf5ed;color:#89642f;border-color:#eee1ce}.status.Terkirim,.status.Dikonversi{background:#f0f4f5;color:#486773;border-color:#dfe7e9}.pill{display:inline-flex;background:#f1f4f5;border:1px solid #e5eaec;border-radius:999px;padding:4px 8px;font-size:10px;color:#5e6b70}

/* Forms / modal */
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid .full{grid-column:1/-1}.modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px}.modal-backdrop{position:absolute;inset:0;background:rgba(16,32,36,.54);backdrop-filter:blur(3px)}.modal-panel{position:relative;width:min(1040px,100%);max-height:92vh;background:#fff;border-radius:17px;box-shadow:0 28px 80px rgba(8,25,29,.24);display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(255,255,255,.35)}.modal-panel.invoice-premium{width:min(1380px,96vw)}.modal-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:17px 20px;border-bottom:1px solid var(--line);background:#fff}.modal-head h3{margin:0;font-size:16px}.modal-head p{margin:3px 0 0}.modal-body{padding:20px;overflow:auto;background:#fbfcfc}.modal-body .footer-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}.line-items .table{min-width:850px}.line-items input,.line-items select{padding:7px;font-size:10.5px;min-height:34px}.line-total{font-weight:760}.totals-box{margin-left:auto;width:min(390px,100%);margin-top:16px;border:1px solid var(--line);border-radius:11px;padding:11px 14px;background:#fff}.total-row{display:flex;justify-content:space-between;gap:20px;padding:7px 0;font-size:11px}.total-row.grand{font-size:16px;font-weight:820;border-top:1px solid var(--line);margin-top:6px;padding-top:12px;color:#153f43}

/* Premium invoice editor */
.invoice-editor-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.7fr);gap:16px}.invoice-editor-main{display:grid;gap:13px}.invoice-editor-side{display:grid;gap:13px;align-content:start}.form-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px}.form-card-title{font-size:12px;font-weight:780;margin-bottom:13px}.invoice-preview-card{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;position:sticky;top:0}.invoice-preview-head{padding:13px 15px;border-bottom:1px solid var(--line);font-size:11px;font-weight:750;display:flex;justify-content:space-between}.invoice-paper{padding:18px;min-height:430px;font-size:9px;color:#26343a}.invoice-paper-brand{font-size:15px;font-weight:850;color:#174f53;margin-bottom:18px}.invoice-paper-meta{display:grid;grid-template-columns:1fr 1fr;gap:18px}.invoice-paper-meta>div:last-child{text-align:right}.invoice-paper-label{color:#7d8a90;font-size:8px;margin-bottom:3px}.invoice-paper strong{font-size:9px}.invoice-paper-table{width:100%;border-collapse:collapse;margin-top:17px}.invoice-paper-table th,.invoice-paper-table td{border-bottom:1px solid #edf0f1;padding:6px 3px;text-align:left;font-size:8px}.invoice-paper-table th{color:#7b888e;font-weight:650}.invoice-paper-total{margin:14px 0 0 auto;width:68%}.invoice-paper-total div{display:flex;justify-content:space-between;padding:4px 0}.invoice-paper-total .grand{border-top:1px solid #dce3e5;margin-top:5px;padding-top:8px;font-size:11px;font-weight:850}.invoice-summary-panel{border:1px solid var(--line);border-radius:12px;padding:15px;background:#fff}.invoice-summary-panel .grand-total{margin-top:10px;padding:12px;border-radius:9px;background:#f1f6f6;color:#174f53;display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:820}.payment-method-box{display:grid;grid-template-columns:1fr 1fr;gap:9px}.payment-method-option{border:1px solid var(--line);border-radius:9px;padding:11px;background:#fff}.editor-actions{display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:8px}.editor-actions .btn{min-height:42px}.qr-mini{width:82px;height:82px;border:1px solid var(--line);border-radius:8px;object-fit:contain;background:#fff;padding:5px}

/* Charts */
.chart-card{min-height:300px}.chart-wrap{height:220px;position:relative;padding:8px 4px 0}.line-chart{width:100%;height:100%;overflow:visible}.line-chart .gridline{stroke:#e6ebed;stroke-dasharray:3 4;stroke-width:1}.line-chart .area{fill:rgba(23,79,83,.07);stroke:none}.line-chart .line{fill:none;stroke:#174f53;stroke-width:2.2}.line-chart .line-paid{fill:none;stroke:#738d90;stroke-width:1.8;stroke-dasharray:5 5}.line-chart circle{fill:#fff;stroke:#174f53;stroke-width:2}.chart-legend{display:flex;gap:17px;font-size:9.5px;color:var(--muted);margin-top:5px}.legend-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#174f53;margin-right:5px}.legend-dot.secondary{background:#738d90}.donut{width:140px;height:140px;border-radius:50%;display:grid;place-items:center;margin:8px auto;background:conic-gradient(#174f53 0 69%,#67878a 69% 89%,#b7c7c9 89% 97%,#e2e8e9 97% 100%)}.donut::after{content:"";width:90px;height:90px;border-radius:50%;background:#fff}.donut-center{position:absolute;text-align:center;z-index:2}.donut-wrap{position:relative;width:140px;margin:auto}.donut-center strong{display:block;font-size:19px}.donut-center span{font-size:9px;color:var(--muted)}.chart-bars{height:210px;display:flex;align-items:flex-end;gap:8px;padding-top:15px}.bar-group{flex:1;min-width:24px;text-align:center}.bars{height:165px;display:flex;align-items:flex-end;justify-content:center;gap:3px}.bar{width:9px;border-radius:5px 5px 0 0;background:#174f53;min-height:2px}.bar.paid{background:#789598}.bar-label{font-size:9px;color:var(--muted);margin-top:7px}

/* Usage, plan, settings */
.progress{height:5px;background:#e8edee;border-radius:999px;overflow:hidden}.progress span{height:100%;display:block;background:#174f53;border-radius:999px}.settings-tabs{display:flex;gap:5px;overflow:auto;margin-bottom:15px;border-bottom:1px solid var(--line);padding-bottom:8px}.settings-tabs button{white-space:nowrap}.file-preview{max-width:220px;max-height:220px;border:1px solid var(--line);border-radius:10px;margin-top:8px}.plan-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.plan-card{border:1px solid var(--line);border-radius:13px;padding:17px;background:#fff;display:flex;flex-direction:column;gap:10px}.plan-card.current{box-shadow:inset 0 0 0 1px #6e9699;background:#f7fbfb}.plan-card h3{margin:0;font-size:17px}.plan-price{font-size:21px;font-weight:820;letter-spacing:-.4px}.plan-price small{font-size:9px;font-weight:650;color:var(--muted)}.feature-list{display:grid;gap:6px;font-size:10.5px;color:#4a5a61;min-height:94px}.plan-card hr{border:0;border-top:1px solid var(--line);width:100%;margin:2px 0}.purchase-line .btn{align-self:end}

/* Login */
.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(115deg,#0f3438 0 38%,#f3f6f6 38% 100%);position:relative;overflow:hidden}.login-shell::before{content:"Invoice • Billing • Payments";position:absolute;left:7vw;top:50%;transform:translateY(-50%);color:rgba(255,255,255,.12);font-size:clamp(28px,4vw,62px);font-weight:850;max-width:28vw;line-height:1.1;letter-spacing:-2px}.login-card{width:min(440px,calc(100vw - 34px));background:#fff;border:1px solid #e2e7e9;border-radius:18px;padding:29px;box-shadow:0 32px 90px rgba(15,40,45,.18);margin-left:34vw;position:relative}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}.login-card .brand-mark{margin:0;width:43px;height:43px;border-radius:11px;background:#143f43}.login-card h1{font-size:23px;margin:0;letter-spacing:-.5px}.login-card p{color:var(--muted);margin:2px 0 0;font-size:11px}.login-caption{font-size:12px;font-weight:780;margin-bottom:15px}.login-foot{margin-top:16px;padding-top:14px;border-top:1px solid var(--line);font-size:9.5px;color:#879398;text-align:center}.form-error{color:var(--danger);font-size:10.5px;min-height:14px}.toast{position:fixed;right:22px;bottom:22px;background:#172529;color:#fff;border-radius:10px;padding:11px 14px;z-index:200;box-shadow:var(--shadow);max-width:380px;font-size:11px;border:1px solid rgba(255,255,255,.08)}.toast.error{background:#7d3434}

/* Mobile */
.mobile-only{display:none}@media(max-width:1180px){.topbar{grid-template-columns:minmax(190px,.8fr) minmax(220px,1fr) auto;gap:14px}.profile-copy{display:none}.profile-chip{min-width:auto}.plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-editor-layout{grid-template-columns:1fr}.invoice-editor-side{grid-template-columns:1fr 1fr}.invoice-preview-card{position:static}}
@media(max-width:1020px){.grid.cards{grid-template-columns:repeat(2,1fr)}.section-grid,.dashboard-grid{grid-template-columns:1fr}.topbar-search{display:none}}
@media(max-width:760px){.mobile-only{display:grid}.sidebar{transform:translateX(-100%);transition:.2s;width:276px}.sidebar.open{transform:translateX(0);box-shadow:20px 0 50px rgba(15,23,42,.22)}.main{margin-left:0}.topbar{height:68px;padding:0 13px;grid-template-columns:1fr auto;gap:8px}.topbar-start{min-width:0}.page-context .muted{display:none}.topbar-search{display:none}.content{padding:14px 12px 28px}.grid.cards{grid-template-columns:1fr 1fr;gap:10px}.stat-card{padding:14px;min-height:106px}.stat-card .value{font-size:18px}.form-grid,.form-grid.three{grid-template-columns:1fr}.modal{padding:0;align-items:end}.modal-panel,.modal-panel.invoice-premium{width:100%;max-height:95vh;border-radius:16px 16px 0 0}.modal-head,.modal-body{padding:14px}.toolbar .search{min-width:0;flex:1}.card{padding:14px}.top-actions .btn{display:none}.profile-chip{display:none}.invoice-editor-side{grid-template-columns:1fr}.editor-actions{grid-template-columns:1fr}.invoice-paper{min-height:auto}.login-shell{background:#f1f4f4;padding:17px}.login-shell::before{display:none}.login-card{margin-left:0;padding:24px}.login-card .brand-mark{display:grid}}
@media(max-width:430px){.grid.cards{grid-template-columns:1fr}.plan-grid{grid-template-columns:1fr}.topbar h2{font-size:16px}.icon-btn{width:36px;height:36px}.notification-btn{display:none}.stat-card{min-height:auto}}
.dashboard-welcome{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:2px 0 18px}.dashboard-welcome h1{margin:5px 0 4px;font-size:25px;line-height:1.18;letter-spacing:-.65px}.dashboard-welcome p{margin:0;color:var(--muted);font-size:11px}.dashboard-welcome .btn{flex:none}
@media(max-width:650px){.dashboard-welcome{align-items:flex-start}.dashboard-welcome h1{font-size:21px}.dashboard-welcome p{max-width:260px}.dashboard-welcome>.btn{padding:8px 10px;font-size:0}.dashboard-welcome>.btn::after{content:"+";font-size:18px}}
