:root{
  --navy:#071a32;--blue:#1557b0;--ink:#172334;--muted:#66758a;--bg:#f3f6fa;
  --line:#d6e0ec;--green:#157347;--amber:#a96200;
  --grid:#8298b3;--grid-strong:#3f6288;--head:#dce9fb;--head-dark:#123f72;--head-mid:#c8dcf5;
  --stripe:#f7faff;--total:#dbe9fb;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,"Noto Sans Devanagari",Arial,sans-serif;background:var(--bg);color:var(--ink)}
.topbar{background:linear-gradient(125deg,#06162a,#1557b0);color:#fff;padding:24px max(20px,calc((100vw - 1650px)/2));display:flex;justify-content:space-between;align-items:center;gap:20px;box-shadow:0 8px 28px #0b1f3a30}
.eyebrow{font-size:12px;letter-spacing:.16em;font-weight:800;opacity:.78}.topbar h1{margin:4px 0;font-size:30px}.topbar p{margin:0;opacity:.82}.datebox{text-align:right}.datebox span{display:block;font-size:12px;opacity:.72}.datebox strong{font-size:21px}
.shell{max-width:1650px;margin:18px auto;padding:0 16px}
.upload-card,.filters,.report-card,.note{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 4px 16px #213b5a0b}
.upload-card{padding:16px;display:grid;grid-template-columns:1fr auto;gap:10px 20px;align-items:center}.upload-card h2{margin:0 0 4px;font-size:18px}.upload-card p{margin:0;color:var(--muted)}
.actions{display:flex;gap:8px;flex-wrap:wrap}.file-btn,button{border:1px solid #c7d4e4;background:#fff;color:var(--navy);border-radius:9px;padding:9px 13px;font-weight:800;cursor:pointer}.file-btn,.primary{background:var(--blue);border-color:var(--blue);color:#fff}.file-btn input{display:none}.status{grid-column:1/-1;color:var(--muted);font-size:12px}
.filters{margin-top:10px;padding:9px;display:flex;gap:8px;flex-wrap:wrap}.filters select{min-width:160px;padding:9px;border:1px solid var(--line);border-radius:8px;background:#fff;font-weight:650}
.kpis{display:grid;grid-template-columns:repeat(7,minmax(125px,1fr));gap:8px;margin:10px 0}.kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:11px 12px;box-shadow:0 2px 10px #20355008}.kpi small{color:var(--muted);font-weight:700}.kpi strong{display:block;font-size:22px;margin-top:4px;color:var(--navy)}.kpi em{font-style:normal;font-size:10.5px;color:var(--muted)}
.alerts{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:10px;margin:0 0 12px}.alert-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;box-shadow:0 4px 16px #213b5a0b}.alert-card.warn{border-left:5px solid #d99000}.alert-card.danger{border-left:5px solid #cf4b34}.alert-card.success{border-left:5px solid #1b8a52}.alert-head{display:flex;gap:10px;align-items:flex-start}.alert-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#edf3fb;font-size:18px;flex:0 0 34px}.alert-head h3{margin:0;font-size:16px;color:var(--navy)}.alert-head p{margin:3px 0 0;color:var(--muted);font-size:12px}.alert-body{margin-top:10px}.alert-big{font-size:20px;font-weight:850;color:#0c2546}.alert-sub{margin-top:3px;color:#51657d;font-size:12px}.alert-metrics{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.alert-metrics span{background:#f4f7fb;border:1px solid #dce5f0;border-radius:999px;padding:5px 9px;font-size:11.5px;color:#28425f}.alert-list{margin-top:10px;padding-top:8px;border-top:1px dashed #d5dfeb;font-size:12px;line-height:1.45;color:#324a65}
.tabs{display:flex;gap:7px;margin:12px 0 9px;flex-wrap:wrap}.tab{padding:9px 13px}.tab.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.report-card{overflow:hidden;border-color:#c7d5e5}.report-head{padding:12px 14px;border-bottom:1px solid #c8d7e7;display:flex;justify-content:space-between;align-items:end;gap:10px;flex-wrap:wrap}.report-head h2{margin:0;font-size:19px;color:var(--navy)}.report-head p{margin:3px 0 0;color:var(--muted);font-size:12px}.legend{font-size:11px;color:var(--muted)}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin:0 4px 0 9px}.dot.good{background:#2ca66f}.dot.warn{background:#e5a22c}
.table-wrap{overflow:auto;max-height:70vh;border:2px solid var(--grid-strong);border-radius:8px;background:#fff;box-shadow:inset 0 0 0 1px #d5e0ed}.table-wrap::-webkit-scrollbar{height:11px;width:11px}.table-wrap::-webkit-scrollbar-thumb{background:#9fb2c9;border-radius:99px;border:2px solid #edf3fa}.table-wrap::-webkit-scrollbar-track{background:#edf3fa}
.report-table{width:100%;border-collapse:collapse;border-spacing:0;min-width:1160px;background:#fff;border:0}
.report-table th,.report-table td{padding:4px 5px;border:1px solid var(--grid);text-align:right;font-size:10px;line-height:1.12;white-space:nowrap;vertical-align:middle}
.report-table th{position:sticky;top:0;background:var(--head);color:#0d2f56;font-size:9.4px;line-height:1.08;white-space:normal;z-index:2;font-weight:850}
.report-table thead tr:first-child th{background:var(--head-dark);color:#fff;font-weight:900;border-color:#33597f;border-bottom:2px solid #294f76}
.report-table thead tr:last-child th{background:var(--head-mid);color:#0d2f56;border-bottom:2px solid var(--grid-strong)}
.report-table th:first-child,.report-table td:first-child,.report-table th:nth-child(2),.report-table td:nth-child(2){text-align:left}
.report-table td:nth-child(2){white-space:normal;min-width:112px}.report-table td:nth-child(3){white-space:normal;min-width:78px}
.report-table tbody tr:nth-child(even):not(.total-row){background:var(--stripe)}.report-table tbody tr:hover:not(.total-row){background:#edf5ff}
.report-table tbody td{border-color:#92a7bf}
.report-table .total-row td{font-weight:900;background:var(--total);color:#0b2c50;border-top:2.4px solid var(--grid-strong);border-bottom:2.4px solid var(--grid-strong)}
.report-table .total-row td:first-child{font-size:10.5px}
/* Group separators for Official Daily view */
.report-table.official-grid tbody td:nth-child(2),
.report-table.official-grid tbody td:nth-child(5),
.report-table.official-grid tbody td:nth-child(9),
.report-table.official-grid tbody td:nth-child(11),
.report-table.official-grid tbody td:nth-child(14),
.report-table.official-grid tbody td:nth-child(17),
.report-table.official-grid tbody td:nth-child(21){border-right:2.3px solid var(--grid-strong)}
/* Group separators for Engineer view */
.report-table.engineer-grid tbody td:nth-child(3),
.report-table.engineer-grid tbody td:nth-child(6),
.report-table.engineer-grid tbody td:nth-child(9){border-right:2.3px solid var(--grid-strong)}
.badge{display:inline-block;padding:2px 6px;border-radius:999px;font-weight:850;font-size:9.7px}.badge.good{background:#e2f4ea;color:var(--green);border:1px solid #cfeada}.badge.warn{background:#fff0d0;color:var(--amber);border:1px solid #f5dfae}
.note{margin-top:10px;padding:10px 12px;color:#526276;font-size:11px}footer{max-width:1650px;margin:14px auto 24px;padding:0 16px;color:#75849a;font-size:11px;text-align:center}
.auto-card{margin:14px 0 0;padding:10px 13px;border:1px solid #dbe5f0;border-radius:12px;background:#fff;box-shadow:0 4px 16px rgba(26,51,78,.04);font-size:13px}.status-pill{display:inline-block;padding:3px 8px;border-radius:999px;margin-right:7px;font-size:10.5px;font-weight:800;letter-spacing:.3px}.status-pill.ok{background:#e8f7ee;color:#167443}.status-pill.sample{background:#fff3d8;color:#946200}.status-source{margin-left:7px;color:#607286}
@media(max-width:900px){.topbar{align-items:flex-start}.topbar h1{font-size:24px}.upload-card{display:flex;flex-direction:column;align-items:flex-start}.kpis{grid-template-columns:repeat(2,1fr)}.alerts{grid-template-columns:1fr}}
@media print{
  @page{size:A4 landscape;margin:6mm}
  html,body{background:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .no-print,.note,.tabs,.filters,.upload-card,.auto-card,.alerts{display:none!important}
  .shell{max-width:none;margin:0;padding:0}.topbar{padding:6px 8px;box-shadow:none}.topbar h1{font-size:17px;margin:0}.topbar p,.datebox span{font-size:9px}.datebox strong{font-size:13px}
  .kpis{grid-template-columns:repeat(7,1fr);gap:3px;margin:3px 0 6px}.kpi{padding:4px;box-shadow:none;border:1px solid #91a8c2;border-radius:4px}.kpi small{font-size:7.4px}.kpi strong{font-size:11.5px;margin-top:1px}.kpi em{font-size:7px}
  .report-card{box-shadow:none;border:0}.report-head{padding:4px 5px}.report-head h2{font-size:14px}.report-head p,.legend{font-size:8.5px}
  .table-wrap{max-height:none;overflow:visible;border:1.4px solid var(--grid-strong);border-radius:0;box-shadow:none}
  .report-table{min-width:0!important;width:100%!important;table-layout:fixed;border-collapse:collapse}
  .report-table.official-grid th,.report-table.official-grid td{font-size:6px;padding:1.6px 1.6px;white-space:normal;word-break:break-word}
  .report-table.engineer-grid th,.report-table.engineer-grid td{font-size:6.5px;padding:1.8px 2px;white-space:normal;word-break:break-word}
  .report-table.district-grid th,.report-table.district-grid td,.report-table.gp-grid th,.report-table.gp-grid td{font-size:6.8px;padding:2px;white-space:normal;word-break:break-word}
  .report-table th{position:static!important}.report-table thead{display:table-header-group}.report-table tr{page-break-inside:avoid;break-inside:avoid}.report-table th,.report-table td{border:1px solid #6f86a1!important}
  .report-table thead tr:first-child th{background:#123f72!important;color:#fff!important}.report-table thead tr:last-child th{background:#c8dcf5!important;color:#0d2f56!important}.report-table tbody tr:nth-child(even):not(.total-row){background:#f7faff!important}.report-table .total-row td{background:#dbe9fb!important;color:#0b2c50!important;border-top:2px solid #3f6288!important;border-bottom:2px solid #3f6288!important}
  footer{margin:4px 0;font-size:8px}
}

/* V6 display/print controls */
:root{--table-font-scale:1}
.print-select{border:1px solid #c9d4e4;background:#fff;color:var(--navy);border-radius:10px;padding:10px 12px;font-weight:800;cursor:pointer}
.report-table th,.report-table td{font-size:calc(10.2px * var(--table-font-scale))}
.report-table th{font-size:calc(9.7px * var(--table-font-scale))}
.report-table .badge{font-size:calc(10px * var(--table-font-scale))}
body.print-portrait .report-table.official-grid th,body.print-portrait .report-table.official-grid td{font-size:calc(6.15px * var(--table-font-scale))}
body.print-landscape .report-table.official-grid th,body.print-landscape .report-table.official-grid td{font-size:calc(6.3px * var(--table-font-scale))}

@media print{
  body.print-portrait .report-table{table-layout:fixed}
  body.print-portrait .report-table.engineer-grid th,body.print-portrait .report-table.engineer-grid td,
  body.print-portrait .report-table.district-grid th,body.print-portrait .report-table.district-grid td,
  body.print-portrait .report-table.gp-grid th,body.print-portrait .report-table.gp-grid td{font-size:calc(6.5px * var(--table-font-scale));padding:2px}
  body.print-landscape .report-table.engineer-grid th,body.print-landscape .report-table.engineer-grid td,
  body.print-landscape .report-table.district-grid th,body.print-landscape .report-table.district-grid td,
  body.print-landscape .report-table.gp-grid th,body.print-landscape .report-table.gp-grid td{font-size:calc(7px * var(--table-font-scale));padding:2px 3px}
}

/* V9 per-Janpad top 3 alert lists */
.alert-card.wide{min-width:0}.alert-scroll{margin-top:10px;max-height:380px;overflow:auto;padding-right:3px}.janpad-alert-group{border:1px solid #dce5f0;border-radius:10px;overflow:hidden;margin-bottom:9px;background:#fbfdff}.janpad-alert-title{background:#eef4fb;color:#143a66;font-weight:850;padding:7px 9px;font-size:12px;display:flex;justify-content:space-between;gap:10px}.janpad-alert-title small{font-weight:700;color:#607286}.alert-rank-row{display:grid;grid-template-columns:28px minmax(160px,1fr) auto;gap:8px;align-items:center;padding:7px 9px;border-top:1px solid #e5ecf4}.alert-rank-row:first-of-type{border-top:0}.rank-no{display:flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:50%;background:#fff3d8;color:#946200;font-weight:900;font-size:11px}.alert-rank-row.dys .rank-no{background:#fde7e2;color:#a83f2c}.rank-main{min-width:0}.rank-main>b{display:block;font-size:12px;color:#0d2f56}.rank-main small{display:block;color:#708096;font-size:10.5px;margin-top:1px}.rank-metrics{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.rank-metrics span{background:#fff;border:1px solid #d9e3ef;border-radius:999px;padding:4px 7px;font-size:10.5px;white-space:nowrap}.coverage-chip{font-weight:850;color:#a96200}.gp-inline{margin-top:4px;color:#4f6176;font-size:10.5px;line-height:1.35}.empty-alert{padding:12px;color:#69798c;font-size:12px}
@media(max-width:900px){.alert-rank-row{grid-template-columns:26px 1fr}.rank-metrics{grid-column:2;justify-content:flex-start}.janpad-alert-title{display:block}.janpad-alert-title small{display:block;margin-top:2px}}

/* V10 Dysfunctional GP bucket/table */
.dys-tab{border-color:#efc7bf;color:#a13a29}.dys-tab.active{background:#a13a29!important;color:#fff!important;border-color:#a13a29!important}
.report-table.dysfunctional-grid{min-width:1120px}.report-table.dysfunctional-grid th:nth-child(1),.report-table.dysfunctional-grid td:nth-child(1),.report-table.dysfunctional-grid th:nth-child(3),.report-table.dysfunctional-grid td:nth-child(3),.report-table.dysfunctional-grid th:nth-child(4),.report-table.dysfunctional-grid td:nth-child(4),.report-table.dysfunctional-grid th:nth-child(6),.report-table.dysfunctional-grid td:nth-child(6){text-align:left}.report-table.dysfunctional-grid .gp-name-cell{white-space:normal;min-width:380px;line-height:1.35}.report-table.dysfunctional-grid td:nth-child(5){font-weight:850;color:#a13a29}.empty-table{text-align:center!important;padding:24px!important;color:#68788c}.report-table.dysfunctional-grid tbody tr:nth-child(-n+3) td:nth-child(2){font-weight:900}
@media print{.report-table.dysfunctional-grid th,.report-table.dysfunctional-grid td{font-size:calc(7px * var(--table-font-scale));padding:2px 3px;white-space:normal}.report-table.dysfunctional-grid .gp-name-cell{min-width:0}}


/* V11 compact table format for top alert buckets */
.alert-table-wrap{margin-top:10px;max-height:390px;overflow:auto;border:1px solid #d9e3ef;border-radius:10px;background:#fff}
.alert-table{width:100%;border-collapse:collapse;min-width:700px;font-size:10.8px}
.alert-table th,.alert-table td{padding:6px 7px;border:1px solid #dce5ef;text-align:right;vertical-align:middle;white-space:nowrap}
.alert-table th{position:sticky;top:0;z-index:2;background:#eaf1fa;color:#123f72;font-size:10px;font-weight:900}
.alert-table td:nth-child(1),.alert-table td:nth-child(3),.alert-table td:nth-child(4),.alert-table th:nth-child(1),.alert-table th:nth-child(3),.alert-table th:nth-child(4){text-align:left}
.alert-table tbody tr:nth-child(even){background:#f8fbff}.alert-table tbody tr:hover{background:#edf5ff}
.alert-table .rank-cell{text-align:center;font-weight:900;color:#946200}.alert-table .dys-rank{color:#a13a29}.alert-table .dys-count{font-weight:900;color:#a13a29}
.alert-table .gp-table-cell{white-space:normal;min-width:260px;line-height:1.3;text-align:left}
.mini-chip{display:inline-block;padding:2px 6px;border-radius:999px;font-weight:900;border:1px solid #ead8ad;background:#fff3d8}.warn-chip{color:#946200}
.dys-alert-table{min-width:920px}.dys-alert-table th{background:#f8e9e5;color:#8d3023}
@media(max-width:900px){.alerts{grid-template-columns:1fr}.alert-table-wrap{max-height:330px}.alert-table{font-size:10.3px}}

/* V14: top navigation + priority action alerts */
.top-tabs{position:sticky;top:8px;z-index:30;margin:10px 0;background:rgba(243,246,250,.96);backdrop-filter:blur(8px);padding:8px;border:1px solid #d6e0ec;border-radius:13px;box-shadow:0 7px 22px rgba(19,45,78,.10)}
.top-tabs .tab{background:#fff;box-shadow:0 1px 5px rgba(20,45,74,.04)}
.priority-tab{border-color:#e7c872;color:#8b5d00}.priority-tab.active{background:#a56d00!important;color:#fff!important;border-color:#a56d00!important}
.report-table.priority-grid{min-width:1240px}.report-table.priority-grid th:nth-child(2),.report-table.priority-grid td:nth-child(2),.report-table.priority-grid th:nth-child(3),.report-table.priority-grid td:nth-child(3),.report-table.priority-grid th:nth-child(4),.report-table.priority-grid td:nth-child(4),.report-table.priority-grid th:nth-child(5),.report-table.priority-grid td:nth-child(5),.report-table.priority-grid th:nth-child(6),.report-table.priority-grid td:nth-child(6){text-align:left}.alert-reason-cell{white-space:normal!important;min-width:230px;line-height:1.3}.priority-chip{display:inline-block;padding:3px 7px;border-radius:999px;font-size:9.5px;font-weight:950;letter-spacing:.2px;border:1px solid transparent}.priority-chip.critical{background:#fde8e4;color:#a23625;border-color:#f1c8c0}.priority-chip.high{background:#fff0d0;color:#946200;border-color:#ead8ad}.priority-chip.watch{background:#eaf1fa;color:#215582;border-color:#cddbec}
@media(max-width:900px){.top-tabs{position:static;overflow-x:auto;flex-wrap:nowrap}.top-tabs .tab{white-space:nowrap}.report-table.priority-grid{min-width:1050px}}
@media print{.report-table.priority-grid th,.report-table.priority-grid td{font-size:calc(6.8px * var(--table-font-scale));padding:2px 3px;white-space:normal}.alert-reason-cell{min-width:0}}

/* V15: Category-wise work and expenditure percentage buckets */
.category-tab{border-color:#b9d5c4;color:#28653e}.category-tab.active{background:#28653e!important;color:#fff!important;border-color:#28653e!important}
.exp-tab{border-color:#bfcfec;color:#244e86}.exp-tab.active{background:#244e86!important;color:#fff!important;border-color:#244e86!important}
.report-table.category-grid{min-width:1180px}.report-table.expbucket-grid{min-width:1160px}
.report-table.category-grid th:first-child,.report-table.category-grid td:first-child,.report-table.expbucket-grid th:nth-child(-n+3),.report-table.expbucket-grid td:nth-child(-n+3){text-align:left}
.bucket-zero{font-weight:950!important;color:#a23625!important;background:#fff1ee!important}.bucket-good{font-weight:900!important;color:#1f6a3f!important;background:#eef9f2!important}
.exp-pct-chip{display:inline-block;padding:3px 7px;border-radius:999px;font-size:10px;font-weight:950;border:1px solid #cbd8e7;background:#eef4fb;color:#315a83}.exp-pct-chip.critical{background:#fde8e4;color:#a23625;border-color:#f1c8c0}.exp-pct-chip.low{background:#fff0d0;color:#946200;border-color:#ead8ad}.exp-pct-chip.good{background:#eaf7ee;color:#1f6a3f;border-color:#c8e6d2}
@media print{.report-table.category-grid th,.report-table.category-grid td,.report-table.expbucket-grid th,.report-table.expbucket-grid td{font-size:calc(6.6px * var(--table-font-scale));padding:2px 3px;white-space:normal}}

.source-links{margin:8px 0 10px;padding:10px 14px;border:1px solid #cbd8e8;border-radius:12px;background:#f8fbff;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.source-links a{padding:6px 10px;border:1px solid #b8cbe3;border-radius:9px;text-decoration:none;font-weight:700;color:#123b69;background:white}.ongoingall-tab{border-color:#9fc3ee!important}.ongoing-summary-grid th{white-space:nowrap}.ongoing-summary-grid td:nth-child(n+4){text-align:right}

.ongoing-detail-grid{min-width:1480px;table-layout:fixed}
.ongoing-detail-grid th,.ongoing-detail-grid td{padding:4px 4px;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.ongoing-detail-grid th:nth-child(1),.ongoing-detail-grid td:nth-child(1){width:46px;text-align:center}
.ongoing-detail-grid th:nth-child(2),.ongoing-detail-grid td:nth-child(2){width:105px;text-align:left}
.ongoing-detail-grid th:nth-child(3),.ongoing-detail-grid td:nth-child(3){width:135px;text-align:left}
.ongoing-detail-grid th:nth-child(4),.ongoing-detail-grid td:nth-child(4){width:100px;text-align:left}
.ongoing-detail-grid th:nth-child(5),.ongoing-detail-grid td:nth-child(5){width:115px;text-align:left}
.ongoing-detail-grid th:nth-child(6),.ongoing-detail-grid td:nth-child(6){width:72px;text-align:center}
.ongoing-detail-grid th:nth-child(7),.ongoing-detail-grid td:nth-child(7){width:180px;text-align:left;font-family:Consolas,monospace;font-size:calc(9.2px * var(--table-font-scale))}
.ongoing-detail-grid th:nth-child(8),.ongoing-detail-grid td:nth-child(8){width:330px;white-space:normal;text-align:left;line-height:1.25}
.ongoing-detail-grid th:nth-child(9),.ongoing-detail-grid td:nth-child(9){width:135px;text-align:left}
.ongoing-detail-grid th:nth-child(10),.ongoing-detail-grid td:nth-child(10),
.ongoing-detail-grid th:nth-child(11),.ongoing-detail-grid td:nth-child(11){width:95px}
.ongoing-detail-grid th:nth-child(12),.ongoing-detail-grid td:nth-child(12){width:62px}
.ongoing-detail-grid th:nth-child(13),.ongoing-detail-grid td:nth-child(13),
.ongoing-detail-grid th:nth-child(14),.ongoing-detail-grid td:nth-child(14){width:92px}
.ongoingdetail-tab{font-weight:800}.download-source{display:inline-block;margin-left:8px;padding:6px 10px;border-radius:8px;background:#e8f2ff;text-decoration:none;font-weight:700}

@media print{
  body.print-portrait .report-table.ongoing-detail-grid{width:100%!important;min-width:0!important;table-layout:fixed!important}
  body.print-portrait .report-table.ongoing-detail-grid th,
  body.print-portrait .report-table.ongoing-detail-grid td{font-size:calc(5.25px * var(--table-font-scale));line-height:1.12;padding:1.4px 1.2px;white-space:normal!important;overflow-wrap:anywhere;word-break:break-word}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(1),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(1){width:3%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(2),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(2){width:6%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(3),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(3){width:9%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(4),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(4){width:6%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(5),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(5){width:7%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(6),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(6){width:4%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(7),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(7){width:11%!important;font-size:calc(4.9px * var(--table-font-scale))}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(8),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(8){width:20%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(9),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(9){width:8%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(10),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(10){width:6%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(11),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(11){width:6%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(12),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(12){width:5%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(13),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(13){width:5%!important}
  body.print-portrait .report-table.ongoing-detail-grid th:nth-child(14),body.print-portrait .report-table.ongoing-detail-grid td:nth-child(14){width:4%!important}
  body.print-portrait .report-table.ongoing-detail-grid td:nth-child(8){line-height:1.18}
  body.print-portrait .report-table.ongoing-detail-grid th{font-weight:900}
  body.print-portrait .kpis{display:none!important}
  body.print-portrait .report-head{padding:2px 4px}
  body.print-portrait .report-head h2{font-size:11px}
  body.print-portrait .report-head p,body.print-portrait .legend{font-size:6.5px}
  body.print-portrait .topbar{padding:3px 5px}
  body.print-portrait .topbar h1{font-size:12px}
  body.print-portrait .topbar p,body.print-portrait .datebox span{font-size:6px}
  body.print-portrait .datebox strong{font-size:9px}
}


/* V25: exact Dysfunctional GP names + GP-level status */
.dys-detail-cell{min-width:320px;max-width:520px;white-space:normal!important;text-align:left!important;vertical-align:top}
.dys-gp-details{display:flex;flex-direction:column;gap:4px}
.dys-gp-item{display:grid;grid-template-columns:minmax(110px,1.5fr) auto auto;gap:8px;align-items:center;padding:4px 6px;border:1px solid #d7e2f2;border-radius:6px;background:#f8fbff;font-size:12px;line-height:1.25}
.dys-gp-item b{color:#9f1d12;overflow-wrap:anywhere}
.dys-gp-item span{white-space:nowrap;color:#334155}
.muted{color:#64748b}
@media print{.dys-detail-cell{min-width:260px;max-width:none}.dys-gp-item{font-size:9px;padding:2px 3px;gap:4px}}

/* ===== V28 District Dysfunctional visibility + width fix ===== */
.build-badge{
  position:absolute;right:14px;top:6px;z-index:10;
  font-size:10px;font-weight:900;padding:4px 8px;border-radius:999px;
  background:#0b4f9c;color:#fff;border:1px solid rgba(255,255,255,.8)
}
.alerts{
  display:grid!important;
  grid-template-columns:minmax(520px,.95fr) minmax(760px,1.45fr) minmax(520px,.9fr)!important;
  gap:14px!important;
  align-items:start!important;
}
.alert-card{min-width:0!important;grid-column:auto!important}
.alert-low-card .alert-table{min-width:650px}
.alert-dys-card .alert-table-wrap{max-height:520px}
.dys-alert-table{min-width:1180px!important;table-layout:fixed!important}
.dys-alert-table .c-janpad{width:105px}
.dys-alert-table .c-rank{width:48px}
.dys-alert-table .c-engineer{width:155px}
.dys-alert-table .c-cluster{width:175px}
.dys-alert-table .c-num{width:82px}
.dys-alert-table .c-detail{width:315px}
.dys-alert-table .c-official{width:105px}
.dys-alert-table th,.dys-alert-table td{padding:6px 7px!important;vertical-align:top}
.dys-alert-table th:nth-child(3),.dys-alert-table td:nth-child(3),
.dys-alert-table th:nth-child(4),.dys-alert-table td:nth-child(4),
.dys-alert-table th:nth-child(8),.dys-alert-table td:nth-child(8){text-align:left!important;white-space:normal!important}
.district-dys-card{border-left:5px solid #2b6cb0!important}
.district-dys-wrap{max-height:520px!important;overflow:auto!important}
.district-dys-table{min-width:510px!important;width:100%!important;table-layout:fixed!important}
.district-dys-table th,.district-dys-table td{font-size:11px!important;padding:7px 6px!important;text-align:center!important;white-space:nowrap!important}
.district-dys-table th:nth-child(1){width:72px}
.district-dys-table th:nth-child(2){width:48px}
.district-dys-table th:nth-child(3){width:132px}
.district-dys-table th:nth-child(4),
.district-dys-table th:nth-child(5),
.district-dys-table th:nth-child(6){width:72px}
.district-dys-table th:nth-child(7){width:62px}
.district-dys-table td:nth-child(3){text-align:left!important}
.district-top-row td{font-weight:900;background:#fff3d8}
.district-dys-note{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:0 4px 8px;font-size:11px}
.district-dys-note span{color:#65758b;font-weight:700}
@media(max-width:1700px){
  .alerts{grid-template-columns:minmax(480px,1fr) minmax(720px,1.35fr)!important}
  .district-dys-card{grid-column:1/-1!important}
}
@media(max-width:1050px){
  .alerts{grid-template-columns:1fr!important}
  .alert-card,.district-dys-card{grid-column:auto!important}
}

/* ===== V29 WIDTH FIX ===== */
.alerts{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
.alert-card{width:100%!important;max-width:none!important;min-width:0!important}
.alert-table-wrap{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
.alert-low-card .alert-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.alert-low-card .alert-table th,.alert-low-card .alert-table td{white-space:normal!important;overflow-wrap:anywhere!important}
.alert-low-card .alert-table th:nth-child(1){width:18%}.alert-low-card .alert-table th:nth-child(2){width:6%}.alert-low-card .alert-table th:nth-child(3){width:21%}.alert-low-card .alert-table th:nth-child(4){width:20%}.alert-low-card .alert-table th:nth-child(5){width:11%}.alert-low-card .alert-table th:nth-child(6){width:14%}.alert-low-card .alert-table th:nth-child(7){width:10%}
.dys-alert-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
.dys-alert-table col.col-janpad{width:10%}.dys-alert-table col.col-rank{width:4%}.dys-alert-table col.col-engineer{width:13%}.dys-alert-table col.col-cluster{width:12%}.dys-alert-table col.col-total{width:7%}.dys-alert-table col.col-progress{width:8%}.dys-alert-table col.col-dys{width:6%}.dys-alert-table col.col-detail{width:30%}.dys-alert-table col.col-official{width:10%}
.dys-alert-table th,.dys-alert-table td{padding:6px 7px!important;font-size:11px!important;line-height:1.25!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;vertical-align:top!important}
.dys-alert-table th{text-align:center!important}.dys-alert-table td:nth-child(1),.dys-alert-table td:nth-child(3),.dys-alert-table td:nth-child(4),.dys-alert-table td:nth-child(8){text-align:left!important}.dys-alert-table td:nth-child(2),.dys-alert-table td:nth-child(5),.dys-alert-table td:nth-child(6),.dys-alert-table td:nth-child(7),.dys-alert-table td:nth-child(9){text-align:center!important}
.dys-detail-cell{min-width:0!important;width:auto!important}.dys-gp-line{display:grid!important;grid-template-columns:minmax(120px,1fr) auto auto!important;gap:6px!important;align-items:center!important;padding:3px 5px!important;margin-bottom:3px!important;border:1px solid #d9e3ef!important;border-radius:6px!important;background:#f8fbff!important}.dys-gp-line b{color:#b42318!important;white-space:normal!important;overflow-wrap:anywhere!important}.dys-gp-line span{white-space:nowrap!important;font-size:10.5px!important;color:#334e68!important}.district-dys-card{grid-column:auto!important}
@media(max-width:1000px){.dys-gp-line{grid-template-columns:1fr!important}.dys-gp-line span{white-space:normal!important}}

/* ===== V30: MAIN ENGINEER DYSFUNCTIONAL TABLE - ALL COLUMNS FIT ===== */
.build-badge{
  position:absolute;right:14px;top:6px;z-index:20;
  padding:4px 9px;border-radius:999px;
  background:#0b4f9c;color:#fff;font-size:10px;font-weight:900;
}

.alert-table-wrap,
.table-wrap,
.dys-alert-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
}

.dys-alert-table{
  width:100%!important;
  min-width:1480px!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}

.dys-alert-table col.w-janpad{width:110px!important}
.dys-alert-table col.w-rank{width:48px!important}
.dys-alert-table col.w-engineer{width:150px!important}
.dys-alert-table col.w-cluster{width:140px!important}
.dys-alert-table col.w-total{width:62px!important}
.dys-alert-table col.w-progress{width:78px!important}
.dys-alert-table col.w-dys{width:86px!important}
.dys-alert-table col.w-gpdetail{width:400px!important}
.dys-alert-table col.w-ongoing{width:108px!important}
.dys-alert-table col.w-worksmr{width:108px!important}
.dys-alert-table col.w-labour{width:70px!important}
.dys-alert-table col.w-mrcov{width:82px!important}
.dys-alert-table col.w-official{width:100px!important}

.dys-alert-table th,
.dys-alert-table td{
  padding:6px 7px!important;
  font-size:11px!important;
  line-height:1.25!important;
  vertical-align:middle!important;
  box-sizing:border-box!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}

.dys-alert-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:3!important;
  text-align:center!important;
  font-weight:800!important;
  background:#cfe0f5!important;
}

.dys-alert-table td:nth-child(1),
.dys-alert-table td:nth-child(3),
.dys-alert-table td:nth-child(4),
.dys-alert-table td:nth-child(8){
  text-align:left!important;
}
.dys-alert-table td:nth-child(2),
.dys-alert-table td:nth-child(5),
.dys-alert-table td:nth-child(6),
.dys-alert-table td:nth-child(7),
.dys-alert-table td:nth-child(9),
.dys-alert-table td:nth-child(10),
.dys-alert-table td:nth-child(11),
.dys-alert-table td:nth-child(12),
.dys-alert-table td:nth-child(13){
  text-align:center!important;
}

.dys-alert-table .dys-detail-cell,
.dys-alert-table td:nth-child(8){
  min-width:0!important;
}

.dys-gp-line{
  display:grid!important;
  grid-template-columns:minmax(150px,1fr) 96px 92px!important;
  align-items:center!important;
  gap:8px!important;
  padding:4px 7px!important;
  margin:3px 0!important;
  border:1px solid #cddced!important;
  border-radius:7px!important;
  background:#f7fbff!important;
}
.dys-gp-line b{
  color:#b42318!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.dys-gp-line span{
  white-space:nowrap!important;
  text-align:right!important;
  color:#40536b!important;
  font-size:10.5px!important;
}

/* Keep numeric columns compact and prevent header overlap */
.dys-alert-table th:nth-child(5),
.dys-alert-table th:nth-child(6),
.dys-alert-table th:nth-child(7),
.dys-alert-table th:nth-child(9),
.dys-alert-table th:nth-child(10),
.dys-alert-table th:nth-child(11),
.dys-alert-table th:nth-child(12),
.dys-alert-table th:nth-child(13){
  white-space:normal!important;
  line-height:1.05!important;
}

/* On common laptop widths, allow horizontal scroll rather than squeezing columns */
@media(max-width:1600px){
  .dys-alert-table{min-width:1480px!important}
}
@media(max-width:1100px){
  .dys-alert-table{min-width:1450px!important}
  .dys-gp-line{grid-template-columns:1fr!important}
  .dys-gp-line span{text-align:left!important;white-space:normal!important}
}

/* ===== V31 FINAL: both alert tables readable, all dysfunctional columns visible ===== */
.alerts{display:grid!important;grid-template-columns:1fr!important;gap:16px!important}
.alert-card{width:100%!important;max-width:none!important;min-width:0!important}
.alert-table-wrap{width:100%!important;max-width:100%!important;overflow:auto!important}
.alert-low-card .alert-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.alert-low-card .alert-table th,.alert-low-card .alert-table td{padding:7px 9px!important;white-space:normal!important}
.alert-low-card .alert-table th:nth-child(1){width:18%!important}
.alert-low-card .alert-table th:nth-child(2){width:6%!important}
.alert-low-card .alert-table th:nth-child(3){width:21%!important}
.alert-low-card .alert-table th:nth-child(4){width:20%!important}
.alert-low-card .alert-table th:nth-child(5){width:11%!important}
.alert-low-card .alert-table th:nth-child(6){width:14%!important}
.alert-low-card .alert-table th:nth-child(7){width:10%!important}

.dys-alert-wrap{overflow-x:auto!important;overflow-y:auto!important;max-height:610px!important}
.dys-alert-table{width:100%!important;min-width:1680px!important;table-layout:fixed!important;border-collapse:collapse!important}
.dys-alert-table col.col-janpad{width:105px!important}
.dys-alert-table col.col-rank{width:50px!important}
.dys-alert-table col.col-engineer{width:165px!important}
.dys-alert-table col.col-cluster{width:145px!important}
.dys-alert-table col.col-total{width:65px!important}
.dys-alert-table col.col-progress{width:80px!important}
.dys-alert-table col.col-dys{width:70px!important}
.dys-alert-table col.col-detail{width:430px!important}
.dys-alert-table col.col-ongoing{width:105px!important}
.dys-alert-table col.col-worksmr{width:105px!important}
.dys-alert-table col.col-labour{width:70px!important}
.dys-alert-table col.col-mrcov{width:80px!important}
.dys-alert-table col.col-official{width:110px!important}
.dys-alert-table th,.dys-alert-table td{padding:6px 7px!important;font-size:11px!important;line-height:1.18!important;box-sizing:border-box!important;vertical-align:middle!important;white-space:normal!important;overflow-wrap:anywhere!important}
.dys-alert-table thead th{position:sticky!important;top:0!important;z-index:4!important;background:#cfe0f5!important;text-align:center!important;font-weight:800!important}
.dys-alert-table td:nth-child(1),.dys-alert-table td:nth-child(3),.dys-alert-table td:nth-child(4),.dys-alert-table td:nth-child(8){text-align:left!important}
.dys-alert-table td:nth-child(2),.dys-alert-table td:nth-child(5),.dys-alert-table td:nth-child(6),.dys-alert-table td:nth-child(7),.dys-alert-table td:nth-child(n+9){text-align:center!important}
.dys-detail-cell{padding:5px!important}
.dys-gp-line{display:grid!important;grid-template-columns:minmax(145px,1fr) 90px 82px!important;gap:7px!important;align-items:center!important;padding:4px 7px!important;margin:3px 0!important;border:1px solid #cfdbeb!important;border-radius:7px!important;background:#f8fbff!important}
.dys-gp-line b{color:#b42318!important;white-space:normal!important;overflow-wrap:anywhere!important}
.dys-gp-line span{white-space:nowrap!important;text-align:right!important;font-size:10.5px!important;color:#40536b!important}
@media(max-width:1700px){.dys-alert-table{min-width:1660px!important}}
@media(max-width:1100px){.dys-gp-line{grid-template-columns:1fr!important}.dys-gp-line span{text-align:left!important;white-space:normal!important}}

/* ===== V36: 8 JANPAD GOVERNMENT-STYLE PORTAL ===== */
.gov-top{background:#fff;border-bottom:4px solid #123f72;box-shadow:0 5px 22px #1434551a}
.gov-strip{min-height:42px;padding:8px max(20px,calc((100vw - 1650px)/2));background:#0b3159;color:#fff;display:flex;justify-content:space-between;align-items:center;gap:20px;font-size:13px}
.gov-strip div:first-child{display:flex;gap:12px;align-items:center}.gov-strip span{opacity:.85}.gov-right{font-weight:900;color:#ffc247;letter-spacing:.03em}
.gov-main{padding:20px max(20px,calc((100vw - 1650px)/2));display:grid;grid-template-columns:82px 1fr auto;gap:18px;align-items:center;background:linear-gradient(180deg,#fff,#f8fbff)}
.gov-mark{width:66px;height:66px;border-radius:16px;background:linear-gradient(135deg,#ffad24,#0d5ca8);color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:950;box-shadow:0 8px 20px #24517b28}
.gov-title .eyebrow{color:#a56300;opacity:1}.gov-title h1{margin:3px 0 4px;color:#103f73;font-size:30px}.gov-title p{margin:0;color:#64748b;font-weight:650}
.gov-main .datebox{color:#123f72}
.gov-main .datebox span{color:#6c7f94}
.build-badge{display:none!important}

.janpad-home{display:grid;gap:14px;margin:16px 0}
.janpad-home-head{background:#fff;border:1px solid #cbd9e8;border-radius:16px;padding:16px 18px;display:flex;justify-content:space-between;align-items:center;gap:16px;box-shadow:0 5px 18px #173a5f10}
.home-kicker{display:inline-block;color:#c47700;font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.janpad-home-head h2{margin:3px 0 4px;color:#0b3159;font-size:23px}.janpad-home-head p{margin:0;color:#64748b}
.all-janpad-btn{background:#f7ae24!important;border-color:#f7ae24!important;color:#13243a!important;padding:11px 18px!important}

.district-block{background:#fff;border:1px solid #cbd9e8;border-radius:16px;overflow:hidden;box-shadow:0 5px 18px #173a5f10}
.district-ribbon{padding:12px 16px;background:linear-gradient(90deg,#0b3159,#1766ad);color:#fff;display:flex;justify-content:space-between;align-items:center}
.district-ribbon div{display:flex;gap:10px;align-items:baseline}.district-ribbon b{font-size:17px}.district-ribbon span{font-size:11px;color:#ffd067;font-weight:900;letter-spacing:.09em}
.district-dot{display:flex!important;width:34px;height:34px;border-radius:50%;background:#f7ae24;color:#12233b!important;align-items:center;justify-content:center;font-size:15px!important}
.janpad-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:12px}
.janpad-cards.five{grid-template-columns:repeat(5,1fr)}
.janpad-card{min-width:0;padding:12px!important;display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;text-align:left;border:1px solid #d4e0ec!important;background:#fff!important;border-radius:12px!important;transition:.18s transform,.18s box-shadow,.18s border-color}
.janpad-card:hover,.janpad-card.active{transform:translateY(-2px);box-shadow:0 8px 20px #183c6220;border-color:#2c73b7!important;background:#f5faff!important}
.jp-icon{width:38px;height:38px;border-radius:10px;background:#eaf2fb;color:#0b4f8d;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:950}
.janpad-card b{display:block;color:#0c3157;font-size:13px}.janpad-card small{display:block;margin-top:3px;color:#708197;font-size:10px}.janpad-card em{font-style:normal;color:#a86100;font-size:10px;font-weight:900;white-space:nowrap}

.selected-janpad-banner{margin:12px 0;background:linear-gradient(95deg,#0a3767,#1269b3);border-radius:16px;padding:14px 18px;color:#fff;display:grid;grid-template-columns:48px 1fr auto;gap:14px;align-items:center;border-left:6px solid #f7ae24;box-shadow:0 6px 20px #173f6b24}
.selected-icon{width:42px;height:42px;border-radius:10px;background:#ffffff18;border:1px solid #ffffff35;display:flex;align-items:center;justify-content:center;font-size:20px}
.selected-janpad-banner span{color:#ffcc5c;font-size:10px;font-weight:950;letter-spacing:.14em}.selected-janpad-banner h2{margin:2px 0;font-size:21px}.selected-janpad-banner p{margin:0;color:#dbeaff;font-size:11px}
.selected-janpad-banner button{background:#f7ae24!important;border-color:#f7ae24!important;color:#142740!important}

.auto-card{border-left:5px solid #1b75bc!important}
.upload-card{border-left:5px solid #8097ae!important}
.source-links{border-radius:12px}
.kpis{grid-template-columns:repeat(7,minmax(120px,1fr))}
.kpi{border-top:3px solid #1b66a8}.kpi:nth-child(3){border-top-color:#c44536}.kpi:nth-child(5){border-top-color:#d18b00}

@media(max-width:1250px){
  .janpad-cards.five{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:900px){
  .gov-main{grid-template-columns:56px 1fr}.gov-main .datebox{grid-column:1/-1;text-align:left}.gov-mark{width:52px;height:52px}.gov-title h1{font-size:22px}
  .janpad-cards,.janpad-cards.five{grid-template-columns:1fr 1fr}
  .janpad-home-head{align-items:flex-start;flex-direction:column}
}
@media(max-width:620px){
  .gov-strip{align-items:flex-start;flex-direction:column}.gov-strip div:first-child{flex-direction:column;gap:3px}
  .janpad-cards,.janpad-cards.five{grid-template-columns:1fr}
  .selected-janpad-banner{grid-template-columns:42px 1fr}.selected-janpad-banner button{grid-column:1/-1}
}
@media print{
  .gov-strip,.janpad-home,.selected-janpad-banner{display:none!important}
  .gov-main{padding:8mm 4mm;box-shadow:none;border-bottom:1px solid #aaa}
}


/* ===== V37 DESIGN FIX ===== */
html,body{overflow-x:hidden}
body{line-height:1.45;background:linear-gradient(180deg,#eef4fa 0%,#f6f9fc 100%)}
.shell{max-width:1600px;margin:0 auto;padding:18px 20px 28px}
.gov-top{position:relative;overflow:hidden}
.gov-top:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 85% 10%,rgba(255,195,59,.18),transparent 28%),radial-gradient(circle at 10% 80%,rgba(17,109,186,.12),transparent 30%);pointer-events:none}
.gov-strip{font-size:14px;font-weight:700;padding-top:10px;padding-bottom:10px}
.gov-strip b{display:inline-block;margin-right:10px}
.gov-main{min-height:128px}
.gov-title .eyebrow{display:inline-block;background:#eff6ff;border:1px solid #d6e6f6;border-radius:999px;padding:5px 11px;font-size:11px;font-weight:900;letter-spacing:.18em;color:#174d82;margin-bottom:8px}
.gov-title h1{font-size:42px;line-height:1.14;font-weight:900;letter-spacing:-.02em}
.gov-title p{font-size:18px;line-height:1.35}
.datebox{display:flex;flex-direction:column;gap:4px;align-items:flex-end;background:#fff;border:1px solid #d8e3ef;border-radius:16px;padding:12px 16px;box-shadow:0 8px 22px rgba(14,52,88,.08)}
.datebox span{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.12em}
.datebox strong{font-size:24px;font-weight:900;color:#103f73}

.janpad-home{margin-top:8px}
.janpad-home-head{padding:20px 22px;border-radius:20px}
.janpad-home-head h2{font-size:34px;line-height:1.15;font-weight:900}
.janpad-home-head p{font-size:19px;line-height:1.45}
.home-kicker{font-size:12px}
.all-janpad-btn{font-size:16px!important;font-weight:900!important;border-radius:14px!important;box-shadow:0 10px 22px rgba(245,173,35,.24)}

.district-block{border-radius:20px;overflow:hidden}
.district-ribbon{padding:16px 18px;background:linear-gradient(90deg,#09335b 0%,#0f5ea5 100%)}
.district-ribbon b{font-size:22px;letter-spacing:.02em}
.district-ribbon span{font-size:12px}
.district-dot{width:44px;height:44px;font-size:18px!important;font-weight:900}
.janpad-cards{padding:16px;gap:14px}
.janpad-card{display:grid!important;grid-template-columns:56px minmax(0,1fr) auto!important;align-items:center!important;gap:14px!important;min-height:90px;padding:16px 18px!important;border-radius:18px!important;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;box-shadow:0 4px 14px rgba(20,56,92,.06)!important}
.janpad-card .jp-icon{width:48px;height:48px;border-radius:14px;font-size:20px;font-weight:900;background:linear-gradient(145deg,#e6f1ff,#d3e6ff);border:1px solid #bfd6f4;color:#0b4f8d;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}
.janpad-card .jp-meta{display:flex!important;flex-direction:column!important;gap:4px;min-width:0}
.janpad-card .jp-meta b{display:block;font-size:21px;line-height:1.1;color:#082e54;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.janpad-card .jp-meta small{display:block;font-size:13px;line-height:1.3;color:#667c92;white-space:normal}
.janpad-card .jp-open{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;background:#fff4da;color:#9b5f00;border:1px solid #f2d18d;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:900}
.janpad-card .jp-open:after{content:" →";font-size:13px}
.janpad-card:hover,.janpad-card.active{box-shadow:0 14px 28px rgba(17,72,123,.14)!important;border-color:#1d6fb8!important;transform:translateY(-3px)}

.selected-janpad-banner{padding:18px 20px;border-radius:20px;margin-top:14px}
.selected-janpad-banner h2{font-size:32px;line-height:1.15;font-weight:900}
.selected-janpad-banner p{font-size:15px}
.selected-janpad-banner button{font-size:15px!important;font-weight:900!important;border-radius:12px!important;box-shadow:0 8px 18px rgba(245,173,35,.22)}
.selected-icon{width:50px;height:50px;border-radius:14px}

.portal-quickstats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:14px 0 16px}
.quickstat{background:#fff;border:1px solid #d8e3ef;border-radius:18px;padding:16px 18px;box-shadow:0 6px 18px rgba(17,72,123,.08)}
.quickstat span{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:#6c8196;font-weight:800;margin-bottom:6px}
.quickstat b{display:block;font-size:22px;line-height:1.2;color:#0d406f}

.top-tabs{margin-top:14px;border-radius:16px;padding:10px;background:#fff;border:1px solid #d8e3ef;box-shadow:0 4px 14px rgba(17,72,123,.06)}
.top-tabs .tab{border-radius:12px!important;font-weight:800!important;font-size:14px!important}
.source-links,.upload-card,.filters,.report-card,.note,.auto-card,.alert-card,.report-head,.kpi{border-radius:18px!important}
.source-links,.upload-card,.filters,.report-card,.note,.auto-card,.alerts .alert-card{box-shadow:0 6px 18px rgba(17,72,123,.07)!important;border:1px solid #d8e3ef!important}
.upload-card{padding:18px 20px!important}
.upload-card h2{font-size:26px;font-weight:900;color:#0b3159;margin:0 0 6px}
.upload-card p{font-size:15px;margin:0;color:#61788d}
.filters{padding:14px;background:#fff}
.filters select,.filters button,.upload-card .actions button,.upload-card .actions .file-btn,.print-select{min-height:46px!important;border-radius:12px!important;font-size:15px!important;font-weight:700!important}
.kpis{margin-top:14px;gap:14px}
.kpi{padding:18px 20px!important;background:#fff!important}
.kpi .num{font-size:40px!important;line-height:1!important;font-weight:900!important}
.kpi .label{font-size:15px!important;font-weight:800!important}
.kpi .sub{font-size:13px!important}
.alerts{margin-top:16px;gap:16px!important}
.report-card{margin-top:18px;background:#fff}
.report-head{padding:18px 20px!important;border-bottom:1px solid #e4ebf3}
.report-head h2{font-size:26px!important;font-weight:900!important;color:#0b3159}
.report-head p{font-size:14px!important}
.table-wrap{padding:0!important}
#reportTable th{position:sticky;top:0;z-index:2;background:#cfe0f5!important}
#reportTable th,#reportTable td{font-size:13px!important;padding:10px 9px!important}
.note{padding:16px 18px;background:#fff;font-size:14px;line-height:1.6}
footer{margin-top:24px;padding:18px 20px;text-align:center;background:#0b3159;color:#fff;font-weight:800}

@media (max-width: 1400px){
  .janpad-cards.five{grid-template-columns:repeat(3,1fr)}
  .gov-title h1{font-size:34px}
}
@media (max-width: 1100px){
  .portal-quickstats{grid-template-columns:repeat(2,1fr)}
  .janpad-card .jp-meta b{font-size:18px}
  .selected-janpad-banner h2{font-size:26px}
}
@media (max-width: 760px){
  .shell{padding:12px}
  .gov-main{grid-template-columns:56px 1fr;gap:12px}
  .gov-title h1{font-size:26px}
  .gov-title p{font-size:15px}
  .datebox{grid-column:1/-1;align-items:flex-start}
  .janpad-home-head h2{font-size:26px}
  .portal-quickstats{grid-template-columns:1fr}
  .janpad-cards,.janpad-cards.five{grid-template-columns:1fr}
  .janpad-card{grid-template-columns:48px minmax(0,1fr)!important}
  .janpad-card .jp-open{grid-column:1/-1;justify-self:start}
  .selected-janpad-banner{grid-template-columns:44px 1fr}
  .selected-janpad-banner button{grid-column:1/-1;justify-self:start}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ===== V38 PREMIUM COLLECTOR REVIEW THEME ===== */
:root{
  --mp-navy:#082f57;
  --mp-blue:#0f5fa8;
  --mp-gold:#f3ad2b;
  --mp-green:#176a52;
  --mp-purple:#6949a3;
}
.premium-hero{
  margin:18px 0 16px;
  border-radius:24px;
  padding:28px 30px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  align-items:center;
  color:#fff;
  background:
    radial-gradient(circle at 88% 20%,rgba(255,196,73,.24),transparent 30%),
    linear-gradient(125deg,#082f57 0%,#0d4f8b 55%,#126cb4 100%);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 18px 38px rgba(6,44,83,.22);
  overflow:hidden;
  position:relative;
}
.premium-hero:after{
  content:"";
  position:absolute;right:-80px;bottom:-100px;width:280px;height:280px;
  border:34px solid rgba(255,255,255,.05);border-radius:50%;
}
.hero-left,.hero-side{position:relative;z-index:1}
.hero-badges{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.hero-badge{display:inline-flex;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:900;letter-spacing:.08em}
.hero-badge.gold{background:#ffcf67;color:#653d00}
.hero-badge.blue{background:#dceeff;color:#0a4b82}
.premium-hero h2{margin:0 0 8px;font-size:38px;line-height:1.1;font-weight:950;letter-spacing:-.02em}
.premium-hero p{margin:0;color:#d7e9fa;font-size:16px;font-weight:650}
.hero-actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}
.hero-actions button{min-height:44px;border-radius:12px;padding:0 16px;font-size:14px;font-weight:900;cursor:pointer}
.hero-primary{background:#f3ad2b;color:#17273a;border:1px solid #f3ad2b}
.hero-secondary{background:rgba(255,255,255,.1);color:#fff;border:1px solid rgba(255,255,255,.3)}
.hero-side{display:flex;gap:14px;align-items:center}
.hero-seal{width:136px;height:136px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:3px solid #f5c75e;outline:5px solid rgba(255,255,255,.08);background:rgba(4,36,67,.56)}
.hero-seal strong{font-size:27px;letter-spacing:.06em}
.hero-seal span{font-size:10px;font-weight:900;letter-spacing:.1em;color:#ffd66f}
.hero-update{min-width:126px;padding:14px 16px;border-radius:16px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18)}
.hero-update span{display:block;color:#ffd66f;font-size:10px;font-weight:900;letter-spacing:.11em;margin-bottom:7px}
.hero-update b{display:block;font-size:18px;line-height:1.35}

.district-theme-maihar .district-ribbon{background:linear-gradient(90deg,#4b2d76,#6b4ca1)!important}
.district-theme-maihar .jp-icon{color:#5a3d8d!important;background:linear-gradient(145deg,#f1ecfa,#e5daf7)!important;border-color:#d0bfe9!important}
.district-theme-maihar .janpad-card:hover,.district-theme-maihar .janpad-card.active{border-color:#6b4ca1!important}
.district-theme-satna .district-ribbon{background:linear-gradient(90deg,#0c4f72,#0f7b77)!important}
.district-theme-satna .jp-icon{color:#0e6864!important;background:linear-gradient(145deg,#e6f7f5,#d7efed)!important;border-color:#b9dfdc!important}
.district-theme-satna .janpad-card:hover,.district-theme-satna .janpad-card.active{border-color:#0f7b77!important}

body[data-district="MAIHAR"] .selected-janpad-banner{background:linear-gradient(95deg,#4b2d76,#7456aa)!important;border-left-color:#f3ad2b!important}
body[data-district="SATNA"] .selected-janpad-banner{background:linear-gradient(95deg,#0b486a,#0d7774)!important;border-left-color:#f3ad2b!important}

.collector-review{
  margin:14px 0;
  background:linear-gradient(180deg,#fffdf8,#fff);
  border:1px solid #ead7a5;
  border-left:6px solid #f0ad24;
  border-radius:18px;
  padding:14px 16px;
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  box-shadow:0 7px 18px rgba(92,66,17,.08)
}
.collector-title{display:flex;gap:12px;align-items:center}
.collector-icon{width:42px;height:42px;border-radius:12px;background:#fff0c8;color:#996000;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:900}
.collector-title b{display:block;color:#603f00;font-size:17px}
.collector-title small{display:block;margin-top:2px;color:#7b6e54;font-size:11px}
.collector-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.collector-actions button{min-height:38px;padding:0 12px;border-radius:10px;border:1px solid #d7c38e;background:#fff;color:#6e4e06;font-size:12px;font-weight:850;cursor:pointer}
.collector-actions button:hover{background:#fff4d7;border-color:#e0aa32}

body[data-district="MAIHAR"] .quickstat:first-child{border-top:4px solid #6b4ca1}
body[data-district="SATNA"] .quickstat:first-child{border-top:4px solid #0f7b77}
body[data-district="ALL"] .quickstat:first-child{border-top:4px solid #0f5fa8}

@media(max-width:1000px){
  .premium-hero{grid-template-columns:1fr}
  .hero-side{justify-content:flex-start}
  .collector-review{align-items:flex-start;flex-direction:column}
  .collector-actions{justify-content:flex-start}
}
@media(max-width:640px){
  .premium-hero{padding:22px 18px}
  .premium-hero h2{font-size:28px}
  .hero-side{flex-wrap:wrap}
  .hero-seal{width:110px;height:110px}
  .collector-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
}

/* ===== V39 LOGIN + COMPACT MAIN PAGE ===== */
.login-screen{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:22px;background:radial-gradient(circle at 15% 10%,rgba(38,114,181,.26),transparent 35%),linear-gradient(135deg,#061b32 0%,#0b3e6d 55%,#1267aa 100%)}
.login-screen.hidden{display:none!important}
.login-shell{width:min(960px,96vw);display:grid;grid-template-columns:1.15fr .85fr;overflow:hidden;border-radius:26px;background:#fff;box-shadow:0 28px 70px rgba(0,0,0,.32);border:1px solid rgba(255,255,255,.3)}
.login-brand{padding:46px 42px;color:#fff;background:linear-gradient(145deg,#082f57,#0d5e9f);display:flex;gap:22px;align-items:flex-start;min-height:390px}
.login-emblem{width:78px;height:78px;flex:0 0 78px;border-radius:22px;display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,#ffca59,#f3a71e);color:#16324b;font-size:25px;font-weight:950;box-shadow:0 12px 28px rgba(0,0,0,.16)}
.login-kicker{font-size:12px;font-weight:850;letter-spacing:.04em;color:#dbeeff}
.login-brand h1{font-size:34px;line-height:1.15;margin:16px 0 10px;font-weight:950;letter-spacing:-.02em}
.login-brand p{margin:0;color:#d9e9f8;font-size:15px;line-height:1.5}
.login-card{padding:38px 34px;display:flex;flex-direction:column;justify-content:center;background:#fff}
.login-card-head{display:flex;gap:12px;align-items:center;margin-bottom:22px}.login-lock{width:44px;height:44px;border-radius:13px;background:#eaf3fc;display:flex;align-items:center;justify-content:center;font-size:20px}
.login-card h2{margin:0;color:#0a365f;font-size:24px}.login-card-head p{margin:3px 0 0;color:#718398;font-size:12px}
.login-card label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:850;color:#405970;margin-bottom:14px}.login-card input{height:48px;border:1px solid #cddbe8;border-radius:12px;padding:0 13px;font:inherit;font-size:15px;outline:none;background:#f9fbfd}.login-card input:focus{border-color:#2475b9;box-shadow:0 0 0 3px rgba(36,117,185,.12);background:#fff}
.login-card button{height:50px;border:0;border-radius:12px;background:linear-gradient(90deg,#0b4f8e,#126cb4);color:#fff;font-size:15px;font-weight:900;cursor:pointer;box-shadow:0 8px 18px rgba(15,92,158,.22)}
.login-error{display:none;margin:-3px 0 12px;padding:9px 10px;border-radius:9px;background:#fff0ef;color:#b3261e;font-size:12px;font-weight:800}.login-error.show{display:block}.login-help{text-align:center;margin-top:12px;color:#8a99a8;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.login-locked{overflow:hidden!important}.header-side{display:flex;flex-direction:column;gap:7px;align-items:flex-end}.logout-btn{border:1px solid #cbd8e5;background:#fff;color:#174b78;border-radius:9px;padding:7px 12px;font-size:11px;font-weight:850;cursor:pointer}

/* Main page font sizes reduced */
.gov-title h1{font-size:31px!important;line-height:1.16!important}
.gov-title p{font-size:14px!important}
.gov-title .eyebrow{font-size:10px!important;padding:4px 9px!important;margin-bottom:6px!important}
.gov-main{min-height:105px!important;padding-top:14px!important;padding-bottom:14px!important}
.gov-mark{width:56px!important;height:56px!important;font-size:20px!important}
.datebox{padding:9px 12px!important}.datebox strong{font-size:18px!important}.datebox span{font-size:9px!important}
.premium-hero{padding:20px 22px!important;border-radius:20px!important}
.premium-hero h2{font-size:29px!important}.premium-hero p{font-size:13px!important}.hero-badge{font-size:9px!important;padding:5px 8px!important}.hero-seal{width:108px!important;height:108px!important}.hero-seal strong{font-size:22px!important}.hero-update b{font-size:15px!important}
.janpad-home-head{padding:15px 17px!important}.janpad-home-head h2{font-size:25px!important;margin:2px 0 4px!important}.janpad-home-head p{font-size:14px!important}.home-kicker{font-size:9px!important}
.district-ribbon{padding:11px 14px!important}.district-ribbon b{font-size:16px!important}.district-ribbon span{font-size:9px!important}.district-dot{width:34px!important;height:34px!important;font-size:13px!important}
.janpad-cards{padding:11px!important;gap:9px!important}.janpad-card{min-height:72px!important;padding:11px 12px!important;grid-template-columns:43px minmax(0,1fr) auto!important;gap:9px!important;border-radius:13px!important}.janpad-card .jp-icon{width:40px!important;height:40px!important;font-size:16px!important}.janpad-card .jp-meta b{font-size:15px!important}.janpad-card .jp-meta small{font-size:10px!important}.janpad-card .jp-open{font-size:9px!important;padding:6px 9px!important}
.selected-janpad-banner{padding:13px 15px!important;border-radius:15px!important}.selected-janpad-banner h2{font-size:21px!important}.selected-janpad-banner p{font-size:10px!important}.selected-janpad-banner span{font-size:8px!important}.selected-icon{width:40px!important;height:40px!important}.selected-janpad-banner button{font-size:11px!important}
.collector-title b{font-size:14px!important}.collector-title small{font-size:9px!important}.collector-actions button{font-size:10px!important;min-height:34px!important}
.upload-card h2{font-size:20px!important}.upload-card p{font-size:12px!important}.top-tabs .tab{font-size:11px!important}.filters select,.filters button,.upload-card .actions button,.upload-card .actions .file-btn,.print-select{min-height:39px!important;font-size:12px!important}
.kpi .num{font-size:31px!important}.kpi .label{font-size:12px!important}.kpi .sub{font-size:10px!important}.report-head h2{font-size:21px!important}.report-head p{font-size:11px!important}

@media(max-width:760px){.login-shell{grid-template-columns:1fr}.login-brand{min-height:auto;padding:26px 22px}.login-card{padding:28px 22px}.login-brand h1{font-size:25px}.gov-title h1{font-size:24px!important}.premium-hero h2{font-size:23px!important}}

/* ===== V40 CHANGE PASSWORD ===== */
.account-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.change-pass-btn,.logout-btn{min-height:38px;padding:0 12px;border-radius:10px;font-size:12px;font-weight:850;cursor:pointer}
.change-pass-btn{background:#fff7df;color:#785000;border:1px solid #e7c36b}
.change-pass-btn:hover{background:#ffefbd}
.password-modal{position:fixed;inset:0;z-index:99999;background:rgba(4,22,42,.62);display:flex;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(5px)}
.password-modal.hidden{display:none!important}
.password-dialog{width:min(460px,100%);background:#fff;border:1px solid #d7e2ee;border-radius:20px;box-shadow:0 28px 70px rgba(0,27,54,.32);overflow:hidden}
.password-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:18px 20px;background:linear-gradient(120deg,#0a3159,#0f5fa8);color:#fff}
.password-dialog-head span{font-size:10px;font-weight:900;letter-spacing:.15em;color:#ffd16c}.password-dialog-head h2{margin:3px 0 0;font-size:23px}
.password-close{width:34px;height:34px;border-radius:10px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.1);color:#fff;font-size:24px;line-height:1;cursor:pointer}
.password-dialog-body{padding:20px}.password-dialog-body label{display:block;margin-bottom:13px;font-size:12px;font-weight:850;color:#40566d}
.password-dialog-body input{display:block;width:100%;margin-top:6px;min-height:45px;border:1px solid #cddbea;border-radius:11px;padding:0 12px;font:inherit;color:#17324c;outline:none}
.password-dialog-body input:focus{border-color:#2674b8;box-shadow:0 0 0 3px rgba(38,116,184,.12)}
.password-dialog-actions{display:flex;gap:9px;margin-top:15px}.password-dialog-actions button{min-height:42px;border-radius:10px;padding:0 14px;font-size:13px;font-weight:850;cursor:pointer;border:1px solid #cbd8e5;background:#fff;color:#38516b}
.password-dialog-actions .save-password-btn{background:#0f5fa8;color:#fff;border-color:#0f5fa8}
.password-message{min-height:20px;font-size:12px;font-weight:800}.password-message.error{color:#b42318}.password-message.success{color:#147a4b}
.password-note{margin:14px 0 0;padding:10px 11px;border-radius:10px;background:#f5f8fc;color:#65788b;font-size:11px;line-height:1.5}
@media(max-width:700px){.header-side{align-items:flex-start!important}.account-actions{justify-content:flex-start}.password-dialog-actions{flex-direction:column}.password-dialog-actions button{width:100%}}

/* ===== V41: Screen-2 Controls + Designed PPT Export ===== */
.screen-tools{
  margin:14px 0;
  padding:14px 16px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  border:1px solid #d6e2f0;
  border-left:6px solid #1557b0;
  border-radius:18px;
  box-shadow:0 6px 18px rgba(17,72,123,.07);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.screen-title{display:flex;align-items:center;gap:12px;min-width:280px}
.screen-pill{
  display:inline-flex;align-items:center;justify-content:center;
  padding:6px 10px;border-radius:999px;
  background:#e8f2ff;color:#0b4f8d;
  font-size:11px;font-weight:950;letter-spacing:.05em;
  white-space:nowrap;
}
.screen-title b{display:block;font-size:16px;color:#0b3159}
.screen-title small{display:block;color:#64748b;font-size:11px;margin-top:2px}
.screen-buttons{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.screen-buttons button,.ppt-btn,.ppt-export-btn,.ppt-select{
  min-height:40px;border-radius:11px;border:1px solid #c7d8eb;
  background:#fff;color:#0b3159;font-size:13px;font-weight:850;
  padding:0 12px;cursor:pointer;
}
.screen-buttons button:hover{background:#eef6ff;border-color:#72a5dd}
.ppt-btn,.ppt-export-btn{
  background:linear-gradient(135deg,#f7ae24,#ffd36a)!important;
  color:#172334!important;border-color:#f0a91c!important;
  box-shadow:0 6px 14px rgba(245,173,35,.2);
}
.ppt-btn:before,.ppt-export-btn:before{content:'▣ ';font-weight:900}
.ppt-select{
  background:#fff8e8!important;border-color:#f2d28e!important;color:#7a4a00!important;
}
@media(max-width:900px){
  .screen-tools{align-items:flex-start;flex-direction:column}
  .screen-buttons{justify-content:flex-start}
}
@media print{
  .screen-tools{display:none!important}
}

/* V42 local PPT engine status */
.ppt-ready-note{display:inline-flex;align-items:center;min-height:40px;padding:0 10px;border-radius:10px;background:#edf9f2;border:1px solid #b9e4c8;color:#176a43;font-size:11px;font-weight:850;white-space:nowrap}
@media(max-width:900px){.ppt-ready-note{width:auto}}

/* V43 PPT hint */
.ppt-ready-note{max-width:260px;white-space:normal;line-height:1.2}

/* ==========================================================
   V44 FINAL COMPACT TABLE + BORDER + PRINT FIX
   ========================================================== */

/* Screen-2 / premium hero compact */
.premium-hero{
  min-height:0!important;
  margin:10px 0 10px!important;
  padding:16px 20px!important;
  border-radius:18px!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:16px!important;
}
.premium-hero h2{font-size:27px!important;line-height:1.08!important;margin:0 0 5px!important}
.premium-hero p{font-size:13px!important;line-height:1.25!important}
.hero-badges{margin-bottom:7px!important}
.hero-badge{font-size:9px!important;padding:4px 8px!important}
.hero-actions{margin-top:10px!important;gap:8px!important}
.hero-actions button{min-height:36px!important;padding:0 12px!important;font-size:12px!important}
.hero-side{gap:10px!important}
.hero-seal{width:92px!important;height:92px!important;outline-width:3px!important;border-width:2px!important}
.hero-seal strong{font-size:20px!important}
.hero-seal span{font-size:8px!important}
.hero-update{min-width:112px!important;padding:10px 12px!important;border-radius:13px!important}
.hero-update span{font-size:8px!important;margin-bottom:4px!important}
.hero-update b{font-size:14px!important;line-height:1.3!important}

/* ALL REPORT TABLES: visible borders and compact columns */
.report-card,.alert-card{overflow:hidden!important;border:1px solid #7f9fbe!important}
.table-wrap,.alert-table-wrap{
  overflow:auto!important;
  scrollbar-width:thin;
}
#reportTable,
.report-table,
.alert-table{
  border-collapse:collapse!important;
  border-spacing:0!important;
  border:1.2px solid #50789f!important;
  background:#fff!important;
}
#reportTable th,#reportTable td,
.report-table th,.report-table td,
.alert-table th,.alert-table td{
  border:1px solid #8ba7c3!important;
  padding:5px 6px!important;
  font-size:calc(10.5px * var(--table-font-scale))!important;
  line-height:1.15!important;
  vertical-align:middle!important;
  box-sizing:border-box!important;
}
#reportTable th,.report-table th,.alert-table th{
  background:#d5e5f6!important;
  color:#07325e!important;
  font-weight:900!important;
  text-align:center!important;
}
#reportTable td,.report-table td,.alert-table td{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
#reportTable tbody tr:nth-child(even) td,.report-table tbody tr:nth-child(even) td,.alert-table tbody tr:nth-child(even) td{
  background:#f5f9fd;
}

/* Main reports should fit the viewport better */
.report-table{width:100%!important;max-width:none!important}
body[data-report-view="engineer"] .report-table{min-width:1180px!important;table-layout:fixed!important}
body[data-report-view="district"] .report-table{min-width:1050px!important;table-layout:fixed!important}
body[data-report-view="gp"] .report-table{min-width:1180px!important;table-layout:fixed!important}
body[data-report-view="priority"] .report-table{min-width:1120px!important;table-layout:fixed!important}
body[data-report-view="dysfunctional"] .report-table{min-width:1280px!important;table-layout:fixed!important}
body[data-report-view="category"] .report-table{min-width:1050px!important;table-layout:fixed!important}
body[data-report-view="expbucket"] .report-table{min-width:1050px!important;table-layout:fixed!important}
body[data-report-view="ongoingall"] .report-table{min-width:1180px!important;table-layout:fixed!important}
body[data-report-view="ongoingdetails"] .report-table{min-width:1320px!important;table-layout:fixed!important}

/* Official grouped Screen-2 report: smaller without losing headings */
body[data-report-view="official"] .official-grid{
  width:100%!important;
  min-width:1560px!important;
  table-layout:fixed!important;
}
body[data-report-view="official"] .official-grid th,
body[data-report-view="official"] .official-grid td{
  font-size:calc(9.3px * var(--table-font-scale))!important;
  padding:4px 4px!important;
}
body[data-report-view="official"] .official-grid th{
  line-height:1.05!important;
}

/* Lowest MR Coverage table - stop huge empty columns */
.alert-low-card .alert-table{
  width:100%!important;
  min-width:860px!important;
  table-layout:fixed!important;
}
.alert-low-card .alert-table th:nth-child(1),
.alert-low-card .alert-table td:nth-child(1){width:16%!important}
.alert-low-card .alert-table th:nth-child(2),
.alert-low-card .alert-table td:nth-child(2){width:6%!important}
.alert-low-card .alert-table th:nth-child(3),
.alert-low-card .alert-table td:nth-child(3){width:20%!important}
.alert-low-card .alert-table th:nth-child(4),
.alert-low-card .alert-table td:nth-child(4){width:20%!important}
.alert-low-card .alert-table th:nth-child(5),
.alert-low-card .alert-table td:nth-child(5){width:11%!important}
.alert-low-card .alert-table th:nth-child(6),
.alert-low-card .alert-table td:nth-child(6){width:15%!important}
.alert-low-card .alert-table th:nth-child(7),
.alert-low-card .alert-table td:nth-child(7){width:12%!important}

/* Alert blocks smaller on normal screen */
.alert-head{padding:10px 14px!important}
.alert-head h3{font-size:16px!important;margin:0 0 2px!important}
.alert-head p{font-size:11px!important;margin:0!important}
.alert-icon{width:34px!important;height:34px!important;font-size:16px!important}
.alert-table-wrap{max-height:390px!important}
.dys-alert-wrap{max-height:430px!important}

/* Dysfunctional GP detail compact but readable */
.dys-alert-table{min-width:1250px!important;width:100%!important;table-layout:fixed!important}
.dys-alert-table th,.dys-alert-table td{font-size:9.6px!important;padding:4px 4px!important}
.dys-gp-item{padding:2px 4px!important;gap:4px!important;font-size:9.2px!important}
.dys-gp-item span{font-size:8.8px!important}

/* Strong table outer frame */
.report-card .table-wrap{border-top:1px solid #6d8eaf!important}
.report-table thead th{border-bottom:1.4px solid #456b91!important}
.report-table tbody tr:last-child td{border-bottom:1.4px solid #456b91!important}
.report-table th:first-child,.report-table td:first-child{border-left:1.4px solid #456b91!important}
.report-table th:last-child,.report-table td:last-child{border-right:1.4px solid #456b91!important}

/* PRINT: hide dashboard decoration, print only useful report content */
@media print{
  @page{size:A4 landscape;margin:5mm!important}

  html,body{
    width:100%!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    overflow:visible!important;
  }

  .gov-strip,.premium-hero,.janpad-home,.selected-janpad-banner,
  .portal-quickstats,.collector-review,.top-tabs,.source-links,
  .upload-card,.filters,.screen-tools,.auto-card,.alerts,.kpis,.note,
  footer,.account-actions,.no-print{
    display:none!important;
  }

  .gov-top{
    display:block!important;
    box-shadow:none!important;
    border:0!important;
    margin:0 0 2mm!important;
  }
  .gov-main{
    min-height:0!important;
    display:flex!important;
    padding:1.5mm 2mm!important;
    border-bottom:1px solid #607d9a!important;
    gap:3mm!important;
  }
  .gov-mark{width:8mm!important;height:8mm!important;border-radius:2mm!important;font-size:8pt!important}
  .gov-title .eyebrow{display:none!important}
  .gov-title h1{font-size:11pt!important;line-height:1.05!important;margin:0!important}
  .gov-title p{font-size:6.5pt!important;margin:.6mm 0 0!important}
  .header-side,.datebox{margin-left:auto!important}
  .datebox{padding:1mm 2mm!important;border:0!important;box-shadow:none!important}
  .datebox span{font-size:5.5pt!important}
  .datebox strong{font-size:8pt!important}

  .shell{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
  }
  .report-card{
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #42678e!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  .report-head{
    padding:1.5mm 2mm!important;
    border-bottom:1px solid #42678e!important;
  }
  .report-head h2{font-size:10pt!important;line-height:1.05!important;margin:0!important}
  .report-head p{font-size:5.5pt!important;margin:.5mm 0 0!important}
  .legend{font-size:5.5pt!important}

  .table-wrap{
    overflow:visible!important;
    width:100%!important;
    max-width:none!important;
  }

  #reportTable,.report-table,
  body[data-report-view] .report-table,
  body[data-report-view="official"] .official-grid,
  body[data-report-view="ongoingdetails"] .ongoing-detail-grid,
  .dysfunctional-grid,.engineer-grid,.district-grid,.gp-grid,.priority-grid,
  .category-grid,.expbucket-grid,.ongoing-summary-grid{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    border-collapse:collapse!important;
    border:1px solid #345b82!important;
  }

  #reportTable th,#reportTable td,
  .report-table th,.report-table td{
    border:0.45pt solid #597b9d!important;
    padding:1.1px 1.3px!important;
    font-size:5.15pt!important;
    line-height:1.04!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    color:#101d2c!important;
    background:#fff!important;
  }
  #reportTable th,.report-table th{
    background:#d6e5f5!important;
    color:#062d55!important;
    font-weight:900!important;
  }

  body[data-report-view="official"] .official-grid th,
  body[data-report-view="official"] .official-grid td{
    font-size:4.55pt!important;
    padding:.8px 1px!important;
    line-height:1!important;
  }
  body[data-report-view="ongoingdetails"] .ongoing-detail-grid th,
  body[data-report-view="ongoingdetails"] .ongoing-detail-grid td{
    font-size:4.45pt!important;
    padding:.75px .9px!important;
  }
  body[data-report-view="dysfunctional"] .report-table th,
  body[data-report-view="dysfunctional"] .report-table td{
    font-size:4.35pt!important;
    padding:.7px .9px!important;
  }
  body[data-report-view="dysfunctional"] .dys-gp-item{
    border:.35pt solid #8da4bb!important;
    padding:.5px 1px!important;
    margin:.4px 0!important;
    font-size:3.9pt!important;
  }

  thead{display:table-header-group!important}
  tfoot{display:table-footer-group!important}
  tr{break-inside:avoid!important;page-break-inside:avoid!important}
  .report-table tbody tr:nth-child(even) td{background:#f7f9fc!important}

  /* remove browser-scroll dimensions from printed table */
  .dys-detail-cell{min-width:0!important;max-width:none!important}
}

/* Laptop: compact visual spacing */
@media(max-width:1500px){
  #reportTable th,#reportTable td,.alert-table th,.alert-table td{
    font-size:9.6px!important;
    padding:4px 4px!important;
  }
  .premium-hero h2{font-size:24px!important}
}
@media(max-width:900px){
  .premium-hero{grid-template-columns:1fr!important}
  .hero-side{display:none!important}
}

/* V53 clean monitoring UI */
.ui-retired,.hidden-maintenance{display:none!important}
.clean-tabs{margin-top:14px;gap:8px;flex-wrap:wrap}
.clean-tabs .tab{font-weight:800;padding:11px 18px}
.clean-tabs .emuster-tab{border-color:#d6ad00}
.compact-controls{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;background:#fff;border:1px solid #d8e2ee;border-radius:16px;padding:10px 12px;margin:10px 0 14px;box-shadow:0 8px 22px rgba(28,55,90,.06)}
.compact-filters{margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.compact-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.compact-actions button,.compact-actions select{min-height:38px}
.clean-report-card{margin-top:0}
.emuster-grid{min-width:1320px}
.emuster-grid th,.emuster-grid td{text-align:center;vertical-align:middle}
.emuster-grid .emuster-title-row th{background:#fff600!important;color:#080808!important;font-size:20px!important;font-weight:900!important;letter-spacing:.2px;border-color:#3d3d3d!important;padding:8px 6px!important}
.emuster-grid .emuster-group-row th{background:#cfe3ff!important;color:#061c35!important;font-weight:900!important}
.emuster-grid thead tr:nth-child(3) th{background:#eef5ff!important;color:#111!important}
.emuster-grid td{font-weight:650}
.emuster-grid .pct-cell{font-weight:900}
.emuster-grid .pct-bad{color:#d71920;background:#fff0f0}
@media(max-width:900px){.compact-controls{align-items:stretch}.compact-actions{width:100%}.compact-actions button{flex:1}.emuster-grid .emuster-title-row th{font-size:16px!important}}

/* V56 Ek Bagiya ongoing dashboard */
.ekbagiya-tab{font-weight:900}.report-table.ekbagiya-grid{min-width:1540px}.report-table.ekbagiya-grid th:nth-child(-n+4),.report-table.ekbagiya-grid td:nth-child(-n+4){text-align:left}.report-table.ekbagiya-grid td:nth-child(5),.report-table.ekbagiya-grid td:nth-child(6){font-weight:850}.report-table.ekbagiya-grid td:nth-child(7){font-weight:850;color:#a13a29}.report-table.ekbagiya-grid td:nth-child(18){font-weight:900;color:#0d5e46}@media print{.report-table.ekbagiya-grid{min-width:0!important;table-layout:fixed}.report-table.ekbagiya-grid th,.report-table.ekbagiya-grid td{font-size:calc(6.2px * var(--table-font-scale));padding:1.8px;white-space:normal;word-break:break-word}}

/* MIS 6.12 compact 18-column work detail layout */
body[data-report-view="categoryworks"] .ongoing-detail-grid{min-width:1450px!important;table-layout:fixed!important}
body[data-report-view="categoryworks"] .ongoing-detail-grid th,body[data-report-view="categoryworks"] .ongoing-detail-grid td{padding:3px 3px!important;font-size:calc(9.4px * var(--table-font-scale));line-height:1.12;white-space:normal;overflow-wrap:anywhere}
body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(1){width:38px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(2){width:88px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(3){width:125px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(4){width:66px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(5){width:82px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(6){width:105px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(7){width:95px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(8){width:100px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(9){width:66px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(10){width:135px;font-family:Consolas,monospace}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(11){width:225px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(n+12):nth-child(-n+15){width:82px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(16){width:52px}body[data-report-view="categoryworks"] .ongoing-detail-grid :is(th,td):nth-child(n+17){width:76px}

/* Category x Sub Engineer: compact 20px table and deficiency alerts */
.report-table.category-subeng-grid{min-width:1860px;width:max-content;table-layout:fixed}.report-table.category-subeng-grid th,.report-table.category-subeng-grid td{font-size:20px!important;line-height:1.16;padding:4px 5px;white-space:normal;overflow-wrap:anywhere}.report-table.category-subeng-grid :is(th,td):nth-child(1){width:150px;text-align:left}.report-table.category-subeng-grid :is(th,td):nth-child(2){width:78px}.report-table.category-subeng-grid :is(th,td):nth-child(3){width:105px;text-align:left}.report-table.category-subeng-grid :is(th,td):nth-child(4){width:150px;text-align:left}.report-table.category-subeng-grid :is(th,td):nth-child(5){width:125px;text-align:left}.report-table.category-subeng-grid :is(th,td):nth-child(6){width:58px}.report-table.category-subeng-grid :is(th,td):nth-child(7),.report-table.category-subeng-grid :is(th,td):nth-child(8){width:102px}.report-table.category-subeng-grid :is(th,td):nth-child(n+9):nth-child(-n+14){width:62px}.report-table.category-subeng-grid :is(th,td):nth-child(n+15):nth-child(-n+17){width:100px}.report-table.category-subeng-grid :is(th,td):nth-child(18){width:72px}.report-table.category-subeng-grid .exp-pct-chip{font-size:18px}
.report-deficiency-alert{margin:10px 12px;padding:12px;border:2px solid #dc2626;border-radius:12px;background:#fff7ed;color:#7f1d1d;font-size:20px;line-height:1.3}.report-deficiency-alert[hidden]{display:none}.deficiency-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.deficiency-summary strong{color:#b91c1c}.deficiency-summary span{padding:4px 9px;border:1px solid #fecaca;border-radius:999px;background:#fff}.deficiency-locations{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.deficiency-location{display:flex;flex-direction:column;padding:5px 8px;border-radius:8px;background:#fee2e2;border:1px solid #fca5a5}.deficiency-location small{font-size:16px;color:#991b1b}.deficiency-more{padding:6px 8px;font-weight:800}.category-subeng-grid tr.deficiency-critical td{background:#fff1f2}.category-subeng-grid tr.deficiency-warning td{background:#fffbeb}.category-subeng-grid td.deficiency-cell{background:#fecaca!important;color:#991b1b!important;font-weight:950}
@media print{body[data-report-view="categorysubeng"] .report-head h2{font-size:24px!important}body[data-report-view="categorysubeng"] .report-head p{font-size:18px!important}body[data-report-view="categorysubeng"] .report-deficiency-alert{font-size:20px!important;margin:4px 0 7px;padding:7px;break-inside:avoid}body[data-report-view="categorysubeng"] .deficiency-location small{font-size:16px!important}body[data-report-view="categorysubeng"] .report-table.category-subeng-grid{min-width:1860px!important;width:1860px!important;table-layout:fixed!important}body[data-report-view="categorysubeng"] .report-table.category-subeng-grid th,body[data-report-view="categorysubeng"] .report-table.category-subeng-grid td{font-size:20px!important;line-height:1.15!important;padding:3px 4px!important;white-space:normal!important;overflow-wrap:anywhere}body[data-report-view="categorysubeng"] .table-wrap{overflow:visible!important}}

/* Compact, high-contrast Vasooli column */
.report-table th.recovery-work-col,.report-table td.recovery-work-col{box-sizing:border-box!important;width:86px!important;min-width:86px!important;max-width:86px!important;text-align:center!important;white-space:normal!important;overflow-wrap:anywhere;font-size:20px!important;font-weight:900!important;padding:5px 3px!important}
.report-table th.recovery-work-col{background:linear-gradient(135deg,#075985,#0f766e)!important;color:#fff!important;border-color:#064e5d!important;line-height:1.12!important}
.report-table td.recovery-zero{background:#f8fafc!important;color:#64748b!important}.report-table td.recovery-positive{background:#dcfce7!important;color:#166534!important;border-color:#86c99a!important}.report-table td.recovery-total{background:#0f766e!important;color:#fff!important;border-color:#075985!important}
.report-table tbody tr:hover td.recovery-zero{background:#eef6ff!important}.report-table tbody tr:hover td.recovery-positive{background:#bbf7d0!important}
@media print{.report-table th.recovery-work-col,.report-table td.recovery-work-col{width:76px!important;min-width:76px!important;max-width:76px!important;font-size:18px!important;padding:3px 2px!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* V5 professional Category/Sub Engineer palette */
body[data-report-view="categorysubeng"] .report-deficiency-alert{margin:10px 8px;padding:13px 14px;border:2px solid #0f766e;border-left:8px solid #f59e0b;border-radius:14px;background:linear-gradient(135deg,#f0f9ff 0%,#f0fdfa 58%,#fffbeb 100%);color:#123b5d;box-shadow:0 5px 16px rgba(15,118,110,.11)}
body[data-report-view="categorysubeng"] .deficiency-summary{gap:9px}
body[data-report-view="categorysubeng"] .deficiency-summary strong{padding:7px 11px;border-radius:9px;background:#123f72;color:#fff;box-shadow:0 2px 6px rgba(18,63,114,.16)}
body[data-report-view="categorysubeng"] .deficiency-summary span{padding:6px 10px;border:1px solid #b7d7d1;border-radius:999px;background:#fff;color:#23536b;box-shadow:0 1px 4px rgba(15,118,110,.07)}
body[data-report-view="categorysubeng"] .deficiency-summary span b{color:#b45309}
body[data-report-view="categorysubeng"] .deficiency-locations{gap:8px;margin-top:11px}
body[data-report-view="categorysubeng"] .deficiency-location{padding:7px 10px;border:1px solid #bdd7e8;border-left:5px solid #f59e0b;border-radius:10px;background:#fff;color:#123f72;box-shadow:0 2px 7px rgba(18,63,114,.07)}
body[data-report-view="categorysubeng"] .deficiency-location b{color:#123f72}body[data-report-view="categorysubeng"] .deficiency-location small{color:#52697e}
body[data-report-view="categorysubeng"] .deficiency-more{color:#8a4b08;background:#fff7dd;border-radius:8px}
body[data-report-view="categorysubeng"] .category-subeng-grid tbody tr:nth-child(odd):not(.total-row){background:#fff!important}body[data-report-view="categorysubeng"] .category-subeng-grid tbody tr:nth-child(even):not(.total-row){background:#f3f8fc!important}
body[data-report-view="categorysubeng"] .category-subeng-grid td.deficiency-cell,body[data-report-view="categorysubeng"] .category-subeng-grid .bucket-zero{background:#fff1c7!important;color:#8a4b08!important;font-weight:950}body[data-report-view="categorysubeng"] .category-subeng-grid .bucket-good{background:#e3f7ee!important;color:#126446!important}
body[data-report-view="categorysubeng"] .category-subeng-grid .exp-pct-chip.critical,body[data-report-view="categorysubeng"] .category-subeng-grid .exp-pct-chip.low{background:#fff1c7!important;color:#8a4b08!important;border-color:#f2c66d!important}
body[data-report-view="categorysubeng"] .category-subeng-grid thead th{background:#164e63!important;color:#fff!important;border-color:#39798b!important}
body[data-report-view="categorysubeng"] .category-subeng-grid *,body[data-report-view="categorysubeng"] .report-deficiency-alert *{font-size:20px!important}
@media print{body[data-report-view="categorysubeng"] .report-deficiency-alert{background:#f0fdfa!important;border-color:#0f766e!important;box-shadow:none!important}body[data-report-view="categorysubeng"] .deficiency-location{box-shadow:none!important}body[data-report-view="categorysubeng"] .category-subeng-grid *,body[data-report-view="categorysubeng"] .report-deficiency-alert *{font-size:20px!important}}
