:root {
    --ink: #12213a;
    --muted: #667085;
    --cream: #f7f9fc;
    --paper: #ffffff;
    --green: #173b67;
    --green-dark: #0c294d;
    --lime: #dce9f8;
    --line: #e7ebf1;
    --amber: #d99a2b;
    --red: #c9584e;
    --blue: #4778a8;
    --navy-soft: #edf3fa;
    --shadow: 0 10px 30px rgba(16, 39, 68, .055);
    --shadow-hover: 0 18px 42px rgba(16, 39, 68, .10);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--cream); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 272px 1fr; transition: grid-template-columns .24s cubic-bezier(.4,0,.2,1); }
.sidebar-collapsed-preload .app-shell { grid-template-columns: 80px 1fr; }
.sidebar-collapsed-preload .sidebar { padding-inline: 12px; }
.sidebar-collapsed-preload .sidebar-label, .sidebar-collapsed-preload .nav-list em, .sidebar-collapsed-preload .logout-button { display: none; }
.sidebar-collapsed-preload .sidebar-brand { padding-inline: 8px; justify-content: center; position: relative; }
.sidebar-collapsed-preload .collapse-button { position: absolute; right: -7px; bottom: -14px; transform: rotate(180deg); }
.sidebar-collapsed-preload .nav-list a, .sidebar-collapsed-preload .nav-group-toggle { justify-content: center; padding-inline: 8px; }
.sidebar-collapsed-preload .nav-submenu { padding-left: 0; }
.sidebar-collapsed-preload .sidebar-user { grid-template-columns: 1fr; justify-items: center; padding-inline: 0; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px; background: #fff; color: var(--ink); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; overflow: hidden; }
.sidebar-brand { display: flex; gap: 12px; align-items: center; padding: 2px 8px 22px; border-bottom: 1px solid var(--line); }
.sidebar-brand > .sidebar-label { display: grid; gap: 2px; min-width: 0; }
.sidebar-brand > .sidebar-label strong { line-height: 1.25; }
.sidebar-brand span, .sidebar-user span { color: var(--muted); font-size: 12px; }
.brand-mark { width: 56px; height: 56px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 20px rgba(23,59,103,.14); }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-mark-small { width: 42px; height: 42px; border-radius: 12px; }
.nav-list { display: grid; gap: 4px; padding: 18px 0; overflow-y: auto; scrollbar-width: thin; }
.nav-list a, .nav-group-toggle { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 13px; padding: 10px 13px; color: #64748b; background: transparent; border: 1px solid transparent; border-radius: 11px; font-size: 14px; cursor: pointer; text-align: left; white-space: nowrap; transition: color .18s ease, background .18s ease, transform .18s ease; }
.nav-list a:hover, .nav-list a.active, .nav-group-toggle:hover { color: var(--green); background: var(--navy-soft); }
.nav-list a:hover { transform: translateX(2px); }
.nav-list a.active { color: #fff; background: linear-gradient(135deg, #204b79, var(--green)); box-shadow: 0 7px 18px rgba(23,59,103,.18); font-weight: 700; }
.nav-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; }
.nav-icon .icon { width: 20px; height: 20px; }
.nav-list em { margin-left: auto; background: var(--amber); color: #1b241f; border-radius: 99px; padding: 2px 7px; font-size: 11px; font-style: normal; font-weight: 800; }
.sidebar-user { margin-top: auto; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 16px 8px 0; border-top: 1px solid var(--line); }
.sidebar-user > div:nth-child(2) { display: grid; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; background: var(--green); color: #fff; border-radius: 50%; font-weight: 800; }
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar { transition: transform .18s ease, box-shadow .18s ease; }
.avatar:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(23,59,103,.24); }
.collapse-button { margin-left: auto; width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; color: var(--green); border-radius: 9px; cursor: pointer; box-shadow: 0 3px 10px rgba(16,39,68,.06); transition: background .18s ease, transform .18s ease; }
.collapse-button:hover { background: var(--navy-soft); }
.collapse-button .icon { width: 17px; height: 17px; }
.nav-group { display: grid; }
.group-chevron { margin-left: auto; }
.group-chevron .icon { width: 15px; height: 15px; transition: transform .18s ease; }
.nav-group.open .group-chevron .icon { transform: rotate(180deg); }
.nav-submenu { display: none; padding: 4px 0 4px 18px; }
.nav-group.open .nav-submenu { display: grid; gap: 3px; }
.nav-submenu a { min-height: 39px; font-size: 13px; }
.sidebar-collapsed { grid-template-columns: 80px 1fr; }
.sidebar-collapsed .sidebar { padding-inline: 12px; }
.sidebar-collapsed .sidebar-label, .sidebar-collapsed .nav-list em, .sidebar-collapsed .logout-button { display: none; }
.sidebar-collapsed .sidebar-brand { padding-inline: 8px; justify-content: center; position: relative; }
.sidebar-collapsed .collapse-button { position: absolute; right: -7px; bottom: -14px; transform: rotate(180deg); }
.sidebar-collapsed .nav-list a, .sidebar-collapsed .nav-group-toggle { justify-content: center; padding-inline: 8px; }
.sidebar-collapsed .nav-submenu { padding-left: 0; }
.sidebar-collapsed .sidebar-user { grid-template-columns: 1fr; justify-items: center; padding-inline: 0; }
.logout-button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; color: var(--muted); background: transparent; border-radius: 8px; cursor: pointer; }
.logout-button:hover { color: var(--green); background: var(--navy-soft); }
.logout-button .icon, .menu-toggle .icon { width: 20px; height: 20px; }
.main-area { min-width: 0; }
.sidebar-backdrop { display: none; }
.topbar { min-height: 84px; display: flex; align-items: center; gap: 16px; padding: 15px 36px; border-bottom: 1px solid rgba(226,231,239,.9); background: rgba(255,255,255,.88); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 22px; margin: 2px 0 0; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-search { width: min(280px, 25vw); }
.topbar-search input { width: 100%; min-height: 42px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(16,39,68,.04); }
.topbar-search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(25,55,95,.1); }
.eyebrow { margin: 0; text-transform: uppercase; color: var(--green); letter-spacing: .13em; font-size: 11px; font-weight: 800; }
.menu-toggle { display: none; }
.page-content { padding: 34px 36px 56px; max-width: 1500px; margin: 0 auto; }
.dashboard-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.dashboard-detail-panel { margin-bottom: 20px; }
.dashboard-row { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.dashboard-row > div { display: grid; gap: 4px; min-width: 0; }
.dashboard-row > div:last-child { text-align: right; }
.dashboard-row strong { color: var(--ink); }
.dashboard-row small { color: var(--muted); }
.text-danger { color: var(--red) !important; font-weight: 700; }
.project-row { align-items: center; }
.project-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.project-summary-card h3 { margin: 7px 0 4px; }
.muted-text { color: var(--muted); margin-top: 0; }
.project-total { display: grid; gap: 4px; margin: 18px 0; padding: 14px; border-radius: 10px; background: var(--navy-soft); }
.project-total small { color: var(--muted); }
.project-total strong { font-size: 20px; color: var(--green); }
.welcome-panel, .page-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.welcome-panel h2, .page-intro h2 { margin: 6px 0; font-family: inherit; font-size: clamp(27px, 3vw, 38px); font-weight: 750; letter-spacing: -.035em; }
.welcome-panel p:last-child, .page-intro p:last-child { color: var(--muted); margin: 0; }
.button { border: 0; border-radius: 10px; min-height: 42px; padding: 11px 18px; font-weight: 700; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: linear-gradient(135deg, #204b79, var(--green)); color: #fff; box-shadow: 0 7px 18px rgba(23,59,103,.18); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { background: var(--navy-soft); color: var(--green-dark); }
.button-danger { color: #9d3027; background: #fff0ee; border: 1px solid #efc4bf; }
.button-danger:hover { background: #ffe3df; }
.icon-button { border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.text-button { color: var(--green); background: transparent; border: 0; font-weight: 750; cursor: pointer; }
.text-button.danger { color: var(--red); }
.history-proof-button { min-height: 34px; padding: 7px 14px; border: 1px solid #d7e2ee; font-size: 12px; white-space: nowrap; box-shadow: none; }
.history-proof-button:hover { border-color: #bdcfe2; box-shadow: 0 6px 14px rgba(16,39,68,.08); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card, .panel, .action-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.stat-card, .action-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.stat-card:hover, .action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #d7e0eb; }
.stat-card { padding: 22px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; inset: auto -18px -28px auto; width: 80px; height: 80px; border-radius: 50%; background: rgba(23,59,103,.035); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.status-dot.green { background: var(--green); } .status-dot.amber { background: var(--amber); } .status-dot.red { background: var(--red); } .status-dot.blue { background: var(--blue); }
.stat-card > .status-dot { position: absolute; top: 22px; right: 20px; }
.stat-card p { color: var(--muted); margin: 0 0 12px; font-size: 13px; }
.stat-card strong { display: block; font-size: 27px; font-weight: 750; letter-spacing: -.03em; }
.stat-card small { display: block; color: var(--muted); margin-top: 8px; }
.content-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.panel { padding: 24px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-heading h3 { margin: 4px 0 0; }
.activity-list > div, .attention-list a { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line); }
.activity-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--navy-soft); color: var(--green); border: 1px solid #dce6f1; }
.activity-icon .icon { width: 20px; height: 20px; }
.activity-list p, .attention-list p { display: grid; flex: 1; margin: 0; }
.activity-list small, .attention-list small { color: var(--muted); margin-top: 3px; }
.activity-list b { font-size: 13px; }
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.action-card { padding: 25px; display: flex; flex-direction: column; align-items: flex-start; }
.action-card > span { width: 50px; height: 50px; display: grid; place-items: center; background: var(--navy-soft); color: var(--green); border: 1px solid #dbe6f2; border-radius: 14px; }
.action-icon { width: 25px; height: 25px; }
.action-card h3 { margin: 18px 0 8px; }
.action-card p { color: var(--muted); line-height: 1.55; flex: 1; margin: 0 0 22px; }
.info-strip { margin-top: 18px; padding: 16px 18px; color: var(--green-dark); background: var(--navy-soft); border: 1px solid #d9e5f2; border-radius: 12px; }
.table-panel { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 15px 13px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: #718096; background: #fbfcfe; font-size: 10px; text-transform: uppercase; letter-spacing: .085em; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #fafcff; }
.pill { padding: 5px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.pill.amber { background: #fff0c9; color: #79520d; }
.pill.green { background:#dcfce7; color:#166534; }
.pill.yellow { background:#fef3c7; color:#92400e; }
.pill.red { background:#fee2e2; color:#991b1b; }
.project-report-grid { align-items: stretch; }
.project-report-card { display: flex; flex-direction: column; gap: 10px; }
.project-report-stat { display:flex; justify-content:space-between; gap:16px; padding:8px 0; border-bottom:1px solid var(--line); }
.project-report-stat span { color:var(--muted); font-size:12px; }
.project-report-card { position:relative; overflow:hidden; box-shadow:0 12px 28px rgba(15,23,42,.08); }
.project-report-card h3 { font-size:20px; margin:2px 0 0; }
.project-report-dates { margin:-8px 0 2px; color:var(--muted); font-size:10px; }
.project-report-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:auto; padding-top:14px; }
.project-report-actions .button { padding:7px 12px; font-size:12px; min-height:34px; }
.progress-history-block { margin-bottom:18px; }
.progress-history-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.progress-history-grid figure { margin:0; padding:8px; border:1px solid var(--line); border-radius:12px; background:var(--surface-muted); }
.progress-history-grid figure { position:relative; }
.progress-photo-number { display:block; margin-bottom:5px; color:var(--muted); font-size:11px; font-weight:750; }
.progress-print-button { display:inline-flex; margin-top:4px; font-size:12px; }
.progress-history-grid img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:8px; }
.progress-history-grid img { cursor:zoom-in; }
.photo-full-view { position:relative; max-width:min(92vw,1100px); max-height:92vh; padding:18px; background:#111827; border-radius:14px; }
.photo-full-view img { display:block; max-width:calc(92vw - 36px); max-height:calc(92vh - 36px); width:auto; height:auto; object-fit:contain; border-radius:8px; }
.photo-full-view .modal-close { position:absolute; top:4px; right:6px; z-index:2; color:#fff; background:rgba(0,0,0,.45); }
.progress-history-grid figcaption { margin-top:5px; color:var(--muted); font-size:11px; }
.progress-photo-entry { position:relative; margin:12px 0; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface-muted); }
.progress-photo-entry h4 { margin:0 0 10px; }
.progress-photo-preview { display:block; width:100%; max-width:340px; aspect-ratio:4/3; object-fit:cover; border-radius:8px; margin:10px 0; }
.progress-photo-entry .text-button { margin-top:8px; }
@media (max-width: 640px) { .progress-history-grid { grid-template-columns:1fr; } }
.pill.blue { background: #e5eef8; color: var(--green); }
.debt-summary { grid-template-columns: repeat(3, 1fr); }
.empty-state { text-align: center; padding: 72px 24px; }
.empty-state > span { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 14px; background: #edf2e5; color: var(--green); border-radius: 50%; font-size: 24px; }
.empty-state p { color: var(--muted); max-width: 520px; margin: 8px auto 22px; }
.empty-state.compact { padding: 55px 24px; }

.login-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 15% 15%, #285887 0, var(--green-dark) 42%, #081d37 100%); padding: 28px; }
.login-shell { width: min(1050px, 100%); display: grid; grid-template-columns: 1.1fr .9fr; background: var(--paper); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.login-brand { color: #fff; padding: 58px; background: linear-gradient(145deg, #204b79, #102f55); }
.login-brand .eyebrow { color: var(--lime); margin-top: 36px; }
.login-brand h1 { margin: 10px 0 18px; font: 500 clamp(36px, 5vw, 58px)/1.02 Georgia, serif; letter-spacing: -.045em; }
.login-brand > p:not(.eyebrow) { color: rgba(255,255,255,.75); line-height: 1.6; max-width: 520px; }
.login-feature { display: flex; gap: 10px; margin-top: 16px; font-size: 14px; }
.login-feature span { color: var(--lime); }
.login-card { padding: 64px 52px; display: flex; flex-direction: column; justify-content: center; }
.login-card h2 { font-size: 31px; font-weight: 750; letter-spacing: -.035em; margin: 7px 0; }
.muted { color: var(--muted); }
.form-stack { display: grid; gap: 18px; margin-top: 24px; }
.form-stack label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.form-stack input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; background: #fff; outline: none; }
.form-stack input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,90,67,.1); }
.alert { padding: 12px 14px; border-radius: 10px; margin-top: 16px; font-size: 13px; }
.alert-error { background: #fae5e2; color: #85352e; }
.alert-success { background: #e4f3ea; color: #235f3a; }
.page-content > .alert { margin: 0 0 20px; }
.data-form { display: none; margin-bottom: 20px; }
.data-form.open { display: block; }
.unit-form { display: none; margin-bottom: 20px; }
.unit-form.open { display: block; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid [hidden] { display: none !important; }
.form-grid label { display: grid; align-content: start; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 750; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; color: var(--ink); outline: none; }
.form-grid label small { color: var(--muted); font-weight: 500; line-height: 1.45; }
.form-grid textarea { min-height: 86px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(25,55,95,.1); }
.field-wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.row-actions { display: flex; align-items: center; gap: 10px; }
.action-icon { width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 5px; color: var(--green); border: 1px solid transparent; border-radius: 8px; }
.action-icon:hover { background: var(--navy-soft); border-color: var(--line); }
.action-icon.danger { color: var(--red); }
.action-icon svg { width: 17px; height: 17px; }
.table-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-actions:empty::after { content: "-"; color: var(--muted); }
.action-complete { color: var(--muted); font-weight: 750; }
.payment-target-card { display: grid; gap: 4px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #d8e3ef; border-radius: 12px; background: var(--navy-soft); }
.payment-target-card span { display: none; }
.payment-target-card strong { color: var(--green-dark); font-size: 18px; }
.payment-target-card small { color: var(--muted); }
.row-actions form { display: inline; }
.pill.gray { background: #eef0f3; color: var(--muted); }
.payment-status-stack { display: grid; justify-items: start; gap: 6px; }
.table-empty { padding: 36px; text-align: center; color: var(--muted); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 20px; }
.pagination-link { min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--green-dark); font-weight: 750; box-shadow: 0 3px 10px rgba(16,39,68,.04); transition: background .18s ease, color .18s ease, border-color .18s ease; }
.pagination-link:hover { border-color: #c5d4e5; background: var(--navy-soft); }
.pagination-link.active { border-color: var(--green); background: var(--green); color: #fff; }
.pagination-link.disabled { opacity: .4; pointer-events: none; }
.pagination-ellipsis { color: var(--muted); padding: 0 3px; }
.report-filter-panel { margin-bottom: 20px; }
.report-filter-grid { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.report-keyword { grid-column: span 2; }
.report-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.report-kpi-grid .stat-card strong { font-size: clamp(19px,2vw,25px); }
.report-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.report-summary-grid .panel { min-width: 0; }
.report-detail-panel, .report-payment-panel { margin-bottom: 20px; }
.report-count { padding: 6px 10px; border-radius: 99px; background: var(--navy-soft); color: var(--green); font-size: 12px; font-weight: 800; }
.report-material-list { min-width: 210px; display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.report-material-list li { display: grid; grid-template-columns: minmax(120px,1fr) auto; gap: 2px 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.report-material-list li:last-child { padding-bottom: 0; border: 0; }
.report-material-list small { grid-column: 1 / -1; color: var(--muted); }
.report-finance-lines { min-width: 195px; display: grid; gap: 5px; }
.report-finance-lines span { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.report-finance-lines strong { color: var(--ink); }
.report-detail-panel td:last-child .pill { display: inline-flex; margin-bottom: 5px; }
.checkbox-field { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.checkbox-field legend { padding: 0 6px; font-size: 13px; font-weight: 750; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.checkbox-grid label { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: var(--cream); border-radius: 8px; font-weight: 600; }
.checkbox-grid input { width: auto; }
.muted-card { opacity: .68; }
.transaction-form { display: grid; gap: 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.section-heading h3 { margin: 5px 0 0; }
.item-row { display: grid; grid-template-columns: minmax(240px,2fr) 1fr 1fr 38px; gap: 12px; align-items: end; padding: 14px; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; }
.item-row label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.item-row input,.item-row select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: #fff; }
.number-control { position: relative; }
.number-control input { padding-right: 34px; }
.number-control input::-webkit-outer-spin-button, .number-control input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.number-control input[type=number] { -moz-appearance: textfield; }
.number-arrows { position: absolute; inset: 1px 1px 1px auto; width: 30px; display: grid; grid-template-rows: 1fr 1fr; overflow: hidden; border-left: 1px solid var(--line); border-radius: 0 8px 8px 0; }
.number-arrows button { border: 0; padding: 0; background: #f8fafc; color: var(--green); font-size: 10px; line-height: 1; cursor: pointer; }
.number-arrows button:hover { background: var(--navy-soft); }
.number-arrows button + button { border-top: 1px solid var(--line); }
.remove-row { width: 36px; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--red); cursor: pointer; }
.detail-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 16px 0; }
.detail-grid p { display: grid; gap: 4px; margin: 0; padding: 13px; background: var(--cream); border-radius: 10px; }
.detail-grid small { color: var(--muted); }
.funding-summary { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.funding-summary span { padding: 10px 12px; background: var(--navy-soft); border-radius: 9px; }
.review-panel { margin-bottom: 20px; padding: 0; background: #fbfdff; }
.review-panel > .panel-heading { position: sticky; top: 0; z-index: 2; padding: 20px 24px 16px; margin: 0; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.review-panel > .detail-grid { padding: 0 24px; margin: 20px 0; }
.review-panel > table { width: calc(100% - 48px); margin: 0 24px; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.review-panel > table th { background: var(--navy-soft); color: var(--green-dark); }
.review-panel > table tfoot th { font-size: 13px; text-transform: none; letter-spacing: normal; }
.review-panel > table tfoot th strong { font-size: 13px; }
.review-resource-row { display: flex; align-items: stretch; gap: 14px; padding: 18px 24px 22px; }
.review-panel .funding-summary { align-items: center; margin: 0; }
.review-panel .attachment-links { display: flex; align-items: center; gap: 12px; margin: 0; padding: 11px 13px; border: 1px solid #d8e3ef; border-radius: 12px; background: #fff; }
.review-section-label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.attachment-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.review-panel .attachment-links .text-button { display: inline-flex; align-items: center; min-height: 42px; padding: 0 15px; border: 1px solid #c9d9ea; border-radius: 10px; background: var(--navy-soft); color: var(--green); font-weight: 750; box-shadow: 0 3px 9px rgba(16,39,68,.05); }
.review-panel .attachment-links .text-button::before { content: ""; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--green); }
.review-panel .attachment-links .text-button:hover { background: #e2edf8; border-color: #9db9d6; transform: translateY(-1px); }
.review-footer { position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 14px 20px; margin: 0; padding: 16px 24px; background: rgba(255,255,255,.98); border-top: 1px solid var(--line); box-shadow: 0 -8px 22px rgba(16,39,68,.05); }
.review-footer-heading { display: grid; align-content: center; gap: 3px; }
.review-footer-heading strong { color: var(--green-dark); }
.review-footer-heading span { color: var(--muted); font-size: 13px; }
.review-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.review-actions form { margin: 0; }
.review-reject { grid-column: 1 / -1; display: flex; align-items: end; justify-content: flex-end; gap: 9px; padding-top: 12px; border-top: 1px solid #e2eaf2; }
.review-reject label { display: grid; gap: 5px; min-width: min(100%, 420px); color: var(--muted); font-size: 12px; font-weight: 750; }
.review-reject input { width: 100%; min-width: 290px; }
.review-panel .inline-reason { display: flex; gap: 8px; align-items: center; }
.review-panel .inline-reason input { min-width: 190px; }
.transaction-number { color: var(--green); font-weight: 850; text-decoration: underline; text-decoration-color: #c4d5e7; text-underline-offset: 3px; }
.transaction-number:hover { color: var(--green-dark); text-decoration-color: currentColor; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(8,29,55,.48); backdrop-filter: blur(4px); }
.payment-modal-backdrop { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 24px; background: rgba(8,29,55,.48); backdrop-filter: blur(4px); }
.payment-modal-backdrop.open { display: grid; }
.logout-confirm { width: min(420px, 100%); padding: 30px; text-align: center; }
.logout-confirm-icon { width: 52px; height: 52px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; color: var(--red); background: #fff0ee; }
.logout-confirm-icon .icon { width: 24px; height: 24px; }
.logout-confirm h3 { margin: 0 0 8px; font-size: 22px; }
.logout-confirm p { margin: 0; color: var(--muted); line-height: 1.55; }
.logout-confirm-actions { justify-content: center; margin-top: 24px; }
.logout-confirm-actions .button { min-width: 120px; }
.payment-modal { width: min(80vw, 1200px); height: auto; max-height: calc(100vh - 48px); overflow: auto; border-color: #d7e2ee; box-shadow: 0 22px 56px rgba(8,29,55,.22); animation: modal-in .24s ease-out; }
.transaction-edit-modal { width:min(92vw,1200px); padding:28px; }
.transaction-edit-modal .transaction-form { box-shadow:none; border:0; padding:0; }
.edit-attachment-list { padding:14px; border:1px solid var(--line); border-radius:12px; }
.edit-attachment-item { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:8px 0; }
.edit-attachment-item input { width:auto; }
.stock-issue-modal, .inventory-loan-modal, .inventory-return-modal { width: min(720px, calc(100vw - 32px)); }
.proof-modal img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 10px; }
.proof-modal iframe { width: 100%; height: 68vh; border: 0; border-radius: 10px; }
.attachment-links { margin-top: 18px; }
.payment-validation { grid-column: 1 / -1; padding: 11px 13px; border-radius: 10px; color: #8f2720; background: #fff0ee; border: 1px solid #f0c3bf; font-weight: 700; }
.transaction-modal { width: min(80vw, 1200px); height: 80vh; max-height: calc(100vh - 48px); overflow: auto; border-color: #d7e2ee; box-shadow: 0 22px 56px rgba(8,29,55,.22); animation: modal-in .24s ease-out; }
.modal-close { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); font-size: 26px; line-height: 1; }
.modal-close:hover { background: var(--navy-soft); color: var(--green); }
.modal-table { margin-top: 20px; }
.detail-notes { margin-top: 18px; padding: 14px; background: var(--cream); border-radius: 10px; }
.detail-notes small { color: var(--muted); font-weight: 700; }
.detail-notes p { margin: 6px 0 0; white-space: normal; }
.attachment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.attachment-grid a { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--green); font-weight: 700; }
.attachment-grid img { width: 100%; height: 180px; object-fit: cover; border-radius: 7px; background: var(--cream); }
@keyframes modal-in { from { opacity: 0; transform: scale(.96) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.profile-grid { display: grid; grid-template-columns: minmax(280px,.75fr) minmax(360px,1.25fr); gap: 20px; align-items: start; }
.profile-card { text-align: center; }
.profile-card > p { color: var(--muted); }
.profile-photo-large { width: 112px; height: 112px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 28px; color: #fff; background: linear-gradient(145deg,#234f80,var(--green-dark)); font-size: 38px; font-weight: 800; overflow: hidden; box-shadow: 0 12px 28px rgba(23,59,103,.2); }
.profile-photo-large img { width: 100%; height: 100%; object-fit: cover; }
.profile-card .form-stack { margin-top: 24px; text-align: left; }

.corporate-login-page { min-height: 100vh; background: #fff; color: var(--ink); }
.corporate-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px clamp(24px,5vw,76px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); position: relative; z-index: 2; }
.corporate-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.corporate-brand > span:last-child { display: grid; gap: 2px; min-width: 0; }
.corporate-brand strong { font-size: 15px; letter-spacing: -.01em; }
.corporate-brand small { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.corporate-login-link { display: inline-flex; align-items: center; gap: 10px; padding: 11px 17px; border: 1px solid #d6e0ec; border-radius: 10px; color: var(--green); font-weight: 750; transition: background .18s ease, transform .18s ease; }
.corporate-login-link:hover { background: var(--navy-soft); transform: translateY(-1px); }
.corporate-login-link span { font-size: 18px; }
.corporate-landing { min-height: calc(100vh - 136px); display: grid; grid-template-columns: minmax(0,1.04fr) minmax(480px,.96fr); }
.corporate-copy { padding: clamp(52px,7vw,105px) clamp(32px,6vw,92px) 54px; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 12% 12%,#f3f7fc 0,transparent 31%),#fff; }
.corporate-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--green); font-size: 11px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.corporate-kicker span, .corporate-image-caption span { width: 30px; height: 2px; background: var(--green); }
.corporate-copy h1 { max-width: 760px; margin: 0; font-size: clamp(40px,5vw,72px); line-height: 1.02; letter-spacing: -.055em; font-weight: 770; }
.corporate-copy h1 em { display: block; color: var(--green); font-family: Georgia,serif; font-weight: 500; }
.corporate-lead { max-width: 720px; margin: 28px 0 32px; color: #59677a; font-size: clamp(15px,1.3vw,17px); line-height: 1.75; }
.corporate-services { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.corporate-services article { display: flex; gap: 11px; padding: 17px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.78); box-shadow: 0 8px 25px rgba(16,39,68,.035); }
.corporate-services article > span { color: #9aabc0; font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.corporate-services article div { display: grid; gap: 6px; }
.corporate-services strong { font-size: 14px; }
.corporate-services small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.corporate-values { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 27px; color: var(--green-dark); font-size: 11px; font-weight: 750; }
.corporate-values span { display: flex; align-items: center; gap: 8px; }
.corporate-values span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--navy-soft); }
.corporate-access { display: grid; grid-template-rows: minmax(310px,1fr) auto; min-width: 0; background: #102f55; }
.corporate-hero-image { min-height: 360px; position: relative; overflow: hidden; }
.corporate-hero-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,transparent 58%,rgba(7,28,53,.78)); }
.corporate-hero-image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 70% center; }
.corporate-image-caption { position: absolute; z-index: 1; left: 34px; right: 34px; bottom: 26px; display: flex; align-items: center; gap: 10px; color: #fff; font-size: 12px; font-weight: 650; }
.corporate-image-caption span { background: #fff; }
.corporate-login-card { padding: 28px clamp(26px,4vw,48px) 30px; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -18px 50px rgba(4,22,43,.13); position: relative; z-index: 1; }
.login-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.login-card-heading h2 { margin: 6px 0 0; font-size: clamp(24px,2.2vw,31px); letter-spacing: -.035em; }
.login-security-mark { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; color: var(--green); background: var(--navy-soft); border-radius: 12px; }
.login-security-mark .icon { width: 22px; height: 22px; }
.corporate-login-card > .muted { margin: 10px 0 0; line-height: 1.5; }
.corporate-login-form { margin-top: 19px; grid-template-columns: 1fr 1fr auto; display: grid; align-items: end; gap: 12px; }
.corporate-login-form label { gap: 6px; }
.corporate-login-form input { min-height: 44px; }
.corporate-login-form .button { min-height: 44px; white-space: nowrap; gap: 10px; }
.corporate-access-note { display: block; margin-top: 13px; color: #8995a6; }
.corporate-footer { min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px clamp(24px,5vw,76px); color: var(--muted); background: #fff; border-top: 1px solid var(--line); font-size: 11px; }
@media (min-width: 1181px) {
    .corporate-copy { position: relative; z-index: 1; }
    .corporate-copy::after { content: ""; position: absolute; z-index: -1; top: 0; right: -74px; bottom: 0; width: 76px; background: linear-gradient(90deg,#fff,rgba(255,255,255,0)); pointer-events: none; }
    .corporate-access { position: relative; display: block; min-height: 100%; overflow: hidden; }
    .corporate-hero-image { position: absolute; inset: 0; min-height: 0; }
    .corporate-hero-image::after { background: linear-gradient(180deg,rgba(7,28,53,.04) 38%,rgba(7,28,53,.30) 65%,rgba(7,28,53,.78) 100%); }
    .corporate-hero-image img { object-position: 68% center; transform: scale(1.015); }
    .corporate-image-caption { top: 28px; bottom: auto; padding: 10px 13px; width: fit-content; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; background: rgba(9,35,63,.34); backdrop-filter: blur(8px); }
    .corporate-login-card { position: absolute; left: clamp(22px,3vw,42px); right: clamp(22px,3vw,42px); bottom: clamp(22px,3vw,38px); padding: 25px clamp(25px,3vw,38px) 24px; border: 1px solid rgba(255,255,255,.72); border-radius: 20px; background: rgba(255,255,255,.955); backdrop-filter: blur(18px); box-shadow: 0 24px 65px rgba(4,22,43,.26); }
}
@media (max-width: 1180px) {
    .corporate-landing { grid-template-columns: 1fr; }
    .corporate-copy { padding-block: 70px; }
    .corporate-access { grid-template-columns: minmax(0,1fr) minmax(460px,.9fr); grid-template-rows: auto; }
    .corporate-login-card { border-radius: 24px 0 0 24px; display: flex; flex-direction: column; justify-content: center; }
    .corporate-login-form { grid-template-columns: 1fr; }
}
@media (min-width: 1181px) and (max-height: 850px) {
    .corporate-copy { padding: 38px clamp(32px,6vw,82px) 32px; }
    .corporate-kicker { margin-bottom: 15px; }
    .corporate-copy h1 { font-size: clamp(46px,4.25vw,59px); }
    .corporate-lead { margin: 20px 0 23px; font-size: 14px; line-height: 1.65; }
    .corporate-services article { padding: 13px 12px; }
    .corporate-services small { line-height: 1.4; }
    .corporate-values { margin-top: 20px; }
    .corporate-login-card { bottom: 22px; padding-top: 22px; padding-bottom: 20px; }
    .corporate-login-form { margin-top: 14px; }
}
@media (max-width: 760px) {
    .corporate-header { min-height: 74px; padding: 10px 18px; }
    .corporate-brand strong { font-size: 12px; }
    .corporate-brand small { display: none; }
    .corporate-brand .brand-mark-small { width: 38px; height: 38px; }
    .corporate-login-link { padding: 9px 11px; font-size: 12px; }
    .corporate-landing { min-height: auto; }
    .corporate-copy { padding: 52px 20px 42px; }
    .corporate-copy h1 { font-size: clamp(37px,12vw,52px); }
    .corporate-lead { margin-block: 23px 27px; }
    .corporate-services { grid-template-columns: 1fr; }
    .corporate-services article { padding: 14px; }
    .corporate-access { display: flex; flex-direction: column; }
    .corporate-hero-image { min-height: 290px; }
    .corporate-login-card { border-radius: 22px 22px 0 0; margin-top: -18px; padding: 28px 20px 32px; }
    .corporate-footer { align-items: flex-start; flex-direction: column; padding: 18px 20px; }
}

@media (max-width: 1350px) {
    .stat-grid, .action-grid, .debt-summary { grid-template-columns: repeat(2, 1fr); }
    .report-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .report-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .report-summary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1050px) {
    .report-filter-grid, .report-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar-collapsed { display: block; }
    .sidebar { position: fixed; left: -280px; width: 260px; transition: left .2s ease; box-shadow: 15px 0 40px rgba(0,0,0,.2); }
    .sidebar.open { left: 0; }
    .sidebar-collapsed .sidebar { padding-inline: 18px; }
    .sidebar-collapsed .sidebar-label, .sidebar-collapsed .logout-button { display: grid; }
    .sidebar-collapsed .nav-list em { display: inline; }
    .sidebar-collapsed .sidebar-brand { padding-inline: 8px; justify-content: flex-start; }
    .sidebar-collapsed .collapse-button { position: static; margin-left: auto; transform: none; }
    .sidebar-collapsed .nav-list a, .sidebar-collapsed .nav-group-toggle { justify-content: flex-start; padding-inline: 12px; }
    .sidebar-collapsed .nav-submenu { padding-left: 18px; }
    .sidebar-collapsed .sidebar-user { grid-template-columns: 38px 1fr auto; justify-items: stretch; padding-inline: 8px; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 19; display: block; border: 0; background: rgba(7,25,48,.42); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
    .sidebar-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; }
    body.sidebar-mobile-open { overflow: hidden; }
    .sidebar .collapse-button { display: grid; place-items: center; }
    .menu-toggle { display: block; }
    .topbar { min-height: 78px; height: auto; padding: 12px 18px; gap: 10px; flex-wrap: wrap; }
    .topbar h1 { font-size: 18px; }
    .topbar > div:not(.topbar-actions) { min-width: 0; }
    .topbar-actions { width: calc(100% - 50px); margin-left: 50px; }
    .topbar-search { width: auto; flex: 1; }
    .topbar-actions .button { padding: 10px 12px; font-size: 12px; white-space: nowrap; }
    .topbar .eyebrow { font-size: 9px; letter-spacing: .08em; }
    .page-content { padding: 24px 18px 40px; }
    .welcome-panel, .page-intro { align-items: flex-start; flex-direction: column; }
    .stat-grid, .action-grid, .content-grid, .debt-summary { grid-template-columns: 1fr; }
    .report-filter-grid, .report-kpi-grid, .report-summary-grid { grid-template-columns: 1fr; }
    .report-keyword { grid-column: auto; }
    .form-grid { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .item-row,.detail-grid { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .modal-backdrop { padding: 12px; }
    .transaction-modal { width: 100%; height: 100%; max-height: calc(100vh - 24px); }
    .review-resource-row { display: grid; padding: 16px 18px 20px; }
    .review-panel .attachment-links { align-items: flex-start; flex-direction: column; }
    .review-footer { grid-template-columns: 1fr; padding: 16px 18px; }
    .review-actions { justify-content: flex-start; }
    .review-reject { align-items: stretch; justify-content: stretch; flex-direction: column; }
    .review-reject label, .review-reject input { min-width: 0; }
    .attachment-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .login-page { padding: 0; }
    .login-shell { min-height: 100vh; grid-template-columns: 1fr; border-radius: 0; }
    .login-brand { display: none; }
    .login-card { padding: 42px 24px; }
}
