:root{
  --maroon:#7b1222;
  --maroon-dark:#5f0f1d;
  --maroon-soft:#9c2037;
  --ink:#1b2430;
  --muted:#667085;
  --bg:#f4f6fb;
  --card:#ffffff;
  --line:#e4e7ec;
  --soft-line:#f0d9de;
  --soft-bg:#fff7f8;
  --green:#0f8a5f;
  --green-soft:#e8f7ef;
  --blue:#2255d6;
  --blue-soft:#edf4ff;
  --orange:#b54708;
  --orange-soft:#fff3d6;
  --red:#b42318;
  --red-soft:#fdecec;
  --shadow:0 10px 30px rgba(16,24,40,.06);
}
*{box-sizing:border-box}
body{margin:0;font-family:"Kanit",Tahoma,Arial,sans-serif;background:var(--bg);color:var(--ink)}
a{color:var(--maroon)}
.topbar{background:linear-gradient(135deg,var(--maroon-dark),var(--maroon));color:#fff;padding:14px 22px;display:flex;justify-content:space-between;align-items:center;gap:14px;box-shadow:0 4px 16px rgba(0,0,0,.12)}
.brand-wrap{display:flex;align-items:center;gap:12px}
.brand-badge{width:44px;height:44px;border-radius:14px;background:rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center;font-weight:800;letter-spacing:.5px}
.brand-title{font-weight:800;font-size:16px}
.brand-subtitle{font-size:12px;color:#f6d8de}
.userbox{display:flex;align-items:center;gap:10px}
.user-avatar{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.16);display:flex;align-items:center;justify-content:center;font-weight:800}
.logout-link{display:inline-flex;align-items:center;padding:8px 12px;border:1px solid rgba(255,255,255,.18);border-radius:10px;color:#fff;text-decoration:none;background:rgba(255,255,255,.06)}
.nav{background:#fff;border-bottom:1px solid var(--line);padding:10px 22px;display:flex;flex-wrap:wrap;gap:8px}
.nav a{display:inline-flex;align-items:center;gap:8px;color:var(--maroon);text-decoration:none;font-weight:700;padding:9px 14px;border-radius:12px}
.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#f59e0b;color:#fff;font-size:11px;font-weight:800;line-height:1;box-shadow:0 2px 8px rgba(245,158,11,.28)}
.nav a:hover{background:#f8eaed}
.container{max-width:1280px;margin:22px auto;padding:0 16px}
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:18px}
.page-head h1,.page-head h2,.page-head h3{margin:0 0 4px}
.page-head p{margin:0;color:var(--muted)}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:18px;margin-bottom:16px;box-shadow:var(--shadow)}
.card-title{margin:0 0 6px}
.card-subtitle{margin:0 0 14px;color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.overview-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}
.overview-card,.stat-card{padding:18px;background:linear-gradient(180deg,#fff,#fbfbfd);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
.overview-card .label,.stat-card .label{color:var(--muted);font-size:13px;margin-bottom:8px}
.overview-card .value,.stat-card .value,.kpi{font-size:28px;font-weight:700;color:var(--maroon)}
.muted{color:var(--muted)}
.small{font-size:12px}
.text-right{text-align:right}
.text-danger{color:var(--red)}
.section-split{display:grid;grid-template-columns:1.2fr .8fr;gap:16px}
.quick-links{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.quick-link{display:block;padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff;text-decoration:none;color:inherit}
.quick-link:hover{border-color:#d0a1ab;background:#fff9fa}
.quick-link strong{display:block;margin-bottom:6px;color:var(--maroon)}
.info-list{margin:0;padding-left:18px;color:#475467}
.info-list li{margin:6px 0}
.badge{display:inline-block;padding:5px 10px;border-radius:999px;background:#f3f4f6;font-size:12px;font-weight:700}
.badge.procurement{background:var(--orange-soft);color:#8a5d00}
.badge.finance{background:var(--blue-soft);color:#2546a8}
.badge.ok{background:var(--green-soft);color:#166534}
.badge.wait{background:var(--orange-soft);color:#92400e}
.badge.reject{background:var(--red-soft);color:#b42318}
.badge.neutral{background:#eef2f6;color:#475467}
.table-wrap{overflow:auto;border-radius:14px;border:1px solid var(--line)}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{padding:11px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
th{background:#fafafa;color:#344054}
tr:last-child td{border-bottom:none}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border:0;border-radius:12px;background:var(--maroon);color:#fff;text-decoration:none;cursor:pointer;font-weight:700}
.btn:hover{filter:brightness(.98)}
.btn.secondary{background:#eef2f6;color:#344054}
.btn.success{background:var(--green)}
.btn.primary-soft{background:var(--blue);color:#fff}
.btn.danger{background:#fff1f1;color:var(--red)}
.btn.ghost{background:#fff;border:1px solid var(--line);color:#344054}
.btn.sm{padding:8px 12px;border-radius:10px;font-size:13px}
input,select,textarea{width:100%;padding:12px 14px;border:1px solid #d0d5dd;border-radius:14px;background:#fff;font-size:14px;outline:none}
input:focus,select:focus,textarea:focus{border-color:#d0a1ab;box-shadow:0 0 0 3px rgba(123,18,34,.08)}
label{display:block;font-weight:700;margin:10px 0 8px;color:#344054}
textarea{min-height:112px;resize:vertical}
.row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.alert{padding:12px 14px;border-radius:12px;margin-bottom:12px;font-weight:700}
.alert.success{background:#e8f7ef;color:#065f46}.alert.error{background:#fdecec;color:#8a1c1c}
.form-actions{display:flex;justify-content:flex-end;gap:12px;border-top:1px solid var(--line);padding-top:18px;margin-top:18px}
.empty-state{padding:28px;border:1px dashed #d0d5dd;border-radius:16px;background:#fcfcfd;text-align:center;color:var(--muted)}
.inline-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.inline-form input{min-width:140px;width:auto;flex:1}
.helper{font-size:12px;color:#98a2b3;margin-top:6px}
pre.code-block{margin:0;white-space:pre-wrap;word-break:break-word;font-family:Consolas,monospace;font-size:12px;background:#f8fafc;border:1px solid #e5e7eb;padding:10px;border-radius:10px}

/* login */
.login-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px;background:radial-gradient(circle at top left,#e9edf6 0,#f7f8fb 45%,#f4f6fb 100%)}
.login{max-width:980px;width:100%;display:grid;grid-template-columns:1.1fr .9fr;background:#fff;border-radius:24px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.12)}
.hero{background:linear-gradient(145deg,#5f0f1d,#94152b);color:#fff;padding:54px;position:relative}
.hero h1{margin:0 0 12px;font-size:40px;line-height:1.15}
.hero p{margin:0 0 16px;color:#f8dfe4}
.hero ul{margin:22px 0 0;padding-left:20px;color:#fff8fa}
.hero li{margin:8px 0}
.loginform{padding:42px}
.loginform h2{margin-top:0}
.login-caption{color:var(--muted);margin-bottom:18px}
.login-note{margin-top:16px;padding:12px 14px;border-radius:12px;background:#f8fafc;border:1px solid var(--line);color:var(--muted)}
footer{text-align:center;color:#777;padding:30px}

/* budget form */
.budget-form-shell{background:#fff;border:1px solid var(--line);border-radius:28px;padding:28px 28px 18px;box-shadow:0 18px 40px rgba(16,24,40,.08)}
.budget-form-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.budget-form-head h3{margin:0;font-size:28px;color:#101828}.budget-form-head .close-x{font-size:28px;line-height:1;color:#98a2b3}
.section-wrap{border:1px solid var(--soft-line);background:var(--soft-bg);border-radius:18px;padding:16px 16px 8px;margin-top:18px}
.section-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}
.section-title{display:flex;gap:10px;align-items:flex-start}
.section-title .icon{width:30px;height:30px;border-radius:50%;background:var(--blue-soft);color:var(--blue);display:flex;align-items:center;justify-content:center;font-weight:700}
.section-title h4{margin:0 0 4px;font-size:16px;color:#344054}.section-title p{margin:0;color:var(--muted);font-size:13px}
.add-tranche-btn{background:var(--blue);border-radius:14px;padding:11px 16px}
.tranche-card{background:#fff;border:1px solid #d7dde7;border-radius:18px;padding:14px;margin-bottom:12px}
.tranche-top{display:grid;grid-template-columns:.55fr 1.8fr 1.2fr 1fr 1fr;gap:12px;align-items:end}
.tranche-no-box{padding:12px 14px;border:1px solid #d0d5dd;border-radius:14px;background:#fafafa;font-weight:700;text-align:center}
.upload-box{border:1px dashed #e1c1c7;background:#fffafa;border-radius:16px;padding:14px 16px;margin-top:12px}
.upload-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.file-note{font-size:12px;color:#98a2b3}
.file-trigger{position:relative;overflow:hidden;display:inline-flex;align-items:center;gap:8px;background:var(--maroon);color:#fff;border-radius:12px;padding:10px 14px;font-weight:700;cursor:pointer}
.file-trigger input{position:absolute;inset:0;opacity:0;cursor:pointer}.file-name{font-size:13px;color:#667085}
.tranche-actions{display:flex;justify-content:flex-end;margin-top:10px}
.summary-bar{display:flex;justify-content:space-between;align-items:center;border:1px solid #dfe4ea;border-radius:14px;background:#fff;padding:16px 18px;margin:8px 0 0}.summary-bar strong{font-size:28px;color:var(--maroon)}
.route-select-note{font-size:12px;color:#98a2b3;margin-top:6px}

@media(max-width:1100px){
  .overview-grid,.grid{grid-template-columns:repeat(2,1fr)}
  .section-split{grid-template-columns:1fr}
  .tranche-top{grid-template-columns:1fr 1fr}
}
@media(max-width:800px){
  .overview-grid,.grid,.row,.quick-links,.login{grid-template-columns:1fr}
  .topbar{flex-direction:column;align-items:flex-start}
  .userbox{width:100%;justify-content:space-between}
  .page-head,.budget-form-head,.section-head,.summary-bar,.form-actions{flex-direction:column;align-items:stretch}
  .budget-form-shell{padding:20px}
  .tranche-top{grid-template-columns:1fr}
  .login-shell{padding:16px}
  .hero,.loginform{padding:26px}
  .hero h1{font-size:30px}
}

.pagination{display:flex;gap:6px;justify-content:flex-end;margin-top:14px;flex-wrap:wrap}.page-link{padding:8px 11px;border:1px solid var(--line);border-radius:10px;text-decoration:none;background:#fff;color:#344054}.page-link.active{background:var(--maroon);color:#fff;border-color:var(--maroon)}.filters{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:10px;align-items:end;margin-bottom:14px}.action-stack{display:flex;gap:6px;flex-wrap:wrap}.warning-box{padding:12px 14px;background:#fff7e6;border:1px solid #fedf89;border-radius:12px;color:#7a4b00}.print-only{display:none}@media(max-width:800px){.filters{grid-template-columns:1fr}}@media print{.topbar,.nav,.no-print,footer{display:none!important}.container{max-width:none;margin:0;padding:0}.card{box-shadow:none}.print-only{display:block}}

/* ===== Plan budget management (popup workflow) ===== */
.plan-toolbar-card{display:flex;justify-content:space-between;align-items:center;gap:18px;background:#fff;border:1px solid #cfe0ea;border-radius:16px;padding:17px 20px;margin-bottom:16px;box-shadow:0 4px 14px rgba(16,24,40,.04)}
.plan-toolbar-card h2{font-size:18px;margin:0 0 5px;color:#172033}.plan-toolbar-card p{margin:0;color:#667085;font-size:12px}
.plan-toolbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.search-control{display:flex;align-items:center;gap:8px;width:280px;border:1px solid #d0d5dd;border-radius:13px;background:#fff;padding:0 12px;color:#98a2b3}.search-control input{border:0;box-shadow:none;padding:10px 0;border-radius:0}.search-control input:focus{box-shadow:none}
.plan-budget-table-card{background:#fff;border:1px solid #e3e7ec;border-radius:18px;overflow:hidden;box-shadow:0 14px 30px rgba(16,24,40,.08)}
.plan-table-wrap{border:0;border-radius:0}.plan-budget-table th{background:linear-gradient(180deg,#e7f4f8,#dceff5);font-size:12px;color:#344054;padding:13px 15px}.plan-budget-table td{padding:17px 15px}.plan-budget-table tbody tr:nth-child(odd){background:#fffafa}.plan-budget-table tbody tr:hover{background:#fff5f6}.plan-budget-table tfoot td{border-top:2px solid var(--maroon);background:#fffafa;font-weight:700}.plan-budget-table .money{text-align:right;white-space:nowrap}.plan-budget-table .center{text-align:center}.budget-name-link{font-weight:800;color:#8a1629;text-decoration:none}.budget-name-link:hover{text-decoration:underline}.budget-meta{font-size:11px;color:#98a2b3;margin-top:5px}.value-black{color:#111827;font-weight:800}.value-red{color:#a91026;font-weight:800}.value-green{color:#008a4b;font-weight:800}.value-teal{color:#008b8b;font-weight:800}.value-orange{color:#d86b00;font-weight:800}
.icon-actions{display:flex;gap:7px;justify-content:center;align-items:center}.icon-actions form{margin:0}.icon-btn{width:31px;height:31px;border:0;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;cursor:pointer;font-weight:800;font-size:16px}.icon-btn.edit{background:#fff1f2;color:#a71930}.icon-btn.delete{background:#ffeef0;color:#db3150}.icon-btn:hover{filter:brightness(.97);transform:translateY(-1px)}
body.modal-open{overflow:hidden}.modal-overlay{position:fixed;inset:0;background:rgba(37,46,62,.62);display:none;align-items:center;justify-content:center;padding:16px;z-index:9999;backdrop-filter:blur(2px)}.modal-overlay.show{display:flex}.budget-modal{width:min(820px,96vw);max-height:calc(100vh - 28px);background:#fff;border-radius:24px;box-shadow:0 28px 80px rgba(0,0,0,.28);overflow:hidden;animation:budgetModalIn .16s ease-out}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:22px 26px 14px;border-bottom:1px solid #eef0f3}.modal-head h3{font-size:18px;margin:0;color:#172033}.modal-close{border:0;background:transparent;color:#94a3b8;font-size:30px;line-height:1;cursor:pointer}.modal-body{padding:0 26px 18px;overflow:auto;max-height:calc(100vh - 105px)}.modal-section-wrap{margin-top:16px;padding:16px}.modal-actions{position:sticky;bottom:0;background:#fff;margin-top:16px;padding:14px 0 0;z-index:2}.upload-action-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.budget-modal label{font-size:12px}.budget-modal input,.budget-modal select,.budget-modal textarea{padding:11px 13px}.budget-modal textarea{min-height:90px}.budget-modal .tranche-card{padding:12px}.budget-modal .tranche-top{grid-template-columns:.55fr 1.7fr 1.25fr 1fr 1fr;gap:10px}.budget-modal .tranche-top label{font-size:11px}.budget-modal .summary-bar{padding:13px 15px}.budget-modal .summary-bar strong{font-size:20px}.budget-modal .section-title h4{font-size:14px}.budget-modal .section-title p{font-size:11px}.budget-modal .file-note{font-size:11px}
@keyframes budgetModalIn{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
@media(max-width:1000px){.plan-toolbar-card{align-items:flex-start;flex-direction:column}.plan-toolbar-actions{width:100%;justify-content:flex-start}.search-control{width:min(100%,360px)}.budget-modal .tranche-top{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.plan-toolbar-actions{display:grid;grid-template-columns:1fr 1fr}.search-control{grid-column:1/-1;width:100%}.plan-toolbar-actions .btn{width:100%}.budget-modal{width:100%;max-height:calc(100vh - 12px);border-radius:18px}.modal-overlay{padding:6px}.modal-head{padding:17px 18px 12px}.modal-body{padding:0 18px 14px;max-height:calc(100vh - 82px)}.budget-modal .tranche-top{grid-template-columns:1fr}.plan-budget-table th,.plan-budget-table td{padding:11px 10px}}
@media print{.plan-toolbar-card{display:none!important}.plan-budget-table-card{box-shadow:none;border:1px solid #ddd}.plan-budget-table th{background:#eee!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.plan-budget-table th:last-child,.plan-budget-table td:last-child{display:none}}

/* Plan cut modal */
.plan-cut-modal{width:min(860px,96vw)}
.cut-budget-summary{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:10px;margin:12px 0 4px}
.cut-budget-summary>div{border:1px solid #e4e7ec;background:#fafbfc;border-radius:14px;padding:12px 14px}
.cut-budget-summary span{display:block;color:#667085;font-size:12px;margin-bottom:5px}
.cut-budget-summary strong{display:block;color:#7b1222;font-size:15px;line-height:1.35}
.workflow-note{margin-top:14px;border:1px solid #d7e6f7;background:#f5f9ff;color:#344054;border-radius:14px;padding:12px 14px;font-size:13px}
@media(max-width:700px){.cut-budget-summary{grid-template-columns:1fr}.plan-cut-modal{width:100%}}
.edit-budget-banner{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 15px;margin-bottom:14px;border:1px solid #d9e3ef;background:#f7fbff;border-radius:14px}
.existing-tranches-wrap{background:#f8fafc;border-color:#dfe7ef}
.existing-tranche-row{display:grid;grid-template-columns:90px 1fr 150px 110px;gap:12px;align-items:center;padding:12px 10px;border:1px solid #e4e7ec;background:#fff;border-radius:13px;margin-bottom:9px}
.existing-no{font-weight:800;color:#7b1222}.existing-amount{text-align:right;font-weight:800;color:#111827}
@media(max-width:800px){.edit-budget-banner{align-items:flex-start;flex-direction:column}.existing-tranche-row{grid-template-columns:1fr}.existing-amount{text-align:left}}

/* ===== Budget detail page ===== */
.budget-detail-head{display:flex;justify-content:space-between;align-items:center;gap:18px;background:#fff;border-bottom:1px solid #e4e7ec;margin:-22px -16px 0;padding:16px 22px;position:sticky;top:0;z-index:20}
.budget-detail-title{display:flex;align-items:center;gap:12px}.budget-detail-title h2{font-size:18px;margin:0 0 4px}.budget-detail-sub{font-size:12px;color:#667085}.budget-folder-icon{width:38px;height:38px;border-radius:11px;background:#e8f5fb;color:#05658a;display:flex;align-items:center;justify-content:center;font-size:18px}.budget-detail-actions{display:flex;align-items:center;gap:8px}.detail-close-btn{width:36px;height:36px;border-radius:12px;background:#f2f5f9;color:#667085;display:flex;align-items:center;justify-content:center;text-decoration:none;font-size:23px;font-weight:700}
.budget-detail-summary{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;background:#f1f5f9;margin:0 -16px 18px;padding:16px 22px;border-bottom:1px solid #dfe5ec}.detail-stat{background:#fff;border:1px solid #dbe3ec;border-radius:16px;padding:13px 14px;min-height:72px}.detail-stat span{display:block;color:#667085;font-size:11px;margin-bottom:7px}.detail-stat strong{font-size:15px}.detail-stat.blue strong{color:#1769d1}.detail-stat.red{border-color:#efced4}.detail-stat.red strong{color:#9d1830}.detail-stat.purple{border-color:#e8dffc}.detail-stat.purple strong{color:#7955b8}.detail-stat.teal{border-color:#c8eee7}.detail-stat.teal strong{color:#008b83}.detail-stat.green strong{color:#00944c}.detail-stat.orange strong{color:#d46a00}
.budget-tranche-panel{border:1px solid #efd5d9;border-radius:20px;padding:16px;margin-bottom:18px;background:linear-gradient(180deg,#f9fbff,#fff)}.detail-section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;margin-bottom:12px}.detail-section-head h3{margin:0 0 5px;font-size:16px}.detail-section-head p{margin:0;color:#667085;font-size:12px}.detail-total-box{min-width:210px;border:1px solid #efd5d9;border-radius:14px;background:#fff;padding:10px 14px}.detail-total-box span{display:block;color:#667085;font-size:11px}.detail-total-box strong{display:block;color:#1769d1;margin-top:4px}.detail-table-wrap{border-radius:14px}.detail-table th{background:#eff5f8;font-size:12px}.detail-table .money{text-align:right}.evidence-link{color:#8a1629;text-decoration:none;font-weight:700;font-size:12px}.evidence-link:hover{text-decoration:underline}
.project-detail-toolbar{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;margin:8px 0 10px}.project-detail-toolbar h3{margin:0 0 4px;font-size:16px}.project-detail-toolbar p{margin:0;color:#667085;font-size:12px}.project-detail-tools{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.detail-filter-select{width:auto;min-width:135px;padding:10px 12px;border-radius:12px}.detail-search{width:230px}.detail-project-card{box-shadow:none}.detail-project-table th{white-space:nowrap}.detail-project-table td{font-size:12px}.detail-table-footer{display:flex;justify-content:space-between;padding:13px 16px;border-top:1px solid #e4e7ec;color:#667085;font-size:12px;background:#fafafa}
@media(max-width:1350px){.budget-detail-summary{grid-template-columns:repeat(4,1fr)}}
@media(max-width:900px){.budget-detail-summary{grid-template-columns:repeat(2,1fr)}.project-detail-toolbar,.detail-section-head{align-items:stretch;flex-direction:column}.project-detail-tools{justify-content:flex-start}.detail-search{width:100%}.detail-total-box{min-width:0}.budget-detail-head{position:static}.budget-detail-actions{align-self:flex-start}}
@media(max-width:600px){.budget-detail-summary{grid-template-columns:1fr}.budget-detail-head{align-items:flex-start;flex-direction:column}.project-detail-tools{display:grid;grid-template-columns:1fr}.detail-filter-select{width:100%}}
@media print{.budget-detail-head{position:static;margin:0;padding:0 0 12px;border:0}.budget-detail-summary{margin:0 0 15px;padding:0;background:#fff}.project-detail-toolbar{display:none!important}.budget-tranche-panel{box-shadow:none}.detail-project-card{box-shadow:none}}

/* v7 plan cut form */
.plan-cut-form-card{background:#fff;border:1px solid #d8e2ea;border-radius:28px;padding:22px 26px;margin-bottom:18px;box-shadow:0 10px 30px rgba(16,24,40,.05);border-top:4px solid var(--maroon)}
.plan-cut-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-bottom:14px;margin-bottom:12px;border-bottom:1px solid #e4e7ec}
.plan-cut-form-head h3{margin:0 0 4px;color:var(--maroon);font-size:20px}.plan-cut-form-head p{margin:0;color:#667085;font-size:13px}
.cut-snapshot-box{margin:14px 0 16px;border:1px solid #d9e1ee;border-radius:18px;background:#f8fbff;padding:10px 14px}
.cut-snapshot-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;text-align:center}
.cut-snapshot-grid div{padding:10px 8px}.cut-snapshot-grid span{display:block;color:#667085;font-size:12px;margin-bottom:4px}.cut-snapshot-grid strong{font-size:20px}
.cut-snapshot-grid strong.blue{color:#2563eb}.cut-snapshot-grid strong.green{color:#059669}.cut-snapshot-grid strong.teal{color:#0891b2}.cut-snapshot-grid strong.orange{color:#d97706}
.cut-after-line{display:flex;justify-content:space-between;gap:12px;align-items:center;padding-top:10px;margin-top:4px;border-top:1px solid #e5edf7;font-weight:700;color:#344054}.cut-after-line strong{color:var(--maroon);font-size:20px}
.workflow-select-box{margin-top:12px;padding:14px 14px 12px;border:1px solid #bdeaf7;border-radius:16px;background:#f2fcff}
.workflow-select-box label{margin-top:0}.workflow-hint{margin-top:8px;color:#0f5f75;font-size:12px}
.plan-cut-submit-wrap{margin-top:18px}.plan-cut-submit{width:100%;justify-content:center;padding:14px 18px;border-radius:14px;font-size:16px}
.optional-grid{margin-top:4px}

@media(max-width:900px){.cut-snapshot-grid{grid-template-columns:repeat(2,1fr)}.plan-cut-form-head{flex-direction:column;align-items:stretch}}
@media(max-width:600px){.plan-cut-form-card{padding:18px}.cut-snapshot-grid{grid-template-columns:1fr}.cut-after-line{flex-direction:column;align-items:flex-start}}

/* v8 exact plan cut form */
.exact-cut-page{display:flex;justify-content:center;align-items:flex-start;padding:0 0 28px}
.exact-cut-card{width:min(648px,100%);background:#fff;border:1px solid #e2e7ec;border-top:4px solid #7b1724;border-radius:24px;padding:24px 24px 22px;box-shadow:0 12px 34px rgba(16,24,40,.08)}
.exact-cut-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 0 14px;border-bottom:1px solid #dfe5ec;margin-bottom:17px}
.exact-cut-head h2{margin:0;font-size:18px;line-height:1.25;color:#7b1724;font-weight:800}
.exact-admin-pill{display:inline-flex;align-items:center;white-space:nowrap;border:1px solid #e3c8ff;background:#fbf6ff;color:#7c2be2;border-radius:12px;padding:7px 10px;font-size:11px}
.exact-field{margin-bottom:14px}.exact-field label,.exact-workflow-box label{font-size:12px;font-weight:800;margin:0 0 7px;color:#2f3a4b}
.exact-field input,.exact-field select,.exact-workflow-box select{height:40px;padding:0 13px;border:1px solid #ccd5df;border-radius:11px;background:#fff;font-size:13px;color:#1f2937;box-shadow:none}
.exact-field input:focus,.exact-field select:focus,.exact-workflow-box select:focus{border-color:#aab7c5;box-shadow:0 0 0 2px rgba(123,23,36,.05)}
.exact-helper{margin-top:5px;color:#9aa7bd;font-size:10px;line-height:1.35}
.exact-summary{margin:4px 0 15px;border:1px solid #d3ddef;border-radius:15px;background:#f4f7ff;padding:10px 11px 8px}
.exact-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:2px;text-align:center}
.exact-summary-grid div{padding:2px 4px 7px}.exact-summary-grid span{display:block;color:#758198;font-size:10px;margin-bottom:2px}.exact-summary-grid strong{display:block;font-size:12px;font-weight:800}
.exact-summary-grid .s-blue{color:#1662dc}.exact-summary-grid .s-green{color:#00a15f}.exact-summary-grid .s-teal{color:#0086a8}.exact-summary-grid .s-orange{color:#f08300}
.exact-summary-after{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #d9e0ed;padding:7px 0 0;font-size:11px;font-weight:800;color:#364152}.exact-summary-after strong{color:#7f0716;font-size:11px}
.exact-money-wrap{position:relative}.exact-money-wrap input{padding-right:70px}.exact-money-wrap span{position:absolute;right:13px;top:50%;transform:translateY(-50%);color:#a6adba;font-size:12px;font-weight:700;pointer-events:none}.exact-money-wrap input:not(:placeholder-shown)+span{opacity:.35}
.exact-workflow-box{border:1px solid #54def7;background:#f3fdff;border-radius:14px;padding:12px 12px 10px;margin:3px 0 13px}.exact-workflow-box select{height:38px;background:#fff}.exact-workflow-note{margin-top:7px;color:#08728d;font-size:10px;line-height:1.4}
.exact-submit{width:100%;height:38px;border:0;border-radius:10px;background:#801b2a;color:#fff;font-weight:800;font-size:12px;cursor:pointer;box-shadow:0 5px 13px rgba(128,27,42,.18)}.exact-submit:hover{background:#701724}

@media(max-width:680px){.exact-cut-card{border-radius:18px;padding:20px 16px}.exact-cut-head{align-items:flex-start;flex-direction:column}.exact-summary-grid{grid-template-columns:repeat(2,1fr)}}

.exact-current-budget{margin-top:10px;padding:10px 14px;border:1px solid #ead7de;border-radius:14px;background:#fff8fa;color:#7b1222;font-size:13px}
.exact-current-budget strong{font-size:15px;color:#5f0f1d}
.modal-budget-target{margin:0 0 12px}

/* v11 exact budget detail cut modal */
.exact-cut-modal{width:min(720px,96vw);border-radius:24px;border-top:4px solid #7b1724;background:#fff;overflow:hidden}
.exact-modal-head{padding:18px 24px 13px;border-bottom:1px solid #dfe5ec}
.exact-modal-head h3{color:#7b1724;font-size:18px;font-weight:800}
.exact-modal-body{padding:14px 24px 18px;max-height:calc(100vh - 95px)}
.exact-modal-body .modal-budget-target{margin:0 0 14px}
.exact-modal-actions{display:grid;grid-template-columns:110px 1fr;gap:12px;align-items:center;margin-top:14px;padding-top:12px;border-top:1px solid #edf0f3;position:sticky;bottom:0;background:#fff}
.exact-modal-submit{height:40px}
@media(max-width:680px){.exact-cut-modal{width:100%;border-radius:18px}.exact-modal-head{padding:16px 18px 12px}.exact-modal-body{padding:12px 18px 16px}.exact-modal-actions{grid-template-columns:1fr}.exact-modal-actions .btn,.exact-modal-actions .exact-submit{width:100%}}

.exact-summary-after strong.negative{color:#d92d20 !important;}

/* V15 Admin: manage organization units */
.exact-admin-button{cursor:pointer;font-family:inherit;background:#fbf6ff}.exact-admin-button:hover{background:#f4eaff;border-color:#d8b4fe}
.modal-head-actions{display:flex;align-items:center;gap:10px}
.org-units-modal{width:min(780px,96vw)}
.org-modal-body{padding-top:14px}
.org-add-form{display:grid;grid-template-columns:145px 1.5fr 1.15fr auto;gap:10px;align-items:end;padding-bottom:12px;border-bottom:1px solid #eef0f3}
.org-add-form label{font-size:12px;margin:0 0 6px}.org-add-button-wrap .btn{min-width:130px;height:44px}
.org-version-note{margin:12px 0;padding:10px 12px;border:1px solid #cbd9ec;background:#f6f9fe;border-radius:12px;color:#55708c;font-size:12px}
.org-list-card{border:1px solid #dfe5ec;border-radius:15px;overflow:hidden;background:#fff}
.org-list-head{display:flex;justify-content:space-between;align-items:center;padding:11px 14px;border-bottom:1px solid #e6ebf0;background:#fafbfd;font-size:13px}.org-list-head span{color:#667085}
.org-list-scroll{max-height:390px;overflow:auto}
.org-list-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;border-bottom:1px solid #eef1f4}.org-list-row:last-child{border-bottom:0}.org-list-row.inactive{opacity:.52;background:#fafafa}
.org-list-main{display:flex;align-items:center;gap:10px;min-width:0}.org-list-main strong{font-size:13px;display:block}.org-type-chip{display:inline-flex;align-items:center;justify-content:center;min-width:64px;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:800}.org-type-chip.department{background:#fff1f2;color:#9f1239}.org-type-chip.division{background:#eef2ff;color:#4338ca}.org-type-chip.work{background:#ecfdf3;color:#047857}
.org-row-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}.org-row-actions form{margin:0}.org-eye{background:#e8fbf2;color:#047857}.org-eye:hover{background:#d8f7e8}
.org-modal-footer{display:flex;justify-content:flex-end;gap:8px;padding:10px 20px 16px;border-top:1px solid #eef0f3;background:#fff}
.org-edit-modal{width:min(520px,94vw)}
@media(max-width:900px){.org-add-form{grid-template-columns:1fr 1fr}.org-add-button-wrap .btn{width:100%}.modal-head-actions{flex-wrap:wrap;justify-content:flex-end}}
@media(max-width:600px){.org-add-form{grid-template-columns:1fr}.org-list-row{align-items:flex-start}.org-row-actions{gap:4px}.exact-admin-button{white-space:normal;text-align:center}}

/* v16 procurement review page */
.procurement-toolbar-card{margin-bottom:14px}
.procurement-search-control{width:320px}
.procurement-list-card{border-radius:18px;overflow:hidden}
.procurement-table th:nth-last-child(1), .procurement-table td:nth-last-child(1){white-space:nowrap}
.procurement-table td{vertical-align:middle}
.procurement-action-stack{display:flex;justify-content:center;gap:6px;flex-wrap:wrap}
.proc-btn{border:1px solid transparent;border-radius:9px;padding:6px 11px;font-size:12px;font-weight:800;cursor:pointer}
.proc-btn.approve{background:#0ea5c6;color:#fff}
.proc-btn.approve:hover{filter:brightness(.96)}
.proc-btn.reject{background:#fff1f2;color:#d92d20;border-color:#f5c2c7}
.proc-btn.reject:hover{background:#ffe4e8}
.procurement-footer{align-items:center}
.procurement-pager{display:flex;align-items:center;gap:8px}
.proc-page-btn{width:32px;height:32px;border-radius:10px;border:1px solid #d0d5dd;background:#fff;color:#98a2b3;display:inline-flex;align-items:center;justify-content:center;font-weight:700}
.proc-page-btn.active{background:var(--maroon);border-color:var(--maroon);color:#fff}
.proc-page-btn.disabled{opacity:.7}
@media(max-width:900px){.procurement-search-control{width:100%}.procurement-action-stack{justify-content:flex-start}.procurement-footer{flex-direction:column;align-items:flex-start;gap:10px}}

/* v19 approval popups */
.approval-modal-overlay{position:fixed;inset:0;background:rgba(17,24,39,.48);display:none;align-items:center;justify-content:center;padding:18px;z-index:10020;backdrop-filter:blur(1px)}
.approval-modal-overlay.show{display:flex}
.approval-modal{width:min(480px,96vw);background:#fff;border-radius:18px;box-shadow:0 26px 70px rgba(0,0,0,.28);padding:0 24px 22px;animation:budgetModalIn .16s ease-out}
.approval-modal-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:22px 0 14px;border-bottom:1px solid #e4e7ec;margin-bottom:14px}
.approval-modal-head h3{margin:0 0 4px;font-size:24px;color:#4b5563}.approval-modal-head p{margin:0;color:#667085;font-size:12px}
.approval-modal-close{border:0;background:#f2f4f7;color:#667085;width:34px;height:34px;border-radius:10px;font-size:22px;cursor:pointer}
.approval-modal label{font-size:12px;font-weight:800;margin:12px 0 7px}.approval-modal input{border-radius:5px;height:46px;padding:10px 14px}
.approval-info-box{display:grid;grid-template-columns:1fr;gap:7px;background:#f8fafc;border:1px solid #e4e7ec;border-radius:12px;padding:12px 14px;margin-bottom:10px}
.approval-info-box span{display:block;color:#667085;font-size:10px}.approval-info-box strong{font-size:13px;color:#344054}
.approval-date-note{font-size:10px;color:#b54708;margin-top:6px}
.approval-modal-actions{display:flex;justify-content:center;gap:8px;margin-top:28px}.proc-approve-submit{background:#0891b2}.finance-approve-submit{background:#059669}
.finance-search-control{width:320px}.finance-table td{vertical-align:middle}.finance-proc-ok{font-size:11px;font-weight:800;color:#08728d}.finance-direct{font-size:11px;font-weight:800;color:#7c3aed}
.finance-btn{border:1px solid transparent;border-radius:8px;padding:6px 9px;font-size:11px;font-weight:800;cursor:pointer}.finance-btn.approve{background:#10b981;color:#fff}.finance-btn.reject{background:#fff1f2;color:#d92d20;border-color:#fecdd3}
.finance-refund-preview{display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding:11px 13px;border:1px solid #d1fae5;background:#f0fdf4;border-radius:10px;font-size:12px}.finance-refund-preview strong{color:#047857;font-size:15px}
@media(max-width:600px){.approval-modal{padding:0 18px 18px}.approval-modal-head h3{font-size:20px}.approval-modal-actions{flex-direction:column}.approval-modal-actions .btn{width:100%}.finance-search-control{width:100%}}

/* v20 dashboard redesign */
.dashboard-hero-card{display:flex;justify-content:space-between;gap:24px;align-items:stretch;background:linear-gradient(135deg,#69101f 0%,#5b0d1a 68%,#6c1423 100%);border-radius:24px;padding:24px 28px;color:#fff;box-shadow:0 18px 34px rgba(91,13,26,.18);margin-bottom:18px;position:relative;overflow:hidden}
.dashboard-hero-card::after{content:"";position:absolute;right:-40px;top:-20px;width:180px;height:180px;border-radius:50%;background:rgba(255,255,255,.05);box-shadow:-60px 70px 0 rgba(255,255,255,.03)}
.dashboard-hero-left h1{margin:10px 0 6px;font-size:34px;line-height:1.2;color:#fff}.dashboard-hero-left p{margin:0;color:rgba(255,255,255,.82)}
.dashboard-mini-pills{display:flex;gap:10px;flex-wrap:wrap}.dashboard-mini-pill{display:inline-flex;align-items:center;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.1);font-size:12px;font-weight:700}.dashboard-mini-pill.active{background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.16)}
.dashboard-hero-right{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;gap:18px;min-width:220px;position:relative;z-index:1}.dashboard-refresh-block{text-align:right}.dashboard-refresh-block .label{display:block;font-size:12px;color:rgba(255,255,255,.78);margin-bottom:4px}.dashboard-refresh-block strong{font-size:20px;color:#fff}.dashboard-refresh-btn{background:#fff;border-color:#fff;color:#5b0d1a}
.dashboard-year-filter{display:grid;grid-template-columns:50px minmax(0,1fr) auto;align-items:center;gap:12px;min-width:300px;padding:12px 14px;border-radius:22px;border:1px solid rgba(255,255,255,.14);background:linear-gradient(180deg,rgba(255,255,255,.17) 0%,rgba(255,255,255,.08) 100%);box-shadow:0 18px 36px rgba(18,18,18,.10);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.dashboard-year-filter-icon{width:50px;height:50px;display:flex;align-items:center;justify-content:center;border-radius:16px;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);box-shadow:0 14px 28px rgba(16,24,40,.12);padding:7px}
.dashboard-year-filter-icon .menu-flat-icon{width:100%;height:100%;display:block}
.dashboard-year-filter-copy{display:flex;flex-direction:column;min-width:0}
.dashboard-year-filter-eyebrow{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.68);margin-bottom:4px}
.dashboard-year-filter-copy label{font-size:13px;font-weight:800;color:#fff;line-height:1.2}
.dashboard-year-filter-select-shell{position:relative;display:flex;align-items:center}
.dashboard-year-filter-select-shell select{appearance:none;-webkit-appearance:none;-moz-appearance:none;min-width:116px;height:48px;padding:0 42px 0 14px;border-radius:15px;border:1px solid rgba(255,255,255,.22);background:#fff;color:#344054;font-size:15px;font-weight:800;box-shadow:0 12px 24px rgba(16,24,40,.10);cursor:pointer;transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease}
.dashboard-year-filter-select-shell select:hover{transform:translateY(-1px);box-shadow:0 15px 28px rgba(16,24,40,.14)}
.dashboard-year-filter-select-shell select:focus{outline:none;border-color:#f7c3ce;box-shadow:0 0 0 4px rgba(255,255,255,.12),0 14px 26px rgba(16,24,40,.14)}
.dashboard-year-filter-chevron{position:absolute;right:14px;pointer-events:none;color:#667085;display:inline-flex;align-items:center;justify-content:center}
.dashboard-year-filter-chevron .ui-icon{width:16px;height:16px;transform:rotate(90deg)}
.dashboard-kpi-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:16px}.dashboard-kpi-card{background:#fff;border:1px solid #d8e2ea;border-radius:18px;padding:16px 18px;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;box-shadow:0 10px 24px rgba(16,24,40,.04)}
.dashboard-kpi-card .label{font-size:12px;color:#667085;margin-bottom:6px}.dashboard-kpi-card .value{font-size:18px;font-weight:800;color:#0f172a}.dashboard-kpi-card .value.red{color:#8d1b2b}.dashboard-kpi-card .value.green{color:#059669}.dashboard-kpi-card .value.blue{color:#7c3aed}.dashboard-kpi-card .value.orange{color:#d97706}.dashboard-kpi-card .meta{font-size:11px;color:#98a2b3;margin-top:4px}.kpi-icon{width:44px;height:44px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:700;background:#eef2f6;color:#344054}.kpi-icon.maroon{background:#f8ecf0;color:#7b1222}.kpi-icon.rose{background:#fdf2f3;color:#b42318}.kpi-icon.teal{background:#e9fbf7;color:#0f766e}.kpi-icon.sky{background:#eef3ff;color:#4f46e5}.kpi-icon.gold{background:#fff7e8;color:#b7791f}
.dashboard-main-grid{display:grid;grid-template-columns:1.05fr 1.05fr .9fr;gap:14px;margin-bottom:16px}.dashboard-panel,.dashboard-table-panel{background:#fff;border:1px solid #d8e2ea;border-radius:22px;padding:18px;box-shadow:0 10px 26px rgba(16,24,40,.04)}
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.panel-head h3{margin:0 0 4px;font-size:20px;color:#111827}.panel-head p{margin:0;font-size:12px;color:#98a2b3}.panel-head.compact{margin-bottom:10px}.tag-pill,.live-badge{display:inline-flex;align-items:center;justify-content:center;padding:5px 10px;border-radius:999px;font-size:11px;font-weight:800;border:1px solid #efc7d0;color:#9f1239;background:#fff8fa}.live-badge{border-color:#dcfce7;background:#f0fdf4;color:#16a34a}
.donut-wrap{display:flex;justify-content:center;padding:8px 0 14px}.donut-chart{--p:0;width:230px;height:230px;border-radius:50%;background:conic-gradient(#b2893c calc(var(--p)*1%), #eaf0f4 0);display:flex;align-items:center;justify-content:center;position:relative}.donut-chart::after{content:"";position:absolute;inset:18px;background:#fff;border-radius:50%;box-shadow:inset 0 0 0 1px #eef2f6}.donut-inner{position:relative;z-index:1;text-align:center}.donut-inner strong{display:block;font-size:38px;color:#111827;line-height:1}.donut-inner span{font-size:14px;color:#667085}
.dashboard-progress-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px}.progress-mini{border-radius:12px;padding:10px 12px;text-align:center;font-weight:700}.progress-mini span{display:block;font-size:11px;margin-bottom:4px;color:#8f8f95}.progress-mini strong{font-size:22px}.progress-mini.rose{background:#fbf3f5;color:#8d1b2b}.progress-mini.green{background:#eefaf4;color:#0f766e}
.activity-list{display:flex;flex-direction:column;gap:8px}.activity-item{display:grid;grid-template-columns:34px 1fr auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #edf1f5}.activity-item:last-child{border-bottom:none}.activity-icon{width:28px;height:28px;border-radius:50%;background:#e9f2fb;color:#0369a1;display:flex;align-items:center;justify-content:center;font-weight:900}.activity-title-row{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.activity-status{font-size:11px;font-weight:800;padding:4px 8px;border-radius:999px;white-space:nowrap}.activity-status.ok{background:#ecfdf3;color:#027a48}.activity-status.pending{background:#fff7ed;color:#c2410c}.activity-status.wait{background:#eff6ff;color:#1d4ed8}.activity-status.warn{background:#fff1f2;color:#d92d20}.activity-meta{font-size:12px;color:#98a2b3;margin-top:2px}.activity-amount{font-size:12px;font-weight:800;color:#0f172a;white-space:nowrap}
.follow-list{display:flex;flex-direction:column;gap:10px;margin:8px 0 12px}.follow-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px;border:1px solid #e4edf5;border-radius:14px;background:#fcfdff}.follow-item strong{display:block;font-size:14px;color:#111827}.follow-item span{display:block;font-size:11px;color:#98a2b3;margin-top:3px}.follow-item b{font-size:22px;color:#111827}.follow-item.ok{border-color:#d1fadf;background:#f6fef9}.follow-item.ok b{color:#039855}.follow-item.warn{border-color:#fecdca;background:#fffafa}.follow-item.warn b{color:#d92d20}.follow-footer-link{display:block;text-align:center;padding:11px 12px;border:1px solid #d5e0e8;border-radius:12px;color:#0f4c81;background:#f8fbff;font-weight:700;text-decoration:none}
.summary-table-tools{display:flex;gap:10px;align-items:center}.dashboard-summary-search{width:240px}.dashboard-table-panel .panel-head p{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;background:#ecfdf3;color:#16a34a;font-weight:800;margin-top:6px;max-width:max-content}.percent-pill{display:inline-flex;min-width:70px;justify-content:center;padding:5px 10px;border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;font-weight:700}
#dashboardBudgetTable tfoot th{background:#fffaf9;font-weight:800;border-top:2px solid #e6bec8}

@media (max-width: 1200px){.dashboard-kpi-grid{grid-template-columns:repeat(3,1fr)}.dashboard-main-grid{grid-template-columns:1fr}.dashboard-summary-search{width:200px}}
@media (max-width: 760px){.dashboard-hero-card{flex-direction:column}.dashboard-hero-right{align-items:flex-start}.dashboard-year-filter{min-width:0;width:100%;grid-template-columns:46px minmax(0,1fr) auto}.dashboard-year-filter-icon{width:46px;height:46px;border-radius:14px}.dashboard-year-filter-select-shell{width:100%}.dashboard-year-filter-select-shell select{min-width:0;width:100%}.dashboard-kpi-grid{grid-template-columns:1fr 1fr}.dashboard-kpi-card{padding:14px}.dashboard-hero-left h1{font-size:28px}.donut-chart{width:190px;height:190px}.donut-inner strong{font-size:30px}.summary-table-tools{width:100%;flex-direction:column;align-items:stretch}.dashboard-summary-search{width:100%}}
@media (max-width: 520px){.dashboard-kpi-grid{grid-template-columns:1fr}.dashboard-progress-cards{grid-template-columns:1fr}}

/* ===== V21 responsive / visual polish ===== */
html{scroll-behavior:smooth}
body{min-width:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img,svg,video{max-width:100%;height:auto}
.container{width:min(100%,1320px)}
.nav a.active{background:var(--maroon);color:#fff;box-shadow:0 6px 16px rgba(123,18,34,.16)}
.table-wrap{-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.table-wrap table{min-width:760px}
button,input,select,textarea{font-family:inherit}
.btn,.icon-btn,.proc-btn,.finance-btn{touch-action:manipulation}
.card,.plan-budget-table-card,.dashboard-panel,.dashboard-table-panel{overflow:hidden}
.alert{box-shadow:0 6px 16px rgba(16,24,40,.05)}

@media(max-width:960px){
  .container{margin:16px auto;padding:0 12px}
  .topbar{padding:12px 14px;gap:10px}
  .brand-title{font-size:14px}.brand-subtitle{font-size:11px}
  .brand-badge{width:38px;height:38px;border-radius:12px}
  .userbox{gap:8px}.user-avatar{width:34px;height:34px}.logout-link{padding:7px 10px}
  .nav{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;padding:8px 12px;gap:7px;scrollbar-width:thin;position:sticky;top:0;z-index:50;box-shadow:0 4px 14px rgba(16,24,40,.05)}
  .nav a{white-space:nowrap;flex:0 0 auto;padding:9px 12px;font-size:13px}
  .overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .plan-toolbar-card{padding:14px 15px}.plan-toolbar-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.plan-toolbar-actions .search-control{grid-column:1/-1;width:100%}.plan-toolbar-actions .btn{width:100%}
  .row{grid-template-columns:1fr}
  .budget-detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .budget-detail-head{margin:-16px -12px 0;padding:14px 15px}
  .dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-main-grid{grid-template-columns:1fr}
}

@media(max-width:640px){
  body{font-size:14px}
  input,select,textarea{font-size:16px}
  .container{margin:12px auto;padding:0 10px}
  .topbar{align-items:stretch}.brand-wrap{min-width:0}.brand-wrap>div:last-child{min-width:0}.brand-title,.brand-subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .userbox{display:grid;grid-template-columns:auto 1fr auto;width:100%;align-items:center}.logout-link{justify-self:end}
  .page-head{align-items:stretch}.page-head .btn{width:100%}
  .overview-grid,.grid,.dashboard-kpi-grid,.budget-detail-summary{grid-template-columns:1fr}
  .overview-card,.stat-card{padding:14px;border-radius:15px}.overview-card .value,.stat-card .value,.kpi{font-size:22px}
  .card{padding:14px;border-radius:15px}
  .plan-toolbar-card{border-radius:15px}.plan-toolbar-actions{grid-template-columns:1fr}.plan-toolbar-actions .search-control{grid-column:auto}.search-control{width:100%}
  .budget-modal,.approval-modal,.org-units-modal{width:100%!important;max-width:none!important;border-radius:18px;max-height:calc(100dvh - 12px)}
  .modal-overlay,.approval-modal-overlay{padding:6px;align-items:flex-end}
  .modal-head,.approval-modal-head{padding:16px 16px 12px}.modal-body,.approval-modal-body{padding-left:16px;padding-right:16px}
  .exact-cut-card{border-radius:18px;padding:18px 14px}.exact-cut-head{align-items:flex-start;flex-direction:column}.exact-admin-pill{white-space:normal}
  .exact-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:8px}.exact-summary-grid strong{font-size:13px}
  .exact-summary-after{font-size:12px}.exact-summary-after strong{font-size:13px}
  .exact-modal-actions,.approval-modal-actions{display:grid;grid-template-columns:1fr;gap:8px}.exact-modal-actions .btn,.exact-modal-actions .exact-submit,.approval-modal-actions .btn{width:100%}
  .org-add-form{grid-template-columns:1fr!important}.org-add-button-wrap{align-self:stretch}.org-add-button-wrap .btn{width:100%}
  .org-list-row{align-items:flex-start!important;gap:10px}.org-row-actions{flex-wrap:wrap;justify-content:flex-end}
  .dashboard-hero-card{padding:18px;border-radius:18px}.dashboard-hero-left h1{font-size:24px}.dashboard-hero-right{min-width:0;width:100%;align-items:stretch}.dashboard-year-filter{grid-template-columns:1fr;gap:10px;padding:14px}.dashboard-year-filter-icon{display:none}.dashboard-year-filter-copy{gap:3px}.dashboard-year-filter-select-shell select{height:46px}.dashboard-refresh-block{text-align:left}.dashboard-refresh-btn{width:100%}
  .dashboard-kpi-card{padding:13px;border-radius:15px}.dashboard-panel,.dashboard-table-panel{padding:14px;border-radius:17px}.panel-head{flex-direction:column;align-items:stretch}.panel-actions{align-self:flex-start}
  .donut-chart{width:170px;height:170px}.donut-inner strong{font-size:28px}.dashboard-progress-cards{grid-template-columns:1fr}
  .activity-item{grid-template-columns:30px 1fr}.activity-amount{grid-column:2;text-align:left}.activity-title-row{flex-direction:column;gap:5px}.activity-status{align-self:flex-start}
  .detail-table-footer,.procurement-footer{flex-direction:column;align-items:flex-start;gap:9px}
  .form-actions{display:grid;grid-template-columns:1fr}.form-actions .btn{width:100%}
  footer{padding:22px 10px;font-size:12px}
}

@media(max-width:390px){
  .nav a{font-size:12px;padding:8px 10px}.nav-badge{min-width:18px;height:18px;font-size:10px}
  .exact-summary-grid{grid-template-columns:1fr}
}
.health-list{padding:8px}.health-row{display:grid;grid-template-columns:38px 1fr;gap:12px;align-items:center;padding:13px 12px;border-bottom:1px solid #eef2f6}.health-row:last-child{border-bottom:0}.health-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:900}.health-row.ok .health-icon{background:#ecfdf3;color:#027a48}.health-row.warning .health-icon{background:#fff7ed;color:#c2410c}.health-row.error .health-icon{background:#fff1f2;color:#d92d20}
.proc-page-btn:disabled{opacity:.4;cursor:not-allowed;background:#f8fafc;color:#98a2b3}

/* v22 completion workflow */
.nav-badge.return-badge{background:#7c3aed;box-shadow:0 2px 8px rgba(124,58,237,.25)}
.proc-btn.return,.finance-btn.return{background:#fff7ed;color:#c2410c;border:1px solid #fed7aa}
.proc-btn.return:hover,.finance-btn.return:hover{background:#ffedd5}
.warning-box{white-space:pre-wrap}
@media(max-width:760px){.procurement-action-stack{display:grid;grid-template-columns:1fr}.procurement-action-stack>*{width:100%}.procurement-action-stack form button,.procurement-action-stack>button{width:100%}}

/* v25 pretty delete confirmation modal */
.confirm-modal-overlay{position:fixed;inset:0;background:rgba(15,23,42,.48);backdrop-filter:blur(6px);display:none;align-items:center;justify-content:center;padding:20px;z-index:1200}
.confirm-modal-overlay.show{display:flex}
.confirm-modal-card{width:min(100%,640px);background:#fff;border-radius:26px;box-shadow:0 28px 60px rgba(15,23,42,.24);border:1px solid #ead9df;overflow:hidden;animation:confirmPop .18s ease-out}
@keyframes confirmPop{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
.confirm-modal-head{display:flex;align-items:flex-start;justify-content:space-between;padding:22px 24px 0}.confirm-modal-icon{width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,#fff1f2,#ffe4e6);display:flex;align-items:center;justify-content:center;font-size:28px;box-shadow:inset 0 0 0 1px #fecdd3}
.confirm-modal-close{border:none;background:#f8fafc;color:#98a2b3;width:42px;height:42px;border-radius:14px;font-size:28px;cursor:pointer;line-height:1}.confirm-modal-close:hover{background:#eef2f6;color:#344054}
.confirm-modal-body{padding:8px 24px 10px}.confirm-modal-body h3{margin:8px 0 6px;font-size:28px;color:#6b1020}.confirm-modal-subtitle{margin:0 0 18px;color:#667085;line-height:1.65}
.confirm-target-box{padding:16px 18px;border-radius:18px;background:linear-gradient(135deg,#fff8fa,#fff1f4);border:1px solid #f2ccd6;margin-bottom:14px}.confirm-target-box span{display:block;font-size:12px;color:#9f1239;margin-bottom:6px;font-weight:700}.confirm-target-box strong{display:block;font-size:22px;color:#6b1020;line-height:1.3}.confirm-target-box small{display:block;margin-top:4px;color:#8b7280;font-size:13px}
.confirm-impact-box{padding:16px 18px;border-radius:18px;background:#fbfdff;border:1px solid #dce8f1}.confirm-impact-head{font-weight:800;color:#0f172a;margin-bottom:10px}.confirm-impact-box ul{margin:0;padding-left:20px;color:#475467}.confirm-impact-box li{margin:7px 0;line-height:1.55}.confirm-impact-box strong{color:#7a1627}
.confirm-warning-box{margin-top:14px;padding:13px 15px;border-radius:14px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-weight:700}
.confirm-modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px 24px}.btn.danger{background:linear-gradient(135deg,#9f1239,#7f102e);border-color:#7f102e;color:#fff;box-shadow:0 10px 20px rgba(127,16,46,.22)}.btn.danger:hover{filter:brightness(.98)}
@media(max-width:640px){.confirm-modal-card{border-radius:22px}.confirm-modal-head{padding:18px 18px 0}.confirm-modal-body{padding:8px 18px 10px}.confirm-modal-body h3{font-size:24px}.confirm-target-box strong{font-size:18px}.confirm-modal-actions{padding:14px 18px 18px;flex-direction:column-reverse}.confirm-modal-actions .btn{width:100%;justify-content:center}}

/* v27 users page redesign */
.users-hero-card{display:flex;justify-content:space-between;align-items:stretch;gap:20px;background:linear-gradient(135deg,#671120 0%,#7b1222 60%,#8f1630 100%);border-radius:24px;padding:24px 28px;color:#fff;box-shadow:0 16px 36px rgba(91,13,26,.18);margin-bottom:16px;position:relative;overflow:hidden}
.users-hero-card::after{content:"";position:absolute;right:-30px;top:-25px;width:170px;height:170px;border-radius:50%;background:rgba(255,255,255,.06);box-shadow:-45px 85px 0 rgba(255,255,255,.03)}
.users-hero-content{position:relative;z-index:1;max-width:760px}.users-hero-content h1{margin:10px 0 8px;font-size:34px;line-height:1.2;color:#fff}.users-hero-content p{margin:0;color:rgba(255,255,255,.84)}
.users-hero-pills{display:flex;flex-wrap:wrap;gap:10px}.users-hero-pill{display:inline-flex;align-items:center;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.1);font-size:12px;font-weight:800}.users-hero-pill.active{background:rgba(255,255,255,.18)}
.users-hero-side{display:flex;align-items:flex-start;position:relative;z-index:1}.users-hero-stat{min-width:220px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:20px;padding:18px 18px 16px;backdrop-filter:blur(4px)}.users-hero-stat span{display:block;font-size:12px;color:#f8dfe4;margin-bottom:8px}.users-hero-stat strong{display:block;font-size:40px;line-height:1;color:#fff}.users-hero-stat small{display:block;margin-top:7px;color:#ffe9ee}
.users-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.users-stat-card{background:#fff;border:1px solid #dbe4eb;border-radius:20px;padding:16px 18px;box-shadow:0 10px 24px rgba(16,24,40,.04);display:flex;align-items:flex-start;gap:12px}.users-stat-icon{width:44px;height:44px;border-radius:14px;background:#f8ecf0;color:#7b1222;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:20px;flex:0 0 44px}.users-stat-icon.green{background:#e8f7ef;color:#0f8a5f}.users-stat-icon.orange{background:#fff3d6;color:#b54708}.users-stat-label{font-size:12px;color:#667085;margin-bottom:6px}.users-stat-value{font-size:28px;font-weight:800;color:#111827}.text-green{color:#0f8a5f}.text-orange{color:#b54708}.users-stat-card.role-card{display:block}.users-role-pills{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.role-pill{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#f7f8fb;border:1px solid #e4e7ec;color:#344054;font-size:12px;font-weight:800}
.users-layout-grid{display:grid;grid-template-columns:minmax(340px,1fr) minmax(420px,1.15fr);gap:16px;align-items:start}.users-form-card,.users-list-card{border-radius:22px;padding:22px}.users-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.users-card-head-stack{align-items:flex-start}.users-card-badge{display:inline-flex;align-items:center;justify-content:center;padding:7px 12px;border-radius:999px;background:#fff4f6;border:1px solid #f2ccd6;color:#9f1239;font-size:11px;font-weight:800;white-space:nowrap}
.users-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.users-form .helper{line-height:1.5}.users-role-guide{margin-top:16px;padding:16px;border:1px solid #e7eef5;background:#fbfdff;border-radius:18px}.users-role-guide-title{font-weight:800;color:#111827;margin-bottom:10px}.users-role-guide-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.users-role-guide-grid>div{background:#fff;border:1px solid #e9eef4;border-radius:14px;padding:12px}.users-role-guide-grid strong{display:block;color:#7b1222;margin-bottom:4px}.users-role-guide-grid span{display:block;font-size:12px;color:#667085;line-height:1.55}
.users-list-tools{display:flex;align-items:center;gap:10px}.users-search-control{width:290px}.users-table-wrap{border-radius:18px}.users-table th{background:#f5f8fb;color:#475467}.users-table td{vertical-align:middle}.user-identity-cell{display:flex;align-items:center;gap:12px;min-width:220px}.user-initial{width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,#f8ecf0,#fdeff2);color:#7b1222;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px;flex:0 0 44px;border:1px solid #f1d2d9}.user-secondary{font-size:12px;color:#667085}.users-action-stack{display:flex;flex-direction:column;gap:8px;min-width:255px}.users-action-form,.users-reset-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.users-reset-form input{min-width:130px;flex:1}.users-reset-form .btn,.users-action-form .btn{white-space:nowrap}

@media(max-width:1180px){.users-stat-grid{grid-template-columns:repeat(2,1fr)}.users-layout-grid{grid-template-columns:1fr}.users-search-control{width:240px}}
@media(max-width:760px){.users-hero-card{flex-direction:column;padding:20px}.users-hero-content h1{font-size:28px}.users-hero-stat{min-width:0;width:100%}.users-stat-grid,.users-form-grid,.users-role-guide-grid{grid-template-columns:1fr}.users-form-card,.users-list-card{padding:16px}.users-card-head{flex-direction:column;align-items:stretch}.users-search-control{width:100%}.users-action-stack{min-width:0}.users-action-form,.users-reset-form{flex-direction:column;align-items:stretch}.user-identity-cell{min-width:180px}}

/* v28 user management clean style */
.users-clean-shell{display:flex;flex-direction:column;gap:16px}.users-clean-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 18px;border-radius:18px}.users-clean-title h2{margin:0 0 4px;font-size:20px}.users-clean-title p{margin:0;color:#667085;font-size:13px}.users-clean-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.users-clean-search{width:260px}.users-add-btn,.users-purple-btn{background:linear-gradient(135deg,#7c3aed,#8b5cf6);color:#fff;border:none}.users-add-btn:hover,.users-purple-btn:hover{filter:brightness(.98)}
.users-clean-table{padding:0;border-radius:18px;overflow:hidden}.users-clean-table-el th{background:#f3f6f9;color:#475467;font-size:13px;font-weight:800}.users-clean-table-el td{font-size:14px}.users-clean-table-el td strong{color:#111827}.users-clean-table-el tbody tr:hover{background:#fafbfd}.role-chip{display:inline-flex;align-items:center;padding:5px 10px;border-radius:8px;font-size:12px;font-weight:800;border:1px solid transparent}.role-chip.planner{background:#fff1f2;color:#9f1239;border-color:#f7cdd4}.role-chip.disburser{background:#ecfdf3;color:#027a48;border-color:#a6f4c5}.role-chip.admin{background:#f5f3ff;color:#7c3aed;border-color:#d9ccff}.role-chip.procurement{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.users-icon-actions{display:flex;justify-content:center;gap:8px;align-items:center}.users-icon-actions .inline-form{display:inline-flex;margin:0}.users-icon-actions .icon-btn{width:32px;height:32px;border-radius:9px}.users-icon-actions .icon-btn.disabled{background:#eef2f6;color:#98a2b3;cursor:not-allowed}.text-center{text-align:center}
.users-modal-card{width:min(100%,680px)}.users-modal-form{margin-top:6px}.users-modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.users-modal-grid.single{grid-template-columns:1fr}
@media(max-width:900px){.users-clean-head{flex-direction:column;align-items:stretch}.users-clean-tools{justify-content:stretch}.users-clean-search{width:100%}.users-add-btn{width:100%;justify-content:center}}
@media(max-width:700px){.users-modal-grid{grid-template-columns:1fr}.users-clean-table{padding:0}.users-clean-table-el th,.users-clean-table-el td{padding:10px 8px;font-size:13px}.users-icon-actions{justify-content:flex-start}}

/* v29 edit user modal */
.users-edit-banner{padding:13px 15px;border-radius:15px;background:#f8f5ff;border:1px solid #e5dbff;margin-bottom:14px}.users-edit-banner span{display:block;font-size:11px;color:#7c3aed;margin-bottom:4px;font-weight:800}.users-edit-banner strong{display:block;color:#4c1d95;font-size:16px}.users-password-section{margin-top:16px;padding:15px;border-radius:16px;background:#fbfdff;border:1px solid #e2e8f0}.users-password-head{margin-bottom:10px}.users-password-head strong{display:block;color:#111827}.users-password-head span{display:block;color:#667085;font-size:12px;margin-top:4px}.users-self-note{margin-top:14px;padding:12px 14px;border-radius:14px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-size:12px;line-height:1.6}.users-modal-card select:disabled{background:#f2f4f7;color:#98a2b3;cursor:not-allowed}

/* v30 audit logs compact design */
.audit-clean-shell{display:flex;flex-direction:column;gap:14px}.audit-toolbar-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-radius:18px;margin-bottom:0}.audit-toolbar-title h2{margin:0 0 4px;font-size:19px;color:#111827}.audit-toolbar-title p{margin:0;font-size:12px;color:#667085}.audit-search-control{width:300px}
.audit-table-card{padding:0;border-radius:18px;overflow:hidden}.audit-table-wrap{border:0;border-radius:0}.audit-clean-table{table-layout:fixed}.audit-clean-table th{background:#f3f5f7;color:#344054;font-size:12px;font-weight:800;letter-spacing:.02em;padding:13px 14px}.audit-clean-table td{padding:13px 14px;vertical-align:middle;font-size:13px}.audit-clean-table th:nth-child(1),.audit-clean-table td:nth-child(1){width:16%}.audit-clean-table th:nth-child(2),.audit-clean-table td:nth-child(2){width:25%}.audit-clean-table th:nth-child(3),.audit-clean-table td:nth-child(3){width:43%}.audit-clean-table th:nth-child(4),.audit-clean-table td:nth-child(4){width:16%}.audit-clean-table tbody tr:hover{background:#fbfcfd}.audit-time-cell{color:#475467;font-variant-numeric:tabular-nums;white-space:nowrap}.audit-action-code{font-weight:800;color:#8b1022;overflow-wrap:anywhere}.audit-detail-cell{color:#1f2937;line-height:1.5}.audit-user-cell strong{display:block;color:#111827}.audit-user-cell span{display:block;color:#98a2b3;font-size:11px;margin-top:2px}.audit-table-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:#fbfcfd;border-top:1px solid #e4e7ec;color:#667085;font-size:12px}.audit-table-footer strong{color:#344054}
@media(max-width:800px){.audit-toolbar-card{flex-direction:column;align-items:stretch}.audit-search-control{width:100%}.audit-clean-table{min-width:760px}.audit-table-footer{flex-direction:column;align-items:flex-start}}


/* v34 beautify budget detail page */
.budget-hero-card{background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%);border:1px solid #dbe5ee;border-radius:24px;box-shadow:0 18px 40px rgba(16,24,40,.08);overflow:hidden;margin-bottom:18px}.budget-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;background:linear-gradient(135deg,#f8fbff 0%,#fff 70%);border-bottom:1px solid #e7edf4;margin:0;padding:20px 22px 16px;position:static;top:auto}.budget-detail-title h2{font-size:28px;line-height:1.2;margin:0 0 6px;color:#101828}.budget-detail-sub{font-size:13px;color:#667085}.budget-folder-icon{width:52px;height:52px;border-radius:16px;background:linear-gradient(135deg,#eaf6ff,#dff2fb);color:#0d7490;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}.budget-meta-pills{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.budget-meta-pill{display:inline-flex;align-items:center;padding:7px 12px;border-radius:999px;background:#fff;border:1px solid #e4e7ec;color:#475467;font-size:12px;font-weight:700;box-shadow:0 6px 14px rgba(16,24,40,.04)}.budget-detail-actions{display:flex;align-items:center;gap:10px}.budget-detail-actions .btn.ghost{background:#fff;border-color:#d8dde6;box-shadow:0 8px 18px rgba(16,24,40,.05)}.detail-close-btn{width:42px;height:42px;border-radius:14px;background:#f4f7fb;border:1px solid #e4e7ec;color:#667085;box-shadow:0 8px 16px rgba(16,24,40,.05)}
.budget-detail-summary-pretty{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;background:transparent;margin:0;padding:0 22px 22px;border-bottom:0}.detail-stat{display:flex;align-items:flex-start;gap:12px;background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:15px 16px;min-height:92px;box-shadow:0 12px 26px rgba(16,24,40,.05);position:relative;overflow:hidden}.detail-stat:before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:currentColor;opacity:.16}.detail-stat .detail-stat-icon{width:38px;height:38px;flex:0 0 38px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;background:#f8fafc;color:inherit;border:1px solid rgba(0,0,0,.05)}.detail-stat .detail-stat-body{display:flex;flex-direction:column;gap:4px;min-width:0}.detail-stat span{display:block;color:#667085;font-size:11px;margin:0}.detail-stat strong{font-size:22px;line-height:1.15;letter-spacing:-.02em}.detail-stat small{display:block;color:#98a2b3;font-size:11px;line-height:1.35}.detail-stat.blue{color:#1769d1}.detail-stat.red{color:#9d1830}.detail-stat.purple{color:#7c3aed}.detail-stat.teal{color:#008b83}.detail-stat.green{color:#039855}.detail-stat.orange{color:#d46a00}.detail-stat.soft{background:linear-gradient(180deg,#fff,#fcfdff)}
.card-lifted{background:#fff;border:1px solid #e3e8ef;border-radius:22px;box-shadow:0 18px 36px rgba(16,24,40,.06)}.budget-tranche-panel{padding:18px 18px 12px;background:linear-gradient(180deg,#fff,#fcfdff)}.detail-section-head{margin-bottom:14px}.detail-section-head h3{font-size:19px;font-weight:800;color:#101828}.detail-section-head p{font-size:13px;color:#667085}.detail-total-box{min-width:230px;border:1px solid #e7d5d9;border-radius:16px;background:linear-gradient(180deg,#fff,#fffdfd);padding:12px 16px;box-shadow:0 8px 18px rgba(16,24,40,.04)}.detail-total-box span{font-size:12px}.detail-total-box strong{font-size:28px;line-height:1.1}.detail-table-wrap,.plan-table-wrap{border:1px solid #edf1f5;border-radius:16px;overflow:auto}.detail-table th,.detail-project-table th{background:#eef5f9;color:#344054;font-size:12px;font-weight:800;padding:14px 14px}.detail-table td,.detail-project-table td{padding:14px 14px;vertical-align:top}.detail-table tbody tr:nth-child(even),.detail-project-table tbody tr:nth-child(even){background:#fcfdff}.detail-table tbody tr:hover,.detail-project-table tbody tr:hover{background:#f8fbff}.evidence-link{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;background:#fff5f6;border:1px solid #f3c8cf;color:#8a1629;font-size:12px;font-weight:800;text-decoration:none}.evidence-link:hover{background:#fff0f2;text-decoration:none}
.project-detail-toolbar{background:#fff;border:1px solid #e3e8ef;border-radius:20px;padding:16px 18px;box-shadow:0 16px 34px rgba(16,24,40,.05);margin:12px 0}.project-detail-toolbar h3{font-size:19px;color:#101828}.project-detail-toolbar p{font-size:13px;color:#667085}.project-detail-tools{gap:10px}.detail-filter-select{min-width:140px;height:42px;padding:10px 14px;border-radius:14px;border:1px solid #d7dfe8;background:#fff;box-shadow:0 8px 18px rgba(16,24,40,.03)}.detail-search{width:250px}.detail-search input{height:42px}.project-detail-tools .btn{height:42px;border-radius:14px;padding:0 18px;box-shadow:0 10px 20px rgba(125,19,38,.18)}.detail-project-card{overflow:hidden}.detail-project-table td{font-size:13px}.detail-project-table td strong.budget-name-link{color:#8b1022;font-size:14px}.detail-project-table .budget-meta{margin-top:6px}.detail-table-footer{padding:14px 18px;background:#fbfcfd;font-size:12px}
@media(max-width:1350px){.budget-detail-summary-pretty{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:980px){.budget-detail-head{flex-direction:column}.budget-detail-actions{align-self:flex-start}.budget-detail-summary-pretty{grid-template-columns:repeat(2,minmax(0,1fr));padding:0 18px 18px}.budget-detail-title h2{font-size:24px}.detail-total-box strong{font-size:24px}}
@media(max-width:640px){.budget-hero-card{border-radius:18px}.budget-detail-head{padding:16px}.budget-detail-summary-pretty{grid-template-columns:1fr;padding:0 16px 16px}.detail-stat strong{font-size:20px}.project-detail-toolbar,.budget-tranche-panel,.detail-project-card{border-radius:18px}.detail-search,.project-detail-tools,.project-detail-tools .btn,.detail-filter-select{width:100%}.project-detail-tools{display:grid;grid-template-columns:1fr}.budget-meta-pills{gap:6px}}
@media print{.budget-hero-card,.project-detail-toolbar,.budget-tranche-panel,.detail-project-card{box-shadow:none;border:1px solid #ddd}.budget-detail-summary-pretty{padding:0}.detail-stat{box-shadow:none}.budget-detail-actions{display:none}.detail-table th,.detail-project-table th{background:#eef2f6!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* v35 evidence preview popup */
.evidence-popup-btn{border:1px solid #f3c8cf;cursor:pointer;font-family:inherit}.evidence-modal-overlay{z-index:11000;background:rgba(15,23,42,.58);backdrop-filter:blur(6px)}.evidence-modal-card{width:min(980px,96vw);height:min(820px,90vh);background:#fff;border-radius:24px;box-shadow:0 30px 80px rgba(15,23,42,.30);overflow:hidden;display:flex;flex-direction:column;border:1px solid #eadde1;animation:budgetModalIn .16s ease-out}.evidence-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:20px 22px 16px;border-bottom:1px solid #e9edf2;background:linear-gradient(135deg,#fff8fa,#fff 64%)}.evidence-modal-eyebrow{font-size:11px;font-weight:800;color:#9f1239;letter-spacing:.04em;text-transform:uppercase;margin-bottom:5px}.evidence-modal-head h3{margin:0 0 4px;color:#6b1020;font-size:22px}.evidence-modal-head p{margin:0;color:#667085;font-size:12px}.evidence-modal-close{width:42px;height:42px;border:0;border-radius:14px;background:#f4f7fb;color:#98a2b3;font-size:28px;line-height:1;cursor:pointer}.evidence-modal-close:hover{background:#eef2f6;color:#344054}.evidence-modal-body{flex:1;min-height:0;position:relative;background:#f4f6f9;padding:14px;display:flex;align-items:center;justify-content:center}.evidence-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#667085;font-weight:700;background:linear-gradient(180deg,#f8fafc,#f3f6f9)}.evidence-preview-image{max-width:100%;max-height:100%;object-fit:contain;border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.08)}.evidence-preview-frame{width:100%;height:100%;border:0;border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.08)}.evidence-modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 18px;border-top:1px solid #e9edf2;background:#fff}.evidence-modal-actions .btn{min-width:120px}
@media(max-width:700px){.evidence-modal-card{width:100%;height:94vh;border-radius:18px}.evidence-modal-overlay{padding:8px}.evidence-modal-head{padding:16px}.evidence-modal-head h3{font-size:18px}.evidence-modal-body{padding:8px}.evidence-modal-actions{display:grid;grid-template-columns:1fr}.evidence-modal-actions .btn{width:100%}}

/* v36 evidence preview reliability */
.evidence-loading.error{color:#b42318;background:#fff1f2;border:1px solid #fecdd3;border-radius:14px;padding:16px 18px;max-width:620px;text-align:center;line-height:1.65}
.evidence-preview-image{display:block;max-width:100%;max-height:68vh;margin:auto;object-fit:contain;border-radius:12px;box-shadow:0 8px 24px rgba(16,24,40,.08)}
.evidence-preview-frame{width:100%;height:68vh;border:0;background:#fff;border-radius:8px}

/* v37 evidence repair */
.evidence-repair-box{display:flex;gap:14px;align-items:flex-start;max-width:720px;margin:22px auto;padding:18px;border:1px solid #f4c7ce;border-radius:18px;background:#fff7f8;color:#344054}
.evidence-repair-box[hidden]{display:none!important}
.evidence-repair-icon{width:42px;height:42px;flex:0 0 42px;border-radius:14px;background:#fee2e2;color:#b42318;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:900}
.evidence-repair-content{flex:1;min-width:0}
.evidence-repair-content>strong{display:block;color:#8b1022;font-size:16px;margin-bottom:4px}
.evidence-repair-content>p{margin:0 0 12px;color:#667085;font-size:13px;line-height:1.55}
#evidenceRepairForm{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.evidence-repair-file{position:relative;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;margin:0;padding:10px 14px;border-radius:12px;background:#fff;border:1px solid #e2b8c0;color:#8b1022;font-weight:800;cursor:pointer}
.evidence-repair-file input{position:absolute;inset:0;opacity:0;cursor:pointer}
.evidence-repair-name{font-size:12px;color:#667085;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.evidence-repair-submit{background:#8b1022}
.evidence-repair-submit:disabled{opacity:.6;cursor:wait}
.evidence-repair-note{margin-top:8px;color:#98a2b3;font-size:11px}
@media(max-width:640px){.evidence-repair-box{flex-direction:column}.evidence-repair-file,.evidence-repair-submit{width:100%}#evidenceRepairForm{align-items:stretch}.evidence-repair-name{max-width:100%}}

/* v41 project table: move unit under project name */
.project-name-stack{display:flex;flex-direction:column;gap:5px;min-width:190px}.project-unit-meta{font-size:11px;color:#98a2b3;line-height:1.45}.detail-project-table td:nth-child(2){min-width:220px}.detail-project-table td:nth-child(2) .budget-name-link{display:block;line-height:1.45}.detail-project-table th:nth-child(2){min-width:220px}
@media(max-width:760px){.project-name-stack{min-width:180px}.detail-project-table td:nth-child(2),.detail-project-table th:nth-child(2){min-width:190px}}

/* v45 project table alignment */
.detail-project-table th.center,.detail-project-table td.center{text-align:center;vertical-align:middle}
.detail-project-table td.center .budget-meta{margin-top:6px;text-align:center}
.plan-type-meta{margin-top:5px;font-size:11px;font-weight:500;color:#667085;line-height:1.35;text-align:right}
@media(max-width:760px){.plan-type-meta{font-size:10px}}

.status-date-meta{margin-top:6px;font-size:11px;color:#667085;font-weight:700;white-space:nowrap}


/* v49 finance approval success popup */
.finance-success-overlay{position:fixed;inset:0;background:rgba(15,23,42,.52);backdrop-filter:blur(5px);display:none;align-items:center;justify-content:center;padding:20px;z-index:1500}.finance-success-overlay.show{display:flex}.finance-success-card{width:min(100%,430px);background:#fff;border-radius:24px;padding:26px 28px 24px;text-align:center;box-shadow:0 28px 70px rgba(15,23,42,.28);border:1px solid #e5e7eb;animation:financeSuccessPop .18s ease-out}.finance-success-check{width:76px;height:76px;border-radius:50%;margin:0 auto 16px;display:flex;align-items:center;justify-content:center;border:3px solid #86efac;background:#f0fdf4;color:#16a34a;font-size:38px;font-weight:900}.finance-success-card h3{margin:0 0 8px;font-size:30px;color:#1f2937}.finance-success-message{margin:0;color:#667085;font-size:14px;line-height:1.65}.finance-success-message strong{color:#8b1022}.finance-success-detail{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0;text-align:left}.finance-success-detail>div{padding:11px 12px;border-radius:14px;background:#f8fafc;border:1px solid #e5e7eb}.finance-success-detail span{display:block;font-size:11px;color:#98a2b3;margin-bottom:4px}.finance-success-detail strong{display:block;font-size:13px;color:#344054;line-height:1.4}.finance-success-close{width:100%;background:#8b1022;border-color:#8b1022;color:#fff;justify-content:center}@keyframes financeSuccessPop{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}@media(max-width:520px){.finance-success-card{padding:22px 18px 18px;border-radius:20px}.finance-success-detail{grid-template-columns:1fr}.finance-success-card h3{font-size:26px}}

/* v50 finance approval note */
.finance-approval-modal textarea{width:100%;min-height:92px;resize:vertical;border:1px solid #d0d5dd;border-radius:12px;padding:12px 14px;font:inherit;background:#fff;color:#101828}.finance-approval-modal textarea:focus{outline:none;border-color:#8b1730;box-shadow:0 0 0 3px rgba(139,23,48,.10)}.approval-note-help{margin-top:6px;margin-bottom:12px;color:#98a2b3;font-size:11px;line-height:1.45}.finance-success-note{grid-column:1/-1;padding-top:10px;border-top:1px dashed #dfe5ec}.finance-success-note strong{font-weight:600;line-height:1.5}

/* v51 finance note status popup */
.status-note-btn{border:0;cursor:pointer;font:inherit;display:inline-flex;align-items:center;gap:5px}.status-note-btn:hover{filter:brightness(.97);box-shadow:0 0 0 3px rgba(16,185,129,.10)}.note-dot{font-size:8px;color:#f59e0b;line-height:1}.finance-note-overlay{z-index:1400}.finance-note-modal{width:min(560px,94vw);border-radius:24px;overflow:hidden;border-top:4px solid #7b1724}.finance-note-kicker{font-size:11px;color:#8b1022;font-weight:800;margin-bottom:3px}.finance-note-body{padding-top:8px}.finance-note-project{font-size:18px;font-weight:800;color:#101828;padding:14px 16px;border-radius:16px;background:#f8fafc;border:1px solid #e5e7eb;margin-bottom:14px}.finance-note-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}.finance-note-meta-grid>div{padding:12px 14px;border-radius:14px;border:1px solid #e4e7ec;background:#fff}.finance-note-meta-grid span{display:block;color:#667085;font-size:11px;margin-bottom:4px}.finance-note-meta-grid strong{font-size:15px;color:#111827}.finance-note-message-box{padding:15px 16px;border-radius:16px;background:#fff8f0;border:1px solid #fed7aa}.finance-note-message-box span{display:block;color:#9a3412;font-size:12px;font-weight:800;margin-bottom:6px}.finance-note-message-box p{margin:0;color:#344054;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.finance-note-actions{justify-content:flex-end}.finance-note-actions .btn{min-width:110px}@media(max-width:600px){.finance-note-meta-grid{grid-template-columns:1fr}.finance-note-actions .btn{width:100%}}



/* v54 finance note: blink only the small note indicator dot */
.status-note-attention{position:relative;animation:none!important}
.status-note-attention:hover{filter:brightness(.97);box-shadow:0 0 0 3px rgba(16,185,129,.10)!important}
.status-note-attention .note-dot{
  width:8px;
  height:8px;
  display:inline-block;
  flex:0 0 8px;
  border-radius:50%;
  background:#ef4444;
  margin-left:3px;
  box-shadow:0 0 0 2px rgba(239,68,68,.14);
  animation:financeNoteDotBlink 1s ease-in-out infinite;
}
@keyframes financeNoteDotBlink{
  0%,100%{opacity:1;transform:scale(1);box-shadow:0 0 0 2px rgba(239,68,68,.14)}
  50%{opacity:.2;transform:scale(.65);box-shadow:0 0 0 5px rgba(239,68,68,.05)}
}
.finance-note-hint,.status-note-attention .note-icon{display:none!important}
@media (prefers-reduced-motion:reduce){
  .status-note-attention{animation:none!important}
  .status-note-attention .note-dot{animation:none!important}
}


/* v55 collapsible budget tranche section */
.tranche-toggle-head{align-items:center}
.tranche-heading-button{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:4px 0;border:0;background:transparent;text-align:left;color:inherit;cursor:pointer}
.tranche-heading-text{display:flex;flex-direction:column;gap:5px;min-width:0}
.tranche-heading-text strong{font-size:19px;color:#101828;line-height:1.25}
.tranche-heading-text small{font-size:13px;color:#667085;line-height:1.45;font-weight:400}
.tranche-toggle-label{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;min-width:48px;padding:6px 10px;border-radius:999px;background:#f8fafc;border:1px solid #dbe3ec;color:#475467;font-size:12px;font-weight:800}
.tranche-toggle-chevron{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:#f4f7fb;border:1px solid #e2e8f0;color:#7b1222;font-size:18px;font-weight:900;transition:transform .18s ease,background .18s ease}
.tranche-heading-button:hover .tranche-toggle-label,.tranche-heading-button:hover .tranche-toggle-chevron{background:#fff1f4;border-color:#f0c8d0;color:#8b1022}
.tranche-heading-button:focus-visible{outline:3px solid rgba(37,99,235,.22);outline-offset:4px;border-radius:12px}
.tranche-collapsible[hidden]{display:none!important}
.budget-tranche-panel.is-collapsed{padding-bottom:18px}
.budget-tranche-panel.is-collapsed .detail-section-head{margin-bottom:0}
@media(max-width:760px){.tranche-toggle-head{align-items:stretch}.tranche-heading-button{width:100%}.tranche-toggle-label{margin-left:0}.tranche-heading-text small{font-size:12px}}


.exact-subfield{
  margin-top:10px;
}
.exact-subfield[hidden]{
  display:none !important;
}
