:root{--navy:#142b4a;--blue:#2869c7;--blue2:#eaf2fc;--ink:#1d2a3b;--muted:#718096;--cream:#fbfaf5;--line:#e6eaf0}
*{box-sizing:border-box}body{margin:0;background:#f4f6fa;color:var(--ink);font-family:Inter,"Segoe UI",Arial,sans-serif;font-size:14px}
.loading-screen{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;z-index:20;color:#637083}
.auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(280px,38%) 1fr;background:#fff}
.auth-brand{background:linear-gradient(150deg,#142b4a,#1c426d);color:white;padding:12vh 8%;display:flex;flex-direction:column;align-items:flex-start;position:relative}
.brand-mark{height:52px;width:52px;border-radius:15px;background:#fff;color:var(--blue);font-weight:800;font-size:30px;display:grid;place-items:center;box-shadow:0 8px 24px #081a302e}
.brand-name{font-weight:800;font-size:27px;letter-spacing:2px;margin-top:24px}.brand-name span,.side-brand span{color:#76aaf5}
.auth-brand p{color:#d3deec;margin-top:12px;font-size:15px}.brand-foot{position:absolute;bottom:24px;left:8%;display:flex;flex-direction:column;align-items:flex-start;gap:10px;color:#d3deec;font-size:12px;letter-spacing:.2px}.brand-credit-logo{width:60px;height:60px;object-fit:contain;display:block;border-radius:0;box-shadow:none}.brand-foot a{color:#d3deec;text-decoration:none;font-weight:600}.brand-foot a:hover{text-decoration:underline;color:#fff}
.auth-panel{display:flex;align-items:center;justify-content:center;padding:40px}.auth-content{width:min(440px,100%)}.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.5px;color:#6480a4;margin-bottom:9px}
.auth-content h1{font-weight:750;font-size:30px;letter-spacing:-.7px}.form-label{font-size:12px;font-weight:700;color:#3d4d62}.form-control,.form-select{border-color:#d9e0e9;border-radius:8px}.form-control-lg{font-size:15px;padding:12px 14px}.btn-primary{background:#2869c7;border-color:#2869c7}.btn-primary:hover{background:#1e56a5}
.app-shell{min-height:100vh;display:flex}.sidebar{width:250px;flex:0 0 250px;background:var(--navy);color:#fff;min-height:100vh;padding:22px 14px;display:flex;flex-direction:column}
.side-brand{display:flex;align-items:center;gap:11px;font-size:19px;font-weight:800;padding:0 12px 32px}.brand-mark.small{width:34px;height:34px;border-radius:10px;font-size:20px}
.side-caption{font-size:10px;color:#8fa6c3;font-weight:800;letter-spacing:1.4px;padding:0 14px 12px}.side-nav{display:grid;gap:5px}.side-nav .nav-link{color:#c7d4e5;padding:12px 14px;border-radius:8px;font-size:13px}.side-nav .nav-link span{display:inline-block;width:27px;font-size:17px}.side-nav .nav-link.active,.side-nav .nav-link:hover{background:#2869c7;color:white}
.sidebar-bottom{margin-top:auto;padding:15px 12px;color:#afc0d5;font-size:11px;border-top:1px solid #ffffff1c;display:flex;align-items:center;gap:9px}.secure-dot{width:7px;height:7px;border-radius:50%;background:#58c79a}
.main-area{min-width:0;flex:1;display:flex;flex-direction:column}.topbar{height:82px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 28px;gap:15px;position:sticky;top:0;z-index:5}
.top-title{font-weight:750;font-size:18px}.top-subtitle{font-size:11px;color:#8793a3;margin-top:2px}.company-select{min-width:190px}.company-select small{font-size:9px;letter-spacing:1px;color:#8290a2;font-weight:800}.company-select select{max-width:240px;border:0;background:#f5f7fa;font-weight:600}
.user-chip{display:flex;align-items:center;gap:9px}.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#e8f0fc;color:#2869c7;font-weight:800}.user-meta{display:grid;line-height:1.3}.user-meta strong{font-size:11px}.user-meta small{font-size:10px;color:#8491a2}
.page-content{padding:30px;flex:1}.welcome-row{display:flex;justify-content:space-between;align-items:center}.welcome-row h1{font-size:26px;font-weight:750;letter-spacing:-.6px;margin:0}.welcome-row p{margin:7px 0 0}.date-pill{background:#fff;border:1px solid var(--line);border-radius:30px;padding:9px 14px;color:#64748b;font-size:11px}
.metric-card{height:145px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:0 3px 12px #263c5a08}.metric-label{font-size:12px;font-weight:700;color:#6f7f94}.metric-value{font-size:29px;font-weight:750;margin:12px 0 3px}.metric-note{font-size:10px;color:#94a0af}
.workspace-card{background:var(--cream);border:1px solid #eee9dc;border-radius:12px;padding:24px 26px;display:flex;justify-content:space-between;align-items:center}.workspace-card h3{font-size:19px;font-weight:750;margin:0 0 7px}.workspace-icon{font-size:34px;color:#9aaec8;background:#edf2f8;width:58px;height:58px;border-radius:14px;display:grid;place-items:center}
.section-heading{font-size:14px;font-weight:750}.quick-card{width:100%;min-height:125px;border:1px solid var(--line);border-radius:11px;background:#fff;text-align:left;padding:17px;display:grid;gap:6px;transition:.15s}.quick-card:hover{border-color:#aac4e9;box-shadow:0 5px 20px #1f4b8010;transform:translateY(-1px)}.quick-icon{font-size:20px;color:#2869c7}.quick-card strong{font-size:13px}.quick-card small{color:#8a97a7;font-size:10px}
.app-footer{border-top:1px solid var(--line);padding:15px 30px;color:#9aa4b2;font-size:10px}.app-footer span{padding:0 5px}
@media(max-width:991px){.sidebar{position:fixed;z-index:10;left:-260px;transition:left .2s}.sidebar.open{left:0}.topbar{padding:0 15px}.page-content{padding:20px}.user-meta{display:none}.company-select{min-width:130px}.company-select select{max-width:150px}}
@media(max-width:650px){.auth-shell{grid-template-columns:1fr}.auth-brand{display:none}.auth-panel{padding:25px}.topbar{height:auto;min-height:75px;flex-wrap:wrap;padding:12px}.topbar>div:first-of-type{flex:1}.company-select{order:3;width:100%;margin-left:40px}.company-select select{max-width:100%;width:100%}.welcome-row{align-items:flex-start;gap:12px;flex-direction:column}.date-pill{display:none}.page-content{padding:17px}.user-chip{display:none}}

/* Chart of Accounts module */
.module-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px}.module-heading h1{font-size:25px;font-weight:760;letter-spacing:-.5px;margin:0}.module-heading p{margin:6px 0 0;font-size:12px}.coa-company-label{font-size:11px;color:#68788e;background:#fff;border:1px solid var(--line);padding:8px 12px;border-radius:7px}
.coa-workspace{display:grid;grid-template-columns:minmax(290px,31%) minmax(0,69%);gap:14px;min-height:540px}.coa-panel{background:#fff;border:1px solid #e3e8ef;border-radius:10px;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.coa-panel-title{background:#2b5b91;color:#fff;padding:12px 15px;font-weight:750;font-size:13px}.coa-panel-title small{display:block;color:#d6e2f0;font-weight:400;font-size:10px;margin-top:3px}
.coa-toolbar{display:flex;align-items:center;gap:5px;padding:9px;background:#dee7f3;border-bottom:1px solid #d2dce9;flex-wrap:wrap}.coa-toolbar .btn{height:27px;font-size:10px;font-weight:700;border-radius:5px;padding:4px 8px}.ledger-tools #ledgerSearch{width:min(225px,100%);height:27px;font-size:11px;margin-left:auto}
.group-tree{padding:8px 7px;background:#fffaf0;flex:1;overflow:auto;max-height:620px}.tree-row{width:100%;display:flex;align-items:center;gap:6px;border:0;background:transparent;text-align:left;padding:6px 7px 6px calc(7px + var(--depth,0)*13px);border-radius:5px;color:#25364c;font-size:11px;min-height:29px}.tree-row:hover{background:#edf3fa}.tree-row.selected{background:#dceafa;color:#174e89;font-weight:750}.tree-row.inactive{opacity:.55}.tree-caret{width:13px;color:#6482a5}.tree-code{font-size:9px;color:#74869b;min-width:50px}.tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.system-tag{font-size:8px;color:#7b6b37;background:#f3edda;padding:2px 4px;border-radius:3px;margin-left:auto}.tree-children{padding-left:4px}.tree-children.tree-collapsed{display:none}
.coa-grid-wrap{overflow:auto;flex:1;max-height:620px}.coa-grid{font-size:11px;white-space:nowrap}.coa-grid thead th{position:sticky;top:0;background:#234b77;color:#fff;font-size:10px;padding:11px 9px;border-color:#456486}.coa-grid tbody td{padding:9px;border-color:#e1e5eb}.coa-grid tbody tr{cursor:pointer}.coa-grid tbody tr:nth-child(even){background:#fffdf6}.coa-summary{padding:9px 13px;border-top:1px solid var(--line);font-size:10px;color:#7b8797;background:#fff}
.status-pill{display:inline-block;border-radius:20px;padding:3px 8px;font-size:9px;font-weight:700}.status-pill.active{background:#e7f6ee;color:#26784c}.status-pill.inactive{background:#f1f2f4;color:#77808c}
#coaModal .modal-content{border:0;border-radius:12px;box-shadow:0 18px 60px #142b4a30}#coaModal .modal-header{background:#fbfaf5;border-bottom:1px solid #ece8dc}#coaModal .modal-title{font-size:18px;font-weight:750}#coaModal .form-control,#coaModal .form-select{font-size:13px}#coaModal .form-label{margin-bottom:5px}
@media(max-width:1050px){.coa-workspace{grid-template-columns:1fr}.group-tree{max-height:300px}.coa-grid-wrap{max-height:450px}}
@media(max-width:650px){.module-heading{display:block}.coa-company-label{display:inline-block;margin-top:10px}.ledger-tools #ledgerSearch{width:100%;margin-left:0}}

/* Voucher Register */
.voucher-filter-panel{display:flex;align-items:end;gap:10px;flex-wrap:wrap;background:#dee7f3;border:1px solid #d2dce9;border-radius:9px;padding:12px;margin-bottom:10px}
.filter-field{display:flex;flex-direction:column;gap:4px;min-width:115px}.filter-field label{font-size:10px;font-weight:800;color:#60748d}.filter-field .form-control,.filter-field .form-select{height:30px;font-size:11px;min-width:125px}.filter-field.search-field{flex:1;min-width:190px}.filter-field.search-field input{width:100%}
.filter-apply,.filter-clear{height:30px;font-size:10px;font-weight:700;white-space:nowrap}
.voucher-actionbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#e7edf5;border:1px solid #dce4ee;border-radius:9px;padding:9px 11px;margin-bottom:12px}
.voucher-actionbar .btn{height:28px;font-size:10px;font-weight:700;padding:4px 9px}.voucher-actionbar .btn:disabled{opacity:.42}
.voucher-table-panel{background:#fff;border:1px solid #e3e8ef;border-radius:10px;overflow:hidden}
.voucher-table-wrap{max-height:calc(100vh - 390px);min-height:330px;overflow:auto}
.voucher-grid{font-size:11px;white-space:nowrap}.voucher-grid thead th{position:sticky;top:0;z-index:2;background:#234b77;color:#fff;font-size:10px;padding:11px 10px;border-color:#456486}
.voucher-grid tbody td{padding:10px;border-color:#e7ebf0}.voucher-grid tbody tr{cursor:pointer}.voucher-grid tbody tr:nth-child(even){background:#fffdf6}.voucher-grid tbody tr:hover{background:#edf4fc}
.voucher-number{font-weight:750;color:#245b99}.money-cell{font-variant-numeric:tabular-nums}
.voucher-status{display:inline-block;border-radius:20px;padding:4px 8px;font-size:9px;font-weight:800;letter-spacing:.2px}.voucher-status.posted{background:#e5f5ec;color:#247548}.voucher-status.draft{background:#fff3d9;color:#8a6417}.voucher-status.pending{background:#e8effa;color:#315f9a}.voucher-status.cancelled{background:#fce9e7;color:#a3433b}
.voucher-table-footer{display:flex;justify-content:space-between;gap:12px;padding:10px 13px;background:#fbfaf5;border-top:1px solid #e9e7df;color:#7b8797;font-size:10px}
.voucher-detail-head{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;background:#fbfaf5;border:1px solid #eee9dc;border-radius:8px;padding:14px}
.voucher-detail-head small{display:block;color:#7c8da1;font-size:9px;font-weight:800;letter-spacing:.8px}.voucher-detail-head strong{display:block;margin-top:5px;font-size:12px}
.voucher-detail-grid{font-size:11px}.voucher-detail-grid thead th{background:#234b77;color:white;font-size:10px}.voucher-detail-grid td,.voucher-detail-grid th{padding:9px}.voucher-detail-grid tfoot th{background:#f4f6f9}
.voucher-narration{font-size:11px;background:#fbfaf5;border-radius:7px;padding:12px}.voucher-narration div{margin-top:5px;color:#5e6c7e}
.voucher-audit-line{font-size:10px;color:#8995a4;margin-top:14px}
@media(max-width:850px){.voucher-table-wrap{max-height:none}.voucher-table-footer{flex-direction:column}.voucher-detail-head{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Voucher Entry */
.voucher-entry-meta{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:14px;background:#fbfaf5;border:1px solid #eee9dc;border-radius:9px;padding:14px}
.voucher-entry-meta .form-label{font-size:10px;font-weight:800;color:#667b93;margin-bottom:5px}
.voucher-entry-table{border:1px solid #e2e8ef;border-radius:8px;max-height:390px;overflow:auto}
.voucher-entry-table thead th{position:sticky;top:0;background:#234b77;color:#fff;font-size:10px;padding:10px;z-index:1}
.voucher-entry-table tbody td{padding:6px 7px}.voucher-entry-table tfoot th{background:#f1f5f9;padding:11px;font-size:11px}
.voucher-entry-table .form-control,.voucher-entry-table .form-select{font-size:11px;min-height:30px}
.entry-line-number{font-size:10px;color:#718096;text-align:center}
.voucher-balance-strip{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:#f5f7fa;border:1px solid #e5eaf0;border-top:0;border-radius:0 0 8px 8px;font-size:11px;font-weight:700}
#voucherEntryModal .modal-content{border:0;border-radius:12px}#voucherEntryModal .modal-header{background:#fbfaf5;border-bottom:1px solid #ece8dc}#voucherEntryModal .modal-title{font-size:18px;font-weight:750}
@media(max-width:700px){.voucher-entry-meta{grid-template-columns:1fr}.voucher-entry-table{max-height:320px}}

/* Financial Reports */
.report-filter-panel{display:flex;flex-direction:column;align-items:stretch;gap:10px;background:#dee7f3;border:1px solid #d2dce9;border-radius:9px;padding:12px;margin-bottom:12px}
.report-filter-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end;width:100%}
.report-filter-fields>.filter-field{min-width:0;width:100%}
.report-filter-fields .form-select,.report-filter-fields .form-control{width:100%;min-width:0}
.report-extra-fields{display:flex;align-items:end;gap:10px;flex-wrap:wrap;width:100%}
.report-extra-fields .filter-field{min-width:180px}
.report-actions-row{display:flex;align-items:end;gap:14px;flex-wrap:wrap;width:100%}
.report-filter-main,.report-preset-controls{display:flex;align-items:end;gap:10px;flex-wrap:nowrap}
.report-preset-controls{padding:0;border:0;width:auto}
.report-preset-controls .filter-field{min-width:190px;width:210px}
.report-filter-panel .filter-field{min-width:130px}.report-filter-panel .filter-field select{min-width:155px}
.report-ledger-field{min-width:0;width:100%}.report-ledger-field .ledger-picker{width:100%}.report-ledger-field .ledger-picker-input{width:100%}
.report-filter-panel .btn{height:30px;font-size:10px;font-weight:750;white-space:nowrap}
@media(max-width:900px){.report-filter-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.report-actions-row{align-items:flex-start}.report-filter-main,.report-preset-controls{flex-wrap:wrap}}
@media(max-width:520px){.report-filter-fields{grid-template-columns:1fr}.report-preset-controls .filter-field{width:100%}}
.report-result-panel{background:#fff;border:1px solid #e3e8ef;border-radius:10px;overflow:hidden}
.report-result-heading{display:flex;justify-content:space-between;align-items:center;padding:13px 15px;background:#fbfaf5;border-bottom:1px solid #e9e7df}
.report-result-heading strong{display:block;color:#25364a;font-size:14px}.report-result-heading small{display:block;color:#8290a0;font-size:10px;margin-top:3px}
.report-result-heading>span{font-size:10px;color:#718096}
.report-table-wrap{max-height:calc(100vh - 360px);min-height:330px;overflow:auto}
.report-grid{font-size:10.5px;white-space:nowrap}.report-grid thead th{position:sticky;top:0;z-index:2;background:#234b77;color:#fff;font-size:10px;padding:10px;border-color:#456486}
.report-grid tbody td{padding:8px 10px;border-color:#e7ebf0}.report-grid tbody tr:nth-child(even){background:#fffdf6}
.report-grid tfoot th{position:sticky;bottom:0;background:#e8eef5;color:#263d57;padding:10px;border-top:2px solid #c9d5e3}
.report-number{font-variant-numeric:tabular-nums}
.report-summary-strip{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.report-summary-strip span{background:#fff;border:1px solid #e3e8ef;border-radius:8px;padding:8px 12px;min-width:140px}
.report-summary-strip small{display:block;color:#7c8da1;font-size:9px;font-weight:800;text-transform:uppercase}
.report-summary-strip strong{display:block;color:#234b77;font-size:14px;margin-top:3px;font-variant-numeric:tabular-nums}
@media(max-width:850px){.report-table-wrap{max-height:none}.report-filter-main .filter-field,.report-preset-controls .filter-field{flex:1}}

/* Chart of Accounts print menu */
.coa-print-dropdown{display:inline-flex;align-items:center}
.coa-print-dropdown>.btn{height:30px;font-size:10px;font-weight:750;white-space:nowrap}
.coa-print-dropdown .dropdown-menu{font-size:11px;min-width:190px;box-shadow:0 8px 24px rgba(25,45,70,.12);border-color:#dce4ee}
.coa-print-dropdown .dropdown-item{padding:8px 12px}

/* Stage 6: user and role administration */
.admin-grid{font-size:11px}.admin-grid thead th{font-size:10px;color:#667b93;background:#f4f7fa;white-space:nowrap}.admin-grid td{vertical-align:middle}.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}.permission-item{display:flex;align-items:center;gap:8px;border:1px solid #e3e9f0;border-radius:7px;padding:9px;font-size:11px;background:#fff}.permission-item code{font-size:9px;color:#718096}.admin-status{font-size:10px;font-weight:800;border-radius:20px;padding:4px 8px;background:#e8f5ee;color:#247448}.admin-status.off{background:#fcebec;color:#a53b43}
.audit-details{min-width:260px;max-width:520px;white-space:normal;overflow-wrap:anywhere;font-size:.82rem;color:#5c6675}

/* Infinity brand assets */
.brand-mark-image{display:block;object-fit:contain;flex:0 0 auto}
.login-logo{width:76px;height:76px;border-radius:18px;box-shadow:0 8px 24px #081a302e}
.sidebar-logo{width:38px;height:38px;border-radius:10px}


/* Stage 48 layout correction */
#hrAdvancedLayout{display:flex;flex-direction:column;align-items:stretch;gap:14px;width:100%;min-width:0}
#hrAdvancedLayout>.module-heading{display:flex;flex:0 0 auto;width:100%;min-width:0;margin:0 0 4px}
#hrAdvancedLayout>.workspace-card{display:block;flex:0 0 auto;width:100%;min-width:0;max-width:100%;padding:20px 22px}
#hrAdvancedLayout>.workspace-card>.w-100{display:block;width:100%;min-width:0}
#hrAdvancedLayout .row{min-width:0}
#hrAdvancedLayout .row>[class*="col"]{min-width:0}
#hrAdvancedLayout .form-control,#hrAdvancedLayout .form-select{min-width:0;max-width:100%}
#hrAdvancedLayout .table-responsive{width:100%;max-width:100%;overflow-x:auto}
#hrAdvancedStats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;width:100%;margin:0}
#hrAdvancedStats>.col{min-width:0;width:auto;padding:0}
#hrAdvancedStats .workspace-card{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;height:100%;min-width:0;padding:15px 17px}
#hrAdvancedStats h3{margin:0;font-size:25px;flex:0 0 auto}
@media(max-width:1100px){#hrAdvancedStats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#hrAdvancedStats{grid-template-columns:1fr}#hrAdvancedLayout>.workspace-card{padding:15px}#hrAdvancedLayout>.module-heading h2{font-size:23px}}


/* Stage 49 UI hardening: separate Advanced HR workspace from payroll */
#hrpayrollPage,#advancedhrPage{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box}
#hrpayrollPage>.workspace-card{display:block!important;position:relative;float:none;width:100%;max-width:100%;min-width:0;box-sizing:border-box;margin:0 0 16px!important;padding:22px 24px}
#hrpayrollPage>.workspace-card>.w-100{display:block!important;width:100%;min-width:0}
#hrpayrollPage .row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 0;width:100%;margin-left:0;margin-right:0}
#hrpayrollPage .row>[class*="col-"]{flex:1 1 155px;max-width:none;width:auto;min-width:0;padding-left:6px;padding-right:6px}
#hrpayrollPage .form-control,#hrpayrollPage .form-select{width:100%;min-width:0;max-width:100%;height:40px}
#hrpayrollPage .table-responsive,#advancedhrPage .table-responsive{display:block;width:100%;max-width:100%;overflow-x:auto}
#hrpayrollPage table,#advancedhrPage table{width:100%;min-width:680px}
#advancedhrPage #hrAdvancedLayout{display:flex;flex-direction:column;align-items:stretch;gap:16px;width:100%;min-width:0}
#advancedhrPage #hrAdvancedLayout>.workspace-card{display:block!important;width:100%;max-width:100%;min-width:0;margin:0!important;padding:22px 24px}
#advancedhrPage #hrAdvancedLayout>.workspace-card>.w-100{display:block;width:100%;min-width:0}
#advancedhrPage #hrAdvancedStats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;width:100%;margin:0}
#advancedhrPage #hrAdvancedStats>.col{width:auto;max-width:none;min-width:0;padding:0}
#advancedhrPage #hrAdvancedStats .workspace-card{display:flex!important;align-items:center;justify-content:space-between;width:100%;min-height:78px;padding:16px}
@media(max-width:1100px){#advancedhrPage #hrAdvancedStats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){#hrpayrollPage>.workspace-card,#advancedhrPage #hrAdvancedLayout>.workspace-card{padding:16px}#advancedhrPage #hrAdvancedStats{grid-template-columns:1fr}}

/* Stage 53: grouped navigation and Infinity-CS rebrand */
.sidebar{height:100vh;min-height:100vh;overflow:hidden}
.side-nav{display:flex;flex-direction:column;gap:5px;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 2px 12px;scrollbar-width:thin;scrollbar-color:#526b88 transparent}
.side-nav>.nav-link{flex:0 0 auto}
.nav-group{flex:0 0 auto;border:1px solid #ffffff12;border-radius:8px;overflow:hidden}
.nav-group>summary{list-style:none;cursor:pointer;position:relative;padding:10px 30px 10px 13px;color:#dbe6f4;font-size:11px;font-weight:750;letter-spacing:.35px;user-select:none}
.nav-group>summary::-webkit-details-marker{display:none}
.nav-group>summary:after{content:'▸';position:absolute;right:13px;top:9px;color:#8fa6c3;font-size:14px;transition:transform .15s}
.nav-group[open]>summary:after{transform:rotate(90deg)}
.nav-group>summary:hover,.nav-group[open]>summary{background:#ffffff0c;color:#fff}
.nav-group-items{display:grid;gap:2px;padding:2px 5px 6px}
.side-nav .nav-group .nav-link{font-size:12px;padding:8px 9px;margin:0}
.side-nav .nav-group .nav-link span{width:23px;font-size:15px}
.sidebar-bottom{flex:0 0 auto;background:var(--navy)}
@media(max-width:991px){.sidebar{height:100vh;min-height:100vh;overflow:hidden}.side-nav{padding-bottom:18px}}

/* Stage 50 dashboard refinements */
#logoutButton.btn-danger{background:#dc3545;border-color:#dc3545;color:#fff}#logoutButton.btn-danger:hover,#logoutButton.btn-danger:focus{background:#bb2d3b;border-color:#b02a37;color:#fff}
#dashIncomeExpense{font-size:19px;white-space:normal;overflow-wrap:anywhere}


/* Stage 51: readability and typography refinement
   Consistent Windows-friendly font rendering and clearer sizing/contrast. */
:root {
  --ui-font: "Segoe UI", Tahoma, Arial, sans-serif;
}
html, body, button, input, select, textarea {
  font-family: var(--ui-font);
  text-rendering: optimizeLegibility;
}
body {
  color: #243449;
  font-size: 14px;
  line-height: 1.5;
}
#appView {
  font-size: 14px;
}
#appView p, #appView .text-secondary {
  color: #5f6f82 !important;
}

/* Navigation, page headings and general labels */
.side-nav .nav-link { font-size: 13px; }
.nav-group > summary { font-size: 12px; }
.side-nav .nav-group .nav-link { font-size: 13px; }
.side-caption { font-size: 11px; }
.top-title { font-size: 19px; }
.top-subtitle { font-size: 12px; }
.user-meta strong { font-size: 12px; }
.user-meta small { font-size: 11px; }
.module-heading h1 { font-size: 27px; }
.module-heading p { font-size: 13px; }
.eyebrow, .side-caption { letter-spacing: 1.35px; }

/* Chart of Accounts tree view */
.coa-panel-title { font-size: 15px; }
.coa-panel-title small { font-size: 12px; }
.coa-toolbar .btn { font-size: 12px; min-height: 32px; height: auto; padding: 6px 10px; }
.ledger-tools #ledgerSearch { font-size: 13px; height: 34px; }
.group-tree { padding: 10px 8px; }
.tree-row {
  font-size: 13px;
  line-height: 1.45;
  min-height: 34px;
  padding-top: 7px;
  padding-bottom: 7px;
  gap: 8px;
}
.tree-code { font-size: 11px; min-width: 58px; color: #596d84; }
.tree-caret { font-size: 12px; color: #496b91; }
.system-tag { font-size: 10px; padding: 2px 5px; }
.tree-row.selected { color: #123f72; }

/* Grid views and data tables throughout the application */
#appView table,
#appView .table {
  font-size: 13px;
  line-height: 1.45;
}
#appView table thead th,
#appView .table thead th {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
#appView table tbody td,
#appView .table tbody td {
  font-size: 13px;
  color: #26364a;
}
.coa-grid { font-size: 13px; }
.coa-grid thead th { font-size: 12px; padding: 12px 10px; }
.coa-grid tbody td { padding: 11px 10px; }
.coa-summary { font-size: 12px; }
.status-pill { font-size: 11px; padding: 4px 9px; }

.voucher-grid, .report-grid, .voucher-detail-grid { font-size: 13px; }
.voucher-grid thead th, .report-grid thead th,
.voucher-detail-grid thead th { font-size: 12px; }
.voucher-grid tbody td, .report-grid tbody td,
.voucher-detail-grid tbody td { font-size: 13px; }
.voucher-status { font-size: 11px; }
.voucher-table-footer, .voucher-audit-line { font-size: 12px; }
.report-result-heading small, .report-result-heading > span { font-size: 12px; }
.report-summary-strip small { font-size: 11px; }

/* Buttons, inputs, selects and form labels */
#appView .btn {
  font-size: 12px;
  line-height: 1.4;
}
#appView .form-control,
#appView .form-select,
#appView input,
#appView select,
#appView textarea {
  font-size: 13px;
  line-height: 1.45;
}
#appView .form-label,
#appView label {
  font-size: 12px;
  font-weight: 600;
  color: #43566d;
}
#appView .form-text,
#appView .form-check-label,
#appView .form-check-input + label {
  font-size: 12px;
}
#appView .dropdown-menu,
#appView .dropdown-item { font-size: 13px; }
#appView .modal-title { font-size: 19px; }
#appView .modal-body { font-size: 13px; }
#appView .badge { font-size: 11px; }

/* Keep compact metadata readable without making layouts oversized */
.metric-label { font-size: 13px; }
.metric-note { font-size: 11px; color: #68788b; }
.date-pill { font-size: 12px; }
.coa-company-label { font-size: 12px; }
.quick-card strong { font-size: 14px; }
.quick-card small { font-size: 12px; }
.app-footer { font-size: 11px; }

/* Improve contrast of secondary text and prevent overly faint inactive rows */
.tree-row.inactive { opacity: .78; color: #64748b; }

/* Expandable Tally-style financial report hierarchy */
.report-group-row { background: #f5f7fa; }
.report-group-row td { border-top: 1px solid #dfe5ec; padding-top: .55rem; padding-bottom: .55rem; }
.report-group-toggle { border: 1px solid #b8c3d1; background: #fff; color: #344054; border-radius: 4px; width: 22px; height: 22px; line-height: 18px; padding: 0; margin-right: .45rem; font-weight: 700; }
.report-group-toggle:disabled { visibility: hidden; }
.report-group-row .report-number { font-weight: 600; }
.report-ledger-row td { background: #fff; }

/* Management Intelligence executive print layout */
@media print {
  body:has(#managementPage:not(.d-none)) .sidebar,
  body:has(#managementPage:not(.d-none)) .topbar,
  body:has(#managementPage:not(.d-none)) .app-footer,
  body:has(#managementPage:not(.d-none)) #mgRefresh,
  body:has(#managementPage:not(.d-none)) #mgApply,
  body:has(#managementPage:not(.d-none)) #mgCustomize,
  body:has(#managementPage:not(.d-none)) #mgPrintExecutive,
  body:has(#managementPage:not(.d-none)) #mgKpiSettings,
  body:has(#managementPage:not(.d-none)) #mgSaveAlerts { display:none !important; }
  body:has(#managementPage:not(.d-none)) #managementPage { display:block !important; }
  body:has(#managementPage:not(.d-none)) .workspace-card { break-inside:avoid; box-shadow:none !important; }
}

/* Searchable ledger dropdown: search and selection happen in one control. */
.ledger-picker{width:100%;}
.ledger-picker-input{width:100%;background-color:#fff;cursor:text;}
.ledger-picker-menu{position:fixed;left:0;top:0;z-index:20000;max-height:260px;overflow-y:auto;overscroll-behavior:contain;background:#fff;border:1px solid #cbd5e1;border-radius:6px;box-shadow:0 6px 18px rgba(15,23,42,.22);}
.ledger-picker-option{display:block;width:100%;padding:8px 10px;text-align:left;border:0;border-bottom:1px solid #edf0f4;background:#fff;color:#263445;font-size:13px;}
.ledger-picker-option:hover,.ledger-picker-option:focus{background:#eaf1f8;outline:0;}
.ledger-picker-empty{padding:10px;color:#64748b;font-size:12px;}

/* Trial Balance ledger drill-down modal */
.trial-balance-ledger-table-wrap{max-height:65vh;overflow:auto}
#trialBalanceLedgerModal .report-grid{min-width:760px}
#trialBalanceLedgerModal .modal-header{gap:1rem}

/* Fixed Assets & Depreciation workspace tabs */
.fa-module-tabs { flex-wrap: wrap; border-bottom: 1px solid var(--bs-border-color, #dee2e6); padding-bottom: .65rem; }
.fa-module-tabs .btn { min-width: 135px; }
.fa-tab-panel { min-width: 0; }
