/* Metriccon table filters: cache-safe build 2026-09-08 */
:root{
    --navy:#111a44;
    --navy-2:#17235c;
    --blue:#233b8f;
    --mint:#19b86a;
    --green:#00d65f;
    --ink:#121827;
    --muted:#6b7280;
    --line:#e6e9f2;
    --soft:#f5f7fb;
    --white:#fff;
    --danger:#e5484d;
    --warning:#f59e0b;
    --shadow:0 20px 60px rgba(16,24,40,.10);
    --radius:18px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:linear-gradient(135deg,#f3f6ff,#fbfcff 45%,#eefbf5);color:var(--ink)}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font-family:inherit}
.app-shell{display:flex;min-height:100vh}
.sidebar{width:268px;background:linear-gradient(180deg,var(--navy),#0b1029);color:#fff;padding:18px 15px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;z-index:20;box-shadow:10px 0 35px rgba(11,16,41,.18)}
.side-brand{display:flex;gap:12px;align-items:center;padding:11px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:16px;margin-bottom:16px}
.side-brand img{display:none}
.side-brand strong{font-size:12px;letter-spacing:.5px;display:block;line-height:1.2}
.side-brand span{font-size:10px;opacity:.72;letter-spacing:1.8px}
.side-nav{display:flex;flex-direction:column;gap:6px;overflow:visible;padding-right:0}
.side-nav a{display:flex;align-items:center;gap:10px;padding:10px 11px;border-radius:12px;color:#d7dcff;font-weight:650;font-size:13.5px;transition:.18s ease}
.side-nav a span{width:24px;display:inline-flex;justify-content:center;opacity:.9}
.side-nav a:hover,.side-nav a.active{background:rgba(255,255,255,.13);color:#fff;transform:translateX(2px)}
.side-nav a.active{box-shadow:inset 4px 0 0 var(--mint)}
.nav-divider{height:1px;background:rgba(255,255,255,.14);margin:12px 4px}
.side-user{margin-top:auto;display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.10);padding:12px;border-radius:16px;border:1px solid rgba(255,255,255,.14)}
.avatar{width:40px;height:40px;border-radius:14px;background:linear-gradient(135deg,var(--mint),#73f6aa);display:grid;place-items:center;color:#0a2b19;font-weight:900}
.side-user strong{display:block;font-size:13px}
.side-user span{font-size:12px;opacity:.78}.logout{margin-left:auto;font-size:22px;opacity:.9}
.main-area{flex:1;min-width:0;padding:24px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px;background:rgba(255,255,255,.72);backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.85);border-radius:22px;padding:16px 18px;box-shadow:var(--shadow)}
.topbar h1{margin:2px 0 0;font-size:25px}.eyebrow{text-transform:uppercase;letter-spacing:1.9px;color:var(--mint);font-size:11px;font-weight:900}.hamburger{display:none;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px;font-size:20px}.top-actions{display:flex;gap:8px;align-items:center}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:10px 14px;font-weight:800;background:#fff;color:var(--navy);cursor:pointer;transition:.18s ease;white-space:nowrap}
.btn:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(16,24,40,.12)}.btn.primary{background:linear-gradient(135deg,var(--navy-2),var(--blue));color:#fff;border-color:transparent}.btn.green{background:linear-gradient(135deg,#09a85e,#41dc8a);color:#07361f;border-color:transparent}.btn.danger{background:#fff;color:var(--danger);border-color:#ffd3d5}.btn.full{width:100%}.btn.small{padding:7px 10px;border-radius:10px;font-size:12px}
.card{background:rgba(255,255,255,.86);border:1px solid rgba(255,255,255,.9);box-shadow:var(--shadow);border-radius:var(--radius);padding:18px}.glass-card{background:rgba(255,255,255,.78);border:1px solid rgba(255,255,255,.95);box-shadow:var(--shadow);backdrop-filter:blur(14px);border-radius:24px}.grid{display:grid;gap:16px}.stats{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}.stat-card{position:relative;overflow:hidden}.stat-card:after{content:"";position:absolute;right:-36px;top:-36px;width:110px;height:110px;background:linear-gradient(135deg,rgba(35,59,143,.16),rgba(25,184,106,.20));border-radius:50%}.stat-card span{font-size:12px;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.8px}.stat-card strong{display:block;margin-top:8px;font-size:25px;color:var(--navy);position:relative;z-index:1}.stat-card small{color:var(--muted);font-weight:700}
.owner-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.owner-card{display:block;padding:18px;border-radius:20px;background:linear-gradient(135deg,#dff7ff,#ffffff);border:1px solid #bfe9f6;box-shadow:0 14px 40px rgba(16,24,40,.08);transition:.18s ease;position:relative;overflow:hidden}.owner-card:nth-child(4n+2){background:linear-gradient(135deg,#e4fff0,#ffffff);border-color:#bcefd3}.owner-card:nth-child(4n+3){background:linear-gradient(135deg,#fff1cf,#ffffff);border-color:#f6d991}.owner-card:nth-child(4n+4){background:linear-gradient(135deg,#edf0ff,#ffffff);border-color:#cdd6ff}.owner-card:after{content:"";position:absolute;right:-28px;top:-28px;width:94px;height:94px;border-radius:50%;background:rgba(35,59,143,.12)}.owner-card:hover{transform:translateY(-3px);box-shadow:0 20px 52px rgba(16,24,40,.16);border-color:#2563eb}.owner-card h3{margin:0;color:var(--navy);font-size:19px;position:relative;z-index:1}.owner-card .meta{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0;position:relative;z-index:1}.pill{display:inline-flex;align-items:center;border-radius:999px;background:#eef3ff;color:#20346f;padding:6px 10px;font-size:12px;font-weight:800}.pill.green{background:#e8fff1;color:#08733f}.pill.red{background:#fff1f1;color:#b42318}.pill.gray{background:#f3f4f6;color:#4b5563}.owner-card .moneyline{display:flex;justify-content:space-between;gap:10px;border-top:1px dashed rgba(38,62,110,.22);padding-top:12px;color:#344054;position:relative;z-index:1}.owner-card .moneyline b{color:var(--navy)}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}.filters{display:flex;gap:10px;flex-wrap:wrap}.searchbox,.filters select,.filters input{height:42px;border:1px solid var(--line);border-radius:12px;padding:0 12px;background:#fff;min-width:200px}.searchbox{min-width:260px}
.table-wrap{overflow:auto;border-radius:16px;border:1px solid var(--line);background:#fff}.data-table{width:100%;border-collapse:separate;border-spacing:0;min-width:1050px}.data-table th{background:#f3f6fb;color:#152052;font-size:11.5px;text-transform:uppercase;letter-spacing:.35px;padding:8px 9px;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:2;line-height:1.2}.data-table td{padding:7px 9px;border-bottom:1px solid #eef1f6;vertical-align:middle;font-size:13px;line-height:1.25}.data-table tbody tr:hover td{background:#fbfcff}.data-table .num{text-align:right;font-variant-numeric:tabular-nums}.data-table .center{text-align:center}.data-table .project-name{min-width:280px;font-weight:700;color:#17235c}.data-table .pill{padding:5px 8px;font-size:11.5px}.data-table .btn.small{padding:6px 8px;font-size:11.5px;border-radius:9px}.data-table .accom-badge{min-width:46px;padding:3px 7px}.subtotal-row td{background:#050505!important;color:#00f060!important;font-weight:900;border-bottom:0}.year-title{font-size:22px;color:var(--navy);font-weight:950;margin:16px 0 7px;display:flex;align-items:center;gap:10px}.year-title:after{content:"";height:1px;background:var(--line);flex:1}.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.section-title h2{margin:0;color:var(--navy)}.muted{color:var(--muted)}.form-grid{display:grid;gap:14px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid label{font-weight:800;color:#29324d;font-size:13px}.form-grid input,.form-grid select,.form-grid textarea{width:100%;margin-top:7px;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fff;font-size:14px}.form-grid textarea{min-height:92px;resize:vertical}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px;flex-wrap:wrap}.alert{padding:12px 14px;border-radius:14px;margin-bottom:14px;font-weight:750}.alert.success{background:#eafaf0;color:#126b3d;border:1px solid #c8f1d5}.alert.danger{background:#fff0f0;color:#b42318;border:1px solid #ffd4d4}.alert.info{background:#edf5ff;color:#1d4b8f;border:1px solid #d7e8ff}.login-body{display:grid;place-items:center;min-height:100vh;background:radial-gradient(circle at top left,rgba(35,59,143,.18),transparent 35%),linear-gradient(135deg,#eef4ff,#ffffff 44%,#ecfff4)}.login-shell{width:min(94vw,440px)}.login-card{padding:30px}.brand-stack{text-align:center;margin-bottom:20px}.login-logo{width:250px;max-width:100%;background:white;border-radius:12px;padding:7px;margin-bottom:8px}.brand-stack h1{font-size:25px;color:var(--navy);margin:6px 0}.brand-stack p{color:var(--muted);margin:0}.login-hint{text-align:center;margin-top:14px;color:var(--muted);font-size:13px}.report-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:14px}.report-head img{width:250px;max-width:100%;}.report-title h2{margin:4px 0 0;color:#000;font-size:22px}.report-title h3{margin:2px 0;color:#000}.report-title .asof{color:#dc2626;font-weight:900}.print-only{display:none}.empty-state{text-align:center;padding:46px;color:var(--muted)}.file-drop{border:2px dashed #cfd7ea;padding:22px;border-radius:18px;background:#fbfcff}.help-list li{margin-bottom:7px}.nowrap{white-space:nowrap}.actions{display:flex;gap:6px;flex-wrap:wrap}.footer-note{margin-top:18px;color:var(--muted);font-size:12px;text-align:center}
@media(max-width:1100px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.owner-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.sidebar{position:fixed;left:-282px;transition:.22s ease}.sidebar.show{left:0}.main-area{padding:14px}.hamburger{display:block}.topbar{align-items:flex-start}.top-actions{display:none}.stats,.owner-grid,.form-grid.two,.form-grid.three{grid-template-columns:1fr}.searchbox,.filters select,.filters input{width:100%;min-width:0}.filters{width:100%}.toolbar{align-items:stretch}.btn{width:100%}.report-head{display:block}.data-table{min-width:980px}}
@media print{body{background:#fff}.sidebar,.topbar,.no-print,.btn,.toolbar:not(.print-toolbar){display:none!important}.main-area{padding:0}.card{box-shadow:none;border:0;padding:0}.table-wrap{border:0;border-radius:0}.data-table{min-width:0;font-size:10px}.data-table th,.data-table td{padding:4px 5px;font-size:10px}.data-table .project-name{min-width:220px}.report-head img{width:230px}.print-only{display:block}.year-title{font-size:18px;margin:12px 0 3px}.subtotal-row td{color:#00cf4e!important;background:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* Update v2: completed highlighting, grand totals, and cleaner print reports */
.field-note{display:block;margin-top:6px;color:var(--muted);font-size:11px;font-weight:700;line-height:1.35}
.status-auto-completed{border-color:#25c06d!important;box-shadow:0 0 0 3px rgba(37,192,109,.12)!important}
.accom-complete{background:#e8fff1!important;color:#08733f!important;font-weight:950!important}
.accom-complete .accom-badge{display:inline-flex;align-items:center;justify-content:center;min-width:52px;padding:4px 9px;border-radius:999px;background:#d7fbe5;color:#08733f;font-weight:950;border:1px solid #9be4ba}
.completed-project td{background:#fbfffd}.completed-project:hover td{background:#f2fff8!important}
.grand-total-wrap{margin-top:18px;border-radius:18px}.grand-total-table{min-width:640px;table-layout:fixed}.grand-total-table col{width:20%}.grand-total-table td{white-space:nowrap}.grand-total-row td{background:#071109!important;color:#00f060!important;font-weight:950!important;border-bottom:0!important;font-size:15px}.grand-total-row td:first-child{text-transform:uppercase;letter-spacing:.7px}.grand-total-labels td{background:#f3f6fb!important;color:#4b5563!important;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.5px;text-align:right}.grand-total-labels td:first-child{text-align:left}.report-card{position:relative}.report-filter-line{margin-top:8px;color:#36405e;font-size:12px;font-weight:800;background:#f3f6fb;border:1px solid #e2e8f0;border-radius:12px;padding:8px 10px;display:inline-block}.print-owner-title{margin:22px 0 8px;color:#111a44}.report-table-wrap{margin-bottom:14px}.report-grand-total{margin-top:22px}
.grand-total-table col{width:auto}.cell-note{display:block;margin-top:2px;color:var(--muted);font-size:10px;font-weight:800}
.table-scroll-top{height:16px;overflow-x:auto;overflow-y:hidden;margin:0 0 4px;border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:#fff}.table-scroll-top-inner{height:1px}.table-scroll-top + .table-wrap{border-top-left-radius:0;border-top-right-radius:0}.table-scroll-top::-webkit-scrollbar{height:12px}.table-scroll-top::-webkit-scrollbar-thumb{background:#c8d2e4;border-radius:999px;border:3px solid #fff}.table-scroll-top::-webkit-scrollbar-track{background:#f3f6fb;border-radius:999px}
.project-click-row,.project-link-row{cursor:pointer}.project-click-row:hover td,.project-link-row:hover td{background:#f5f9ff!important}.modal-open{overflow:hidden}.project-modal[hidden]{display:none}.project-modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:22px}.project-modal-backdrop{position:absolute;inset:0;background:rgba(8,20,38,.58);backdrop-filter:blur(4px)}.project-modal-panel{position:relative;width:min(1100px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:18px;border:1px solid #dfe6ef;box-shadow:0 28px 80px rgba(8,20,38,.32);padding:22px}.project-modal-close{position:absolute;right:14px;top:12px;width:34px;height:34px;border:0;border-radius:10px;background:#eef3f9;color:#142949;font-size:22px;cursor:pointer}.project-modal-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding-right:42px;border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:16px}.project-modal-head h2{margin:4px 0 4px;color:var(--navy);font-size:24px}.project-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.project-detail-item{border:1px solid #e5eaf3;border-radius:10px;padding:10px;background:#fbfcff;min-width:0;overflow:hidden}.project-detail-item span{display:block;color:var(--muted);font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.45px}.project-detail-item strong{display:block;margin-top:4px;color:#142949;font-size:13px;line-height:1.35;max-width:100%;overflow-wrap:anywhere;word-break:break-word}.project-detail-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}.project-detail-columns section{border:1px solid #e5eaf3;border-radius:12px;background:#fff;padding:14px}.project-detail-columns h3{margin:0 0 10px;color:var(--navy);font-size:16px}.project-detail-columns pre{margin:0;white-space:pre-wrap;font-family:inherit;font-size:13px;line-height:1.45;color:#1f2937}.project-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
.projects-table{min-width:1340px}.projects-table .project-name{min-width:260px}.projects-table .actions{gap:4px;flex-wrap:nowrap}.projects-table .cell-note{display:inline;margin:0 0 0 4px;font-size:10px}.project-year-wrap{margin-bottom:10px}.project-year-wrap + .year-title{margin-top:14px}
.sidebar{background:linear-gradient(180deg,#081426,#10213d 58%,#081426);box-shadow:14px 0 44px rgba(8,20,38,.22)}.side-brand{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.13);border-radius:14px}.side-brand strong{font-family:Georgia,serif;font-size:13px;letter-spacing:.06em}.side-brand span{color:rgba(255,255,255,.65);letter-spacing:.18em;text-transform:uppercase}.nav-section{margin:13px 7px 5px;color:#8fb2d4;font-size:9.5px;font-weight:900;letter-spacing:.18em;text-transform:uppercase}.side-nav a{border:1px solid transparent;border-radius:12px;color:#d7e3f4}.side-nav a:hover,.side-nav a.active{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.10);transform:translateX(2px)}.side-nav a.active{box-shadow:inset 4px 0 0 #10b8d5}.side-user{background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.13);border-radius:14px}.avatar{background:linear-gradient(135deg,#2563eb,#10b8d5);color:#fff}.topbar{border-radius:20px;background:rgba(255,255,255,.84);box-shadow:0 18px 48px rgba(15,35,65,.10)}.dashboard-hero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr);gap:18px;margin-bottom:18px;padding:28px;border-radius:28px;color:#fff;background:radial-gradient(circle at 12% 20%,rgba(39,116,239,.45),transparent 35%),radial-gradient(circle at 84% 74%,rgba(16,184,213,.34),transparent 38%),linear-gradient(145deg,#081426 8%,#102649 64%,#0a6c91 125%);box-shadow:0 24px 60px rgba(15,35,65,.18);overflow:hidden}.hero-main h2{margin:12px 0 12px;font-size:clamp(34px,4.4vw,58px);line-height:1;letter-spacing:0}.hero-main p{max-width:640px;margin:0;color:rgba(255,255,255,.78);font-size:16px;line-height:1.6}.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}.btn.glass{color:#fff;background:rgba(255,255,255,.17);border-color:rgba(255,255,255,.32);box-shadow:none}.btn.glass.subtle{background:rgba(255,255,255,.09)}.hero-note{align-self:stretch;padding:20px;border-radius:20px;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.25);backdrop-filter:blur(10px)}.hero-note h3{margin:0 0 8px}.hero-note p,.hero-note small{color:rgba(255,255,255,.72)}.hero-amount{margin:14px 0 12px;font-size:28px;font-weight:950}.mini-info-row{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-top:1px solid rgba(255,255,255,.18);border-bottom:1px solid rgba(255,255,255,.18)}.dashboard-stats .stat-card{display:flex;gap:14px;align-items:flex-start}.stat-icon{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;border-radius:14px;color:#fff;background:linear-gradient(135deg,#2563eb,#10b8d5);font-weight:950}.recent-card,.project-grand-total-wrap{margin-top:18px}.login-body{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(420px,.82fr);place-items:stretch;background:#081426}.login-visual{position:relative;overflow:hidden;padding:52px 64px;color:#fff;background:radial-gradient(circle at 12% 20%,rgba(39,116,239,.46),transparent 35%),radial-gradient(circle at 82% 78%,rgba(16,184,213,.32),transparent 40%),linear-gradient(145deg,#081426 8%,#102649 62%,#0a6c91 125%)}.login-visual:before,.login-visual:after{content:"";position:absolute;border-radius:999px;border:1px solid rgba(255,255,255,.10)}.login-visual:before{width:520px;height:520px;right:-180px;top:-130px}.login-visual:after{width:340px;height:340px;left:-120px;bottom:-120px}.login-brand{position:relative;z-index:1;display:flex;align-items:center;gap:15px}.login-brand img{width:104px;background:#fff;border-radius:12px;padding:6px}.login-brand strong{display:block;font-family:Georgia,serif;font-size:21px;letter-spacing:.06em}.login-brand small{display:block;margin-top:4px;color:rgba(255,255,255,.66);font-size:10px;letter-spacing:.32em}.login-copy{position:relative;z-index:1;max-width:720px;margin-top:clamp(90px,18vh,190px)}.login-copy h1{margin:14px 0 20px;font-size:clamp(44px,5.8vw,78px);line-height:1;letter-spacing:0}.login-copy p{max-width:610px;color:rgba(255,255,255,.74);font-size:18px;line-height:1.6}.login-feature-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:26px}.login-feature-row span{padding:9px 12px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);font-size:13px;font-weight:800}.login-panel{display:grid;place-items:center;padding:34px;background:#f2f6fb}.login-card.modern{width:min(100%,430px);padding:32px;border-radius:24px;background:#fff;border:1px solid #dfe6ef;box-shadow:0 18px 48px rgba(15,35,65,.10)}.login-card.modern h2{margin:8px 0 8px;color:#081426;font-size:30px}.login-card.modern p{margin:0 0 18px;color:#64748b;line-height:1.5}.mobile-login-brand{display:none}.input-with-icon{display:flex;align-items:center;gap:10px;margin-top:7px;border:1px solid #dfe6ef;border-radius:12px;background:#fff;padding:0 12px}.input-with-icon span{color:#2563eb;font-weight:900}.form-grid .input-with-icon input{border:0;margin:0;padding:13px 0;box-shadow:none}.form-grid .input-with-icon input:focus{outline:0}.login-hint{color:#64748b}
@media(max-width:800px){.grand-total-table{min-width:650px}}
@media(max-width:900px){.dashboard-hero{grid-template-columns:1fr;padding:22px}.hero-main h2{font-size:38px}.login-body{grid-template-columns:1fr;background:#f2f6fb}.login-visual{display:none}.login-panel{min-height:100vh;padding:22px}.mobile-login-brand{display:flex;align-items:center;gap:10px;margin-bottom:18px}.mobile-login-brand img{width:92px;background:#fff;border-radius:10px;padding:5px}.login-card.modern{width:min(100%,440px)}}
@media(max-width:700px){.project-modal{padding:10px}.project-modal-panel{padding:16px}.project-modal-head{display:block}.project-detail-grid,.project-detail-columns{grid-template-columns:1fr}.project-modal-actions{display:grid}.project-modal-actions .btn{width:100%}}
@media print{
    @page{size:A4 landscape;margin:8mm}
    html,body{width:100%;background:#fff!important;color:#000!important}
    .app-shell{display:block!important;min-height:0!important}.main-area{padding:0!important;margin:0!important;width:100%!important}.print-area{display:block!important;width:100%!important;box-shadow:none!important;border:0!important;border-radius:0!important;background:#fff!important;padding:0!important}.report-card{font-family:Arial,Helvetica,sans-serif!important}.report-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;margin:0 0 8px!important;border-bottom:2px solid #000!important;padding-bottom:6px!important;break-inside:avoid!important}.report-title img{width:210px!important;display:block!important;margin:0 0 3px!important}.report-title h2{font-size:16px!important;margin:3px 0 0!important;color:#000!important}.report-title h3{font-size:13px!important;margin:1px 0!important;color:#000!important}.report-title .asof{font-size:12px!important;color:#c00000!important;font-weight:900!important}.report-filter-line{font-size:9px!important;border:0!important;background:#fff!important;padding:0!important;margin-top:3px!important;color:#000!important}.print-owner-title{font-size:15px!important;margin:10px 0 4px!important;color:#000!important;break-after:avoid!important}.year-title{font-size:16px!important;color:#000!important;margin:7px 0 2px!important;break-after:avoid!important}.year-title:after{display:none!important}.table-wrap{overflow:visible!important;border:0!important;border-radius:0!important;background:#fff!important;margin-bottom:5px!important}.data-table,.report-table{width:100%!important;min-width:0!important;border-collapse:collapse!important;border-spacing:0!important;table-layout:fixed!important}.data-table th,.data-table td{border:1px solid #000!important;padding:3px 4px!important;font-size:8.2px!important;line-height:1.15!important;color:#000!important;background:#fff!important;vertical-align:middle!important}.data-table th{font-weight:900!important;text-transform:none!important;letter-spacing:0!important;text-align:center!important}.data-table .project-name{min-width:0!important;width:32%!important;font-weight:700!important;word-break:break-word!important}.report-table th:nth-child(1),.report-table td:nth-child(1){width:4%!important}.report-table th:nth-child(2),.report-table td:nth-child(2){width:34%!important}.report-table th:nth-child(3),.report-table td:nth-child(3){width:7%!important}.report-table th:nth-child(4),.report-table td:nth-child(4){width:7%!important}.report-table th:nth-child(5),.report-table td:nth-child(5){width:10%!important}.report-table th:nth-child(6),.report-table td:nth-child(6){width:7%!important}.report-table th:nth-child(7),.report-table td:nth-child(7){width:10%!important}.report-table th:nth-child(8),.report-table td:nth-child(8){width:9%!important}.report-table th:nth-child(9),.report-table td:nth-child(9){width:10%!important}.report-table th:nth-child(10),.report-table td:nth-child(10){width:12%!important}.subtotal-row td,.grand-total-row td{background:#000!important;color:#00f060!important;font-weight:900!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.grand-total-labels td{background:#f1f1f1!important;color:#000!important;font-size:8px!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.accom-complete{background:#dff5e8!important;color:#006b35!important;font-weight:900!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.accom-complete .accom-badge{background:transparent!important;border:0!important;color:#006b35!important;padding:0!important;min-width:0!important}.report-grand-total{break-inside:avoid!important;margin-top:8px!important}.grand-total-table td{font-size:10px!important}.no-print,.toolbar,.sidebar,.topbar,.btn,.actions{display:none!important}
}
@media print{.report-table th:nth-child(1),.report-table td:nth-child(1){width:4%!important}.report-table th:nth-child(2),.report-table td:nth-child(2){width:30%!important}.report-table th:nth-child(3),.report-table td:nth-child(3){width:6%!important}.report-table th:nth-child(4),.report-table td:nth-child(4){width:6%!important}.report-table th:nth-child(5),.report-table td:nth-child(5){width:9%!important}.report-table th:nth-child(6),.report-table td:nth-child(6){width:8%!important}.report-table th:nth-child(7),.report-table td:nth-child(7){width:6%!important}.report-table th:nth-child(8),.report-table td:nth-child(8){width:8%!important}.report-table th:nth-child(9),.report-table td:nth-child(9){width:7%!important}.report-table th:nth-child(10),.report-table td:nth-child(10){width:8%!important}.report-table th:nth-child(11),.report-table td:nth-child(11){width:8%!important}.cell-note{display:none!important}}
.project-billing-table{width:100%;border-collapse:collapse;font-size:12.5px}.project-billing-table th,.project-billing-table td{border:1px solid #d7deea;padding:7px 8px;text-align:left;vertical-align:top}.project-billing-table th{width:105px;background:#f3f6fb;color:#142949}.project-billing-table tr:nth-child(even) td,.project-billing-table tr:nth-child(even) th{background:#fbfcff}.project-billing-table span{display:block;color:#64748b;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.35px}.project-billing-table strong{display:block;color:#111827;font-size:12.5px;margin-top:2px}
.billing-form-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff;margin:7px 0 10px}.billing-form-table{width:100%;min-width:1380px;border-collapse:collapse}.billing-form-table th{background:#f3f6fb;color:#152052;font-size:10.5px;text-transform:uppercase;letter-spacing:.25px;padding:7px;border-bottom:1px solid var(--line);white-space:nowrap}.billing-form-table td{border-bottom:1px solid #eef1f6;border-right:1px solid #eef1f6;padding:4px}.billing-form-table input{width:100%;min-width:92px;border:0!important;border-radius:0!important;margin:0!important;padding:7px 6px!important;font-size:12px!important;background:#fff!important}.billing-form-table input:focus{outline:2px solid rgba(35,59,143,.18)}.billing-form-table .btn.small{padding:6px 8px;font-size:11px}
.owner-list-title{font-size:20px;color:var(--navy);font-weight:950;margin:18px 0 8px;display:flex;align-items:center;gap:10px}.owner-list-title:after{content:"";height:1px;background:var(--line);flex:1}
.owners-form-wrap{max-width:880px}.owners-list-card{margin-top:0}.owner-modal-form textarea{min-height:120px}.owner-contact-grid{align-items:start}.owner-view-main-grid{display:grid;grid-template-columns:minmax(380px,.42fr) minmax(560px,.58fr);gap:18px;align-items:start}.owner-view-left,.owner-view-right{min-width:0}.owner-view-left{position:sticky;top:14px}.owner-view-left .project-detail-section{padding:22px;background:linear-gradient(180deg,#ffffff,#f4f8ff);border-color:#d5e5fb}.owner-detail-list{grid-template-columns:1fr;gap:10px}.owner-detail-list div{padding:12px 14px;border-radius:12px;background:#fff;border-color:#dbe8fb}.owner-detail-list span{font-size:10px}.owner-detail-list strong{font-size:14px;line-height:1.35}.owner-detail-list div:first-child strong{font-size:18px;color:var(--navy)}.owner-view-right .year-title:first-child{margin-top:0}.owner-view-grand-total{margin-top:4px}
@media print{.report-table th:nth-child(1),.report-table td:nth-child(1){width:4%!important}.report-table th:nth-child(2),.report-table td:nth-child(2){width:27%!important}.report-table th:nth-child(3),.report-table td:nth-child(3){width:6%!important}.report-table th:nth-child(4),.report-table td:nth-child(4){width:6%!important}.report-table th:nth-child(5),.report-table td:nth-child(5){width:10%!important}.report-table th:nth-child(6),.report-table td:nth-child(6){width:8%!important}.report-table th:nth-child(7),.report-table td:nth-child(7){width:7%!important}.report-table th:nth-child(8),.report-table td:nth-child(8){width:9%!important}.report-table th:nth-child(9),.report-table td:nth-child(9){width:8%!important}.report-table th:nth-child(10),.report-table td:nth-child(10){width:8%!important}.report-table th:nth-child(11),.report-table td:nth-child(11){width:7%!important}.owner-list-title{font-size:14px!important;color:#000!important;margin:7px 0 2px!important}.owner-list-title:after{display:none!important}}
.project-form-card{padding:24px}.project-form{width:100%;gap:18px}.project-form .form-grid.three{grid-template-columns:repeat(3,minmax(220px,1fr))}.project-form .form-grid.two{grid-template-columns:repeat(2,minmax(280px,1fr))}.project-form-section{display:grid;gap:15px;border:1px solid #dfe8f5;border-radius:16px;padding:18px}.project-form-section label,.on-file-panel label{margin:0}.project-form-section input,.project-form-section select,.project-form-section textarea,.on-file-panel input,.on-file-panel select,.on-file-panel textarea{border-color:#d9e2ef}.owner-project-section{background:linear-gradient(180deg,#ffffff,#f4f8ff);border-color:#d5e5fb}.po-section{background:linear-gradient(180deg,#ffffff,#f7fbff);border-color:#d7e7f4}.financial-section{background:linear-gradient(180deg,#ffffff,#fffaf0);border-color:#eedcb2}.remarks-section{background:linear-gradient(180deg,#ffffff,#f8fbff);border-color:#dbe7f4}.financial-section .field-note{color:#805d14}.section-title.compact{margin-bottom:2px}.section-title.compact h2{font-size:18px}.on-file-panel{border:1px solid #cfe6da;border-radius:16px;background:linear-gradient(180deg,#ffffff,#f3fff8);padding:18px}.on-file-grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:12px}.check-field{display:flex!important;align-items:center;gap:10px;min-height:48px;border:1px solid #dfe6ef;border-radius:12px;background:#fff;padding:11px 12px;color:#142949}.check-field input,.mini-check input{width:auto!important;margin:0!important}.check-field span,.mini-check span{font-weight:850}.input-check-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}.mini-check{display:inline-flex!important;align-items:center;gap:6px;height:44px;padding:0 10px;border:1px solid #dfe6ef;border-radius:12px;background:#fff;white-space:nowrap}.on-file-legacy{grid-column:1/-1}.project-detail-columns.single{grid-template-columns:1fr}.on-file-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.on-file-detail-item{display:flex;gap:10px;align-items:flex-start;border:1px solid #e5eaf3;border-radius:12px;background:#fbfcff;padding:10px}.on-file-detail-item.complete{border-color:#bcefd3;background:#f2fff8}.on-file-marker{display:inline-flex;align-items:center;justify-content:center;width:38px;min-width:38px;height:28px;border-radius:999px;background:#eef3ff;color:#20346f;font-size:11px;font-weight:950}.on-file-detail-item.complete .on-file-marker{background:#d7fbe5;color:#08733f}.on-file-detail-item small{display:block;color:#64748b;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.35px}.on-file-detail-item strong{display:block;margin-top:3px;color:#142949;font-size:13px;line-height:1.3}.on-file-legacy-note{grid-column:1/-1;border:1px dashed #cbd5e1;border-radius:12px;padding:10px;color:#334155;background:#fff}
.side-brand-mark{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;flex:0 0 auto;background:#fff;border:1px solid rgba(255,255,255,.28);overflow:hidden}.side-brand-mark img{width:100%;height:100%;object-fit:contain;padding:4px;display:block}.side-nav{overflow:auto;padding-right:2px}.side-nav a b{font-size:13.5px;line-height:1.15}.side-nav a span{width:30px;height:30px;border-radius:10px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.12);display:inline-grid;place-items:center;color:#eaf6ff;font-size:12px;font-weight:950;opacity:1;flex:0 0 auto}.side-nav a:hover span,.side-nav a.active span{background:#10b8d5;color:#061426;border-color:#10b8d5}.logout{margin-left:auto;padding:7px 9px;border-radius:10px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.12);font-size:11px;font-weight:900;color:#fff}.logout:hover{background:rgba(255,255,255,.18)}
@media(max-width:1100px){.on-file-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.on-file-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.project-form .form-grid.three,.project-form .form-grid.two,.on-file-grid,.on-file-detail-grid{grid-template-columns:1fr}.input-check-row{grid-template-columns:1fr}.mini-check{height:auto;padding:10px}.hamburger{font-size:13px}}
.project-full-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.project-detail-summary{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,.4fr);gap:12px;margin-bottom:12px}.project-summary-main,.project-summary-side{border:1px solid #e5eaf3;border-radius:14px;background:#fbfcff;padding:14px}.project-summary-main span,.project-summary-side span{display:block;color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.5px}.project-summary-main strong{display:block;margin-top:5px;color:var(--navy);font-size:20px;line-height:1.25}.project-summary-main small{display:block;margin-top:7px;color:#64748b;font-weight:800}.project-summary-side strong{display:block;margin-top:5px;color:#142949;font-size:13px;line-height:1.35}.project-detail-groups{display:grid;gap:10px}.project-detail-groups.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.project-detail-groups section{border:1px solid #e5eaf3;border-radius:14px;background:#fbfcff;padding:12px}.project-detail-groups h3{margin:0 0 8px;color:var(--navy);font-size:14px}.project-detail-groups .minor-group{grid-column:1/-1;background:#fff}.compact-detail-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.compact-detail-list div{border:1px solid #edf1f7;border-radius:9px;padding:7px 9px;background:#fbfcff}.compact-detail-list span{display:block;color:#64748b;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.35px}.compact-detail-list strong{display:block;margin-top:2px;color:#334155;font-size:11px;line-height:1.25}.service-invoice-form{margin-top:8px;padding:14px;border:1px solid #dfe6ef;border-radius:16px;background:#fbfcff}.service-invoice-table{min-width:1420px}.service-invoice-table .project-name{min-width:240px}.cr-table{min-width:1360px}.list-focus-card .filters{margin-bottom:14px}.side-nav a span{font-size:11px}.side-nav a span:has(+ b){letter-spacing:0}.app-modal[hidden]{display:none}.app-modal{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:22px}.app-modal-backdrop{position:absolute;inset:0;background:rgba(8,20,38,.58);backdrop-filter:blur(4px)}.app-modal-panel{position:relative;width:min(760px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:18px;border:1px solid #dfe6ef;box-shadow:0 28px 80px rgba(8,20,38,.32);padding:22px}.app-modal-panel.wide{width:min(1120px,96vw)}.modal-form{padding:0!important;border:0!important;background:transparent!important}.cr-subrow td{background:#f8fafc!important;color:#475569;font-size:12px}
.project-detail-section{background:#fff;border:1px solid rgba(255,255,255,.9);box-shadow:var(--shadow);border-radius:var(--radius);padding:18px}.project-detail-print>.report-head{display:none}.project-detail-stats{margin-bottom:18px}.project-detail-si-table{min-width:1280px}
.project-detail-left .project-detail-section{background:linear-gradient(180deg,#ffffff,#f8fbff);border-color:#d8e8fb}.project-detail-right .project-detail-section{background:linear-gradient(180deg,#ffffff,#f8fffb);border-color:#d7f0e2}.project-detail-groups .project-group{background:#f5f9ff;border-color:#d9e8ff}.project-detail-groups .financial-group{background:#fffaf0;border-color:#f2dfb5}.project-detail-groups .minor-group{background:#f8fbff;border-color:#dbe7f4}.project-group .project-detail-item{background:#ffffff;border-color:#dbe8fb}.financial-group .project-detail-item{background:#fffdf7;border-color:#efdcae}.compact-detail-list div{background:#ffffff;border-color:#e0e8f3}.project-summary-main{background:#f2f7ff;border-color:#d5e6ff}.project-summary-side{background:#fff8ed;border-color:#efd9ae}.on-file-detail-item{background:#f8fbff;border-color:#dce7f5}.on-file-detail-item.complete{background:#f0fff7;border-color:#b9eccf}
.si-ledger{display:grid;gap:12px}.si-ledger-card{border:1px solid #d9e8f2;border-radius:16px;background:#fff;box-shadow:0 14px 34px rgba(15,35,65,.07);overflow:hidden}.si-ledger-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:15px 16px 12px;background:linear-gradient(180deg,#f8fbff,#ffffff);border-bottom:1px solid #edf2f8}.si-ledger-head h3{margin:4px 0 4px;color:var(--navy);font-size:18px}.si-ledger-head p{margin:0;color:#475569;font-size:13px;line-height:1.35;overflow-wrap:anywhere}.si-ledger-head .pill{flex:0 0 auto}.si-progress{height:7px;background:#eef3f7;overflow:hidden}.si-progress span{display:block;height:100%;border-radius:0 999px 999px 0;background:linear-gradient(90deg,#10b8d5,#19b86a)}.si-ledger-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;border-bottom:1px solid #edf2f8}.si-ledger-metrics div{padding:12px 14px;border-right:1px solid #edf2f8;min-width:0}.si-ledger-metrics div:last-child{border-right:0}.si-ledger-metrics span,.cr-ledger-item span{display:block;color:#64748b;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.35px}.si-ledger-metrics strong,.cr-ledger-item strong{display:block;margin-top:4px;color:#142949;font-size:13px;line-height:1.25;overflow-wrap:anywhere}.cr-ledger-block{padding:13px 14px 15px;background:#fbfdff}.cr-ledger-title{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}.cr-ledger-title strong{color:var(--navy);font-size:14px}.cr-ledger-title span{color:#64748b;font-size:12px;font-weight:850}.cr-ledger-list{display:grid;gap:8px}.cr-ledger-item{display:grid;grid-template-columns:minmax(110px,.9fr) repeat(3,minmax(86px,1fr));gap:8px;align-items:start;border:1px solid #e2ebf5;border-radius:12px;background:#fff;padding:10px}.cr-ledger-item p{grid-column:1/-1;margin:0;padding-top:8px;border-top:1px dashed #dce6f1;color:#475569;font-size:12px;line-height:1.35}.cr-ledger-id strong{font-size:14px;color:#0d1b52}.cr-ledger-id span{margin-top:4px;text-transform:none;letter-spacing:0;color:#64748b}.cr-ledger-empty{border:1px dashed #cdd8e6;border-radius:12px;padding:14px;color:#64748b;background:#fff;text-align:center;font-weight:800}.si-ledger-total{display:grid;grid-template-columns:minmax(110px,1fr) repeat(5,minmax(0,1fr));gap:0;align-items:center;border-radius:14px;overflow:hidden;background:#071109;color:#00f060;font-weight:950}.si-ledger-total span,.si-ledger-total strong{padding:12px 14px;border-right:1px solid rgba(255,255,255,.12)}.si-ledger-total strong{text-align:right;font-variant-numeric:tabular-nums}.si-ledger-total strong:last-child{border-right:0}
.project-detail-main-grid{display:grid;grid-template-columns:minmax(420px,.9fr) minmax(520px,1.1fr);gap:16px;align-items:start}.project-detail-left,.project-detail-right{min-width:0}.project-detail-right .project-detail-section{position:sticky;top:14px}.project-detail-main-grid .recent-card{margin-top:16px}
.owner-view-main-grid{grid-template-columns:minmax(240px,280px) minmax(0,1fr);gap:14px}.owner-view-left .project-detail-section{padding:16px;border-radius:16px}.owner-detail-list{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}.owner-detail-list div{padding:10px 11px!important;min-width:0}.owner-detail-list span{font-size:9px!important}.owner-detail-list strong{font-size:12px!important;line-height:1.3;overflow-wrap:anywhere}.owner-detail-list div:first-child strong{font-size:15px!important}.owner-view-right .table-wrap{border-radius:12px}.owner-view-right .data-table{min-width:1280px}
.owner-view-filters{margin:0 0 12px;padding:12px;border:1px solid #dbe5f2;border-radius:14px;background:#f8fbff}.owner-view-project-wrap{margin-bottom:18px}
.table-wrap{border-color:#dbe5f2;box-shadow:0 12px 34px rgba(15,35,65,.07);background:linear-gradient(180deg,#ffffff,#fbfdff)}
.data-table{border-spacing:0;background:#fff}
.data-table th{background:linear-gradient(180deg,#f8fbff,#edf3fb);color:#0d1b52;border-bottom:1px solid #d8e2f0;padding:10px 10px;font-size:10.8px;font-weight:950;vertical-align:middle}
.data-table td{padding:10px 10px;border-bottom:1px solid #edf2f8;color:#111827;background:#fff}
.data-table tbody tr:nth-child(even):not(.subtotal-row):not(.grand-total-row):not(.grand-total-labels) td{background:#fcfdff}
.data-table tbody tr:hover td{background:#f3f8ff!important}
.data-table tbody tr:last-child td{border-bottom:0}
.data-table .project-name{color:#0d1b52;font-weight:850;line-height:1.28}
.data-table .num{color:#111827;font-weight:750}
.data-table .nowrap{white-space:nowrap}
.data-table .pill{border:1px solid rgba(35,59,143,.08);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
.data-table td.actions{min-width:190px}
.actions{align-items:center;gap:7px}
.actions form{margin:0;display:inline-flex}
.data-table .actions,.project-row-actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.data-table .btn.small{width:auto;min-height:30px;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:900;letter-spacing:.01em;background:#dfeaff;border-color:#c2d5ff;color:#142a70;box-shadow:0 4px 12px rgba(15,35,65,.08);transform:none}
.data-table .btn.small:hover{transform:translateY(-1px);box-shadow:0 9px 20px rgba(15,35,65,.16);filter:saturate(1.04) brightness(.99)}
.data-table .btn.small.primary{background:#dbe5ff;color:#142a70;border-color:#b8ccff}
.data-table .btn.small.green{background:#d9f8e8;color:#08733f;border-color:#aee9ca}
.data-table .btn.small.danger{background:#ffe0e0;color:#a61919;border-color:#ffbcbc}
.data-table .btn.small[href*="project_detail"]{background:#e7e2ff;color:#34206f;border-color:#cec2ff}
.data-table .btn.small[href*="project_form"],.data-table .btn.small[href*="users&edit"],.data-table .btn.small[href*="owners&edit"]{background:#fff1cc;color:#7a4d00;border-color:#f3d486}
.data-table .btn.small[data-open-cr-modal]{background:#d9f8e8;color:#08733f;border-color:#aee9ca}
.data-table .btn.small::before{font-size:10px;font-weight:950;line-height:1}
.data-table .btn.small[href*="owner_view"]::before{content:"O"}
.data-table .btn.small[href*="project_detail"]::before{content:"D"}
.data-table .btn.small[href*="project_form"]::before,.data-table .btn.small[href*="users&edit"]::before,.data-table .btn.small[href*="owners&edit"]::before{content:"E"}
.data-table .btn.small[data-open-cr-modal]::before{content:""}
.data-table button.btn.small.danger::before{content:"X"}
.subtotal-row td{box-shadow:inset 0 1px 0 rgba(255,255,255,.12)}
.cr-subrow td{background:#f7fafc!important;border-top:1px dashed #d7e2ef;color:#475569}
@media(max-width:1200px){.project-full-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-detail-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1200px){.project-detail-main-grid{grid-template-columns:1fr}.project-detail-right .project-detail-section{position:static}}
@media(max-width:1200px){.owner-view-main-grid{grid-template-columns:1fr}.owner-view-left{position:static}}
@media(max-width:900px){.project-detail-summary,.project-detail-groups.compact{grid-template-columns:1fr}}
@media(max-width:800px){.project-full-grid,.compact-detail-list{grid-template-columns:1fr}.service-invoice-table,.cr-table{min-width:980px}.app-modal{padding:10px}.app-modal-panel{padding:16px}.si-ledger-head{display:grid}.si-ledger-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.si-ledger-metrics div:nth-child(2){border-right:0}.si-ledger-metrics div:nth-child(-n+2){border-bottom:1px solid #edf2f8}.cr-ledger-item{grid-template-columns:1fr 1fr}.cr-ledger-id{grid-column:1/-1}.si-ledger-total{grid-template-columns:1fr 1fr}.si-ledger-total span{grid-column:1/-1;border-right:0;border-bottom:1px solid rgba(255,255,255,.12)}}
@media print{.project-detail-print{font-family:Arial,Helvetica,sans-serif!important}.project-detail-print>.report-head{display:flex!important}.project-detail-screen-head{display:none!important}.project-detail-stats{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:4px!important;margin:0 0 7px!important}.project-detail-stats .stat-card{border:1px solid #000!important;padding:5px!important;box-shadow:none!important;border-radius:0!important;background:#fff!important}.project-detail-stats .stat-card:after{display:none!important}.project-detail-stats .stat-card span{font-size:7.5px!important;color:#000!important;letter-spacing:0!important}.project-detail-stats .stat-card strong{font-size:11px!important;color:#000!important;margin-top:2px!important}.project-detail-stats .stat-card small{font-size:7px!important;color:#000!important}.project-detail-main-grid,.owner-view-main-grid{display:block!important}.project-detail-right .project-detail-section,.owner-view-left{position:static!important}.project-detail-section{box-shadow:none!important;border:0!important;border-radius:0!important;padding:0!important;margin:0 0 7px!important;background:#fff!important;break-inside:avoid}.project-detail-section .section-title{margin:0 0 3px!important}.project-detail-section .section-title h2{font-size:12px!important;color:#000!important}.project-detail-summary{display:grid!important;grid-template-columns:2fr 1fr!important;gap:0!important;border-top:1px solid #000!important;border-left:1px solid #000!important;margin-bottom:4px!important}.project-summary-main,.project-summary-side{border:0!important;border-right:1px solid #000!important;border-bottom:1px solid #000!important;border-radius:0!important;background:#fff!important;padding:4px!important}.project-summary-main span,.project-summary-side span{font-size:7px!important;color:#000!important;letter-spacing:0!important}.project-summary-main strong{font-size:10px!important;color:#000!important}.project-summary-main small,.project-summary-side strong{font-size:8px!important;color:#000!important}.project-detail-groups{gap:5px!important}.project-detail-groups.compact{display:grid!important;grid-template-columns:1fr 1fr!important}.project-detail-groups section{border:0!important;border-radius:0!important;background:#fff!important;padding:0!important}.project-detail-groups .minor-group{grid-column:1/-1!important}.project-detail-groups h3{font-size:10px!important;color:#000!important;margin:0 0 2px!important}.project-full-grid,.compact-detail-list{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:0!important;border-top:1px solid #000!important;border-left:1px solid #000!important}.project-full-grid .project-detail-item,.compact-detail-list div{border:0!important;border-right:1px solid #000!important;border-bottom:1px solid #000!important;border-radius:0!important;background:#fff!important;padding:4px!important}.project-full-grid .project-detail-item span,.compact-detail-list span{font-size:7px!important;color:#000!important;letter-spacing:0!important}.project-full-grid .project-detail-item strong,.compact-detail-list strong{font-size:8.5px!important;color:#000!important;margin-top:1px!important}.on-file-detail-grid{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:0!important;border-top:1px solid #000!important;border-left:1px solid #000!important}.on-file-detail-item{border:0!important;border-right:1px solid #000!important;border-bottom:1px solid #000!important;border-radius:0!important;background:#fff!important;padding:4px!important;gap:4px!important}.on-file-detail-item.complete{background:#fff!important}.on-file-marker{width:24px!important;min-width:24px!important;height:18px!important;border:1px solid #000!important;background:#fff!important;color:#000!important;font-size:7px!important}.on-file-detail-item small{font-size:7px!important;color:#000!important;letter-spacing:0!important}.on-file-detail-item strong{font-size:8.5px!important;color:#000!important}.project-detail-si-table{min-width:0!important}.project-detail-si-table th:nth-child(1),.project-detail-si-table td:nth-child(1){width:8%!important}.project-detail-si-table th:nth-child(2),.project-detail-si-table td:nth-child(2){width:9%!important}.project-detail-si-table th:nth-child(3),.project-detail-si-table td:nth-child(3){width:21%!important}.project-detail-si-table th:nth-child(4),.project-detail-si-table td:nth-child(4){width:8%!important}.project-detail-si-table th:nth-child(5),.project-detail-si-table td:nth-child(5){width:8%!important}.project-detail-si-table th:nth-child(6),.project-detail-si-table td:nth-child(6){width:8%!important}.project-detail-si-table th:nth-child(7),.project-detail-si-table td:nth-child(7){width:8%!important}.project-detail-si-table th:nth-child(8),.project-detail-si-table td:nth-child(8){width:7%!important}.project-detail-si-table th:nth-child(9),.project-detail-si-table td:nth-child(9){width:8%!important}.project-detail-si-table th:nth-child(10),.project-detail-si-table td:nth-child(10){width:8%!important}.project-detail-si-table th:nth-child(11),.project-detail-si-table td:nth-child(11){width:7%!important}.project-detail-print .empty-state{padding:8px!important;font-size:9px!important;color:#000!important}.cr-subrow td{font-size:7.8px!important}}
@media print{.project-detail-si-table th:nth-child(1),.project-detail-si-table td:nth-child(1){width:7%!important}.project-detail-si-table th:nth-child(2),.project-detail-si-table td:nth-child(2){width:7%!important}.project-detail-si-table th:nth-child(3),.project-detail-si-table td:nth-child(3){width:7%!important}.project-detail-si-table th:nth-child(4),.project-detail-si-table td:nth-child(4){width:18%!important}.project-detail-si-table th:nth-child(5),.project-detail-si-table td:nth-child(5){width:8%!important}.project-detail-si-table th:nth-child(6),.project-detail-si-table td:nth-child(6){width:8%!important}.project-detail-si-table th:nth-child(7),.project-detail-si-table td:nth-child(7){width:8%!important}.project-detail-si-table th:nth-child(8),.project-detail-si-table td:nth-child(8){width:7%!important}.project-detail-si-table th:nth-child(9),.project-detail-si-table td:nth-child(9){width:7%!important}.project-detail-si-table th:nth-child(10),.project-detail-si-table td:nth-child(10){width:8%!important}.project-detail-si-table th:nth-child(11),.project-detail-si-table td:nth-child(11){width:8%!important}.project-detail-si-table th:nth-child(12),.project-detail-si-table td:nth-child(12){width:7%!important}}
@media print{.si-ledger{gap:5px!important}.si-ledger-card{break-inside:avoid;border:1px solid #000!important;border-radius:0!important;box-shadow:none!important;background:#fff!important}.si-ledger-head{display:flex!important;padding:4px!important;border-bottom:1px solid #000!important;background:#fff!important}.si-ledger-head h3{font-size:10px!important;color:#000!important;margin:1px 0!important}.si-ledger-head p{font-size:8px!important;color:#000!important}.si-progress{display:none!important}.si-ledger-metrics{display:grid!important;grid-template-columns:repeat(5,1fr)!important;border-bottom:1px solid #000!important}.si-ledger-metrics div{padding:4px!important;border-right:1px solid #000!important}.si-ledger-metrics span,.cr-ledger-item span{font-size:7px!important;color:#000!important;letter-spacing:0!important}.si-ledger-metrics strong,.cr-ledger-item strong{font-size:8px!important;color:#000!important}.cr-ledger-block{padding:4px!important;background:#fff!important}.cr-ledger-title{margin-bottom:3px!important}.cr-ledger-title strong,.cr-ledger-title span{font-size:8px!important;color:#000!important}.cr-ledger-list{gap:0!important;border-top:1px solid #000!important;border-left:1px solid #000!important}.cr-ledger-item{display:grid!important;grid-template-columns:1.2fr repeat(3,1fr)!important;gap:0!important;border:0!important;border-radius:0!important;padding:0!important;background:#fff!important}.cr-ledger-item>div{padding:3px!important;border-right:1px solid #000!important;border-bottom:1px solid #000!important}.cr-ledger-item p{grid-column:1/-1!important;padding:3px!important;border-right:1px solid #000!important;border-bottom:1px solid #000!important;border-top:0!important;font-size:8px!important;color:#000!important}.cr-ledger-empty{border:1px solid #000!important;border-radius:0!important;padding:4px!important;font-size:8px!important;color:#000!important}.si-ledger-total{display:grid!important;grid-template-columns:repeat(6,1fr)!important;border:1px solid #000!important;border-radius:0!important;background:#fff!important;color:#000!important}.si-ledger-total span,.si-ledger-total strong{padding:4px!important;border-right:1px solid #000!important;font-size:8px!important;color:#000!important}}
.project-detail-right .si-ledger{max-height:min(760px,calc(100vh - 230px));overflow-y:auto;overflow-x:hidden;padding:2px 8px 2px 2px;scrollbar-color:#9fb5d6 #eef3f8;scrollbar-width:thin}.project-detail-right .si-ledger::-webkit-scrollbar{width:10px}.project-detail-right .si-ledger::-webkit-scrollbar-thumb{background:#9fb5d6;border-radius:999px;border:2px solid #eef3f8}.project-detail-right .si-ledger::-webkit-scrollbar-track{background:#eef3f8;border-radius:999px}.si-ledger-card{position:relative}.si-ledger-card:before{content:"";position:absolute;inset:0 auto 0 0;width:6px;background:#94a3b8}.si-ledger-card.status-collected{border-color:#a8e7c4;background:linear-gradient(180deg,#ffffff,#f3fff8)}.si-ledger-card.status-collected:before{background:#19b86a}.si-ledger-card.status-collected .si-ledger-head{background:linear-gradient(180deg,#f0fff7,#ffffff)}.si-ledger-card.status-collected .si-progress span{background:linear-gradient(90deg,#10b8d5,#19b86a)}.si-ledger-card.status-partial{border-color:#f1d28d;background:linear-gradient(180deg,#ffffff,#fffaf0)}.si-ledger-card.status-partial:before{background:#f59e0b}.si-ledger-card.status-partial .si-ledger-head{background:linear-gradient(180deg,#fff8e8,#ffffff)}.si-ledger-card.status-partial .si-progress span{background:linear-gradient(90deg,#f59e0b,#10b8d5)}.si-ledger-card.status-uncollected{border-color:#f3babd;background:linear-gradient(180deg,#ffffff,#fff7f7)}.si-ledger-card.status-uncollected:before{background:#e5484d}.si-ledger-card.status-uncollected .si-ledger-head{background:linear-gradient(180deg,#fff2f2,#ffffff)}.si-ledger-card.status-uncollected .si-progress span{background:#e5484d}.cr-ledger-list{max-height:280px;overflow-y:auto;padding-right:4px;scrollbar-color:#bdd0e7 #f2f6fb;scrollbar-width:thin}.cr-ledger-list::-webkit-scrollbar{width:8px}.cr-ledger-list::-webkit-scrollbar-thumb{background:#bdd0e7;border-radius:999px;border:2px solid #f2f6fb}.cr-ledger-item{border-left:5px solid #10b8d5}.cr-ledger-item:nth-child(3n+2){border-left-color:#19b86a;background:#fbfffd}.cr-ledger-item:nth-child(3n+3){border-left-color:#f59e0b;background:#fffdf7}.cr-ledger-id{padding:8px;border-radius:10px;background:#eef7ff}.cr-ledger-item:nth-child(3n+2) .cr-ledger-id{background:#eafff2}.cr-ledger-item:nth-child(3n+3) .cr-ledger-id{background:#fff5dc}.si-ledger-total{position:sticky;bottom:0;z-index:3;box-shadow:0 -10px 24px rgba(15,35,65,.14)}
@media(max-width:1200px){.project-detail-right .si-ledger{max-height:none;overflow:visible;padding-right:0}.cr-ledger-list{max-height:240px}}
@media print{.project-detail-right .si-ledger,.cr-ledger-list{max-height:none!important;overflow:visible!important;padding-right:0!important}.si-ledger-total{position:static!important;box-shadow:none!important}.si-ledger-card:before{display:none!important}}
.project-sheet-layout{display:grid;gap:16px}.project-sheet-top{display:grid;grid-template-columns:minmax(360px,.95fr) minmax(460px,1.05fr);gap:16px;align-items:stretch}.project-sheet-card{border:1px solid #d9e5f2;border-radius:16px;background:rgba(255,255,255,.95);box-shadow:0 16px 42px rgba(15,35,65,.08);overflow:hidden}.project-sheet-info{display:grid;grid-template-columns:minmax(112px,150px) minmax(0,1fr)}.sheet-info-row{display:contents}.sheet-info-row span,.sheet-info-row strong{padding:8px 10px;border-bottom:1px solid #e6edf5;min-width:0}.sheet-info-row span{color:#334155;font-size:12px;font-weight:850}.sheet-info-row strong{color:#0d1b52;font-size:14px;line-height:1.25;overflow-wrap:anywhere}.sheet-info-row.strong strong{font-size:19px;font-weight:950;text-transform:uppercase}.sheet-info-row.highlight span,.sheet-info-row.highlight strong{background:#e9fff0;color:#073b21}.sheet-info-row.highlight strong{font-size:20px}.sheet-info-row.danger span,.sheet-info-row.danger strong{color:#d22536}.sheet-info-row:last-child span,.sheet-info-row:last-child strong{border-bottom:0}.bond-sheet{display:grid;grid-template-columns:minmax(106px,.23fr) minmax(0,1fr)}.bond-provider{grid-row:1/3;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:16px 12px;text-align:center;background:linear-gradient(180deg,#f8fbff,#eef6ff);border-right:1px solid #dbe7f3}.bond-provider span,.sheet-note-grid span,.sheet-contact-grid span{color:#64748b;font-size:10px;font-weight:950;text-transform:uppercase;letter-spacing:.55px}.bond-provider strong{color:#0d1b52;font-size:16px;line-height:1.25}.bond-provider small{color:#64748b;font-weight:800;line-height:1.25}.bond-list{display:grid}.bond-row{display:grid;grid-template-columns:minmax(180px,.48fr) minmax(0,1fr);min-height:58px;border-bottom:1px solid #e6edf5}.bond-name{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:10px 12px;background:#f7fafc;border-right:1px solid #e6edf5;color:#0d1b52;font-weight:950}.bond-name span{overflow-wrap:normal;word-break:normal;hyphens:none}.bond-name b{flex:0 0 auto;border-radius:999px;padding:4px 7px;background:#fff1f1;color:#b42318;font-size:10px}.bond-row.complete .bond-name{background:#84e49b;color:#062b17}.bond-row.complete .bond-name b{background:#dfffea;color:#08733f}.bond-detail{padding:9px 12px;min-width:0}.bond-detail strong{display:block;color:#111827;font-size:13px;line-height:1.3;overflow-wrap:anywhere}.bond-detail small{display:block;margin-top:3px;color:#64748b;font-size:11px;font-weight:800}.bond-total{grid-column:2;display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:8px 12px;border-top:2px solid #0f172a;background:#fbfdff;font-weight:950}.bond-total span{color:#0f172a;text-transform:uppercase;font-size:11px}.bond-total strong{color:#0d1b52;font-size:15px}.sheet-note-grid,.sheet-contact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px}.sheet-contact-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.sheet-note-grid div,.sheet-contact-grid div{min-width:0;padding:10px 12px;border:1px solid #e5edf6;border-radius:12px;background:#fbfdff}.sheet-note-grid strong,.sheet-contact-grid strong{display:block;margin-top:5px;color:#142949;font-size:13px;line-height:1.35;overflow-wrap:anywhere}.project-ledger-card{padding:16px}.project-sheet-table-wrap{border-radius:14px}.project-sheet-ledger{min-width:1180px;table-layout:fixed}.project-sheet-ledger th{text-align:center;font-size:10.5px;border-bottom:2px solid #142949}.project-sheet-ledger th:nth-child(1){width:16%}.project-sheet-ledger th:nth-child(2){width:6%}.project-sheet-ledger th:nth-child(3){width:7%}.project-sheet-ledger th:nth-child(4),.project-sheet-ledger th:nth-child(5){width:10%}.project-sheet-ledger th:nth-child(6),.project-sheet-ledger th:nth-child(8){width:8%}.project-sheet-ledger th:nth-child(7),.project-sheet-ledger th:nth-child(9),.project-sheet-ledger th:nth-child(11){width:10%}.project-sheet-ledger th:nth-child(10){width:13%}.project-sheet-ledger td{vertical-align:top}.project-sheet-ledger td>strong{display:block;color:#0d1b52;font-size:12.5px;line-height:1.25;overflow-wrap:anywhere}.project-sheet-ledger td>small,.project-sheet-ledger td .pill+small{display:block;margin-top:4px;color:#64748b;font-size:10.5px;font-weight:800;line-height:1.25;overflow-wrap:anywhere}.project-sheet-ledger .ref-cell{font-weight:950;color:#0d1b52}.project-sheet-ledger .ledger-highlight td{background:#fffef0!important}.project-sheet-ledger .ledger-highlight td:first-child,.project-sheet-ledger .ledger-highlight .ref-cell{background:#fff200!important;color:#111827}.project-sheet-ledger .sheet-ledger-total td{background:#071109!important;color:#00f060!important;font-weight:950!important;border-bottom:0}.project-sheet-ledger .sheet-ledger-total .num{color:#00f060!important}.project-sheet-ledger .sheet-ledger-total td:first-child{letter-spacing:.4px}@media(max-width:1200px){.project-sheet-top{grid-template-columns:1fr}.bond-provider{grid-row:auto;border-right:0;border-bottom:1px solid #dbe7f3}.bond-sheet{grid-template-columns:1fr}.bond-total{grid-column:1}.sheet-contact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:800px){.project-sheet-info{grid-template-columns:minmax(96px,120px) minmax(0,1fr)}.sheet-info-row.strong strong,.sheet-info-row.highlight strong{font-size:15px}.bond-row{grid-template-columns:1fr}.bond-name{border-right:0;border-bottom:1px solid #e6edf5}.sheet-note-grid,.sheet-contact-grid{grid-template-columns:1fr}.project-ledger-card{padding:12px}}@media print{.project-sheet-layout{gap:5px!important}.project-sheet-top{grid-template-columns:1fr 1fr!important;gap:5px!important}.project-sheet-card{box-shadow:none!important;border:1px solid #000!important;border-radius:0!important;background:#fff!important;break-inside:avoid}.project-sheet-info{grid-template-columns:28mm 1fr!important}.sheet-info-row span,.sheet-info-row strong{padding:3px 4px!important;border-color:#000!important;font-size:8px!important;color:#000!important;background:#fff!important}.sheet-info-row.strong strong,.sheet-info-row.highlight strong{font-size:10px!important}.sheet-info-row.highlight span,.sheet-info-row.highlight strong{background:#eaffea!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.sheet-info-row.danger span,.sheet-info-row.danger strong{color:#b00020!important}.bond-sheet{grid-template-columns:22mm 1fr!important}.bond-provider{grid-row:1/3!important;border-right:1px solid #000!important;border-bottom:0!important;padding:4px!important}.bond-provider span,.bond-provider small{font-size:6.5px!important;color:#000!important;letter-spacing:0!important}.bond-provider strong{font-size:8px!important;color:#000!important}.bond-row{grid-template-columns:34mm 1fr!important;min-height:0!important;border-color:#000!important}.bond-name,.bond-detail{padding:3px 4px!important;border-color:#000!important;background:#fff!important;color:#000!important}.bond-row.complete .bond-name{background:#eaffea!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.bond-name span,.bond-detail strong{font-size:7.5px!important;color:#000!important}.bond-name b,.bond-detail small{font-size:6.5px!important;color:#000!important;background:#fff!important;padding:0!important}.bond-total{grid-column:2!important;padding:3px 4px!important;border-color:#000!important}.bond-total span,.bond-total strong{font-size:7.5px!important;color:#000!important}.sheet-note-grid,.sheet-contact-grid{display:none!important}.project-ledger-card{padding:0!important}.project-ledger-card .section-title{display:none!important}.project-sheet-table-wrap{border:0!important;border-radius:0!important;box-shadow:none!important}.project-sheet-ledger{min-width:0!important;table-layout:fixed!important}.project-sheet-ledger th,.project-sheet-ledger td{padding:3px 4px!important;font-size:7.2px!important;border-color:#000!important;color:#000!important}.project-sheet-ledger td>strong,.project-sheet-ledger td>small,.project-sheet-ledger td .pill+small{font-size:7px!important;color:#000!important}.project-sheet-ledger .pill{background:#fff!important;color:#000!important;border:0!important;padding:0!important}.project-sheet-ledger .ledger-highlight td:first-child,.project-sheet-ledger .ledger-highlight .ref-cell{background:#ffffa8!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.project-sheet-ledger .sheet-ledger-total td{background:#fff!important;color:#000!important;border-top:2px solid #000!important}}
.side-nav a span{font-size:0!important}.nav-icon{width:17px;height:17px;display:block;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.side-nav a span .nav-icon{color:inherit}.side-nav a:hover .nav-icon,.side-nav a.active .nav-icon{color:inherit}.logout{width:36px;height:36px;padding:0!important;display:inline-grid!important;place-items:center;flex:0 0 auto}.logout .nav-icon{width:17px;height:17px;color:#fff}
.sidebar{transition:width .2s ease,padding .2s ease}.side-brand{position:relative}.side-brand>div:nth-child(2),.side-nav a b,.nav-section,.side-user>div:nth-child(2){transition:opacity .16s ease,width .2s ease}.sidebar-collapse-btn{margin-left:auto;width:32px;height:32px;border:1px solid rgba(255,255,255,.16);border-radius:10px;background:rgba(255,255,255,.10);color:#fff;display:grid;place-items:center;cursor:pointer;transition:.18s ease;flex:0 0 auto}.sidebar-collapse-btn:hover{background:rgba(255,255,255,.18)}.collapse-icon{width:14px;height:14px;position:relative;display:block}.collapse-icon:before,.collapse-icon:after{content:"";position:absolute;top:50%;width:9px;height:2px;border-radius:999px;background:currentColor;transform-origin:center}.collapse-icon:before{left:1px;transform:translateY(-50%) rotate(45deg)}.collapse-icon:after{right:1px;transform:translateY(-50%) rotate(-45deg)}.app-shell.sidebar-collapsed .sidebar{width:86px;padding-left:12px;padding-right:12px}.app-shell.sidebar-collapsed .side-brand{justify-content:center;padding:10px}.app-shell.sidebar-collapsed .side-brand>div:nth-child(2),.app-shell.sidebar-collapsed .side-nav a b,.app-shell.sidebar-collapsed .nav-section,.app-shell.sidebar-collapsed .side-user>div:nth-child(2){width:0;opacity:0;overflow:hidden;white-space:nowrap;pointer-events:none}.app-shell.sidebar-collapsed .side-brand-mark{width:42px;height:42px}.app-shell.sidebar-collapsed .sidebar-collapse-btn{position:absolute;right:-18px;top:50%;transform:translateY(-50%);background:#10213d;box-shadow:0 10px 24px rgba(8,20,38,.26)}.app-shell.sidebar-collapsed .collapse-icon:before{transform:translateY(-50%) rotate(-45deg)}.app-shell.sidebar-collapsed .collapse-icon:after{transform:translateY(-50%) rotate(45deg)}.app-shell.sidebar-collapsed .side-nav a{justify-content:center;padding:10px 8px}.app-shell.sidebar-collapsed .side-nav a:hover,.app-shell.sidebar-collapsed .side-nav a.active{transform:none}.app-shell.sidebar-collapsed .side-user{justify-content:center;padding:10px 8px}.app-shell.sidebar-collapsed .avatar{width:38px;height:38px;flex:0 0 auto}.app-shell.sidebar-collapsed .logout{display:none!important}
@media(max-width:800px){.app-shell.sidebar-collapsed .sidebar{width:268px;padding:18px 15px}.app-shell.sidebar-collapsed .side-brand{justify-content:flex-start;padding:11px}.app-shell.sidebar-collapsed .side-brand>div:nth-child(2),.app-shell.sidebar-collapsed .side-nav a b,.app-shell.sidebar-collapsed .nav-section,.app-shell.sidebar-collapsed .side-user>div:nth-child(2){width:auto;opacity:1;overflow:visible;white-space:normal;pointer-events:auto}.app-shell.sidebar-collapsed .sidebar-collapse-btn{position:static;right:auto;top:auto;transform:none;background:rgba(255,255,255,.10);box-shadow:none}.app-shell.sidebar-collapsed .side-nav a{justify-content:flex-start;padding:10px 11px}.app-shell.sidebar-collapsed .side-user{justify-content:flex-start;padding:12px}.app-shell.sidebar-collapsed .logout{display:inline-grid!important}}

/* Project Detail - modern Excel-style worksheet layout */
.project-detail-sheet-modern{background:linear-gradient(180deg,#f8fbff,#ffffff);border:1px solid #dbe7f4}
.project-detail-sheet-modern .project-sheet-layout{gap:14px}
.project-detail-sheet-modern .sheet-spreadsheet-top{grid-template-columns:minmax(390px,.9fr) minmax(560px,1.1fr);align-items:stretch}
.project-detail-sheet-modern .sheet-main-info-card{border-radius:18px;background:#fff;box-shadow:0 18px 46px rgba(15,35,65,.09)}
.project-detail-sheet-modern .sheet-info-row span{display:flex;align-items:center;background:#f8fafc;border-right:1px solid #e6edf5;color:#26364f;font-weight:950}
.project-detail-sheet-modern .sheet-info-row strong{background:#fff;color:#0a1641;font-weight:900}
.project-detail-sheet-modern .sheet-info-row.project-name-row strong{font-size:18px;letter-spacing:.01em;text-transform:uppercase;line-height:1.18}
.project-detail-sheet-modern .sheet-info-row.po-row span,
.project-detail-sheet-modern .sheet-info-row.po-row strong{background:#00f018!important;color:#001d08!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.project-detail-sheet-modern .sheet-info-row.po-row strong{font-size:21px;letter-spacing:.02em}
.project-detail-sheet-modern .sheet-info-row.amount-row strong{font-size:17px;color:#111827}
.project-detail-sheet-modern .sheet-info-row.danger span,
.project-detail-sheet-modern .sheet-info-row.danger strong{color:#de1d2d!important}
.project-detail-sheet-modern .sheet-bond-table-card{border-radius:18px;background:#fff;box-shadow:0 18px 46px rgba(15,35,65,.09)}
.project-detail-sheet-modern .sheet-bond-table-card .bond-provider{background:linear-gradient(180deg,#ffffff,#f4f9ff);border-right:2px solid #111827}
.project-detail-sheet-modern .sheet-bond-table-card .bond-provider strong{font-size:15px;text-transform:uppercase;letter-spacing:.02em}
.project-detail-sheet-modern .sheet-bond-table-card .bond-row{display:grid;grid-template-columns:minmax(170px,.34fr) minmax(0,1fr) minmax(112px,.2fr);border-bottom:1px solid #111827;min-height:62px}
.project-detail-sheet-modern .sheet-bond-table-card .bond-name{border-right:1px solid #dbe5f0;background:#f8fafc}
.project-detail-sheet-modern .sheet-bond-table-card .bond-row.complete .bond-name{background:#78e190!important;color:#052911;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.project-detail-sheet-modern .sheet-bond-table-card .bond-detail{display:flex;flex-direction:column;justify-content:center}
.project-detail-sheet-modern .sheet-bond-table-card .bond-amount{display:flex;align-items:center;justify-content:flex-end;padding:9px 12px;border-left:1px solid #dbe5f0;color:#111827;font-weight:950;font-variant-numeric:tabular-nums;background:#fbfdff}
.project-detail-sheet-modern .sheet-bond-table-card .bond-total{border-top:2px solid #111827;background:#fff;grid-column:2;padding-right:12px}
.project-detail-sheet-modern .ledger-rate-chip{display:grid;gap:3px;text-align:right;padding:8px 12px;border:1px solid #dbe8f5;border-radius:12px;background:#f8fbff}
.project-detail-sheet-modern .ledger-rate-chip span{font-size:10px;font-weight:950;text-transform:uppercase;letter-spacing:.45px;color:#64748b}
.project-detail-sheet-modern .ledger-rate-chip strong{font-size:15px;color:#0d1b52}
.project-detail-sheet-modern .sheet-ledger-card-modern{border-radius:18px;box-shadow:0 18px 46px rgba(15,35,65,.09)}
.project-detail-sheet-modern .excel-like-ledger{min-width:1380px;table-layout:fixed}
.project-detail-sheet-modern .excel-like-ledger th{background:#f8fafc;color:#111827;border:1px solid #111827!important;border-bottom:2px solid #111827!important;text-align:center;font-size:10.5px;text-transform:none;letter-spacing:0}
.project-detail-sheet-modern .excel-like-ledger td{border:1px solid #111827!important;padding:7px 6px;font-size:11px;vertical-align:middle}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(1){width:13.5%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(2){width:5.5%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(3){width:5.5%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(4){width:9%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(5){width:10%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(6){width:8%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(7){width:9%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(8){width:9%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(9){width:7%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(10){width:9%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(11){width:9%}
.project-detail-sheet-modern .excel-like-ledger th:nth-child(12){width:9%}
.project-detail-sheet-modern .excel-like-ledger td>strong{font-size:11.5px;color:#111827}
.project-detail-sheet-modern .excel-like-ledger td>small,
.project-detail-sheet-modern .excel-like-ledger td .pill+small{font-size:9.5px;color:#475569}
.project-detail-sheet-modern .excel-like-ledger .actual-cell{color:#0a7a2f;font-weight:950}
.project-detail-sheet-modern .excel-like-ledger .ref-cell{background:#f7fff9;color:#0f172a;font-weight:950}
.project-detail-sheet-modern .excel-like-ledger .ledger-highlight td{background:#fff200!important;color:#111827!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td{background:#ffffff!important;color:#111827!important;border-top:3px solid #111827!important;font-weight:950!important}
.project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td:nth-child(2){background:#00f018!important;color:#001d08!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total .num{color:#111827!important}
@media(max-width:1200px){.project-detail-sheet-modern .sheet-spreadsheet-top{grid-template-columns:1fr}.project-detail-sheet-modern .sheet-bond-table-card .bond-provider{border-right:0;border-bottom:2px solid #111827}.project-detail-sheet-modern .sheet-bond-table-card .bond-row{grid-template-columns:minmax(160px,.35fr) minmax(0,1fr) minmax(105px,.22fr)}}
@media(max-width:800px){.project-detail-sheet-modern .sheet-bond-table-card .bond-row{grid-template-columns:1fr}.project-detail-sheet-modern .sheet-bond-table-card .bond-amount{justify-content:flex-start;border-left:0;border-top:1px solid #e6edf5}.project-detail-sheet-modern .ledger-rate-chip{display:none}.project-detail-sheet-modern .excel-like-ledger{min-width:1200px}}
@media print{
    .project-detail-sheet-modern{background:#fff!important;border:0!important}
    .project-detail-sheet-modern .project-sheet-layout{gap:4px!important}
    .project-detail-sheet-modern .sheet-spreadsheet-top{grid-template-columns:45% 55%!important;gap:4px!important}
    .project-detail-sheet-modern .project-sheet-card{border:1px solid #000!important;border-radius:0!important;box-shadow:none!important}
    .project-detail-sheet-modern .sheet-main-info-card{grid-template-columns:24mm 1fr!important}
    .project-detail-sheet-modern .sheet-info-row span,
    .project-detail-sheet-modern .sheet-info-row strong{padding:2.6px 3px!important;border-color:#000!important;font-size:7.4px!important;background:#fff!important;color:#000!important;line-height:1.08!important}
    .project-detail-sheet-modern .sheet-info-row.project-name-row strong{font-size:9px!important;line-height:1.05!important}
    .project-detail-sheet-modern .sheet-info-row.po-row span,
    .project-detail-sheet-modern .sheet-info-row.po-row strong{background:#00f018!important;color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;font-size:10px!important}
    .project-detail-sheet-modern .sheet-info-row.amount-row strong{font-size:8.5px!important}
    .project-detail-sheet-modern .sheet-bond-table-card{grid-template-columns:19mm 1fr!important}
    .project-detail-sheet-modern .sheet-bond-table-card .bond-provider{grid-row:1/3!important;border-right:1px solid #000!important;border-bottom:0!important;padding:2px!important;background:#fff!important}
    .project-detail-sheet-modern .sheet-bond-table-card .bond-provider span,
    .project-detail-sheet-modern .sheet-bond-table-card .bond-provider small{font-size:5.5px!important;letter-spacing:0!important;color:#000!important}
    .project-detail-sheet-modern .sheet-bond-table-card .bond-provider strong{font-size:7px!important;color:#000!important}
    .project-detail-sheet-modern .sheet-bond-table-card .bond-row{grid-template-columns:28mm 1fr 22mm!important;min-height:0!important;border-color:#000!important}
    .project-detail-sheet-modern .sheet-bond-table-card .bond-name,
    .project-detail-sheet-modern .sheet-bond-table-card .bond-detail,
    .project-detail-sheet-modern .sheet-bond-table-card .bond-amount{padding:2.4px 3px!important;border-color:#000!important;background:#fff!important;color:#000!important}
    .project-detail-sheet-modern .sheet-bond-table-card .bond-row.complete .bond-name{background:#78e190!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
    .project-detail-sheet-modern .sheet-bond-table-card .bond-name span,
    .project-detail-sheet-modern .sheet-bond-table-card .bond-detail strong,
    .project-detail-sheet-modern .sheet-bond-table-card .bond-amount{font-size:6.3px!important;color:#000!important;line-height:1.05!important}
    .project-detail-sheet-modern .sheet-bond-table-card .bond-name b,
    .project-detail-sheet-modern .sheet-bond-table-card .bond-detail small{font-size:5.3px!important;color:#000!important;background:transparent!important;padding:0!important}
    .project-detail-sheet-modern .sheet-bond-table-card .bond-total{grid-column:2!important;padding:2px 3px!important;border-color:#000!important;background:#fff!important}
    .project-detail-sheet-modern .sheet-bond-table-card .bond-total span,
    .project-detail-sheet-modern .sheet-bond-table-card .bond-total strong{font-size:6.5px!important;color:#000!important}
    .project-detail-sheet-modern .sheet-ledger-card-modern{padding:0!important}
    .project-detail-sheet-modern .sheet-ledger-card-modern .section-title{display:none!important}
    .project-detail-sheet-modern .excel-like-ledger{min-width:0!important;table-layout:fixed!important;width:100%!important}
    .project-detail-sheet-modern .excel-like-ledger th,
    .project-detail-sheet-modern .excel-like-ledger td{padding:2.4px 2px!important;font-size:5.8px!important;border:1px solid #000!important;color:#000!important;line-height:1.05!important;background:#fff!important}
    .project-detail-sheet-modern .excel-like-ledger td>strong,
    .project-detail-sheet-modern .excel-like-ledger td>small,
    .project-detail-sheet-modern .excel-like-ledger td .pill+small{font-size:5.6px!important;color:#000!important;line-height:1.05!important}
    .project-detail-sheet-modern .excel-like-ledger .pill{display:inline!important;background:transparent!important;border:0!important;box-shadow:none!important;color:#000!important;padding:0!important;font-size:5.6px!important}
    .project-detail-sheet-modern .excel-like-ledger .ledger-highlight td{background:#fff200!important;color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
    .project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td{background:#fff!important;color:#000!important;border-top:2px solid #000!important;font-weight:950!important}
    .project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td:nth-child(2){background:#00f018!important;color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Project Detail refresh - cleaner worksheet layout */
.project-detail-sheet-modern{background:#f6f8fc;border:1px solid #dbe3ef;border-radius:24px}
.project-detail-sheet-modern .project-detail-screen-head{margin-bottom:12px}
.project-detail-sheet-modern .project-detail-screen-head h2{margin-bottom:4px}
.project-detail-sheet-modern .modern-sheet-layout{gap:18px}
.project-detail-sheet-modern .project-summary-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.project-detail-sheet-modern .summary-chip{background:linear-gradient(180deg,#fff,#f8fbff);border:1px solid #dce6f2;border-radius:16px;padding:14px 16px;box-shadow:0 10px 30px rgba(17,34,68,.06)}
.project-detail-sheet-modern .summary-chip span,.project-detail-sheet-modern .worksheet-card-head p,.project-detail-sheet-modern .worksheet-note-card span,.project-detail-sheet-modern .contact-chip span{display:block;color:#6b7a90;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.project-detail-sheet-modern .summary-chip strong{display:block;margin-top:6px;color:#122247;font-size:20px;line-height:1.15}
.project-detail-sheet-modern .worksheet-grid{display:grid;grid-template-columns:minmax(360px,.9fr) minmax(520px,1.1fr);gap:18px;align-items:start}
.project-detail-sheet-modern .worksheet-card{background:#fff;border:1px solid #dce6f2;border-radius:20px;box-shadow:0 16px 40px rgba(17,34,68,.08);overflow:hidden}
.project-detail-sheet-modern .worksheet-card-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;padding:16px 18px 12px;border-bottom:1px solid #e8eef6;background:linear-gradient(180deg,#ffffff,#fbfdff)}
.project-detail-sheet-modern .worksheet-card-head h3,.project-detail-sheet-modern .worksheet-ledger-head h3{margin:0;color:#10224b;font-size:20px;line-height:1.1}
.project-detail-sheet-modern .worksheet-card-head p,.project-detail-sheet-modern .worksheet-ledger-head p{margin:6px 0 0;text-transform:none;letter-spacing:0;font-size:13px;font-weight:600;color:#718198}
.project-detail-sheet-modern .worksheet-table{width:100%;border-collapse:collapse;table-layout:fixed}
.project-detail-sheet-modern .worksheet-table th,.project-detail-sheet-modern .worksheet-table td{border:1px solid #dbe5f0;padding:10px 12px;vertical-align:middle}
.project-detail-sheet-modern .worksheet-meta-table th{width:28%;background:#f5f8fc;color:#30415d;text-align:left;font-size:12px;font-weight:900;text-transform:none}
.project-detail-sheet-modern .worksheet-meta-table td{color:#0f1f43;font-size:14px;font-weight:800;line-height:1.25}
.project-detail-sheet-modern .worksheet-meta-table tr.project-name-row td{font-size:30px;font-weight:950;letter-spacing:.01em;text-transform:uppercase;line-height:1.05}
.project-detail-sheet-modern .worksheet-meta-table tr.project-name-row th{vertical-align:top}
.project-detail-sheet-modern .worksheet-meta-table tr.po-row th,
.project-detail-sheet-modern .worksheet-meta-table tr.po-row td{background:#16f32f;color:#03240c}
.project-detail-sheet-modern .worksheet-meta-table tr.po-row td{font-size:17px;font-weight:950}
.project-detail-sheet-modern .worksheet-meta-table tr.amount-row td{font-size:24px;font-weight:950}
.project-detail-sheet-modern .worksheet-meta-table tr.danger td{color:#d31d2f}
.project-detail-sheet-modern .worksheet-bond-table thead th{background:#f4f8fd;color:#122247;font-size:12px;font-weight:950}
.project-detail-sheet-modern .worksheet-bond-table .bond-side-head{width:13%;text-align:center}
.project-detail-sheet-modern .worksheet-bond-table .bond-side-cell{font-size:10px;font-weight:950;text-align:center;letter-spacing:.08em;background:#f8fafc;color:#6b7280}
.project-detail-sheet-modern .worksheet-bond-table .bond-label-cell strong{display:block;color:#122247;font-size:13px}
.project-detail-sheet-modern .worksheet-bond-table .bond-label-cell small{display:block;margin-top:4px;color:#73829a;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.project-detail-sheet-modern .worksheet-bond-table .bond-ref-cell{color:#132238;font-size:13px;line-height:1.25}
.project-detail-sheet-modern .worksheet-bond-table .bond-value-cell{font-weight:950;color:#122247;font-variant-numeric:tabular-nums}
.project-detail-sheet-modern .worksheet-bond-table tr.complete .bond-side-cell,
.project-detail-sheet-modern .worksheet-bond-table tr.complete .bond-label-cell{background:#84e49b;color:#052b12}
.project-detail-sheet-modern .worksheet-bond-table tr.complete .bond-label-cell strong,
.project-detail-sheet-modern .worksheet-bond-table tr.complete .bond-label-cell small{color:#052b12}
.project-detail-sheet-modern .worksheet-bond-table tfoot th{background:#f9fbff;color:#10224b;font-size:13px;font-weight:950}
.project-detail-sheet-modern .worksheet-note-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.project-detail-sheet-modern .worksheet-note-card{background:#fff;border:1px solid #dce6f2;border-radius:18px;padding:14px 16px;box-shadow:0 12px 28px rgba(17,34,68,.06)}
.project-detail-sheet-modern .worksheet-note-card strong{display:block;margin-top:7px;color:#13213d;font-size:14px;line-height:1.35}
.project-detail-sheet-modern .ledger-worksheet-card{padding:16px}
.project-detail-sheet-modern .worksheet-ledger-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:14px}
.project-detail-sheet-modern .project-sheet-table-wrap{border:1px solid #dce6f2;border-radius:18px;overflow:auto;background:#fff}
.project-detail-sheet-modern .excel-like-ledger{min-width:1380px;table-layout:fixed}
.project-detail-sheet-modern .excel-like-ledger th{background:#eef3f9;color:#10224b;border:1px solid #cdd9e8!important;border-bottom:2px solid #8396b0!important;text-align:center;font-size:11px;font-weight:950}
.project-detail-sheet-modern .excel-like-ledger td{border:1px solid #d9e2ee!important;padding:8px 7px;font-size:11px;vertical-align:top;color:#13213d}
.project-detail-sheet-modern .excel-like-ledger td>strong{font-size:12px;color:#10224b}
.project-detail-sheet-modern .excel-like-ledger td>small,.project-detail-sheet-modern .excel-like-ledger td .pill+small{font-size:10px;color:#708097;line-height:1.25}
.project-detail-sheet-modern .excel-like-ledger .actual-cell{font-weight:950;color:#0a7a2f}
.project-detail-sheet-modern .excel-like-ledger .ref-cell{background:#f9fbff;color:#10224b;font-weight:950}
.project-detail-sheet-modern .excel-like-ledger .ledger-highlight td{background:#fffad8!important}
.project-detail-sheet-modern .excel-like-ledger .ledger-highlight td:first-child,
.project-detail-sheet-modern .excel-like-ledger .ledger-highlight .ref-cell{background:#fff25b!important;color:#111827!important}
.project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td{background:#fbfdff!important;color:#101827!important;border-top:3px solid #1f2937!important;font-weight:950!important}
.project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td:nth-child(2){background:#16f32f!important;color:#04250d!important}
.project-detail-sheet-modern .project-contact-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.project-detail-sheet-modern .contact-chip{background:#fff;border:1px solid #dce6f2;border-radius:16px;padding:14px 16px;box-shadow:0 10px 26px rgba(17,34,68,.05)}
.project-detail-sheet-modern .contact-chip strong{display:block;margin-top:6px;color:#10224b;font-size:14px;line-height:1.3;overflow-wrap:anywhere}
@media(max-width:1200px){.project-detail-sheet-modern .project-summary-strip,.project-detail-sheet-modern .project-contact-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.project-detail-sheet-modern .worksheet-grid{grid-template-columns:1fr}}
@media(max-width:800px){.project-detail-sheet-modern .project-summary-strip,.project-detail-sheet-modern .worksheet-note-row,.project-detail-sheet-modern .project-contact-strip{grid-template-columns:1fr}.project-detail-sheet-modern .worksheet-meta-table tr.project-name-row td{font-size:22px}.project-detail-sheet-modern .worksheet-meta-table tr.amount-row td{font-size:20px}.project-detail-sheet-modern .worksheet-ledger-head{flex-direction:column;align-items:flex-start}.project-detail-sheet-modern .worksheet-card-head{align-items:flex-start;flex-direction:column}}
@media print{
    .project-detail-sheet-modern{background:#fff!important;border:0!important;border-radius:0!important;box-shadow:none!important}
    .project-detail-sheet-modern .project-summary-strip,.project-detail-sheet-modern .worksheet-card-head,.project-detail-sheet-modern .worksheet-ledger-head .ledger-rate-chip,.project-detail-sheet-modern .project-contact-strip{display:none!important}
    .project-detail-sheet-modern .worksheet-grid{grid-template-columns:42% 58%!important;gap:4px!important}
    .project-detail-sheet-modern .worksheet-card,.project-detail-sheet-modern .worksheet-note-card{border:1px solid #000!important;border-radius:0!important;box-shadow:none!important}
    .project-detail-sheet-modern .worksheet-table th,.project-detail-sheet-modern .worksheet-table td{border:1px solid #000!important;padding:3px 4px!important;color:#000!important}
    .project-detail-sheet-modern .worksheet-meta-table th{font-size:7px!important;background:#fff!important}
    .project-detail-sheet-modern .worksheet-meta-table td{font-size:7.2px!important;background:#fff!important}
    .project-detail-sheet-modern .worksheet-meta-table tr.project-name-row td{font-size:9px!important;line-height:1.05!important}
    .project-detail-sheet-modern .worksheet-meta-table tr.po-row th,.project-detail-sheet-modern .worksheet-meta-table tr.po-row td{background:#16f32f!important;color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
    .project-detail-sheet-modern .worksheet-meta-table tr.po-row td{font-size:8px!important}
    .project-detail-sheet-modern .worksheet-meta-table tr.amount-row td{font-size:8px!important}
    .project-detail-sheet-modern .worksheet-bond-table thead th,.project-detail-sheet-modern .worksheet-bond-table tfoot th{background:#fff!important;font-size:6.5px!important}
    .project-detail-sheet-modern .worksheet-bond-table .bond-side-cell,.project-detail-sheet-modern .worksheet-bond-table .bond-label-cell strong,.project-detail-sheet-modern .worksheet-bond-table .bond-ref-cell,.project-detail-sheet-modern .worksheet-bond-table .bond-value-cell{font-size:6.2px!important;color:#000!important}
    .project-detail-sheet-modern .worksheet-bond-table .bond-label-cell small{font-size:5.4px!important;color:#000!important}
    .project-detail-sheet-modern .worksheet-bond-table tr.complete .bond-side-cell,.project-detail-sheet-modern .worksheet-bond-table tr.complete .bond-label-cell{background:#84e49b!important;color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
    .project-detail-sheet-modern .worksheet-note-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:4px!important}
    .project-detail-sheet-modern .worksheet-note-card{padding:5px!important}
    .project-detail-sheet-modern .worksheet-note-card span{font-size:5.5px!important;color:#000!important}
    .project-detail-sheet-modern .worksheet-note-card strong{font-size:6.2px!important;color:#000!important;line-height:1.1!important}
    .project-detail-sheet-modern .ledger-worksheet-card{padding:0!important}
    .project-detail-sheet-modern .worksheet-ledger-head{display:none!important}
    .project-detail-sheet-modern .project-sheet-table-wrap{border:0!important;border-radius:0!important}
    .project-detail-sheet-modern .excel-like-ledger{min-width:0!important;width:100%!important}
    .project-detail-sheet-modern .excel-like-ledger th,.project-detail-sheet-modern .excel-like-ledger td{padding:2.4px 2px!important;font-size:5.9px!important;line-height:1.05!important;border:1px solid #000!important;color:#000!important;background:#fff!important}
    .project-detail-sheet-modern .excel-like-ledger td>strong,.project-detail-sheet-modern .excel-like-ledger td>small,.project-detail-sheet-modern .excel-like-ledger td .pill+small{font-size:5.6px!important;color:#000!important;line-height:1.05!important}
    .project-detail-sheet-modern .excel-like-ledger .pill{background:transparent!important;color:#000!important;border:0!important;padding:0!important;box-shadow:none!important;font-size:5.6px!important}
    .project-detail-sheet-modern .excel-like-ledger .ledger-highlight td{background:#fff25b!important;color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
    .project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td{background:#fff!important;color:#000!important;border-top:2px solid #000!important}
    .project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td:nth-child(2){background:#16f32f!important;color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* On File bond details fields */
.on-file-bond-section{grid-column:1/-1;border:1px solid #dbe5f0;border-radius:18px;background:linear-gradient(180deg,#ffffff,#f8fbff);padding:16px;margin-top:4px}
.on-file-bond-section h3{margin:0;color:#0d1b52;font-size:18px;font-weight:900}
.on-file-bond-section>p{margin:5px 0 14px;font-size:13px}
.bond-form-card{border:1px solid #e0e8f2;border-radius:15px;background:#fff;padding:14px;margin-top:12px;box-shadow:0 10px 26px rgba(15,35,65,.05)}
.bond-form-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.bond-form-title strong{font-size:14px;color:#142949;font-weight:900}
.bond-form-title span{border-radius:999px;background:#f1f5f9;color:#475569;padding:5px 9px;font-size:11px;font-weight:850}
.bond-detail-grid{grid-template-columns:1.05fr 1fr 1.2fr .75fr .85fr;gap:10px}
.bond-detail-grid label{font-size:12px;color:#29324d;font-weight:850}
.bond-detail-grid input{height:40px;padding:9px 10px;border-radius:10px}
@media(max-width:1200px){.bond-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.bond-detail-grid{grid-template-columns:1fr}.bond-form-title{align-items:flex-start;flex-direction:column}}

/* Cleaner On File layout for Project Form */
.on-file-modern-panel{
    border:1px solid #d7e8f1!important;
    border-radius:22px!important;
    background:linear-gradient(180deg,#ffffff,#f7fbff)!important;
    padding:20px!important;
    box-shadow:0 16px 38px rgba(15,35,65,.06);
}
.on-file-modern-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin-bottom:16px;
    padding-bottom:14px;
    border-bottom:1px solid #e5edf6;
}
.section-kicker{
    display:block;
    margin-bottom:5px;
    color:#16a34a;
    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.12em;
}
.on-file-modern-head h2,.modern-bond-section h3{
    margin:0;
    color:#0d1b52;
    font-size:22px;
    line-height:1.15;
    font-weight:900;
}
.on-file-modern-head p,.bond-section-head p{
    margin:7px 0 0;
    color:#68758b;
    font-size:13px;
    line-height:1.45;
    font-weight:650;
}
.on-file-doc-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-bottom:16px;
}
.doc-check-card,.doc-input-card{
    min-width:0;
    border:1px solid #dce7f2;
    border-radius:16px;
    background:#fff;
    padding:14px;
    box-shadow:0 10px 24px rgba(15,35,65,.045);
}
.doc-check-card{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr);
    gap:12px;
    align-items:center;
    cursor:pointer;
    transition:.18s ease;
}
.doc-check-card:hover,.doc-input-card:hover,.modern-bond-card:hover{
    border-color:#b8cbe2;
    box-shadow:0 14px 30px rgba(15,35,65,.075);
}
.doc-check-card input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}
.doc-check-icon{
    width:38px;
    height:38px;
    border-radius:12px;
    border:1px solid #cad7e6;
    background:#f8fafc;
    color:transparent;
    display:grid;
    place-items:center;
    font-size:18px;
    font-weight:950;
    transition:.18s ease;
}
.doc-check-card input:checked + .doc-check-icon{
    background:#16d95d;
    border-color:#16d95d;
    color:#fff;
    box-shadow:0 8px 18px rgba(22,217,93,.22);
}
.doc-check-text strong,.doc-input-card label{
    display:block;
    color:#172044;
    font-size:13px;
    font-weight:900;
    line-height:1.2;
}
.doc-check-text small{
    display:block;
    margin-top:4px;
    color:#667085;
    font-size:11px;
    font-weight:650;
    line-height:1.35;
}
.doc-input-card input{
    width:100%;
    height:42px;
    margin-top:8px!important;
    border:1px solid #d7e1ec!important;
    border-radius:12px!important;
    padding:10px 12px!important;
    background:#fff;
    color:#111827;
    font-size:13px;
    font-weight:750;
}
.clean-input-check-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    align-items:end;
}
.clean-input-check-row input{
    margin-top:8px!important;
}
.modern-mini-check{
    height:42px!important;
    margin:0!important;
    padding:0 12px!important;
    border:1px solid #d7e1ec!important;
    border-radius:12px!important;
    background:#f8fbff!important;
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    color:#162446;
    font-size:12px;
    font-weight:850;
    white-space:nowrap;
}
.modern-mini-check input{
    width:auto!important;
    height:auto!important;
    margin:0!important;
}
.modern-bond-section{
    grid-column:1/-1;
    margin-top:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
}
.bond-section-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:12px;
    margin:2px 0 12px;
}
.bond-cards-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}
.modern-bond-card{
    margin:0!important;
    border:1px solid #dce7f2!important;
    border-radius:18px!important;
    background:#fff!important;
    padding:0!important;
    box-shadow:0 10px 24px rgba(15,35,65,.045)!important;
    overflow:hidden;
}
.modern-bond-title{
    display:flex!important;
    justify-content:space-between!important;
    align-items:center!important;
    gap:12px!important;
    margin:0!important;
    padding:13px 15px!important;
    border-bottom:1px solid #edf2f7;
    background:linear-gradient(180deg,#fbfdff,#f6f9fd);
}
.modern-bond-title span{
    display:block;
    background:transparent!important;
    color:#0d1b52!important;
    padding:0!important;
    border-radius:0!important;
    font-size:15px!important;
    font-weight:900!important;
    line-height:1.2;
}
.modern-bond-title strong{
    display:block;
    margin-top:3px;
    color:#6b7280!important;
    font-size:11px!important;
    font-weight:750!important;
}
.modern-bond-title em{
    font-style:normal;
    border-radius:999px;
    padding:6px 10px;
    background:#f1f5f9;
    color:#526174;
    font-size:10px;
    font-weight:950;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.modern-bond-card.has-details .modern-bond-title{
    background:linear-gradient(180deg,#f1fff6,#ffffff);
}
.modern-bond-card.has-details .modern-bond-title em{
    background:#d9fbe8;
    color:#08733f;
}
.modern-bond-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px!important;
    padding:14px 15px 15px;
}
.modern-bond-grid label{
    min-width:0;
    color:#29324d!important;
    font-size:12px!important;
    font-weight:900!important;
}
.modern-bond-grid label:nth-child(3){
    grid-column:1/-1;
}
.modern-bond-grid input{
    width:100%;
    height:42px!important;
    margin-top:7px!important;
    border:1px solid #d7e1ec!important;
    border-radius:12px!important;
    padding:10px 12px!important;
    background:#fff!important;
    color:#111827;
    font-size:13px!important;
    font-weight:750;
}
.modern-legacy-note{
    display:block!important;
    margin-top:14px!important;
    padding:14px!important;
    border:1px dashed #cbd8e6;
    border-radius:16px;
    background:#fff;
    color:#29324d;
    font-size:13px;
    font-weight:900;
}
.modern-legacy-note textarea{
    margin-top:8px!important;
    min-height:90px;
}
@media(max-width:1200px){
    .on-file-doc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:950px){
    .bond-cards-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
    .on-file-modern-panel{padding:15px!important}
    .on-file-doc-grid,.bond-cards-grid,.modern-bond-grid{grid-template-columns:1fr!important}
    .clean-input-check-row{grid-template-columns:1fr}
    .modern-mini-check{height:auto!important;padding:10px 12px!important}
    .bond-section-head,.on-file-modern-head{align-items:flex-start;flex-direction:column}
}

/* On File section - styled like the form sections above */
.onfile-clean-section{background:linear-gradient(180deg,#ffffff,#f8fbff);border-color:#d6e2ef}
.onfile-clean-section .section-subtext{margin:4px 0 0;font-size:13px}
.onfile-subsection{border:1px solid #dfe8f4;border-radius:16px;padding:16px 18px;background:#fff}
.onfile-documents-block{background:linear-gradient(180deg,#ffffff,#f7fbff);border-color:#d7e7f4}
.onfile-bond-block{background:linear-gradient(180deg,#ffffff,#fffaf5);border-color:#ead7ae}
.onfile-legacy-block{background:linear-gradient(180deg,#ffffff,#fbfdff);border-color:#dbe7f4}
.onfile-subsection-head{margin-bottom:14px}
.onfile-subsection-head h3{margin:0;color:#10224b;font-size:18px;line-height:1.15}
.onfile-subsection-head p{margin:6px 0 0;color:#6b7280;font-size:12.5px}
.onfile-doc-grid-clean{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:14px 16px;align-items:end}
.onfile-doc-grid-clean label,.onfile-bond-fields label,.onfile-legacy-block label{font-weight:800;color:#29324d;font-size:13px}
.onfile-doc-grid-clean input,.onfile-doc-grid-clean select,.onfile-doc-grid-clean textarea,.onfile-bond-fields input,.onfile-bond-fields select,.onfile-bond-fields textarea,.onfile-legacy-block textarea{width:100%;margin-top:7px;border:1px solid #d7e1ec;border-radius:12px;padding:12px;background:#fff;font-size:14px}
.onfile-check-item{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:54px;border:1px solid #d7e1ec;border-radius:12px;background:#fff;padding:0 14px}
.onfile-check-label{margin:0!important;font-size:13px;font-weight:800;color:#10224b}
.onfile-inline-check{display:inline-flex!important;align-items:center;gap:8px;margin:0!important;padding:9px 12px;border:1px solid #d7e1ec;border-radius:12px;background:#f8fbff;white-space:nowrap;font-size:12px;font-weight:800;color:#142949}
.onfile-inline-check input{width:auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
.onfile-po-wrap{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.onfile-po-wrap > label:first-child{margin:0}
.onfile-po-check{height:46px}
.onfile-bond-grid-clean{display:grid;grid-template-columns:repeat(2,minmax(320px,1fr));gap:14px}
.onfile-bond-card-clean{border:1px solid #e0e8f2;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 8px 20px rgba(15,23,42,.04)}
.onfile-bond-card-head{padding:13px 15px;border-bottom:1px solid #e9eef5;background:linear-gradient(180deg,#ffffff,#f9fbff)}
.onfile-bond-card-head h4{margin:0;color:#10224b;font-size:15px;line-height:1.2}
.onfile-bond-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px 15px 15px}
.onfile-bond-fields label:nth-child(3){grid-column:1/-1}
.onfile-legacy-block textarea{min-height:90px;resize:vertical}
@media(max-width:1100px){.onfile-doc-grid-clean{grid-template-columns:1fr}.onfile-bond-grid-clean{grid-template-columns:1fr}}
@media(max-width:700px){.onfile-po-wrap{grid-template-columns:1fr}.onfile-bond-fields{grid-template-columns:1fr}.onfile-bond-fields label:nth-child(3){grid-column:auto}}

/* Report print fix: give Project Name enough space and keep P.O/date columns compact. */
@media print{
    .project-report-table{width:100%!important;table-layout:fixed!important}
    .project-report-table th,.project-report-table td{font-size:7.8px!important;line-height:1.12!important;padding:3px 3px!important}
    .project-report-table th:nth-child(1),.project-report-table td:nth-child(1){width:28%!important;min-width:0!important;text-align:left!important;word-break:normal!important;overflow-wrap:anywhere!important;white-space:normal!important}
    .project-report-table th:nth-child(2),.project-report-table td:nth-child(2){width:6%!important;text-align:center!important;white-space:nowrap!important}
    .project-report-table th:nth-child(3),.project-report-table td:nth-child(3){width:7%!important;text-align:center!important;white-space:nowrap!important}
    .project-report-table th:nth-child(4),.project-report-table td:nth-child(4){width:10%!important}
    .project-report-table th:nth-child(5),.project-report-table td:nth-child(5){width:9%!important}
    .project-report-table th:nth-child(6),.project-report-table td:nth-child(6){width:7%!important;text-align:center!important}
    .project-report-table th:nth-child(7),.project-report-table td:nth-child(7){width:10%!important}
    .project-report-table th:nth-child(8),.project-report-table td:nth-child(8){width:8%!important}
    .project-report-table th:nth-child(9),.project-report-table td:nth-child(9){width:10%!important}
    .project-report-table th:nth-child(10),.project-report-table td:nth-child(10){width:5%!important;word-break:normal!important;overflow-wrap:anywhere!important}
    .project-report-table .project-name{width:auto!important;min-width:0!important}
}


/* Report Print Fix v2: actual printable project-summary column widths.
   The earlier browser print preview was still allowing the generic report-table widths
   to squeeze the Project column and stretch the P.O column. These rules target only
   Project Summary print tables and use colgroup + nth-child fallbacks. */
@media print{
    @page{size:A4 landscape;margin:7mm!important}
    body .print-area table.project-report-table,
    body .print-area table.data-table.project-report-table,
    body .print-area table.report-table.project-report-table{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        table-layout:fixed!important;
        border-collapse:collapse!important;
    }
    body .print-area table.project-report-table col.report-col-project{width:30%!important}
    body .print-area table.project-report-table col.report-col-po{width:5%!important}
    body .print-area table.project-report-table col.report-col-date{width:6.5%!important}
    body .print-area table.project-report-table col.report-col-contract{width:10%!important}
    body .print-area table.project-report-table col.report-col-retention{width:9%!important}
    body .print-area table.project-report-table col.report-col-accom{width:6.5%!important}
    body .print-area table.project-report-table col.report-col-cr{width:11%!important}
    body .print-area table.project-report-table col.report-col-ewt{width:8.5%!important}
    body .print-area table.project-report-table col.report-col-balance{width:10.5%!important}
    body .print-area table.project-report-table col.report-col-remarks{width:3%!important}

    body .print-area table.project-report-table th,
    body .print-area table.project-report-table td{
        position:static!important;
        z-index:auto!important;
        box-sizing:border-box!important;
        padding:3px 3px!important;
        font-size:7.3px!important;
        line-height:1.12!important;
        vertical-align:middle!important;
        white-space:normal!important;
        overflow:visible!important;
    }
    body .print-area table.project-report-table th:nth-child(1),
    body .print-area table.project-report-table td:nth-child(1){width:30%!important;text-align:left!important;word-break:normal!important;overflow-wrap:break-word!important;hyphens:none!important}
    body .print-area table.project-report-table th:nth-child(2),
    body .print-area table.project-report-table td:nth-child(2){width:5%!important;text-align:center!important;white-space:nowrap!important}
    body .print-area table.project-report-table th:nth-child(3),
    body .print-area table.project-report-table td:nth-child(3){width:6.5%!important;text-align:center!important;white-space:nowrap!important}
    body .print-area table.project-report-table th:nth-child(4),
    body .print-area table.project-report-table td:nth-child(4){width:10%!important;text-align:right!important}
    body .print-area table.project-report-table th:nth-child(5),
    body .print-area table.project-report-table td:nth-child(5){width:9%!important;text-align:right!important}
    body .print-area table.project-report-table th:nth-child(6),
    body .print-area table.project-report-table td:nth-child(6){width:6.5%!important;text-align:center!important;white-space:nowrap!important}
    body .print-area table.project-report-table th:nth-child(7),
    body .print-area table.project-report-table td:nth-child(7){width:11%!important;text-align:right!important}
    body .print-area table.project-report-table th:nth-child(8),
    body .print-area table.project-report-table td:nth-child(8){width:8.5%!important;text-align:right!important}
    body .print-area table.project-report-table th:nth-child(9),
    body .print-area table.project-report-table td:nth-child(9){width:10.5%!important;text-align:right!important}
    body .print-area table.project-report-table th:nth-child(10),
    body .print-area table.project-report-table td:nth-child(10){width:3%!important;text-align:left!important;word-break:break-word!important;overflow-wrap:anywhere!important}

    body .print-area table.project-report-table .project-name{
        width:30%!important;
        max-width:none!important;
        min-width:0!important;
        white-space:normal!important;
        word-break:normal!important;
        overflow-wrap:break-word!important;
        hyphens:none!important;
        font-weight:700!important;
    }
    body .print-area table.project-report-table .po-no-cell,
    body .print-area table.project-report-table .nowrap{white-space:nowrap!important}
body .print-area table.project-report-table .subtotal-row td:first-child{text-align:left!important}
    body .print-area .report-table-wrap{width:100%!important;overflow:visible!important}
}

/* Global sidebar search */
.sidebar-search{display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:8px;margin:0 0 12px}
.sidebar-search input{min-width:0;height:40px;border:1px solid rgba(255,255,255,.14);border-radius:12px;background:rgba(255,255,255,.09);color:#fff;padding:0 11px;font-size:13px;font-weight:700;outline:0}
.sidebar-search input::placeholder{color:rgba(255,255,255,.58)}
.sidebar-search button{height:40px;border:1px solid rgba(255,255,255,.14);border-radius:12px;background:rgba(255,255,255,.12);color:#fff;display:grid;place-items:center;cursor:pointer}
.sidebar-search button .nav-icon{width:18px;height:18px}
.app-shell.sidebar-collapsed .sidebar-search{grid-template-columns:1fr}
.app-shell.sidebar-collapsed .sidebar-search input{display:none}
.search-results-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:18px}
.search-result-list{display:grid;gap:9px}
.search-result-item{display:block;border:1px solid var(--line);border-radius:12px;background:#fff;padding:12px 13px;transition:.18s ease}
.search-result-item:hover{border-color:#b8cbe2;background:#f8fbff;transform:translateY(-1px)}
.search-result-item strong{display:block;color:var(--navy);font-size:14px;line-height:1.25}
.search-result-item span{display:block;margin-top:5px;color:var(--muted);font-size:12px;font-weight:750;line-height:1.35}
.empty-state.compact{padding:18px}
select .void-option,.void-option{color:#b42318;font-weight:900}
@media(max-width:1100px){.search-results-grid{grid-template-columns:1fr}}
@media(max-width:800px){.app-shell.sidebar-collapsed .sidebar-search{grid-template-columns:minmax(0,1fr) 42px}.app-shell.sidebar-collapsed .sidebar-search input{display:block}}

/* Polished global search and compact landscape print output */
.sidebar-search{
    position:relative;
    padding:6px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:16px;
    background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.06));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 12px 26px rgba(0,0,0,.12);
}
.sidebar-search:focus-within{border-color:rgba(87,213,255,.58);box-shadow:0 0 0 3px rgba(16,184,213,.16),inset 0 1px 0 rgba(255,255,255,.18)}
.sidebar-search input{
    height:38px;
    border:0;
    border-radius:11px;
    background:rgba(2,10,24,.28);
    padding-left:13px;
    color:#fff;
}
.sidebar-search button{
    height:38px;
    border:0;
    border-radius:11px;
    background:linear-gradient(135deg,#19b86a,#10b8d5);
    box-shadow:0 8px 18px rgba(16,184,213,.22);
}
.sidebar-search button:hover{filter:brightness(1.08)}

@media print{
    @page{size:A4 landscape;margin:5mm}
    html,body{width:auto!important;height:auto!important;background:#fff!important;color:#000!important;font-family:Arial,Helvetica,sans-serif!important}
    body{margin:0!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
    .main-area{padding:0!important}
    .print-area,.card,.list-focus-card,.recent-card{box-shadow:none!important;border:0!important;border-radius:0!important;background:#fff!important;padding:0!important;margin:0!important}
    .toolbar,.filters,.no-print,.sidebar,.topbar,.table-scroll-top,.btn{display:none!important}
    .report-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:8px!important;margin:0 0 5px!important;padding:0 0 4px!important;border-bottom:1px solid #000!important}
    .report-head img{width:112px!important;max-width:112px!important;margin:0 0 2px!important}
    .report-title h2{font-size:11px!important;line-height:1.08!important;margin:0!important;color:#000!important}
    .report-title h3{font-size:9px!important;line-height:1.1!important;margin:1px 0!important;color:#000!important}
    .report-title .asof{font-size:8px!important;line-height:1.1!important;margin:1px 0!important;color:#c00000!important}
    .report-filter-line{font-size:6.5px!important;line-height:1.1!important;border:0!important;border-radius:0!important;background:#fff!important;padding:0!important;margin:1px 0 0!important;color:#000!important}
    .stats,.report-stat-strip{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:3px!important;margin:0 0 5px!important}
    .stat-card{break-inside:avoid!important;padding:3px 4px!important;border:1px solid #000!important;border-radius:0!important;background:#fff!important}
    .stat-card:after{display:none!important}
    .stat-card span{font-size:6.3px!important;line-height:1!important;letter-spacing:0!important;color:#000!important}
    .stat-card strong{font-size:10px!important;line-height:1.05!important;margin-top:1px!important;color:#00164f!important}
    .stat-card small{font-size:6px!important;line-height:1!important;color:#000!important}
    .owner-list-title,.print-owner-title{font-size:8px!important;line-height:1.05!important;margin:4px 0 2px!important;color:#000!important}
    .table-wrap{overflow:visible!important;border:0!important;border-radius:0!important;background:#fff!important}
    .data-table,.projects-table,.service-invoice-table,.cr-table,.report-table{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important;border-spacing:0!important}
    .data-table th,.data-table td{position:static!important;padding:2px 2px!important;border:1px solid #000!important;font-size:5.8px!important;line-height:1.08!important;color:#000!important;background:#fff!important;vertical-align:top!important;white-space:normal!important;overflow:visible!important;word-break:normal!important;overflow-wrap:anywhere!important}
    .data-table th{font-size:5.6px!important;font-weight:800!important;text-transform:none!important;letter-spacing:0!important;text-align:center!important}
    .data-table .project-name{min-width:0!important;width:auto!important;font-weight:700!important}
    .data-table .num{text-align:right!important}
    .data-table .center{text-align:center!important}
    .data-table .pill{padding:0!important;border:0!important;background:transparent!important;color:#000!important;font-size:5.8px!important}
    .subtotal-row td,.grand-total-row td{background:#000!important;color:#00d65f!important;font-weight:900!important}
    .grand-total-labels td{background:#fff!important;color:#000!important;font-size:5.7px!important}
    .cell-note{display:none!important}
    .empty-state{padding:5px!important;font-size:7px!important}
    .projects-table th:nth-child(1),.projects-table td:nth-child(1){width:9%!important}
    .projects-table th:nth-child(2),.projects-table td:nth-child(2){width:19%!important}
    .projects-table th:nth-child(3),.projects-table td:nth-child(3){width:7%!important}
    .projects-table th:nth-child(4),.projects-table td:nth-child(4){width:7%!important}
    .projects-table th:nth-child(5),.projects-table td:nth-child(5){width:9%!important}
    .projects-table th:nth-child(6),.projects-table td:nth-child(6){width:8%!important}
    .projects-table th:nth-child(7),.projects-table td:nth-child(7){width:6%!important}
    .projects-table th:nth-child(8),.projects-table td:nth-child(8){width:9%!important}
    .projects-table th:nth-child(9),.projects-table td:nth-child(9){width:7%!important}
    .projects-table th:nth-child(10),.projects-table td:nth-child(10){width:9%!important}
    .projects-table th:nth-child(11),.projects-table td:nth-child(11){width:10%!important}
    .service-invoice-table th:nth-child(1),.service-invoice-table td:nth-child(1){width:6%!important}
    .service-invoice-table th:nth-child(2),.service-invoice-table td:nth-child(2){width:7%!important}
    .service-invoice-table th:nth-child(3),.service-invoice-table td:nth-child(3){width:12%!important}
    .service-invoice-table th:nth-child(4),.service-invoice-table td:nth-child(4){width:12%!important}
    .service-invoice-table th:nth-child(5),.service-invoice-table td:nth-child(5){width:12%!important}
    .service-invoice-table th:nth-child(6),.service-invoice-table td:nth-child(6){width:7%!important}
    .service-invoice-table th:nth-child(7),.service-invoice-table td:nth-child(7){width:9%!important}
    .service-invoice-table th:nth-child(8),.service-invoice-table td:nth-child(8){width:9%!important}
    .service-invoice-table th:nth-child(9),.service-invoice-table td:nth-child(9){width:8%!important}
    .service-invoice-table th:nth-child(10),.service-invoice-table td:nth-child(10){width:9%!important}
    .service-invoice-table th:nth-child(11),.service-invoice-table td:nth-child(11){width:9%!important}
}


/* Update v8: IT-only user management, hoverable record metadata, and unified landscape print reports */
.record-info-wrap{position:relative;display:inline-flex;align-items:center;z-index:20}.record-info-button{background:#eef6ff!important;border-color:#cfe3ff!important;color:#0f3f83!important}.record-info-pop{display:none;position:absolute;right:0;top:calc(100% + 8px);width:300px;max-width:80vw;background:#071426;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:12px;box-shadow:0 20px 55px rgba(8,20,38,.35);text-align:left}.record-info-wrap:hover .record-info-pop,.record-info-wrap:focus-within .record-info-pop{display:block}.record-info-pop:before{content:"";position:absolute;right:18px;top:-7px;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #071426}.record-info-row{display:grid;grid-template-columns:95px minmax(0,1fr);gap:8px;padding:7px 0;border-bottom:1px solid rgba(255,255,255,.12)}.record-info-row:last-child{border-bottom:0}.record-info-row b{font-size:11px;color:#8fb2d4;text-transform:uppercase;letter-spacing:.04em}.record-info-row em{font-style:normal;font-size:12px;font-weight:800;color:#fff;overflow-wrap:anywhere}

@media print{
    @page{size:A4 landscape;margin:3mm}
    html,body{margin:0!important;padding:0!important;background:#fff!important;color:#000!important;font-family:Arial,Helvetica,sans-serif!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
    .app-shell,.main-area{display:block!important;width:100%!important;max-width:none!important;min-height:0!important;margin:0!important;padding:0!important;background:#fff!important}
    .sidebar,.topbar,.toolbar,.filters,.no-print,.btn,.actions.no-print,.table-scroll-top,.project-modal,.app-modal{display:none!important}
    .card,.print-area,.list-focus-card,.recent-card,.report-card,.table-wrap{margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;overflow:visible!important}
    .grid.stats,.stats,.report-stat-strip{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:2px!important;margin:0 0 4px!important}
    .stat-card{border:0!important;border-radius:0!important;padding:1px 2px!important;background:#fff!important;box-shadow:none!important}.stat-card:after{display:none!important}.stat-card span{font-size:6px!important;line-height:1!important;color:#000!important;letter-spacing:0!important}.stat-card strong{font-size:8.6px!important;line-height:1!important;color:#000!important;margin:0!important}.stat-card small{font-size:5.8px!important;line-height:1!important;color:#000!important}
    .report-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:6px!important;margin:0 0 4px!important;padding:0 0 3px!important;border:0!important;border-bottom:1px solid #000!important}.report-head img{width:112px!important;max-width:112px!important;margin:0!important}.report-title h2{font-size:9.2px!important;line-height:1.05!important;margin:0!important;color:#000!important}.report-title h3{font-size:8px!important;line-height:1.05!important;margin:1px 0!important;color:#000!important}.report-title .asof,.report-filter-line{font-size:6.4px!important;line-height:1.05!important;margin:1px 0 0!important;border:0!important;background:#fff!important;color:#000!important;padding:0!important}
    .section-title{display:block!important;margin:2px 0!important}.section-title h2,.owner-list-title,.print-owner-title{font-size:8px!important;line-height:1.05!important;margin:3px 0 2px!important;color:#000!important}.section-title .muted,.section-title p,.muted{font-size:6px!important;line-height:1.05!important;color:#000!important;margin:0 0 2px!important}
    .data-table,.projects-table,.service-invoice-table,.cr-table,.report-table,.grand-total-table{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important;border-spacing:0!important}.data-table th,.data-table td{position:static!important;border:1px solid #000!important;padding:1.8px 1.8px!important;font-size:6.1px!important;line-height:1.05!important;color:#000!important;background:#fff!important;vertical-align:top!important;white-space:normal!important;overflow:visible!important;word-break:normal!important;overflow-wrap:anywhere!important}.data-table th{font-size:5.9px!important;font-weight:900!important;text-transform:none!important;letter-spacing:0!important;text-align:center!important}.data-table .project-name{min-width:0!important;width:auto!important;font-weight:800!important}.data-table .num{text-align:right!important}.data-table .center{text-align:center!important}.data-table .pill,.accom-badge{padding:0!important;border:0!important;background:transparent!important;color:#000!important;font-size:6px!important;box-shadow:none!important}.subtotal-row td,.grand-total-row td{background:#000!important;color:#00d65f!important;font-weight:900!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.grand-total-labels td{background:#fff!important;color:#000!important;font-size:5.8px!important}.cell-note{display:none!important}.empty-state{padding:4px!important;font-size:6.5px!important}
    .projects-table th:nth-child(1),.projects-table td:nth-child(1){width:9%!important}.projects-table th:nth-child(2),.projects-table td:nth-child(2){width:20%!important}.projects-table th:nth-child(3),.projects-table td:nth-child(3){width:7%!important}.projects-table th:nth-child(4),.projects-table td:nth-child(4){width:7%!important}.projects-table th:nth-child(5),.projects-table td:nth-child(5){width:9%!important}.projects-table th:nth-child(6),.projects-table td:nth-child(6){width:8%!important}.projects-table th:nth-child(7),.projects-table td:nth-child(7){width:6%!important}.projects-table th:nth-child(8),.projects-table td:nth-child(8){width:9%!important}.projects-table th:nth-child(9),.projects-table td:nth-child(9){width:7%!important}.projects-table th:nth-child(10),.projects-table td:nth-child(10){width:9%!important}.projects-table th:nth-child(11),.projects-table td:nth-child(11){width:9%!important}
    .service-invoice-table th:nth-child(1),.service-invoice-table td:nth-child(1),.cr-table th:nth-child(1),.cr-table td:nth-child(1){width:7%!important}.service-invoice-table th:nth-child(2),.service-invoice-table td:nth-child(2),.cr-table th:nth-child(2),.cr-table td:nth-child(2){width:8%!important}.service-invoice-table th:nth-child(3),.service-invoice-table td:nth-child(3),.cr-table th:nth-child(3),.cr-table td:nth-child(3){width:10%!important}.service-invoice-table th:nth-child(4),.service-invoice-table td:nth-child(4),.cr-table th:nth-child(4),.cr-table td:nth-child(4){width:13%!important}.service-invoice-table th:nth-child(5),.service-invoice-table td:nth-child(5),.cr-table th:nth-child(5),.cr-table td:nth-child(5){width:15%!important}.service-invoice-table th:nth-child(6),.service-invoice-table td:nth-child(6),.cr-table th:nth-child(6),.cr-table td:nth-child(6){width:8%!important}.service-invoice-table th:nth-child(7),.service-invoice-table td:nth-child(7),.cr-table th:nth-child(7),.cr-table td:nth-child(7){width:8%!important}.service-invoice-table th:nth-child(8),.service-invoice-table td:nth-child(8),.cr-table th:nth-child(8),.cr-table td:nth-child(8){width:8%!important}.service-invoice-table th:nth-child(9),.service-invoice-table td:nth-child(9),.cr-table th:nth-child(9),.cr-table td:nth-child(9){width:7%!important}.service-invoice-table th:nth-child(10),.service-invoice-table td:nth-child(10),.cr-table th:nth-child(10),.cr-table td:nth-child(10){width:16%!important}
}

/* Update v9: compact colored print standard + Dashboard Portfolio Snapshot fix */
.dashboard-hero{grid-template-columns:minmax(0,1.25fr) minmax(340px,.75fr);align-items:stretch}
.hero-note{min-width:0;display:flex;flex-direction:column;justify-content:center;overflow:hidden}
.hero-note h3{font-size:clamp(18px,1.7vw,23px);line-height:1.12;overflow-wrap:anywhere}
.hero-note p{margin:0;font-size:13px;line-height:1.35}
.hero-amount{font-size:clamp(20px,2vw,27px);line-height:1.12;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.hero-note .mini-info-row{align-items:center;min-width:0}
.hero-note .mini-info-row span{min-width:0;overflow-wrap:anywhere}
@media(max-width:1120px){.dashboard-hero{grid-template-columns:1fr}.hero-note{justify-content:flex-start}.hero-amount{font-size:clamp(21px,5vw,30px)}}

.print-meta-header{display:none}

@media print{
    @page{size:A4 landscape;margin:3mm}
    html,body{margin:0!important;padding:0!important;background:#fff!important;color:#0f172a!important;font-family:Arial,Helvetica,sans-serif!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
    body *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
    .app-shell,.main-area{display:block!important;width:100%!important;max-width:none!important;min-height:0!important;margin:0!important;padding:0!important;background:#fff!important}
    .sidebar,.topbar,.toolbar,.filters,.no-print,.btn,.actions,.table-scroll-top,.project-modal,.app-modal{display:none!important}
    .print-meta-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;align-items:start!important;margin:0 0 4px!important;padding:3px 0 4px!important;border-bottom:1.2px solid #0f172a!important;background:#fff!important;color:#0f172a!important;break-after:avoid!important;page-break-after:avoid!important}
    .print-meta-title span{display:block!important;margin:0!important;color:#2563eb!important;font-size:6.4px!important;line-height:1!important;font-weight:900!important;text-transform:uppercase!important;letter-spacing:.06em!important}
    .print-meta-title strong{display:block!important;margin:1px 0 0!important;color:#0f172a!important;font-size:9px!important;line-height:1.1!important;font-weight:950!important;letter-spacing:0!important;overflow-wrap:anywhere!important}
    .print-meta-details{display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:1px!important;text-align:right!important;max-width:46%!important;color:#334155!important;font-size:6.2px!important;font-weight:800!important;line-height:1.1!important}
    .print-meta-details span{display:block!important;color:#334155!important;font-size:6.2px!important;line-height:1.1!important;overflow-wrap:anywhere!important}

    .card,.print-area,.list-focus-card,.recent-card,.report-card,.table-wrap,.report-table-wrap,.project-year-wrap,.grand-total-wrap{margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;overflow:visible!important;width:100%!important;max-width:none!important}
    .grid.stats,.stats,.report-stat-strip{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:2.5px!important;margin:0 0 4px!important;break-after:avoid!important;page-break-after:avoid!important}
    .stat-card{border:1px solid #9fb7d8!important;border-radius:0!important;padding:2px 3px!important;background:#eef6ff!important;box-shadow:none!important;min-height:0!important;color:#0f172a!important}
    .stat-card:nth-child(2){background:#eefcf3!important;border-color:#9fd3ae!important}.stat-card:nth-child(3){background:#fff7df!important;border-color:#e5c46a!important}.stat-card:nth-child(4){background:#f4f0ff!important;border-color:#b5a7ec!important}
    .stat-card:after,.stat-icon{display:none!important}.stat-card span{display:block!important;font-size:6.2px!important;line-height:1!important;color:#0f172a!important;font-weight:900!important;letter-spacing:0!important;text-transform:uppercase!important}.stat-card strong{display:block!important;font-size:8.2px!important;line-height:1.05!important;color:#0f172a!important;margin:1px 0!important;font-weight:950!important;white-space:normal!important;overflow-wrap:anywhere!important}.stat-card small{display:block!important;font-size:5.7px!important;line-height:1!important;color:#334155!important;font-weight:700!important}

    .report-head{display:block!important;margin:0 0 3px!important;padding:0!important;border:0!important;background:#fff!important;break-after:avoid!important;page-break-after:avoid!important}.report-title img{display:none!important}.report-title h2{font-size:6.8px!important;line-height:1.05!important;margin:0!important;color:#334155!important;font-weight:900!important}.report-title h3{font-size:7.3px!important;line-height:1.05!important;margin:1px 0!important;color:#0f172a!important;font-weight:950!important}.report-title .asof,.report-filter-line{font-size:5.8px!important;line-height:1.05!important;margin:0!important;border:0!important;background:#fff!important;color:#475569!important;padding:0!important;font-weight:700!important}
    .section-title{display:block!important;margin:2px 0 1px!important;padding:0!important;break-after:avoid!important;page-break-after:avoid!important}.section-title h2,.owner-list-title,.print-owner-title{font-size:7.4px!important;line-height:1.05!important;margin:2px 0 1px!important;color:#0f172a!important;font-weight:950!important}.section-title .muted,.section-title p,.muted{font-size:5.8px!important;line-height:1.05!important;color:#475569!important;margin:0 0 1px!important;font-weight:700!important}.eyebrow{font-size:5.8px!important;color:#2563eb!important;letter-spacing:.04em!important}

    .data-table,.projects-table,.service-invoice-table,.cr-table,.report-table,.grand-total-table{width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important;border-spacing:0!important;margin:0!important;page-break-inside:auto!important}
    .data-table tr{break-inside:avoid!important;page-break-inside:avoid!important}.data-table th,.data-table td{position:static!important;border:1px solid #0f172a!important;padding:1.15px 1.4px!important;font-size:5.85px!important;line-height:1.03!important;color:#0f172a!important;background:#fff!important;vertical-align:top!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:normal!important;overflow-wrap:anywhere!important;height:auto!important;min-height:0!important}.data-table th{background:#dbeafe!important;color:#0f172a!important;font-size:5.65px!important;font-weight:950!important;text-transform:none!important;letter-spacing:0!important;text-align:center!important;vertical-align:middle!important}.data-table tbody tr:nth-child(even):not(.subtotal-row):not(.grand-total-row):not(.grand-total-labels) td{background:#f8fbff!important}.data-table .project-name{min-width:0!important;width:auto!important;font-weight:950!important}.data-table .num{text-align:right!important}.data-table .center{text-align:center!important}.data-table .nowrap,.data-table .po-no-cell{white-space:nowrap!important;overflow-wrap:normal!important}.data-table a{color:#0f172a!important;text-decoration:none!important}.data-table .pill,.accom-badge{padding:0!important;border:0!important;background:transparent!important;color:#0f172a!important;font-size:5.75px!important;line-height:1.03!important;box-shadow:none!important;font-weight:950!important}.completed-project td{background:#e9fbe8!important}.subtotal-row td,.grand-total-row td{background:#020617!important;color:#22c55e!important;font-weight:950!important;border-color:#020617!important}.grand-total-labels td{background:#ecfeff!important;color:#0f172a!important;font-size:5.55px!important;font-weight:900!important}.cell-note{display:none!important}.empty-state{padding:3px!important;font-size:6px!important;color:#0f172a!important}

    .projects-table th:nth-child(1),.projects-table td:nth-child(1){width:10%!important}.projects-table th:nth-child(2),.projects-table td:nth-child(2){width:18%!important}.projects-table th:nth-child(3),.projects-table td:nth-child(3){width:7%!important}.projects-table th:nth-child(4),.projects-table td:nth-child(4){width:6.5%!important}.projects-table th:nth-child(5),.projects-table td:nth-child(5){width:8.5%!important}.projects-table th:nth-child(6),.projects-table td:nth-child(6){width:8%!important}.projects-table th:nth-child(7),.projects-table td:nth-child(7){width:6%!important}.projects-table th:nth-child(8),.projects-table td:nth-child(8){width:8.5%!important}.projects-table th:nth-child(9),.projects-table td:nth-child(9){width:7.5%!important}.projects-table th:nth-child(10),.projects-table td:nth-child(10){width:9%!important}.projects-table th:nth-child(11),.projects-table td:nth-child(11){width:7%!important}.projects-table th:nth-child(12),.projects-table td:nth-child(12){width:4%!important}
    .report-table.project-report-table th:nth-child(1),.report-table.project-report-table td:nth-child(1){width:22%!important}.report-table.project-report-table th:nth-child(2),.report-table.project-report-table td:nth-child(2){width:7%!important}.report-table.project-report-table th:nth-child(3),.report-table.project-report-table td:nth-child(3){width:7%!important}.report-table.project-report-table th:nth-child(4),.report-table.project-report-table td:nth-child(4){width:10%!important}.report-table.project-report-table th:nth-child(5),.report-table.project-report-table td:nth-child(5){width:9%!important}.report-table.project-report-table th:nth-child(6),.report-table.project-report-table td:nth-child(6){width:7%!important}.report-table.project-report-table th:nth-child(7),.report-table.project-report-table td:nth-child(7){width:11%!important}.report-table.project-report-table th:nth-child(8),.report-table.project-report-table td:nth-child(8){width:9%!important}.report-table.project-report-table th:nth-child(9),.report-table.project-report-table td:nth-child(9){width:11%!important}.report-table.project-report-table th:nth-child(10),.report-table.project-report-table td:nth-child(10){width:7%!important}
    .service-invoice-table th:nth-child(1),.service-invoice-table td:nth-child(1){width:6.5%!important}.service-invoice-table th:nth-child(2),.service-invoice-table td:nth-child(2){width:5.5%!important}.service-invoice-table th:nth-child(3),.service-invoice-table td:nth-child(3){width:10%!important}.service-invoice-table th:nth-child(4),.service-invoice-table td:nth-child(4){width:14%!important}.service-invoice-table th:nth-child(5),.service-invoice-table td:nth-child(5){width:12%!important}.service-invoice-table th:nth-child(6),.service-invoice-table td:nth-child(6){width:6%!important}.service-invoice-table th:nth-child(7),.service-invoice-table td:nth-child(7){width:8%!important}.service-invoice-table th:nth-child(8),.service-invoice-table td:nth-child(8){width:8%!important}.service-invoice-table th:nth-child(9),.service-invoice-table td:nth-child(9){width:7%!important}.service-invoice-table th:nth-child(10),.service-invoice-table td:nth-child(10){width:8%!important}.service-invoice-table th:nth-child(11),.service-invoice-table td:nth-child(11){width:8%!important}.service-invoice-table th:nth-child(12),.service-invoice-table td:nth-child(12){width:7%!important}.service-invoice-table th:nth-child(13),.service-invoice-table td:nth-child(13){width:5%!important}
    .cr-table th:nth-child(1),.cr-table td:nth-child(1){width:7%!important}.cr-table th:nth-child(2),.cr-table td:nth-child(2){width:10%!important}.cr-table th:nth-child(3),.cr-table td:nth-child(3){width:6%!important}.cr-table th:nth-child(4),.cr-table td:nth-child(4){width:11%!important}.cr-table th:nth-child(5),.cr-table td:nth-child(5){width:16%!important}.cr-table th:nth-child(6),.cr-table td:nth-child(6){width:9%!important}.cr-table th:nth-child(7),.cr-table td:nth-child(7){width:8%!important}.cr-table th:nth-child(8),.cr-table td:nth-child(8){width:9%!important}.cr-table th:nth-child(9),.cr-table td:nth-child(9){width:7%!important}.cr-table th:nth-child(10),.cr-table td:nth-child(10){width:17%!important}.cr-table th:nth-child(11),.cr-table td:nth-child(11){width:0!important;display:none!important}
}
@media print{
    .report-table.cr-table th:nth-child(11),.report-table.cr-table td:nth-child(11){display:table-cell!important;width:12%!important}
    .report-table.cr-table th:nth-child(1),.report-table.cr-table td:nth-child(1){width:7%!important}.report-table.cr-table th:nth-child(2),.report-table.cr-table td:nth-child(2){width:10%!important}.report-table.cr-table th:nth-child(3),.report-table.cr-table td:nth-child(3){width:6%!important}.report-table.cr-table th:nth-child(4),.report-table.cr-table td:nth-child(4){width:10%!important}.report-table.cr-table th:nth-child(5),.report-table.cr-table td:nth-child(5){width:15%!important}.report-table.cr-table th:nth-child(6),.report-table.cr-table td:nth-child(6){width:7%!important}.report-table.cr-table th:nth-child(7),.report-table.cr-table td:nth-child(7){width:9%!important}.report-table.cr-table th:nth-child(8),.report-table.cr-table td:nth-child(8){width:8%!important}.report-table.cr-table th:nth-child(9),.report-table.cr-table td:nth-child(9){width:9%!important}.report-table.cr-table th:nth-child(10),.report-table.cr-table td:nth-child(10){width:7%!important}
}

/* Update v10: print fit and colored total bars */
@media print{
    @page{size:A4 landscape;margin:3mm}
    html,body{overflow:visible!important;max-width:100%!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
    .app-shell,.main-area,.card,.print-area,.table-wrap{max-width:100%!important;overflow:visible!important;box-sizing:border-box!important}
    .print-area{page-break-inside:auto!important}

    /* Make report tables fit the printable width and keep compact rows. */
    .data-table,.projects-table,.service-invoice-table,.cr-table,.report-table,.grand-total-table{
        width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important;border-spacing:0!important;
    }
    .data-table th,.data-table td,
    .report-table th,.report-table td,
    .grand-total-table th,.grand-total-table td{
        border-color:#1e3a8a!important;color:#0f172a!important;box-sizing:border-box!important;
    }
    .data-table th,.report-table th{
        background:#dbeafe!important;color:#0f172a!important;
    }

    /* Replace the old black bars with a clean report color and give totals breathing room. */
    .subtotal-row td,
    .grand-total-row td,
    .ledger-monitor-table tr.sheet-ledger-total td,
    .project-sheet-ledger .sheet-ledger-total td,
    .project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td{
        background:#1d4ed8!important;
        color:#ffffff!important;
        border-color:#1e40af!important;
        border-top:1.8px solid #38bdf8!important;
        border-bottom:1.8px solid #38bdf8!important;
        padding-top:2.4px!important;
        padding-bottom:2.4px!important;
        line-height:1.18!important;
        font-weight:950!important;
        -webkit-print-color-adjust:exact!important;
        print-color-adjust:exact!important;
    }
    .subtotal-row td *,.grand-total-row td *,
    .ledger-monitor-table tr.sheet-ledger-total td *,
    .project-sheet-ledger .sheet-ledger-total td *,
    .project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td *{color:#ffffff!important}

    .grand-total-wrap,.report-grand-total{margin-top:2.4mm!important;break-inside:avoid!important;page-break-inside:avoid!important}
    .grand-total-labels td{
        background:#e0f2fe!important;color:#0f172a!important;border-color:#1e3a8a!important;
        padding-top:1.8px!important;padding-bottom:1.8px!important;line-height:1.14!important;
    }
    .subtotal-row + .grand-total-row td,
    .subtotal-row + .grand-total-labels td,
    .grand-total-labels + .grand-total-row td{border-top-width:2.2px!important}

    /* Keep report meta small and neat. */
    .print-meta-header{border-bottom-color:#1d4ed8!important;margin-bottom:4px!important}
    .print-meta-title span{color:#1d4ed8!important}.print-meta-details span{color:#334155!important}
}


/* Update v11: safer Project Detail print readability fallback */
@media print{
  .project-detail-sheet-modern .worksheet-meta-table th,
  .project-detail-sheet-modern .worksheet-meta-table td{font-size:7px!important;line-height:1.1!important}
  .project-detail-sheet-modern .worksheet-meta-table tr.project-name-row td{font-size:7.2px!important;line-height:1.1!important;text-transform:none!important}
  .project-detail-sheet-modern .worksheet-bond-table thead th,
  .project-detail-sheet-modern .worksheet-bond-table tfoot th,
  .project-detail-sheet-modern .worksheet-bond-table .bond-side-cell,
  .project-detail-sheet-modern .worksheet-bond-table .bond-label-cell strong,
  .project-detail-sheet-modern .worksheet-bond-table .bond-ref-cell,
  .project-detail-sheet-modern .worksheet-bond-table .bond-value-cell{font-size:6.8px!important;line-height:1.08!important}
  .project-detail-sheet-modern .excel-like-ledger th,
  .project-detail-sheet-modern .excel-like-ledger td{font-size:6.5px!important;line-height:1.06!important}
}

/* Update v13: cleaner minimal table system-wide appearance */
:root{
    --clean-table-head:#eaf2fb;
    --clean-table-head-strong:#d9e8f8;
    --clean-table-border:#cfd9e6;
    --clean-table-line:#dce5ef;
    --clean-table-alt:#f8fbff;
    --clean-table-total:#dff0ff;
    --clean-table-total-line:#38bdf8;
    --clean-table-text:#10213d;
}
.table-wrap,
.report-table-wrap,
.grand-total-wrap,
.project-sheet-table-wrap,
.project-detail-sheet-modern .project-sheet-table-wrap{
    border-radius:0!important;
    border:1px solid var(--clean-table-border)!important;
    box-shadow:none!important;
    background:#fff!important;
    overflow:auto;
}
.table-scroll-top,
.table-scroll-top + .table-wrap{
    border-radius:0!important;
}
.data-table,
.report-table-wrap table,
.grand-total-table{
    border-collapse:collapse!important;
    border-spacing:0!important;
    background:#fff!important;
}
.data-table th,
.report-table-wrap table th,
.grand-total-table th{
    background:var(--clean-table-head)!important;
    color:var(--clean-table-text)!important;
    border:1px solid var(--clean-table-border)!important;
    border-bottom:2px solid #a9bdd4!important;
    font-weight:850!important;
    text-transform:uppercase;
    letter-spacing:.025em!important;
}
.data-table td,
.report-table-wrap table td,
.grand-total-table td{
    border:1px solid var(--clean-table-line)!important;
    color:#172033;
    background:#fff;
}
.data-table tbody tr:nth-child(even):not(.subtotal-row):not(.grand-total-row) td,
.report-table-wrap table tbody tr:nth-child(even):not(.subtotal-row):not(.grand-total-row) td{
    background:var(--clean-table-alt)!important;
}
.data-table tbody tr:hover td,
.report-table-wrap table tbody tr:hover td{
    background:#eef6ff!important;
}
.data-table .project-name,
.projects-table .project-name{
    color:#132244!important;
    font-weight:760!important;
}
.subtotal-row td,
.grand-total-row td,
.report-grand-total .grand-total-row td,
.project-grand-total-wrap .grand-total-row td{
    background:var(--clean-table-total)!important;
    color:#0f172a!important;
    border-top:2px solid var(--clean-table-total-line)!important;
    border-bottom:2px solid var(--clean-table-total-line)!important;
    font-weight:900!important;
    padding-top:9px!important;
    padding-bottom:9px!important;
}
.subtotal-row td:first-child,
.grand-total-row td:first-child{
    color:#0f3a66!important;
}
.grand-total-labels td{
    background:#f5f8fc!important;
    color:#344054!important;
    border:1px solid var(--clean-table-border)!important;
    padding-top:7px!important;
    padding-bottom:7px!important;
}
.pill,
.accom-badge,
.ledger-status-pill{
    border-radius:5px!important;
}
@media print{
    .table-wrap,
    .report-table-wrap,
    .grand-total-wrap,
    .project-sheet-table-wrap{
        border-radius:0!important;
        box-shadow:none!important;
        border-color:#9fb4cc!important;
    }
    .data-table th,
    .report-table-wrap table th,
    .grand-total-table th{
        background:#dbeafe!important;
        color:#0f172a!important;
        border-color:#8aa7c7!important;
        -webkit-print-color-adjust:exact!important;
        print-color-adjust:exact!important;
    }
    .data-table td,
    .report-table-wrap table td,
    .grand-total-table td{
        border-color:#9fb4cc!important;
    }
    .subtotal-row td,
    .grand-total-row td,
    .report-grand-total .grand-total-row td,
    .project-grand-total-wrap .grand-total-row td{
        background:#dff0ff!important;
        color:#0f172a!important;
        border-top:2px solid #38bdf8!important;
        border-bottom:2px solid #38bdf8!important;
        padding-top:4px!important;
        padding-bottom:4px!important;
        -webkit-print-color-adjust:exact!important;
        print-color-adjust:exact!important;
    }
}


/* Update v14: minimal professional print colors */
@media print{
    @page{size:A4 landscape;margin:3mm}
    html,body{background:#fff!important;color:#111827!important;font-family:Arial,Helvetica,sans-serif!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}

    /* Report meta/header: keep it formal, not colorful. */
    .print-meta-header,
    .report-head{
        background:#fff!important;
        border-bottom:1px solid #94a3b8!important;
        color:#111827!important;
    }
    .print-meta-title span,
    .print-meta-title strong,
    .print-meta-details span,
    .print-meta-details strong,
    .report-title h2,
    .report-title h3,
    .report-title .asof,
    .report-filter-line{
        color:#111827!important;
        background:transparent!important;
    }
    .print-meta-title span{letter-spacing:.05em!important;color:#475569!important}

    /* Summary boxes: simple report boxes with very light fill only. */
    .grid.stats,
    .stats,
    .report-stat-strip{gap:2.5px!important}
    .stat-card,
    .stat-card:nth-child(2),
    .stat-card:nth-child(3),
    .stat-card:nth-child(4),
    .project-detail-item,
    .mini-info-card,
    .excel-box,
    .ledger-sheet,
    .note-card,
    .project-sheet-card,
    .project-detail-sheet-modern .worksheet-card,
    .project-detail-sheet-modern .worksheet-note-card,
    .project-detail-sheet-modern .contact-chip{
        background:#f8fafc!important;
        border:1px solid #cbd5e1!important;
        color:#111827!important;
        box-shadow:none!important;
        border-radius:0!important;
    }
    .stat-card:after{display:none!important}
    .stat-card span,
    .stat-card small,
    .project-detail-item span,
    .mini-info-card span,
    .note-card span,
    .contact-chip span{color:#475569!important}
    .stat-card strong,
    .project-detail-item strong,
    .mini-info-card strong,
    .note-card strong,
    .contact-chip strong{color:#111827!important}

    /* Main print tables: minimal grayscale with a very light blue-gray header. */
    .table-wrap,
    .report-table-wrap,
    .grand-total-wrap,
    .project-sheet-table-wrap,
    .project-detail-sheet-modern .project-sheet-table-wrap{
        background:#fff!important;
        border:0!important;
        box-shadow:none!important;
        border-radius:0!important;
        overflow:visible!important;
    }
    .data-table,
    .projects-table,
    .service-invoice-table,
    .cr-table,
    .report-table,
    .grand-total-table,
    .project-master-table,
    .bond-monitor-table,
    .ledger-monitor-table,
    .project-detail-sheet-modern .worksheet-meta-table,
    .project-detail-sheet-modern .worksheet-bond-table,
    .project-detail-sheet-modern .excel-like-ledger{
        border-collapse:collapse!important;
        border-spacing:0!important;
        background:#fff!important;
        table-layout:fixed!important;
    }
    .data-table th,
    .report-table th,
    .grand-total-table th,
    .project-master-table th,
    .bond-monitor-table th,
    .ledger-monitor-table th,
    .project-detail-sheet-modern .worksheet-meta-table th,
    .project-detail-sheet-modern .worksheet-bond-table th,
    .project-detail-sheet-modern .excel-like-ledger th,
    .report-table-wrap table th,
    .grand-total-table th{
        background:#f1f5f9!important;
        color:#111827!important;
        border:1px solid #94a3b8!important;
        border-bottom:1.2px solid #64748b!important;
        font-weight:900!important;
        -webkit-print-color-adjust:exact!important;
        print-color-adjust:exact!important;
    }
    .data-table td,
    .report-table td,
    .grand-total-table td,
    .project-master-table td,
    .bond-monitor-table td,
    .ledger-monitor-table td,
    .project-detail-sheet-modern .worksheet-meta-table td,
    .project-detail-sheet-modern .worksheet-bond-table td,
    .project-detail-sheet-modern .excel-like-ledger td,
    .report-table-wrap table td,
    .grand-total-table td{
        background:#fff!important;
        color:#111827!important;
        border:1px solid #cbd5e1!important;
        -webkit-print-color-adjust:exact!important;
        print-color-adjust:exact!important;
    }
    .data-table tbody tr:nth-child(even):not(.subtotal-row):not(.grand-total-row):not(.grand-total-labels) td,
    .report-table tbody tr:nth-child(even):not(.subtotal-row):not(.grand-total-row):not(.grand-total-labels) td,
    .report-table-wrap table tbody tr:nth-child(even):not(.subtotal-row):not(.grand-total-row):not(.grand-total-labels) td,
    .bond-monitor-table tbody tr:nth-child(even):not(.sheet-ledger-total) td,
    .ledger-monitor-table tbody tr:nth-child(even):not(.sheet-ledger-total) td,
    .project-detail-sheet-modern .excel-like-ledger tbody tr:nth-child(even):not(.sheet-ledger-total) td{
        background:#fafafa!important;
    }

    /* Totals: no dark or saturated bars; just a formal light gray-blue total line. */
    .subtotal-row td,
    .grand-total-row td,
    .report-grand-total .grand-total-row td,
    .project-grand-total-wrap .grand-total-row td,
    .ledger-monitor-table tr.sheet-ledger-total td,
    .project-sheet-ledger .sheet-ledger-total td,
    .project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td,
    .project-detail-sheet-modern .worksheet-bond-table tfoot th,
    .project-detail-sheet-modern .worksheet-bond-table tfoot td{
        background:#e9eef5!important;
        color:#111827!important;
        border-color:#94a3b8!important;
        border-top:1.6px solid #64748b!important;
        border-bottom:1.6px solid #64748b!important;
        font-weight:950!important;
        padding-top:3px!important;
        padding-bottom:3px!important;
        -webkit-print-color-adjust:exact!important;
        print-color-adjust:exact!important;
    }
    .subtotal-row td *,
    .grand-total-row td *,
    .report-grand-total .grand-total-row td *,
    .project-grand-total-wrap .grand-total-row td *,
    .ledger-monitor-table tr.sheet-ledger-total td *,
    .project-sheet-ledger .sheet-ledger-total td *,
    .project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td *{color:#111827!important}
    .grand-total-labels td{
        background:#f8fafc!important;
        color:#334155!important;
        border-color:#cbd5e1!important;
        font-weight:850!important;
    }

    /* Record highlights/status should be subtle, not bright. */
    .completed-project td,
    .accom-complete,
    .project-master-table tr.po-row th,
    .project-master-table tr.po-row td,
    .project-detail-sheet-modern .worksheet-meta-table tr.po-row th,
    .project-detail-sheet-modern .worksheet-meta-table tr.po-row td,
    .bond-monitor-table tr.complete .status-cell,
    .bond-monitor-table tr.complete .bond-name-cell,
    .project-detail-sheet-modern .worksheet-bond-table tr.complete .bond-side-cell,
    .project-detail-sheet-modern .worksheet-bond-table tr.complete .bond-label-cell{
        background:#f0fdf4!important;
        color:#111827!important;
        border-color:#cbd5e1!important;
    }
    .ledger-monitor-table tr.ledger-highlight td,
    .project-detail-sheet-modern .excel-like-ledger .ledger-highlight td{
        background:#fffbeb!important;
        color:#111827!important;
    }
    .ledger-monitor-table tr.ledger-highlight td:first-child,
    .ledger-monitor-table tr.ledger-highlight .ref-cell,
    .project-detail-sheet-modern .excel-like-ledger .ledger-highlight .ref-cell{
        background:#fef3c7!important;
        color:#111827!important;
    }
    .ledger-monitor-table .ref-cell,
    .project-detail-sheet-modern .excel-like-ledger .ref-cell,
    .bond-monitor-table .status-cell{
        background:#f8fafc!important;
        color:#111827!important;
    }

    /* Print badges/status as text-like labels with minimal outlines. */
    .data-table .pill,
    .accom-badge,
    .ledger-status-pill,
    .project-detail-sheet-modern .excel-like-ledger .pill,
    .ledger-monitor-table .pill{
        background:#fff!important;
        color:#111827!important;
        border:1px solid #cbd5e1!important;
        border-radius:0!important;
        box-shadow:none!important;
        padding:0 2px!important;
    }

    /* Ensure old bright total cells do not survive in Project Detail ledger. */
    .ledger-monitor-table tr.sheet-ledger-total td:nth-child(2),
    .project-detail-sheet-modern .excel-like-ledger .sheet-ledger-total td:nth-child(2),
    .project-detail-sheet-modern .worksheet-bond-table tfoot th:nth-child(2),
    .project-detail-sheet-modern .worksheet-bond-table tfoot td:nth-child(2){
        background:#e9eef5!important;
        color:#111827!important;
    }
}


/* Update v17: clearer project statuses and safer Project Detail print fit */
.pill.blue{background:#eaf2ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important}
.pill.amber{background:#fff7e6!important;color:#a16207!important;border-color:#fde68a!important}
.projects-table .pill.green,
.owner-view-right .projects-table .pill.green,
.data-table .pill.green{background:#e8fff1!important;color:#08733f!important;border-color:#bcefd3!important}
.projects-table .pill.blue,
.owner-view-right .projects-table .pill.blue,
.data-table .pill.blue{background:#eaf2ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important}
.projects-table .pill.red,
.owner-view-right .projects-table .pill.red,
.data-table .pill.red{background:#fff1f1!important;color:#b42318!important;border-color:#ffd4d4!important}
.projects-table .pill.gray,
.owner-view-right .projects-table .pill.gray,
.data-table .pill.gray{background:#f3f4f6!important;color:#4b5563!important;border-color:#d1d5db!important}

/* Status colors should remain visible on screen only; print stays minimal/report-like. */
@media print{
    .data-table .pill.green,
    .data-table .pill.blue,
    .data-table .pill.red,
    .data-table .pill.gray,
    .data-table .pill.amber{
        background:#fff!important;
        color:#111827!important;
        border:1px solid #cbd5e1!important;
    }
}

/* Update v18: sidebar dark-mode toggle, cleaner sidebar sections, and persistent dark UI */
@media screen{
    .sidebar{
        background:linear-gradient(180deg,#09111f 0%,#101b32 52%,#0b1020 100%);
        border-right:1px solid rgba(255,255,255,.08);
        box-shadow:12px 0 36px rgba(8,15,30,.20);
    }
    .side-brand,
    .side-user,
    .sidebar-search,
    .theme-toggle-block{
        border-radius:12px;
    }
    .side-nav{
        gap:3px;
        padding:4px 2px 12px;
    }
    .nav-section{
        display:flex;
        align-items:center;
        gap:8px;
        margin:14px 7px 6px;
        color:#9fb6d0;
        font-size:9px;
        letter-spacing:.17em;
    }
    .nav-section:after{
        content:"";
        height:1px;
        flex:1;
        background:linear-gradient(90deg,rgba(159,182,208,.34),rgba(159,182,208,0));
    }
    .side-nav a{
        border-radius:10px;
        border:1px solid transparent;
        margin:1px 0;
    }
    .side-nav a span{
        border-radius:9px;
        background:rgba(255,255,255,.08);
    }
    .side-nav a:hover,
    .side-nav a.active{
        background:rgba(255,255,255,.10);
        border-color:rgba(255,255,255,.10);
        transform:translateX(2px);
    }
    .side-nav a.active{
        box-shadow:inset 3px 0 0 #77d7ff;
    }
    .theme-toggle-block{
        margin:0 0 13px;
        padding:7px;
        border:1px solid rgba(255,255,255,.12);
        background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.05));
        box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
    }
    .theme-toggle-btn{
        width:100%;
        min-height:40px;
        display:flex;
        align-items:center;
        gap:10px;
        border:0;
        border-radius:10px;
        padding:8px 10px;
        cursor:pointer;
        color:#eaf6ff;
        background:rgba(2,10,24,.28);
        font-weight:900;
        transition:.18s ease;
    }
    .theme-toggle-btn:hover{
        background:rgba(255,255,255,.13);
        transform:translateY(-1px);
    }
    .theme-toggle-btn.is-dark{
        background:linear-gradient(135deg,#26364f,#1d2638);
        color:#ffffff;
        box-shadow:inset 0 0 0 1px rgba(255,255,255,.10);
    }
    .theme-toggle-icon{
        width:30px;
        height:30px;
        display:inline-grid;
        place-items:center;
        border-radius:9px;
        background:linear-gradient(135deg,#f8d86b,#ffefae);
        color:#2d2502;
        flex:0 0 auto;
    }
    .theme-toggle-btn.is-dark .theme-toggle-icon{
        background:linear-gradient(135deg,#64748b,#d7e3f4);
        color:#101827;
    }
    .theme-toggle-icon .nav-icon{
        width:16px;
        height:16px;
    }
    .theme-toggle-label{
        line-height:1;
        font-size:13px;
    }
    .app-shell.sidebar-collapsed .theme-toggle-block{
        padding:6px;
        margin-bottom:12px;
    }
    .app-shell.sidebar-collapsed .theme-toggle-btn{
        justify-content:center;
        padding:7px;
    }
    .app-shell.sidebar-collapsed .theme-toggle-label{
        display:none;
    }

    html.dark-mode body{
        background:linear-gradient(135deg,#0f1720,#151d29 48%,#111827);
        color:#d8dee9;
        color-scheme:dark;
    }
    html.dark-mode .main-area{
        background:transparent;
    }
    html.dark-mode .topbar,
    html.dark-mode .card,
    html.dark-mode .glass-card,
    html.dark-mode .project-detail-section,
    html.dark-mode .recent-card,
    html.dark-mode .list-focus-card,
    html.dark-mode .app-modal-panel,
    html.dark-mode .project-sheet-card,
    html.dark-mode .project-ledger-card,
    html.dark-mode .project-detail-sheet-modern .sheet-main-info-card,
    html.dark-mode .project-detail-sheet-modern .sheet-bond-table-card,
    html.dark-mode .project-detail-sheet-modern .sheet-ledger-card-modern,
    html.dark-mode .si-ledger-card,
    html.dark-mode .cr-ledger-block,
    html.dark-mode .cr-ledger-item,
    html.dark-mode .project-detail-groups section,
    html.dark-mode .compact-detail-list div,
    html.dark-mode .project-summary-main,
    html.dark-mode .project-summary-side,
    html.dark-mode .on-file-detail-item,
    html.dark-mode .service-invoice-form,
    html.dark-mode .owner-view-filters,
    html.dark-mode .search-result-item{
        background:#182230!important;
        border-color:#2b394a!important;
        color:#d8dee9!important;
        box-shadow:0 18px 46px rgba(0,0,0,.28)!important;
    }
    html.dark-mode .topbar{
        background:rgba(24,34,48,.88)!important;
        backdrop-filter:blur(14px);
    }
    html.dark-mode .topbar h1,
    html.dark-mode .section-title h2,
    html.dark-mode .year-title,
    html.dark-mode .report-title h2,
    html.dark-mode .report-title h3,
    html.dark-mode .project-detail-item strong,
    html.dark-mode .compact-detail-list strong,
    html.dark-mode .si-ledger-head h3,
    html.dark-mode .si-ledger-metrics strong,
    html.dark-mode .cr-ledger-item strong,
    html.dark-mode .owner-card h3,
    html.dark-mode .stat-card strong,
    html.dark-mode .data-table .project-name,
    html.dark-mode .data-table .num,
    html.dark-mode .project-sheet-ledger td>strong,
    html.dark-mode .bond-detail strong,
    html.dark-mode .bond-provider strong,
    html.dark-mode .sheet-info-row strong{
        color:#f4f7fb!important;
    }
    html.dark-mode .muted,
    html.dark-mode .stat-card span,
    html.dark-mode .stat-card small,
    html.dark-mode .project-detail-item span,
    html.dark-mode .compact-detail-list span,
    html.dark-mode .si-ledger-head p,
    html.dark-mode .cr-ledger-item span,
    html.dark-mode .search-result-item span,
    html.dark-mode .sheet-info-row span,
    html.dark-mode .bond-detail small,
    html.dark-mode .bond-name b,
    html.dark-mode .project-sheet-ledger td>small,
    html.dark-mode .project-sheet-ledger td .pill+small{
        color:#aebacc!important;
    }
    html.dark-mode .eyebrow{
        color:#77d7ff!important;
    }
    html.dark-mode .table-wrap,
    html.dark-mode .project-sheet-table-wrap{
        background:#141c28!important;
        border-color:#2b394a!important;
        box-shadow:0 18px 42px rgba(0,0,0,.24)!important;
    }
    html.dark-mode .data-table,
    html.dark-mode .project-sheet-ledger,
    html.dark-mode .project-detail-sheet-modern .excel-like-ledger,
    html.dark-mode .ledger-monitor-table,
    html.dark-mode .bond-monitor-table{
        background:#151f2c!important;
        color:#d8dee9!important;
    }
    html.dark-mode .data-table th,
    html.dark-mode .project-sheet-ledger th,
    html.dark-mode .project-detail-sheet-modern .excel-like-ledger th,
    html.dark-mode .ledger-monitor-table th,
    html.dark-mode .bond-monitor-table th{
        background:#202c3b!important;
        color:#e9f1fb!important;
        border-color:#344457!important;
    }
    html.dark-mode .data-table td,
    html.dark-mode .project-sheet-ledger td,
    html.dark-mode .project-detail-sheet-modern .excel-like-ledger td,
    html.dark-mode .ledger-monitor-table td,
    html.dark-mode .bond-monitor-table td{
        background:#182230!important;
        color:#d8dee9!important;
        border-color:#2d3b4e!important;
    }
    html.dark-mode .data-table tbody tr:nth-child(even):not(.subtotal-row):not(.grand-total-row):not(.grand-total-labels) td,
    html.dark-mode .project-sheet-ledger tbody tr:nth-child(even):not(.sheet-ledger-total) td,
    html.dark-mode .project-detail-sheet-modern .excel-like-ledger tbody tr:nth-child(even):not(.sheet-ledger-total) td{
        background:#151f2c!important;
    }
    html.dark-mode .data-table tbody tr:hover td,
    html.dark-mode .project-link-row:hover td,
    html.dark-mode .project-click-row:hover td{
        background:#223146!important;
    }
    html.dark-mode .subtotal-row td,
    html.dark-mode .grand-total-row td,
    html.dark-mode .grand-total-labels td,
    html.dark-mode .sheet-ledger-total td,
    html.dark-mode .si-ledger-total,
    html.dark-mode .bond-total,
    html.dark-mode .project-detail-sheet-modern .worksheet-bond-table tfoot th,
    html.dark-mode .project-detail-sheet-modern .worksheet-bond-table tfoot td{
        background:#213449!important;
        color:#dff6ff!important;
        border-color:#42556b!important;
    }
    html.dark-mode input,
    html.dark-mode select,
    html.dark-mode textarea,
    html.dark-mode .searchbox,
    html.dark-mode .filters select,
    html.dark-mode .filters input,
    html.dark-mode .form-grid input,
    html.dark-mode .form-grid select,
    html.dark-mode .form-grid textarea,
    html.dark-mode .input-with-icon{
        background:#121a25!important;
        color:#eef4fb!important;
        border-color:#344457!important;
    }
    html.dark-mode input::placeholder,
    html.dark-mode textarea::placeholder{
        color:#758397!important;
    }
    html.dark-mode .btn{
        background:#202c3b;
        border-color:#344457;
        color:#edf5ff;
        box-shadow:none;
    }
    html.dark-mode .btn.primary{
        background:linear-gradient(135deg,#315a9d,#1f6a7d)!important;
        color:#fff!important;
        border-color:transparent!important;
    }
    html.dark-mode .btn.green{
        background:linear-gradient(135deg,#087a50,#15a36d)!important;
        color:#f0fff8!important;
        border-color:transparent!important;
    }
    html.dark-mode .btn.danger{
        background:#3a1c22!important;
        color:#ffb4b4!important;
        border-color:#6b2731!important;
    }
    html.dark-mode .data-table .btn.small{
        background:#25364b!important;
        color:#e9f1fb!important;
        border-color:#3a4d63!important;
    }
    html.dark-mode .data-table .btn.small.green,
    html.dark-mode .pill.green{
        background:#123c2c!important;
        color:#8ff0bd!important;
        border-color:#206747!important;
    }
    html.dark-mode .pill.blue{
        background:#152d4b!important;
        color:#9cc9ff!important;
        border-color:#294d78!important;
    }
    html.dark-mode .pill.red{
        background:#3a1c22!important;
        color:#ffb4b4!important;
        border-color:#6b2731!important;
    }
    html.dark-mode .pill.gray,
    html.dark-mode .pill.amber{
        background:#2a3442!important;
        color:#d7e0eb!important;
        border-color:#465669!important;
    }
    html.dark-mode .alert.success{
        background:#123c2c!important;
        color:#a9f8cc!important;
        border-color:#226847!important;
    }
    html.dark-mode .alert.danger{
        background:#3a1c22!important;
        color:#ffc3c3!important;
        border-color:#6b2731!important;
    }
    html.dark-mode .alert.info{
        background:#142c49!important;
        color:#b8d9ff!important;
        border-color:#2c527b!important;
    }
    html.dark-mode .owner-card{
        background:#182230!important;
        border-color:#2b394a!important;
        box-shadow:0 18px 42px rgba(0,0,0,.24)!important;
    }
    html.dark-mode .owner-card:after,
    html.dark-mode .stat-card:after{
        background:rgba(119,215,255,.08)!important;
    }
    html.dark-mode .login-panel{
        background:#111827!important;
    }
    html.dark-mode .login-card.modern{
        background:#182230!important;
        border-color:#2b394a!important;
        color:#d8dee9!important;
        box-shadow:0 18px 46px rgba(0,0,0,.32)!important;
    }
    html.dark-mode .login-card.modern h2{
        color:#f4f7fb!important;
    }
    html.dark-mode .login-card.modern p,
    html.dark-mode .login-hint{
        color:#aebacc!important;
    }
    html.dark-mode .app-modal-backdrop{
        background:rgba(3,7,18,.72)!important;
    }
}

@media print{
    html.dark-mode,
    html.dark-mode body{
        background:#fff!important;
        color:#000!important;
        color-scheme:light!important;
    }
}

@media screen and (max-width:800px){
    .app-shell.sidebar-collapsed .theme-toggle-block{padding:7px;margin-bottom:13px}
    .app-shell.sidebar-collapsed .theme-toggle-btn{justify-content:flex-start;padding:8px 10px}
    .app-shell.sidebar-collapsed .theme-toggle-label{display:inline}
}

/* Update v19: softer grey dark mode, clearer text contrast, and cleaner spacing */
@media screen{
    html.dark-mode{
        --ink:#eef1f5;
        --muted:#b8c0ca;
        --line:#464b54;
        --soft:#2a2d33;
        --white:#2f3238;
        --navy:#f1f5f9;
        --navy-2:#dce4ee;
        --blue:#9db8ff;
        --mint:#8fd6c9;
        --shadow:0 18px 46px rgba(0,0,0,.26);
    }
    html.dark-mode body{
        background:linear-gradient(135deg,#24272d 0%,#202329 48%,#25282e 100%)!important;
        color:#eef1f5!important;
    }
    html.dark-mode .main-area{
        background:#24272d!important;
    }

    /* Sidebar stays darker; content area uses grey cards so it does not blend with the sidebar. */
    html.dark-mode .sidebar{
        background:linear-gradient(180deg,#111827 0%,#151d2a 52%,#10151f 100%)!important;
        border-right:1px solid rgba(255,255,255,.10)!important;
    }
    html.dark-mode .side-brand,
    html.dark-mode .side-user,
    html.dark-mode .sidebar-search,
    html.dark-mode .theme-toggle-block{
        background:rgba(255,255,255,.075)!important;
        border-color:rgba(255,255,255,.12)!important;
    }
    html.dark-mode .side-nav a{
        color:#d5dbe5!important;
        padding:10px 11px!important;
    }
    html.dark-mode .side-nav a span{
        background:rgba(255,255,255,.075)!important;
    }
    html.dark-mode .side-nav a:hover,
    html.dark-mode .side-nav a.active{
        background:rgba(255,255,255,.12)!important;
        border-color:rgba(255,255,255,.14)!important;
        color:#ffffff!important;
    }
    html.dark-mode .nav-section{
        color:#aeb8c7!important;
        margin-top:15px!important;
    }
    html.dark-mode .nav-section:after{
        background:linear-gradient(90deg,rgba(174,184,199,.36),rgba(174,184,199,0))!important;
    }

    /* Main surfaces */
    html.dark-mode .topbar,
    html.dark-mode .card,
    html.dark-mode .glass-card,
    html.dark-mode .stat-card,
    html.dark-mode .owner-card,
    html.dark-mode .project-detail-section,
    html.dark-mode .recent-card,
    html.dark-mode .list-focus-card,
    html.dark-mode .app-modal-panel,
    html.dark-mode .project-sheet-card,
    html.dark-mode .project-ledger-card,
    html.dark-mode .si-ledger-card,
    html.dark-mode .cr-ledger-block,
    html.dark-mode .cr-ledger-item,
    html.dark-mode .project-detail-groups section,
    html.dark-mode .compact-detail-list div,
    html.dark-mode .project-summary-main,
    html.dark-mode .project-summary-side,
    html.dark-mode .on-file-detail-item,
    html.dark-mode .service-invoice-form,
    html.dark-mode .owner-view-filters,
    html.dark-mode .search-result-item,
    html.dark-mode .summary-chip,
    html.dark-mode .worksheet-card,
    html.dark-mode .worksheet-card-head,
    html.dark-mode .worksheet-ledger-card,
    html.dark-mode .worksheet-note-card,
    html.dark-mode .project-detail-sheet-modern .sheet-main-info-card,
    html.dark-mode .project-detail-sheet-modern .sheet-bond-table-card,
    html.dark-mode .project-detail-sheet-modern .sheet-ledger-card-modern{
        background:#2f3238!important;
        border-color:#464b54!important;
        color:#eef1f5!important;
        box-shadow:0 14px 38px rgba(0,0,0,.22)!important;
    }
    html.dark-mode .card,
    html.dark-mode .glass-card,
    html.dark-mode .project-detail-section,
    html.dark-mode .project-detail-sheet-modern,
    html.dark-mode .si-ledger-card,
    html.dark-mode .cr-ledger-block,
    html.dark-mode .owner-view-filters{
        padding:20px!important;
    }
    html.dark-mode .topbar{
        padding:17px 20px!important;
        background:#30343b!important;
    }
    html.dark-mode .project-detail-sheet-modern{
        background:#292c32!important;
        border-color:#464b54!important;
        color:#eef1f5!important;
    }

    /* Text contrast */
    html.dark-mode h1,
    html.dark-mode h2,
    html.dark-mode h3,
    html.dark-mode h4,
    html.dark-mode h5,
    html.dark-mode h6,
    html.dark-mode label,
    html.dark-mode .form-grid label,
    html.dark-mode .topbar h1,
    html.dark-mode .section-title h2,
    html.dark-mode .year-title,
    html.dark-mode .report-title h2,
    html.dark-mode .report-title h3,
    html.dark-mode .project-detail-item strong,
    html.dark-mode .compact-detail-list strong,
    html.dark-mode .si-ledger-head h3,
    html.dark-mode .si-ledger-metrics strong,
    html.dark-mode .cr-ledger-item strong,
    html.dark-mode .owner-card h3,
    html.dark-mode .stat-card strong,
    html.dark-mode .owner-card .moneyline b,
    html.dark-mode .data-table .project-name,
    html.dark-mode .data-table .num,
    html.dark-mode .project-sheet-ledger td>strong,
    html.dark-mode .bond-detail strong,
    html.dark-mode .bond-provider strong,
    html.dark-mode .sheet-info-row strong,
    html.dark-mode .worksheet-card-head h3,
    html.dark-mode .worksheet-ledger-head h3,
    html.dark-mode .project-detail-sheet-modern .summary-chip strong,
    html.dark-mode .project-detail-sheet-modern .worksheet-meta-table td,
    html.dark-mode .project-detail-sheet-modern .worksheet-bond-table .bond-label-cell strong{
        color:#f4f6f9!important;
    }
    html.dark-mode .muted,
    html.dark-mode p,
    html.dark-mode .stat-card span,
    html.dark-mode .stat-card small,
    html.dark-mode .project-detail-item span,
    html.dark-mode .compact-detail-list span,
    html.dark-mode .si-ledger-head p,
    html.dark-mode .cr-ledger-item span,
    html.dark-mode .search-result-item span,
    html.dark-mode .sheet-info-row span,
    html.dark-mode .bond-detail small,
    html.dark-mode .bond-name b,
    html.dark-mode .project-sheet-ledger td>small,
    html.dark-mode .project-sheet-ledger td .pill+small,
    html.dark-mode .owner-card .moneyline,
    html.dark-mode .project-detail-sheet-modern .summary-chip span,
    html.dark-mode .project-detail-sheet-modern .worksheet-card-head p,
    html.dark-mode .project-detail-sheet-modern .worksheet-ledger-head p,
    html.dark-mode .project-detail-sheet-modern .worksheet-note-card span,
    html.dark-mode .project-detail-sheet-modern .contact-chip span{
        color:#c0c7d1!important;
    }
    html.dark-mode .eyebrow{
        color:#9fc8ff!important;
    }

    /* Tables */
    html.dark-mode .table-wrap,
    html.dark-mode .project-sheet-table-wrap,
    html.dark-mode .ledger-wrap{
        background:#2a2d33!important;
        border-color:#464b54!important;
        border-radius:10px!important;
        box-shadow:0 12px 30px rgba(0,0,0,.18)!important;
    }
    html.dark-mode .data-table,
    html.dark-mode .project-sheet-ledger,
    html.dark-mode .project-detail-sheet-modern .excel-like-ledger,
    html.dark-mode .ledger-monitor-table,
    html.dark-mode .bond-monitor-table,
    html.dark-mode .worksheet-table,
    html.dark-mode .project-detail-sheet-modern .worksheet-table{
        background:#2a2d33!important;
        color:#edf1f5!important;
    }
    html.dark-mode .data-table th,
    html.dark-mode .project-sheet-ledger th,
    html.dark-mode .project-detail-sheet-modern .excel-like-ledger th,
    html.dark-mode .ledger-monitor-table th,
    html.dark-mode .bond-monitor-table th,
    html.dark-mode .worksheet-table th,
    html.dark-mode .project-detail-sheet-modern .worksheet-table th{
        background:#3a3f47!important;
        color:#f1f4f8!important;
        border-color:#565c66!important;
        padding:10px 11px!important;
    }
    html.dark-mode .data-table td,
    html.dark-mode .project-sheet-ledger td,
    html.dark-mode .project-detail-sheet-modern .excel-like-ledger td,
    html.dark-mode .ledger-monitor-table td,
    html.dark-mode .bond-monitor-table td,
    html.dark-mode .worksheet-table td,
    html.dark-mode .project-detail-sheet-modern .worksheet-table td{
        background:#30343b!important;
        color:#e8edf4!important;
        border-color:#4b515b!important;
        padding:9px 11px!important;
    }
    html.dark-mode .data-table tbody tr:nth-child(even):not(.subtotal-row):not(.grand-total-row):not(.grand-total-labels) td,
    html.dark-mode .project-sheet-ledger tbody tr:nth-child(even):not(.sheet-ledger-total) td,
    html.dark-mode .project-detail-sheet-modern .excel-like-ledger tbody tr:nth-child(even):not(.sheet-ledger-total) td,
    html.dark-mode .worksheet-table tbody tr:nth-child(even) td{
        background:#2b2f36!important;
    }
    html.dark-mode .data-table tbody tr:hover td,
    html.dark-mode .project-link-row:hover td,
    html.dark-mode .project-click-row:hover td,
    html.dark-mode .worksheet-table tbody tr:hover td{
        background:#373c45!important;
    }
    html.dark-mode .subtotal-row td,
    html.dark-mode .grand-total-row td,
    html.dark-mode .grand-total-labels td,
    html.dark-mode .sheet-ledger-total td,
    html.dark-mode .si-ledger-total,
    html.dark-mode .bond-total,
    html.dark-mode .project-detail-sheet-modern .worksheet-bond-table tfoot th,
    html.dark-mode .project-detail-sheet-modern .worksheet-bond-table tfoot td{
        background:#3d4652!important;
        color:#f4f8fb!important;
        border-color:#626b77!important;
    }

    /* Forms, filters, search, and modal controls */
    html.dark-mode input,
    html.dark-mode select,
    html.dark-mode textarea,
    html.dark-mode .searchbox,
    html.dark-mode .filters select,
    html.dark-mode .filters input,
    html.dark-mode .form-grid input,
    html.dark-mode .form-grid select,
    html.dark-mode .form-grid textarea,
    html.dark-mode .input-with-icon,
    html.dark-mode .sidebar-search input{
        background:#292d34!important;
        color:#f4f6f9!important;
        border-color:#565c66!important;
    }
    html.dark-mode input:focus,
    html.dark-mode select:focus,
    html.dark-mode textarea:focus{
        border-color:#8aa4c6!important;
        outline:2px solid rgba(138,164,198,.22)!important;
    }
    html.dark-mode input::placeholder,
    html.dark-mode textarea::placeholder{
        color:#a9b1bc!important;
    }
    html.dark-mode .filters,
    html.dark-mode .toolbar,
    html.dark-mode .form-grid{
        gap:12px!important;
    }

    /* Buttons and badges, softened for grey dark mode */
    html.dark-mode .btn{
        background:#3a3f47!important;
        border-color:#565c66!important;
        color:#f2f5f8!important;
        box-shadow:none!important;
    }
    html.dark-mode .btn:hover{
        background:#454b55!important;
        box-shadow:0 12px 26px rgba(0,0,0,.22)!important;
    }
    html.dark-mode .btn.primary{
        background:linear-gradient(135deg,#506f9b,#3b596f)!important;
        color:#ffffff!important;
        border-color:transparent!important;
    }
    html.dark-mode .btn.green{
        background:linear-gradient(135deg,#356b56,#428466)!important;
        color:#f2fff8!important;
        border-color:transparent!important;
    }
    html.dark-mode .btn.danger{
        background:#4a2d31!important;
        color:#ffd7d7!important;
        border-color:#744149!important;
    }
    html.dark-mode .data-table .btn.small{
        background:#3b414b!important;
        color:#f0f4f8!important;
        border-color:#5a626e!important;
    }

    /* Project Detail-specific rows that used bright colors before */
    html.dark-mode .project-detail-sheet-modern .worksheet-meta-table tr.po-row th,
    html.dark-mode .project-detail-sheet-modern .worksheet-meta-table tr.po-row td,
    html.dark-mode .project-detail-sheet-modern .sheet-info-row.po-row span,
    html.dark-mode .project-detail-sheet-modern .sheet-info-row.po-row strong{
        background:#38483e!important;
        color:#d9ffe9!important;
    }
    html.dark-mode .project-detail-sheet-modern .worksheet-meta-table tr.danger td,
    html.dark-mode .project-detail-sheet-modern .sheet-info-row.danger strong{
        color:#ffb7b7!important;
    }
    html.dark-mode .project-detail-sheet-modern .worksheet-bond-table .bond-side-cell,
    html.dark-mode .project-detail-sheet-modern .sheet-bond-table-card .bond-provider,
    html.dark-mode .project-detail-sheet-modern .sheet-bond-table-card .bond-name,
    html.dark-mode .project-detail-sheet-modern .sheet-bond-table-card .bond-detail,
    html.dark-mode .project-detail-sheet-modern .sheet-bond-table-card .bond-amount{
        background:#30343b!important;
        color:#e8edf4!important;
        border-color:#4b515b!important;
    }
    html.dark-mode .project-detail-sheet-modern .sheet-bond-table-card .bond-row.complete .bond-name,
    html.dark-mode .project-detail-sheet-modern .worksheet-bond-table .bond-ready{
        background:#34483c!important;
        color:#d7ffe7!important;
    }

    /* Keep status pills readable, but not neon. */
    html.dark-mode .pill.green,
    html.dark-mode .data-table .btn.small.green{
        background:#254238!important;
        color:#b9f3d2!important;
        border-color:#3f6b57!important;
    }
    html.dark-mode .pill.blue{
        background:#2a3e56!important;
        color:#c2dcff!important;
        border-color:#48627f!important;
    }
    html.dark-mode .pill.red{
        background:#4a2d31!important;
        color:#ffd2d2!important;
        border-color:#744149!important;
    }
    html.dark-mode .pill.gray,
    html.dark-mode .pill.amber,
    html.dark-mode .pill{
        background:#3c424b!important;
        color:#e3e8ef!important;
        border-color:#5a626e!important;
    }

    html.dark-mode .owner-card:after,
    html.dark-mode .stat-card:after{
        background:rgba(255,255,255,.055)!important;
    }
}


/* Update v20: final dark-mode polish for Project Detail, New Project form, printable reports, and account cards. */
@media screen{
    /* Project Detail uses its own page-level CSS, so these selectors are intentionally specific. */
    html.dark-mode .project-excel-shell,
    html.dark-mode .project-excel-shell *{
        color-scheme:dark;
    }
    html.dark-mode .project-excel-sheet,
    html.dark-mode .project-excel-sheet.print-area,
    html.dark-mode .project-excel-shell .detail-report-header,
    html.dark-mode .project-excel-shell .detail-report-date,
    html.dark-mode .project-excel-shell .excel-box,
    html.dark-mode .project-excel-shell .ledger-sheet,
    html.dark-mode .project-excel-shell .ledger-wrap,
    html.dark-mode .project-excel-shell .note-card,
    html.dark-mode .project-excel-shell .contact-card{
        background:#30343a!important;
        border-color:#535963!important;
        color:#eef2f6!important;
        box-shadow:none!important;
    }
    html.dark-mode .project-excel-shell .detail-report-header,
    html.dark-mode .project-excel-shell .excel-box-head,
    html.dark-mode .project-excel-shell .ledger-sheet-head{
        background:#373b43!important;
        border-color:#565d68!important;
    }
    html.dark-mode .project-excel-shell .detail-report-copy span,
    html.dark-mode .project-excel-shell .detail-report-date span,
    html.dark-mode .project-excel-shell .detail-report-copy p,
    html.dark-mode .project-excel-shell .ledger-sheet-head p,
    html.dark-mode .project-excel-shell .note-card span,
    html.dark-mode .project-excel-shell .contact-card span{
        color:#c5ccd6!important;
    }
    html.dark-mode .project-excel-shell .detail-report-copy h1,
    html.dark-mode .project-excel-shell .detail-report-date strong,
    html.dark-mode .project-excel-shell .excel-box-head h3,
    html.dark-mode .project-excel-shell .ledger-sheet-head h3,
    html.dark-mode .project-excel-shell .note-card strong,
    html.dark-mode .project-excel-shell .contact-card strong{
        color:#f7f9fc!important;
    }
    html.dark-mode .project-excel-shell .project-master-table,
    html.dark-mode .project-excel-shell .bond-monitor-table,
    html.dark-mode .project-excel-shell .ledger-monitor-table{
        background:#2b2f36!important;
        border-color:#5a606b!important;
        color:#edf1f5!important;
    }
    html.dark-mode .project-excel-shell .project-master-table th,
    html.dark-mode .project-excel-shell .bond-monitor-table th,
    html.dark-mode .project-excel-shell .ledger-monitor-table th{
        background:#3d424b!important;
        color:#f3f6fa!important;
        border-color:#646b76!important;
    }
    html.dark-mode .project-excel-shell .project-master-table td,
    html.dark-mode .project-excel-shell .bond-monitor-table td,
    html.dark-mode .project-excel-shell .ledger-monitor-table td{
        background:#30343a!important;
        color:#edf1f5!important;
        border-color:#565d68!important;
    }
    html.dark-mode .project-excel-shell .project-master-table tbody tr:nth-child(even) td,
    html.dark-mode .project-excel-shell .bond-monitor-table tbody tr:nth-child(even) td,
    html.dark-mode .project-excel-shell .ledger-monitor-table tbody tr:nth-child(even):not(.sheet-ledger-total) td{
        background:#2c3037!important;
    }
    html.dark-mode .project-excel-shell .project-master-table tr.po-row th,
    html.dark-mode .project-excel-shell .project-master-table tr.po-row td,
    html.dark-mode .project-excel-shell .bond-monitor-table tr.complete .status-cell,
    html.dark-mode .project-excel-shell .bond-monitor-table tr.complete .bond-name-cell{
        background:#33443b!important;
        color:#dff8ea!important;
        border-color:#506356!important;
    }
    html.dark-mode .project-excel-shell .project-master-table td strong,
    html.dark-mode .project-excel-shell .project-master-table td,
    html.dark-mode .project-excel-shell .bond-monitor-table .bond-name-cell strong,
    html.dark-mode .project-excel-shell .bond-monitor-table .bond-detail-cell,
    html.dark-mode .project-excel-shell .bond-monitor-table .bond-amount-cell,
    html.dark-mode .project-excel-shell .ledger-monitor-table td strong,
    html.dark-mode .project-excel-shell .ledger-monitor-table .num,
    html.dark-mode .project-excel-shell .ledger-status-pill{
        color:#f2f5f8!important;
    }
    html.dark-mode .project-excel-shell .bond-monitor-table .bond-name-cell small,
    html.dark-mode .project-excel-shell .ledger-monitor-table td small,
    html.dark-mode .project-excel-shell .ledger-status-note{
        color:#c1c9d3!important;
        background:transparent!important;
    }
    html.dark-mode .project-excel-shell .ledger-monitor-table .ref-cell,
    html.dark-mode .project-excel-shell .ledger-monitor-table .actual-cell{
        background:#353a42!important;
        color:#dcecff!important;
    }
    html.dark-mode .project-excel-shell .ledger-monitor-table tr.ledger-highlight td,
    html.dark-mode .project-excel-shell .ledger-monitor-table tr.ledger-highlight td:first-child,
    html.dark-mode .project-excel-shell .ledger-monitor-table tr.ledger-highlight .ref-cell{
        background:#4a412c!important;
        color:#fff2c7!important;
    }
    html.dark-mode .project-excel-shell .ledger-monitor-table tr.sheet-ledger-total td,
    html.dark-mode .project-excel-shell .bond-monitor-table tfoot th,
    html.dark-mode .project-excel-shell .bond-monitor-table tfoot td{
        background:#414852!important;
        color:#f8fafc!important;
        border-color:#737b87!important;
    }
    html.dark-mode .project-excel-shell .ledger-monitor-table tr.sheet-ledger-total td *,
    html.dark-mode .project-excel-shell .bond-monitor-table tfoot th *,
    html.dark-mode .project-excel-shell .bond-monitor-table tfoot td *{
        color:#f8fafc!important;
    }

    /* Project/New Project form white paddings and on-file blocks. */
    html.dark-mode .project-form-card,
    html.dark-mode .project-form-section,
    html.dark-mode .owner-project-section,
    html.dark-mode .po-section,
    html.dark-mode .financial-section,
    html.dark-mode .remarks-section,
    html.dark-mode .onfile-section-final,
    html.dark-mode .on-file-panel,
    html.dark-mode .onfile-clean-section,
    html.dark-mode .onfile-subsection,
    html.dark-mode .onfile-documents-block,
    html.dark-mode .onfile-bond-block,
    html.dark-mode .onfile-legacy-block,
    html.dark-mode .onfile-bond-card-clean,
    html.dark-mode .onfile-bond-card-head,
    html.dark-mode .onfile-bond-group,
    html.dark-mode .onfile-bond-row,
    html.dark-mode .onfile-po-line,
    html.dark-mode .onfile-check-box,
    html.dark-mode .check-field,
    html.dark-mode .mini-check,
    html.dark-mode .onfile-check-item,
    html.dark-mode .onfile-inline-check,
    html.dark-mode .onfile-legacy-final{
        background:#30343a!important;
        border-color:#535963!important;
        color:#eef2f6!important;
        box-shadow:none!important;
    }
    html.dark-mode .financial-section .field-note,
    html.dark-mode .onfile-subtitle,
    html.dark-mode .onfile-subsection-head p{
        color:#c5ccd6!important;
    }
    html.dark-mode .project-form-section label,
    html.dark-mode .on-file-panel label,
    html.dark-mode .onfile-doc-grid-clean label,
    html.dark-mode .onfile-bond-fields label,
    html.dark-mode .onfile-legacy-block label,
    html.dark-mode .onfile-check-label,
    html.dark-mode .onfile-bond-title,
    html.dark-mode .onfile-bond-group h3,
    html.dark-mode .onfile-subsection-head h3,
    html.dark-mode .onfile-bond-card-head h4{
        color:#f2f5f8!important;
    }

    /* Account details, printable report totals, modal details, and compact detail cards. */
    html.dark-mode .project-detail-item,
    html.dark-mode .project-detail-columns section,
    html.dark-mode .project-summary-main,
    html.dark-mode .project-summary-side,
    html.dark-mode .grand-total-wrap,
    html.dark-mode .grand-total-table,
    html.dark-mode .report-grand-total,
    html.dark-mode .owner-view-grand-total{
        background:#30343a!important;
        border-color:#535963!important;
        color:#eef2f6!important;
    }
    html.dark-mode .grand-total-table td,
    html.dark-mode .grand-total-table th,
    html.dark-mode .grand-total-row td,
    html.dark-mode .grand-total-labels td{
        background:#414852!important;
        color:#f8fafc!important;
        border-color:#737b87!important;
    }
    html.dark-mode .project-detail-item span,
    html.dark-mode .project-summary-main span,
    html.dark-mode .project-summary-side span{
        color:#c5ccd6!important;
    }
    html.dark-mode .project-detail-item strong,
    html.dark-mode .project-summary-main strong,
    html.dark-mode .project-summary-side strong{
        color:#f8fafc!important;
    }
    html.dark-mode .project-detail-columns pre{
        color:#e7edf4!important;
    }
}

/* Update v21: final dark-mode readability for Owner View grand total labels and white label rows. */
@media screen{
    html.dark-mode .owner-view-grand-total .grand-total-labels td,
    html.dark-mode .grand-total-wrap.owner-view-grand-total .grand-total-labels td{
        background:#f8fafc!important;
        color:#111827!important;
        border-color:#cbd5e1!important;
        font-weight:900!important;
    }
    html.dark-mode .owner-view-grand-total .grand-total-labels td *,
    html.dark-mode .grand-total-wrap.owner-view-grand-total .grand-total-labels td *{
        color:#111827!important;
    }
    html.dark-mode .owner-view-grand-total .grand-total-row td{
        background:#414852!important;
        color:#f8fafc!important;
        border-color:#737b87!important;
    }
    html.dark-mode .owner-view-grand-total .grand-total-row td *{
        color:#f8fafc!important;
    }
    /* Any light/white summary label strip used inside dark mode should keep readable dark text. */
    html.dark-mode .grand-total-labels td[style*="background:#fff"],
    html.dark-mode .grand-total-labels td[style*="background: #fff"],
    html.dark-mode .grand-total-labels td[style*="background:white"],
    html.dark-mode .grand-total-labels td[style*="background: white"]{
        color:#111827!important;
    }
}

/* Update v22: dark-mode pastel action buttons and softer painted cards. Light mode and print are unchanged. */
@media screen{
    /* Keep action/table buttons visually colored in dark mode instead of plain gray. */
    html.dark-mode .actions .btn,
    html.dark-mode td .btn.small,
    html.dark-mode .data-table .btn.small,
    html.dark-mode .record-info-button{
        background:linear-gradient(135deg,#536c96,#425a7f)!important;
        color:#f8fbff!important;
        border-color:#7890b6!important;
        box-shadow:0 8px 18px rgba(0,0,0,.22)!important;
    }
    html.dark-mode .actions .btn:hover,
    html.dark-mode td .btn.small:hover,
    html.dark-mode .data-table .btn.small:hover,
    html.dark-mode .record-info-button:hover{
        background:linear-gradient(135deg,#6683b4,#4f6e9b)!important;
        color:#ffffff!important;
        transform:translateY(-1px);
    }
    html.dark-mode .actions .btn:nth-child(2n):not(.danger):not(.green):not(.primary),
    html.dark-mode td .btn.small:nth-child(2n):not(.danger):not(.green):not(.primary){
        background:linear-gradient(135deg,#70619a,#5d527f)!important;
        border-color:#9183bb!important;
        color:#fffaff!important;
    }
    html.dark-mode .actions .btn:nth-child(3n):not(.danger):not(.green):not(.primary),
    html.dark-mode td .btn.small:nth-child(3n):not(.danger):not(.green):not(.primary){
        background:linear-gradient(135deg,#4f7b78,#3e6663)!important;
        border-color:#72a19e!important;
        color:#f1fffd!important;
    }
    html.dark-mode .btn.primary,
    html.dark-mode .actions .btn.primary,
    html.dark-mode td .btn.small.primary,
    html.dark-mode .data-table .btn.small.primary{
        background:linear-gradient(135deg,#6384c2,#4369a8)!important;
        color:#ffffff!important;
        border-color:#85a3d6!important;
    }
    html.dark-mode .btn.green,
    html.dark-mode .actions .btn.green,
    html.dark-mode td .btn.small.green,
    html.dark-mode .data-table .btn.small.green{
        background:linear-gradient(135deg,#4f9b77,#3a7c61)!important;
        color:#f4fff9!important;
        border-color:#7ab996!important;
    }
    html.dark-mode .btn.danger,
    html.dark-mode .actions .btn.danger,
    html.dark-mode td .btn.small.danger,
    html.dark-mode .data-table .btn.small.danger{
        background:linear-gradient(135deg,#9c5b64,#7d414d)!important;
        color:#fff4f5!important;
        border-color:#bd7c86!important;
    }
    html.dark-mode .toolbar .btn:not(.primary):not(.green):not(.danger),
    html.dark-mode .form-actions .btn:not(.primary):not(.green):not(.danger),
    html.dark-mode .top-actions .btn:not(.primary):not(.green):not(.danger){
        background:linear-gradient(135deg,#4b5563,#3f4752)!important;
        color:#f3f6fa!important;
        border-color:#707985!important;
    }

    /* Softer painted dark cards. */
    html.dark-mode .stat-card,
    html.dark-mode .owner-card,
    html.dark-mode .recent-card,
    html.dark-mode .list-focus-card,
    html.dark-mode .project-detail-section,
    html.dark-mode .project-summary-main,
    html.dark-mode .project-summary-side,
    html.dark-mode .project-detail-groups section,
    html.dark-mode .project-sheet-card,
    html.dark-mode .project-ledger-card,
    html.dark-mode .si-ledger-card,
    html.dark-mode .cr-ledger-block,
    html.dark-mode .cr-ledger-item,
    html.dark-mode .search-result-item,
    html.dark-mode .app-modal-panel{
        background:
            radial-gradient(circle at 12% 0%,rgba(143,166,213,.18),transparent 30%),
            linear-gradient(145deg,#34383f,#2f333a 58%,#303642)!important;
        border-color:#596170!important;
        color:#eef3f8!important;
    }
    html.dark-mode .stat-card:nth-child(4n+1),
    html.dark-mode .owner-card:nth-child(4n+1){
        background:linear-gradient(145deg,#364153,#30343b 70%)!important;
        border-color:#687894!important;
    }
    html.dark-mode .stat-card:nth-child(4n+2),
    html.dark-mode .owner-card:nth-child(4n+2){
        background:linear-gradient(145deg,#33463d,#30363a 72%)!important;
        border-color:#607c6d!important;
    }
    html.dark-mode .stat-card:nth-child(4n+3),
    html.dark-mode .owner-card:nth-child(4n+3){
        background:linear-gradient(145deg,#4a4233,#34383f 72%)!important;
        border-color:#81745d!important;
    }
    html.dark-mode .stat-card:nth-child(4n+4),
    html.dark-mode .owner-card:nth-child(4n+4){
        background:linear-gradient(145deg,#42394d,#343840 72%)!important;
        border-color:#756686!important;
    }
    html.dark-mode .stat-icon{
        background:linear-gradient(135deg,#8aa9e8,#74c7c0)!important;
        color:#101827!important;
        box-shadow:0 8px 18px rgba(0,0,0,.22)!important;
    }
    html.dark-mode .dashboard-hero,
    html.dark-mode .hero-note{
        border:1px solid rgba(203,213,225,.20)!important;
    }
    html.dark-mode .dashboard-hero{
        background:
            radial-gradient(circle at 12% 20%,rgba(103,126,197,.38),transparent 35%),
            radial-gradient(circle at 84% 74%,rgba(111,184,166,.24),transparent 38%),
            linear-gradient(145deg,#222b38 8%,#2f3849 64%,#315462 125%)!important;
    }
}

/* Update v23: final dark-mode fixes for Billing Ledger status badges and light grand-total label rows. Light mode and print are unchanged. */
@media screen{
    /* Project Detail > Billing Ledger status badges should keep their readable pastel colors in dark mode. */
    html.dark-mode .project-excel-shell .ledger-monitor-table .ledger-status-pill,
    html.dark-mode .project-excel-shell .ledger-status-pill{
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        gap:6px!important;
        min-width:82px!important;
        padding:5px 9px!important;
        border-radius:999px!important;
        font-weight:950!important;
        font-size:10.5px!important;
        line-height:1!important;
        text-shadow:none!important;
        box-shadow:none!important;
        white-space:nowrap!important;
    }
    html.dark-mode .project-excel-shell .ledger-status-pill.collected{
        background:#d9fbe5!important;
        color:#14532d!important;
        border:1px solid #86efac!important;
    }
    html.dark-mode .project-excel-shell .ledger-status-pill.partial{
        background:#ffedd5!important;
        color:#9a3412!important;
        border:1px solid #fdba74!important;
    }
    html.dark-mode .project-excel-shell .ledger-status-pill.billed{
        background:#dbeafe!important;
        color:#1e3a8a!important;
        border:1px solid #93c5fd!important;
    }
    html.dark-mode .project-excel-shell .ledger-status-pill.cancelled{
        background:#fee2e2!important;
        color:#991b1b!important;
        border:1px solid #fca5a5!important;
    }
    html.dark-mode .project-excel-shell .ledger-status-pill .status-dot{
        display:inline-block!important;
        width:8px!important;
        height:8px!important;
        border-radius:999px!important;
        background:currentColor!important;
        box-shadow:0 0 0 3px rgba(255,255,255,.65)!important;
        flex:0 0 auto!important;
    }
    html.dark-mode .project-excel-shell .ledger-status-note{
        display:block!important;
        width:max-content!important;
        max-width:120px!important;
        margin:6px auto 0!important;
        padding:5px 7px!important;
        border-radius:6px!important;
        background:#222832!important;
        color:#f4f7fb!important;
        border:1px solid #7b8491!important;
        font-size:9.7px!important;
        line-height:1.15!important;
        text-align:left!important;
    }

    /* Any light/white grand-total label strip in dark mode must show dark text. */
    html.dark-mode .grand-total-labels td,
    html.dark-mode .grand-total-labels th,
    html.dark-mode .project-grand-total-wrap .grand-total-labels td,
    html.dark-mode .owner-view-grand-total .grand-total-labels td,
    html.dark-mode .report-grand-total .grand-total-labels td,
    html.dark-mode .grand-total-wrap .grand-total-labels td,
    html.dark-mode .data-table .grand-total-labels td{
        background:#f8fafc!important;
        color:#111827!important;
        border-color:#cbd5e1!important;
        font-weight:900!important;
        text-shadow:none!important;
    }
    html.dark-mode .grand-total-labels td *,
    html.dark-mode .grand-total-labels th *,
    html.dark-mode .project-grand-total-wrap .grand-total-labels td *,
    html.dark-mode .owner-view-grand-total .grand-total-labels td *,
    html.dark-mode .report-grand-total .grand-total-labels td *,
    html.dark-mode .grand-total-wrap .grand-total-labels td *,
    html.dark-mode .data-table .grand-total-labels td *{
        color:#111827!important;
        text-shadow:none!important;
    }
}

/* Update v28: Owner View direct print/export buttons. */
@media print{
    .owner-view-print-area{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;background:#fff!important;color:#0f172a!important;box-shadow:none!important;border:0!important;overflow:visible!important}
    .owner-view-print-area .section-title:first-child{display:none!important}
    .owner-view-print-area .owner-view-stats{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:4px!important;margin:0 0 6px!important}
    .owner-view-print-area .stat-card{border:1px solid #0f172a!important;border-radius:0!important;padding:4px!important;background:#fff!important;box-shadow:none!important;min-height:0!important}
    .owner-view-print-area .stat-card span{font-size:6.1px!important;color:#0f172a!important;letter-spacing:0!important;text-transform:none!important}
    .owner-view-print-area .stat-card strong{font-size:8.5px!important;color:#0f172a!important;line-height:1.05!important}
    .owner-view-print-area .stat-card small{font-size:5.7px!important;color:#334155!important}
    .owner-view-main-grid{display:block!important;width:100%!important;max-width:100%!important;overflow:visible!important}
    .owner-view-left,.owner-view-right{display:block!important;width:100%!important;max-width:100%!important;position:static!important;top:auto!important;overflow:visible!important}
    .owner-view-left{margin:0 0 5px!important}
    .owner-view-left .project-detail-section{padding:0!important;border:0!important;background:#fff!important}
    .owner-view-left .section-title{display:none!important}
    .owner-detail-list{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:2px!important;margin:0 0 5px!important}
    .owner-detail-list div{border:1px solid #0f172a!important;border-radius:0!important;background:#fff!important;padding:2px 3px!important;min-height:0!important}
    .owner-detail-list span{display:block!important;color:#334155!important;font-size:5.7px!important;text-transform:none!important;letter-spacing:0!important}
    .owner-detail-list strong,.owner-detail-list div:first-child strong{display:block!important;color:#0f172a!important;font-size:6.4px!important;line-height:1.08!important;overflow-wrap:anywhere!important}
    .owner-view-project-wrap .data-table{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important}
    .owner-view-project-wrap .data-table th,.owner-view-project-wrap .data-table td{font-size:5.55px!important;padding:1.1px 1.25px!important;line-height:1.02!important;color:#0f172a!important;vertical-align:top!important;overflow:visible!important;text-overflow:clip!important;white-space:normal!important;overflow-wrap:anywhere!important}
    .owner-view-project-wrap .data-table th:nth-child(1),.owner-view-project-wrap .data-table td:nth-child(1){width:20%!important}
    .owner-view-project-wrap .data-table th:nth-child(2),.owner-view-project-wrap .data-table td:nth-child(2){width:5.5%!important}
    .owner-view-project-wrap .data-table th:nth-child(3),.owner-view-project-wrap .data-table td:nth-child(3){width:6%!important}
    .owner-view-project-wrap .data-table th:nth-child(4),.owner-view-project-wrap .data-table td:nth-child(4){width:9%!important}
    .owner-view-project-wrap .data-table th:nth-child(5),.owner-view-project-wrap .data-table td:nth-child(5){width:8%!important}
    .owner-view-project-wrap .data-table th:nth-child(6),.owner-view-project-wrap .data-table td:nth-child(6){width:6%!important}
    .owner-view-project-wrap .data-table th:nth-child(7),.owner-view-project-wrap .data-table td:nth-child(7){width:10%!important}
    .owner-view-project-wrap .data-table th:nth-child(8),.owner-view-project-wrap .data-table td:nth-child(8){width:8%!important}
    .owner-view-project-wrap .data-table th:nth-child(9),.owner-view-project-wrap .data-table td:nth-child(9){width:9%!important}
    .owner-view-project-wrap .data-table th:nth-child(10),.owner-view-project-wrap .data-table td:nth-child(10){width:10%!important}
    .owner-view-project-wrap .data-table th:nth-child(11),.owner-view-project-wrap .data-table td:nth-child(11){width:8.5%!important}
    .owner-view-grand-total{width:100%!important;margin-top:4px!important;break-inside:avoid!important;page-break-inside:avoid!important}
    .owner-view-grand-total .data-table td{font-size:6.3px!important;padding:1.5px 2px!important;color:#0f172a!important}
}

/* Collection Receipt itemized deductions */
.cr-deductions-panel{border:1px solid #dbe5f2;border-radius:16px;background:#f8fbff;padding:15px;display:grid;gap:13px}
.cr-deductions-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap}
.cr-deductions-head h3{margin:0 0 4px;color:var(--navy);font-size:16px}
.cr-deductions-head p{margin:0;font-size:12px}
.cr-deductions-list{display:grid;gap:10px}
.cr-deduction-row{display:grid;grid-template-columns:minmax(240px,1fr) minmax(150px,220px) auto;gap:10px;align-items:end;padding:11px;border:1px solid #e1e8f2;border-radius:13px;background:#fff}
.cr-deduction-row label{margin:0}
.cr-deduction-row input{margin-top:6px}
.cr-deduction-remove{margin-bottom:1px}
.cr-credit-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.cr-credit-preview span{display:flex;justify-content:space-between;gap:10px;padding:10px 11px;border-radius:11px;background:#fff;border:1px solid #dfe7f1;color:#344054;font-size:12px;font-weight:750}
.cr-credit-preview strong{color:var(--navy);font-variant-numeric:tabular-nums}
.deduction-summary{min-width:220px;max-width:360px;white-space:normal;overflow-wrap:anywhere}
.cr-table{min-width:1500px}

html.dark-mode .cr-deductions-panel{background:#171c27;border-color:#394150}
html.dark-mode .cr-deductions-head h3{color:#f4f7fb}
html.dark-mode .cr-deduction-row{background:#202631;border-color:#444d5c}
html.dark-mode .cr-credit-preview span{background:#202631;border-color:#444d5c;color:#d7dde8}
html.dark-mode .cr-credit-preview strong{color:#a9bfff}

@media(max-width:760px){
    .cr-deduction-row{grid-template-columns:1fr}
    .cr-deduction-remove{justify-self:start}
    .cr-credit-preview{grid-template-columns:1fr}
}

@media print{
    .cr-table{min-width:0!important}
    .deduction-summary{min-width:0!important;max-width:none!important}
}

/* Printable Reports: project names link directly to Project Details. */
.report-project-link{color:#17235c;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;text-decoration-color:#8b99c8;transition:color .15s ease,text-decoration-color .15s ease}
.report-project-link:hover{color:#1d4ed8;text-decoration-color:currentColor}
html.dark-mode .report-project-link{color:#c7d2fe;text-decoration-color:#6474b8}
html.dark-mode .report-project-link:hover{color:#93c5fd}
@media print{
    .report-project-link{color:#000!important;text-decoration:none!important}
    .report-project-link[href]:after{content:""!important}
}



/* Update v14: synchronized upper and lower scrollbars for every system table */
.table-scroll-host,
.universal-table-wrap{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:visible;
    -ms-overflow-style:none;
    scrollbar-width:none;
}
.table-scroll-host::-webkit-scrollbar,
.universal-table-wrap::-webkit-scrollbar{
    width:0;
    height:0;
    display:none;
}
.universal-table-wrap{
    border:1px solid var(--clean-table-border, var(--line));
    background:#fff;
}
.table-scroll-edge{
    width:100%;
    max-width:100%;
    height:18px;
    overflow-x:scroll;
    overflow-y:hidden;
    background:#f7f9fc;
    border:1px solid var(--clean-table-border, var(--line));
    scrollbar-color:#9fb0c7 #eef2f7;
    scrollbar-width:auto;
}
.table-scroll-edge[hidden]{display:none!important}
.table-scroll-top{
    margin:0;
    border-bottom:0;
}
.table-scroll-bottom{
    margin:0 0 6px;
    border-top:0;
}
.table-scroll-edge-inner{
    height:1px;
    min-width:100%;
}
.table-scroll-edge::-webkit-scrollbar{height:14px}
.table-scroll-edge::-webkit-scrollbar-track{background:#eef2f7}
.table-scroll-edge::-webkit-scrollbar-thumb{
    background:#9fb0c7;
    border:3px solid #eef2f7;
    border-radius:999px;
}
.table-scroll-edge::-webkit-scrollbar-thumb:hover{background:#70849e}
.table-scroll-top + .table-scroll-host,
.table-scroll-top + .universal-table-wrap{
    border-top-left-radius:0!important;
    border-top-right-radius:0!important;
}
.table-scroll-host + .table-scroll-bottom,
.universal-table-wrap + .table-scroll-bottom{
    border-bottom-left-radius:0!important;
    border-bottom-right-radius:0!important;
}
html.dark-mode .table-scroll-edge{
    background:#142238;
    border-color:#33455e;
    scrollbar-color:#71829a #1d2d43;
}
html.dark-mode .table-scroll-edge::-webkit-scrollbar-track{background:#1d2d43}
html.dark-mode .table-scroll-edge::-webkit-scrollbar-thumb{
    background:#71829a;
    border-color:#1d2d43;
}
html.dark-mode .universal-table-wrap{
    background:#111c2e;
    border-color:#33455e;
}
@media print{
    .table-scroll-edge{display:none!important}
    .table-scroll-host,
    .universal-table-wrap{
        overflow:visible!important;
        width:100%!important;
        max-width:100%!important;
        border:0!important;
    }
}

/* Date-range filtering and unified filter layout */
.filters-panel{
    width:100%;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto;
    gap:14px 16px;
    align-items:start;
    padding:18px;
    margin-bottom:14px;
    border:1px solid #d7e1ee;
    border-radius:22px;
    background:linear-gradient(180deg,#fcfdff 0%,#f4f7fc 100%);
    box-shadow:0 14px 34px rgba(15,35,65,.08);
}
.filter-section{
    min-width:0;
    border:1px solid #e1e8f3;
    border-radius:18px;
    background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(247,250,255,.94));
    padding:14px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.filter-main-section{grid-column:1 / -1}
.filter-section-title{
    display:flex;
    align-items:center;
    gap:9px;
    margin:0 0 12px;
    color:#172554;
    font-size:12px;
    font-weight:950;
    letter-spacing:.55px;
    text-transform:uppercase;
}
.filter-section-title:before{
    content:"";
    width:9px;
    height:9px;
    border-radius:999px;
    background:linear-gradient(180deg,#4f67b7,#223b8e);
    box-shadow:0 0 0 5px rgba(35,59,143,.10);
}
.filter-main-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
    gap:12px;
    align-items:end;
    min-width:0;
}
.filter-field{
    display:flex;
    flex-direction:column;
    gap:7px;
    min-width:0;
    color:#334155;
    font-size:12px;
    font-weight:800;
}
.filter-field > span{
    padding-left:2px;
    color:#5c6880;
    font-size:11px;
    font-weight:900;
    letter-spacing:.42px;
    text-transform:uppercase;
}
.filters-panel .filter-field select,
.filters-panel .filter-field input,
.filters-panel .searchbox{
    width:100%;
    min-width:0;
    height:46px;
    margin:0;
    border:1px solid #d7dfeb;
    border-radius:13px;
    padding:0 14px;
    background:#fff;
    color:var(--ink);
    font-size:13px;
    outline:none;
    box-shadow:0 1px 0 rgba(255,255,255,.85), inset 0 1px 2px rgba(15,23,42,.03);
    transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background .16s ease;
}
.filters-panel .filter-field select:hover,
.filters-panel .filter-field input:hover,
.filters-panel .searchbox:hover{
    border-color:#bdc9db;
}
.filters-panel .filter-field select:focus,
.filters-panel .filter-field input:focus,
.filters-panel .searchbox:focus{
    border-color:#6f86cd;
    box-shadow:0 0 0 4px rgba(35,59,143,.12);
}
.filter-search-field{grid-column:1 / -1}
.date-range-filter{
    grid-column:1;
    display:grid;
    grid-template-columns:repeat(2,minmax(180px,1fr));
    gap:12px;
    width:min(100%,560px);
    align-self:start;
    border-color:#cfdbf4;
    background:linear-gradient(180deg,#f1f5ff 0%,#ecf3ff 100%);
}
.date-range-title{
    grid-column:1 / -1;
    display:flex;
    align-items:center;
    gap:8px;
    margin:0;
    color:#17235c;
    font-size:12px;
    font-weight:950;
    letter-spacing:.55px;
    text-transform:uppercase;
}
.date-range-title:before{
    content:"";
    width:8px;
    height:8px;
    border-radius:999px;
    background:#233b8f;
    box-shadow:0 0 0 4px rgba(35,59,143,.12);
}
.date-range-help{
    grid-column:1 / -1;
    margin-top:-2px;
    color:#667085;
    font-size:11px;
    font-weight:700;
    line-height:1.4;
}
.filter-actions{
    grid-column:2;
    display:flex;
    align-items:flex-end;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
    align-self:stretch;
}
.filters-panel .filter-actions .btn{
    height:46px;
    min-width:118px;
    border-radius:13px;
    padding:0 18px;
    font-weight:850;
}
.filters-panel .filter-actions .btn:not(.primary):not(.green){
    background:#eef2f8;
    color:#334155;
    border-color:#d6deea;
}
.toolbar > .report-filters{flex:1 1 100%}

html.dark-mode .filters-panel{
    border-color:#354055;
    background:linear-gradient(180deg,#1d2532,#151b25);
    box-shadow:0 18px 40px rgba(0,0,0,.24);
}
html.dark-mode .filter-section{
    border-color:#314158;
    background:linear-gradient(180deg,rgba(24,32,46,.98),rgba(18,25,37,.96));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
html.dark-mode .filter-section-title{color:#dce6fb}
html.dark-mode .filter-section-title:before{background:linear-gradient(180deg,#8da6f3,#5372d5);box-shadow:0 0 0 5px rgba(141,166,243,.12)}
html.dark-mode .filter-field{color:#d7dde8}
html.dark-mode .filter-field > span{color:#aeb8c8}
html.dark-mode .filters-panel .filter-field select,
html.dark-mode .filters-panel .filter-field input,
html.dark-mode .filters-panel .searchbox{
    border-color:#455269;
    background:#0f1622;
    color:#f4f7fb;
    box-shadow:inset 0 1px 2px rgba(0,0,0,.18);
}
html.dark-mode .filters-panel .filter-field select:hover,
html.dark-mode .filters-panel .filter-field input:hover,
html.dark-mode .filters-panel .searchbox:hover{
    border-color:#5f718f;
}
html.dark-mode .filters-panel .filter-field select:focus,
html.dark-mode .filters-panel .filter-field input:focus,
html.dark-mode .filters-panel .searchbox:focus{
    border-color:#8399d7;
    box-shadow:0 0 0 4px rgba(131,153,215,.16);
}
html.dark-mode .date-range-filter{border-color:#46577b;background:linear-gradient(180deg,#1e2940,#182235)}
html.dark-mode .date-range-title{color:#dbe4ff}
html.dark-mode .date-range-title:before{background:#8da6f3;box-shadow:0 0 0 4px rgba(141,166,243,.16)}
html.dark-mode .date-range-help{color:#b9c3d3}
html.dark-mode .filters-panel .filter-actions .btn:not(.primary):not(.green){
    background:#202a3a;
    color:#d8e1ef;
    border-color:#3a4860;
}

@media(max-width:980px){
    .filters-panel{grid-template-columns:1fr}
    .date-range-filter{grid-column:1;width:100%;max-width:none}
    .filter-actions{grid-column:1;justify-content:flex-start}
}

@media(max-width:760px){
    .filters-panel{padding:14px;border-radius:18px}
    .filter-main-grid{grid-template-columns:1fr}
    .date-range-filter{grid-template-columns:1fr}
    .filter-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
    .filters-panel .filter-actions .btn{width:100%;min-width:0}
}

@media print{
    .filters-panel{display:none!important}
}

/* ========================================================================== 
   RECORD FILTER INTERFACE — PROJECTS / SERVICE INVOICES / COLLECTION RECEIPTS
   Dedicated selectors prevent older generic .filters rules from affecting it.
   ========================================================================== */
.records-filter-panel{
    display:block!important;
    width:100%!important;
    margin:16px 0 18px!important;
    padding:0!important;
    overflow:hidden;
    border:1px solid #d8e2f0!important;
    border-radius:20px!important;
    background:#f7f9fd!important;
    box-shadow:0 12px 32px rgba(15,35,65,.08)!important;
}
.records-filter-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:15px 18px;
    border-bottom:1px solid #e2e8f2;
    background:linear-gradient(135deg,#ffffff 0%,#f2f6ff 100%);
}
.records-filter-heading{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}
.records-filter-head-icon{
    width:38px;
    height:38px;
    flex:0 0 38px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:linear-gradient(145deg,#233b8f,#4d69bf);
    color:#fff;
    box-shadow:0 8px 18px rgba(35,59,143,.22);
}
.records-filter-head-icon svg{width:20px;height:20px}
.records-filter-heading strong{
    display:block;
    color:#172554;
    font-size:14px;
    line-height:1.25;
    font-weight:900;
}
.records-filter-heading small{
    display:block;
    margin-top:3px;
    color:#64748b;
    font-size:11px;
    line-height:1.35;
    font-weight:700;
}
.records-filter-badge{
    flex:0 0 auto;
    padding:6px 10px;
    border:1px solid #d4def2;
    border-radius:999px;
    background:#edf3ff;
    color:#36519e;
    font-size:10px;
    font-weight:900;
    letter-spacing:.55px;
    text-transform:uppercase;
}
.records-filter-body{
    display:grid;
    grid-template-columns:minmax(0,1.65fr) minmax(340px,.75fr);
    gap:14px;
    padding:16px 18px;
}
.records-filter-section{
    min-width:0;
    padding:14px;
    border:1px solid #e0e7f1;
    border-radius:16px;
    background:#fff;
    box-shadow:0 2px 8px rgba(15,35,65,.035);
}
.records-filter-section-head{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:12px;
}
.records-filter-section-head strong{
    display:block;
    color:#253858;
    font-size:12px;
    line-height:1.25;
    font-weight:900;
}
.records-filter-section-head small{
    display:block;
    margin-top:2px;
    color:#8490a3;
    font-size:10px;
    line-height:1.3;
    font-weight:700;
}
.records-filter-grid{
    display:grid!important;
    gap:11px!important;
    min-width:0;
}
.records-filter-grid-projects{
    grid-template-columns:repeat(12,minmax(0,1fr));
}
.records-filter-grid-projects .records-field-owner{grid-column:span 4}
.records-filter-grid-projects .records-field-project{grid-column:span 8}
.records-filter-grid-projects .records-field-year{grid-column:span 3}
.records-filter-grid-projects .records-field-status{grid-column:span 3}
.records-filter-grid-projects .records-field-search{grid-column:span 6}
.records-filter-grid-simple{
    grid-template-columns:minmax(180px,.8fr) minmax(240px,1.2fr);
}
.records-filter-grid-simple .records-field-search-wide{grid-column:1 / -1}
.records-search-control{
    position:relative;
    min-width:0;
}
.records-search-control > svg{
    position:absolute;
    z-index:2;
    left:13px;
    top:50%;
    width:17px;
    height:17px;
    color:#6b7ca5;
    transform:translateY(-50%);
    pointer-events:none;
}
.records-filter-panel .records-search-control input{
    padding-left:40px!important;
    padding-right:36px!important;
}
.records-search-help{
    display:block;
    min-height:14px;
    padding:0 2px;
    color:#8490a3;
    font-size:9px;
    line-height:1.35;
    font-weight:700;
}
.records-filter-field{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:6px!important;
    min-width:0!important;
    margin:0!important;
    color:#475569;
}
.records-filter-field > span{
    display:block!important;
    padding:0 2px!important;
    color:#5c6880!important;
    font-size:10px!important;
    line-height:1.2!important;
    font-weight:900!important;
    letter-spacing:.48px!important;
    text-transform:uppercase!important;
}
.records-filter-panel .records-filter-field select,
.records-filter-panel .records-filter-field input,
.records-filter-panel .records-filter-field .searchbox{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:43px!important;
    margin:0!important;
    padding:0 12px!important;
    border:1px solid #d5deea!important;
    border-radius:11px!important;
    background:#fbfcfe!important;
    color:#1e293b!important;
    font-family:inherit!important;
    font-size:12px!important;
    font-weight:700!important;
    outline:none!important;
    box-shadow:inset 0 1px 2px rgba(15,23,42,.025)!important;
    transition:border-color .16s ease,box-shadow .16s ease,background .16s ease!important;
}
.records-filter-panel .records-filter-field select:hover,
.records-filter-panel .records-filter-field input:hover{
    border-color:#b9c7da!important;
    background:#fff!important;
}
.records-filter-panel .records-filter-field select:focus,
.records-filter-panel .records-filter-field input:focus{
    border-color:#627cc8!important;
    background:#fff!important;
    box-shadow:0 0 0 3px rgba(61,88,168,.13)!important;
}
.records-filter-date-section{
    border-color:#cfdcf2;
    background:linear-gradient(145deg,#f5f8ff 0%,#edf3ff 100%);
}
.records-date-section-head{margin-bottom:13px}
.records-date-icon{
    width:34px;
    height:34px;
    flex:0 0 34px;
    display:grid;
    place-items:center;
    border:1px solid #ccd9f2;
    border-radius:10px;
    background:#fff;
    color:#3b57a7;
    box-shadow:0 5px 12px rgba(35,59,143,.08);
}
.records-date-icon svg{width:18px;height:18px}
.records-date-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) 26px minmax(0,1fr);
    align-items:end;
    gap:8px;
}
.records-date-separator{
    display:grid;
    place-items:center;
    height:43px;
    color:#718096;
    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
}
.records-filter-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:13px 18px;
    border-top:1px solid #e2e8f2;
    background:#fff;
}
.records-filter-tip{
    color:#7a8799;
    font-size:10px;
    line-height:1.35;
    font-weight:700;
}
.records-filter-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:9px;
    flex:0 0 auto;
}
.records-filter-actions .btn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    min-width:112px!important;
    height:41px!important;
    padding:0 15px!important;
    border-radius:11px!important;
    font-size:11px!important;
    font-weight:900!important;
}
.records-filter-actions .btn svg{width:16px;height:16px;flex:0 0 16px}
.records-filter-reset{
    border-color:#d5deea!important;
    background:#f4f6fa!important;
    color:#475569!important;
}
.records-filter-reset:hover{
    border-color:#becadc!important;
    background:#e9edf4!important;
}
.records-filter-apply{
    min-width:132px!important;
    box-shadow:0 8px 17px rgba(35,59,143,.18)!important;
}

html.dark-mode .records-filter-panel{
    border-color:#35445b!important;
    background:#141c29!important;
    box-shadow:0 16px 38px rgba(0,0,0,.25)!important;
}
html.dark-mode .records-filter-head{
    border-bottom-color:#334158;
    background:linear-gradient(135deg,#202b3c 0%,#182131 100%);
}
html.dark-mode .records-filter-heading strong{color:#eef4ff}
html.dark-mode .records-filter-heading small{color:#aeb9ca}
html.dark-mode .records-filter-badge{
    border-color:#405274;
    background:#22304a;
    color:#b9caff;
}
html.dark-mode .records-filter-section{
    border-color:#334259;
    background:#192333;
    box-shadow:none;
}
html.dark-mode .records-filter-section-head strong{color:#e3eaf6}
html.dark-mode .records-filter-section-head small{color:#97a5b8}
html.dark-mode .records-filter-field > span{color:#aeb9ca!important}
html.dark-mode .records-search-control > svg{color:#9fb1da}
html.dark-mode .records-search-help{color:#8f9eb4}
html.dark-mode .records-filter-panel .records-filter-field select,
html.dark-mode .records-filter-panel .records-filter-field input,
html.dark-mode .records-filter-panel .records-filter-field .searchbox{
    border-color:#46556d!important;
    background:#101824!important;
    color:#f1f5f9!important;
    box-shadow:inset 0 1px 2px rgba(0,0,0,.2)!important;
}
html.dark-mode .records-filter-panel .records-filter-field select:hover,
html.dark-mode .records-filter-panel .records-filter-field input:hover{
    border-color:#60718d!important;
    background:#121c2a!important;
}
html.dark-mode .records-filter-panel .records-filter-field select:focus,
html.dark-mode .records-filter-panel .records-filter-field input:focus{
    border-color:#879ee0!important;
    box-shadow:0 0 0 3px rgba(135,158,224,.15)!important;
}
html.dark-mode .records-filter-date-section{
    border-color:#405479;
    background:linear-gradient(145deg,#202d45 0%,#1a263b 100%);
}
html.dark-mode .records-date-icon{
    border-color:#45597f;
    background:#162238;
    color:#b9caff;
    box-shadow:none;
}
html.dark-mode .records-date-separator{color:#93a4bb}
html.dark-mode .records-filter-footer{
    border-top-color:#334158;
    background:#172130;
}
html.dark-mode .records-filter-tip{color:#9ba9bc}
html.dark-mode .records-filter-reset{
    border-color:#45546c!important;
    background:#202b3c!important;
    color:#d8e1ef!important;
}
html.dark-mode .records-filter-reset:hover{background:#273449!important}

@media(max-width:1180px){
    .records-filter-body{grid-template-columns:1fr}
    .records-filter-date-section{width:100%}
}
@media(max-width:820px){
    .records-filter-grid-projects{grid-template-columns:repeat(2,minmax(0,1fr))}
    .records-filter-grid-projects .records-field-owner,
    .records-filter-grid-projects .records-field-project,
    .records-filter-grid-projects .records-field-year,
    .records-filter-grid-projects .records-field-status{grid-column:span 1}
    .records-filter-grid-projects .records-field-search{grid-column:1 / -1}
    .records-filter-grid-simple{grid-template-columns:1fr}
    .records-filter-footer{align-items:flex-start;flex-direction:column}
    .records-filter-actions{width:100%;justify-content:flex-end}
}
@media(max-width:560px){
    .records-filter-head{align-items:flex-start;padding:14px}
    .records-filter-badge{display:none}
    .records-filter-body{padding:12px}
    .records-filter-grid-projects{grid-template-columns:1fr}
    .records-filter-grid-projects .records-field-search{grid-column:auto}
    .records-date-grid{grid-template-columns:1fr}
    .records-date-separator{height:auto;padding:0;text-align:center}
    .records-filter-footer{padding:12px}
    .records-filter-tip{display:none}
    .records-filter-actions{display:grid;grid-template-columns:1fr 1fr}
    .records-filter-actions .btn{width:100%!important;min-width:0!important}
}
@media print{
    .records-filter-panel{display:none!important}
}

/* ================================================================
   Offline PWA and synchronization controls
   ================================================================ */
.offline-toolbar{
    margin-left:auto;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
}
.offline-status-btn,.offline-install-btn,.offline-sync-now{
    appearance:none;
    border:1px solid #d7e0ec;
    border-radius:12px;
    background:#fff;
    color:#25324d;
    font-family:inherit;
    cursor:pointer;
    transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.offline-status-btn:hover,.offline-install-btn:hover,.offline-sync-now:hover{transform:translateY(-1px);border-color:#b9c7db;box-shadow:0 7px 18px rgba(26,43,82,.09)}
.offline-status-btn{
    min-width:152px;
    min-height:46px;
    padding:7px 12px;
    display:flex;
    align-items:center;
    gap:10px;
    text-align:left;
}
.offline-status-dot{width:10px;height:10px;flex:0 0 10px;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 4px rgba(148,163,184,.14)}
.offline-status-copy{display:grid;gap:1px;line-height:1.15}
.offline-status-copy b{font-size:11px;color:#17213d}
.offline-status-copy small{font-size:9px;color:#758299;font-weight:800;white-space:nowrap}
.offline-status-btn.is-online .offline-status-dot{background:#18a866;box-shadow:0 0 0 4px rgba(24,168,102,.14)}
.offline-status-btn.is-offline{border-color:#f0ce91;background:#fff9ed}
.offline-status-btn.is-offline .offline-status-dot{background:#f59e0b;box-shadow:0 0 0 4px rgba(245,158,11,.15)}
.offline-status-btn.has-failed{border-color:#efb3b5;background:#fff5f5}
.offline-status-btn.has-failed .offline-status-dot{background:#df4349;box-shadow:0 0 0 4px rgba(223,67,73,.14)}
.offline-status-btn.is-syncing .offline-status-dot{background:#4362bf;box-shadow:0 0 0 4px rgba(67,98,191,.14);animation:offlinePulse 1s ease-in-out infinite}
@keyframes offlinePulse{50%{transform:scale(.7);opacity:.55}}
.offline-install-btn,.offline-sync-now{height:40px;padding:0 13px;display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:900;color:#233b8f}
.offline-install-btn{border-color:#bfccef;background:#f4f7ff}
.offline-sync-now{border-color:#233b8f;background:#233b8f;color:#fff}
.offline-queued-button{border-color:#18a866!important;background:#18a866!important;color:#fff!important}

.offline-queue-modal[hidden]{display:none!important}
.offline-queue-modal{position:fixed;inset:0;z-index:3500;display:grid;place-items:center;padding:18px}
.offline-queue-backdrop{position:absolute;inset:0;background:rgba(8,18,40,.58);backdrop-filter:blur(4px)}
.offline-queue-card{position:relative;width:min(720px,100%);max-height:min(760px,92vh);display:flex;flex-direction:column;overflow:hidden;border:1px solid #d5deea;border-radius:22px;background:#fff;box-shadow:0 28px 90px rgba(6,17,40,.28)}
.offline-queue-close{position:absolute;right:15px;top:15px;z-index:2;width:36px;height:36px;border:1px solid #d8e0eb;border-radius:11px;background:#fff;color:#5c6880;font-size:23px;line-height:1;cursor:pointer}
.offline-queue-head{padding:25px 58px 18px 24px;border-bottom:1px solid #e2e8f1;background:linear-gradient(145deg,#f9fbff,#eef3ff)}
.offline-queue-head h2{margin:4px 0 7px;color:#16224a;font-size:24px}
.offline-queue-head p{margin:0;color:#68758b;font-size:12px;line-height:1.55}
.offline-queue-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:13px 18px;border-bottom:1px solid #e4e9f1;background:#fbfcfe}
.offline-queue-summary span{display:flex;align-items:baseline;justify-content:center;gap:5px;padding:9px;border:1px solid #e0e6ef;border-radius:11px;background:#fff;color:#778398;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.35px}
.offline-queue-summary b{color:#233b8f;font-size:13px}
.offline-queue-list{padding:14px 18px;display:grid;gap:9px;overflow:auto;min-height:160px}
.offline-queue-item{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:13px 14px;border:1px solid #dce4ee;border-left:4px solid #e0a323;border-radius:13px;background:#fff}
.offline-queue-item.status-failed{border-left-color:#df4349;background:#fffafa}
.offline-queue-item.status-syncing{border-left-color:#4362bf;background:#f8faff}
.offline-queue-item-main{display:grid;gap:4px;min-width:0}
.offline-queue-item-main strong{color:#202c48;font-size:12px;overflow-wrap:anywhere}
.offline-queue-item-main span{color:#8490a2;font-size:9px;font-weight:800}
.offline-queue-error{color:#bd3036;font-size:10px;line-height:1.4;overflow-wrap:anywhere}
.offline-queue-item-side{display:grid;justify-items:end;gap:7px;flex:0 0 auto}
.offline-queue-item-side em{font-style:normal;color:#7a8799;font-size:9px;font-weight:900;text-transform:uppercase}
.offline-queue-item-side div{display:flex;gap:5px}
.offline-queue-item-side button{border:1px solid #d4ddea;border-radius:8px;padding:5px 8px;background:#fff;color:#4c5b74;font:inherit;font-size:9px;font-weight:900;cursor:pointer}
.offline-queue-item-side button:last-child{color:#bf3037}
.offline-queue-empty{min-height:160px;display:grid;place-content:center;text-align:center;gap:7px;color:#8490a2}
.offline-queue-empty strong{color:#273650;font-size:14px}
.offline-queue-empty span{font-size:11px}
.offline-queue-actions{display:flex;justify-content:flex-end;gap:9px;padding:14px 18px;border-top:1px solid #e2e8f1;background:#fbfcfe}
.offline-queue-actions .btn{min-width:110px}
body.offline-panel-open{overflow:hidden}
.offline-toast{position:fixed;right:18px;top:18px;z-index:5000;max-width:min(390px,calc(100vw - 36px));padding:13px 16px;border-radius:12px;background:#26344f;color:#fff;font:800 11px/1.45 Inter,Segoe UI,Arial,sans-serif;box-shadow:0 16px 35px rgba(6,17,40,.24);opacity:0;transform:translateY(-8px);transition:.2s ease}
.offline-toast.show{opacity:1;transform:none}.offline-toast.success{background:#168a58}.offline-toast.warning{background:#a56800}.offline-toast.failure{background:#bf353c}.offline-toast.info{background:#233b8f}

html.dark-mode .offline-status-btn,html.dark-mode .offline-install-btn{border-color:#40506a;background:#172234;color:#e3eaf5}
html.dark-mode .offline-status-copy b{color:#eef3fb}html.dark-mode .offline-status-copy small{color:#a0aec1}
html.dark-mode .offline-status-btn.is-offline{border-color:#745d30;background:#292316}html.dark-mode .offline-status-btn.has-failed{border-color:#754249;background:#2b1b20}
html.dark-mode .offline-install-btn{border-color:#40547e;background:#1d2a43;color:#c8d5ff}
html.dark-mode .offline-queue-card{border-color:#344157;background:#151e2c}
html.dark-mode .offline-queue-close{border-color:#3e4d64;background:#1c2839;color:#d8e1ee}
html.dark-mode .offline-queue-head{border-bottom-color:#354158;background:linear-gradient(145deg,#202b3d,#192337)}
html.dark-mode .offline-queue-head h2{color:#edf3fb}html.dark-mode .offline-queue-head p{color:#a2aec0}
html.dark-mode .offline-queue-summary,html.dark-mode .offline-queue-actions{border-color:#354158;background:#172130}
html.dark-mode .offline-queue-summary span{border-color:#35445b;background:#111a28;color:#9eabbc}html.dark-mode .offline-queue-summary b{color:#bdccff}
html.dark-mode .offline-queue-item{border-color:#35445b;background:#192333}html.dark-mode .offline-queue-item.status-failed{background:#291b21}html.dark-mode .offline-queue-item.status-syncing{background:#1b263b}
html.dark-mode .offline-queue-item-main strong,html.dark-mode .offline-queue-empty strong{color:#e6edf7}html.dark-mode .offline-queue-item-main span,html.dark-mode .offline-queue-empty{color:#9aa8bb}
html.dark-mode .offline-queue-item-side button{border-color:#435169;background:#202b3d;color:#cbd5e3}

@media(max-width:900px){.offline-status-btn{min-width:128px}.offline-status-copy small{display:none}.offline-install-btn b{display:none}.offline-install-btn{width:40px;justify-content:center;padding:0}}
@media(max-width:680px){.topbar{align-items:center}.offline-toolbar{gap:5px}.offline-status-btn{min-width:0;width:42px;height:42px;padding:0;justify-content:center}.offline-status-copy{display:none}.offline-install-btn,.offline-sync-now{width:38px;height:38px;padding:0;justify-content:center}.offline-sync-now{font-size:0}.offline-sync-now::after{content:'↻';font-size:17px}.offline-queue-summary{grid-template-columns:1fr}.offline-queue-item{display:grid}.offline-queue-item-side{justify-items:start}.offline-queue-card{max-height:94vh}}
@media print{.offline-toolbar,.offline-queue-modal,.offline-toast{display:none!important}}

/* Offline automatic preparation pack */
.offline-status-btn.is-preparing .offline-status-dot{
    background:#4362bf;
    box-shadow:0 0 0 4px rgba(67,98,191,.14);
    animation:offlinePulse 1s ease-in-out infinite;
}
.offline-status-btn.is-preparing{
    border-color:#bdcaee;
    background:#f5f7ff;
}
.offline-pack-panel{
    margin:14px 18px 0;
    padding:14px;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(150px,230px) auto;
    align-items:center;
    gap:14px;
    border:1px solid #d9e2ef;
    border-radius:14px;
    background:linear-gradient(145deg,#f8faff,#f1f5ff);
}
.offline-pack-copy{display:grid;gap:4px;min-width:0}
.offline-pack-copy strong{font-size:12px;color:#1f2f53}
.offline-pack-copy span{font-size:10px;line-height:1.45;color:#69768c}
.offline-pack-progress-wrap{display:grid;gap:5px}
.offline-pack-progress-wrap progress{
    width:100%;
    height:8px;
    overflow:hidden;
    border:0;
    border-radius:999px;
    background:#dfe6f3;
}
.offline-pack-progress-wrap progress::-webkit-progress-bar{background:#dfe6f3;border-radius:999px}
.offline-pack-progress-wrap progress::-webkit-progress-value{background:#4362bf;border-radius:999px}
.offline-pack-progress-wrap progress::-moz-progress-bar{background:#4362bf;border-radius:999px}
.offline-pack-progress-wrap small{font-size:9px;font-weight:800;color:#71809a;text-align:right}
.offline-pack-panel .btn{white-space:nowrap;min-width:142px}

html.dark-mode .offline-status-btn.is-preparing{border-color:#41547f;background:#1c2940}
html.dark-mode .offline-pack-panel{
    border-color:#35445b;
    background:linear-gradient(145deg,#1a2639,#172234);
}
html.dark-mode .offline-pack-copy strong{color:#e6edf8}
html.dark-mode .offline-pack-copy span,html.dark-mode .offline-pack-progress-wrap small{color:#9faec2}
html.dark-mode .offline-pack-progress-wrap progress,html.dark-mode .offline-pack-progress-wrap progress::-webkit-progress-bar{background:#303d52}

@media(max-width:760px){
    .offline-pack-panel{grid-template-columns:1fr;align-items:stretch}
    .offline-pack-progress-wrap small{text-align:left}
    .offline-pack-panel .btn{width:100%}
}




/* Pretty autocomplete suggestions for project names and S.I# fields */
.pretty-autocomplete{position:relative;width:100%;}
.pretty-autocomplete input{width:100%;}
.pretty-autocomplete-menu{
    display:none;position:fixed;z-index:2147483647;overflow:auto;
    padding:8px;border:1px solid #c9d5e8;border-radius:16px;
    background:#fff;box-shadow:0 24px 60px rgba(15,23,42,.24),0 6px 18px rgba(15,23,42,.12);
    backdrop-filter:blur(12px);
}
.pretty-autocomplete-menu.is-open{display:block !important;}
.pretty-autocomplete-menu.is-open{display:block;animation:prettyAutocompleteIn .14s ease-out;}
.pretty-autocomplete-head{display:flex;align-items:center;gap:9px;padding:8px 9px 9px;border-bottom:1px solid #edf1f6;margin-bottom:5px;}
.pretty-autocomplete-head-icon{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:#edf4ff;color:#233b8f;font-size:15px;font-weight:900;}
.pretty-autocomplete-head strong{display:block;color:#17235c;font-size:11px;font-weight:950;letter-spacing:.15px;}
.pretty-autocomplete-head small{display:block;color:#7a879b;font-size:9px;font-weight:750;margin-top:1px;}
.pretty-autocomplete-option{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid transparent;border-radius:11px;background:transparent;text-align:left;padding:10px 10px;cursor:pointer;color:#16213f;transition:.14s ease;}
.pretty-autocomplete-option:hover,.pretty-autocomplete-option.is-active{background:#f3f7ff;border-color:#d8e5ff;transform:translateX(1px);}
.pretty-autocomplete-primary{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:900;color:#17235c;}
.pretty-autocomplete-secondary{display:flex;align-items:center;gap:6px;flex:0 0 auto;min-width:0;}
.pretty-autocomplete-owner{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-size:9px;font-weight:750;}
.pretty-autocomplete-badge{display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:999px;background:#dff8ea;border:1px solid #b8e9ce;color:#08733f;font-size:8px;font-weight:950;letter-spacing:.45px;white-space:nowrap;}
.pretty-autocomplete-badge.si{background:#e6edff;border-color:#ccd9ff;color:#27439a;}
.pretty-autocomplete-empty{display:flex;align-items:center;gap:9px;padding:14px 11px;color:#718096;}
.pretty-autocomplete-empty-icon{width:29px;height:29px;border-radius:9px;display:grid;place-items:center;background:#f1f4f8;color:#8290a5;font-size:16px;}
.pretty-autocomplete-empty strong{display:block;color:#4b5870;font-size:11px;font-weight:900;}
.pretty-autocomplete-empty small{display:block;margin-top:2px;font-size:9px;font-weight:700;color:#8a95a7;}
@keyframes prettyAutocompleteIn{from{opacity:0;transform:translateY(-4px) scale(.99)}to{opacity:1;transform:none}}
@media(max-width:680px){
    .pretty-autocomplete-menu{border-radius:13px;padding:6px;}
    .pretty-autocomplete-head{padding:7px 8px 8px;}
    .pretty-autocomplete-option{padding:10px 9px;}
    .pretty-autocomplete-owner{max-width:125px;}
}


/* Dark mode */
html.dark-mode .pretty-autocomplete-menu{background:rgba(35,40,48,.98);border-color:#596170;box-shadow:0 22px 55px rgba(0,0,0,.38),0 3px 14px rgba(0,0,0,.22);}
html.dark-mode .pretty-autocomplete-head{border-bottom-color:#3f4652;}
html.dark-mode .pretty-autocomplete-head-icon{background:#2b3547;color:#b8c9ff;}
html.dark-mode .pretty-autocomplete-head strong{color:#eef3f8;}
html.dark-mode .pretty-autocomplete-head small{color:#9ba8ba;}
html.dark-mode .pretty-autocomplete-option:hover,html.dark-mode .pretty-autocomplete-option.is-active{background:#303844;border-color:#4b5666;}
html.dark-mode .pretty-autocomplete-primary{color:#eef3f8;}
html.dark-mode .pretty-autocomplete-owner{color:#aab4c2;}
html.dark-mode .pretty-autocomplete-empty{color:#a2adbb;}
html.dark-mode .pretty-autocomplete-empty-icon{background:#303640;color:#a0abba;}
html.dark-mode .pretty-autocomplete-empty strong{color:#e0e6ee;}
html.dark-mode .pretty-autocomplete-empty small{color:#9ca7b5;}

/* Universal table sorting + filtering controls */
table.table-filter-enhanced th.has-table-filter{position:sticky;}
.table-filter-head{display:flex;align-items:center;justify-content:space-between;gap:6px;position:relative;min-height:27px;white-space:nowrap;}
.table-filter-label{overflow:hidden;text-overflow:ellipsis;min-width:0;}
.table-filter-trigger{flex:0 0 auto;border:0;background:transparent;color:#5a6787;width:25px;height:25px;border-radius:7px;display:inline-grid;place-items:center;cursor:pointer;font-size:15px;line-height:1;padding:0;}
.table-filter-trigger:hover,.table-filter-trigger.is-active{background:#e7edff;color:#193a9e;}
.table-filter-trigger.is-sorted-asc,.table-filter-trigger.is-sorted-desc{background:#dfe8ff;color:#12338d;font-weight:950;}
.table-filter-menu{display:none;position:fixed;right:auto;top:auto;width:245px;max-height:390px;overflow:auto;background:#fff;border:1px solid #d9e0ed;border-radius:12px;box-shadow:0 18px 42px rgba(15,23,42,.18);padding:8px;z-index:10050;text-align:left;text-transform:none;letter-spacing:0;}
.table-filter-menu.is-open{display:block;}
.table-filter-menu-title{font-weight:900;color:#17235c;font-size:12px;padding:4px 6px 7px;border-bottom:1px solid #eef1f6;margin-bottom:5px;}
.table-filter-action,.table-filter-value{display:block;width:100%;border:0;background:transparent;text-align:left;padding:8px 9px;border-radius:8px;color:#27324f;font-size:12px;cursor:pointer;}
.table-filter-action:hover,.table-filter-value:hover{background:#f2f5fb;}
.table-filter-action.clear{color:#b42318;margin-top:4px;border-top:1px solid #eef1f6;padding-top:10px;}
.table-filter-search-label{display:block;color:#5b6680;font-size:11px;font-weight:800;padding:8px 6px 5px;}
.table-filter-search{display:block;width:100%;height:34px;border:1px solid #d9e0ed;border-radius:8px;padding:0 9px;margin-top:5px;background:#fff;color:#18213d;outline:none;}
.table-filter-search:focus{border-color:#6a86e8;box-shadow:0 0 0 3px rgba(61,95,210,.10);}
.table-filter-menu-subtitle{font-size:10px;font-weight:900;color:#7b8499;text-transform:uppercase;letter-spacing:.55px;padding:8px 6px 4px;}
.table-filter-values{display:flex;flex-direction:column;gap:1px;}
.table-filter-value{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.table-filter-enhanced tbody tr[hidden]{display:none!important;}
@media(max-width:800px){.table-filter-menu{max-height:65vh;}}
@media print{.table-filter-trigger,.table-filter-menu{display:none!important;}}

/* Reliable body-overlay autocomplete dropdown */
.pretty-autocomplete{position:relative!important;width:100%;z-index:30;}
.pretty-autocomplete-menu{
    display:none;
    position:fixed!important;
    left:0;
    top:0;
    width:auto;
    max-height:320px;
    overflow-y:auto;
    overflow-x:hidden;
    padding:7px;
    border:1px solid #cfd9e8;
    border-radius:14px;
    background:#fff;
    box-shadow:0 20px 50px rgba(15,23,42,.20),0 5px 15px rgba(15,23,42,.10);
    z-index:2147483646!important;
    box-sizing:border-box;
}
.pretty-autocomplete-menu.is-open{display:block!important;animation:prettyAutocompleteIn .14s ease-out;}
.pretty-autocomplete-menu .pretty-autocomplete-option{min-height:44px;}
@media(max-width:680px){.pretty-autocomplete-menu{max-height:260px;border-radius:12px;}.pretty-autocomplete-menu .pretty-autocomplete-option{min-height:46px;}}
@media print{.pretty-autocomplete-menu,.pretty-autocomplete-menu.is-open{display:none!important;}}
