/* UNDURUV FINAL UI v5 — light premium unified system */
:root{--u-red:#ef1734;--u-red-soft:#fff0f3;--u-navy:#102544;--u-muted:#70839a;--u-line:#dbe4ee;--u-bg:#f4f7fb;--u-blue:#347df0;--u-green:#16b875;--u-orange:#ff9b32}
body{background:var(--u-bg)!important;color:var(--u-navy)!important}
.main{background:var(--u-bg)!important}
.topbar{min-height:72px!important;padding:10px 28px!important;background:#fff!important;border-bottom:1px solid var(--u-line)!important;box-shadow:0 2px 14px rgba(16,37,68,.025)!important}
.page-heading{display:grid!important;gap:2px!important}
.page-heading h2{margin:0!important;color:var(--u-navy)!important;font-size:27px!important;line-height:1.1!important;font-weight:950!important;letter-spacing:-.03em!important}
.page-heading .muted{color:#899bb1!important;font-size:12px!important}
.top-eyebrow{display:none!important}
.content{background:var(--u-bg)!important;padding:26px 28px 40px!important}
.sidebar{background:#fff!important;color:var(--u-navy)!important;border-right:1px solid var(--u-line)!important}
.sidebar nav button{color:#536b85!important;background:transparent!important}
.sidebar nav button.active{background:var(--u-red)!important;color:#fff!important;box-shadow:0 10px 24px rgba(239,23,52,.18)!important}
.sidebar-bottom .ghost,#logoutBtn{background:#fff!important;color:var(--u-navy)!important;border:1px solid #cfdbe7!important}
/* controls + buttons: no dark controls */
.dashboard-compact-controls{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;margin:0 0 12px!important}
.dashboard-compact-controls select,.dashboard-compact-controls input,.dash-fixed-branch{height:48px!important;background:#fff!important;color:var(--u-navy)!important;border:1px solid var(--u-line)!important;border-radius:15px!important;padding:0 14px!important;font-size:14px!important;font-weight:900!important;box-shadow:0 5px 18px rgba(16,37,68,.035)!important}
.dashboard-compact-controls select,.dash-fixed-branch{flex:0 1 260px!important;min-width:220px!important}
.dashboard-compact-controls input[type=month]{flex:0 0 205px!important}
.dashboard-compact-controls input[type=date]{flex:0 0 170px!important}
.dash-switch-head{background:#fff!important;border:1px solid var(--u-line)!important;border-radius:17px!important;padding:7px!important;box-shadow:0 6px 22px rgba(16,37,68,.04)!important}
.dash-mode-buttons{background:#eef3f8!important;border:1px solid #e0e7ef!important;border-radius:12px!important;padding:4px!important}
.dash-mode-buttons button{background:transparent!important;color:#334d68!important;border:0!important;border-radius:9px!important;font-weight:950!important}
.dash-mode-buttons button.active{background:var(--u-red)!important;color:#fff!important;box-shadow:0 7px 16px rgba(239,23,52,.22)!important}
button.ghost,.ghost,.row-menu summary,.row-menu-btn,.table-export-action,.toolbar button{background:#fff!important;color:var(--u-navy)!important;border:1px solid #cedae6!important;box-shadow:none!important}
button.ghost:hover,.row-menu-btn:hover,.table-export-action:hover,.toolbar button:hover{border-color:#aebed0!important;background:#f8fafc!important}
.primary,button.primary{background:var(--u-red)!important;color:#fff!important;border-color:var(--u-red)!important;box-shadow:0 6px 16px rgba(239,23,52,.14)!important}
input,select,textarea{background:#fff!important;color:var(--u-navy)!important}
input:focus,select:focus,textarea:focus{border-color:var(--u-red)!important;box-shadow:0 0 0 3px rgba(239,23,52,.08)!important;outline:none!important}
/* all cards and empty states */
#view .card{background:#fff!important;color:var(--u-navy)!important;border:1px solid var(--u-line)!important;border-radius:22px!important;box-shadow:0 10px 30px rgba(16,37,68,.04)!important}
#view .muted{color:#8396ad!important}
.empty,.error-card,#liveDetail,.live-layout .empty,#liveTable .empty{background:#fff!important;color:var(--u-navy)!important;border:1px dashed #cfd9e5!important;border-radius:16px!important}
.section-title h3,.premium-title h3{color:var(--u-navy)!important;font-weight:950!important}
.badge{font-weight:850!important}
.row-menu-pop{background:#fff!important;border:1px solid var(--u-line)!important;border-radius:13px!important;box-shadow:0 14px 34px rgba(16,37,68,.14)!important}
.row-menu summary{display:grid!important;place-items:center!important;width:36px;height:36px;border-radius:11px!important;cursor:pointer!important}
/* report table shells + universal export buttons */
.report-table-shell{position:relative!important;min-width:0!important}
.table-export-bar{display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:8px!important;margin:0 0 10px!important;min-height:38px!important}
.table-export-action{height:38px!important;padding:0 16px!important;border-radius:12px!important;font-size:13px!important;font-weight:950!important;cursor:pointer!important}
.table-export-action:disabled{opacity:.5!important;cursor:wait!important}
.dashboard-report-card>.report-table-shell>.table-export-bar{margin-top:-54px!important;margin-bottom:17px!important;padding-right:0!important}
.table-wrap{background:#fff!important;border:1px solid #dce5ee!important;border-radius:16px!important;overflow:auto!important;scrollbar-gutter:stable!important;overscroll-behavior:contain!important}
.table{width:max-content!important;min-width:100%!important;border-collapse:separate!important;border-spacing:0!important;background:#fff!important;color:var(--u-navy)!important;font-size:14px!important}
.table th{position:sticky!important;top:0!important;z-index:2!important;background:#f6f8fb!important;color:#5f738b!important;border-bottom:1px solid #dce5ee!important;padding:11px 13px!important;font-size:12.5px!important;font-weight:950!important;white-space:nowrap!important}
.table td{background:#fff!important;color:var(--u-navy)!important;border-bottom:1px solid #e7edf3!important;padding:11px 13px!important;font-size:14px!important;font-weight:800!important;line-height:1.25!important;white-space:nowrap!important;vertical-align:middle!important}
.table tbody tr:hover td{background:#fbfcfe!important}
.table tbody tr.total-row td{background:var(--u-red-soft)!important;color:#c81731!important;border-top:2px solid var(--u-red)!important;font-weight:950!important}
.person-name{color:var(--u-navy)!important;font-size:16px!important;font-weight:950!important;line-height:1.22!important}
.rank-badge{display:inline-grid!important;place-items:center!important;width:36px;height:36px;border-radius:50%!important;background:#f1f5f9!important;color:var(--u-navy)!important;font-size:13px!important;font-weight:950!important}
.table tbody tr:first-child .rank-badge{background:#fff0f3!important;color:var(--u-red)!important}
/* compact analytical cells: large readable text, same navy numbers */
.category-card .table td,.period-card .table td,.history-card .table td,.organization-card .table td{padding-top:9px!important;padding-bottom:9px!important}
.metric-stack{min-width:180px!important;display:grid!important;gap:4px!important}
.metric-stack>div{display:grid!important;grid-template-columns:minmax(72px,auto) minmax(90px,1fr)!important;align-items:center!important;gap:9px!important}
.metric-stack span{color:#8094ab!important;font-size:11.5px!important;font-weight:750!important}
.metric-stack b{color:var(--u-navy)!important;text-align:right!important;font-size:13px!important;font-weight:950!important;white-space:nowrap!important}
.metric-stack b.good{color:var(--u-navy)!important}
.metric-stack em{display:inline-block!important;margin-left:5px!important;background:#0d6655!important;color:#fff!important;border-radius:999px!important;padding:2px 6px!important;font-size:9px!important;font-style:normal!important;font-weight:950!important}
.period-cell{min-width:218px!important;display:grid!important;gap:4px!important}
.period-cell>div{display:grid!important;grid-template-columns:minmax(72px,auto) 1fr!important;gap:9px!important;align-items:center!important}
.period-cell span{color:#8094ab!important;font-size:11.5px!important;font-weight:750!important}
.period-cell b,.period-cell b.good{color:var(--u-navy)!important;text-align:right!important;font-size:12.5px!important;font-weight:950!important;white-space:nowrap!important}
.period-card .person-name,.period-card tbody td:first-child{font-size:15px!important;font-weight:950!important}
.history-card .table td,.organization-card .table td{font-size:13.5px!important}
.organization-card .table td:first-child{font-weight:950!important}
.organization-card .table td:last-child{max-width:520px!important;overflow:hidden!important;text-overflow:ellipsis!important}
/* dashboard hero OMBORCHI-like */
.premium-hero{padding:20px!important}
.premium-hero .hero-layout{grid-template-columns:minmax(270px,.72fr) minmax(0,2.3fr)!important;gap:28px!important}
.premium-hero .donut{width:210px!important}
.premium-hero .donut:after{inset:38px!important;background:#fff!important}
.premium-hero .donut-core small{font-size:12px!important;color:#536a83!important}
.premium-hero .donut-core b{font-size:42px!important;color:var(--u-navy)!important}
.hero-metric{background:#fff!important;border:1px solid var(--u-line)!important;border-radius:15px!important;box-shadow:none!important}
.hero-metric b{color:var(--u-navy)!important;font-weight:950!important}
.hero-secondary{background:#f8fafc!important;border-color:var(--u-line)!important}
.plan-strip{background:#fff!important;border:1px solid var(--u-line)!important;border-radius:14px!important}
.plan-strip>div{background:#fff!important;border-color:var(--u-line)!important}
.flow-cards{gap:10px!important}
.flow-cards .metric{border-radius:16px!important;box-shadow:none!important}
/* premium dynamics */
.premium-dynamics{padding:20px!important}
.premium-kpis>span{background:#fff!important;border:1px solid var(--u-line)!important;border-radius:15px!important;box-shadow:none!important}
.premium-kpis b{color:var(--u-navy)!important;font-size:18px!important;font-weight:950!important}
.premium-tabs{background:#eef2f7!important;border-radius:13px!important}
.premium-tabs button{color:#344e69!important;background:transparent!important;font-weight:950!important}
.premium-tabs button.active{background:#4e60f5!important;color:#fff!important;box-shadow:0 7px 18px rgba(78,96,245,.22)!important}
.premium-chart-legend{color:#526982!important}
.daily-chart{background:#fff!important;border-top:1px solid #e7edf3!important;height:335px!important}
.chart-count{color:#173858!important;font-weight:950!important}
.chart-date{color:#526982!important;font-weight:900!important}
.chart-pop{background:#2a2254!important;color:#fff!important;border-radius:16px!important;box-shadow:0 18px 42px rgba(42,34,84,.30)!important}
.dot.excess{background:var(--u-blue)!important}.bar-excess{background:var(--u-blue)!important}
.dot.debt{background:var(--u-green)!important}.bar-debt{background:var(--u-green)!important}
.debt-stack{height:222px!important;width:100%!important;display:flex!important;flex-direction:column-reverse!important;justify-content:flex-start!important;align-items:stretch!important}
.debt-stack i{display:block!important;width:100%!important}
/* search, promises, HUDUD, GPS and forms unified light */
.client-search-card input#cq,.filter-card input,.filter-card select,.filters input,.filters select,.toolbar input,.toolbar select{background:#fff!important;color:var(--u-navy)!important;border:1px solid #cfdbe7!important;border-radius:14px!important;font-size:14px!important}
.client-search-card input#cq{border-color:#ff7081!important;font-size:16px!important}
.promise-note-full{background:#fff!important;color:var(--u-navy)!important;border:1px solid var(--u-line)!important}
#liveMap{background:#fff!important;border:1px solid var(--u-line)!important}
.profile-head,.detail-list>div{background:#fff!important;color:var(--u-navy)!important}
/* responsive */
@media(max-width:1050px){
 .premium-hero .hero-layout{grid-template-columns:1fr!important}
 .dashboard-report-card>.report-table-shell>.table-export-bar{margin-top:0!important}
}
@media(max-width:760px){
 .topbar{padding:10px 14px!important;min-height:66px!important}.page-heading h2{font-size:23px!important}.content{padding:14px 12px 28px!important}
 .dashboard-compact-controls{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;position:sticky!important;top:0!important;z-index:8!important;background:var(--u-bg)!important;padding:5px 0 8px!important}
 .dashboard-compact-controls select,.dashboard-compact-controls .dash-fixed-branch{grid-column:1/-1!important;min-width:0!important;width:100%!important;max-width:none!important}
 .dashboard-compact-controls input[type=month],.dashboard-compact-controls input[type=date]{width:100%!important;min-width:0!important;flex:auto!important}
 .premium-hero .donut{width:180px!important}.premium-hero .donut:after{inset:32px!important}
 .premium-hero .hero-metrics-3{grid-template-columns:1fr 1fr!important}.premium-hero .hero-metrics-3 .hero-metric:last-child{grid-column:1/-1!important}
 .premium-kpis{grid-template-columns:1fr!important}
 .premium-tabs{width:100%!important}.premium-tabs button{flex:1!important;min-width:0!important}
 .table-export-bar{justify-content:flex-start!important;overflow-x:auto!important}.table-export-action{flex:0 0 auto!important}
 .table th{font-size:12px!important;padding:10px 11px!important}.table td{font-size:13px!important;padding:10px 11px!important}
 .person-name{font-size:14.5px!important}.metric-stack{min-width:165px!important}.period-cell{min-width:205px!important}
}
@media(max-width:430px){
 .premium-hero .hero-metrics-3{grid-template-columns:1fr!important}.premium-hero .hero-metrics-3 .hero-metric:last-child{grid-column:auto!important}
}
