:root{
  --bg:#f7fbff;
  --bg2:#ffffff;
  --card:rgba(255,255,255,.92);

  --text:#0b1220;
  --muted:#5b6b83;

  --border:rgba(18, 38, 63, .10);
  --shadow: 0 18px 55px rgba(2, 18, 46, .10);
  --shadow2: 0 10px 28px rgba(2, 18, 46, .10);

  --primary:#1e5aa8;      /* biru */
  --primary2:#2e7be7;     /* biru cerah */
  --accent:#f97316;       /* orange */
  --good:#14b86a;         /* hijau */

  --radius:18px;
  --radius2:14px;

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

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:var(--font);color:var(--text);background:
  radial-gradient(1100px 520px at 10% 10%, rgba(46,123,231,.18), transparent 60%),
  radial-gradient(900px 420px at 90% 0%, rgba(249,115,22,.14), transparent 60%),
  linear-gradient(180deg, var(--bg), #fff);
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

.container{max-width:1200px;margin:0 auto;padding:18px}
.layout{display:grid;grid-template-columns:290px 1fr;gap:16px;align-items:start;padding:18px}
@media(max-width:980px){.layout{grid-template-columns:1fr}}

.topbar{
  position:sticky;top:0;z-index:50;
  background:rgba(247,251,255,.78);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--border);
}
.topbar-inner{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px}
.brand{display:flex;align-items:center;gap:12px}
.logo{
  width:42px;height:42px;border-radius:14px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.9), rgba(255,255,255,0) 40%),
    linear-gradient(135deg, var(--primary2), var(--primary));
  box-shadow: var(--shadow2);
  border:1px solid rgba(255,255,255,.45);
}
.brand h1{margin:0;font-size:14px;font-weight:900;letter-spacing:.2px}
.brand .tag{display:block;margin-top:2px;font-size:12px;color:var(--muted);font-weight:650}

.userbox{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pill{
  padding:8px 10px;border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.88);
  font-weight:750;font-size:12px;color:var(--muted)
}

.sidebar{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--card);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.navsec{
  padding:14px 14px 10px 14px;
  color:var(--muted);
  font-weight:900;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.14em;
}
.nav a{
  display:flex;align-items:center;gap:10px;
  padding:11px 14px;
  border-top:1px solid rgba(18, 38, 63, .06);
  font-weight:780;
  color:#1c2c43;
}
.nav a:hover{background:rgba(46,123,231,.08)}
.nav a.active{
  background:linear-gradient(90deg, rgba(249,115,22,.13), rgba(46,123,231,.08));
  border-left:4px solid var(--accent);
}
.nav .dot{
  width:10px;height:10px;border-radius:999px;
  background:rgba(20,184,106,.60);
  box-shadow:0 0 0 4px rgba(20,184,106,.12);
}

.content{min-height:70vh}

.card{
  border:1px solid var(--border);
  background:var(--card);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .hd{
  padding:16px 18px;
  border-bottom:1px solid rgba(18, 38, 63, .08);
  background: linear-gradient(180deg, rgba(46,123,231,.08), rgba(255,255,255,0));
}
.card .hd h2{margin:0;font-size:16px;font-weight:950}
.card .hd p{margin:6px 0 0;color:var(--muted);font-size:12.5px;font-weight:650}
.card .bd{padding:16px 18px}

.grid{display:grid;gap:12px}
.grid.cols-2{grid-template-columns:repeat(2,1fr)}
.grid.cols-3{grid-template-columns:repeat(3,1fr)}
@media(max-width:980px){.grid.cols-2,.grid.cols-3{grid-template-columns:1fr}}

.kpi{
  border:1px solid rgba(18, 38, 63, .10);
  border-radius:16px;
  padding:14px;
  background:linear-gradient(180deg,#fff, rgba(46,123,231,.05));
}
.kpi .t{font-size:12px;color:var(--muted);font-weight:850}
.kpi .v{margin-top:8px;font-size:22px;font-weight:950}

.help{font-size:12px;color:var(--muted);font-weight:700;margin-bottom:6px}
.hr{height:1px;background:rgba(18, 38, 63, .08);margin:14px 0}

.input,.select,textarea{
  width:100%;
  padding:11px 12px;
  border:1px solid rgba(18, 38, 63, .14);
  border-radius:14px;
  background:rgba(255,255,255,.92);
  outline:none;
  font-weight:750;
  color:#0b1220;
  transition:.15s ease;
}
.input:focus,.select:focus,textarea:focus{
  border-color: rgba(46,123,231,.55);
  box-shadow: 0 0 0 4px rgba(46,123,231,.14);
}
textarea{min-height:110px;resize:vertical}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  gap:10px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid rgba(18, 38, 63, .14);
  background:#fff;
  font-weight:900;
  cursor:pointer;
  transition:.15s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn.primary{
  color:#fff;
  border-color: rgba(30,90,168,.9);
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  box-shadow: 0 12px 28px rgba(46,123,231,.22);
}
.btn.accent{
  color:#fff;
  border-color: rgba(249,115,22,.9);
  background: linear-gradient(135deg, #ff9a3c, var(--accent));
  box-shadow: 0 12px 28px rgba(249,115,22,.22);
}
.btn.good{
  color:#fff;
  border-color: rgba(20,184,106,.9);
  background: linear-gradient(135deg, #2fe08d, var(--good));
  box-shadow: 0 12px 28px rgba(20,184,106,.20);
}
.btn.ghost{background:transparent}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid rgba(18, 38, 63, .10);
  border-radius:16px;
  background:rgba(255,255,255,.88);
}
.table th,.table td{
  padding:11px 12px;
  border-bottom:1px solid rgba(18, 38, 63, .06);
  text-align:left;
  font-size:13px;
}
.table th{color:#1c2c43;font-weight:950;background:rgba(46,123,231,.06)}
.table tr:hover td{background:rgba(46,123,231,.05)}

.badge{
  display:inline-flex;align-items:center;
  padding:6px 10px;border-radius:999px;
  font-size:12px;font-weight:900;
  border:1px solid rgba(18, 38, 63, .10);
  background:rgba(255,255,255,.9);
}
.badge.orange{border-color:rgba(249,115,22,.25);background:rgba(249,115,22,.12);color:#9a3e00}
.badge.blue{border-color:rgba(46,123,231,.25);background:rgba(46,123,231,.12);color:#0b3c8d}
.badge.green{border-color:rgba(20,184,106,.25);background:rgba(20,184,106,.12);color:#056a3a}

.alert{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(249,115,22,.30);
  background:rgba(249,115,22,.12);
  font-weight:850;
}
.alert.ok{
  border-color:rgba(20,184,106,.30);
  background:rgba(20,184,106,.12);
}

.footer{padding:18px 0;color:var(--muted);text-align:center;font-size:12px}
/* =========================
   GOVERNMENT FILTER TOOLBAR
   ========================= */
.gov-toolbar{
  margin-bottom:14px;
}

.gov-filter{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap:14px;
  align-items:end;
  padding:14px;
  border:1px solid rgba(18, 38, 63, .10);
  border-radius:16px;
  background:
    linear-gradient(180deg, rgba(46,123,231,.06), rgba(255,255,255,.9));
}

.gov-filter .field{
  display:flex;
  flex-direction:column;
}

.gov-filter label{
  font-size:11.5px;
  font-weight:900;
  color:#1c2c43;
  margin-bottom:6px;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.gov-filter .actions{
  min-width:150px;
}

.gov-filter .btn{
  height:44px;
}
/* =========================
   INLINE GOVERNMENT FILTER
   ========================= */
.gov-filter.inline{
  display:flex;
  gap:14px;
  align-items:flex-end;
  flex-wrap:wrap;
  padding:14px;
  border:1px solid rgba(18, 38, 63, .10);
  border-radius:16px;
  background:
    linear-gradient(180deg, rgba(46,123,231,.06), rgba(255,255,255,.92));
}

/* Field base */
.gov-filter .field{
  display:flex;
  flex-direction:column;
}

/* Label */
.gov-filter label{
  font-size:11px;
  font-weight:900;
  color:#1c2c43;
  margin-bottom:6px;
  letter-spacing:.05em;
  text-transform:uppercase;
}

/* Width control */
.gov-filter .w-unit{min-width:260px;flex:1.5}
.gov-filter .w-date{min-width:170px}
.gov-filter .w-btn{min-width:140px}

/* Button full height */
.gov-filter .btn.full{
  width:100%;
  height:44px;
}

/* Responsive */
@media(max-width:980px){
  .gov-filter.inline{
    flex-direction:column;
    align-items:stretch;
  }
}
.period-form {
  display: flex;
  gap: 12px;
  align-items: center;
}
/* sidebar collapsible */
.sidebar-collapsible .nav a {
  font-size:12px;          /* item menu lebih kecil */
  font-weight:600;
}

.navsec.toggle {
  font-size:13px;          /* GROUP LEBIH BESAR */
  font-weight:800;         /* lebih tegas */
  letter-spacing:.3px;
  cursor:pointer;
  user-select:none;
  position:relative;
}

.navsec.toggle::after {
  content:'▾';
  position:absolute;
  right:8px;
  opacity:.5;
  transition:.2s;
}

.navsec.toggle:not(.open)::after {
  transform:rotate(-90deg);
}

.navgroup {
  margin-bottom:6px;
}

.navsec.toggle:not(.open) + .navgroup {
  display:none;
}
/* ====== NUMERIC FORMAT ====== */
.table th.right,
.table td.right {
  text-align: right !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* =========================
   ENTERPRISE REPORT POLISH
   ========================= */
:root{
  --bg:#f4f7fb;
  --card:#ffffff;
  --text:#172033;
  --muted:#647084;
  --border:#d8e0ea;
  --primary:#2457a6;
  --primary2:#1f8a70;
  --accent:#b45309;
  --good:#14804a;
  --danger:#b42318;
  --radius:10px;
  --radius2:8px;
  --shadow:0 14px 36px rgba(23,32,51,.08);
  --shadow2:0 8px 18px rgba(23,32,51,.08);
}

*{letter-spacing:0!important}

html,body{
  background:
    linear-gradient(180deg, #eef4fb 0%, #f8fafc 42%, #ffffff 100%);
}

.layout{
  grid-template-columns:280px minmax(0,1fr);
  gap:18px;
  padding:18px;
}

.sidebar,.card{
  border-color:var(--border);
  background:#fff;
  box-shadow:var(--shadow);
}

.sidebar{
  position:sticky;
  top:76px;
  max-height:calc(100vh - 94px);
  overflow:auto;
}

.navsec{
  padding:16px 14px 8px;
  color:#334155;
  font-size:11px;
  letter-spacing:0;
}

.nav a{
  min-height:40px;
  padding:10px 14px;
  color:#26364f;
  border-top:1px solid #edf1f6;
}

.nav a.active{
  background:linear-gradient(90deg, rgba(36,87,166,.12), rgba(31,138,112,.08));
  border-left:4px solid var(--primary2);
  color:#102a56;
}

.nav .dot{
  width:8px;
  height:8px;
  background:#94a3b8;
  box-shadow:none;
}

.card .hd{
  padding:18px 20px;
  background:linear-gradient(180deg,#ffffff,#f7faff);
}

.card .hd h2{
  font-size:19px;
  line-height:1.25;
}

.card .bd{
  padding:18px 20px 22px;
}

.report-filter{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  align-items:end;
  margin-bottom:12px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f8fafc;
}

.report-filter .btn{
  min-height:43px;
}

.report-health{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#fff;
}

.report-warning{
  color:#8a3b12;
  font-size:12px;
  font-weight:800;
}

.input,.select,textarea{
  border-radius:8px;
  border-color:#cbd5e1;
  background:#fff;
  min-height:42px;
}

.btn{
  border-radius:8px;
  min-height:40px;
  box-shadow:none;
}

.btn:hover{transform:none;filter:brightness(.98)}
.btn.primary{background:linear-gradient(135deg,#2457a6,#1f8a70);border-color:#2457a6}
.btn.accent{background:#b45309;border-color:#b45309}
.btn.good{background:#14804a;border-color:#14804a}

.kpi{
  border-radius:10px;
  background:#fff;
  border-color:#dbe3ee;
  box-shadow:0 8px 18px rgba(23,32,51,.05);
}

.kpi .t{color:#647084;font-size:12px}
.kpi .v{font-size:20px;color:#172033}

.table{
  border-radius:10px;
  border-color:#dbe3ee;
  box-shadow:0 8px 18px rgba(23,32,51,.04);
}

.table th{
  position:sticky;
  top:0;
  z-index:1;
  background:#eef4fb;
  color:#24324a;
  font-size:12px;
  text-transform:none;
}

.table th,.table td{
  padding:10px 11px;
  vertical-align:top;
}

.table tr.bold td,
.table tr.bold th{
  background:#f4f7fb;
  color:#172033;
}

.badge{
  border-radius:999px;
  padding:5px 9px;
  font-size:11px;
}

.badge.blue{background:#e7eefb;color:#173b7a;border-color:#bfd0ee}
.badge.green{background:#e7f6ef;color:#075c35;border-color:#bfe6d0}
.badge.orange{background:#fff4e6;color:#7a2e0e;border-color:#f4c790}
.badge.gray{background:#f1f5f9;color:#475569;border-color:#d8e0ea}

.alert{
  border-radius:10px;
  border-color:#f1c48b;
  background:#fff7ed;
  color:#7a2e0e;
}

.alert.ok{
  border-color:#abd9bf;
  background:#ecfdf3;
  color:#075c35;
}

.alert.bad{
  border-color:#f2b8b5;
  background:#fff0ee;
  color:#9b1c13;
}

@media(max-width:980px){
  .layout{padding:10px;gap:12px}
  .sidebar{position:relative;top:auto;max-height:none}
  .content{min-width:0}
  .card .hd,.card .bd{padding:14px}
  .table{display:block;overflow-x:auto;white-space:nowrap}
  .report-filter{grid-template-columns:1fr}
}

/* =========================
   ENTERPRISE DASHBOARD
   ========================= */
.dashboard-shell{
  display:grid;
  gap:16px;
}

.dashboard-hero{
  display:grid;
  grid-template-columns:minmax(260px,1fr) minmax(320px,620px);
  gap:16px;
  align-items:end;
  padding:18px 20px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  box-shadow:var(--shadow);
}

.dashboard-hero .eyebrow{
  color:#1f8a70;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}

.dashboard-hero h2{
  margin:6px 0 6px;
  font-size:24px;
  line-height:1.2;
}

.dashboard-hero p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  font-weight:750;
}

.dash-filter{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr)) auto;
  gap:10px;
}

.dash-filter .btn{
  grid-column:auto;
}

.insight-strip{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:12px 14px;
  border:1px solid #dbe3ee;
  border-radius:10px;
  background:#fff;
  box-shadow:0 8px 18px rgba(23,32,51,.04);
}

.insight-note{
  color:#8a3b12;
  font-size:12px;
  font-weight:850;
}

.dash-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.metric-card{
  min-height:132px;
  padding:16px;
  border:1px solid #dbe3ee;
  border-radius:10px;
  background:#fff;
  box-shadow:0 8px 18px rgba(23,32,51,.04);
}

.metric-card.primary{
  color:#fff;
  background:linear-gradient(135deg,#2457a6,#1f8a70);
  border-color:#2457a6;
}

.metric-card.ok{border-color:#abd9bf;background:#f3fbf7}
.metric-card.warn{border-color:#f1c48b;background:#fff8ed}

.metric-card .label{
  font-size:12px;
  color:inherit;
  opacity:.78;
  font-weight:900;
}

.metric-card .value{
  margin-top:12px;
  font-size:24px;
  line-height:1.18;
  font-weight:950;
  overflow-wrap:anywhere;
}

.metric-card .meta{
  margin-top:10px;
  font-size:12px;
  color:inherit;
  opacity:.76;
  font-weight:800;
}

.dashboard-columns{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.dashboard-columns.bottom{
  grid-template-columns:minmax(0,1.6fr) minmax(260px,.8fr);
}

.rank-row{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:start;
  padding:12px 0 14px;
  border-bottom:1px solid #edf1f6;
}

.rank-row:last-child{border-bottom:none}
.rank-row div{min-width:0}
.rank-row strong{display:block;font-size:12px;color:#24324a}
.rank-row span{display:block;margin-top:3px;color:#647084;font-size:12px;font-weight:750}
.rank-row b{font-size:12px;white-space:nowrap}
.rank-row i{
  position:absolute;
  left:0;
  bottom:6px;
  height:4px;
  border-radius:999px;
  background:#1f8a70;
}
.rank-row.expense i{background:#b45309}

.quick-actions{
  display:grid;
  gap:10px;
}

.quick-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:42px;
  padding:10px 12px;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#f8fafc;
  font-weight:900;
  color:#24324a;
}

.quick-link::after{
  content:'>';
  color:#1f8a70;
  font-weight:950;
}

.quick-link:hover{
  border-color:#b8c6d9;
  background:#fff;
}

/* =========================
   ENTERPRISE SIDEBAR
   ========================= */
.sidebar-brand{
  padding:14px;
  border-bottom:1px solid #edf1f6;
  background:linear-gradient(180deg,#fff,#f8fafc);
}

.sidebar-brand-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.sidebar-logo{
  width:38px;
  height:38px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#fff;
  flex:0 0 auto;
}

.sidebar-title{
  font-weight:950;
  font-size:13px;
  line-height:1.2;
}

.sidebar-subtitle{
  margin-top:2px;
  font-size:11px;
  color:var(--muted);
  font-weight:750;
}

.sidebar-badges{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.sidebar-collapsible .nav a{
  font-size:12.5px;
  font-weight:800;
}

.navsec.toggle{
  display:flex;
  align-items:center;
  min-height:38px;
  padding:12px 14px 8px;
  cursor:pointer;
  outline:none;
}

.navsec.toggle:focus-visible{
  box-shadow:inset 0 0 0 2px rgba(36,87,166,.35);
}

.navsec.toggle::after{
  content:'';
  width:8px;
  height:8px;
  margin-left:auto;
  border-right:2px solid #647084;
  border-bottom:2px solid #647084;
  transform:rotate(45deg);
  transition:.16s ease;
}

.navsec.toggle:not(.open)::after{
  transform:rotate(-45deg);
}

.navgroup{
  display:block;
  padding:0 8px 8px;
}

.navgroup a{
  border-top:none;
  border-radius:8px;
  margin:2px 0;
}

.navsec.toggle:not(.open) + .navgroup{
  display:none;
}

@media(max-width:1180px){
  .dash-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-hero{grid-template-columns:1fr}
}

@media(max-width:760px){
  .dashboard-columns,.dashboard-columns.bottom{grid-template-columns:1fr}
  .dash-grid{grid-template-columns:1fr}
  .dash-filter{grid-template-columns:1fr}
  .dashboard-hero{padding:14px}
  .metric-card .value{font-size:20px}
}
