
:root{--bg:#eef2f7;--panel:#f8fafc;--text:#0f172a;--muted:#64748b;--line:#a8b5c8}
*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(180deg,#f8fafc,#e2e8f0);font-size:14px;color:var(--text);padding-bottom:42px}a{color:#075985;text-decoration:none}
.shell{display:flex;min-height:100vh}.sidebar{width:250px;background:#e5e7eb;border-right:1px solid var(--line);padding:12px;position:sticky;top:0;height:100vh}.brand{background:#f8fafc;border:1px solid var(--line);box-shadow:inset 2px 2px 2px #fff,inset -2px -2px 3px #94a3b8;border-radius:14px;padding:12px;text-align:center;margin-bottom:12px}.brand img{display:block;width:100%;max-width:190px;height:auto;object-fit:contain;margin:0 auto}.brand h1{font-size:16px;margin:7px 0 2px}.brand small{color:var(--muted)}
.nav{display:flex;align-items:center;gap:10px;margin:7px 0;padding:11px 12px;border:1px solid var(--line);background:#f1f5f9;border-radius:10px;box-shadow:inset 2px 2px 2px #fff,inset -2px -2px 3px #94a3b8;color:#0f172a;font-weight:700}.nav.active,.nav:hover{background:#dbeafe;color:#0c4a6e}.navicon{font-size:18px;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:9px;background:linear-gradient(135deg,#dbeafe,#ffedd5)}
.main{flex:1;padding:16px 18px 48px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;gap:12px;flex-wrap:wrap}.topbar h2{margin:0;font-size:22px}.card{background:rgba(248,250,252,.97);border:1px solid var(--line);border-radius:12px;box-shadow:inset 2px 2px 2px #fff,inset -2px -2px 4px #cbd5e1,0 6px 18px rgba(15,23,42,.08);padding:14px;margin-bottom:14px}
.grid{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr));gap:12px}.stat{padding:14px;border-radius:12px;border:1px solid var(--line);background:#f8fafc}.num{font-size:24px;font-weight:800;margin-top:6px}.muted{color:var(--muted)}
.btn{display:inline-block;border:1px solid #64748b;border-radius:8px;background:#f1f5f9;color:#0f172a;padding:9px 12px;font-weight:700;cursor:pointer;box-shadow:inset 2px 2px 2px #fff,inset -2px -2px 3px #94a3b8;margin:2px}.primary{background:#dbeafe}.good{background:#dcfce7}.bad{background:#fee2e2}.warn{background:#fef3c7}
.bill-filterbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.bill-search{display:inline-flex;gap:6px;align-items:center;flex-wrap:nowrap;margin:2px}
.bill-search input{width:340px;min-width:260px;height:36px;padding:8px 10px}
.bill-search .search-icon{width:40px;height:36px;padding:0;display:inline-flex;align-items:center;justify-content:center;font-size:20px;line-height:1}
.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:10px}table{width:100%;border-collapse:collapse;background:#fff}th,td{padding:10px;border-bottom:1px solid #e2e8f0;text-align:left;vertical-align:top;white-space:nowrap}th{background:#e2e8f0}.status{display:inline-block;border-radius:999px;padding:4px 9px;font-weight:800;font-size:12px}.paid{background:#dcfce7;color:#166534}.unpaid{background:#fee2e2;color:#991b1b}
form .row{display:grid;grid-template-columns:repeat(2,minmax(160px,1fr));gap:12px}label{display:block;font-weight:700;margin-bottom:5px}.req{color:#dc2626}.optional{font-size:12px;color:#64748b;font-weight:500}input,select,textarea{width:100%;padding:10px;border:1px solid #94a3b8;border-radius:8px;background:#fff}textarea{min-height:86px}.full{grid-column:1/-1}.hidden{display:none!important}.notice{border-left:5px solid #0ea5e9;background:#eff6ff;padding:10px;border-radius:8px;margin-bottom:12px}.errorbox{border-left:5px solid #ef4444;background:#fee2e2;padding:10px;border-radius:8px;margin-bottom:12px}.successbox{border-left:5px solid #10b981;background:#ecfdf5;padding:10px;border-radius:8px;margin-bottom:12px}.footerlink{position:fixed;left:0;right:0;bottom:0;text-align:center;background:#e2e8f0;border-top:1px solid #94a3b8;padding:9px 12px;z-index:20}.footerlink a{font-weight:800;color:#075985}
.loginbody{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:18px;background:linear-gradient(135deg,#e0f2fe,#f8fafc 55%,#dbeafe)}.loginwrap{max-width:960px;width:100%;display:grid;grid-template-columns:1fr 1fr;gap:18px}.loginhero{background:linear-gradient(135deg,#0f172a,#1e3a8a);color:#fff;border-radius:22px;padding:28px;text-align:center}.loginhero img{display:block;width:min(100%,430px);max-height:260px;height:auto;object-fit:contain;margin:0 auto 18px}.loginhero p{color:#dbeafe;line-height:1.6}
@media(max-width:850px){.shell{display:block}.sidebar{position:relative;width:auto;height:auto}.main{padding:12px 12px 48px}.grid{grid-template-columns:1fr 1fr}form .row{grid-template-columns:1fr}th,td{white-space:normal}.loginwrap{grid-template-columns:1fr}}
@media(max-width:650px){.bill-search{width:100%}.bill-search input{width:100%;min-width:0;flex:1}}

/* Dashboard modern khusus halaman dashboard. Halaman lain tetap memakai style lama. */
body.page-dashboard{background:#fff;color:#121a37}
body.page-dashboard .topbar{display:none}
body.page-dashboard .shell{display:flex;min-height:100vh;background:#fff}
body.page-dashboard .sidebar{display:block;width:250px;flex:0 0 250px}
body.page-dashboard .main{padding:0 18px 56px}
body.page-dashboard .brand{padding:12px 10px;overflow:hidden}
body.page-dashboard .brand img{display:block;width:100%;max-width:210px;max-height:128px;height:auto;margin:0 auto 10px;object-fit:contain}
body.page-dashboard .brand h1{font-size:16px;line-height:1.2;margin:6px 0 0}
body.page-dashboard .brand small{display:none}
.dash-modern{min-height:calc(100vh - 56px);max-width:1180px;margin:0 auto;padding:28px 28px 30px;border:1px solid #d6dbe8;border-radius:14px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.08)}
.dash-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}
.dash-head h1{font-size:30px;line-height:1;margin:0;font-weight:900;letter-spacing:-.8px;color:#111936}
.dash-actions{display:flex;align-items:center;gap:16px}
.dash-auto{border:0;background:linear-gradient(135deg,#7c5cff,#5b45d9);color:#fff;border-radius:9px;padding:13px 22px;font-weight:900;box-shadow:0 8px 16px rgba(91,69,217,.24)}
.dash-avatar{display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:linear-gradient(135deg,#ffe2bf,#ff8d42);font-weight:900;color:#172033;border:2px solid #fff;box-shadow:0 6px 14px rgba(15,23,42,.16)}
.dash-stats{display:grid;grid-template-columns:1fr 1fr 2.15fr;gap:24px;margin-bottom:24px}
.dash-stat{position:relative;min-height:134px;border-radius:10px;padding:24px 28px;color:#fff;overflow:hidden;box-shadow:0 10px 22px rgba(15,23,42,.12)}
.dash-stat span{display:block;font-size:17px;font-weight:850;margin-bottom:14px}
.dash-stat strong{display:block;font-size:42px;line-height:1;font-weight:900}
.dash-stat small{display:block;margin-top:10px;font-size:17px;font-weight:850}
.dash-stat i{position:absolute;right:22px;bottom:18px;font-style:normal;font-size:58px;opacity:.17}
.dash-stat.blue{background:linear-gradient(135deg,#0d7ff4,#168df6)}
.dash-stat.pink{background:linear-gradient(135deg,#ff3f71,#ff5d87)}
.dash-stat.orange{background:linear-gradient(135deg,#fb8c00,#ff9800)}
.dash-income{min-height:170px;border-radius:12px;background:linear-gradient(135deg,#35b95f,#42be68);color:#fff;padding:28px;display:flex;justify-content:space-between;align-items:end;gap:22px;margin-bottom:24px;box-shadow:0 12px 24px rgba(19,122,58,.18)}
.dash-income span{font-size:18px;font-weight:850}.dash-income strong{display:block;font-size:36px;line-height:1.15;margin:14px 0 6px}.dash-income small{font-weight:850}
.dash-bars{height:100px;display:flex;align-items:end;gap:16px;min-width:360px}.dash-bars b{display:block;width:18px;background:rgba(255,255,255,.55);box-shadow:inset 0 1px 0 rgba(255,255,255,.4)}
.dash-card{background:#fff;border:1px solid #dbe2ef;border-radius:12px;box-shadow:0 6px 18px rgba(15,23,42,.05);overflow:hidden}
.dash-card h3{margin:0;padding:22px 24px 18px;font-size:19px;color:#111936}
.dash-table{margin-bottom:24px}
.dash-table .tablewrap{border:0;border-top:1px solid #edf1f7;border-radius:0}
.dash-table table{font-size:15px}
.dash-table th{background:#fbfcff;color:#111936;font-size:14px;padding:16px 24px;border-bottom:1px solid #e8edf5}
.dash-table td{padding:16px 24px;border-bottom:1px solid #edf1f7;color:#111936}
.dash-badge{display:inline-flex;border-radius:7px;padding:8px 12px;font-size:13px;font-weight:900}.dash-badge.bad{background:#ffe3de;color:#c52520}
.dash-send{display:inline-flex;align-items:center;justify-content:center;min-width:58px;padding:9px 13px;border-radius:7px;background:linear-gradient(135deg,#7356f4,#6045db);color:#fff;font-weight:900;box-shadow:0 6px 14px rgba(96,69,219,.22)}
.dash-panels{display:grid;grid-template-columns:1fr 1.1fr;gap:22px;margin-bottom:24px}
.dash-list,.dash-log{padding:8px 24px 24px;display:grid;gap:18px}
.dash-list-row,.dash-log-row{display:flex;align-items:center;gap:14px;min-height:38px}
.dash-list-row b,.dash-log-row b{font-size:15px;font-weight:800;color:#111936}.dash-list-row em,.dash-log-row em{margin-left:auto;font-style:normal;border-radius:7px;padding:8px 13px;background:#fff2dc;color:#55300b;font-weight:850;text-align:right}.dash-log-row em{background:transparent;color:#138a3d;padding:0}
.dash-log-row small{display:block;margin-top:5px;font-size:14px;color:#121a37}
.dot{width:18px;height:18px;border-radius:999px;display:inline-block;box-shadow:inset 0 -2px 4px rgba(0,0,0,.12)}.dot.red{background:#ff3f49}.dot.green{background:#35b95f}.dot.blue{background:#147df5}
.dash-empty{padding:8px 0 16px;color:#6b7280}
.dash-menu{display:none!important;grid-template-columns:repeat(5,1fr);gap:14px}
.dash-menu a{height:82px;border:1px solid #dbe2ef;border-radius:11px;color:#111936;display:flex;align-items:center;justify-content:center;gap:12px;font-weight:850;background:#fff;box-shadow:0 5px 14px rgba(15,23,42,.04)}
.dash-menu span{font-size:28px}
@media(max-width:900px){.dash-modern{padding:18px;border-radius:0}.dash-head{align-items:flex-start}.dash-actions{gap:8px;flex-wrap:wrap;justify-content:flex-end}.dash-stats{grid-template-columns:1fr}.dash-panels{grid-template-columns:1fr}.dash-income{display:block}.dash-bars{min-width:0;margin-top:22px}.dash-table th,.dash-table td{padding:12px 14px}}
@media(max-width:560px){.dash-head{display:block}.dash-actions{margin-top:14px;justify-content:flex-start}.dash-auto{width:100%;text-align:center}.dash-menu{grid-template-columns:1fr}.dash-stat{min-height:116px}.dash-bars{gap:9px}.dash-bars b{width:13px}}

/* Form project multi-item dan tombol aksi V26 */
.action-cell{display:flex;align-items:center;gap:4px}.action-cell form{display:inline;margin:0}
.project-items-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.project-item-row{display:grid;grid-template-columns:minmax(180px,2fr) 90px 100px 150px 130px auto;gap:8px;align-items:center;margin-bottom:8px}
.project-item-row .item-subtotal{text-align:right;white-space:nowrap}
.project-total{text-align:right;margin-top:12px;padding:12px;background:#eef6ff;border-radius:8px;font-size:16px}
@media(max-width:1000px){.project-item-row{grid-template-columns:1fr 80px 90px 130px}.project-item-row .item-subtotal{grid-column:1/4;text-align:left}}
@media(max-width:600px){.project-items-head{align-items:flex-start;flex-direction:column}.project-item-row{grid-template-columns:1fr}.project-item-row .item-subtotal{grid-column:auto;text-align:left}.action-cell{min-width:165px}}

/* V61 reminder tracking */
.reminder-stack{display:grid;gap:4px;min-width:210px;font-size:12px;line-height:1.35}
.reminder-mini{display:flex;align-items:center;gap:5px;white-space:nowrap}
.reminder-mini b{min-width:44px;color:#0f172a}
.rem-success{color:#166534;font-weight:800}.rem-failed{color:#991b1b;font-weight:800}.rem-pending{color:#92400e;font-weight:800}.rem-missed{color:#b91c1c;font-weight:800}
.status.warn{background:#fef3c7;color:#92400e}
@media(max-width:650px){.reminder-stack{min-width:170px}.reminder-mini{white-space:normal}}


/* V63 sortable table header */
th.sortable-th{cursor:pointer;user-select:none;position:relative;padding-right:22px!important}
th.sortable-th:after{content:'↕';font-size:11px;opacity:.45;position:absolute;right:7px;top:50%;transform:translateY(-50%)}
th.sortable-th.sort-asc:after{content:'↑';opacity:.95}
th.sortable-th.sort-desc:after{content:'↓';opacity:.95}

/* V71 Rekap & Grafik */
.report-grid{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:14px;margin:14px 0}
.report-chart{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:inset 2px 2px 2px #fff,inset -2px -2px 4px #cbd5e1;padding:14px;min-height:260px}
.report-chart h3{margin:0 0 14px;font-size:16px}.report-bar-row{display:grid;grid-template-columns:150px 1fr 120px;gap:10px;align-items:center;margin:9px 0}.report-label{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.report-bar-track{height:18px;background:#e2e8f0;border:1px solid #cbd5e1;border-radius:999px;overflow:hidden;box-shadow:inset 1px 1px 2px rgba(15,23,42,.12)}.report-bar-track i{display:block;height:100%;background:linear-gradient(90deg,#38bdf8,#2563eb);border-radius:999px}.report-bar-row b{text-align:right;white-space:nowrap}.hint{display:block;margin-top:4px;color:#64748b;font-size:12px}
@media(max-width:900px){.report-grid{grid-template-columns:1fr}.report-bar-row{grid-template-columns:1fr}.report-bar-row b{text-align:left}.report-label{white-space:normal}}

/* V71 grafik pemasukan model kolom + outstanding links */
.report-column-card{margin:14px 0 18px;min-height:350px;background:linear-gradient(180deg,#fff8dc,#fff 72%);position:relative;overflow:hidden}.report-column-card:before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(15,23,42,.04),transparent 45%),repeating-linear-gradient(90deg,rgba(15,23,42,.035) 0,rgba(15,23,42,.035) 1px,transparent 1px,transparent 80px);pointer-events:none}.report-chart-title{display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative;z-index:1;margin-bottom:10px}.report-chart-title h3{margin:0;font-size:17px}.report-chart-title span{display:inline-block;background:#0f766e;color:#fff;border-radius:5px;padding:7px 10px;box-shadow:0 3px 8px rgba(15,23,42,.18);white-space:nowrap}.column-chart{position:relative;z-index:1;height:270px;display:flex;align-items:flex-end;gap:14px;overflow-x:auto;padding:32px 12px 8px;border-left:1px solid #94a3b8;border-bottom:2px solid #64748b}.column-bar-item{min-width:70px;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;position:relative}.column-value{min-height:18px;font-size:12px;font-weight:900;color:#4b5563;text-shadow:0 1px 0 #fff;margin-bottom:6px;white-space:nowrap}.column-bar-wrap{height:185px;width:46px;display:flex;align-items:flex-end;justify-content:center}.column-bar-wrap i{display:block;width:100%;border-radius:8px 8px 3px 3px;background:linear-gradient(180deg,#fff176 0%,#ffd54f 38%,#f2b300 100%);box-shadow:inset 7px 0 8px rgba(255,255,255,.38),inset -7px 0 10px rgba(160,100,0,.18),8px 6px 12px rgba(15,23,42,.20);border:1px solid rgba(148,90,0,.22)}.column-label{font-weight:900;color:#1f2937;margin-top:9px;text-align:center;font-size:12px;white-space:nowrap}.report-titlebar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}.report-titlebar h3{margin:0}.outstanding-invoice-list{display:grid;gap:8px;min-width:340px;white-space:normal}.outstanding-invoice-list div{padding:8px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc}.outstanding-invoice-list b{display:block;margin-bottom:3px}.outstanding-invoice-list span{display:block;color:#475569;font-size:12px;margin-bottom:5px}.mini-link{display:inline-block;border:1px solid #94a3b8;border-radius:6px;padding:5px 8px;background:#fff;margin:2px 4px 2px 0;font-size:12px;font-weight:800}.total-row td{background:#ecfeff!important;border-top:2px solid #0ea5e9;font-size:14px}.report-bar-row b,.report-chart-title b{white-space:nowrap}@media(max-width:900px){.column-bar-item{min-width:62px}.column-bar-wrap{width:38px}.report-chart-title{align-items:flex-start;flex-direction:column}.outstanding-invoice-list{min-width:260px}}

/* V75 fix siklus recurring, instalasi 1x, CN item, dan nama invoice download */
.auto-bill-btn{background:linear-gradient(135deg,#dbeafe,#bfdbfe);color:#0f172a;border-color:#64748b;white-space:nowrap}
@media(max-width:650px){.auto-bill-btn{width:100%;text-align:center}}


/* V76 rekap compact + grafik pemasukan terpisah */
.compact-report-grid{align-items:start}
.compact-report-grid .report-chart{min-height:135px;padding:12px}
.compact-report-grid .report-chart h3{font-size:15px;margin-bottom:10px}
.compact-report-grid .report-bar-row{grid-template-columns:130px 1fr 110px;margin:7px 0;gap:8px}
.compact-report-grid .report-bar-track{height:13px}
.report-column-card{min-height:230px!important;margin:10px 0 12px!important;padding:12px!important;background:linear-gradient(180deg,#fff7d6,#fff 78%)!important}
.report-column-card:before{background:linear-gradient(135deg,rgba(15,23,42,.035),transparent 45%),repeating-linear-gradient(90deg,rgba(15,23,42,.03) 0,rgba(15,23,42,.03) 1px,transparent 1px,transparent 58px)!important}
.report-chart-title{margin-bottom:6px!important}
.report-chart-title h3{font-size:15px!important;line-height:1.25}
.report-chart-title span{font-size:12px;padding:5px 8px!important;border-radius:5px!important}
.column-chart{height:170px!important;gap:8px!important;padding:20px 8px 6px!important;overflow-x:auto;overflow-y:hidden}
.column-bar-item{min-width:42px!important;flex:1 1 42px!important}
.column-value{font-size:10.5px!important;line-height:1.1;margin-bottom:4px!important;transform:translateY(0)}
.column-bar-wrap{height:108px!important;width:28px!important}
.column-bar-wrap i{border-radius:7px 7px 3px 3px!important;box-shadow:inset 5px 0 6px rgba(255,255,255,.35),inset -5px 0 8px rgba(160,100,0,.16),5px 4px 8px rgba(15,23,42,.16)!important}
.column-label{font-size:10.5px!important;margin-top:6px!important;letter-spacing:.1px}
.income-chart-grid{grid-template-columns:repeat(2,minmax(260px,1fr));align-items:start;margin-top:0}
.income-chart-grid .report-column-card{margin-top:0!important}
@media(max-width:900px){.compact-report-grid .report-bar-row{grid-template-columns:120px 1fr 100px}.income-chart-grid{grid-template-columns:1fr}.column-chart{height:160px!important}.column-bar-item{min-width:42px!important}.column-bar-wrap{width:26px!important;height:100px!important}.report-column-card{min-height:215px!important}}
@media(max-width:650px){.compact-report-grid .report-bar-row{grid-template-columns:1fr}.report-column-card{min-height:205px!important;padding:10px!important}.column-chart{height:150px!important;gap:7px!important}.column-bar-item{min-width:40px!important}.column-bar-wrap{width:24px!important;height:92px!important}.column-value,.column-label{font-size:10px!important}.report-chart-title{align-items:flex-start;flex-direction:column;gap:4px!important}}
