:root{
  color-scheme:dark;
  --bg:#06101c;
  --bg-soft:#091625;
  --panel:rgba(15,31,50,.86);
  --panel-strong:#10243a;
  --line:rgba(151,178,210,.13);
  --muted:#8191a7;
  --muted-2:#5f7188;
  --text:#edf6ff;
  --cyan:#62e4e7;
  --cyan-soft:rgba(98,228,231,.12);
  --violet:#8c7cff;
  --green:#5adca5;
  --amber:#ffc477;
  --danger:#ff7f91;
  --shadow:0 24px 70px rgba(0,0,0,.28);
}
*{box-sizing:border-box}
html{background:var(--bg);scroll-behavior:smooth}
body{margin:0;min-width:320px;background:radial-gradient(circle at 76% -10%,rgba(80,136,203,.12),transparent 34%),var(--bg);color:var(--text);font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.5}
.app-shell{display:grid;grid-template-columns:286px minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;z-index:40;display:flex;flex-direction:column;padding:20px 14px 15px;background:linear-gradient(180deg,rgba(9,24,40,.98),rgba(5,14,25,.99));border-right:1px solid var(--line)}
.brand-row{height:50px;display:flex;align-items:center;gap:12px;padding:0 9px;margin-bottom:18px}
.brand-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(135deg,#dbffff,#59dce3);color:#06212a;font-size:19px;box-shadow:0 12px 30px rgba(98,228,231,.18)}
.brand-copy{min-width:0}.brand-copy strong{display:block;font-size:19px;letter-spacing:-.4px}.brand-copy strong span{color:var(--cyan)}.brand-copy small{display:block;margin-top:4px;color:#62758d;font-size:8px;letter-spacing:2.1px;font-weight:800}
.sidebar-close{display:none;margin-left:auto;border:0;background:transparent;color:var(--muted);font-size:26px}
.menu-scroll{overflow:auto;padding:0 3px 14px;scrollbar-width:thin;scrollbar-color:#1c3a56 transparent}
.menu-group{margin-bottom:14px}.menu-label{padding:9px 11px 6px;color:#52657e;font-size:9px;font-weight:800;letter-spacing:1.55px;text-transform:uppercase}
.menu-item{width:100%;height:42px;display:flex;align-items:center;gap:11px;margin:2px 0;padding:0 11px;border:1px solid transparent;border-radius:12px;background:transparent;color:#8999ad;text-align:left;transition:.2s ease}
.menu-item:hover{background:rgba(255,255,255,.035);color:#dce9f6}.menu-item.active{color:#eaffff;border-color:rgba(98,228,231,.12);background:linear-gradient(90deg,rgba(98,228,231,.16),rgba(98,228,231,.035));box-shadow:inset 3px 0 0 var(--cyan)}
.menu-icon{width:22px;text-align:center;color:#6e8299;font-size:16px}.menu-item.active .menu-icon{color:var(--cyan)}.menu-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600}.menu-badge{margin-left:auto;padding:3px 7px;border:1px solid var(--line);border-radius:99px;color:#687a91;font-size:8px}
.copilot-card{margin-top:auto;padding:15px;border:1px solid rgba(140,124,255,.2);border-radius:15px;background:linear-gradient(135deg,rgba(140,124,255,.13),rgba(98,228,231,.045))}.copilot-title{color:#dad6ff;font-size:11px;font-weight:800}.copilot-card p{margin:7px 0 0;color:#718299;font-size:10px;line-height:1.55}
.workspace{min-width:0}.topbar{height:78px;position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:18px;padding:0 28px;border-bottom:1px solid var(--line);background:rgba(6,16,28,.83);backdrop-filter:blur(18px)}
.mobile-menu{display:none;width:40px;height:40px;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.025);color:var(--text)}
.company-switcher{min-width:230px;display:flex;align-items:center;gap:11px}.company-logo{width:37px;height:37px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(135deg,#a8fff5,#74aaff);color:#082131;font-weight:900;font-size:11px}.company-switcher small,.user-menu small{display:block;color:#63758d;font-size:8px;letter-spacing:.7px}.company-switcher strong,.user-menu strong{display:block;margin-top:3px;font-size:11px}
.global-search{max-width:500px;flex:1;height:42px;display:flex;align-items:center;gap:10px;padding:0 13px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.024);color:#586b83}.global-search:focus-within{border-color:rgba(98,228,231,.35);box-shadow:0 0 0 3px rgba(98,228,231,.05)}.global-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:var(--text);font-size:11px}.global-search input::placeholder{color:#596a80}.global-search kbd{padding:3px 6px;border:1px solid var(--line);border-radius:5px;color:#62758d;background:#0b1929;font-size:8px}
.server-pill{display:flex;align-items:center;gap:7px;padding:8px 10px;border:1px solid var(--line);border-radius:99px;color:#6d7f96;font-size:9px;white-space:nowrap}.server-pill span{width:7px;height:7px;border-radius:50%;background:#78889b}.server-pill.online{color:#74dcb0}.server-pill.online span{background:var(--green);box-shadow:0 0 0 4px rgba(90,220,165,.09)}
.icon-button{width:39px;height:39px;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.023);color:#8c9cb0}.user-menu{display:flex;align-items:center;gap:9px}.avatar{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,#d7d4ff,#8c7cff);color:#1d1b44;font-size:11px;font-weight:900}
.page-content{max-width:1700px;margin:0 auto;padding:26px 28px 48px}.page-heading{min-height:106px;display:flex;align-items:center;justify-content:space-between;gap:24px}.page-heading h1{margin:5px 0 6px;font-size:34px;letter-spacing:-1.25px}.page-heading p{margin:0;color:var(--muted);font-size:12px}.eyebrow,.breadcrumb{color:#667b94;font-size:9px;font-weight:800;letter-spacing:1.25px;text-transform:uppercase}.breadcrumb span{margin:0 6px;color:#41546c}.heading-actions{display:flex;gap:10px}.primary-button,.secondary-button{min-height:42px;padding:0 15px;border-radius:11px;font-size:11px;font-weight:700}.primary-button{border:1px solid #69e6e8;background:linear-gradient(135deg,#7ff0ee,#4bcbd2);color:#05222a;box-shadow:0 12px 25px rgba(75,203,210,.12)}.secondary-button{border:1px solid var(--line);background:rgba(255,255,255,.023);color:#9aabbf}
.metrics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.metric-card{min-height:151px;padding:20px;border:1px solid var(--line);border-radius:17px;background:linear-gradient(145deg,rgba(16,33,53,.9),rgba(9,23,39,.88));box-shadow:0 18px 50px rgba(0,0,0,.08)}.metric-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.metric-icon{width:39px;height:39px;display:grid;place-items:center;border-radius:12px;background:var(--cyan-soft);color:var(--cyan)}.metric-card.violet .metric-icon{background:rgba(140,124,255,.12);color:#aaa0ff}.metric-card.amber .metric-icon{background:rgba(255,196,119,.1);color:var(--amber)}.metric-card.green .metric-icon{background:rgba(90,220,165,.1);color:var(--green)}.metric-label{display:block;color:#8393a8;font-size:10px}.metric-card>strong{display:block;margin-top:7px;font-size:25px;letter-spacing:-.6px}.metric-card>small{display:block;margin-top:7px;color:#60738a;font-size:9px}.trend{font-size:9px;font-weight:800}.positive{color:var(--green)!important}.negative{color:var(--danger)!important}
.surface{border:1px solid var(--line);border-radius:17px;background:linear-gradient(145deg,rgba(15,31,50,.9),rgba(8,22,37,.9));box-shadow:0 18px 50px rgba(0,0,0,.08)}.surface h2{margin:5px 0 0;font-size:17px}.surface-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.surface-header select{padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#0a1929;color:#8191a6;font-size:9px;outline:0}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,.78fr);gap:14px;margin-top:14px}.cash-flow-panel,.quick-panel,.activity-panel{padding:20px}.chart-summary{display:flex;gap:42px;margin:20px 0 8px}.chart-summary span{display:block;color:#63778f;font-size:9px}.chart-summary strong{display:block;margin-top:5px;font-size:13px}.chart-wrap{height:225px;position:relative;margin-top:8px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 52px,rgba(151,178,210,.07) 53px)}.chart-wrap svg{width:100%;height:195px}.chart-months{display:flex;justify-content:space-between;color:#52667e;font-size:8px}
.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.quick-action{min-height:102px;padding:14px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.022);color:var(--text);text-align:left;transition:.2s ease}.quick-action:hover{transform:translateY(-2px);border-color:rgba(98,228,231,.24);background:rgba(98,228,231,.045)}.quick-action>span{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;background:rgba(98,228,231,.08);color:var(--cyan)}.quick-action strong{display:block;margin-top:10px;font-size:10px}.quick-action small{display:block;margin-top:4px;color:#60738a;font-size:8px}
.lower-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(310px,.72fr);gap:14px;margin-top:14px}.text-button{border:0;background:transparent;color:var(--cyan);font-size:9px}.activity-row{min-height:52px;display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:11px;border-top:1px solid rgba(151,178,210,.08)}.activity-row:first-of-type{margin-top:12px}.activity-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;background:rgba(98,228,231,.055);color:#77dce1}.activity-row strong{display:block;font-size:10px}.activity-row small{display:block;margin-top:4px;color:#60728a;font-size:8px}.activity-row time{color:#60728a;font-size:8px}.insight-panel{padding:28px;background:linear-gradient(145deg,rgba(37,33,72,.91),rgba(10,29,46,.91));border-color:rgba(140,124,255,.21)}.insight-badge{color:#bdb6ff;font-size:9px;letter-spacing:1.2px;font-weight:800}.insight-panel h2{margin-top:19px;font-size:22px}.insight-panel p{color:#98a4b7;font-size:11px;line-height:1.72}.insight-panel p strong{color:#e5e1ff}.insight-panel button{margin-top:12px;padding:10px 12px;border:1px solid rgba(140,124,255,.25);border-radius:10px;background:rgba(140,124,255,.1);color:#e2deff;font-size:9px}
.module-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.small-stat{padding:18px;border:1px solid var(--line);border-radius:15px;background:rgba(13,29,47,.72)}.small-stat span,.small-stat small{display:block;color:#64768d;font-size:9px}.small-stat strong{display:block;margin:7px 0;font-size:24px}.module-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:14px 0}.module-card{min-height:92px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:15px;border:1px solid var(--line);border-radius:15px;background:linear-gradient(145deg,rgba(15,31,50,.78),rgba(8,22,37,.78));color:var(--text);text-align:left}.module-card:hover{border-color:rgba(98,228,231,.23)}.module-card>span{width:40px;height:40px;display:grid;place-items:center;border-radius:11px;background:rgba(98,228,231,.08);color:var(--cyan)}.module-card strong{display:block;font-size:10px}.module-card small{display:block;margin-top:5px;color:#60738a;font-size:8px}.module-card>b{color:#5d7189}
.records-panel{padding:20px}.table-actions{display:flex;gap:8px}.table-actions input{width:190px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#091725;color:var(--text);font-size:9px;outline:0}.table-actions button{width:34px;border:1px solid var(--line);border-radius:9px;background:#091725;color:#71839a}.data-table{margin-top:15px;overflow:auto}.table-row{width:100%;min-width:720px;min-height:48px;display:grid;grid-template-columns:1fr 1fr 2.2fr .9fr .8fr;align-items:center;gap:14px;padding:0 12px;border:0;border-top:1px solid rgba(151,178,210,.08);background:transparent;color:#a8b6c7;text-align:left;font-size:9px}.table-row:not(.table-head):hover{background:rgba(255,255,255,.02)}.table-head{min-height:36px;border:0;color:#52667e;font-size:8px;font-weight:800}.table-row strong{color:#dbe6f1}.status{display:inline-block;padding:4px 8px;border-radius:99px;background:rgba(90,220,165,.09);color:var(--green);font-style:normal}.status.draft{background:rgba(255,196,119,.09);color:var(--amber)}.status.approved{background:rgba(140,124,255,.09);color:#aba2ff}
.reports-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.report-card{min-height:145px;display:flex;flex-direction:column;align-items:flex-start;padding:19px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(145deg,rgba(15,31,50,.86),rgba(8,22,37,.86));color:var(--text);text-align:left}.report-card:hover{border-color:rgba(98,228,231,.23);transform:translateY(-2px)}.report-card>span{width:40px;height:40px;display:grid;place-items:center;border-radius:11px;background:rgba(98,228,231,.08);color:var(--cyan)}.report-card div{margin-top:14px}.report-card strong{display:block;font-size:11px}.report-card small{display:block;margin-top:5px;color:#65778e;font-size:8px}.report-card>b{margin-top:auto;color:#61758d;font-size:8px}.planned-banner{display:flex;align-items:center;justify-content:space-between;min-height:165px;margin-bottom:14px;padding:28px;border:1px solid rgba(140,124,255,.2);border-radius:18px;background:linear-gradient(135deg,rgba(140,124,255,.13),rgba(98,228,231,.05))}.planned-banner span{color:#a9a0ff;font-size:8px;font-weight:800;letter-spacing:1.5px}.planned-banner h2{margin:8px 0;font-size:22px}.planned-banner p{max-width:680px;margin:0;color:#8796aa;font-size:10px;line-height:1.6}.planned-orb{width:82px;height:82px;display:grid;place-items:center;border:1px solid rgba(140,124,255,.25);border-radius:50%;background:rgba(140,124,255,.08);font-size:30px;color:#bcb5ff}
.modal-backdrop{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px;background:rgba(2,8,15,.76);backdrop-filter:blur(8px)}.modal-backdrop[hidden]{display:none}.modal-card{width:min(720px,100%);padding:22px;border:1px solid rgba(151,178,210,.18);border-radius:20px;background:#0a1a2b;box-shadow:var(--shadow)}.modal-header{display:flex;align-items:flex-start;justify-content:space-between}.modal-header h2{margin:5px 0 0}.modal-header button{border:0;background:transparent;color:#8495aa;font-size:25px}.transaction-options{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-top:20px}.toast{position:fixed;left:50%;bottom:25px;z-index:200;max-width:460px;transform:translate(-50%,30px);padding:11px 15px;border:1px solid rgba(98,228,231,.2);border-radius:11px;background:#10283d;color:#dffeff;box-shadow:var(--shadow);font-size:10px;opacity:0;pointer-events:none;transition:.24s ease}.toast.show{opacity:1;transform:translate(-50%,0)}.sidebar-overlay{display:none}
@media(max-width:1200px){.server-pill{display:none}.metrics-grid{grid-template-columns:repeat(2,1fr)}.module-grid,.reports-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:980px){.app-shell{grid-template-columns:86px minmax(0,1fr)}.sidebar{padding-inline:10px}.brand-copy,.menu-label,.menu-text,.menu-badge,.copilot-card{display:none}.brand-row{justify-content:center;padding:0}.menu-item{justify-content:center}.menu-icon{font-size:18px}.dashboard-grid,.lower-grid{grid-template-columns:1fr}.company-switcher{min-width:0}.company-switcher>div:last-child{display:none}.user-menu>div:last-child{display:none}.global-search{max-width:none}}
@media(max-width:720px){.app-shell{display:block}.sidebar{position:fixed;left:0;top:0;width:min(310px,88vw);transform:translateX(-102%);transition:.22s ease;box-shadow:var(--shadow)}.sidebar.open{transform:translateX(0)}.sidebar.open .brand-copy,.sidebar.open .menu-label,.sidebar.open .menu-text,.sidebar.open .menu-badge,.sidebar.open .copilot-card{display:block}.sidebar.open .menu-item{justify-content:flex-start}.sidebar-close{display:block}.sidebar-overlay.visible{display:block;position:fixed;inset:0;z-index:35;background:rgba(2,8,14,.68)}.mobile-menu{display:block}.topbar{height:68px;padding:0 15px;gap:10px}.global-search{display:none}.icon-button{margin-left:auto}.page-content{padding:18px 15px 35px}.page-heading{align-items:flex-start;flex-direction:column;padding:10px 0 22px}.page-heading h1{font-size:28px}.heading-actions{width:100%}.heading-actions button{flex:1}.metrics-grid,.module-stat-grid,.module-grid,.reports-grid{grid-template-columns:1fr}.quick-grid{grid-template-columns:1fr 1fr}.chart-summary{gap:22px}.transaction-options{grid-template-columns:1fr 1fr}.planned-orb{display:none}.table-actions input{width:140px}}
@media(max-width:430px){.metrics-grid,.quick-grid,.transaction-options{grid-template-columns:1fr}.chart-summary{justify-content:space-between;gap:8px}.chart-wrap{height:185px}.chart-wrap svg{height:155px}}


/* =========================================================
   WORKING CHART OF ACCOUNTS — ORIGINAL AVALANCHEAI DESIGN
   ========================================================= */
.coa-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.coa-summary-card{min-height:118px;padding:18px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(145deg,rgba(16,33,53,.9),rgba(9,23,39,.88))}
.coa-summary-card span{display:block;color:#71849c;font-size:9px}
.coa-summary-card strong{display:block;margin:10px 0 5px;font-size:24px;letter-spacing:-.5px}
.coa-summary-card small{display:block;color:#566b84;font-size:8px}
.coa-summary-card .connected-value{color:var(--green)}
.coa-summary-card .offline-value{color:var(--danger)}
.coa-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:14px;padding:15px 18px}
.coa-toolbar-left,.coa-toolbar-right{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.coa-search{width:min(380px,52vw);height:38px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:#091725;color:var(--text);font-size:10px;outline:0}
.coa-search:focus{border-color:rgba(98,228,231,.4);box-shadow:0 0 0 3px rgba(98,228,231,.05)}
.coa-search::placeholder{color:#52667e}
.coa-button{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.023);color:#98aabe;font-size:9px;font-weight:750;white-space:nowrap}
.coa-button:hover{border-color:rgba(98,228,231,.26);color:#e7fbff;background:rgba(98,228,231,.045)}
.coa-button.primary{border-color:#69e6e8;background:linear-gradient(135deg,#7ff0ee,#4bcbd2);color:#05222a}
.coa-button.danger{border-color:rgba(255,127,145,.25);color:#ff9aaa;background:rgba(255,127,145,.06)}
.coa-button:disabled{opacity:.5}
.coa-list-panel{margin-top:14px;padding:20px}
.coa-list-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.coa-list-title h2{margin:5px 0 0}
.coa-count{padding:6px 9px;border:1px solid var(--line);border-radius:99px;color:#71849c;font-size:8px}
.coa-table-wrap{overflow:auto;margin-top:15px}
.coa-table{width:100%;min-width:720px;border-collapse:collapse}
.coa-table th{height:37px;padding:0 12px;border-bottom:1px solid rgba(151,178,210,.1);color:#52667e;font-size:8px;font-weight:800;letter-spacing:.55px;text-align:left}
.coa-table td{height:50px;padding:8px 12px;border-bottom:1px solid rgba(151,178,210,.075);color:#a8b6c7;font-size:9px}
.coa-table tr:hover td{background:rgba(255,255,255,.015)}
.coa-code{display:inline-flex;align-items:center;padding:5px 8px;border:1px solid rgba(98,228,231,.13);border-radius:7px;background:rgba(98,228,231,.055);color:#bffcff;font-family:"Cascadia Code",Consolas,monospace;font-weight:800}
.coa-actions{display:flex;justify-content:flex-end;gap:6px}
.coa-icon-button{width:31px;height:31px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:#091725;color:#71839a;font-size:12px}
.coa-icon-button:hover{border-color:rgba(98,228,231,.3);color:var(--cyan)}
.coa-icon-button.delete:hover{border-color:rgba(255,127,145,.32);color:var(--danger)}
.coa-empty{min-height:235px;display:grid;place-items:center;padding:25px;text-align:center}
.coa-empty-icon{width:52px;height:52px;display:grid;place-items:center;margin:0 auto 12px;border-radius:15px;background:rgba(98,228,231,.08);color:var(--cyan);font-size:20px}
.coa-empty h3{margin:0;font-size:13px}
.coa-empty p{max-width:460px;margin:7px auto 0;color:#63768e;font-size:9px;line-height:1.6}
.coa-loading{min-height:235px;display:flex;align-items:center;justify-content:center;gap:10px;color:#71849b;font-size:10px}
.coa-spinner{width:20px;height:20px;border:2px solid rgba(151,178,210,.14);border-top-color:var(--cyan);border-radius:50%;animation:coa-spin .65s linear infinite}
@keyframes coa-spin{to{transform:rotate(360deg)}}
.coa-pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:14px;border-top:1px solid rgba(151,178,210,.08)}
.coa-page-info{color:#5f738c;font-size:8px}
.coa-page-controls{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.coa-page-button{min-width:31px;height:31px;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:#091725;color:#71839a;font-size:8px;font-weight:800}
.coa-page-button:hover:not(:disabled),.coa-page-button.active{border-color:rgba(98,228,231,.32);color:#dfffff;background:rgba(98,228,231,.08)}
.coa-page-button.active{color:#05222a;background:var(--cyan)}
.coa-page-size{height:31px;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:#091725;color:#8395aa;font-size:8px;outline:0}
.coa-error{margin-top:14px;padding:13px 15px;border:1px solid rgba(255,127,145,.22);border-radius:12px;background:rgba(255,127,145,.065);color:#f7a3b0;font-size:9px;line-height:1.55}
.coa-form-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(270px,.65fr);gap:14px}
.coa-form-card,.coa-help-card{padding:22px}
.coa-form-card form{display:grid;gap:18px}
.coa-field{display:grid;gap:7px}
.coa-field label{color:#aebdcd;font-size:9px;font-weight:800;letter-spacing:.45px;text-transform:uppercase}
.coa-field label b{color:var(--danger)}
.coa-field input{height:44px;padding:0 13px;border:1px solid var(--line);border-radius:11px;background:#081725;color:var(--text);font-size:11px;outline:0}
.coa-field input:focus{border-color:rgba(98,228,231,.42);box-shadow:0 0 0 3px rgba(98,228,231,.055)}
.coa-field small{color:#596c84;font-size:8px}
.coa-form-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:18px;border-top:1px solid rgba(151,178,210,.08)}
.coa-help-card h2{margin:5px 0 8px}
.coa-help-card p{margin:0;color:#71839a;font-size:9px;line-height:1.65}
.coa-help-list{display:grid;gap:12px;margin-top:18px}
.coa-help-item{display:grid;grid-template-columns:28px 1fr;gap:10px}
.coa-help-number{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:rgba(98,228,231,.08);color:var(--cyan);font-size:9px;font-weight:800}
.coa-help-item strong{display:block;font-size:9px}
.coa-help-item small{display:block;margin-top:3px;color:#5f728a;font-size:8px;line-height:1.5}
.coa-modal-card{width:min(460px,100%);padding:24px;border:1px solid rgba(255,127,145,.18);border-radius:19px;background:#0a1a2b;box-shadow:var(--shadow);text-align:center}
.coa-modal-icon{width:52px;height:52px;display:grid;place-items:center;margin:0 auto 14px;border-radius:15px;background:rgba(255,127,145,.08);color:var(--danger);font-size:22px;font-weight:900}
.coa-modal-card h2{margin:0;font-size:18px}
.coa-modal-card p{margin:8px 0 0;color:#71839a;font-size:9px;line-height:1.65}
.coa-modal-actions{display:flex;justify-content:center;gap:9px;margin-top:21px}
.toast.success{border-color:rgba(90,220,165,.25);background:#102b2a;color:#caffec}
.toast.error{border-color:rgba(255,127,145,.25);background:#2b1821;color:#ffd7de}
.coa-print-area{display:none}
@media(max-width:1200px){.coa-summary-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:880px){.coa-form-grid{grid-template-columns:1fr}.coa-toolbar{align-items:stretch;flex-direction:column}.coa-search{width:100%;max-width:none}}
@media(max-width:720px){.coa-summary-grid{grid-template-columns:1fr}.coa-list-header,.coa-pagination{align-items:stretch;flex-direction:column}.coa-toolbar-left,.coa-toolbar-right{width:100%}.coa-button{flex:1}.coa-form-actions{flex-direction:column-reverse}.coa-form-actions .coa-button{width:100%}}
@media print{
  body *{visibility:hidden!important}
  .coa-print-area,.coa-print-area *{visibility:visible!important}
  .coa-print-area{position:absolute;display:block!important;inset:0;padding:18mm 14mm;color:#111;background:#fff;font-family:Arial,sans-serif}
  .coa-print-area h1{margin:0 0 4mm;font-size:20pt}
  .coa-print-meta{margin-bottom:6mm;color:#475569;font-size:9pt}
  .coa-print-area table{width:100%;border-collapse:collapse}
  .coa-print-area th,.coa-print-area td{padding:2.5mm;border:1px solid #cbd5e1;font-size:9pt;text-align:left}
  .coa-print-area th{background:#e2e8f0}
}


/* Auxiliary Account submenu and form */
.menu-item.sub-menu-item{width:calc(100% - 22px);margin-left:22px;padding-left:15px;border-left:1px solid rgba(98,228,231,.13);border-radius:0 10px 10px 0}
.menu-item.sub-menu-item .menu-icon{font-size:10px;color:#5f8098}
.menu-item.sub-menu-item.active{border-left-color:var(--cyan)}
.coa-field select{height:44px;padding:0 13px;border:1px solid var(--line);border-radius:11px;background:#081725;color:var(--text);font-size:10px;outline:0}
.coa-field select:focus{border-color:rgba(98,228,231,.42);box-shadow:0 0 0 3px rgba(98,228,231,.055)}
.coa-field input[readonly]{color:#7adfe3;background:rgba(98,228,231,.035);cursor:default}
.aux-preview-grid{display:grid;grid-template-columns:minmax(0,.55fr) minmax(0,1.45fr);gap:14px}
.auxiliary-table{min-width:980px}
.aux-master-description{display:block;margin-top:4px;color:#566b84;font-size:7px;max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aux-number{display:inline-grid;min-width:30px;height:25px;padding:0 7px;place-items:center;border-radius:8px;background:rgba(140,124,255,.08);color:#bdb3ff;font-size:9px;font-weight:800}
@media(max-width:720px){.aux-preview-grid{grid-template-columns:1fr}}

.number-cell { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }


/* Shared row actions: Edit and Delete stay on one line */
.coa-actions-column{text-align:right!important;width:94px}
.coa-actions,.coa-row-actions{display:flex!important;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}
.coa-actions .coa-icon-button,.coa-row-actions .coa-icon-button{flex:0 0 31px}
.theme-toggle{position:relative;display:grid;place-items:center;transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease}
.theme-toggle:hover{transform:translateY(-1px);border-color:rgba(98,228,231,.34);color:var(--cyan)}
.theme-icon{font-size:16px;line-height:1}

/* Light mode */
:root[data-theme="light"]{
  color-scheme:light;
  --bg:#f4f7fb;
  --bg-soft:#edf3f8;
  --panel:rgba(255,255,255,.96);
  --panel-strong:#ffffff;
  --line:rgba(51,75,102,.16);
  --muted:#62758a;
  --muted-2:#7a8ca0;
  --text:#13263a;
  --cyan:#0f9fa8;
  --cyan-soft:rgba(15,159,168,.11);
  --violet:#6756d9;
  --green:#14885f;
  --amber:#b56a12;
  --danger:#cf3854;
  --shadow:0 22px 55px rgba(42,66,92,.12);
}
:root[data-theme="light"] html{background:var(--bg)}
:root[data-theme="light"] body{background:radial-gradient(circle at 76% -10%,rgba(55,135,210,.10),transparent 34%),var(--bg);color:var(--text)}
:root[data-theme="light"] .sidebar{background:linear-gradient(180deg,#ffffff,#f4f8fb);border-right-color:rgba(51,75,102,.14);box-shadow:12px 0 36px rgba(42,66,92,.07)}
:root[data-theme="light"] .brand-copy strong{color:#163047}
:root[data-theme="light"] .brand-copy small{color:#7890a5}
:root[data-theme="light"] .menu-label{color:#7b90a5}
:root[data-theme="light"] .menu-item{color:#5b7187}
:root[data-theme="light"] .menu-item:hover{background:rgba(15,159,168,.06);color:#18364d}
:root[data-theme="light"] .menu-item.active{color:#0e4650;border-color:rgba(15,159,168,.18);background:linear-gradient(90deg,rgba(15,159,168,.14),rgba(15,159,168,.035));box-shadow:inset 3px 0 0 var(--cyan)}
:root[data-theme="light"] .menu-icon{color:#738a9f}
:root[data-theme="light"] .copilot-card{border-color:rgba(103,86,217,.16);background:linear-gradient(135deg,rgba(103,86,217,.08),rgba(15,159,168,.05))}
:root[data-theme="light"] .copilot-title{color:#5547b9}
:root[data-theme="light"] .copilot-card p{color:#71859a}
:root[data-theme="light"] .topbar{background:rgba(255,255,255,.88);border-bottom-color:rgba(51,75,102,.14);box-shadow:0 8px 24px rgba(42,66,92,.05)}
:root[data-theme="light"] .global-search,
:root[data-theme="light"] .mobile-menu,
:root[data-theme="light"] .icon-button,
:root[data-theme="light"] .secondary-button,
:root[data-theme="light"] .coa-button{background:#ffffff;color:#5d7287;border-color:rgba(51,75,102,.16)}
:root[data-theme="light"] .global-search input{color:#183047}
:root[data-theme="light"] .global-search input::placeholder{color:#8b9cac}
:root[data-theme="light"] .global-search kbd{background:#eef3f7;color:#71869a}
:root[data-theme="light"] .server-pill{background:#ffffff;color:#6c8297}
:root[data-theme="light"] .server-pill.online{color:#147a59;background:#f0fbf6}
:root[data-theme="light"] .company-switcher strong,
:root[data-theme="light"] .user-menu strong{color:#173047}
:root[data-theme="light"] .company-switcher small,
:root[data-theme="light"] .user-menu small{color:#7a8fa4}
:root[data-theme="light"] .surface,
:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .coa-summary-card{background:linear-gradient(145deg,#ffffff,#f8fbfd);box-shadow:0 14px 38px rgba(42,66,92,.08)}
:root[data-theme="light"] .page-heading h1,
:root[data-theme="light"] .surface h2,
:root[data-theme="light"] .coa-summary-card strong,
:root[data-theme="light"] .metric-card>strong,
:root[data-theme="light"] .quick-action strong,
:root[data-theme="light"] .activity-row strong{color:#102a40}
:root[data-theme="light"] .page-heading p,
:root[data-theme="light"] .metric-label,
:root[data-theme="light"] .metric-card>small,
:root[data-theme="light"] .quick-action small,
:root[data-theme="light"] .activity-row small,
:root[data-theme="light"] .activity-row time{color:#6d8297}
:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .breadcrumb{color:#678198}
:root[data-theme="light"] .breadcrumb span{color:#9aa9b6}
:root[data-theme="light"] .quick-action{background:#ffffff;color:#173047}
:root[data-theme="light"] .quick-action:hover{background:#f3fbfb}
:root[data-theme="light"] .surface-header select,
:root[data-theme="light"] .coa-search,
:root[data-theme="light"] .coa-page-button,
:root[data-theme="light"] .coa-page-size,
:root[data-theme="light"] .coa-icon-button,
:root[data-theme="light"] .coa-field input,
:root[data-theme="light"] .coa-field select,
:root[data-theme="light"] .table-actions input,
:root[data-theme="light"] .table-actions button{background:#ffffff;color:#405a70;border-color:rgba(51,75,102,.17)}
:root[data-theme="light"] .coa-search::placeholder{color:#91a1b0}
:root[data-theme="light"] .coa-field label{color:#50687e}
:root[data-theme="light"] .coa-field small,
:root[data-theme="light"] .coa-help-card p,
:root[data-theme="light"] .coa-help-item small,
:root[data-theme="light"] .coa-empty p,
:root[data-theme="light"] .coa-page-info{color:#71869a}
:root[data-theme="light"] .coa-table th{color:#6d8398;border-bottom-color:rgba(51,75,102,.14)}
:root[data-theme="light"] .coa-table td{color:#405b72;border-bottom-color:rgba(51,75,102,.10)}
:root[data-theme="light"] .coa-table tr:hover td{background:rgba(15,159,168,.035)}
:root[data-theme="light"] .coa-code{color:#08767e;background:rgba(15,159,168,.08);border-color:rgba(15,159,168,.18)}
:root[data-theme="light"] .coa-count{color:#637c91;background:#f7fafc}
:root[data-theme="light"] .coa-page-button:hover:not(:disabled),
:root[data-theme="light"] .coa-page-button.active{color:#0b5960;background:rgba(15,159,168,.10)}
:root[data-theme="light"] .coa-page-button.active{color:#ffffff;background:var(--cyan)}
:root[data-theme="light"] .coa-button:hover,
:root[data-theme="light"] .secondary-button:hover{color:#0b5960;background:#f2fbfb;border-color:rgba(15,159,168,.28)}
:root[data-theme="light"] .coa-modal-card,
:root[data-theme="light"] .modal-card{background:#ffffff;color:#173047}
:root[data-theme="light"] .toast{background:#ffffff;color:#173047;border-color:rgba(15,159,168,.24)}
:root[data-theme="light"] .toast.success{background:#eefbf5;color:#176b50}
:root[data-theme="light"] .toast.error{background:#fff2f4;color:#a72d45}
:root[data-theme="light"] .chart-wrap{background:repeating-linear-gradient(to bottom,transparent 0,transparent 52px,rgba(51,75,102,.08) 53px)}
:root[data-theme="light"] .modal-backdrop{background:rgba(26,45,63,.42)}


/* Accessible typography controls */
.font-size-toggle{
  position:relative;
  display:grid;
  place-items:center;
  transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease
}
.font-size-toggle:hover{
  transform:translateY(-1px);
  border-color:rgba(98,228,231,.34);
  color:var(--cyan)
}
.font-size-icon{
  font-size:12px;
  line-height:1;
  font-weight:900;
  letter-spacing:-.4px
}

/* Large text mode */
:root[data-font-size="large"] .app-shell{grid-template-columns:310px minmax(0,1fr)}
:root[data-font-size="large"] .brand-copy strong{font-size:22px}
:root[data-font-size="large"] .brand-copy small{font-size:10px}
:root[data-font-size="large"] .menu-label{font-size:11px}
:root[data-font-size="large"] .menu-item{height:47px}
:root[data-font-size="large"] .menu-text{font-size:15px}
:root[data-font-size="large"] .menu-badge{font-size:10px}
:root[data-font-size="large"] .copilot-title{font-size:13px}
:root[data-font-size="large"] .copilot-card p{font-size:12px}
:root[data-font-size="large"] .topbar{height:86px}
:root[data-font-size="large"] .company-switcher small,
:root[data-font-size="large"] .user-menu small{font-size:10px}
:root[data-font-size="large"] .company-switcher strong,
:root[data-font-size="large"] .user-menu strong{font-size:14px}
:root[data-font-size="large"] .global-search{height:47px}
:root[data-font-size="large"] .global-search input{font-size:14px}
:root[data-font-size="large"] .global-search kbd{font-size:10px}
:root[data-font-size="large"] .server-pill{font-size:11px}
:root[data-font-size="large"] .avatar{font-size:13px}
:root[data-font-size="large"] .page-heading{min-height:120px}
:root[data-font-size="large"] .page-heading h1{font-size:39px}
:root[data-font-size="large"] .page-heading p{font-size:15px}
:root[data-font-size="large"] .eyebrow,
:root[data-font-size="large"] .breadcrumb{font-size:11px}
:root[data-font-size="large"] .primary-button,
:root[data-font-size="large"] .secondary-button{min-height:46px;font-size:14px}
:root[data-font-size="large"] .metric-label{font-size:13px}
:root[data-font-size="large"] .metric-card>strong{font-size:29px}
:root[data-font-size="large"] .metric-card>small,
:root[data-font-size="large"] .trend{font-size:11px}
:root[data-font-size="large"] .surface h2{font-size:21px}
:root[data-font-size="large"] .surface-header select{font-size:12px}
:root[data-font-size="large"] .chart-summary span{font-size:11px}
:root[data-font-size="large"] .chart-summary strong{font-size:16px}
:root[data-font-size="large"] .chart-months{font-size:10px}
:root[data-font-size="large"] .quick-action strong,
:root[data-font-size="large"] .activity-row strong,
:root[data-font-size="large"] .module-card strong{font-size:13px}
:root[data-font-size="large"] .quick-action small,
:root[data-font-size="large"] .activity-row small,
:root[data-font-size="large"] .activity-row time,
:root[data-font-size="large"] .module-card small{font-size:11px}
:root[data-font-size="large"] .text-button{font-size:12px}
:root[data-font-size="large"] .insight-badge{font-size:11px}
:root[data-font-size="large"] .insight-panel h2{font-size:26px}
:root[data-font-size="large"] .insight-panel p{font-size:14px}
:root[data-font-size="large"] .insight-panel button{font-size:12px}
:root[data-font-size="large"] .small-stat span,
:root[data-font-size="large"] .small-stat small{font-size:11px}
:root[data-font-size="large"] .small-stat strong{font-size:28px}
:root[data-font-size="large"] .table-actions input{font-size:12px}
:root[data-font-size="large"] .table-row{min-height:54px;font-size:12px}
:root[data-font-size="large"] .table-head{font-size:11px}
:root[data-font-size="large"] .report-card strong{font-size:14px}
:root[data-font-size="large"] .report-card small,
:root[data-font-size="large"] .report-card>b{font-size:11px}
:root[data-font-size="large"] .planned-banner span{font-size:10px}
:root[data-font-size="large"] .planned-banner h2{font-size:26px}
:root[data-font-size="large"] .planned-banner p{font-size:13px}
:root[data-font-size="large"] .toast{font-size:13px}

:root[data-font-size="large"] .coa-summary-card span{font-size:12px}
:root[data-font-size="large"] .coa-summary-card strong{font-size:29px}
:root[data-font-size="large"] .coa-summary-card small{font-size:11px}
:root[data-font-size="large"] .coa-search{height:45px;font-size:14px}
:root[data-font-size="large"] .coa-button{min-height:44px;font-size:12px}
:root[data-font-size="large"] .coa-count{font-size:11px}
:root[data-font-size="large"] .coa-table th{height:44px;font-size:11px}
:root[data-font-size="large"] .coa-table td{height:58px;font-size:13px}
:root[data-font-size="large"] .coa-icon-button{width:36px;height:36px;font-size:15px}
:root[data-font-size="large"] .coa-actions-column{width:112px}
:root[data-font-size="large"] .coa-actions .coa-icon-button,
:root[data-font-size="large"] .coa-row-actions .coa-icon-button{flex-basis:36px}
:root[data-font-size="large"] .coa-empty h3{font-size:16px}
:root[data-font-size="large"] .coa-empty p{font-size:12px}
:root[data-font-size="large"] .coa-loading{font-size:13px}
:root[data-font-size="large"] .coa-page-info,
:root[data-font-size="large"] .coa-page-button,
:root[data-font-size="large"] .coa-page-size{font-size:11px}
:root[data-font-size="large"] .coa-page-button,
:root[data-font-size="large"] .coa-page-size{height:36px}
:root[data-font-size="large"] .coa-error{font-size:12px}
:root[data-font-size="large"] .coa-field label{font-size:12px}
:root[data-font-size="large"] .coa-field input,
:root[data-font-size="large"] .coa-field select{height:50px;font-size:14px}
:root[data-font-size="large"] .coa-field small{font-size:11px}
:root[data-font-size="large"] .coa-help-card p{font-size:12px}
:root[data-font-size="large"] .coa-help-number{font-size:12px}
:root[data-font-size="large"] .coa-help-item strong{font-size:12px}
:root[data-font-size="large"] .coa-help-item small{font-size:11px}
:root[data-font-size="large"] .coa-modal-card h2{font-size:22px}
:root[data-font-size="large"] .coa-modal-card p{font-size:12px}
:root[data-font-size="large"] .aux-master-description{font-size:10px}
:root[data-font-size="large"] .aux-number{font-size:12px}

/* Extra-large text mode */
:root[data-font-size="xlarge"] .app-shell{grid-template-columns:330px minmax(0,1fr)}
:root[data-font-size="xlarge"] .brand-copy strong{font-size:24px}
:root[data-font-size="xlarge"] .brand-copy small{font-size:11px}
:root[data-font-size="xlarge"] .menu-label{font-size:12px}
:root[data-font-size="xlarge"] .menu-item{height:51px}
:root[data-font-size="xlarge"] .menu-text{font-size:17px}
:root[data-font-size="xlarge"] .menu-badge{font-size:11px}
:root[data-font-size="xlarge"] .copilot-title{font-size:15px}
:root[data-font-size="xlarge"] .copilot-card p{font-size:13px}
:root[data-font-size="xlarge"] .topbar{height:92px}
:root[data-font-size="xlarge"] .company-switcher small,
:root[data-font-size="xlarge"] .user-menu small{font-size:11px}
:root[data-font-size="xlarge"] .company-switcher strong,
:root[data-font-size="xlarge"] .user-menu strong{font-size:15px}
:root[data-font-size="xlarge"] .global-search{height:50px}
:root[data-font-size="xlarge"] .global-search input{font-size:16px}
:root[data-font-size="xlarge"] .global-search kbd{font-size:11px}
:root[data-font-size="xlarge"] .server-pill{font-size:12px}
:root[data-font-size="xlarge"] .avatar{font-size:14px}
:root[data-font-size="xlarge"] .page-heading{min-height:128px}
:root[data-font-size="xlarge"] .page-heading h1{font-size:43px}
:root[data-font-size="xlarge"] .page-heading p{font-size:17px}
:root[data-font-size="xlarge"] .eyebrow,
:root[data-font-size="xlarge"] .breadcrumb{font-size:12px}
:root[data-font-size="xlarge"] .primary-button,
:root[data-font-size="xlarge"] .secondary-button{min-height:49px;font-size:15px}
:root[data-font-size="xlarge"] .metric-label{font-size:14px}
:root[data-font-size="xlarge"] .metric-card>strong{font-size:32px}
:root[data-font-size="xlarge"] .metric-card>small,
:root[data-font-size="xlarge"] .trend{font-size:12px}
:root[data-font-size="xlarge"] .surface h2{font-size:23px}
:root[data-font-size="xlarge"] .surface-header select{font-size:13px}
:root[data-font-size="xlarge"] .chart-summary span{font-size:12px}
:root[data-font-size="xlarge"] .chart-summary strong{font-size:18px}
:root[data-font-size="xlarge"] .chart-months{font-size:11px}
:root[data-font-size="xlarge"] .quick-action strong,
:root[data-font-size="xlarge"] .activity-row strong,
:root[data-font-size="xlarge"] .module-card strong{font-size:14px}
:root[data-font-size="xlarge"] .quick-action small,
:root[data-font-size="xlarge"] .activity-row small,
:root[data-font-size="xlarge"] .activity-row time,
:root[data-font-size="xlarge"] .module-card small{font-size:12px}
:root[data-font-size="xlarge"] .text-button{font-size:13px}
:root[data-font-size="xlarge"] .insight-badge{font-size:12px}
:root[data-font-size="xlarge"] .insight-panel h2{font-size:29px}
:root[data-font-size="xlarge"] .insight-panel p{font-size:15px}
:root[data-font-size="xlarge"] .insight-panel button{font-size:13px}
:root[data-font-size="xlarge"] .small-stat span,
:root[data-font-size="xlarge"] .small-stat small{font-size:12px}
:root[data-font-size="xlarge"] .small-stat strong{font-size:31px}
:root[data-font-size="xlarge"] .table-actions input{font-size:13px}
:root[data-font-size="xlarge"] .table-row{min-height:58px;font-size:13px}
:root[data-font-size="xlarge"] .table-head{font-size:12px}
:root[data-font-size="xlarge"] .report-card strong{font-size:15px}
:root[data-font-size="xlarge"] .report-card small,
:root[data-font-size="xlarge"] .report-card>b{font-size:12px}
:root[data-font-size="xlarge"] .planned-banner span{font-size:11px}
:root[data-font-size="xlarge"] .planned-banner h2{font-size:29px}
:root[data-font-size="xlarge"] .planned-banner p{font-size:14px}
:root[data-font-size="xlarge"] .toast{font-size:14px}

:root[data-font-size="xlarge"] .coa-summary-card span{font-size:13px}
:root[data-font-size="xlarge"] .coa-summary-card strong{font-size:32px}
:root[data-font-size="xlarge"] .coa-summary-card small{font-size:12px}
:root[data-font-size="xlarge"] .coa-search{height:49px;font-size:16px}
:root[data-font-size="xlarge"] .coa-button{min-height:47px;font-size:13px}
:root[data-font-size="xlarge"] .coa-count{font-size:12px}
:root[data-font-size="xlarge"] .coa-table th{height:48px;font-size:12px}
:root[data-font-size="xlarge"] .coa-table td{height:63px;font-size:14px}
:root[data-font-size="xlarge"] .coa-icon-button{width:39px;height:39px;font-size:16px}
:root[data-font-size="xlarge"] .coa-actions-column{width:122px}
:root[data-font-size="xlarge"] .coa-actions .coa-icon-button,
:root[data-font-size="xlarge"] .coa-row-actions .coa-icon-button{flex-basis:39px}
:root[data-font-size="xlarge"] .coa-empty h3{font-size:18px}
:root[data-font-size="xlarge"] .coa-empty p{font-size:13px}
:root[data-font-size="xlarge"] .coa-loading{font-size:14px}
:root[data-font-size="xlarge"] .coa-page-info,
:root[data-font-size="xlarge"] .coa-page-button,
:root[data-font-size="xlarge"] .coa-page-size{font-size:12px}
:root[data-font-size="xlarge"] .coa-page-button,
:root[data-font-size="xlarge"] .coa-page-size{height:39px}
:root[data-font-size="xlarge"] .coa-error{font-size:13px}
:root[data-font-size="xlarge"] .coa-field label{font-size:13px}
:root[data-font-size="xlarge"] .coa-field input,
:root[data-font-size="xlarge"] .coa-field select{height:54px;font-size:16px}
:root[data-font-size="xlarge"] .coa-field small{font-size:12px}
:root[data-font-size="xlarge"] .coa-help-card p{font-size:13px}
:root[data-font-size="xlarge"] .coa-help-number{font-size:13px}
:root[data-font-size="xlarge"] .coa-help-item strong{font-size:13px}
:root[data-font-size="xlarge"] .coa-help-item small{font-size:12px}
:root[data-font-size="xlarge"] .coa-modal-card h2{font-size:24px}
:root[data-font-size="xlarge"] .coa-modal-card p{font-size:13px}
:root[data-font-size="xlarge"] .aux-master-description{font-size:11px}
:root[data-font-size="xlarge"] .aux-number{font-size:13px}

@media(max-width:980px){
  :root[data-font-size="large"] .app-shell,
  :root[data-font-size="xlarge"] .app-shell{
    grid-template-columns:86px minmax(0,1fr)
  }
}
@media(max-width:720px){
  :root[data-font-size="large"] .page-heading h1{font-size:32px}
  :root[data-font-size="xlarge"] .page-heading h1{font-size:35px}
  :root[data-font-size="large"] .topbar,
  :root[data-font-size="xlarge"] .topbar{height:72px}
}

/* PERMANENT GLOBAL APPLICATION FONT ENLARGEMENT */
/* Applies to every screen, independent of the A/A+/A++ setting. */
body{font-size:16px}

/* Main navigation */
.brand-copy strong{font-size:24px!important}
.brand-copy small{font-size:11px!important;letter-spacing:2.3px}
.menu-label{font-size:12px!important}
.menu-item{min-height:50px!important;height:auto!important;padding-top:10px!important;padding-bottom:10px!important}
.menu-text{font-size:16px!important;line-height:1.25!important}
.menu-icon{font-size:18px!important}
.menu-badge{font-size:11px!important}
.copilot-title{font-size:15px!important}
.copilot-card p{font-size:13px!important;line-height:1.65!important}

/* Top toolbar */
.topbar{min-height:92px!important;height:auto!important;padding-top:12px!important;padding-bottom:12px!important}
.company-switcher small,.user-menu small{font-size:11px!important}
.company-switcher strong,.user-menu strong{font-size:15px!important}
.company-logo,.avatar{font-size:14px!important}
.global-search{height:50px!important}
.global-search input{font-size:15px!important}
.global-search kbd{font-size:11px!important}
.server-pill{font-size:12px!important;padding:10px 13px!important}
.icon-button{width:44px!important;height:44px!important;font-size:17px!important}
.font-size-icon{font-size:13px!important}

/* Every page heading */
.page-content{padding-top:32px!important}
.page-heading{min-height:142px!important}
.page-heading h1{font-size:46px!important;line-height:1.12!important;letter-spacing:-1.4px!important}
.page-heading p{font-size:17px!important;line-height:1.6!important}
.eyebrow,.breadcrumb{font-size:12px!important;letter-spacing:1.4px!important}
.primary-button,.secondary-button{min-height:50px!important;padding-left:18px!important;padding-right:18px!important;font-size:15px!important}

/* Dashboard and general cards */
.metric-label{font-size:14px!important}
.metric-card>strong{font-size:34px!important}
.metric-card>small,.trend{font-size:12px!important}
.surface h2{font-size:24px!important}
.surface-header select{font-size:14px!important}
.chart-summary span{font-size:13px!important}
.chart-summary strong{font-size:19px!important}
.chart-months{font-size:12px!important}
.quick-action strong,.activity-row strong,.module-card strong{font-size:15px!important}
.quick-action small,.activity-row small,.activity-row time,.module-card small{font-size:13px!important;line-height:1.5!important}
.text-button{font-size:14px!important}
.insight-badge{font-size:13px!important}
.insight-panel h2{font-size:31px!important}
.insight-panel p{font-size:16px!important}
.insight-panel button{font-size:14px!important}
.small-stat span,.small-stat small{font-size:13px!important}
.small-stat strong{font-size:34px!important}
.table-actions input{font-size:15px!important}
.table-row{min-height:62px!important;font-size:15px!important}
.table-head{font-size:13px!important}
.report-card strong{font-size:17px!important}
.report-card small,.report-card>b{font-size:13px!important}
.planned-banner span{font-size:12px!important}
.planned-banner h2{font-size:32px!important}
.planned-banner p{font-size:16px!important}
.toast{font-size:15px!important;line-height:1.5!important}

/* All master-data pages: Chart of Accounts, Auxiliary, Transaction Types, Currencies */
.coa-summary-card span{font-size:14px!important}
.coa-summary-card strong{font-size:34px!important}
.coa-summary-card small{font-size:12px!important;line-height:1.5!important}
.coa-toolbar{min-height:78px!important}
.coa-search{height:52px!important;font-size:16px!important}
.coa-button{min-height:50px!important;padding-left:15px!important;padding-right:15px!important;font-size:14px!important}
.coa-count{font-size:13px!important}
.coa-list-header h2{font-size:25px!important}
.coa-table th{height:52px!important;font-size:13px!important;letter-spacing:.7px!important}
.coa-table td{height:68px!important;font-size:16px!important;line-height:1.45!important}
.coa-code{font-size:15px!important;padding:7px 11px!important}
.coa-icon-button{width:42px!important;height:42px!important;font-size:18px!important}
.coa-actions-column{width:132px!important}
.coa-actions .coa-icon-button,.coa-row-actions .coa-icon-button{flex-basis:42px!important}
.coa-empty h3{font-size:21px!important}
.coa-empty p{font-size:15px!important;line-height:1.65!important}
.coa-loading{font-size:16px!important}
.coa-page-info,.coa-page-button,.coa-page-size{font-size:14px!important}
.coa-page-button,.coa-page-size{height:42px!important;min-width:42px!important}
.coa-error{font-size:15px!important;line-height:1.6!important;padding:17px!important}

/* New/Edit forms on every page */
.coa-form-card,.coa-help-card{padding:28px!important}
.coa-field label{font-size:15px!important;letter-spacing:.55px!important}
.coa-field input,.coa-field select{height:58px!important;font-size:17px!important;padding-left:16px!important;padding-right:16px!important}
.coa-field small{font-size:13px!important;line-height:1.55!important}
.coa-form-actions{padding-top:24px!important}
.coa-help-card h2{font-size:25px!important}
.coa-help-card p{font-size:15px!important;line-height:1.7!important}
.coa-help-number{width:34px!important;height:34px!important;font-size:14px!important}
.coa-help-item{grid-template-columns:34px 1fr!important;gap:13px!important}
.coa-help-item strong{font-size:15px!important}
.coa-help-item small{font-size:13px!important;line-height:1.55!important}
.coa-modal-card h2{font-size:26px!important}
.coa-modal-card p{font-size:15px!important;line-height:1.65!important}
.aux-master-description{font-size:13px!important;max-width:300px!important}
.aux-number{font-size:15px!important;height:32px!important;padding-left:10px!important;padding-right:10px!important}
.number-cell{font-size:16px!important}

/* Mobile/tablet still readable without breaking the layout */
@media(max-width:980px){
  .page-heading h1{font-size:39px!important}
  .page-heading p{font-size:16px!important}
  .menu-text{font-size:15px!important}
}
@media(max-width:720px){
  .page-content{padding:22px 18px 38px!important}
  .page-heading{min-height:120px!important}
  .page-heading h1{font-size:34px!important}
  .page-heading p{font-size:15px!important}
  .coa-table th{font-size:12px!important}
  .coa-table td{font-size:15px!important}
}


/* Always-visible Light / Dark mode control */
.theme-mode-button{
  height:42px;
  min-width:86px;
  padding:0 13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:11px;
  background:rgba(255,255,255,.028);
  color:var(--text);
  cursor:pointer;
  font:inherit;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease;
}
.theme-mode-button:hover{
  transform:translateY(-1px);
  border-color:rgba(98,228,231,.48);
  background:rgba(98,228,231,.08);
  color:var(--cyan);
}
.theme-mode-button .theme-icon{
  font-size:17px;
  line-height:1;
}
.theme-mode-label{
  line-height:1;
}
:root[data-theme="light"] .theme-mode-button{
  background:#fff;
  border-color:rgba(51,75,102,.18);
  box-shadow:0 2px 8px rgba(42,66,92,.06);
}
:root[data-font-size="large"] .theme-mode-button{
  height:46px;
  min-width:96px;
  font-size:13px;
}
:root[data-font-size="xlarge"] .theme-mode-button{
  height:49px;
  min-width:104px;
  font-size:14px;
}

/* Keep the top bar controls visible when the content area becomes narrow. */
.topbar{
  min-width:0;
}
.topbar .global-search{
  min-width:180px;
}
@media(max-width:1280px){
  .topbar{
    gap:10px;
    padding-left:18px;
    padding-right:18px;
  }
  .company-switcher{
    min-width:190px;
  }
  .user-menu>div:last-child{
    display:none;
  }
  .theme-mode-button{
    min-width:44px;
    width:44px;
    padding:0;
  }
  .theme-mode-label{
    display:none;
  }
}


/* ============================================================
   Permanent visible LIGHT / DARK switch
   ============================================================ */
.theme-switch{
  height:46px;
  min-width:178px;
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  padding:4px;
  gap:3px;
  border:1px solid var(--line);
  border-radius:13px;
  background:rgba(255,255,255,.028);
  color:var(--muted);
  cursor:pointer;
  font:inherit;
  box-shadow:0 1px 0 rgba(255,255,255,.02) inset;
}
.theme-switch:hover{
  border-color:rgba(98,228,231,.40);
}
.theme-option{
  height:36px;
  min-width:82px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border-radius:9px;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  letter-spacing:.35px;
  transition:
    background .16s ease,
    color .16s ease,
    box-shadow .16s ease;
}
.theme-option.active{
  color:#061723;
  background:linear-gradient(135deg,#9af5f1,#67dce4);
  box-shadow:0 5px 14px rgba(80,220,225,.18);
}
.theme-symbol{
  font-size:17px;
  line-height:1;
}
:root[data-theme="light"] .theme-switch{
  background:#edf3f8;
  border-color:rgba(51,75,102,.18);
}
:root[data-theme="light"] .theme-option.active{
  color:#fff;
  background:linear-gradient(135deg,#223c58,#12283e);
  box-shadow:0 5px 14px rgba(20,42,64,.18);
}

/* Large application fonts keep the theme switch fully readable. */
:root[data-font-size="large"] .theme-switch{
  height:50px;
  min-width:196px;
}
:root[data-font-size="large"] .theme-option{
  height:40px;
  min-width:91px;
  font-size:13px;
}
:root[data-font-size="xlarge"] .theme-switch{
  height:54px;
  min-width:212px;
}
:root[data-font-size="xlarge"] .theme-option{
  height:44px;
  min-width:99px;
  font-size:14px;
}

/* The switch stays visible at normal desktop/tablet widths. */
@media(max-width:1280px){
  .theme-switch{
    min-width:154px !important;
    width:auto !important;
    padding:3px !important;
  }
  .theme-option{
    min-width:72px !important;
    padding:0 7px !important;
    font-size:11px !important;
  }
  .theme-option span{
    display:inline !important;
  }
}
@media(max-width:980px){
  .theme-switch{
    min-width:94px !important;
  }
  .theme-option{
    min-width:43px !important;
    padding:0 5px !important;
  }
  .theme-option>span:last-child{
    display:none !important;
  }
}


/* ============================================================
   STOCK OPERATIONS — DESIGN-ONLY STANDARD ERP PAGES
   ============================================================ */
.stock-page-heading{align-items:flex-start;padding-top:22px;padding-bottom:18px}
.stock-design-badge{
  display:inline-flex;align-items:center;height:38px;padding:0 12px;
  border:1px solid rgba(255,184,77,.28);border-radius:10px;
  color:#ffc66b;background:rgba(255,184,77,.07);
  font-size:10px;font-weight:900;letter-spacing:.65px;white-space:nowrap
}
:root[data-theme="light"] .stock-design-badge{
  color:#96600f;background:#fff7e8;border-color:#efd29f
}

.stock-stat-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;margin:4px 0 16px
}
.stock-stat-card{
  min-height:124px;padding:19px 21px;border:1px solid var(--line);
  border-radius:16px;background:var(--panel);
  box-shadow:0 10px 30px rgba(0,0,0,.035)
}
.stock-stat-card span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.55px}
.stock-stat-card strong{display:block;margin:13px 0 5px;color:var(--text);font-size:27px;letter-spacing:-.6px}
.stock-stat-card small{color:var(--muted-2);font-size:10px}

.stock-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:14px 16px;margin-bottom:14px
}
.stock-filter-group{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
.stock-search-wrap{
  width:min(390px,34vw);height:42px;display:flex;align-items:center;gap:9px;
  padding:0 12px;border:1px solid var(--line);border-radius:10px;
  background:rgba(255,255,255,.018);color:var(--muted)
}
.stock-search-wrap input{width:100%;border:0;outline:0;background:transparent;color:var(--text);font-size:11px}
.stock-filter-group>select,.stock-filter-group>input[type="date"]{
  height:42px;padding:0 11px;border:1px solid var(--line);border-radius:10px;
  background:var(--panel-strong);color:var(--text);font-size:10px;outline:0
}
.stock-toolbar-actions{display:flex;align-items:center;gap:7px}

.stock-list-panel{overflow:hidden}
.stock-list-header{
  min-height:78px;padding:17px 20px;display:flex;align-items:center;
  justify-content:space-between;border-bottom:1px solid var(--line)
}
.stock-list-header h2{margin:4px 0 0;font-size:19px}
.stock-list-meta{color:var(--muted);font-size:10px}

.stock-table-wrap{overflow:auto}
.stock-table{width:100%;min-width:1120px;border-collapse:collapse}
.stock-table th{
  padding:14px 13px;border-bottom:1px solid var(--line);color:#6d86a2;
  font-size:9px;font-weight:900;letter-spacing:.65px;text-align:left;white-space:nowrap
}
.stock-table td{
  height:57px;padding:10px 13px;border-bottom:1px solid rgba(91,116,145,.11);
  color:var(--muted);font-size:11px;white-space:nowrap
}
.stock-table tbody tr:hover{background:rgba(98,228,231,.025)}
.stock-primary-cell{color:var(--text);font-weight:850}
.stock-actions-head{text-align:right!important}
.stock-row-actions{text-align:right}
.stock-row-actions button{
  width:31px;height:31px;margin-left:4px;border:1px solid var(--line);
  border-radius:8px;background:transparent;color:var(--muted);cursor:pointer
}
.stock-row-actions button:hover{border-color:rgba(98,228,231,.35);color:var(--cyan)}
.stock-row-actions button:last-child:hover{border-color:rgba(255,96,126,.35);color:var(--danger)}
.stock-status{
  display:inline-flex;align-items:center;justify-content:center;min-width:70px;
  height:24px;padding:0 9px;border-radius:99px;font-size:9px;font-weight:850
}
.stock-status.posted{color:#63ddb0;background:rgba(75,208,156,.09)}
.stock-status.approved{color:#9a8cff;background:rgba(140,124,255,.10)}
.stock-status.draft{color:#ffc66b;background:rgba(255,184,77,.10)}
.stock-status.pending{color:#6ddbe4;background:rgba(98,228,231,.09)}
.stock-status.danger{color:#ff718c;background:rgba(255,96,126,.10)}

.stock-pagination{
  min-height:59px;padding:12px 18px;display:flex;align-items:center;
  justify-content:space-between;gap:14px;color:var(--muted);font-size:9px
}
.stock-pagination>div{display:flex;align-items:center;gap:5px}
.stock-pagination button,.stock-pagination select{
  height:32px;padding:0 10px;border:1px solid var(--line);border-radius:8px;
  background:transparent;color:var(--muted);font-size:9px
}
.stock-pagination button.active{background:var(--cyan);color:#061723;border-color:var(--cyan)}
.stock-pagination button:disabled{opacity:.45}

.stock-document-shell{
  display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:16px;align-items:start
}
.stock-document-main{overflow:hidden}
.stock-document-titlebar{
  min-height:78px;padding:18px 20px;display:flex;align-items:center;
  justify-content:space-between;border-bottom:1px solid var(--line)
}
.stock-document-titlebar h2{margin:5px 0 0;font-size:21px}
.stock-document-status{text-align:right}
.stock-document-status span{
  display:inline-flex;padding:6px 10px;border-radius:99px;
  background:rgba(255,184,77,.09);color:#ffc66b;font-size:9px;font-weight:900;letter-spacing:.7px
}
.stock-document-status small{display:block;margin-top:5px;color:var(--muted);font-size:9px}

.stock-form-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;padding:20px
}
.stock-form-field{min-width:0}
.stock-form-field label{
  display:block;margin-bottom:7px;color:#7890aa;font-size:9px;
  font-weight:900;letter-spacing:.55px
}
.stock-form-field input,.stock-form-field select,.stock-form-field textarea{
  width:100%;height:43px;padding:0 11px;border:1px solid var(--line);
  border-radius:9px;background:rgba(255,255,255,.018);
  color:var(--text);outline:0;font-size:11px
}
.stock-form-field textarea{height:104px;padding-top:11px;resize:vertical}
.stock-form-field input:focus,.stock-form-field select:focus,.stock-form-field textarea:focus{
  border-color:rgba(98,228,231,.45);box-shadow:0 0 0 3px rgba(98,228,231,.045)
}
.stock-form-field small{display:block;margin-top:5px;color:var(--muted-2);font-size:8px}
.stock-readonly{color:#88b7c4!important;background:rgba(98,228,231,.025)!important}

.stock-section-title{
  min-height:70px;padding:13px 20px;display:flex;align-items:center;
  justify-content:space-between;border-top:1px solid var(--line);border-bottom:1px solid var(--line)
}
.stock-section-title span{color:#7088a4;font-size:9px;font-weight:900;letter-spacing:.75px}
.stock-section-title h3{margin:4px 0 0;font-size:17px}
.stock-line-tools{display:flex;gap:7px}

.stock-detail-table-wrap{overflow:auto}
.stock-detail-table{width:100%;min-width:1050px;border-collapse:collapse}
.stock-detail-table th{
  height:39px;padding:0 7px;background:rgba(255,255,255,.012);
  border-bottom:1px solid var(--line);color:#6f87a3;font-size:8px;
  font-weight:900;letter-spacing:.45px;text-align:left;white-space:nowrap
}
.stock-detail-table td{padding:6px 5px;border-bottom:1px solid rgba(91,116,145,.10)}
.stock-detail-table input{
  width:100%;min-width:74px;height:36px;padding:0 8px;border:1px solid transparent;
  border-radius:7px;background:rgba(255,255,255,.018);color:var(--text);font-size:10px
}
.stock-detail-table input:focus{outline:0;border-color:rgba(98,228,231,.34)}
.stock-detail-table .stock-line-text{min-width:145px}
.stock-line-number{width:34px;color:var(--muted);font-size:9px;text-align:center}
.stock-line-delete{
  width:29px;height:29px;border:1px solid var(--line);border-radius:7px;
  background:transparent;color:var(--danger);cursor:pointer
}
.stock-new-line td{padding:10px}
.stock-new-line button{
  border:0;background:transparent;color:var(--cyan);font-size:10px;font-weight:800;cursor:pointer
}

.stock-notes-grid{
  display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;
  padding:20px;border-top:1px solid var(--line)
}
.stock-notes textarea{height:128px}
.stock-totals-card{
  padding:15px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.015)
}
.stock-totals-card>div{
  min-height:34px;display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px dashed rgba(100,125,150,.15);font-size:10px
}
.stock-totals-card>div:last-child{border-bottom:0}
.stock-totals-card span{color:var(--muted)}
.stock-totals-card strong{color:var(--text);font-size:12px}
.stock-totals-card .grand-total{min-height:48px;margin-top:4px}
.stock-totals-card .grand-total span{color:var(--text);font-weight:850}
.stock-totals-card .grand-total strong{color:var(--cyan);font-size:20px}

.stock-form-footer{
  min-height:72px;padding:13px 20px;display:flex;align-items:center;
  justify-content:space-between;gap:12px;border-top:1px solid var(--line);
  background:rgba(255,255,255,.01)
}
.stock-form-footer>div{display:flex;gap:7px;align-items:center}

.stock-side-panel{padding:20px;position:sticky;top:98px}
.stock-side-panel h2{margin:5px 0 18px;font-size:20px}
.stock-workflow{display:grid;gap:12px}
.stock-workflow>div{display:flex;align-items:center;gap:10px;color:var(--muted)}
.stock-workflow>div>span{
  width:30px;height:30px;display:grid;place-items:center;border:1px solid var(--line);
  border-radius:9px;font-size:10px;font-weight:900
}
.stock-workflow>div.active>span{color:#071722;background:var(--cyan);border-color:var(--cyan)}
.stock-workflow strong{display:block;color:var(--text);font-size:11px}
.stock-workflow small{display:block;margin-top:2px;font-size:9px}
.stock-side-divider{height:1px;margin:20px 0;background:var(--line)}
.stock-control-list{margin:12px 0 0;padding:0;list-style:none;display:grid;gap:9px}
.stock-control-list li{position:relative;padding-left:17px;color:var(--muted);font-size:10px;line-height:1.45}
.stock-control-list li::before{content:"✓";position:absolute;left:0;color:var(--cyan);font-weight:900}
.stock-side-note{
  margin-top:20px;padding:13px;border:1px solid rgba(255,184,77,.20);
  border-radius:11px;background:rgba(255,184,77,.045)
}
.stock-side-note strong{color:#ffc66b;font-size:10px}
.stock-side-note p{margin:6px 0 0;color:var(--muted);font-size:9px;line-height:1.55}

.stock-warehouse-cards{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:20px
}
.stock-warehouse-cards>div{
  display:grid;grid-template-columns:1fr 110px;align-items:center;gap:8px 12px;
  padding:15px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.014)
}
.stock-warehouse-cards strong{grid-column:1/-1;color:var(--cyan);font-size:13px}
.stock-warehouse-cards span{color:var(--muted);font-size:9px}
.stock-warehouse-cards input{
  width:100%;height:35px;padding:0 8px;border:1px solid var(--line);
  border-radius:7px;background:transparent;color:var(--text)
}

/* Larger application text remains readable on stock pages. */
:root[data-font-size="large"] .stock-stat-card span,
:root[data-font-size="large"] .stock-list-meta,
:root[data-font-size="large"] .stock-pagination,
:root[data-font-size="large"] .stock-form-field label,
:root[data-font-size="large"] .stock-section-title span{font-size:11px}
:root[data-font-size="large"] .stock-stat-card strong{font-size:30px}
:root[data-font-size="large"] .stock-stat-card small,
:root[data-font-size="large"] .stock-table td,
:root[data-font-size="large"] .stock-form-field input,
:root[data-font-size="large"] .stock-form-field select{font-size:13px}
:root[data-font-size="large"] .stock-table th{font-size:10px}
:root[data-font-size="large"] .stock-form-grid{gap:16px}
:root[data-font-size="large"] .stock-workflow strong{font-size:13px}
:root[data-font-size="large"] .stock-workflow small,
:root[data-font-size="large"] .stock-control-list li,
:root[data-font-size="large"] .stock-side-note p{font-size:11px}

:root[data-font-size="xlarge"] .stock-stat-card span,
:root[data-font-size="xlarge"] .stock-list-meta,
:root[data-font-size="xlarge"] .stock-pagination,
:root[data-font-size="xlarge"] .stock-form-field label,
:root[data-font-size="xlarge"] .stock-section-title span{font-size:12px}
:root[data-font-size="xlarge"] .stock-stat-card strong{font-size:33px}
:root[data-font-size="xlarge"] .stock-stat-card small,
:root[data-font-size="xlarge"] .stock-table td,
:root[data-font-size="xlarge"] .stock-form-field input,
:root[data-font-size="xlarge"] .stock-form-field select{font-size:14px}
:root[data-font-size="xlarge"] .stock-table th{font-size:11px}
:root[data-font-size="xlarge"] .stock-document-titlebar h2{font-size:25px}
:root[data-font-size="xlarge"] .stock-section-title h3{font-size:21px}
:root[data-font-size="xlarge"] .stock-workflow strong{font-size:14px}
:root[data-font-size="xlarge"] .stock-workflow small,
:root[data-font-size="xlarge"] .stock-control-list li,
:root[data-font-size="xlarge"] .stock-side-note p{font-size:12px}

@media(max-width:1250px){
  .stock-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stock-document-shell{grid-template-columns:1fr}
  .stock-side-panel{position:static}
  .stock-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:860px){
  .stock-toolbar,.stock-form-footer{align-items:stretch;flex-direction:column}
  .stock-filter-group{flex-wrap:wrap}
  .stock-search-wrap{width:100%}
  .stock-toolbar-actions{justify-content:flex-end}
  .stock-stat-grid{grid-template-columns:1fr}
  .stock-form-grid{grid-template-columns:1fr}
  .stock-notes-grid{grid-template-columns:1fr}
  .stock-warehouse-cards{grid-template-columns:1fr}
}


/* STOCK TRANSACTION DESIGN PAGES */
.stock-page-heading{align-items:flex-start;padding-top:18px;padding-bottom:18px}.stock-design-badge{display:inline-flex;align-items:center;height:40px;padding:0 12px;border:1px solid rgba(255,184,77,.30);border-radius:10px;color:#ffc66b;background:rgba(255,184,77,.07);font-size:11px;font-weight:900;letter-spacing:.55px;white-space:nowrap}:root[data-theme="light"] .stock-design-badge{color:#96600f;background:#fff7e8;border-color:#efd29f}.stock-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:4px 0 16px}.stock-stat-card{min-height:128px;padding:20px 21px;border:1px solid var(--line);border-radius:16px;background:var(--panel)}.stock-stat-card span{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.45px}.stock-stat-card strong{display:block;margin:13px 0 5px;color:var(--text);font-size:31px}.stock-stat-card small{color:var(--muted-2);font-size:11px}.stock-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;margin-bottom:14px}.stock-filter-group{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.stock-search-wrap{width:min(390px,34vw);height:46px;display:flex;align-items:center;gap:9px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.018);color:var(--muted)}.stock-search-wrap input{width:100%;border:0;outline:0;background:transparent;color:var(--text);font-size:14px}.stock-filter-group>select,.stock-filter-group>input[type=date]{height:46px;padding:0 11px;border:1px solid var(--line);border-radius:10px;background:var(--panel-strong);color:var(--text);font-size:12px}.stock-toolbar-actions{display:flex;gap:7px}.stock-list-panel{overflow:hidden}.stock-list-header{min-height:82px;padding:17px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.stock-list-header h2{margin:4px 0 0;font-size:22px}.stock-list-meta{color:var(--muted);font-size:12px}.stock-table-wrap{overflow:auto}.stock-table{width:100%;min-width:1120px;border-collapse:collapse}.stock-table th{padding:14px 13px;border-bottom:1px solid var(--line);color:#6d86a2;font-size:11px;font-weight:900;letter-spacing:.55px;text-align:left;white-space:nowrap}.stock-table td{height:61px;padding:10px 13px;border-bottom:1px solid rgba(91,116,145,.11);color:var(--muted);font-size:13px;white-space:nowrap}.stock-table tbody tr:hover{background:rgba(98,228,231,.025)}.stock-primary-cell{color:var(--text);font-weight:850}.stock-actions-head{text-align:right!important}.stock-row-actions{text-align:right}.stock-row-actions button{width:35px;height:35px;margin-left:4px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--muted);cursor:pointer}.stock-status{display:inline-flex;align-items:center;justify-content:center;min-width:74px;height:27px;padding:0 9px;border-radius:99px;font-size:11px;font-weight:850}.stock-status.posted{color:#63ddb0;background:rgba(75,208,156,.09)}.stock-status.approved{color:#9a8cff;background:rgba(140,124,255,.10)}.stock-status.draft{color:#ffc66b;background:rgba(255,184,77,.10)}.stock-status.pending{color:#6ddbe4;background:rgba(98,228,231,.09)}.stock-status.danger{color:#ff718c;background:rgba(255,96,126,.10)}.stock-pagination{min-height:60px;padding:12px 18px;display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px}.stock-pagination>div{display:flex;gap:5px}.stock-pagination button,.stock-pagination select{height:35px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--muted);font-size:11px}.stock-pagination button.active{background:var(--cyan);color:#061723;border-color:var(--cyan)}.stock-document-shell{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;align-items:start}.stock-document-main{overflow:hidden}.stock-document-titlebar{min-height:84px;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.stock-document-titlebar h2{margin:5px 0 0;font-size:25px}.stock-document-status{text-align:right}.stock-document-status span{display:inline-flex;padding:6px 10px;border-radius:99px;background:rgba(255,184,77,.09);color:#ffc66b;font-size:11px;font-weight:900}.stock-document-status small{display:block;margin-top:5px;color:var(--muted);font-size:10px}.stock-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;padding:22px}.stock-form-field label{display:block;margin-bottom:8px;color:#7890aa;font-size:12px;font-weight:900;letter-spacing:.45px}.stock-form-field input,.stock-form-field select,.stock-form-field textarea{width:100%;height:50px;padding:0 12px;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.018);color:var(--text);outline:0;font-size:14px}.stock-form-field textarea{height:116px;padding-top:11px;resize:vertical}.stock-form-field small{display:block;margin-top:5px;color:var(--muted-2);font-size:10px}.stock-readonly{color:#88b7c4!important;background:rgba(98,228,231,.025)!important}.stock-section-title{min-height:76px;padding:13px 20px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.stock-section-title span{color:#7088a4;font-size:11px;font-weight:900;letter-spacing:.75px}.stock-section-title h3{margin:4px 0 0;font-size:21px}.stock-line-tools{display:flex;gap:7px}.stock-detail-table-wrap{overflow:auto}.stock-detail-table{width:100%;min-width:1150px;border-collapse:collapse}.stock-detail-table th{height:44px;padding:0 7px;background:rgba(255,255,255,.012);border-bottom:1px solid var(--line);color:#6f87a3;font-size:10px;font-weight:900;letter-spacing:.4px;text-align:left;white-space:nowrap}.stock-detail-table td{padding:6px 5px;border-bottom:1px solid rgba(91,116,145,.10)}.stock-detail-table input{width:100%;min-width:80px;height:40px;padding:0 8px;border:1px solid transparent;border-radius:7px;background:rgba(255,255,255,.018);color:var(--text);font-size:12px}.stock-detail-table .stock-line-text{min-width:160px}.stock-line-number{width:34px;color:var(--muted);font-size:11px;text-align:center}.stock-line-delete{width:32px;height:32px;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--danger);cursor:pointer}.stock-new-line td{padding:10px}.stock-new-line button{border:0;background:transparent;color:var(--cyan);font-size:12px;font-weight:800;cursor:pointer}.stock-notes-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;padding:20px;border-top:1px solid var(--line)}.stock-totals-card{padding:15px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.015)}.stock-totals-card>div{min-height:37px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px dashed rgba(100,125,150,.15);font-size:12px}.stock-totals-card strong{color:var(--text);font-size:13px}.stock-totals-card .grand-total{min-height:52px}.stock-totals-card .grand-total strong{color:var(--cyan);font-size:22px}.stock-form-footer{min-height:76px;padding:13px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line)}.stock-form-footer>div{display:flex;gap:7px}.stock-side-panel{padding:20px;position:sticky;top:100px}.stock-side-panel h2{margin:5px 0 18px;font-size:22px}.stock-workflow{display:grid;gap:13px}.stock-workflow>div{display:flex;align-items:center;gap:10px;color:var(--muted)}.stock-workflow>div>span{width:33px;height:33px;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;font-size:11px;font-weight:900}.stock-workflow>div.active>span{color:#071722;background:var(--cyan);border-color:var(--cyan)}.stock-workflow strong{display:block;color:var(--text);font-size:13px}.stock-workflow small{display:block;margin-top:2px;font-size:11px}.stock-side-divider{height:1px;margin:20px 0;background:var(--line)}.stock-control-list{margin:12px 0 0;padding:0;list-style:none;display:grid;gap:9px}.stock-control-list li{position:relative;padding-left:17px;color:var(--muted);font-size:12px;line-height:1.45}.stock-control-list li:before{content:"✓";position:absolute;left:0;color:var(--cyan);font-weight:900}.stock-side-note{margin-top:20px;padding:13px;border:1px solid rgba(255,184,77,.20);border-radius:11px;background:rgba(255,184,77,.045)}.stock-side-note strong{color:#ffc66b;font-size:12px}.stock-side-note p{margin:6px 0 0;color:var(--muted);font-size:11px;line-height:1.55}@media(max-width:1250px){.stock-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stock-document-shell{grid-template-columns:1fr}.stock-side-panel{position:static}.stock-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:860px){.stock-toolbar,.stock-form-footer{align-items:stretch;flex-direction:column}.stock-filter-group{flex-wrap:wrap}.stock-search-wrap{width:100%}.stock-stat-grid{grid-template-columns:1fr}.stock-form-grid{grid-template-columns:1fr}.stock-notes-grid{grid-template-columns:1fr}}


/* ============================================================
   Single Dark / Light toggle button
   ============================================================ */
.theme-mode-button{
  height:46px;
  min-width:94px;
  padding:0 13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.028);
  color:var(--text);
  cursor:pointer;
  font:inherit;
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
  transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease;
}
.theme-mode-button:hover{
  transform:translateY(-1px);
  border-color:rgba(98,228,231,.42);
  background:rgba(98,228,231,.07);
  color:var(--cyan);
}
.theme-mode-icon{
  font-size:17px;
  line-height:1;
}
.theme-mode-text{
  line-height:1;
}
:root[data-theme="light"] .theme-mode-button{
  background:#fff;
  border-color:rgba(51,75,102,.18);
  box-shadow:0 2px 8px rgba(42,66,92,.06);
}
:root[data-font-size="large"] .theme-mode-button{
  height:49px;
  min-width:102px;
  font-size:13px;
}
:root[data-font-size="xlarge"] .theme-mode-button{
  height:52px;
  min-width:110px;
  font-size:14px;
}
@media(max-width:1100px){
  .theme-mode-button{
    min-width:48px;
    width:48px;
    padding:0;
  }
  .theme-mode-text{
    display:none;
  }
}


/* ============================================================
   AVALANCHE.AI CONSTRUCTION PHASE - SPECIFICATION v1.0
   ============================================================ */
.construction-page-heading{align-items:flex-start}
.construction-spec-badge{
  min-height:40px;padding:0 12px;display:inline-flex;align-items:center;
  border:1px solid rgba(98,228,231,.25);border-radius:10px;
  color:var(--cyan);background:rgba(98,228,231,.055);
  font-size:11px;font-weight:900;letter-spacing:.55px;white-space:nowrap
}
:root[data-theme="light"] .construction-spec-badge{background:#e9fbfb;border-color:#b9e6e8;color:#17767d}

.construction-project-strip{
  display:grid;grid-template-columns:1.45fr .85fr .7fr .8fr;gap:1px;
  margin-bottom:15px;border:1px solid var(--line);border-radius:16px;
  overflow:hidden;background:var(--line)
}
.construction-project-strip>div{min-height:108px;padding:18px 20px;background:var(--panel)}
.construction-project-strip span,.construction-kpi span{display:block;color:var(--muted);font-size:11px;font-weight:850;letter-spacing:.45px;text-transform:uppercase}
.construction-project-strip strong{display:block;margin:9px 0 4px;color:var(--text);font-size:20px}
.construction-project-strip small{color:var(--muted-2);font-size:11px}
.construction-risk-text{color:#ff718c!important}

.construction-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:15px}
.construction-kpi{
  min-height:118px;padding:18px;border:1px solid var(--line);border-radius:15px;background:var(--panel)
}
.construction-kpi strong{display:block;margin:12px 0 5px;color:var(--text);font-size:27px;letter-spacing:-.6px}
.construction-kpi small{color:var(--muted-2);font-size:11px}
.construction-kpi.danger{border-color:rgba(255,96,126,.30);background:linear-gradient(135deg,rgba(255,96,126,.06),var(--panel))}
.construction-kpi.warning{border-color:rgba(255,184,77,.28);background:linear-gradient(135deg,rgba(255,184,77,.055),var(--panel))}

.construction-overview-grid,.construction-two-column{display:grid;grid-template-columns:1.3fr .7fr;gap:15px;margin-bottom:15px}
.construction-cost-bridge,.construction-alert-panel,.construction-variance-panel,.construction-control-panel{overflow:hidden}
.construction-formula,.construction-trace-note{color:var(--muted);font-size:11px}
.construction-bridge-row{display:grid;grid-template-columns:1fr 24px 1fr 24px 1fr 24px 1fr;align-items:center;gap:8px;padding:22px}
.construction-bridge-row>b{text-align:center;color:var(--muted);font-size:22px}
.construction-bridge-row>div{min-width:0}
.construction-bridge-row span{display:block;color:var(--muted);font-size:10px}
.construction-bridge-row strong{display:block;margin:7px 0;color:var(--text);font-size:20px}
.construction-bridge-row i{display:block;height:5px;border-radius:9px;background:rgba(98,228,231,.12);overflow:hidden}
.construction-bridge-row i:after{content:"";display:block;width:var(--bar);height:100%;background:var(--cyan);border-radius:9px}
.construction-bridge-row .total strong{color:var(--cyan)}
.construction-bridge-row .total i:after{background:#ff718c}
.construction-variance-banner{margin:0 20px 20px;padding:13px 14px;display:flex;gap:14px;align-items:flex-start;border-radius:11px;font-size:11px}
.construction-variance-banner strong{white-space:nowrap}
.construction-variance-banner span{color:var(--muted);line-height:1.55}
.construction-variance-banner.danger{border:1px solid rgba(255,96,126,.24);background:rgba(255,96,126,.055);color:#ff8198}
.construction-variance-banner.warning{border:1px solid rgba(255,184,77,.24);background:rgba(255,184,77,.055);color:#ffc66b}

.construction-alert{display:flex;gap:12px;padding:14px 18px;border-top:1px solid rgba(91,116,145,.10)}
.construction-alert>span{width:31px;height:31px;flex:0 0 31px;display:grid;place-items:center;border-radius:9px;font-size:10px;font-weight:900}
.construction-alert strong{font-size:12px;color:var(--text)}
.construction-alert p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
.construction-alert.danger>span{color:#ff718c;background:rgba(255,96,126,.10)}
.construction-alert.warning>span{color:#ffc66b;background:rgba(255,184,77,.10)}
.construction-alert.info>span{color:var(--cyan);background:rgba(98,228,231,.09)}

.construction-flow-panel{overflow:hidden;margin-bottom:15px}
.construction-flow{display:flex;align-items:stretch;gap:7px;padding:18px;overflow:auto}
.construction-flow>button{
  min-width:130px;min-height:76px;padding:12px;border:1px solid var(--line);border-radius:11px;
  background:rgba(255,255,255,.014);color:var(--text);text-align:left;cursor:pointer
}
.construction-flow>button:hover{border-color:rgba(98,228,231,.34);background:rgba(98,228,231,.04)}
.construction-flow>button span{display:block;color:var(--cyan);font-size:9px;font-weight:900}
.construction-flow>button strong{display:block;margin-top:8px;font-size:11px;line-height:1.35}
.construction-flow>b{align-self:center;color:var(--muted);font-size:18px}

.construction-boq-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:15px;align-items:start}
.construction-boq-tree{overflow:hidden;position:sticky;top:100px}
.construction-pane-title{display:flex;align-items:center;justify-content:space-between;padding:17px;border-bottom:1px solid var(--line)}
.construction-pane-title span,.construction-section-bar span{color:var(--muted);font-size:9px;font-weight:900;letter-spacing:.55px}
.construction-pane-title h2{margin:4px 0 0;font-size:17px}
.construction-pane-title button{width:31px;height:31px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--cyan)}
.construction-tree{padding:12px}
.construction-tree>div{min-height:37px;padding:9px 10px;border-radius:8px;color:var(--muted);font-size:11px;cursor:pointer}
.construction-tree>div:hover,.construction-tree>div.active{background:rgba(98,228,231,.07);color:var(--text)}
.construction-tree .level-0{font-weight:850}.construction-tree .level-1{padding-left:22px}.construction-tree .level-2{padding-left:34px}.construction-tree .level-3{padding-left:50px;font-size:10px}
.construction-boq-main{overflow:hidden}
.construction-boq-title{padding:18px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.construction-boq-title h2{margin:4px 0 3px;font-size:21px}.construction-boq-title p{margin:0;color:var(--muted);font-size:10px}
.construction-boq-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border-bottom:1px solid var(--line)}
.construction-boq-fields>div{padding:15px 18px;background:var(--panel)}
.construction-boq-fields span,.construction-commercial-grid span,.construction-forecast-strip span{display:block;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.4px}
.construction-boq-fields strong{display:inline-block;margin-top:7px;color:var(--text);font-size:18px}.construction-boq-fields small{margin-left:6px;color:var(--muted);font-size:9px}
.construction-section-bar{min-height:68px;padding:12px 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);border-top:1px solid var(--line)}
.construction-section-bar h3{margin:4px 0 0;font-size:17px}
.construction-table-scroll{overflow:auto}
.construction-table{width:100%;min-width:950px;border-collapse:collapse}
.construction-table th{height:43px;padding:0 11px;border-bottom:1px solid var(--line);color:#6f87a3;font-size:9px;font-weight:900;letter-spacing:.45px;text-align:left;white-space:nowrap}
.construction-table td{height:52px;padding:9px 11px;border-bottom:1px solid rgba(91,116,145,.10);color:var(--muted);font-size:11px;white-space:nowrap}
.construction-table td.strong{color:var(--text);font-weight:800}.construction-table td.neg{color:#ff718c}.construction-table td.pos{color:#63ddb0}
.construction-table tr.total td{background:rgba(98,228,231,.035);color:var(--text);font-weight:850}
.construction-actions button{width:31px;height:31px;margin-left:4px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--muted);cursor:pointer}
.construction-commercial-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:1px;background:var(--line);border-top:1px solid var(--line)}
.construction-commercial-grid>div{padding:14px;background:var(--panel)}
.construction-commercial-grid strong{display:block;margin-top:6px;color:var(--text);font-size:15px}
.construction-commercial-grid .highlight{background:rgba(98,228,231,.06)}.construction-commercial-grid .highlight strong{color:var(--cyan)}
.construction-forecast-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;background:var(--line);margin-top:1px}
.construction-forecast-strip>div{padding:14px;background:var(--panel)}.construction-forecast-strip strong{display:block;margin-top:6px;color:var(--text);font-size:14px}
.construction-forecast-strip .warning strong{color:#ffc66b}

.construction-cost-table-card{overflow:hidden;margin-bottom:15px}
.construction-filter-pills{display:flex;gap:5px;flex-wrap:wrap}
.construction-filter-pills button{height:31px;padding:0 9px;border:1px solid var(--line);border-radius:99px;background:transparent;color:var(--muted);font-size:9px}
.construction-filter-pills button.active{background:rgba(98,228,231,.08);color:var(--cyan);border-color:rgba(98,228,231,.25)}
.construction-driver{min-height:61px;padding:10px 18px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid rgba(91,116,145,.10)}
.construction-driver strong{display:block;color:var(--text);font-size:11px}.construction-driver small{display:block;margin-top:4px;color:var(--muted);font-size:9px}
.construction-driver>b{font-size:13px}.construction-driver>b.neg{color:#ff718c}.construction-driver>b.pos{color:#63ddb0}
.construction-control-panel ul{margin:0;padding:4px 22px 18px 36px}.construction-control-panel li{margin:10px 0;color:var(--muted);font-size:11px;line-height:1.5}

.construction-progress-bars{display:grid;gap:14px;padding:20px}
.construction-progress-bars>div{display:grid;grid-template-columns:150px 1fr 48px;gap:10px;align-items:center}
.construction-progress-bars span{color:var(--muted);font-size:10px}.construction-progress-bars strong{text-align:right;color:var(--text);font-size:12px}
.construction-progress-bars i{height:9px;background:rgba(100,125,150,.13);border-radius:99px;overflow:hidden}.construction-progress-bars i b{display:block;height:100%;background:var(--cyan);border-radius:99px}
.construction-progress-bars .danger i b{background:#ff718c}
.construction-evidence{min-height:59px;padding:10px 18px;display:grid;grid-template-columns:105px 1fr auto;gap:10px;align-items:center;border-top:1px solid rgba(91,116,145,.10)}
.construction-evidence>span{color:var(--muted);font-size:9px}.construction-evidence>strong{color:var(--text);font-size:11px}

.construction-status{display:inline-flex;min-width:68px;height:25px;padding:0 8px;align-items:center;justify-content:center;border-radius:99px;font-size:9px;font-weight:900}
.construction-status.posted{color:#63ddb0;background:rgba(75,208,156,.09)}
.construction-status.approved{color:#9a8cff;background:rgba(140,124,255,.10)}
.construction-status.draft{color:#ffc66b;background:rgba(255,184,77,.10)}
.construction-status.pending{color:#6ddbe4;background:rgba(98,228,231,.09)}
.construction-status.danger{color:#ff718c;background:rgba(255,96,126,.10)}

.construction-dimension-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;background:var(--line)}
.construction-dimension-grid>div{padding:14px;background:var(--panel)}
.construction-dimension-grid span{display:block;color:var(--muted);font-size:9px;text-transform:uppercase}.construction-dimension-grid strong{display:block;margin-top:5px;color:var(--text);font-size:11px}

.construction-report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.construction-report-card{
  min-height:150px;padding:18px;display:grid;grid-template-columns:42px 1fr 24px;gap:13px;align-items:start;
  color:inherit;text-align:left;cursor:pointer
}
.construction-report-card>span{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:rgba(98,228,231,.08);color:var(--cyan);font-size:17px}
.construction-report-card strong{color:var(--text);font-size:13px}.construction-report-card p{margin:7px 0;color:var(--muted);font-size:11px;line-height:1.5}.construction-report-card small{color:#718ca7;font-size:9px}.construction-report-card>b{align-self:center;color:var(--muted)}
.construction-report-card:hover{border-color:rgba(98,228,231,.30);transform:translateY(-1px)}

@media(max-width:1350px){
  .construction-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .construction-overview-grid,.construction-two-column{grid-template-columns:1fr}
  .construction-project-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .construction-report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1100px){
  .construction-boq-layout{grid-template-columns:1fr}
  .construction-boq-tree{position:static}
  .construction-commercial-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .construction-forecast-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .construction-dimension-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .construction-kpi-grid,.construction-project-strip,.construction-report-grid{grid-template-columns:1fr}
  .construction-boq-fields{grid-template-columns:1fr}
  .construction-commercial-grid,.construction-forecast-strip,.construction-dimension-grid{grid-template-columns:1fr}
  .construction-bridge-row{grid-template-columns:1fr}
  .construction-bridge-row>b{display:none}
}

/* Larger text modes */
:root[data-font-size="large"] .construction-table td{font-size:13px}
:root[data-font-size="large"] .construction-table th{font-size:10px}
:root[data-font-size="large"] .construction-kpi span,
:root[data-font-size="large"] .construction-project-strip span{font-size:12px}
:root[data-font-size="large"] .construction-kpi small,
:root[data-font-size="large"] .construction-project-strip small{font-size:12px}
:root[data-font-size="xlarge"] .construction-table td{font-size:14px}
:root[data-font-size="xlarge"] .construction-table th{font-size:11px}
:root[data-font-size="xlarge"] .construction-kpi span,
:root[data-font-size="xlarge"] .construction-project-strip span{font-size:13px}
:root[data-font-size="xlarge"] .construction-kpi small,
:root[data-font-size="xlarge"] .construction-project-strip small{font-size:13px}


/* AIM4D CFO Operating System v5 - Construction reporting integration */
.aim4d-os-table-card{overflow:hidden}.aim4d-os-toolbar{min-height:68px;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line)}
.aim4d-os-toolbar>div{text-align:right}.aim4d-os-toolbar>div span{display:block;color:var(--muted);font-size:10px}.aim4d-os-toolbar>div strong{display:block;margin-top:3px;color:var(--text);font-size:11px}
.aim4d-os-table-scroll{overflow:auto;max-width:100%}.aim4d-os-table{min-width:1250px}.aim4d-os-table td{max-width:330px;white-space:normal;line-height:1.45}
.aim4d-os-status{display:inline-flex;align-items:center;justify-content:center;min-width:66px;min-height:25px;padding:3px 8px;border-radius:99px;font-size:9px;font-weight:900;white-space:nowrap}
.aim4d-os-status.posted{color:#63ddb0;background:rgba(75,208,156,.09)}.aim4d-os-status.approved{color:#9a8cff;background:rgba(140,124,255,.10)}.aim4d-os-status.draft{color:#ffc66b;background:rgba(255,184,77,.10)}.aim4d-os-status.pending{color:#6ddbe4;background:rgba(98,228,231,.09)}.aim4d-os-status.danger{color:#ff718c;background:rgba(255,96,126,.10)}
.aim4d-os-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-bottom:15px}.aim4d-os-attention{overflow:hidden}.aim4d-attention-row{min-height:84px;padding:12px 17px;display:grid;grid-template-columns:32px 1fr auto;gap:12px;align-items:center;border-top:1px solid rgba(91,116,145,.10)}
.aim4d-attention-row>span{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;background:rgba(98,228,231,.08);color:var(--cyan);font-size:9px;font-weight:900}.aim4d-attention-row strong{color:var(--text);font-size:11px}.aim4d-attention-row p{margin:4px 0;color:var(--muted);font-size:10px;line-height:1.4}.aim4d-attention-row small{display:block;color:var(--muted-2);font-size:9px}.aim4d-attention-row>div:last-child{text-align:right;display:grid;gap:5px;justify-items:end}
.aim4d-governance-list button{width:100%;min-height:63px;padding:10px 17px;display:grid;grid-template-columns:32px 1fr;gap:11px;text-align:left;border:0;border-top:1px solid rgba(91,116,145,.10);background:transparent;color:inherit;cursor:pointer}.aim4d-governance-list button:hover{background:rgba(98,228,231,.04)}.aim4d-governance-list b{color:var(--cyan);font-size:10px}.aim4d-governance-list strong{display:block;color:var(--text);font-size:11px}.aim4d-governance-list small{display:block;margin-top:3px;color:var(--muted);font-size:9px}
.aim4d-pm-list>div{min-height:69px;padding:11px 17px;display:grid;grid-template-columns:58px 1fr 130px;gap:11px;align-items:center;border-top:1px solid rgba(91,116,145,.10)}.aim4d-pm-list>div>span{color:var(--cyan);font-size:10px;font-weight:900}.aim4d-pm-list strong{display:block;color:var(--text);font-size:11px}.aim4d-pm-list small{display:block;margin-top:3px;color:var(--muted);font-size:9px}.aim4d-pm-list>div>div:last-child{text-align:right}.aim4d-pm-list b{color:var(--text);font-size:10px}
.aim4d-control-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:15px}.aim4d-control-card{padding:16px;min-height:150px}.aim4d-control-card>div{display:flex;align-items:center;justify-content:space-between;gap:8px}.aim4d-control-card>div>span{color:var(--muted);font-size:10px;text-transform:uppercase}.aim4d-control-card>strong{display:block;margin:15px 0 8px;color:var(--text);font-size:24px}.aim4d-control-card>strong small{font-size:10px;color:var(--muted)}.aim4d-control-card p{margin:0;color:var(--muted);font-size:10px;line-height:1.5}.aim4d-risk-register{overflow:hidden}
:root[data-font-size="large"] .aim4d-os-table td{font-size:13px}:root[data-font-size="large"] .aim4d-os-table th{font-size:10px}:root[data-font-size="large"] .aim4d-attention-row strong,:root[data-font-size="large"] .aim4d-pm-list strong{font-size:13px}
:root[data-font-size="xlarge"] .aim4d-os-table td{font-size:14px}:root[data-font-size="xlarge"] .aim4d-os-table th{font-size:11px}:root[data-font-size="xlarge"] .aim4d-attention-row strong,:root[data-font-size="xlarge"] .aim4d-pm-list strong{font-size:14px}
@media(max-width:1350px){.aim4d-os-grid{grid-template-columns:1fr}.aim4d-control-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.aim4d-control-grid{grid-template-columns:1fr}}


/* ============================================================
   Construction Executive / CFO Dashboards
   ============================================================ */
.executive-portfolio-card{overflow:hidden;margin-bottom:15px}
.executive-portfolio-table{min-width:1450px}
.exec-project-id{display:block;margin-top:3px;color:var(--muted);font-size:9px;font-weight:500}
.executive-progress-panel,.executive-attention-panel{overflow:hidden}
.exec-progress-row{
  min-height:76px;padding:12px 18px;display:grid;grid-template-columns:1.05fr 1fr 1fr;
  gap:14px;align-items:center;border-top:1px solid rgba(91,116,145,.10)
}
.exec-progress-row>div:first-child strong{display:block;color:var(--text);font-size:11px}
.exec-progress-row>div:first-child small{display:block;margin-top:4px;color:var(--muted);font-size:9px}
.exec-progress-row span{display:block;margin-bottom:6px;color:var(--muted);font-size:9px}
.exec-progress-row i{display:block;height:8px;border-radius:99px;background:rgba(100,125,150,.14);overflow:hidden}
.exec-progress-row i b{display:block;height:100%;border-radius:99px;background:var(--cyan)}
.exec-progress-row .danger i b{background:#ff718c}

.cfo-os-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-bottom:15px}
.cfo-os-card{overflow:hidden}
.cfo-os-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--line)}
.cfo-os-metrics>div{min-height:78px;padding:13px 16px;background:var(--panel)}
.cfo-os-metrics span{display:block;color:var(--muted);font-size:9px;text-transform:uppercase}
.cfo-os-metrics strong{display:block;margin-top:7px;color:var(--text);font-size:18px}
.cfo-os-metrics .warning strong{color:#ff718c}
.cfo-os-flow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--line)}
.cfo-os-flow button{min-height:93px;padding:14px;border:0;background:var(--panel);color:inherit;text-align:left;cursor:pointer}
.cfo-os-flow button:hover{background:rgba(98,228,231,.04)}
.cfo-os-flow span{color:var(--cyan);font-size:9px;font-weight:900}
.cfo-os-flow strong{display:block;margin-top:6px;color:var(--text);font-size:11px}
.cfo-os-flow small{display:block;margin-top:4px;color:var(--muted);font-size:9px}

.cfo-control-meta{margin-top:11px;padding-top:9px;border-top:1px solid rgba(91,116,145,.10);display:flex;align-items:center;justify-content:space-between}
.cfo-control-meta span,.cfo-control-meta b{font-size:9px;color:var(--muted)}
.cfo-control-rules{overflow:hidden}
.cfo-control-rule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line)}
.cfo-control-rule-grid>div{min-height:110px;padding:16px;background:var(--panel)}
.cfo-control-rule-grid span{display:block;color:var(--cyan);font-size:9px;font-weight:900;text-transform:uppercase}
.cfo-control-rule-grid strong{display:block;margin-top:8px;color:var(--text);font-size:11px;line-height:1.5}

.cfo-alert-register{overflow:hidden}
.cfo-alert-row{
  min-height:92px;padding:12px 18px;display:grid;grid-template-columns:36px minmax(300px,1fr) 170px 150px;
  gap:14px;align-items:center;border-top:1px solid rgba(91,116,145,.10)
}
.cfo-alert-row>span{width:33px;height:33px;display:grid;place-items:center;border-radius:9px;background:rgba(255,96,126,.08);color:#ff718c;font-size:9px;font-weight:900}
.cfo-alert-row small{display:block;color:var(--muted);font-size:9px}
.cfo-alert-row strong{display:block;margin:4px 0;color:var(--text);font-size:11px}
.cfo-alert-row p{margin:0;color:var(--muted);font-size:10px;line-height:1.4}
.cfo-alert-row>div:nth-child(3){text-align:right}
.cfo-alert-row>div:last-child{display:grid;justify-items:end;gap:5px}

.progresses-panel{overflow:hidden;margin-bottom:15px}
.progresses-row{
  min-height:83px;padding:13px 18px;display:grid;grid-template-columns:1.2fr .9fr .9fr .9fr 100px;
  gap:14px;align-items:center;border-top:1px solid rgba(91,116,145,.10)
}
.progresses-row>div:first-child strong{display:block;color:var(--text);font-size:11px}
.progresses-row>div:first-child small{display:block;margin-top:4px;color:var(--muted);font-size:9px}
.progresses-row span{display:block;margin-bottom:6px;color:var(--muted);font-size:9px}
.progresses-row i{display:block;height:8px;border-radius:99px;background:rgba(100,125,150,.14);overflow:hidden}
.progresses-row i b{display:block;height:100%;border-radius:99px;background:var(--cyan)}
.progresses-row .warning i b{background:#ffc66b}
.progresses-row .danger i b{background:#ff718c}

:root[data-font-size="large"] .exec-progress-row>div:first-child strong,
:root[data-font-size="large"] .cfo-os-flow strong,
:root[data-font-size="large"] .cfo-control-rule-grid strong,
:root[data-font-size="large"] .cfo-alert-row strong,
:root[data-font-size="large"] .progresses-row>div:first-child strong{font-size:13px}
:root[data-font-size="xlarge"] .exec-progress-row>div:first-child strong,
:root[data-font-size="xlarge"] .cfo-os-flow strong,
:root[data-font-size="xlarge"] .cfo-control-rule-grid strong,
:root[data-font-size="xlarge"] .cfo-alert-row strong,
:root[data-font-size="xlarge"] .progresses-row>div:first-child strong{font-size:14px}

@media(max-width:1250px){
  .cfo-os-grid{grid-template-columns:1fr}
  .cfo-control-rule-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cfo-alert-row{grid-template-columns:36px 1fr 130px}
  .cfo-alert-row>div:last-child{grid-column:2/-1;display:flex;justify-content:flex-start}
  .progresses-row{grid-template-columns:1fr 1fr}
}
@media(max-width:800px){
  .exec-progress-row,.cfo-alert-row,.progresses-row{grid-template-columns:1fr}
  .cfo-control-rule-grid,.cfo-os-metrics,.cfo-os-flow{grid-template-columns:1fr}
}


/* Construction Projects - live youngandright cost_center list */
.construction-projects-sql-table{min-width:760px}
.construction-projects-sql-table td:nth-child(1){width:180px}
.construction-project-loading{
  height:120px!important;
  text-align:center;
  color:var(--muted)!important;
}


/* Accounting transaction central ledger */
.accounting-voucher-table{min-width:1320px}
.voucher-project-cell{max-width:260px;white-space:normal!important;line-height:1.4}
.voucher-detail-overlay{
  position:fixed;inset:0;z-index:5000;padding:24px;
  display:flex;justify-content:flex-end;
  background:rgba(1,10,18,.66);backdrop-filter:blur(5px)
}
.voucher-detail-panel{
  width:min(1220px,94vw);height:calc(100vh - 48px);
  overflow:auto;border:1px solid var(--line);border-radius:18px;
  background:var(--panel);box-shadow:0 26px 90px rgba(0,0,0,.42)
}
.voucher-detail-header{
  min-height:88px;padding:18px 22px;position:sticky;top:0;z-index:2;
  display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid var(--line);background:var(--panel)
}
.voucher-detail-header>div>span{color:var(--cyan);font-size:9px;font-weight:900;letter-spacing:.7px}
.voucher-detail-header h2{margin:5px 0 3px;font-size:22px;color:var(--text)}
.voucher-detail-header small{color:var(--muted)}
.voucher-detail-header>button{
  width:39px;height:39px;border:1px solid var(--line);border-radius:10px;
  background:transparent;color:var(--text);font-size:20px;cursor:pointer
}
.voucher-detail-summary{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;
  background:var(--line);border-bottom:1px solid var(--line)
}
.voucher-detail-summary>div{padding:15px 18px;background:var(--panel)}
.voucher-detail-summary span{display:block;color:var(--muted);font-size:9px;text-transform:uppercase}
.voucher-detail-summary strong{display:block;margin-top:7px;color:var(--text);font-size:17px}
.voucher-detail-table{min-width:1150px}
@media(max-width:900px){
  .voucher-detail-overlay{padding:8px}
  .voucher-detail-panel{width:100%;height:calc(100vh - 16px)}
  .voucher-detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* youngandright Chart of Accounts migration status */
.fzi-coa-migration-strip{
  min-height:78px;
  margin-bottom:14px;
  padding:12px 15px;
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:18px;
  align-items:center;
  border:1px solid rgba(98,228,231,.22);
  border-radius:14px;
  background:linear-gradient(135deg,rgba(98,228,231,.055),var(--panel));
}
.fzi-coa-migration-strip>div span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.55px;
}
.fzi-coa-migration-strip>div strong{
  display:block;
  margin-top:5px;
  color:var(--text);
  font-size:13px;
}
.fzi-coa-migration-strip>div small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
}
@media(max-width:900px){
  .fzi-coa-migration-strip{grid-template-columns:1fr}
}


/* youngandright Client master */
.client-master-table{min-width:900px}
.client-master-table th:nth-child(1){width:32%}
.client-master-table th:nth-child(2){width:20%}
.client-master-table td:nth-child(3){white-space:normal;line-height:1.45}
.client-warning{
  border-color:rgba(255,190,85,.32)!important;
}
:root[data-font-size="large"] .client-master-table td{font-size:13px}
:root[data-font-size="xlarge"] .client-master-table td{font-size:14px}


/* ============================================================
   OrisDental2026 Modern Appointment Calendar
   ============================================================ */
.modern-calendar-page-heading{align-items:flex-start}
.calendar-live-badge{
  height:42px;padding:0 12px;display:inline-flex;align-items:center;gap:7px;
  border:1px solid rgba(77,222,161,.25);border-radius:11px;
  background:rgba(77,222,161,.06);color:#63ddb0;
  font-size:10px;font-weight:900;letter-spacing:.45px
}
.calendar-live-badge i{
  width:7px;height:7px;border-radius:50%;background:#63ddb0;
  box-shadow:0 0 0 5px rgba(77,222,161,.08)
}

.modern-calendar-kpis{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;margin-bottom:14px
}
.modern-calendar-kpis article{
  min-height:100px;padding:16px 18px;border:1px solid var(--line);
  border-radius:14px;background:var(--panel)
}
.modern-calendar-kpis span{
  display:block;color:var(--muted);font-size:9px;font-weight:900;
  letter-spacing:.45px;text-transform:uppercase
}
.modern-calendar-kpis strong{
  display:block;margin:10px 0 4px;color:var(--text);font-size:24px
}
.modern-calendar-kpis small{color:var(--muted-2);font-size:10px}

.modern-calendar-layout{
  display:grid;grid-template-columns:minmax(0,1fr) 285px;
  gap:14px;align-items:start
}
.modern-calendar-shell{overflow:hidden;min-width:0}
.modern-calendar-toolbar{
  min-height:72px;padding:12px 16px;display:flex;align-items:center;
  justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)
}
.modern-calendar-navigation{display:flex;align-items:center;gap:7px;min-width:0}
.modern-calendar-navigation button,
.modern-calendar-view-switch button{
  height:36px;padding:0 12px;border:1px solid var(--line);
  border-radius:9px;background:transparent;color:var(--muted);
  font:inherit;font-size:10px;font-weight:800;cursor:pointer
}
.modern-calendar-navigation button:hover,
.modern-calendar-view-switch button:hover,
.modern-calendar-view-switch button.active{
  color:var(--cyan);border-color:rgba(98,228,231,.30);
  background:rgba(98,228,231,.055)
}
.modern-calendar-navigation button.icon{width:36px;padding:0;font-size:18px}
.modern-calendar-navigation h2{
  margin:0 0 0 6px;color:var(--text);font-size:20px;white-space:nowrap
}
.modern-calendar-view-switch{
  display:flex;padding:3px;border:1px solid var(--line);
  border-radius:11px;background:rgba(255,255,255,.015)
}
.modern-calendar-view-switch button{border:0;height:32px}
.modern-calendar-content{position:relative;min-height:630px}
.modern-calendar-loading{
  min-height:630px;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:12px;color:var(--muted)
}
.modern-calendar-loading span{
  width:31px;height:31px;border:3px solid rgba(98,228,231,.12);
  border-top-color:var(--cyan);border-radius:50%;
  animation:calendar-spin .8s linear infinite
}
@keyframes calendar-spin{to{transform:rotate(360deg)}}

/* Month */
.modern-calendar-month{
  display:grid;grid-template-columns:repeat(7,minmax(0,1fr))
}
.modern-calendar-weekday{
  height:38px;padding:0 10px;display:flex;align-items:center;
  border-right:1px solid rgba(91,116,145,.08);
  border-bottom:1px solid var(--line);
  color:#6d86a0;font-size:9px;font-weight:900;letter-spacing:.55px
}
.modern-calendar-day{
  min-height:142px;padding:8px;border-right:1px solid rgba(91,116,145,.10);
  border-bottom:1px solid rgba(91,116,145,.10);background:var(--panel)
}
.modern-calendar-day.outside{background:rgba(255,255,255,.008);opacity:.62}
:root[data-theme="light"] .modern-calendar-day.outside{background:#f7f9fb}
.modern-calendar-day.today{
  box-shadow:inset 0 0 0 1px rgba(98,228,231,.30);
  background:linear-gradient(145deg,rgba(98,228,231,.045),var(--panel))
}
.modern-calendar-day-number{
  height:27px;display:flex;align-items:center;justify-content:space-between
}
.modern-calendar-day-number>span{
  width:26px;height:26px;display:grid;place-items:center;border-radius:8px;
  color:var(--text);font-size:11px;font-weight:850
}
.modern-calendar-day.today .modern-calendar-day-number>span{
  background:var(--cyan);color:#071017
}
.modern-calendar-day-number>b{
  color:var(--cyan);font-size:7px;letter-spacing:.5px
}
.modern-calendar-day-events{display:grid;gap:4px;margin-top:4px}
.modern-calendar-event{
  --event-accent:var(--cyan);
  width:100%;min-width:0;padding:7px 8px;display:grid;
  grid-template-columns:3px auto 1fr;gap:6px;align-items:center;
  border:1px solid color-mix(in srgb,var(--event-accent) 20%,transparent);
  border-radius:8px;background:color-mix(in srgb,var(--event-accent) 7%,transparent);
  color:var(--text);font:inherit;text-align:left;cursor:pointer;overflow:hidden
}
.modern-calendar-event:hover{
  border-color:color-mix(in srgb,var(--event-accent) 42%,transparent);
  background:color-mix(in srgb,var(--event-accent) 12%,transparent)
}
.modern-calendar-event>i{
  width:3px;height:22px;border-radius:99px;background:var(--event-accent)
}
.modern-calendar-event-time{color:var(--muted);font-size:8px;white-space:nowrap}
.modern-calendar-event strong{
  min-width:0;color:var(--text);font-size:9px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis
}
.modern-calendar-event small{
  grid-column:3;color:var(--muted);font-size:8px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis
}
.modern-calendar-event.compact{padding:5px 6px}
.modern-calendar-event.compact>i{height:15px}
.modern-calendar-more{
  height:23px;padding:0 6px;border:0;background:transparent;
  color:var(--cyan);font:inherit;font-size:8px;font-weight:850;
  text-align:left;cursor:pointer
}

/* Week */
.modern-calendar-week{
  min-height:630px;display:grid;grid-template-columns:repeat(7,minmax(130px,1fr));
  overflow:auto
}
.modern-calendar-week-column{
  min-height:630px;border-right:1px solid rgba(91,116,145,.10)
}
.modern-calendar-week-column.today{
  background:linear-gradient(180deg,rgba(98,228,231,.035),transparent)
}
.modern-calendar-week-header{
  height:76px;display:flex;flex-direction:column;align-items:center;
  justify-content:center;border-bottom:1px solid var(--line)
}
.modern-calendar-week-header span{color:var(--muted);font-size:8px;font-weight:900}
.modern-calendar-week-header strong{margin:3px 0;color:var(--text);font-size:20px}
.modern-calendar-week-header small{color:var(--muted);font-size:8px}
.modern-calendar-week-column.today .modern-calendar-week-header strong{color:var(--cyan)}
.modern-calendar-week-events{padding:8px;display:grid;gap:7px}
.modern-calendar-empty{
  min-height:80px;display:grid;place-items:center;color:var(--muted-2);
  font-size:9px;text-align:center
}
.modern-calendar-empty.large{min-height:300px;font-size:11px}

/* Day */
.modern-calendar-day-view{
  min-height:630px;display:grid;grid-template-columns:150px minmax(0,1fr)
}
.modern-calendar-day-view-date{
  padding:34px 20px;text-align:center;border-right:1px solid var(--line)
}
.modern-calendar-day-view-date span{color:var(--cyan);font-size:9px;font-weight:900}
.modern-calendar-day-view-date strong{display:block;margin:10px 0;color:var(--text);font-size:54px}
.modern-calendar-day-view-date small{color:var(--muted);font-size:10px}
.modern-calendar-day-list{padding:16px;display:grid;align-content:start;gap:8px}
.modern-calendar-day-row{
  --event-accent:var(--cyan);
  min-height:72px;padding:10px 13px;display:grid;
  grid-template-columns:90px 4px 1fr auto;gap:13px;align-items:center;
  border:1px solid var(--line);border-radius:11px;background:transparent;
  color:inherit;font:inherit;text-align:left;cursor:pointer
}
.modern-calendar-day-row:hover{
  border-color:color-mix(in srgb,var(--event-accent) 35%,transparent);
  background:color-mix(in srgb,var(--event-accent) 5%,transparent)
}
.modern-calendar-day-row>i{height:38px;border-radius:99px;background:var(--event-accent)}
.modern-calendar-day-time strong,
.modern-calendar-day-row>div:nth-child(3)>strong{display:block;color:var(--text);font-size:11px}
.modern-calendar-day-time small,
.modern-calendar-day-row>div:nth-child(3)>small{display:block;margin-top:4px;color:var(--muted);font-size:9px}
.modern-calendar-day-row>span{color:var(--muted);font-size:9px}

/* Filters */
.modern-calendar-filters{overflow:hidden;position:sticky;top:92px}
.modern-calendar-filter-heading{
  min-height:67px;padding:13px 15px;display:flex;align-items:center;
  justify-content:space-between;border-bottom:1px solid var(--line)
}
.modern-calendar-filter-heading span{
  color:var(--muted);font-size:8px;font-weight:900;letter-spacing:.55px
}
.modern-calendar-filter-heading h2{margin:3px 0 0;color:var(--text);font-size:16px}
.modern-calendar-filter-heading button{
  border:0;background:transparent;color:var(--cyan);font:inherit;
  font-size:9px;font-weight:850;cursor:pointer
}
.modern-calendar-search{
  height:42px;margin:13px;padding:0 11px;display:flex;align-items:center;
  gap:7px;border:1px solid var(--line);border-radius:10px
}
.modern-calendar-search span{color:var(--muted)}
.modern-calendar-search input{
  width:100%;border:0;outline:0;background:transparent;color:var(--text);
  font:inherit;font-size:10px
}
.modern-calendar-filter-section{
  padding:13px 15px;border-top:1px solid rgba(91,116,145,.10)
}
.modern-calendar-filter-title{
  display:flex;align-items:center;justify-content:space-between;margin-bottom:9px
}
.modern-calendar-filter-title strong{
  color:var(--text);font-size:10px
}
.modern-calendar-filter-title span{
  min-width:24px;height:21px;padding:0 6px;display:grid;place-items:center;
  border-radius:99px;background:rgba(98,228,231,.07);
  color:var(--cyan);font-size:8px
}
.modern-calendar-filter-options{
  max-height:210px;overflow:auto;display:grid;gap:3px
}
.modern-calendar-filter-options label{
  min-height:34px;padding:5px 6px;display:grid;
  grid-template-columns:16px 8px 1fr;gap:7px;align-items:center;
  border-radius:7px;cursor:pointer
}
.modern-calendar-filter-options label:hover{background:rgba(98,228,231,.035)}
.modern-calendar-filter-options input{accent-color:var(--cyan)}
.modern-calendar-filter-options i{
  width:8px;height:8px;border-radius:50%;background:var(--filter-accent)
}
.modern-calendar-filter-options span{color:var(--muted);font-size:9px}
.modern-calendar-filter-options.status label{grid-template-columns:16px 1fr}
.modern-calendar-filter-summary,
.modern-calendar-source{
  margin:13px;padding:13px;border:1px solid var(--line);
  border-radius:10px;background:rgba(255,255,255,.012)
}
.modern-calendar-filter-summary span,
.modern-calendar-source span{
  display:block;color:var(--muted);font-size:8px;font-weight:900;letter-spacing:.45px
}
.modern-calendar-filter-summary strong{
  display:block;margin:5px 0;color:var(--text);font-size:21px
}
.modern-calendar-filter-summary small,
.modern-calendar-source small{color:var(--muted);font-size:8px;line-height:1.4}
.modern-calendar-source strong{
  display:block;margin:6px 0;color:var(--text);font-size:9px;word-break:break-word
}

/* Detail flyout */
.calendar-detail-overlay{
  position:fixed;inset:0;z-index:6000;padding:24px;display:flex;
  align-items:center;justify-content:center;background:rgba(2,9,17,.68);
  backdrop-filter:blur(6px)
}
.calendar-detail-panel{
  width:min(720px,94vw);max-height:90vh;overflow:auto;
  border:1px solid var(--line);border-radius:18px;background:var(--panel);
  box-shadow:0 28px 100px rgba(0,0,0,.45)
}
.calendar-detail-top{
  --detail-accent:var(--cyan);
  min-height:94px;padding:18px 20px;display:grid;
  grid-template-columns:5px 1fr 38px;gap:14px;align-items:center;
  border-bottom:1px solid var(--line)
}
.calendar-detail-top>i{height:52px;border-radius:99px;background:var(--detail-accent)}
.calendar-detail-top span{color:var(--muted);font-size:8px;font-weight:900;letter-spacing:.55px}
.calendar-detail-top h2{margin:5px 0;color:var(--text);font-size:21px}
.calendar-detail-top small{color:var(--muted);font-size:9px}
.calendar-detail-top button{
  width:38px;height:38px;border:1px solid var(--line);border-radius:10px;
  background:transparent;color:var(--text);font-size:19px;cursor:pointer
}
.calendar-detail-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1px;background:var(--line)
}
.calendar-detail-grid>div{min-height:72px;padding:13px 16px;background:var(--panel)}
.calendar-detail-grid span,.calendar-detail-description span{
  display:block;color:var(--muted);font-size:8px;font-weight:900;letter-spacing:.4px
}
.calendar-detail-grid strong{
  display:block;margin-top:7px;color:var(--text);font-size:11px;line-height:1.4
}
.calendar-detail-description{padding:17px;border-top:1px solid var(--line)}
.calendar-detail-description p{
  margin:8px 0 0;color:var(--muted);font-size:10px;line-height:1.6;white-space:pre-wrap
}
.calendar-detail-footer{
  min-height:49px;padding:0 17px;display:flex;align-items:center;
  justify-content:space-between;border-top:1px solid var(--line)
}
.calendar-detail-footer span{color:var(--muted);font-size:8px}
.calendar-detail-footer strong{color:#63ddb0;font-size:8px;letter-spacing:.5px}

:root[data-theme="light"] .modern-calendar-shell,
:root[data-theme="light"] .modern-calendar-filters{box-shadow:0 8px 25px rgba(44,67,91,.06)}

:root[data-font-size="large"] .modern-calendar-event strong{font-size:11px}
:root[data-font-size="large"] .modern-calendar-event-time,
:root[data-font-size="large"] .modern-calendar-event small{font-size:10px}
:root[data-font-size="large"] .modern-calendar-filter-options span{font-size:11px}
:root[data-font-size="xlarge"] .modern-calendar-event strong{font-size:12px}
:root[data-font-size="xlarge"] .modern-calendar-event-time,
:root[data-font-size="xlarge"] .modern-calendar-event small{font-size:11px}
:root[data-font-size="xlarge"] .modern-calendar-filter-options span{font-size:12px}

@media(max-width:1280px){
  .modern-calendar-layout{grid-template-columns:1fr}
  .modern-calendar-filters{position:static}
  .modern-calendar-filter-options{max-height:145px}
  .modern-calendar-filters{
    display:grid;grid-template-columns:1fr 1fr;
  }
  .modern-calendar-filter-heading{grid-column:1/-1}
  .modern-calendar-search{grid-column:1/-1}
}
@media(max-width:900px){
  .modern-calendar-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .modern-calendar-toolbar{align-items:flex-start;flex-direction:column}
  .modern-calendar-navigation{flex-wrap:wrap}
  .modern-calendar-navigation h2{width:100%;margin:7px 0 0}
  .modern-calendar-month{min-width:850px}
  .modern-calendar-content{overflow:auto}
  .modern-calendar-filters{display:block}
  .modern-calendar-day-view{grid-template-columns:1fr}
  .modern-calendar-day-view-date{border-right:0;border-bottom:1px solid var(--line)}
}

/* Oris Dental 2026 client master */
.oris-client-table{min-width:980px}.oris-client-table th:nth-child(1){width:27%}.oris-client-table th:nth-child(2){width:34%}.oris-client-table th:nth-child(3){width:20%}.oris-client-table th:nth-child(4){width:19%}.oris-client-table td:nth-child(2){white-space:normal;line-height:1.45}


/* ============================================================
   Oris Dental 2026 - Larger font on Clients page only
   ============================================================ */

/* Page title + subtitle */
body:has(.oris-client-table) .page-heading h1{
  font-size:42px !important;
  line-height:1.08 !important;
}
body:has(.oris-client-table) .page-heading p{
  font-size:16px !important;
  line-height:1.55 !important;
}

/* KPI cards */
body:has(.oris-client-table) .construction-kpi span{
  font-size:12px !important;
}
body:has(.oris-client-table) .construction-kpi strong{
  font-size:30px !important;
}
body:has(.oris-client-table) .construction-kpi small{
  font-size:12px !important;
  line-height:1.45 !important;
}

/* Client list heading */
body:has(.oris-client-table) .stock-list-header .eyebrow{
  font-size:11px !important;
}
body:has(.oris-client-table) .stock-list-header h2{
  font-size:24px !important;
}
body:has(.oris-client-table) .stock-list-meta{
  font-size:13px !important;
}

/* Search */
body:has(.oris-client-table) .stock-search-wrap input{
  font-size:15px !important;
}
body:has(.oris-client-table) .stock-search-wrap{
  min-height:48px !important;
}
body:has(.oris-client-table) .stock-toolbar button{
  font-size:14px !important;
  min-height:44px !important;
  padding-left:16px !important;
  padding-right:16px !important;
}

/* Main table */
.oris-client-table th{
  font-size:14px !important;
  letter-spacing:.35px !important;
  padding:15px 14px !important;
}
.oris-client-table td{
  font-size:16px !important;
  line-height:1.55 !important;
  padding:16px 14px !important;
}
.oris-client-table td.strong{
  font-size:17px !important;
  font-weight:800 !important;
}

/* Pagination */
body:has(.oris-client-table) .stock-pagination{
  font-size:13px !important;
}
body:has(.oris-client-table) .stock-pagination button,
body:has(.oris-client-table) .stock-pagination select{
  font-size:13px !important;
  min-height:38px !important;
}

/* Top action buttons */
body:has(.oris-client-table) .heading-actions button{
  font-size:14px !important;
  min-height:46px !important;
  padding-left:18px !important;
  padding-right:18px !important;
}

/* Error / migration messages */
body:has(.oris-client-table) .coa-error{
  font-size:14px !important;
  line-height:1.55 !important;
}

@media(max-width:900px){
  body:has(.oris-client-table) .page-heading h1{
    font-size:34px !important;
  }

  .oris-client-table th{
    font-size:13px !important;
  }

  .oris-client-table td{
    font-size:15px !important;
  }
}


/* ============================================================
   Oris Dental Statistical Reports - Sales Comparison Dashboard
   ============================================================ */
.sales-compare-kpis{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;margin-bottom:14px
}
.sales-compare-kpis article{
  min-height:112px;padding:18px;border:1px solid var(--line);
  border-radius:15px;background:var(--panel)
}
.sales-compare-kpis span{
  display:block;color:var(--muted);font-size:10px;font-weight:900;
  letter-spacing:.5px
}
.sales-compare-kpis strong{
  display:block;margin:10px 0 5px;color:var(--text);font-size:27px
}
.sales-compare-kpis small{color:var(--muted);font-size:10px}
.sales-compare-kpis article.positive strong{color:#55d9a8}
.sales-compare-kpis article.negative strong{color:#ff7b86}

.sales-report-filter{
  margin-bottom:14px;padding:14px;display:grid;
  grid-template-columns:minmax(260px,1fr) 170px auto auto;
  gap:10px;align-items:end
}
.sales-report-filter label span{
  display:block;margin-bottom:6px;color:var(--muted);
  font-size:9px;font-weight:900;letter-spacing:.4px
}
.sales-report-filter input{
  width:100%;height:44px;padding:0 12px;border:1px solid var(--line);
  border-radius:10px;background:transparent;color:var(--text);
  font:inherit;font-size:13px;outline:0
}
.sales-report-filter input:focus{border-color:rgba(98,228,231,.4)}

.sales-compare-dashboard-grid{
  display:grid;grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);
  gap:14px;margin-bottom:14px
}
.sales-compare-panel{min-height:410px;overflow:hidden}
.sales-compare-panel-heading{
  height:72px;padding:13px 17px;display:flex;align-items:center;
  border-bottom:1px solid var(--line)
}
.sales-compare-panel-heading h2{margin:4px 0 0;color:var(--text);font-size:19px}

.sales-compare-chart{
  height:285px;padding:22px 20px 8px;display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));gap:8px;align-items:end
}
.sales-compare-month{
  height:100%;display:grid;grid-template-rows:1fr 25px;align-items:end
}
.sales-compare-bars{
  height:100%;display:flex;gap:4px;align-items:flex-end;justify-content:center
}
.sales-compare-bars i{
  width:12px;min-height:2px;border-radius:5px 5px 1px 1px
}
.sales-compare-bars i.y2025,
.sales-compare-legend i.y2025,
.sales-top-client-bar b.y2025{background:#7388ff}
.sales-compare-bars i.y2026,
.sales-compare-legend i.y2026,
.sales-top-client-bar b.y2026{background:#55dce2}
.sales-compare-month>span{
  align-self:end;text-align:center;color:var(--muted);font-size:9px
}
.sales-compare-legend{
  display:flex;gap:18px;justify-content:center;padding:8px 0 16px;
  color:var(--muted);font-size:9px
}
.sales-compare-legend span{display:flex;align-items:center;gap:6px}
.sales-compare-legend i{width:10px;height:10px;border-radius:3px}

.sales-top-clients{
  max-height:360px;padding:12px 16px 17px;overflow:auto
}
.sales-top-client{
  padding:10px 0;border-bottom:1px solid rgba(91,116,145,.09)
}
.sales-top-client-name{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;margin-bottom:7px
}
.sales-top-client-name strong{
  min-width:0;color:var(--text);font-size:10px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.sales-top-client-name small{color:var(--muted);font-size:9px}
.sales-top-client-bar{
  display:grid;grid-template-columns:32px 1fr 80px;gap:7px;
  align-items:center;margin-top:5px
}
.sales-top-client-bar>span{color:var(--muted);font-size:8px}
.sales-top-client-bar>i{
  height:6px;overflow:hidden;border-radius:99px;
  background:rgba(125,145,169,.09)
}
.sales-top-client-bar b{
  display:block;height:100%;border-radius:99px
}
.sales-top-client-bar>strong{
  color:var(--text);font-size:8px;text-align:right
}

.sales-compare-table{min-width:1000px}
.sales-compare-table th{font-size:11px!important}
.sales-compare-table td{font-size:13px!important}
.sales-positive{color:#49cd9a!important;font-weight:800}
.sales-negative{color:#f97f88!important;font-weight:800}

@media(max-width:1100px){
  .sales-compare-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sales-compare-dashboard-grid{grid-template-columns:1fr}
  .sales-report-filter{grid-template-columns:1fr 1fr}
}
@media(max-width:700px){
  .sales-compare-kpis{grid-template-columns:1fr}
  .sales-report-filter{grid-template-columns:1fr}
  .sales-compare-chart{min-width:720px}
  .sales-compare-panel{overflow:auto}
}


/* Oris Dental General Sales Report - based on uploaded Excel */
.general-sales-kpis{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;margin-bottom:14px
}
.general-sales-kpis article{
  min-height:105px;padding:17px 18px;border:1px solid var(--line);
  border-radius:14px;background:var(--panel)
}
.general-sales-kpis span{
  display:block;color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.45px
}
.general-sales-kpis strong{
  display:block;margin:10px 0 4px;color:var(--text);font-size:26px
}
.general-sales-kpis small{color:var(--muted);font-size:10px}
.general-sales-kpis .positive strong{color:#55d9a8}
.general-sales-kpis .negative strong{color:#ff7b86}

.general-sales-filters{
  display:grid;
  grid-template-columns:150px 150px minmax(250px,1fr) 180px 180px auto auto;
  gap:10px;align-items:end;padding:14px;margin-bottom:14px
}
.general-sales-filters label span{
  display:block;margin-bottom:6px;color:var(--muted);
  font-size:9px;font-weight:900;letter-spacing:.4px
}
.general-sales-filters input,
.general-sales-filters select{
  width:100%;height:44px;padding:0 10px;border:1px solid var(--line);
  border-radius:10px;background:var(--panel);color:var(--text);
  font:inherit;font-size:12px;outline:0
}
.general-sales-filters .wide{min-width:260px}

.general-sales-panel{overflow:hidden}
.general-sales-panel .stock-list-header small{
  display:block;margin-top:5px;color:var(--muted);font-size:9px
}
.general-sales-table{min-width:2200px}
.general-sales-table th{
  font-size:10px!important;white-space:normal!important;line-height:1.25!important;
  padding:10px 8px!important;border:1px solid var(--line)!important
}
.general-sales-table td{
  font-size:11px!important;padding:9px 8px!important;
  border-right:1px solid rgba(91,116,145,.08)!important
}
.general-sales-table td.description{
  min-width:300px;white-space:normal;line-height:1.35
}
.general-sales-table .brand-head{
  background:#f0e714!important;color:#1a1a12!important
}
.general-sales-table .profit-head{
  background:#f0e714!important;color:#1a1a12!important
}
.general-sales-table th:nth-child(16){
  border-top:4px solid #f09028!important
}

.general-sales-totals{
  padding:12px 15px;display:flex;justify-content:flex-end;
  flex-wrap:wrap;gap:8px;border-top:1px solid var(--line)
}
.general-sales-totals span{
  min-width:135px;padding:8px 10px;border:1px solid var(--line);
  border-radius:9px;color:var(--text);font-size:11px;text-align:right
}
.general-sales-totals b{
  display:block;margin-bottom:4px;color:var(--muted);font-size:8px;
  letter-spacing:.35px;text-transform:uppercase
}

@media(max-width:1250px){
  .general-sales-filters{
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
}
@media(max-width:800px){
  .general-sales-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .general-sales-filters{grid-template-columns:1fr}
}


/* ============================================================
   Oris Dental - Sales by Customer 2025 vs 2026
   ============================================================ */
.customer-comparison-kpis{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px
}
.customer-comparison-kpis article{
  min-height:108px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel)
}
.customer-comparison-kpis span,
.customer-comparison-mini-kpis span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.45px
}
.customer-comparison-kpis strong{
  display:block;
  margin:10px 0 4px;
  color:var(--text);
  font-size:25px
}
.customer-comparison-kpis small{
  color:var(--muted);
  font-size:9px
}
.customer-comparison-kpis .positive strong{
  color:#50d39f
}
.customer-comparison-kpis .negative strong{
  color:#fa7b86
}

.customer-comparison-filters{
  display:grid;
  grid-template-columns:145px 145px minmax(260px,1fr) 150px 185px auto auto;
  gap:10px;
  align-items:end;
  padding:14px;
  margin-bottom:14px
}
.customer-comparison-filters label span{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.4px
}
.customer-comparison-filters input,
.customer-comparison-filters select{
  width:100%;
  height:44px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel);
  color:var(--text);
  font:inherit;
  font-size:12px;
  outline:0
}

.customer-comparison-mini-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px
}
.customer-comparison-mini-kpis article{
  min-height:78px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel)
}
.customer-comparison-mini-kpis strong{
  display:block;
  margin-top:7px;
  color:var(--text);
  font-size:21px
}

.customer-comparison-dashboard{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(330px,.75fr);
  gap:14px;
  margin-bottom:14px
}
.customer-comparison-panel{
  min-height:390px;
  overflow:hidden
}
.customer-comparison-panel.top-customers{
  grid-row:span 2
}
.customer-comparison-panel-heading{
  min-height:68px;
  padding:13px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--line)
}
.customer-comparison-panel-heading h2{
  margin:4px 0 0;
  color:var(--text);
  font-size:18px
}
.customer-year-legend{
  display:flex;
  gap:13px;
  color:var(--muted);
  font-size:9px
}
.customer-year-legend span{
  display:flex;
  align-items:center;
  gap:5px
}
.customer-year-legend i{
  width:9px;
  height:9px;
  border-radius:3px
}
.customer-year-legend .year-2025,
.customer-comparison-value-row b.year-2025{
  background:#7388ff
}
.customer-year-legend .year-2026,
.customer-comparison-value-row b.year-2026{
  background:#55dce2
}

.customer-comparison-bars{
  max-height:720px;
  overflow:auto;
  padding:10px 16px 17px
}
.customer-comparison-bar-row{
  padding:11px 0;
  border-bottom:1px solid rgba(91,116,145,.09)
}
.customer-comparison-name{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px
}
.customer-comparison-name strong{
  min-width:0;
  color:var(--text);
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.customer-comparison-name small{
  color:var(--muted);
  font-size:9px
}
.customer-comparison-value-row{
  display:grid;
  grid-template-columns:34px 1fr 90px;
  gap:8px;
  align-items:center;
  margin-top:5px
}
.customer-comparison-value-row>span{
  color:var(--muted);
  font-size:8px
}
.customer-comparison-value-row>i{
  height:7px;
  overflow:hidden;
  border-radius:99px;
  background:rgba(125,145,169,.09)
}
.customer-comparison-value-row b{
  display:block;
  height:100%;
  border-radius:99px
}
.customer-comparison-value-row>strong{
  color:var(--text);
  font-size:9px;
  text-align:right
}

.customer-variance-list{
  max-height:310px;
  overflow:auto;
  padding:10px 15px 14px
}
.customer-variance-row{
  display:grid;
  grid-template-columns:minmax(110px,1fr) minmax(80px,1fr) 90px;
  gap:9px;
  align-items:center;
  min-height:43px;
  border-bottom:1px solid rgba(91,116,145,.08)
}
.customer-variance-row>div strong{
  display:block;
  color:var(--text);
  font-size:9px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.customer-variance-row>div small{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:8px
}
.customer-variance-row>i{
  height:6px;
  overflow:hidden;
  border-radius:99px;
  background:rgba(125,145,169,.09)
}
.customer-variance-row>i b{
  display:block;
  height:100%;
  border-radius:99px
}
.customer-variance-row>i b.positive{
  background:#50d39f
}
.customer-variance-row>i b.negative{
  background:#fa7b86
}
.customer-variance-row>span{
  text-align:right;
  font-size:9px
}

.customer-comparison-table{
  min-width:1050px
}
.customer-comparison-table th{
  font-size:11px!important
}
.customer-comparison-table td{
  font-size:13px!important
}
.customer-comparison-status{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:0 8px;
  border-radius:99px;
  font-size:9px;
  font-weight:850
}
.customer-comparison-status.increased{
  color:#42c994;
  background:rgba(66,201,148,.08);
  border:1px solid rgba(66,201,148,.18)
}
.customer-comparison-status.decreased{
  color:#f57983;
  background:rgba(245,121,131,.08);
  border:1px solid rgba(245,121,131,.18)
}
.customer-comparison-status.unchanged{
  color:var(--muted);
  background:rgba(125,145,169,.07);
  border:1px solid var(--line)
}

@media(max-width:1350px){
  .customer-comparison-kpis{
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
}
@media(max-width:1050px){
  .customer-comparison-dashboard{
    grid-template-columns:1fr
  }
  .customer-comparison-panel.top-customers{
    grid-row:auto
  }
  .customer-comparison-filters{
    grid-template-columns:1fr 1fr
  }
}
@media(max-width:720px){
  .customer-comparison-kpis,
  .customer-comparison-mini-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .customer-comparison-filters{
    grid-template-columns:1fr
  }
}


/* Sales by Customer - No Sales in 2026 drill-down */
.customer-no-sales-kpi.clickable{
  cursor:pointer;
  transition:border-color .16s ease, transform .16s ease, background .16s ease;
}
.customer-no-sales-kpi.clickable:hover{
  transform:translateY(-1px);
  border-color:rgba(98,228,231,.35);
  background:linear-gradient(
    145deg,
    rgba(98,228,231,.045),
    var(--panel)
  )
}
.customer-no-sales-kpi.clickable:focus-visible{
  outline:2px solid var(--cyan);
  outline-offset:2px
}
.customer-no-sales-kpi small{
  display:block;
  margin-top:4px;
  color:var(--cyan);
  font-size:8px;
  font-weight:800
}

.customer-lost-overlay{
  position:fixed;
  inset:0;
  z-index:7000;
  padding:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(2,9,17,.68);
  backdrop-filter:blur(7px)
}
.customer-lost-modal{
  width:min(900px,95vw);
  max-height:88vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--panel);
  box-shadow:0 30px 110px rgba(0,0,0,.48)
}
.customer-lost-header{
  min-height:104px;
  padding:18px 20px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  border-bottom:1px solid var(--line)
}
.customer-lost-header span{
  color:#fa7b86;
  font-size:9px;
  font-weight:900;
  letter-spacing:.5px
}
.customer-lost-header h2{
  margin:5px 0 6px;
  color:var(--text);
  font-size:23px
}
.customer-lost-header p{
  max-width:690px;
  margin:0;
  color:var(--muted);
  font-size:10px;
  line-height:1.55
}
.customer-lost-header>button{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border:1px solid var(--line);
  border-radius:10px;
  background:transparent;
  color:var(--text);
  font-size:20px;
  cursor:pointer
}
.customer-lost-periods{
  display:grid;
  grid-template-columns:1fr 150px;
  gap:1px;
  background:var(--line);
  border-bottom:1px solid var(--line)
}
.customer-lost-periods>div{
  min-height:68px;
  padding:13px 18px;
  background:var(--panel)
}
.customer-lost-periods span{
  display:block;
  color:var(--muted);
  font-size:8px;
  font-weight:900;
  letter-spacing:.4px
}
.customer-lost-periods strong{
  display:block;
  margin-top:6px;
  color:var(--text);
  font-size:12px
}
.customer-lost-table-wrap{
  max-height:520px;
  overflow:auto
}
.customer-lost-table{
  min-width:720px
}
.customer-lost-table th{
  position:sticky;
  top:0;
  z-index:2;
  background:var(--panel);
  font-size:10px!important
}
.customer-lost-table td{
  font-size:12px!important
}
.customer-lost-footer{
  min-height:58px;
  padding:10px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-top:1px solid var(--line)
}
.customer-lost-footer span{
  color:var(--muted);
  font-size:9px
}

@media(max-width:700px){
  .customer-lost-overlay{
    padding:10px
  }
  .customer-lost-periods{
    grid-template-columns:1fr
  }
  .customer-lost-footer{
    align-items:flex-start;
    flex-direction:column
  }
}


/* Customers Decreased drill-down */
.customer-decreased-kpi.clickable{
  cursor:pointer;
  transition:border-color .16s ease, transform .16s ease, background .16s ease;
}
.customer-decreased-kpi.clickable:hover{
  transform:translateY(-1px);
  border-color:rgba(250,123,134,.38);
  background:linear-gradient(
    145deg,
    rgba(250,123,134,.045),
    var(--panel)
  )
}
.customer-decreased-kpi.clickable:focus-visible{
  outline:2px solid #fa7b86;
  outline-offset:2px
}
.customer-decreased-kpi small{
  color:#fa7b86!important
}
.customer-decreased-header>div>span{
  color:#fa7b86!important
}
.customer-decreased-table{
  min-width:820px
}


/* Customer comparison popup Excel export */
.customer-lost-footer-actions{
  display:flex;
  align-items:center;
  gap:8px
}
.customer-lost-footer-actions button{
  white-space:nowrap
}
@media(max-width:700px){
  .customer-lost-footer-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr
  }
}


/* ============================================================
   Live Financial Reports
   ============================================================ */
.financial-report-home-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-bottom:14px
}
.financial-report-home-card{
  min-height:135px;
  padding:19px;
  display:grid;
  grid-template-columns:54px 1fr auto;
  gap:15px;
  align-items:center;
  text-align:left;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--panel);
  color:var(--text);
  cursor:pointer;
  transition:transform .16s ease,border-color .16s ease,background .16s ease
}
.financial-report-home-card:hover{
  transform:translateY(-2px);
  border-color:rgba(85,220,226,.34);
  background:linear-gradient(145deg,rgba(85,220,226,.045),var(--panel))
}
.financial-report-home-icon{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:rgba(85,220,226,.08);
  color:var(--cyan);
  font-size:25px
}
.financial-report-home-card strong{
  display:block;
  margin-bottom:5px;
  font-size:17px
}
.financial-report-home-card small{
  display:block;
  color:var(--muted);
  font-size:11px;
  line-height:1.5
}
.financial-report-home-card b{
  color:var(--cyan);
  font-size:11px
}

.financial-report-note{
  padding:15px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1px;
  background:var(--line)
}
.financial-report-note>div{
  min-height:88px;
  padding:15px;
  background:var(--panel)
}
.financial-report-note span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.4px
}
.financial-report-note strong{
  display:block;
  margin:8px 0 4px;
  color:var(--text);
  font-size:20px
}
.financial-report-note small{
  color:var(--muted);
  font-size:10px;
  line-height:1.45
}

.financial-report-filters{
  display:grid;
  grid-template-columns:150px 150px 120px minmax(280px,1fr) auto auto;
  gap:10px;
  align-items:end;
  padding:14px;
  margin-bottom:14px
}
.financial-report-filters label span{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.4px
}
.financial-report-filters input,
.financial-report-filters select{
  width:100%;
  height:44px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel);
  color:var(--text);
  font:inherit;
  font-size:12px;
  outline:0
}

.financial-report-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px
}
.financial-report-kpis article{
  min-height:105px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel)
}
.financial-report-kpis span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.45px
}
.financial-report-kpis strong{
  display:block;
  margin:10px 0 4px;
  color:var(--text);
  font-size:25px
}
.financial-report-kpis small{
  color:var(--muted);
  font-size:9px
}
.financial-report-kpis .positive strong,
.financial-report-footer-total .positive{
  color:#50d39f
}
.financial-report-kpis .negative strong,
.financial-report-footer-total .negative{
  color:#fa7b86
}

.financial-report-table-panel{
  overflow:hidden
}
.financial-report-table-panel .stock-list-header small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:9px
}
.financial-summary-table{
  min-width:1150px
}
.financial-ledger-table{
  min-width:1800px
}
.financial-summary-table th,
.financial-ledger-table th{
  font-size:10px!important
}
.financial-summary-table td,
.financial-ledger-table td{
  font-size:11px!important
}
.financial-description{
  min-width:260px;
  white-space:normal!important;
  line-height:1.4
}

.financial-report-footer-total{
  padding:12px 15px;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
  border-top:1px solid var(--line)
}
.financial-report-footer-total span{
  min-width:155px;
  padding:9px 11px;
  text-align:right;
  border:1px solid var(--line);
  border-radius:9px;
  color:var(--text);
  font-size:12px
}
.financial-report-footer-total b{
  display:block;
  margin-bottom:4px;
  color:var(--muted);
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.35px
}

@media(max-width:1000px){
  .financial-report-home-grid{
    grid-template-columns:1fr
  }
  .financial-report-note{
    grid-template-columns:1fr
  }
  .financial-report-filters{
    grid-template-columns:1fr 1fr
  }
  .financial-report-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}
@media(max-width:650px){
  .financial-report-filters{
    grid-template-columns:1fr
  }
  .financial-report-kpis{
    grid-template-columns:1fr
  }
}


/* Restored Financial Report cards */
.financial-report-home-card em{
  display:block;
  margin-top:7px;
  color:var(--cyan);
  font-size:9px;
  font-style:normal;
  font-weight:800
}
.financial-report-home-card.restored em{
  color:var(--muted)
}
.financial-report-home-card.restored{
  border-style:dashed
}
.financial-report-home-card.restored:hover{
  border-style:solid
}
.financial-restored-modal-card{
  width:min(720px,94vw)
}
.financial-restored-body{
  padding:22px;
  color:var(--text)
}
.financial-restored-body>strong{
  display:block;
  margin-bottom:10px;
  font-size:20px
}
.financial-restored-body p{
  margin:7px 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.6
}


/* Balance Sheet + Profit & Loss grouped detail/subtotals */
.financial-group-master-row td{
  padding-top:13px!important;
  padding-bottom:13px!important;
  background:rgba(85,220,226,.055)!important;
  border-top:1px solid rgba(85,220,226,.22)!important;
  border-bottom:1px solid rgba(85,220,226,.12)!important;
  color:var(--text)!important
}
.financial-group-master-row td:first-child{
  color:var(--cyan)!important;
  font-size:12px!important;
  font-weight:900!important
}
.financial-group-master-row td:nth-child(2){
  font-size:12px!important
}
.financial-group-detail-row td{
  background:transparent!important
}
.financial-group-detail-row td:nth-child(3){
  padding-left:24px!important;
  color:var(--muted)!important
}
.financial-group-detail-row td:nth-child(4){
  padding-left:16px!important
}
.financial-group-subtotal-row td{
  padding-top:11px!important;
  padding-bottom:11px!important;
  border-top:1px solid var(--line)!important;
  border-bottom:2px solid rgba(85,220,226,.18)!important;
  background:rgba(125,145,169,.045)!important;
  font-weight:850!important
}
.financial-group-subtotal-row td:nth-child(2){
  color:var(--text)!important;
  letter-spacing:.15px
}


/* ============================================================
   AfriqOil Executive Dashboard
   ============================================================ */
.afriq-dashboard-heading h1{
  font-size:40px
}
.afriq-dashboard-filters{
  display:grid;
  grid-template-columns:155px 155px minmax(280px,1fr) auto;
  gap:11px;
  align-items:end;
  padding:14px;
  margin-bottom:14px
}
.afriq-dashboard-filters label span,
.afriq-previous-period>span{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.45px
}
.afriq-dashboard-filters input{
  width:100%;
  height:44px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel);
  color:var(--text);
  font:inherit
}
.afriq-previous-period{
  min-height:44px;
  display:flex;
  flex-direction:column;
  justify-content:center
}
.afriq-previous-period strong{
  color:var(--text);
  font-size:12px
}
.afriq-previous-period small{
  margin-top:3px;
  color:var(--muted);
  font-size:9px
}

.afriq-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px
}
.afriq-kpis article{
  position:relative;
  min-height:112px;
  overflow:hidden;
  padding:16px;
  border:1px solid var(--line);
  border-radius:15px;
  background:
    radial-gradient(circle at 100% 0,rgba(76,220,225,.08),transparent 45%),
    var(--panel)
}
.afriq-kpis article:after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:2px;
  background:linear-gradient(90deg,var(--cyan),transparent)
}
.afriq-kpis article.positive:after{
  background:linear-gradient(90deg,#50d39f,transparent)
}
.afriq-kpis article.negative:after{
  background:linear-gradient(90deg,#fa7b86,transparent)
}
.afriq-kpis span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.45px
}
.afriq-kpis strong{
  display:block;
  margin:11px 0 5px;
  color:var(--text);
  font-size:24px
}
.afriq-kpis .positive strong{
  color:#50d39f
}
.afriq-kpis .negative strong{
  color:#fa7b86
}
.afriq-kpis small{
  display:block;
  overflow:hidden;
  color:var(--muted);
  font-size:8px;
  white-space:nowrap;
  text-overflow:ellipsis
}

.afriq-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-bottom:14px
}
.afriq-panel{
  min-height:330px;
  padding:16px;
  overflow:hidden
}
.afriq-panel-wide{
  grid-column:1/-1;
  min-height:315px
}
.afriq-panel-heading{
  min-height:50px;
  margin-bottom:15px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px
}
.afriq-panel-heading>div>span{
  display:block;
  color:var(--cyan);
  font-size:8px;
  font-weight:900;
  letter-spacing:.55px
}
.afriq-panel-heading h2{
  margin:5px 0 0;
  color:var(--text);
  font-size:17px
}
.afriq-panel-heading>small{
  color:var(--muted);
  font-size:9px
}
.afriq-legend{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:8px
}
.afriq-legend i{
  width:8px;
  height:8px;
  display:inline-block;
  border-radius:2px
}
.afriq-legend i.previous{
  background:rgba(130,150,170,.42)
}
.afriq-legend i.current{
  background:var(--cyan)
}

.afriq-empty{
  min-height:180px;
  display:grid;
  place-items:center;
  color:var(--muted);
  font-size:10px
}

.afriq-monthly-chart{
  height:225px;
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:9px;
  align-items:end;
  padding:8px 5px 0
}
.afriq-month-column{
  height:100%;
  display:grid;
  grid-template-rows:23px 1fr 20px;
  gap:4px;
  align-items:end;
  text-align:center
}
.afriq-month-column>strong{
  overflow:hidden;
  color:var(--muted);
  font-size:7px;
  white-space:nowrap;
  text-overflow:ellipsis
}
.afriq-month-track{
  width:100%;
  height:100%;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  border-bottom:1px solid var(--line)
}
.afriq-month-bar{
  width:min(70%,28px);
  min-height:3px;
  border-radius:5px 5px 1px 1px;
  background:linear-gradient(180deg,var(--cyan),rgba(76,220,225,.22));
  box-shadow:0 0 15px rgba(76,220,225,.09)
}
.afriq-month-column>span{
  color:var(--muted);
  font-size:8px;
  font-weight:800
}

.afriq-bar-list{
  display:flex;
  flex-direction:column;
  gap:13px
}
.afriq-bar-row{
  display:grid;
  grid-template-columns:minmax(100px,150px) 1fr 100px;
  gap:10px;
  align-items:center
}
.afriq-bar-label{
  overflow:hidden;
  color:var(--text);
  font-size:9px;
  font-weight:750;
  white-space:nowrap;
  text-overflow:ellipsis
}
.afriq-bar-track{
  position:relative;
  min-height:16px;
  border-radius:6px;
  background:rgba(130,150,170,.07)
}
.afriq-bar{
  position:absolute;
  left:0;
  height:6px;
  min-width:2px;
  border-radius:5px
}
.afriq-bar.previous{
  top:2px;
  background:rgba(130,150,170,.45)
}
.afriq-bar.current{
  bottom:2px;
  background:var(--cyan)
}
.afriq-bar-value{
  text-align:right;
  color:var(--text);
  font-size:9px;
  font-weight:850
}
.afriq-bar-value.positive,
.afriq-variance-row span.positive,
.afriq-detail-table td.positive{
  color:#50d39f!important
}
.afriq-bar-value.negative,
.afriq-variance-row span.negative,
.afriq-detail-table td.negative{
  color:#fa7b86!important
}

.afriq-variance-list{
  display:flex;
  flex-direction:column;
  gap:8px
}
.afriq-variance-row{
  min-height:48px;
  display:grid;
  grid-template-columns:24px 1fr 105px;
  gap:9px;
  align-items:center;
  padding:8px 9px;
  border:1px solid rgba(130,150,170,.12);
  border-radius:10px;
  background:rgba(130,150,170,.025)
}
.afriq-variance-row>b{
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:7px;
  background:rgba(76,220,225,.07);
  color:var(--cyan);
  font-size:8px
}
.afriq-variance-name{
  min-width:0
}
.afriq-variance-name strong{
  display:block;
  overflow:hidden;
  color:var(--text);
  font-size:9px;
  white-space:nowrap;
  text-overflow:ellipsis
}
.afriq-variance-name small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:7px
}
.afriq-variance-row>span{
  text-align:right;
  font-size:9px;
  font-weight:900
}

.afriq-detail-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px
}
.afriq-detail-panel{
  overflow:hidden
}
.afriq-detail-heading{
  padding:15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--line)
}
.afriq-detail-heading span{
  display:block;
  color:var(--cyan);
  font-size:8px;
  font-weight:900;
  letter-spacing:.5px
}
.afriq-detail-heading h2{
  margin:5px 0 0;
  color:var(--text);
  font-size:17px
}
.afriq-detail-heading input{
  width:min(320px,45%);
  height:40px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--panel);
  color:var(--text);
  font:inherit
}
.afriq-detail-table{
  min-width:900px
}
.afriq-detail-table th{
  font-size:10px!important
}
.afriq-detail-table td{
  font-size:11px!important
}

@media(max-width:1150px){
  .afriq-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .afriq-dashboard-filters{
    grid-template-columns:1fr 1fr
  }
}
@media(max-width:850px){
  .afriq-dashboard-grid{
    grid-template-columns:1fr
  }
  .afriq-panel-wide{
    grid-column:auto
  }
  .afriq-monthly-chart{
    gap:3px
  }
  .afriq-bar-row{
    grid-template-columns:100px 1fr 80px
  }
}
@media(max-width:620px){
  .afriq-kpis,
  .afriq-dashboard-filters{
    grid-template-columns:1fr
  }
  .afriq-detail-heading{
    align-items:flex-start;
    flex-direction:column
  }
  .afriq-detail-heading input{
    width:100%
  }
}


/* ============================================================
   Sidebar search + persistent menu position
   ============================================================ */
.sidebar-search-box{
  position:sticky;
  top:0;
  z-index:20;
  display:grid;
  grid-template-columns:26px 1fr 28px;
  gap:4px;
  align-items:center;
  margin:0 8px 10px;
  padding:7px 7px 7px 9px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--panel);
  box-shadow:0 7px 20px rgba(0,0,0,.08)
}
.sidebar-search-icon{
  display:grid;
  place-items:center;
  color:var(--muted);
  font-size:17px
}
.sidebar-search-box input{
  width:100%;
  min-width:0;
  height:34px;
  padding:0 4px;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:11px
}
.sidebar-search-box input::placeholder{
  color:var(--muted)
}
.sidebar-search-clear{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-size:17px
}
.sidebar-search-clear:hover{
  background:rgba(125,145,169,.1);
  color:var(--text)
}

/* Keep sidebar scrolling independent from page content */
.sidebar-nav,
.sidebar-menu,
.app-sidebar-nav,
.sidebar-content,
aside nav{
  overscroll-behavior:contain;
  scroll-behavior:auto
}


/* ============================================================
   AvalancheAI secure login
   ============================================================ */
.login-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(360px,42%) 1fr;
  background:
    radial-gradient(circle at 8% 12%,rgba(85,220,226,.13),transparent 30%),
    radial-gradient(circle at 88% 88%,rgba(132,112,255,.09),transparent 28%),
    var(--bg);
  color:var(--text)
}
.login-brand-panel{
  position:relative;
  min-height:100vh;
  overflow:hidden;
  padding:58px 58px 48px;
  display:flex;
  flex-direction:column;
  background:
    linear-gradient(155deg,rgba(7,25,42,.97),rgba(6,16,29,.95));
  border-right:1px solid rgba(110,150,180,.13)
}
[data-theme="light"] .login-brand-panel{
  background:
    linear-gradient(155deg,#0d2942,#0b1e32);
  color:#fff
}
.login-brand-mark{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  border:1px solid rgba(85,220,226,.35);
  border-radius:17px;
  background:rgba(85,220,226,.08);
  color:#58dce2;
  font-size:25px;
  box-shadow:0 15px 40px rgba(0,0,0,.16)
}
.login-brand-copy{
  max-width:530px;
  margin-top:80px
}
.login-brand-copy>span{
  display:block;
  color:#58dce2;
  font-size:11px;
  font-weight:900;
  letter-spacing:2.2px
}
.login-brand-copy h1{
  margin:13px 0 15px;
  color:#fff;
  font-size:54px;
  line-height:1.02;
  letter-spacing:-2.4px
}
.login-brand-copy p{
  max-width:470px;
  margin:0;
  color:rgba(225,238,250,.68);
  font-size:15px;
  line-height:1.75
}
.login-company-card{
  position:relative;
  z-index:2;
  margin-top:auto;
  max-width:470px;
  padding:18px 20px;
  border:1px solid rgba(85,220,226,.17);
  border-radius:15px;
  background:rgba(255,255,255,.035);
  backdrop-filter:blur(10px)
}
.login-company-card span{
  display:block;
  color:rgba(220,235,247,.5);
  font-size:9px;
  font-weight:900;
  letter-spacing:1px
}
.login-company-card strong{
  display:block;
  margin:7px 0 5px;
  color:#fff;
  font-size:19px
}
.login-company-card small{
  color:rgba(220,235,247,.55);
  font-size:10px
}
.login-decoration{
  position:absolute;
  right:-120px;
  bottom:-125px;
  width:390px;
  height:390px;
  border:1px solid rgba(85,220,226,.08);
  border-radius:50%
}
.login-decoration i{
  position:absolute;
  inset:45px;
  border:1px solid rgba(85,220,226,.06);
  border-radius:50%
}
.login-decoration i:nth-child(2){
  inset:90px
}
.login-decoration i:nth-child(3){
  inset:135px;
  background:rgba(85,220,226,.025)
}
.login-form-panel{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:45px
}
.login-form-card{
  width:min(470px,100%);
  padding:34px;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--panel);
  box-shadow:0 30px 80px rgba(0,0,0,.14)
}
.login-form-heading .eyebrow{
  margin-bottom:8px;
  color:var(--cyan);
  font-size:9px;
  font-weight:900;
  letter-spacing:1.2px
}
.login-form-heading h2{
  margin:0;
  color:var(--text);
  font-size:34px;
  letter-spacing:-1px
}
.login-form-heading p{
  margin:9px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.6
}
.login-error{
  margin:22px 0 0;
  padding:12px 14px;
  border:1px solid rgba(250,100,115,.25);
  border-radius:11px;
  background:rgba(250,100,115,.07)
}
.login-error strong,
.login-error span{
  display:block
}
.login-error strong{
  color:#fa7b86;
  font-size:10px
}
.login-error span{
  margin-top:4px;
  color:var(--text);
  font-size:10px;
  line-height:1.45
}
.login-form{
  margin-top:26px;
  display:flex;
  flex-direction:column;
  gap:18px
}
.login-form>label>span{
  display:block;
  margin:0 0 7px;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.55px
}
.login-input-wrap{
  height:50px;
  display:grid;
  grid-template-columns:32px 1fr auto;
  align-items:center;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--bg);
  transition:.16s ease
}
.login-input-wrap:focus-within{
  border-color:rgba(85,220,226,.55);
  box-shadow:0 0 0 3px rgba(85,220,226,.08)
}
.login-input-wrap>b{
  color:var(--muted);
  font-size:13px
}
.login-input-wrap input{
  width:100%;
  min-width:0;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:12px
}
.login-input-wrap input::placeholder{
  color:var(--muted)
}
.login-password-toggle{
  width:34px;
  height:34px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  cursor:pointer
}
.login-password-toggle:hover{
  background:rgba(120,145,170,.08);
  color:var(--text)
}
.login-submit{
  height:51px;
  margin-top:2px;
  border:0;
  border-radius:11px;
  background:linear-gradient(135deg,#55dce2,#45bcc9);
  color:#071827;
  cursor:pointer;
  font:inherit;
  font-size:12px;
  font-weight:900;
  box-shadow:0 13px 30px rgba(69,188,201,.18)
}
.login-submit:hover:not(:disabled){
  transform:translateY(-1px)
}
.login-submit:disabled{
  opacity:.7;
  cursor:wait
}
.login-spinner{
  width:14px;
  height:14px;
  display:inline-block;
  margin-right:7px;
  border:2px solid rgba(7,24,39,.22);
  border-top-color:#071827;
  border-radius:50%;
  vertical-align:-2px;
  animation:login-spin .65s linear infinite
}
.login-spinner.large{
  width:27px;
  height:27px;
  margin:18px 0 0;
  border-color:rgba(85,220,226,.16);
  border-top-color:var(--cyan)
}
@keyframes login-spin{
  to{transform:rotate(360deg)}
}
.login-source-status{
  margin-top:23px;
  padding-top:18px;
  display:grid;
  grid-template-columns:9px 1fr;
  gap:10px;
  align-items:start;
  border-top:1px solid var(--line)
}
.login-source-status>span{
  width:8px;
  height:8px;
  margin-top:4px;
  border-radius:50%;
  background:#8e9cad
}
.login-source-status>span.online{
  background:#50d39f;
  box-shadow:0 0 12px rgba(80,211,159,.35)
}
.login-source-status strong{
  display:block;
  color:var(--text);
  font-size:9px
}
.login-source-status small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:8px;
  line-height:1.5
}
.login-footer{
  position:absolute;
  right:32px;
  bottom:22px;
  color:var(--muted);
  font-size:8px;
  letter-spacing:.25px
}
.auth-loading-shell{
  grid-template-columns:1fr
}
.login-loading-card{
  text-align:center
}
.login-loading-card .login-brand-mark{
  margin:0 auto 17px
}
.login-loading-card h2{
  margin:0;
  color:var(--text);
  font-size:25px
}
.login-loading-card p{
  color:var(--muted);
  font-size:10px
}

/* Authenticated topbar user */
.authenticated-user-menu{
  min-width:175px;
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr) 32px;
  align-items:center;
  gap:8px
}
.authenticated-user-copy{
  min-width:0
}
.authenticated-user-copy strong,
.authenticated-user-copy small{
  display:block;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis
}
.logout-button{
  width:31px;
  height:31px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  cursor:pointer
}
.logout-button:hover{
  border-color:rgba(250,123,134,.35);
  background:rgba(250,123,134,.07);
  color:#fa7b86
}

@media(max-width:900px){
  .login-shell{
    grid-template-columns:1fr
  }
  .login-brand-panel{
    min-height:auto;
    padding:30px
  }
  .login-brand-copy{
    margin-top:35px
  }
  .login-brand-copy h1{
    font-size:40px
  }
  .login-company-card{
    margin-top:40px
  }
  .login-form-panel{
    min-height:auto;
    padding:32px 20px 60px
  }
  .login-footer{
    position:static;
    margin-top:20px;
    text-align:center
  }
}


/* ============================================================
   Global combobox / select popup visibility
   ============================================================ */

/*
   Chrome/Edge on Windows may otherwise render the opened native
   select list using a light system popup while the option text
   inherits a light application color. Force the browser control
   palette to match the active theme.
*/
:root[data-theme="dark"]{
  color-scheme:dark
}

:root[data-theme="dark"] select{
  color-scheme:dark!important;
  background-color:#081725!important;
  color:#edf6ff!important;
  border-color:rgba(151,178,210,.18)!important
}

:root[data-theme="dark"] select option,
:root[data-theme="dark"] select optgroup{
  background-color:#081725!important;
  color:#edf6ff!important
}

:root[data-theme="dark"] select option:checked{
  background:#15364d!important;
  color:#ffffff!important
}

:root[data-theme="dark"] select:disabled{
  background-color:#0b1825!important;
  color:#708399!important
}

:root[data-theme="light"]{
  color-scheme:light
}

:root[data-theme="light"] select{
  color-scheme:light!important;
  background-color:#ffffff!important;
  color:#173047!important
}

:root[data-theme="light"] select option,
:root[data-theme="light"] select optgroup{
  background-color:#ffffff!important;
  color:#173047!important
}

:root[data-theme="light"] select option:checked{
  background:#dff4f5!important;
  color:#0e4650!important
}

/* ============================================================
   New Sales Invoice - live client picker
   ============================================================ */
.stock-client-picker-field{
  grid-column:auto
}

.stock-client-picker-control{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:7px
}

.stock-client-picker-control input{
  min-width:0
}

.stock-client-picker-button{
  min-width:112px;
  padding:0 13px;
  border:1px solid rgba(98,228,231,.24);
  border-radius:10px;
  background:rgba(98,228,231,.075);
  color:var(--cyan);
  font-size:10px;
  font-weight:800
}

.stock-client-picker-button:hover{
  border-color:rgba(98,228,231,.48);
  background:rgba(98,228,231,.12)
}

.sales-client-overlay{
  position:fixed;
  inset:0;
  z-index:250;
  display:grid;
  place-items:center;
  padding:22px;
  background:rgba(2,8,15,.78);
  backdrop-filter:blur(9px)
}

.sales-client-modal{
  width:min(1120px,96vw);
  max-height:min(790px,92vh);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(151,178,210,.18);
  border-radius:20px;
  background:#091827;
  color:#edf6ff;
  box-shadow:0 35px 110px rgba(0,0,0,.48)
}

.sales-client-modal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:21px 23px 17px;
  border-bottom:1px solid rgba(151,178,210,.12);
  background:linear-gradient(
    180deg,
    rgba(18,40,62,.96),
    rgba(9,24,39,.96)
  )
}

.sales-client-modal-header h2{
  margin:5px 0 0;
  color:#edf6ff;
  font-size:22px
}

.sales-client-modal-header p{
  margin:5px 0 0;
  color:#71859c;
  font-size:9px
}

.sales-client-close{
  width:36px;
  height:36px;
  border:1px solid rgba(151,178,210,.13);
  border-radius:10px;
  background:#0c2134;
  color:#91a3b8;
  font-size:23px
}

.sales-client-close:hover{
  color:#ffffff;
  border-color:rgba(255,127,145,.35);
  background:rgba(255,127,145,.08)
}

.sales-client-search-row{
  display:grid;
  grid-template-columns:minmax(260px,1fr) auto auto;
  gap:9px;
  padding:14px 18px;
  border-bottom:1px solid rgba(151,178,210,.1);
  background:#081521
}

.sales-client-search{
  height:43px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 12px;
  border:1px solid rgba(151,178,210,.17);
  border-radius:10px;
  background:#06121e;
  color:#687c94
}

.sales-client-search:focus-within{
  border-color:rgba(98,228,231,.43);
  box-shadow:0 0 0 3px rgba(98,228,231,.055)
}

.sales-client-search input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:#edf6ff;
  font:inherit;
  font-size:11px
}

.sales-client-search input::placeholder{
  color:#60748b
}

.sales-client-error{
  margin:12px 18px 0;
  padding:10px 12px;
  border:1px solid rgba(255,127,145,.22);
  border-radius:9px;
  background:rgba(255,127,145,.06);
  color:#ff9cab;
  font-size:10px
}

.sales-client-table-wrap{
  min-height:220px;
  overflow:auto;
  background:#091827
}

.sales-client-table{
  width:100%;
  min-width:850px;
  border-collapse:collapse
}

.sales-client-table thead{
  position:sticky;
  top:0;
  z-index:2
}

.sales-client-table th{
  height:40px;
  padding:0 13px;
  border-bottom:1px solid rgba(151,178,210,.14);
  background:#0d2236;
  color:#6f839a;
  text-align:left;
  font-size:9px;
  font-weight:900;
  letter-spacing:.4px
}

.sales-client-table td{
  min-height:43px;
  padding:11px 13px;
  border-bottom:1px solid rgba(151,178,210,.07);
  background:#091827;
  color:#aab8c8;
  font-size:10px
}

.sales-client-table tbody tr:hover td{
  background:#0d2133;
  color:#e9f4ff
}

.sales-client-table td.strong{
  color:#edf6ff;
  font-weight:800
}

.sales-client-select-cell{
  width:88px;
  text-align:right
}

.sales-client-select-button{
  height:31px;
  padding:0 12px;
  border:1px solid rgba(98,228,231,.25);
  border-radius:8px;
  background:rgba(98,228,231,.08);
  color:#75eaed;
  font-size:9px;
  font-weight:900
}

.sales-client-select-button:hover{
  background:rgba(98,228,231,.15);
  color:#ffffff
}

.sales-client-empty{
  height:150px!important;
  text-align:center;
  color:#70849a!important
}

.sales-client-modal-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:13px 18px;
  border-top:1px solid rgba(151,178,210,.12);
  background:#081521;
  color:#71859b;
  font-size:9px
}

.sales-client-modal-footer>div{
  display:flex;
  align-items:center;
  gap:9px
}

.sales-client-modal-footer strong{
  color:#99aabd;
  font-size:9px
}

/* Light theme equivalent for the custom client picker. */
:root[data-theme="light"] .sales-client-overlay{
  background:rgba(26,45,63,.42)
}

:root[data-theme="light"] .sales-client-modal,
:root[data-theme="light"] .sales-client-table-wrap{
  background:#ffffff;
  color:#173047
}

:root[data-theme="light"] .sales-client-modal-header{
  background:#f6fafc;
  border-bottom-color:rgba(51,75,102,.12)
}

:root[data-theme="light"] .sales-client-modal-header h2{
  color:#173047
}

:root[data-theme="light"] .sales-client-close,
:root[data-theme="light"] .sales-client-search-row,
:root[data-theme="light"] .sales-client-modal-footer{
  background:#f7fafc
}

:root[data-theme="light"] .sales-client-search{
  background:#ffffff;
  border-color:rgba(51,75,102,.16)
}

:root[data-theme="light"] .sales-client-search input{
  color:#173047
}

:root[data-theme="light"] .sales-client-table th{
  background:#edf4f8;
  color:#667e93;
  border-bottom-color:rgba(51,75,102,.13)
}

:root[data-theme="light"] .sales-client-table td{
  background:#ffffff;
  color:#526b80;
  border-bottom-color:rgba(51,75,102,.09)
}

:root[data-theme="light"] .sales-client-table td.strong{
  color:#173047
}

:root[data-theme="light"] .sales-client-table tbody tr:hover td{
  background:#f2f8fa;
  color:#173047
}

@media(max-width:720px){
  .stock-client-picker-control{
    grid-template-columns:1fr
  }

  .stock-client-picker-button{
    height:40px
  }

  .sales-client-overlay{
    padding:8px
  }

  .sales-client-modal{
    width:100%;
    max-height:96vh;
    border-radius:14px
  }

  .sales-client-search-row{
    grid-template-columns:1fr 1fr
  }

  .sales-client-search{
    grid-column:1/-1
  }

  .sales-client-modal-footer{
    align-items:flex-start;
    flex-direction:column
  }
}


/* ============================================================
   Sales Invoice Client Popup - live autocomplete
   ============================================================ */
.sales-client-search-hint{
  padding:8px 18px 10px;
  border-bottom:1px solid rgba(151,178,210,.08);
  background:#081521;
  color:#667b92;
  font-size:8px
}

.sales-client-search-hint strong{
  color:#8fa5bb;
  font-weight:800
}

.sales-client-match{
  padding:1px 2px;
  border-radius:3px;
  background:rgba(98,228,231,.22);
  color:#eaffff;
  font-weight:900
}

:root[data-theme="light"] .sales-client-search-hint{
  background:#f7fafc;
  color:#687f93;
  border-bottom-color:rgba(51,75,102,.08)
}

:root[data-theme="light"] .sales-client-search-hint strong{
  color:#3b5a70
}

:root[data-theme="light"] .sales-client-match{
  background:#d8f3f4;
  color:#0e4b52
}


/* ============================================================
   M4D2024 Accounting Dimensions
   Cost Center / Sub Cost Center / Phase / Job Type /
   Sub Job Type / Cash Type
   ============================================================ */
.accounting-dimension-migration-strip{
  min-height:72px;
  margin-bottom:14px;
  padding:13px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px
}

.accounting-dimension-migration-strip>div{
  min-width:0
}

.accounting-dimension-migration-strip strong{
  display:block;
  margin-top:4px;
  color:var(--text);
  font-size:13px
}

.accounting-dimension-migration-strip small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
  line-height:1.45
}

.accounting-dimension-source{
  display:inline-flex;
  align-items:center;
  min-height:33px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:9px;
  color:var(--muted);
  font-size:9px;
  font-weight:800
}

.accounting-dimension-table{
  min-width:760px
}

.accounting-dimension-table th{
  white-space:nowrap
}

.accounting-dimension-table td{
  max-width:330px;
  white-space:normal;
  word-break:break-word
}

:root[data-theme="light"] .accounting-dimension-migration-strip{
  background:#ffffff
}

:root[data-theme="light"] .accounting-dimension-source{
  background:#f5f8fa;
  color:#334754
}

@media(max-width:760px){
  .accounting-dimension-migration-strip{
    align-items:stretch;
    flex-direction:column
  }

  .accounting-dimension-migration-strip button{
    width:100%
  }
}


/* ============================================================
   M4D2024 Accounting Dimensions CRUD
   ============================================================ */
.accounting-dimension-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:6500;
  display:grid;
  place-items:center;
  padding:22px;
  background:rgba(2,9,16,.72);
  backdrop-filter:blur(7px)
}

.accounting-dimension-modal{
  width:min(760px,96vw);
  max-height:90vh;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--panel);
  color:var(--text);
  box-shadow:0 30px 95px rgba(0,0,0,.42)
}

.accounting-dimension-modal-header{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:18px 20px;
  border-bottom:1px solid var(--line);
  background:var(--panel)
}

.accounting-dimension-modal-header h2{
  margin:5px 0 3px;
  color:var(--text);
  font-size:21px
}

.accounting-dimension-modal-header p{
  margin:0;
  color:var(--muted);
  font-size:10px
}

.accounting-dimension-modal-close{
  width:36px;
  height:36px;
  border:1px solid var(--line);
  border-radius:10px;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-size:22px
}

.accounting-dimension-form{
  padding:20px
}

.accounting-dimension-form-grid{
  display:grid;
  grid-template-columns:
    repeat(2,minmax(0,1fr));
  gap:15px
}

.accounting-dimension-field>span{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  letter-spacing:.35px
}

.accounting-dimension-field>span b{
  color:#ff6b7c
}

.accounting-dimension-field input,
.accounting-dimension-field select{
  width:100%;
  height:43px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:9px;
  outline:0;
  background:var(--bg);
  color:var(--text);
  font:inherit;
  font-size:12px
}

.accounting-dimension-field input:focus,
.accounting-dimension-field select:focus{
  border-color:rgba(98,228,231,.45);
  box-shadow:0 0 0 3px rgba(98,228,231,.07)
}

.accounting-dimension-field small{
  display:block;
  margin-top:4px;
  color:var(--muted-2);
  font-size:8px
}

.accounting-dimension-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:20px;
  padding-top:15px;
  border-top:1px solid var(--line)
}

.accounting-dimension-delete-modal{
  width:min(470px,94vw);
  padding:24px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--panel);
  color:var(--text);
  box-shadow:0 30px 95px rgba(0,0,0,.42);
  text-align:center
}

.accounting-dimension-delete-modal h2{
  margin:12px 0 6px;
  color:var(--text);
  font-size:20px
}

.accounting-dimension-delete-modal>p{
  margin:0 0 16px;
  color:var(--muted);
  font-size:11px
}

.accounting-dimension-delete-summary{
  margin:14px 0 18px;
  padding:11px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--bg-soft);
  text-align:left
}

.accounting-dimension-delete-summary span{
  display:block;
  padding:4px 0;
  color:var(--text);
  font-size:10px
}

.accounting-dimension-delete-summary b{
  display:inline-block;
  min-width:125px;
  color:var(--muted);
  font-size:9px
}

:root[data-theme="light"] .accounting-dimension-modal-backdrop{
  background:rgba(25,45,62,.38)
}

:root[data-theme="light"] .accounting-dimension-modal,
:root[data-theme="light"] .accounting-dimension-modal-header,
:root[data-theme="light"] .accounting-dimension-delete-modal{
  background:#ffffff
}

:root[data-theme="light"] .accounting-dimension-field input,
:root[data-theme="light"] .accounting-dimension-field select{
  background:#ffffff;
  color:#08131d
}

:root[data-theme="light"] .accounting-dimension-delete-summary{
  background:#f5f8fa
}

@media(max-width:680px){
  .accounting-dimension-modal-backdrop{
    padding:10px
  }

  .accounting-dimension-form-grid{
    grid-template-columns:1fr
  }

  .accounting-dimension-modal-actions{
    flex-direction:column-reverse
  }

  .accounting-dimension-modal-actions button{
    width:100%
  }
}


/* ============================================================
   M4D2024 Company / Cost Center relationship
   ============================================================ */
.accounting-dimension-field select{
  cursor:pointer
}

.accounting-dimension-field select option{
  font:inherit
}

:root[data-theme="light"] .accounting-dimension-field select{
  background:#ffffff!important;
  color:#08131d!important
}

:root[data-theme="dark"] .accounting-dimension-field select{
  background:#081725!important;
  color:#edf6ff!important
}


/* ============================================================
   Accounting list cleanup + light-mode action colors
   ============================================================ */

/* Remove green code pills / bold styling from list displays globally. */
.coa-list-panel .coa-code,
.accounting-dimension-table .coa-code,
.stock-list-panel .coa-code{
  display:inline!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:inherit!important;
  box-shadow:none!important;
  font:inherit!important;
  font-weight:400!important;
  letter-spacing:normal!important
}

/* Regular-weight list text. */
.coa-table tbody td,
.accounting-dimension-table tbody td,
.stock-table tbody td,
.table-row{
  font-weight:400!important
}

.coa-table tbody td strong,
.accounting-dimension-table tbody td strong,
.stock-table tbody td strong,
.table-row strong{
  font-weight:400!important
}

/* Light mode only: Edit = green, Delete = red. */
:root[data-theme="light"] .coa-icon-button:not(.delete),
:root[data-theme="light"] [data-accounting-dimension-edit],
:root[data-theme="light"] [data-master-edit],
:root[data-theme="light"] [data-coa-edit]{
  color:#138a5b!important;
  border-color:rgba(19,138,91,.28)!important;
  background:rgba(19,138,91,.06)!important
}

:root[data-theme="light"] .coa-icon-button:not(.delete):hover,
:root[data-theme="light"] [data-accounting-dimension-edit]:hover,
:root[data-theme="light"] [data-master-edit]:hover,
:root[data-theme="light"] [data-coa-edit]:hover{
  color:#087247!important;
  border-color:rgba(19,138,91,.42)!important;
  background:rgba(19,138,91,.11)!important
}

:root[data-theme="light"] .coa-icon-button.delete,
:root[data-theme="light"] [data-accounting-dimension-delete],
:root[data-theme="light"] [data-master-delete],
:root[data-theme="light"] [data-coa-delete]{
  color:#c92a3a!important;
  border-color:rgba(201,42,58,.28)!important;
  background:rgba(201,42,58,.06)!important
}

:root[data-theme="light"] .coa-icon-button.delete:hover,
:root[data-theme="light"] [data-accounting-dimension-delete]:hover,
:root[data-theme="light"] [data-master-delete]:hover,
:root[data-theme="light"] [data-coa-delete]:hover{
  color:#a71928!important;
  border-color:rgba(201,42,58,.42)!important;
  background:rgba(201,42,58,.11)!important
}

/*
  Dark mode intentionally uses the original/default icon colors.
  No dark-mode override is applied here.
*/

/* ============================================================
   Global searchable / autocomplete combobox
   Every normal single-select control becomes type-to-filter.
   ============================================================ */
.searchable-combo{
  position:relative;
  display:inline-block;
  width:100%;
  min-width:100px;
  vertical-align:middle
}

.searchable-combo-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  margin:0!important;
  padding:0!important;
  opacity:0!important;
  pointer-events:none!important;
  overflow:hidden!important
}

.searchable-combo-input{
  width:100%;
  min-width:0;
  height:100%;
  min-height:38px;
  padding:8px 32px 8px 10px;
  border:1px solid var(--line);
  border-radius:9px;
  outline:0;
  background:#081725;
  color:#edf6ff;
  font:inherit;
  font-size:inherit;
  cursor:text
}

.searchable-combo-input:focus{
  border-color:rgba(98,228,231,.42);
  box-shadow:0 0 0 3px rgba(98,228,231,.07)
}

.searchable-combo-arrow{
  position:absolute;
  top:50%;
  right:10px;
  z-index:2;
  transform:translateY(-52%);
  color:var(--muted);
  font-size:13px;
  cursor:pointer;
  pointer-events:auto
}

.searchable-combo-options{
  position:absolute;
  top:calc(100% + 5px);
  left:0;
  right:0;
  z-index:7500;
  display:none;
  max-height:260px;
  overflow:auto;
  padding:5px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#081725;
  box-shadow:0 18px 50px rgba(0,0,0,.32)
}

.searchable-combo.open
.searchable-combo-options{
  display:block
}

.searchable-combo-option{
  width:100%;
  min-height:34px;
  display:block;
  padding:7px 9px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#dce9f6;
  font:inherit;
  font-size:11px;
  font-weight:400;
  text-align:left;
  cursor:pointer
}

.searchable-combo-option:hover,
.searchable-combo-option.active{
  background:rgba(98,228,231,.10);
  color:#ffffff
}

.searchable-combo-option.disabled{
  opacity:.45;
  cursor:not-allowed
}

.searchable-combo-empty{
  padding:10px 9px;
  color:var(--muted);
  font-size:10px;
  text-align:center
}

.searchable-combo.disabled{
  opacity:.55
}

.searchable-combo.disabled
.searchable-combo-input{
  cursor:not-allowed
}

/* Compact combos used in pagination/toolbars. */
.coa-page-controls .searchable-combo,
.stock-pagination .searchable-combo,
.surface-header .searchable-combo{
  width:auto;
  min-width:110px
}

.coa-page-controls .searchable-combo-input,
.stock-pagination .searchable-combo-input{
  min-height:34px
}

/* Form combos remain full width. */
.accounting-dimension-field .searchable-combo,
.coa-field .searchable-combo,
.stock-form-field .searchable-combo{
  width:100%
}

/* Light mode */
:root[data-theme="light"]
.searchable-combo-input{
  background:#ffffff;
  color:#08131d;
  border-color:rgba(34,55,75,.18)
}

:root[data-theme="light"]
.searchable-combo-options{
  background:#ffffff;
  border-color:rgba(34,55,75,.16);
  box-shadow:0 16px 38px rgba(31,53,73,.16)
}

:root[data-theme="light"]
.searchable-combo-option{
  color:#172631
}

:root[data-theme="light"]
.searchable-combo-option:hover,
:root[data-theme="light"]
.searchable-combo-option.active{
  background:#eef8f9;
  color:#07121c
}

:root[data-theme="light"]
.searchable-combo-empty{
  color:#455866
}


/* ============================================================
   M4D2024 Accounting Voucher Entry
   accounting_transaction_header + accounting_transaction_detail
   ============================================================ */
.voucher-entry-shell{
  min-height:calc(100vh - 130px);
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  gap:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel)
}

.voucher-entry-history{
  min-width:0;
  border-right:1px solid var(--line);
  background:var(--bg-soft)
}

.voucher-entry-history-header{
  padding:14px;
  border-bottom:1px solid var(--line)
}

.voucher-entry-history-header strong{
  display:block;
  color:var(--text);
  font-size:13px
}

.voucher-entry-history-header small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:9px
}

.voucher-entry-history-list{
  height:calc(100vh - 220px);
  overflow:auto
}

.voucher-entry-history-row{
  width:100%;
  display:grid;
  grid-template-columns:42px 1fr;
  gap:2px 8px;
  padding:9px 11px;
  border:0;
  border-bottom:1px solid var(--line);
  background:transparent;
  color:var(--text);
  text-align:left
}

.voucher-entry-history-row span{
  grid-row:1 / span 2;
  align-self:center;
  color:var(--muted);
  font-size:10px
}

.voucher-entry-history-row b{
  font-size:11px;
  font-weight:600
}

.voucher-entry-history-row small{
  color:var(--muted);
  font-size:8px
}

.voucher-entry-history-row:hover,
.voucher-entry-history-row.active{
  background:rgba(98,228,231,.08)
}

.voucher-entry-main{
  min-width:0;
  display:flex;
  flex-direction:column
}

.voucher-entry-topbar{
  display:flex;
  align-items:end;
  gap:22px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:var(--panel)
}

.voucher-entry-title{
  min-width:170px
}

.voucher-entry-title h1{
  margin:4px 0 0;
  font-size:20px
}

.voucher-entry-header-fields{
  flex:1;
  display:grid;
  grid-template-columns:150px 150px 150px minmax(220px,1fr);
  gap:10px
}

.voucher-entry-header-fields label>span{
  display:block;
  margin-bottom:4px;
  color:var(--muted);
  font-size:9px;
  font-weight:800
}

.voucher-entry-header-fields input,
.voucher-entry-header-fields select{
  width:100%;
  height:36px;
  padding:0 9px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--bg);
  color:var(--text);
  outline:0
}

.voucher-entry-error{
  margin:10px 12px 0
}

.voucher-entry-grid-wrap{
  flex:1;
  min-height:360px;
  overflow:auto;
  background:var(--panel)
}

.voucher-entry-grid{
  width:100%;
  min-width:1900px;
  border-collapse:collapse;
  font-size:10px
}

.voucher-entry-grid th{
  position:sticky;
  top:0;
  z-index:2;
  height:34px;
  padding:0 7px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:var(--bg-soft);
  color:var(--muted);
  font-size:9px;
  text-align:left;
  white-space:nowrap
}

.voucher-entry-grid td{
  height:38px;
  padding:2px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  vertical-align:middle
}

.voucher-entry-grid input,
.voucher-entry-grid select{
  width:100%;
  min-width:90px;
  height:32px;
  padding:0 6px;
  border:1px solid transparent;
  border-radius:5px;
  outline:0;
  background:transparent;
  color:var(--text);
  font-size:10px
}

.voucher-entry-grid input:focus,
.voucher-entry-grid select:focus{
  border-color:rgba(98,228,231,.35);
  background:var(--bg)
}

.voucher-entry-grid td:nth-child(1){
  min-width:180px
}

.voucher-entry-grid td:nth-child(2){
  min-width:180px
}

.voucher-entry-grid td:nth-child(3){
  min-width:220px
}

.voucher-entry-grid td:nth-child(10),
.voucher-entry-grid td:nth-child(11){
  min-width:150px
}

.voucher-readonly{
  color:var(--muted)!important
}

.voucher-line-delete{
  width:30px;
  height:30px;
  border:1px solid rgba(255,127,145,.25);
  border-radius:6px;
  background:rgba(255,127,145,.06);
  color:var(--danger);
  font-size:17px
}

.voucher-entry-balance-box{
  margin:10px 14px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--bg-soft)
}

.voucher-balance-row{
  display:grid;
  grid-template-columns:100px 150px 100px 150px 100px 150px;
  justify-content:center;
  align-items:center;
  gap:6px;
  margin:3px 0
}

.voucher-balance-row span{
  color:var(--text);
  font-size:10px;
  font-weight:700
}

.voucher-balance-row strong{
  min-height:29px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding:0 7px;
  border:1px solid rgba(255,196,119,.25);
  border-radius:5px;
  background:rgba(255,244,135,.12);
  color:var(--text);
  font-size:12px
}

.voucher-entry-actions{
  display:flex;
  justify-content:center;
  gap:18px;
  padding:14px;
  border-top:1px solid var(--line);
  background:var(--bg-soft)
}

.voucher-action-button{
  min-width:92px;
  min-height:58px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--panel);
  color:var(--text);
  font-size:9px
}

.voucher-action-button span{
  font-size:22px;
  color:#5d92c8
}

.voucher-action-button.save span{
  color:var(--green)
}

.voucher-action-button.delete span{
  color:var(--danger)
}

.voucher-action-button.close span{
  color:var(--danger)
}

@media(max-width:1200px){
  .voucher-entry-shell{
    grid-template-columns:1fr
  }

  .voucher-entry-history{
    display:none
  }

  .voucher-entry-header-fields{
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}

@media(max-width:720px){
  .voucher-entry-topbar{
    align-items:stretch;
    flex-direction:column
  }

  .voucher-entry-header-fields{
    width:100%;
    grid-template-columns:1fr
  }

  .voucher-balance-row{
    grid-template-columns:1fr 1fr
  }

  .voucher-entry-actions{
    overflow:auto;
    justify-content:flex-start
  }
}

:root[data-theme="light"] .voucher-entry-shell,
:root[data-theme="light"] .voucher-entry-main,
:root[data-theme="light"] .voucher-entry-topbar,
:root[data-theme="light"] .voucher-entry-grid-wrap{
  background:#ffffff
}

:root[data-theme="light"] .voucher-entry-history,
:root[data-theme="light"] .voucher-entry-actions,
:root[data-theme="light"] .voucher-entry-balance-box,
:root[data-theme="light"] .voucher-entry-grid th{
  background:#eef5fb
}

:root[data-theme="light"] .voucher-entry-grid input,
:root[data-theme="light"] .voucher-entry-grid select,
:root[data-theme="light"] .voucher-entry-header-fields input,
:root[data-theme="light"] .voucher-entry-header-fields select{
  color:#08131d
}


/* ============================================================
   Voucher full workflow additions
   ============================================================ */
.voucher-lookup-source-strip{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  padding:7px 10px;
  border-bottom:1px solid var(--line);
  background:var(--bg-soft)
}

.voucher-lookup-source-strip span{
  padding:4px 7px;
  border:1px solid var(--line);
  border-radius:99px;
  color:var(--muted);
  font-size:8px;
  font-weight:400
}

.voucher-open-entry-button{
  min-width:62px
}

:root[data-theme="light"]
.voucher-open-entry-button{
  color:#087a52!important;
  border-color:rgba(8,122,82,.25)!important;
  background:rgba(8,122,82,.06)!important
}

:root[data-theme="light"]
.voucher-lookup-source-strip{
  background:#f3f7fa
}


/* ============================================================
   Voucher left-header navigation + reliable detail combos
   ============================================================ */
.voucher-entry-main{
  position:relative
}

.voucher-entry-loading-overlay{
  position:absolute;
  inset:0;
  z-index:9000;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:10px;
  background:rgba(5,15,24,.72);
  backdrop-filter:blur(3px);
  color:var(--text)
}

.voucher-history-loading,
.voucher-history-error{
  padding:14px;
  color:var(--muted);
  font-size:10px;
  line-height:1.45
}

.voucher-history-error{
  color:var(--danger)
}

.voucher-entry-history-row{
  cursor:pointer
}

.voucher-entry-history-row.active{
  border-left:3px solid #4ec7c9;
  background:rgba(78,199,201,.12)
}

.voucher-entry-history-row:hover{
  background:rgba(78,199,201,.08)
}

/* Detail autocomplete menus must be easy to click inside the grid. */
.voucher-entry-grid .searchable-combo{
  min-width:120px
}

.voucher-entry-grid .searchable-combo-input{
  min-height:32px;
  height:32px;
  padding-top:0;
  padding-bottom:0
}

.voucher-entry-grid .searchable-combo-options{
  min-width:220px;
  max-height:260px;
  z-index:12000
}

.voucher-entry-grid td:nth-child(1)
.searchable-combo-options{
  min-width:330px
}

:root[data-theme="light"]
.voucher-entry-loading-overlay{
  background:rgba(240,246,250,.84)
}


/* ============================================================
   LOGIN - restore large full-screen split layout
   ============================================================ */
.auth-shell{
  min-height:100vh!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(420px,1.15fr) minmax(430px,.85fr)!important;
  align-items:stretch!important;
  justify-content:stretch!important;
  padding:0!important;
  margin:0!important
}

.auth-shell .auth-hero,
.auth-shell .login-hero,
.auth-shell .auth-brand-panel{
  min-height:100vh!important
}

.auth-shell .auth-panel,
.auth-shell .login-panel{
  min-height:100vh!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:48px!important
}

.auth-card,
.login-card{
  width:min(520px,100%)!important;
  max-width:520px!important;
  padding:34px!important;
  border-radius:18px!important
}

.auth-card h1,
.login-card h1{
  font-size:34px!important;
  line-height:1.15!important
}

.auth-card input,
.login-card input{
  min-height:48px!important;
  font-size:14px!important
}

.auth-card button,
.login-card button{
  min-height:48px!important;
  font-size:14px!important
}

@media(max-width:900px){
  .auth-shell{
    grid-template-columns:1fr!important
  }

  .auth-shell .auth-hero,
  .auth-shell .login-hero,
  .auth-shell .auth-brand-panel{
    display:none!important
  }

  .auth-shell .auth-panel,
  .auth-shell .login-panel{
    min-height:100vh!important;
    padding:26px!important
  }
}


/* ============================================================
   Sub Cost Centers grouped by Cost Center
   ============================================================ */
.subcost-group-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 18px;
  border-bottom:1px solid var(--line)
}

.subcost-group-toolbar>div:first-child{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:10px
}

.subcost-group-toolbar strong{
  color:var(--text);
  font-size:11px;
  font-weight:600
}

.subcost-group-toolbar-actions{
  display:flex;
  gap:8px
}

.subcost-group-list{
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px
}

.subcost-group{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.012)
}

.subcost-group-header{
  width:100%;
  min-height:52px;
  display:grid;
  grid-template-columns:26px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer
}

.subcost-group-header:hover{
  background:rgba(98,228,231,.045)
}

.subcost-group.expanded .subcost-group-header{
  background:rgba(98,228,231,.065);
  border-bottom:1px solid var(--line)
}

.subcost-group-chevron{
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:7px;
  color:var(--cyan);
  font-size:15px
}

.subcost-group-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  font-weight:600
}

.subcost-group-count{
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:99px;
  color:var(--muted);
  font-size:9px;
  white-space:nowrap
}

.subcost-group-body{
  padding:0 8px 8px
}

.subcost-group-table{
  margin-top:8px
}

.subcost-group-table thead th{
  font-size:9px;
  font-weight:600
}

.subcost-group-table tbody td{
  font-weight:400!important
}

.subcost-group-loading{
  min-height:180px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:var(--muted)
}

:root[data-theme="light"] .subcost-group{
  background:#ffffff
}

:root[data-theme="light"] .subcost-group-header:hover{
  background:#f2f9f9
}

:root[data-theme="light"] .subcost-group.expanded .subcost-group-header{
  background:#eef8f8
}

@media(max-width:720px){
  .subcost-group-toolbar{
    align-items:flex-start;
    flex-direction:column
  }

  .subcost-group-header{
    grid-template-columns:26px minmax(0,1fr)
  }

  .subcost-group-count{
    grid-column:2;
    justify-self:start
  }
}


/* ============================================================
   Voucher left-side accounting header filters
   ============================================================ */
.voucher-entry-history-filters{
  padding:10px;
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.012)
}

.voucher-entry-history-filters label{
  display:block
}

.voucher-entry-history-filters label>span{
  display:block;
  margin-bottom:4px;
  color:var(--muted);
  font-size:8px;
  font-weight:700
}

.voucher-entry-history-filters input,
.voucher-entry-history-filters select{
  width:100%;
  min-height:32px;
  padding:5px 7px;
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--bg);
  color:var(--text);
  font:inherit;
  font-size:10px;
  outline:0
}

.voucher-entry-history-filter-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px
}

.voucher-entry-history-filter-actions .coa-button{
  width:100%;
  min-height:30px;
  padding:4px 7px;
  font-size:9px
}

.voucher-history-row-meta{
  display:flex!important;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  color:var(--muted)
}

.voucher-history-row-date{
  color:var(--text);
  font-size:9px;
  font-weight:600
}

.voucher-history-row-company{
  color:var(--muted);
  font-size:8px
}

:root[data-theme="light"]
.voucher-entry-history-filters{
  background:#f5f8fa
}

:root[data-theme="light"]
.voucher-entry-history-filters input,
:root[data-theme="light"]
.voucher-entry-history-filters select{
  background:#ffffff;
  color:#08131d
}


/* ============================================================
   Restore always-visible New Voucher actions
   ============================================================ */
.voucher-inline-new-button{
  margin-top:10px;
  min-height:32px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(98,228,231,.08);
  color:var(--text);
  font:inherit;
  font-size:10px;
  cursor:pointer
}

.voucher-inline-new-button:hover{
  background:rgba(98,228,231,.14)
}

.voucher-history-new-button{
  width:100%;
  min-height:34px;
  margin-top:2px;
  padding:6px 8px;
  border:1px solid rgba(98,228,231,.25);
  border-radius:8px;
  background:rgba(98,228,231,.08);
  color:var(--text);
  font:inherit;
  font-size:10px;
  font-weight:600;
  cursor:pointer
}

:root[data-theme="light"] .voucher-inline-new-button,
:root[data-theme="light"] .voucher-history-new-button{
  background:rgba(8,122,82,.06);
  border-color:rgba(8,122,82,.24);
  color:#087a52
}


/* ============================================================
   Voucher left history: direct column filters
   TYPE | DATE | NUMBER
   ============================================================ */
.voucher-entry-history-grid-head{
  padding:8px 8px 9px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.012)
}

.voucher-history-column-titles,
.voucher-history-column-filters{
  display:grid;
  grid-template-columns:56px minmax(92px,1fr) 78px;
  gap:5px;
  align-items:center
}

.voucher-history-column-titles{
  margin-bottom:5px;
  padding:0 2px
}

.voucher-history-column-titles span{
  color:var(--muted);
  font-size:7px;
  font-weight:800;
  letter-spacing:.05em
}

.voucher-history-column-filters select,
.voucher-history-column-filters input{
  width:100%;
  min-width:0;
  height:29px;
  padding:3px 5px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--bg);
  color:var(--text);
  font:inherit;
  font-size:9px;
  outline:0
}

.voucher-history-grid-actions{
  display:grid;
  grid-template-columns:1fr auto;
  gap:5px;
  margin-top:7px
}

.voucher-history-clear-button{
  min-height:31px;
  padding:4px 8px;
  border:1px solid var(--line);
  border-radius:7px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:8px;
  cursor:pointer
}

.voucher-entry-history-row{
  grid-template-columns:56px minmax(92px,1fr) 78px!important;
  gap:4px 5px!important;
  align-items:center!important;
  padding:8px!important
}

.voucher-history-cell{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px
}

.voucher-history-type-cell{
  color:var(--muted)
}

.voucher-history-date-cell{
  color:var(--text)
}

.voucher-history-number-cell{
  color:var(--text);
  font-weight:700
}

.voucher-entry-history-row .voucher-history-row-company{
  grid-column:1 / -1;
  padding-left:61px;
  color:var(--muted);
  font-size:7px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

/* Retire the former separate filter panel if any stale markup remains. */
.voucher-entry-history-filters{
  display:none!important
}

:root[data-theme="light"]
.voucher-entry-history-grid-head{
  background:#f5f8fa
}

:root[data-theme="light"]
.voucher-history-column-filters select,
:root[data-theme="light"]
.voucher-history-column-filters input{
  background:#ffffff;
  color:#08131d
}


/* ============================================================
   Journal Voucher viewport / actions / company header
   ============================================================ */
@media(min-width:901px){
  .voucher-entry-shell{
    height:calc(100dvh - 150px)!important;
    min-height:0!important;
    max-height:calc(100dvh - 150px)!important
  }

  .voucher-entry-history{
    min-height:0!important;
    display:flex!important;
    flex-direction:column!important
  }

  .voucher-entry-history-list{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    overflow:auto!important
  }

  .voucher-entry-main{
    min-height:0!important;
    height:100%!important;
    overflow:hidden!important
  }

  .voucher-entry-topbar,
  .voucher-lookup-source-strip,
  .voucher-entry-balance-box,
  .voucher-entry-actions{
    flex:0 0 auto!important
  }

  .voucher-entry-grid-wrap{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow:auto!important
  }

  .voucher-entry-actions{
    position:relative!important;
    z-index:40!important
  }
}

.voucher-entry-company-field{
  min-width:0
}

.voucher-company-heading{
  min-height:28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:4px
}

.voucher-company-heading>span{
  color:var(--muted);
  font-size:9px;
  font-weight:800
}

.voucher-company-new-button{
  min-height:26px;
  padding:4px 9px;
  border:1px solid rgba(98,228,231,.28);
  border-radius:7px;
  background:rgba(98,228,231,.07);
  color:var(--text);
  font:inherit;
  font-size:9px;
  font-weight:600;
  cursor:pointer
}

.voucher-company-new-button:hover{
  background:rgba(98,228,231,.13)
}

.voucher-entry-company-field>select{
  width:100%;
  height:36px;
  padding:0 9px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--bg);
  color:var(--text);
  outline:0
}

#voucher-entry-number[readonly]{
  opacity:.9;
  cursor:default
}

:root[data-theme="light"]
.voucher-company-new-button{
  color:#087a52;
  border-color:rgba(8,122,82,.24);
  background:rgba(8,122,82,.06)
}


/* ============================================================
   Journal Voucher action workflow
   ============================================================ */
.voucher-action-button:disabled{
  opacity:.38!important;
  cursor:not-allowed!important;
  filter:grayscale(.4)
}

.voucher-action-button.create span{
  color:#20b486
}

.voucher-action-button.edit span{
  color:#5d92c8
}

.voucher-delete-confirm-backdrop{
  position:fixed;
  inset:0;
  z-index:25000;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(3,10,17,.72);
  backdrop-filter:blur(4px)
}

.voucher-delete-confirm-modal{
  width:min(420px,100%);
  padding:24px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel);
  color:var(--text);
  box-shadow:0 28px 80px rgba(0,0,0,.38);
  text-align:center
}

.voucher-delete-confirm-icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  margin:0 auto 14px;
  border-radius:50%;
  background:rgba(220,53,69,.10);
  color:var(--danger);
  font-size:24px;
  font-weight:800
}

.voucher-delete-confirm-modal h3{
  margin:0 0 8px;
  font-size:18px
}

.voucher-delete-confirm-modal p{
  margin:0;
  color:var(--muted);
  font-size:11px;
  line-height:1.55
}

.voucher-delete-confirm-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:20px
}

.voucher-delete-confirm-actions button{
  min-height:40px;
  border-radius:9px
}

.voucher-delete-confirm-yes{
  border:1px solid rgba(220,53,69,.30);
  background:rgba(220,53,69,.10);
  color:var(--danger);
  font:inherit;
  font-weight:700;
  cursor:pointer
}

.voucher-delete-confirm-yes:hover{
  background:rgba(220,53,69,.16)
}

:root[data-theme="light"] .voucher-delete-confirm-modal{
  background:#ffffff
}


/* ============================================================
   Voucher Cancel + row delete confirmation workflow
   ============================================================ */
.voucher-action-button.cancel span{
  color:#d59b38
}

:root[data-theme="light"]
.voucher-action-button.cancel:not(:disabled){
  border-color:rgba(177,119,25,.24)
}


/* Journal Voucher: View mode detail controls stay keyboard-focusable. */
.voucher-entry-grid [data-voucher-field]{
  outline-offset:-1px
}

@media(min-width:1200px){.voucher-entry-shell{grid-template-columns:430px minmax(0,1fr)!important}}
.voucher-history-column-titles,.voucher-history-column-filters,.voucher-entry-history-row{grid-template-columns:62px 54px minmax(105px,1fr) 92px 72px!important;gap:5px!important}
.voucher-history-group-cell,.voucher-history-company-cell{color:var(--text)}
.voucher-entry-header-fields{grid-template-columns:125px 145px 125px 125px minmax(190px,1fr)!important}


/* Journal Voucher: left accounting history disabled in New/Edit mode. */
.voucher-entry-history.locked{
  opacity:.52;
  pointer-events:none;
  user-select:none;
  filter:saturate(.7)
}

.voucher-entry-history.locked
input,
.voucher-entry-history.locked
select,
.voucher-entry-history.locked
button{
  cursor:not-allowed!important
}


/* Resizable main application menu. */
:root{
  --app-sidebar-width:260px
}

.sidebar,
.app-sidebar{
  width:var(--app-sidebar-width)!important;
  min-width:var(--app-sidebar-width)!important;
  max-width:var(--app-sidebar-width)!important;
  position:relative
}

.app-shell,
.app-layout,
.shell{
  grid-template-columns:
    var(--app-sidebar-width)
    minmax(0,1fr)
}

.sidebar-resize-handle{
  position:absolute;
  top:0;
  right:-4px;
  bottom:0;
  width:8px;
  z-index:500;
  cursor:col-resize;
  touch-action:none;
  background:transparent
}

.sidebar-resize-handle:hover{
  background:rgba(98,228,231,.12)
}

body.resizing-sidebar{
  cursor:col-resize!important;
  user-select:none!important
}

body.resizing-sidebar *{
  cursor:col-resize!important
}


/* ============================================================
   Journal Voucher compact header + sidebar collapse control
   ============================================================ */
.voucher-entry-header-fields{
  grid-template-columns:
    92px
    145px
    125px
    125px
    minmax(190px,1fr)!important
}

.voucher-transaction-group-field{
  min-width:0!important;
  max-width:92px!important
}

.voucher-transaction-group-field
.searchable-combo,
.voucher-transaction-group-field
select,
.voucher-transaction-group-field
input{
  width:92px!important;
  min-width:0!important
}

.sidebar-width-toggle{
  position:absolute;
  top:12px;
  right:-15px;
  z-index:650;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--panel-strong);
  color:var(--text);
  box-shadow:0 7px 20px rgba(0,0,0,.22);
  font-size:20px;
  line-height:1;
  cursor:pointer
}

.sidebar-width-toggle:hover{
  border-color:rgba(98,228,231,.38);
  background:var(--bg-soft)
}

.sidebar.compact-sidebar{
  padding-left:8px!important;
  padding-right:8px!important;
  overflow:visible
}

.sidebar.compact-sidebar .brand-row{
  justify-content:center;
  padding:0;
  margin-bottom:14px
}

.sidebar.compact-sidebar .brand-copy,
.sidebar.compact-sidebar .sidebar-search-box,
.sidebar.compact-sidebar .menu-label,
.sidebar.compact-sidebar .menu-text,
.sidebar.compact-sidebar .menu-badge,
.sidebar.compact-sidebar .copilot-card{
  display:none!important
}

.sidebar.compact-sidebar .menu-scroll{
  padding-left:0;
  padding-right:0
}

.sidebar.compact-sidebar .menu-item{
  justify-content:center;
  width:54px;
  padding:0;
  margin-left:auto;
  margin-right:auto
}

.sidebar.compact-sidebar .menu-icon{
  width:auto;
  margin:0;
  font-size:18px
}

.sidebar.compact-sidebar .brand-mark{
  width:42px;
  min-width:42px
}

@media(max-width:1100px){
  .sidebar-width-toggle,
  .sidebar-resize-handle{
    display:none!important
  }
}


/* ============================================================
   Journal Voucher - Amount LBP / Amount USD columns
   ============================================================ */
.voucher-entry-grid{
  min-width:2150px
}

.voucher-entry-grid td:nth-child(10),
.voucher-entry-grid td:nth-child(11){
  min-width:120px
}

.voucher-entry-grid td:nth-child(12),
.voucher-entry-grid td:nth-child(13){
  min-width:150px
}


/* ============================================================
   Journal Voucher left Accounting Transactions panel
   collapsible + resizable
   ============================================================ */
.voucher-entry-shell{
  --voucher-history-width:430px;
  grid-template-columns:
    var(--voucher-history-width)
    minmax(0,1fr)!important;
  transition:
    grid-template-columns .18s ease
}

.voucher-entry-history{
  position:relative!important;
  min-width:0!important;
  overflow:visible!important
}

.voucher-history-collapse-button{
  position:absolute;
  top:12px;
  right:-15px;
  z-index:900;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--panel-strong);
  color:var(--text);
  box-shadow:0 7px 20px rgba(0,0,0,.18);
  font:inherit;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  pointer-events:auto
}

.voucher-history-collapse-button:hover{
  border-color:rgba(98,228,231,.40);
  background:var(--bg-soft)
}

.voucher-history-resize-handle{
  position:absolute;
  top:0;
  right:-4px;
  bottom:0;
  z-index:850;
  width:8px;
  cursor:col-resize;
  touch-action:none;
  pointer-events:auto;
  background:transparent
}

.voucher-history-resize-handle:hover{
  background:rgba(98,228,231,.10)
}

.voucher-entry-history.collapsed{
  overflow:visible!important
}

.voucher-entry-history.collapsed
> :not(.voucher-history-collapse-button):not(.voucher-history-resize-handle){
  visibility:hidden!important;
  pointer-events:none!important
}

.voucher-entry-history.collapsed
.voucher-history-resize-handle{
  display:none!important
}

body.resizing-voucher-history{
  cursor:col-resize!important;
  user-select:none!important
}

body.resizing-voucher-history *{
  cursor:col-resize!important
}

@media(max-width:1000px){
  .voucher-history-resize-handle{
    display:none!important
  }

  .voucher-entry-shell{
    grid-template-columns:1fr!important
  }
}






/* ============================================================
   Journal Voucher left list: true Hide / Show
   ============================================================ */
.voucher-entry-shell.history-hidden{
  grid-template-columns:
    0
    minmax(0,1fr)!important
}

.voucher-entry-shell.history-hidden
.voucher-entry-history{
  width:0!important;
  min-width:0!important;
  max-width:0!important;
  border:0!important;
  padding:0!important;
  margin:0!important;
  overflow:visible!important;
  background:transparent!important
}

.voucher-entry-shell.history-hidden
.voucher-entry-history
> :not(.voucher-history-collapse-button):not(.voucher-history-resize-handle){
  display:none!important
}

.voucher-entry-shell.history-hidden
.voucher-history-resize-handle{
  display:none!important
}

.voucher-entry-shell.history-hidden
.voucher-history-collapse-button{
  display:grid!important;
  visibility:visible!important;
  pointer-events:auto!important;
  right:-16px!important;
  top:12px!important
}

/* When list is visible, keep the same button at the divider. */
.voucher-entry-history:not(.collapsed)
.voucher-history-collapse-button{
  right:-15px!important
}


/* ============================================================
   FIXED JV left-list toggle
   Button is a child of voucher-entry-shell, not the disabled history.
   ============================================================ */
.voucher-entry-shell{
  position:relative!important
}

.voucher-history-shell-toggle{
  position:absolute!important;
  top:12px!important;
  left:calc(var(--voucher-history-width) - 15px)!important;
  right:auto!important;
  z-index:20000!important;
  display:grid!important;
  visibility:visible!important;
  pointer-events:auto!important;
  opacity:1!important;
  transition:left .18s ease!important
}

/* New/Edit disables only the list. The shell toggle stays clickable. */
.voucher-entry-history.locked
~ .voucher-history-shell-toggle{
  pointer-events:auto!important
}

/* When hidden, keep the button safely inside the left edge of the voucher. */
.voucher-entry-shell.history-hidden
.voucher-history-shell-toggle{
  left:6px!important;
  display:grid!important;
  visibility:visible!important;
  pointer-events:auto!important
}

/* The old selector assumed the button lived inside the history panel.
   Neutralize it for the shell-level control. */
.voucher-entry-shell.history-hidden
.voucher-entry-history
.voucher-history-collapse-button{
  display:none!important
}

@media(max-width:1000px){
  .voucher-history-shell-toggle{
    display:grid!important
  }
}


/* ============================================================
   Journal Voucher - active detail cell
   ============================================================ */
.voucher-entry-grid td{
  position:relative
}

.voucher-entry-grid td:focus-within{
  background:rgba(98,228,231,.10)!important;
  box-shadow:
    inset 0 0 0 2px rgba(46,180,184,.70)!important;
  z-index:3
}

.voucher-entry-grid td:focus-within
input,
.voucher-entry-grid td:focus-within
select,
.voucher-entry-grid td:focus-within
.searchable-combo-input{
  background:transparent!important
}

:root[data-theme="light"]
.voucher-entry-grid td:focus-within{
  background:#e8f7f8!important;
  box-shadow:
    inset 0 0 0 2px rgba(24,146,151,.65)!important
}

/* Browser selection highlight inside the active voucher cell. */
.voucher-entry-grid input::selection,
.voucher-entry-grid .searchable-combo-input::selection{
  background:Highlight;
  color:HighlightText
}


/* Journal Voucher monetary inputs with thousands separators. */
.voucher-entry-grid .voucher-money-input{
  text-align:right;
  font-variant-numeric:tabular-nums
}


/* ============================================================
   Journal Voucher - Hide / Show accounting dimensions
   ============================================================ */
.voucher-entry-shell.voucher-dimensions-hidden
[data-voucher-dimension-column]{
  display:none!important
}

.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid{
  width:100%!important;
  min-width:1040px!important;
  table-layout:fixed
}

.voucher-action-button.dimensions span{
  color:var(--cyan)
}

.voucher-action-button.dimensions{
  min-width:108px
}


/* ============================================================
   Sidebar collapsible / expandable menu groups
   ============================================================ */
.menu-group-toggle{
  width:100%;
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:0;
  border:0;
  background:transparent;
  text-align:left;
  cursor:pointer;
  transition:.16s ease
}

.menu-group-toggle:hover{
  color:#7189a5;
  background:rgba(255,255,255,.018)
}

.menu-group-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.menu-group-chevron{
  flex:0 0 auto;
  width:18px;
  display:grid;
  place-items:center;
  color:#53708d;
  font-size:15px;
  line-height:1;
  transition:transform .16s ease,color .16s ease
}

.menu-group-toggle:hover
.menu-group-chevron{
  color:var(--cyan)
}

.menu-group-items{
  display:block
}

.menu-group.collapsed
.menu-group-items{
  display:none
}

.menu-group.collapsed{
  margin-bottom:6px
}

/* Keep compact sidebar clean: group labels remain hidden there,
   matching the existing compact-sidebar behavior. */
.sidebar.compact-sidebar
.menu-group-toggle{
  display:none!important
}


/* ============================================================
   Compact sidebar: always keep menu icons visible
   ============================================================ */

/*
  A group's saved collapsed/expanded state applies only while the
  full sidebar is expanded.

  In compact/sidebar-icon mode, all group items must remain rendered
  so the user can still navigate by icon.
*/
.sidebar.compact-sidebar
.menu-group-items,
.sidebar.compact-sidebar
.menu-group.collapsed
.menu-group-items{
  display:block!important
}

/* Group headings stay hidden in compact mode. */
.sidebar.compact-sidebar
.menu-group-toggle,
.sidebar.compact-sidebar
.menu-label{
  display:none!important
}

/* Keep each group compact; avoid large empty gaps between icon sets. */
.sidebar.compact-sidebar
.menu-group,
.sidebar.compact-sidebar
.menu-group.collapsed{
  margin-bottom:4px!important
}

/* Ensure normal and sub-menu icons use the same centered compact layout. */
.sidebar.compact-sidebar
.menu-item,
.sidebar.compact-sidebar
.menu-item.sub-menu-item{
  width:54px!important;
  height:42px!important;
  min-width:54px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:0!important;
  padding:0!important;
  margin:2px auto!important;
  visibility:visible!important;
  opacity:1!important
}

.sidebar.compact-sidebar
.menu-item .menu-icon,
.sidebar.compact-sidebar
.menu-item.sub-menu-item .menu-icon{
  width:auto!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  text-align:center!important;
  font-size:18px!important
}

/* Text and badges remain hidden so only icons consume compact width. */
.sidebar.compact-sidebar
.menu-item .menu-text,
.sidebar.compact-sidebar
.menu-item .menu-badge{
  display:none!important
}


/* ============================================================
   Journal Voucher - compact Account + fit hidden-dimensions grid
   ============================================================ */

/* Account contains only the account code; Account Name is separate. */
.voucher-entry-grid td:nth-child(1),
.voucher-entry-grid th:nth-child(1){
  width:110px!important;
  min-width:110px!important;
  max-width:110px!important
}

.voucher-entry-grid td:nth-child(1)
.searchable-combo{
  min-width:0!important;
  width:100%!important
}

.voucher-entry-grid td:nth-child(1)
.searchable-combo-input{
  min-width:0!important;
  width:100%!important;
  padding-left:6px!important;
  padding-right:22px!important
}

/* Keep the dropdown usable even though the visible Account cell is narrow. */
.voucher-entry-grid td:nth-child(1)
.searchable-combo-options{
  min-width:180px!important
}

/*
  When accounting dimensions are hidden, make the remaining useful columns
  compact enough to fit in the Journal Voucher editor after collapsing the
  application sidebar.
*/
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(2),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(2){
  width:145px!important;
  min-width:145px!important;
  max-width:145px!important
}

.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(3),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(3){
  width:175px!important;
  min-width:175px!important;
  max-width:175px!important
}

.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(5),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(5){
  width:80px!important;
  min-width:80px!important;
  max-width:80px!important
}

.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(6),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(6){
  width:72px!important;
  min-width:72px!important;
  max-width:72px!important
}

.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(7),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(7){
  width:82px!important;
  min-width:82px!important;
  max-width:82px!important
}

.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(8),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(8),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(9),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(9){
  width:90px!important;
  min-width:90px!important;
  max-width:90px!important
}

.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(10),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(10),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(11),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(11){
  width:105px!important;
  min-width:105px!important;
  max-width:105px!important
}

.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(18),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(18){
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important
}

/* Allow text to use the reduced cells without forcing the table wider. */
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid input,
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid select,
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid .searchable-combo,
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid .searchable-combo-input{
  min-width:0!important
}


/* ============================================================
   Journal Voucher compact fields refinement
   ============================================================ */

/*
  Account cell remains narrow, but its popup/search list is wide enough
  to show full "Account Number - Account Name".
*/
.voucher-entry-grid td:nth-child(1)
.searchable-combo-options{
  min-width:340px!important;
  width:max-content!important;
  max-width:520px!important
}

/* Currency: make the visible Journal Voucher column substantially narrower. */
.voucher-entry-grid th:nth-child(5),
.voucher-entry-grid td:nth-child(5){
  width:68px!important;
  min-width:68px!important;
  max-width:68px!important
}

.voucher-entry-grid td:nth-child(5)
.searchable-combo,
.voucher-entry-grid td:nth-child(5)
.searchable-combo-input{
  width:100%!important;
  min-width:0!important
}

.voucher-entry-grid td:nth-child(5)
.searchable-combo-input{
  padding-left:5px!important;
  padding-right:18px!important
}

/* With Dimensions hidden, make Currency even more compact. */
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid th:nth-child(5),
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:nth-child(5){
  width:62px!important;
  min-width:62px!important;
  max-width:62px!important
}

/*
  Left Accounting Transactions history:
  compact Date and Number, preserving Group / Type / Company readability.
*/
@media(min-width:1200px){
  .voucher-history-column-titles,
  .voucher-history-column-filters,
  .voucher-entry-history-row{
    grid-template-columns:
      58px
      48px
      minmax(92px,1fr)
      72px
      56px!important;
    gap:4px!important
  }
}

.voucher-history-date-cell,
.voucher-history-number-cell{
  font-size:8px!important
}

#voucher-history-date,
#voucher-history-number{
  padding-left:4px!important;
  padding-right:4px!important;
  font-size:8px!important
}

/* Journal Voucher empty searchable combos are intentionally blank. */
.voucher-entry-shell
.searchable-combo-input::placeholder{
  color:transparent!important
}


/* ============================================================
   Journal Voucher - left list right-click Copy menu
   ============================================================ */
.voucher-history-context-menu{
  position:fixed;
  z-index:50000;
  min-width:190px;
  padding:6px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel-strong);
  box-shadow:0 14px 38px rgba(0,0,0,.26);
  user-select:none
}

.voucher-history-context-action{
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:7px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:11px;
  font-weight:700;
  text-align:left;
  cursor:pointer
}

.voucher-history-context-action:hover{
  background:rgba(98,228,231,.10);
  color:var(--cyan)
}

.voucher-history-context-icon{
  width:20px;
  display:grid;
  place-items:center;
  font-size:16px;
  line-height:1
}

:root[data-theme="light"]
.voucher-history-context-menu{
  background:#fff;
  box-shadow:0 14px 38px rgba(25,50,70,.18)
}




/* ============================================================
   Journal Voucher - regular plus readable font
   Restores normal proportions, only a little larger than original.
   ============================================================ */
.voucher-entry-shell{
  font-size:12px!important;
}

/* Voucher title */
.voucher-entry-title h1,
.voucher-entry-main h1,
.voucher-entry-shell h1{
  font-size:22px!important;
  line-height:1.2!important;
  font-weight:800!important;
}

/* Header labels */
.voucher-entry-topbar label,
.voucher-entry-topbar label span,
.voucher-entry-header-fields label,
.voucher-entry-header-fields label span{
  font-size:10px!important;
  font-weight:800!important;
}

/* Header inputs */
.voucher-entry-topbar input,
.voucher-entry-topbar select,
.voucher-entry-topbar .searchable-combo-input,
.voucher-entry-header-fields input,
.voucher-entry-header-fields select,
.voucher-entry-header-fields .searchable-combo-input{
  height:38px!important;
  font-size:14px!important;
  font-weight:600!important;
}

/* Detail grid */
.voucher-entry-grid{
  font-size:11px!important;
}

.voucher-entry-grid th{
  height:36px!important;
  padding:0 7px!important;
  font-size:10px!important;
  font-weight:800!important;
}

.voucher-entry-grid td{
  height:40px!important;
  padding:3px!important;
  font-size:12px!important;
  font-weight:600!important;
}

.voucher-entry-grid input,
.voucher-entry-grid select,
.voucher-entry-grid .searchable-combo,
.voucher-entry-grid .searchable-combo-input{
  height:34px!important;
  font-size:12px!important;
  font-weight:600!important;
}

/* Left Accounting Transactions list */
.voucher-entry-history{
  font-size:11px!important;
}

.voucher-entry-history-header strong,
.voucher-entry-history-title,
.voucher-entry-history h3{
  font-size:14px!important;
  font-weight:800!important;
}

.voucher-entry-history-header small{
  font-size:10px!important;
}

.voucher-history-column-titles,
.voucher-history-column-titles *,
.voucher-history-column-filters,
.voucher-history-column-filters *{
  font-size:10px!important;
  font-weight:800!important;
}

.voucher-history-column-filters input,
.voucher-history-column-filters select,
.voucher-entry-history input,
.voucher-entry-history select,
.voucher-entry-history button{
  height:34px!important;
  font-size:11px!important;
  font-weight:600!important;
}

.voucher-entry-history-row,
.voucher-entry-history-row *,
.voucher-history-cell{
  font-size:11px!important;
  font-weight:600!important;
}

.voucher-entry-history-row{
  min-height:34px!important;
}

/* Totals */
.voucher-entry-balance-box,
.voucher-entry-balance-box *,
.voucher-entry-totals,
.voucher-entry-totals *,
.voucher-totals-panel,
.voucher-totals-panel *{
  font-size:13px!important;
  font-weight:700!important;
}

.voucher-entry-balance-box input,
.voucher-entry-totals input,
.voucher-totals-panel input{
  height:34px!important;
  font-size:13px!important;
  font-weight:700!important;
}

/* Bottom buttons */
.voucher-entry-actions,
.voucher-entry-actions *{
  font-size:11px!important;
  font-weight:700!important;
}

.voucher-action-button{
  min-height:64px!important;
  font-size:11px!important;
  font-weight:700!important;
}

.voucher-action-button span{
  font-size:20px!important;
}

/* Toast message top center, regular size */
.toast,
#toast.toast{
  position:fixed!important;
  top:22px!important;
  bottom:auto!important;
  left:50%!important;
  right:auto!important;
  transform:translate(-50%,-14px)!important;
  z-index:999999!important;
  max-width:560px!important;
  min-width:280px!important;
  padding:12px 20px!important;
  border-radius:12px!important;
  font-size:14px!important;
  font-weight:700!important;
  text-align:center!important;
}

.toast.show,
#toast.toast.show{
  opacity:1!important;
  transform:translate(-50%,0)!important;
}


/* ============================================================
   Journal Voucher - full width when main sidebar is collapsed
   Keeps existing layout logic, removes outside margins/gaps only.
   ============================================================ */

/* Main app grid: when sidebar is compact, make workspace start immediately after icon bar. */
.app-shell:has(.sidebar.compact-sidebar){
  grid-template-columns:54px minmax(0,1fr)!important;
}

.app-shell:has(.sidebar.compact-sidebar) > .sidebar{
  width:54px!important;
  min-width:54px!important;
  max-width:54px!important;
}

/* Remove the empty left/right space around the Journal Voucher page. */
body:has(.voucher-entry-shell) .workspace,
body:has(.voucher-entry-shell) main.workspace{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding-left:0!important;
  padding-right:0!important;
}

body:has(.voucher-entry-shell) .page-content,
body:has(.voucher-entry-shell) .content,
body:has(.voucher-entry-shell) .main-content{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding-left:0!important;
  padding-right:0!important;
}

/* When sidebar is collapsed, let Journal Voucher touch the available page edges. */
.app-shell:has(.sidebar.compact-sidebar) .workspace,
.app-shell:has(.sidebar.compact-sidebar) .page-content{
  padding-left:0!important;
  padding-right:0!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Journal Voucher card itself: no outer margin when the menu is collapsed. */
.app-shell:has(.sidebar.compact-sidebar) .voucher-entry-shell{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  border-radius:8px!important;
}

/* Keep a tiny 2px inner breathing space only to avoid clipping borders. */
.app-shell:has(.sidebar.compact-sidebar) .voucher-entry-main{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}

/* Remove page-heading extra spacing on Journal Voucher page if present. */
body:has(.voucher-entry-shell) .page-heading{
  margin-left:0!important;
  margin-right:0!important;
  padding-left:0!important;
  padding-right:0!important;
}

/* Topbar also uses the full available width when sidebar is compact. */
.app-shell:has(.sidebar.compact-sidebar) .topbar{
  margin-left:0!important;
  margin-right:0!important;
  padding-left:10px!important;
  padding-right:10px!important;
  width:100%!important;
  max-width:none!important;
}

/* If the Journal Voucher left history panel is hidden, remove any reserved gap. */
.voucher-entry-shell.history-hidden{
  grid-template-columns:0 minmax(0,1fr)!important;
}

.voucher-entry-shell.history-hidden .voucher-entry-history{
  width:0!important;
  min-width:0!important;
  max-width:0!important;
  padding:0!important;
  margin:0!important;
}

/* When Dimensions are hidden, fit the detail grid in full width with no unnecessary horizontal scroll. */
.voucher-entry-shell.voucher-dimensions-hidden .voucher-entry-grid-wrap{
  overflow-x:hidden!important;
}

.voucher-entry-shell.voucher-dimensions-hidden .voucher-entry-grid{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}

/* Make visible hidden-dimensions columns fit the page. */
.voucher-entry-shell.voucher-dimensions-hidden .voucher-entry-grid th,
.voucher-entry-shell.voucher-dimensions-hidden .voucher-entry-grid td{
  overflow:hidden!important;
}

.voucher-entry-shell.voucher-dimensions-hidden .voucher-entry-grid input,
.voucher-entry-shell.voucher-dimensions-hidden .voucher-entry-grid select,
.voucher-entry-shell.voucher-dimensions-hidden .voucher-entry-grid .searchable-combo,
.voucher-entry-shell.voucher-dimensions-hidden .voucher-entry-grid .searchable-combo-input{
  min-width:0!important;
  width:100%!important;
}


/* ============================================================
   FIX: Journal Voucher Account combo after Hide Dimensions
   Keep full-width/no-scroll layout, but allow searchable dropdowns
   to open above the grid cells.
   ============================================================ */
.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:has(.searchable-combo){
  overflow:visible!important;
  position:relative!important;
  z-index:20!important;
}

.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid td:has(.searchable-combo:focus-within){
  z-index:9999!important;
}

.voucher-entry-shell.voucher-dimensions-hidden
.searchable-combo-options{
  z-index:99999!important;
}

.voucher-entry-shell.voucher-dimensions-hidden
.voucher-entry-grid-wrap{
  overflow-y:auto!important;
}


/* ============================================================
   Journal Voucher - button hover effects
   Adds mouse hover to Plus/New, Edit, Save, Delete, Cancel,
   Print, Hide Dimensions, Copy, and voucher small buttons.
   ============================================================ */

.voucher-entry-shell button,
.voucher-entry-actions button,
.voucher-action-button,
.voucher-line-delete,
.voucher-history-shell-toggle,
.voucher-history-context-action {
  transition:
    transform .14s ease,
    box-shadow .14s ease,
    border-color .14s ease,
    background .14s ease,
    color .14s ease,
    filter .14s ease !important;
}

/* Normal hover for enabled Journal Voucher buttons */
.voucher-entry-shell button:not(:disabled):hover,
.voucher-entry-actions button:not(:disabled):hover,
.voucher-action-button:not(:disabled):hover,
.voucher-history-shell-toggle:not(:disabled):hover,
.voucher-history-context-action:not(:disabled):hover {
  transform: translateY(-2px) !important;
  border-color: rgba(98,228,231,.55) !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,.26),
    0 0 0 1px rgba(98,228,231,.16) inset !important;
  filter: brightness(1.08) !important;
}

/* Stronger hover for the large bottom action buttons */
.voucher-action-button:not(:disabled):hover {
  background:
    linear-gradient(135deg, rgba(98,228,231,.18), rgba(140,124,255,.14)) !important;
  color: var(--text) !important;
}

/* Pressed feel */
.voucher-entry-shell button:not(:disabled):active,
.voucher-entry-actions button:not(:disabled):active,
.voucher-action-button:not(:disabled):active,
.voucher-history-shell-toggle:not(:disabled):active,
.voucher-history-context-action:not(:disabled):active {
  transform: translateY(0) scale(.98) !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.20) !important;
}

/* Delete buttons keep a red warning hover */
.voucher-action-button.danger:not(:disabled):hover,
.voucher-line-delete:not(:disabled):hover,
button[data-voucher-action="delete"]:not(:disabled):hover,
button[data-action="delete-voucher"]:not(:disabled):hover {
  border-color: rgba(255,127,145,.55) !important;
  background: rgba(255,127,145,.13) !important;
  color: var(--danger) !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,.26),
    0 0 0 1px rgba(255,127,145,.22) inset !important;
}

/* Disabled buttons stay calm */
.voucher-entry-shell button:disabled,
.voucher-entry-actions button:disabled,
.voucher-action-button:disabled {
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}


/* ============================================================
   Theme button - one click responsive state
   Theme switching no longer rerenders/reloads Journal Voucher.
   ============================================================ */
.theme-mode-button{
  user-select:none!important;
}

.theme-mode-button:active{
  transform:scale(.97)!important;
}


/* ============================================================
   Chart of Accounts - Journal Voucher style page
   Left list + right editor + bottom action buttons
   ============================================================ */
.coa-entry-shell{
  min-height:calc(100vh - 118px);
  display:grid;
  grid-template-columns:310px minmax(0,1fr);
  gap:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel);
}

.coa-entry-history{
  min-width:0;
  display:flex;
  flex-direction:column;
  border-right:1px solid var(--line);
  background:var(--bg-soft);
}

.coa-entry-history-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px;
  border-bottom:1px solid var(--line);
}

.coa-entry-history-header strong{
  display:block;
  color:var(--text);
  font-size:14px;
  font-weight:900;
}

.coa-entry-history-header small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
}

.coa-entry-small-button{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--panel);
  color:var(--cyan);
  font-size:20px;
  font-weight:900;
}

.coa-entry-history-filters{
  padding:10px;
  border-bottom:1px solid var(--line);
}

.coa-entry-history-filters input{
  width:100%;
  height:38px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel);
  color:var(--text);
  outline:0;
  font-size:13px;
  font-weight:700;
}

.coa-entry-history-filters input:focus{
  border-color:rgba(98,228,231,.45);
  box-shadow:0 0 0 3px rgba(98,228,231,.08);
}

.coa-entry-history-columns{
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  gap:8px;
  padding:8px 11px;
  border-bottom:1px solid var(--line);
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  letter-spacing:.7px;
}

.coa-entry-history-list{
  flex:1;
  min-height:0;
  overflow:auto;
}

.coa-entry-history-row{
  width:100%;
  min-height:44px;
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  gap:8px;
  align-items:center;
  padding:8px 11px;
  border:0;
  border-bottom:1px solid var(--line);
  background:transparent;
  color:var(--text);
  text-align:left;
}

.coa-entry-history-row strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text);
  font-size:13px;
  font-weight:900;
}

.coa-entry-history-row span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.coa-entry-history-row:not(:disabled):hover,
.coa-entry-history-row.active{
  background:rgba(98,228,231,.09);
}

.coa-entry-history-row.active{
  box-shadow:inset 3px 0 0 var(--cyan);
}

.coa-entry-history-footer{
  padding:9px 11px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}

.coa-entry-pagination{
  padding:8px 10px 10px;
  border-top:1px solid var(--line);
}

.coa-entry-pagination .coa-page-info{
  margin-bottom:7px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
}

.coa-entry-pagination .coa-page-controls{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}

.coa-entry-pagination .coa-page-button,
.coa-entry-pagination .coa-page-size{
  min-height:30px;
  padding:0 8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel);
  color:var(--text);
  font-size:11px;
  font-weight:800;
}

.coa-entry-pagination .coa-page-button.active{
  border-color:rgba(98,228,231,.45);
  background:rgba(98,228,231,.13);
  color:var(--cyan);
}

.coa-entry-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.coa-entry-topbar{
  display:grid;
  grid-template-columns:minmax(240px,1fr) 190px 190px;
  gap:12px;
  align-items:stretch;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:var(--panel);
}

.coa-entry-title h1{
  margin:3px 0 4px;
  font-size:28px;
  line-height:1.15;
}

.coa-entry-title p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.coa-entry-status-card{
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--bg-soft);
}

.coa-entry-status-card span{
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  letter-spacing:.8px;
}

.coa-entry-status-card strong{
  display:block;
  margin-top:5px;
  color:var(--text);
  font-size:18px;
  font-weight:900;
}

.coa-entry-status-card small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
}

.coa-entry-card{
  margin:16px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--bg-soft);
}

.coa-entry-fields{
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:14px;
}

.coa-entry-fields label span{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  letter-spacing:.7px;
}

.coa-entry-fields input{
  width:100%;
  height:44px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel);
  color:var(--text);
  outline:0;
  font-size:15px;
  font-weight:800;
}

.coa-entry-fields input[readonly]{
  color:var(--muted);
  background:rgba(255,255,255,.02);
}

.coa-entry-fields input:focus{
  border-color:rgba(98,228,231,.45);
  box-shadow:0 0 0 3px rgba(98,228,231,.08);
}

.coa-entry-note{
  margin-top:14px;
  padding:10px 12px;
  border:1px dashed var(--line);
  border-radius:10px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.coa-entry-note span{
  margin:0 8px;
}

.coa-entry-actions{
  margin-top:auto;
  display:grid;
  grid-template-columns:repeat(10,minmax(74px,1fr));
  gap:8px;
  padding:12px 16px 16px;
  border-top:1px solid var(--line);
  background:var(--panel);
}

.coa-entry-actions .voucher-action-button{
  min-height:66px!important;
  padding:8px 6px!important;
}

.coa-entry-actions .voucher-action-button span{
  display:block;
  margin-bottom:5px;
  font-size:22px!important;
}

.coa-entry-loading,
.coa-entry-empty{
  padding:18px 12px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.coa-entry-empty strong{
  display:block;
  color:var(--text);
  font-size:14px;
}

.coa-entry-empty small{
  display:block;
  margin-top:5px;
  line-height:1.4;
}

/* full page when sidebar is collapsed */
.app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  border-radius:8px!important;
}

body:has(.coa-entry-shell) .workspace,
body:has(.coa-entry-shell) main.workspace,
body:has(.coa-entry-shell) .page-content{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding-left:0!important;
  padding-right:0!important;
}

@media (max-width:1200px){
  .coa-entry-shell{
    grid-template-columns:260px minmax(0,1fr);
  }

  .coa-entry-topbar{
    grid-template-columns:1fr;
  }

  .coa-entry-fields{
    grid-template-columns:1fr;
  }

  .coa-entry-actions{
    grid-template-columns:repeat(5,minmax(76px,1fr));
  }
}


/* ============================================================
   Chart of Accounts fixes:
   1) action buttons always visible
   2) wider left list
   3) separate Code and Description filters
   4) remove row count / rows selector area
   ============================================================ */
body:has(.coa-entry-shell){
  overflow:hidden!important;
}

.coa-entry-shell{
  height:calc(100vh - 92px)!important;
  min-height:0!important;
  grid-template-columns:430px minmax(0,1fr)!important;
}

.coa-entry-main,
.coa-entry-history{
  min-height:0!important;
  height:100%!important;
}

.coa-entry-history-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
}

.coa-entry-card{
  margin:16px!important;
  padding:18px!important;
}

.coa-entry-actions{
  position:sticky!important;
  bottom:0!important;
  z-index:20!important;
  margin-top:auto!important;
  padding:10px 14px!important;
  grid-template-columns:repeat(10,minmax(64px,1fr))!important;
  box-shadow:0 -12px 26px rgba(0,0,0,.18)!important;
}

.coa-entry-actions .voucher-action-button{
  min-height:58px!important;
  padding:6px 5px!important;
  font-size:11px!important;
}

.coa-entry-actions .voucher-action-button span{
  font-size:18px!important;
  margin-bottom:3px!important;
}

.coa-entry-history-filters.split{
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr)!important;
  gap:8px!important;
}

.coa-entry-history-filters.split input{
  min-width:0!important;
}

.coa-entry-history-filter-labels{
  border-bottom:0!important;
  padding-bottom:3px!important;
  color:var(--cyan)!important;
}

.coa-entry-history-footer,
.coa-entry-pagination{
  display:none!important;
}

.coa-entry-topbar{
  grid-template-columns:minmax(260px,1fr) 190px!important;
}

.coa-entry-fields{
  grid-template-columns:260px minmax(0,1fr)!important;
}

@media (max-width:1200px){
  .coa-entry-shell{
    grid-template-columns:360px minmax(0,1fr)!important;
  }

  .coa-entry-actions{
    grid-template-columns:repeat(5,minmax(74px,1fr))!important;
  }
}


/* ============================================================
   Chart of Accounts correction:
   - restore normal page scroll
   - make the left list wider so Description is visible
   - move bottom action buttons upward under the form
   ============================================================ */

/* Restore page/browser scrolling. */
body:has(.coa-entry-shell){
  overflow:auto!important;
}

/* Do not lock the Chart of Accounts page to the viewport height. */
.coa-entry-shell{
  height:auto!important;
  min-height:calc(100vh - 210px)!important;
  grid-template-columns:560px minmax(0,1fr)!important;
  overflow:visible!important;
}

/* Keep the left list scrollable, but do not remove the page scroll. */
.coa-entry-history{
  height:auto!important;
  min-height:0!important;
}

.coa-entry-history-list{
  max-height:calc(100vh - 360px)!important;
  overflow:auto!important;
}

/* Wider code/description columns on the left list. */
.coa-entry-history-columns,
.coa-entry-history-filters.split,
.coa-entry-history-row{
  grid-template-columns:120px minmax(0,1fr)!important;
}

.coa-entry-history-row span{
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Give the description filter more room and make it readable. */
.coa-entry-history-filters.split input{
  height:38px!important;
  font-size:13px!important;
}

/* Move the action buttons up: directly under the form, not stuck to the bottom. */
.coa-entry-actions{
  position:relative!important;
  bottom:auto!important;
  margin-top:12px!important;
  margin-left:16px!important;
  margin-right:16px!important;
  margin-bottom:18px!important;
  padding:10px 12px!important;
  box-shadow:none!important;
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  background:var(--bg-soft)!important;
}

/* Compact the editor area so the buttons appear immediately. */
.coa-entry-card{
  margin-bottom:0!important;
}

/* Keep buttons comfortable but not too tall. */
.coa-entry-actions .voucher-action-button{
  min-height:60px!important;
}

/* Full-width still works when main sidebar is collapsed. */
.app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
  grid-template-columns:560px minmax(0,1fr)!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Responsive fallback. */
@media (max-width:1400px){
  .coa-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
    grid-template-columns:500px minmax(0,1fr)!important;
  }

  .coa-entry-history-columns,
  .coa-entry-history-filters.split,
  .coa-entry-history-row{
    grid-template-columns:110px minmax(0,1fr)!important;
  }
}

@media (max-width:1100px){
  .coa-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
    grid-template-columns:420px minmax(0,1fr)!important;
  }
}


/* ============================================================
   Chart of Accounts correction:
   Buttons back to the bottom like Journal Voucher
   ============================================================ */

/* Keep the page normal, but make the COA card fill the available height. */
body:has(.coa-entry-shell){
  overflow:auto!important;
}

.coa-entry-shell{
  height:calc(100vh - 150px)!important;
  min-height:620px!important;
  grid-template-columns:560px minmax(0,1fr)!important;
  overflow:hidden!important;
}

/* Left list remains independently scrollable. */
.coa-entry-history{
  height:100%!important;
  min-height:0!important;
}

.coa-entry-history-list{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
}

/* Right side behaves like Journal Voucher: editor at top, buttons at bottom. */
.coa-entry-main{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}

.coa-entry-card{
  margin:16px!important;
  margin-bottom:16px!important;
  flex:0 0 auto!important;
}

/* This empty space pushes buttons down to the bottom. */
.coa-entry-main::after{
  content:"";
  flex:1 1 auto;
  min-height:20px;
}

/* Bottom action bar like Journal Voucher */
.coa-entry-actions{
  order:99!important;
  position:relative!important;
  bottom:auto!important;
  z-index:20!important;
  margin-top:auto!important;
  margin-left:0!important;
  margin-right:0!important;
  margin-bottom:0!important;
  padding:12px 16px 16px!important;
  border-top:1px solid var(--line)!important;
  border-left:0!important;
  border-right:0!important;
  border-bottom:0!important;
  border-radius:0!important;
  background:var(--panel)!important;
  box-shadow:none!important;
  display:grid!important;
  grid-template-columns:repeat(10,minmax(74px,1fr))!important;
  gap:8px!important;
}

.coa-entry-actions .voucher-action-button{
  min-height:66px!important;
  padding:8px 6px!important;
  font-size:11px!important;
}

.coa-entry-actions .voucher-action-button span{
  display:block!important;
  margin-bottom:5px!important;
  font-size:22px!important;
}

/* Keep the left list wide enough for description. */
.coa-entry-history-columns,
.coa-entry-history-filters.split,
.coa-entry-history-row{
  grid-template-columns:120px minmax(0,1fr)!important;
}

/* When sidebar is collapsed, keep the same bottom-button layout. */
.app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
  height:calc(100vh - 150px)!important;
  min-height:620px!important;
  grid-template-columns:560px minmax(0,1fr)!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

@media (max-width:1400px){
  .coa-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
    grid-template-columns:500px minmax(0,1fr)!important;
  }

  .coa-entry-actions{
    grid-template-columns:repeat(10,minmax(64px,1fr))!important;
  }
}

@media (max-width:1100px){
  .coa-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
    grid-template-columns:420px minmax(0,1fr)!important;
  }

  .coa-entry-actions{
    grid-template-columns:repeat(5,minmax(74px,1fr))!important;
  }
}


/* ============================================================
   Chart of Accounts correction:
   Left tools + Close button + Journal Voucher button colors
   ============================================================ */

.coa-entry-left-tools{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  padding:10px!important;
  border-bottom:1px solid var(--line)!important;
  background:var(--bg-soft)!important;
}

.coa-entry-tool-button{
  min-height:42px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  font-size:11px!important;
  font-weight:800!important;
  transition:
    transform .14s ease,
    box-shadow .14s ease,
    border-color .14s ease,
    background .14s ease,
    color .14s ease,
    filter .14s ease!important;
}

.coa-entry-tool-button span{
  color:#5d92c8!important;
  font-size:17px!important;
}

.coa-entry-tool-button:not(:disabled):hover{
  transform:translateY(-2px)!important;
  border-color:rgba(98,228,231,.55)!important;
  background:linear-gradient(135deg, rgba(98,228,231,.12), rgba(140,124,255,.09))!important;
  box-shadow:
    0 10px 24px rgba(0,0,0,.22),
    0 0 0 1px rgba(98,228,231,.14) inset!important;
}

/* Same concept and colors as Journal Voucher bottom buttons. */
.coa-entry-actions{
  background:var(--bg-soft)!important;
}

.coa-entry-actions .voucher-action-button{
  min-width:92px!important;
  min-height:66px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  border:1px solid var(--line)!important;
  border-radius:9px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  font-size:9px!important;
  font-weight:700!important;
}

.coa-entry-actions .voucher-action-button span{
  color:#5d92c8!important;
  font-size:22px!important;
}

.coa-entry-actions .voucher-action-button.save span{
  color:var(--green)!important;
}

.coa-entry-actions .voucher-action-button.delete span,
.coa-entry-actions .voucher-action-button.close span{
  color:var(--danger)!important;
}

.coa-entry-actions .voucher-action-button:not(:disabled):hover{
  transform:translateY(-2px)!important;
  border-color:rgba(98,228,231,.55)!important;
  box-shadow:
    0 12px 28px rgba(0,0,0,.26),
    0 0 0 1px rgba(98,228,231,.16) inset!important;
  filter:brightness(1.08)!important;
}

.coa-entry-actions .voucher-action-button.delete:not(:disabled):hover,
.coa-entry-actions .voucher-action-button.close:not(:disabled):hover{
  border-color:rgba(255,127,145,.55)!important;
  background:rgba(255,127,145,.13)!important;
  color:var(--danger)!important;
  box-shadow:
    0 12px 28px rgba(0,0,0,.26),
    0 0 0 1px rgba(255,127,145,.22) inset!important;
}

/* Since Template / Excel / PDF moved to the left panel, keep bottom bar clean. */
.coa-entry-actions{
  grid-template-columns:repeat(9,minmax(82px,1fr))!important;
}


/* ============================================================
   Chart of Accounts correction:
   Buttons visible without page scrolling
   ============================================================ */

/* For Chart of Accounts, the browser page should not need vertical scrolling
   just to reach the action buttons. */
body:has(.coa-entry-shell){
  overflow:hidden!important;
}

/* The workspace area becomes one visible screen. */
body:has(.coa-entry-shell) .workspace,
body:has(.coa-entry-shell) main.workspace,
body:has(.coa-entry-shell) .page-content{
  min-height:0!important;
  overflow:hidden!important;
}

/* Hide only the migration strip on Chart of Accounts so the editor gets
   enough vertical space and the buttons remain visible. */
body:has(.coa-entry-shell) .accounting-master-data-migration-strip,
body:has(.coa-entry-shell) .master-data-migration-strip,
body:has(.coa-entry-shell) .migration-strip,
body:has(.coa-entry-shell) .migration-card,
body:has(.coa-entry-shell) section:has([data-action="migrate-master-auxiliary"]),
body:has(.coa-entry-shell) section:has([data-action="migrate-accounting-master-data"]),
body:has(.coa-entry-shell) section:has(button[data-action="migrate-master-auxiliary"]),
body:has(.coa-entry-shell) section:has(button[data-action="migrate-accounting-master-data"]){
  display:none!important;
}

/* Fit the COA shell inside the visible page. */
.coa-entry-shell{
  height:calc(100vh - 150px)!important;
  min-height:0!important;
  max-height:calc(100vh - 150px)!important;
  overflow:hidden!important;
  grid-template-columns:560px minmax(0,1fr)!important;
}

/* Left list scrolls internally. */
.coa-entry-history{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}

.coa-entry-history-list{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
}

/* Right side is a fixed-height flex panel:
   top header + form + empty space + bottom buttons. */
.coa-entry-main{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}

.coa-entry-topbar{
  flex:0 0 auto!important;
}

.coa-entry-card{
  flex:0 0 auto!important;
  margin:14px!important;
  margin-bottom:10px!important;
}

/* Buttons are always at the visible bottom of the COA card, like Journal Voucher. */
.coa-entry-actions{
  order:99!important;
  flex:0 0 auto!important;
  margin-top:auto!important;
  margin-left:0!important;
  margin-right:0!important;
  margin-bottom:0!important;
  position:relative!important;
  bottom:auto!important;
  z-index:30!important;
  padding:10px 14px!important;
  border-top:1px solid var(--line)!important;
  border-left:0!important;
  border-right:0!important;
  border-bottom:0!important;
  border-radius:0!important;
  background:var(--bg-soft)!important;
  box-shadow:0 -10px 22px rgba(0,0,0,.18)!important;
  display:grid!important;
  grid-template-columns:repeat(9,minmax(82px,1fr))!important;
  gap:8px!important;
}

/* Slightly compact so every button is visible in one row. */
.coa-entry-actions .voucher-action-button{
  min-height:58px!important;
  padding:6px 5px!important;
}

/* Full width still works when sidebar is collapsed. */
.app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
  height:calc(100vh - 150px)!important;
  min-height:0!important;
  max-height:calc(100vh - 150px)!important;
  grid-template-columns:560px minmax(0,1fr)!important;
}

/* On smaller screens, make the left list a bit narrower and keep buttons visible. */
@media (max-width:1400px){
  .coa-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
    grid-template-columns:500px minmax(0,1fr)!important;
  }

  .coa-entry-actions{
    grid-template-columns:repeat(9,minmax(70px,1fr))!important;
  }
}

@media (max-width:1150px){
  .coa-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
    grid-template-columns:420px minmax(0,1fr)!important;
  }

  .coa-entry-actions{
    grid-template-columns:repeat(5,minmax(76px,1fr))!important;
    overflow:auto!important;
  }
}


/* ============================================================
   Chart of Accounts correction:
   Dark/Light full refresh + top tools beside New account label
   ============================================================ */

.coa-entry-topbar{
  grid-template-columns:minmax(260px,1fr) auto 190px!important;
  align-items:stretch!important;
}

.coa-entry-top-tools{
  display:grid!important;
  grid-template-columns:repeat(3,94px)!important;
  gap:8px!important;
  align-items:stretch!important;
}

.coa-top-tool-button{
  min-height:72px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background:var(--bg-soft)!important;
  color:var(--text)!important;
  font-size:11px!important;
  font-weight:800!important;
  transition:
    transform .14s ease,
    box-shadow .14s ease,
    border-color .14s ease,
    background .14s ease,
    color .14s ease,
    filter .14s ease!important;
}

.coa-top-tool-button span{
  color:#5d92c8!important;
  font-size:22px!important;
}

.coa-top-tool-button:not(:disabled):hover{
  transform:translateY(-2px)!important;
  border-color:rgba(98,228,231,.55)!important;
  background:linear-gradient(135deg, rgba(98,228,231,.14), rgba(140,124,255,.10))!important;
  box-shadow:
    0 12px 28px rgba(0,0,0,.24),
    0 0 0 1px rgba(98,228,231,.16) inset!important;
  filter:brightness(1.08)!important;
}

/* Left panel now keeps Excel only. */
.coa-entry-left-tools.single{
  grid-template-columns:1fr!important;
}

/* Bottom bar now has 8 buttons after moving Import to top. */
.coa-entry-actions{
  grid-template-columns:repeat(8,minmax(88px,1fr))!important;
}

/* Keep bottom buttons visible with the new 8-button layout. */
@media (max-width:1400px){
  .coa-entry-topbar{
    grid-template-columns:minmax(240px,1fr) auto 190px!important;
  }

  .coa-entry-top-tools{
    grid-template-columns:repeat(3,82px)!important;
  }

  .coa-entry-actions{
    grid-template-columns:repeat(8,minmax(74px,1fr))!important;
  }
}

@media (max-width:1150px){
  .coa-entry-topbar{
    grid-template-columns:1fr!important;
  }

  .coa-entry-top-tools{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  .coa-entry-actions{
    grid-template-columns:repeat(4,minmax(76px,1fr))!important;
    overflow:auto!important;
  }
}


/* ============================================================
   FINAL Chart of Accounts layout:
   - page/browser scroll stays enabled
   - buttons visible on startup at bottom like Journal Voucher
   - Excel moved beside Template / Import / PDF
   ============================================================ */

/* Restore page scroll. Do NOT hide browser scrollbar on Chart of Accounts. */
html:has(.coa-entry-shell),
body:has(.coa-entry-shell){
  overflow-y:auto!important;
  overflow-x:hidden!important;
}

/* Make sure the migration strip is visible again. */
body:has(.coa-entry-shell) .accounting-master-data-migration-strip,
body:has(.coa-entry-shell) .master-data-migration-strip,
body:has(.coa-entry-shell) .migration-strip,
body:has(.coa-entry-shell) .migration-card,
body:has(.coa-entry-shell) section:has([data-action="migrate-master-auxiliary"]),
body:has(.coa-entry-shell) section:has([data-action="migrate-accounting-master-data"]),
body:has(.coa-entry-shell) section:has(button[data-action="migrate-master-auxiliary"]),
body:has(.coa-entry-shell) section:has(button[data-action="migrate-accounting-master-data"]){
  display:block!important;
}

/* Normal page width, no overflow lock. */
body:has(.coa-entry-shell) .workspace,
body:has(.coa-entry-shell) main.workspace,
body:has(.coa-entry-shell) .page-content{
  overflow:visible!important;
}

/* The COA panel fits the first visible screen area under the top/migration area.
   This keeps the bottom buttons visible immediately without needing to scroll. */
.coa-entry-shell{
  height:calc(100vh - 326px)!important;
  min-height:500px!important;
  max-height:calc(100vh - 326px)!important;
  overflow:hidden!important;
  grid-template-columns:560px minmax(0,1fr)!important;
}

/* Left list uses internal scroll only. */
.coa-entry-history{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}

.coa-entry-history-list{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
}

/* Right editor layout: form at top, action bar at bottom. */
.coa-entry-main{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}

.coa-entry-topbar{
  flex:0 0 auto!important;
  grid-template-columns:minmax(260px,1fr) auto 190px!important;
  align-items:stretch!important;
}

.coa-entry-card{
  flex:0 0 auto!important;
  margin:14px!important;
  margin-bottom:10px!important;
}

/* Push the action buttons to the visible bottom of the panel. */
.coa-entry-main::after{
  content:""!important;
  flex:1 1 auto!important;
  min-height:8px!important;
}

/* Bottom buttons visible on page load, same concept as Journal Voucher. */
.coa-entry-actions{
  order:99!important;
  flex:0 0 auto!important;
  margin-top:auto!important;
  margin-left:0!important;
  margin-right:0!important;
  margin-bottom:0!important;
  position:relative!important;
  bottom:auto!important;
  z-index:30!important;
  display:grid!important;
  grid-template-columns:repeat(8,minmax(88px,1fr))!important;
  gap:8px!important;
  padding:10px 14px!important;
  border-top:1px solid var(--line)!important;
  border-left:0!important;
  border-right:0!important;
  border-bottom:0!important;
  border-radius:0!important;
  background:var(--bg-soft)!important;
  box-shadow:0 -10px 22px rgba(0,0,0,.18)!important;
}

.coa-entry-actions .voucher-action-button{
  min-height:58px!important;
  padding:6px 5px!important;
}

/* Top tools: Template, Import, Excel, PDF beside the New account label. */
.coa-entry-top-tools{
  display:grid!important;
  grid-template-columns:repeat(4,82px)!important;
  gap:8px!important;
  align-items:stretch!important;
}

.coa-top-tool-button{
  min-height:72px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background:var(--bg-soft)!important;
  color:var(--text)!important;
  font-size:11px!important;
  font-weight:800!important;
}

.coa-top-tool-button span{
  color:#5d92c8!important;
  font-size:22px!important;
}

/* Remove old left Excel/tools area if any old markup remains cached. */
.coa-entry-left-tools{
  display:none!important;
}

/* Left list stays wide enough for description. */
.coa-entry-history-columns,
.coa-entry-history-filters.split,
.coa-entry-history-row{
  grid-template-columns:120px minmax(0,1fr)!important;
}

/* Sidebar collapsed keeps the same layout. */
.app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
  height:calc(100vh - 326px)!important;
  min-height:500px!important;
  max-height:calc(100vh - 326px)!important;
  grid-template-columns:560px minmax(0,1fr)!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

@media (max-height:760px){
  .coa-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
    height:calc(100vh - 300px)!important;
    min-height:420px!important;
    max-height:calc(100vh - 300px)!important;
  }

  .coa-entry-actions .voucher-action-button{
    min-height:52px!important;
  }

  .coa-entry-top-tools{
    grid-template-columns:repeat(4,74px)!important;
  }

  .coa-top-tool-button{
    min-height:62px!important;
  }
}

@media (max-width:1400px){
  .coa-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
    grid-template-columns:500px minmax(0,1fr)!important;
  }

  .coa-entry-top-tools{
    grid-template-columns:repeat(4,74px)!important;
  }

  .coa-entry-actions{
    grid-template-columns:repeat(8,minmax(74px,1fr))!important;
  }
}

@media (max-width:1150px){
  .coa-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .coa-entry-shell{
    grid-template-columns:420px minmax(0,1fr)!important;
  }

  .coa-entry-topbar{
    grid-template-columns:1fr!important;
  }

  .coa-entry-top-tools{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }

  .coa-entry-actions{
    grid-template-columns:repeat(4,minmax(76px,1fr))!important;
    overflow:auto!important;
  }
}


/* ============================================================
   Chart of Accounts correction:
   Cancel/New/Edit/Save buttons clickable like Journal Voucher
   ============================================================ */

.coa-entry-actions,
.coa-entry-actions *{
  pointer-events:auto!important;
}

.coa-entry-main::after{
  pointer-events:none!important;
}

/* Keep enabled Cancel/Save visually and physically clickable while Code input is focused. */
.coa-entry-actions .voucher-action-button:not(:disabled),
.coa-top-tool-button:not(:disabled){
  opacity:1!important;
  cursor:pointer!important;
}

.coa-entry-actions .voucher-action-button:disabled,
.coa-top-tool-button:disabled{
  cursor:not-allowed!important;
}


/* ============================================================
   Chart of Accounts correction:
   Cancel returns to View/readonly state visibly
   ============================================================ */

.coa-entry-fields input[readonly]{
  opacity:.78!important;
  cursor:default!important;
}

.coa-entry-status-card strong{
  white-space:nowrap!important;
}

/* Button clicks work even when an input has focus. */
.coa-entry-actions{
  pointer-events:auto!important;
}

.coa-entry-actions .voucher-action-button:not(:disabled){
  pointer-events:auto!important;
  cursor:pointer!important;
}


/* ============================================================
   Auxiliary Account - Journal Voucher / Chart of Account style
   Left list + right editor + bottom action buttons
   ============================================================ */
html:has(.aux-entry-shell),
body:has(.aux-entry-shell){
  overflow-y:auto!important;
  overflow-x:hidden!important;
}

body:has(.aux-entry-shell) .workspace,
body:has(.aux-entry-shell) main.workspace,
body:has(.aux-entry-shell) .page-content{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding-left:0!important;
  padding-right:0!important;
  overflow:visible!important;
}

.aux-entry-shell{
  height:calc(100vh - 326px)!important;
  min-height:500px!important;
  max-height:calc(100vh - 326px)!important;
  display:grid!important;
  grid-template-columns:610px minmax(0,1fr)!important;
  gap:0!important;
  overflow:hidden!important;
  border:1px solid var(--line)!important;
  border-radius:16px!important;
  background:var(--panel)!important;
}

.aux-entry-history{
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border-right:1px solid var(--line)!important;
  background:var(--bg-soft)!important;
}

.aux-entry-history-header{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:14px!important;
  border-bottom:1px solid var(--line)!important;
}

.aux-entry-history-header strong{
  display:block!important;
  color:var(--text)!important;
  font-size:14px!important;
  font-weight:900!important;
}

.aux-entry-history-header small{
  display:block!important;
  margin-top:4px!important;
  color:var(--muted)!important;
  font-size:10px!important;
}

.aux-entry-small-button{
  width:38px!important;
  height:38px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid var(--line)!important;
  border-radius:11px!important;
  background:var(--panel)!important;
  color:var(--cyan)!important;
  font-size:20px!important;
  font-weight:900!important;
}

.aux-entry-history-columns,
.aux-entry-history-filters,
.aux-entry-history-row{
  display:grid!important;
  grid-template-columns:120px 80px minmax(0,1fr)!important;
  gap:8px!important;
}

.aux-entry-history-columns{
  flex:0 0 auto!important;
  padding:8px 11px!important;
  border-bottom:1px solid var(--line)!important;
  color:var(--muted)!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.7px!important;
}

.aux-entry-filter-labels{
  border-bottom:0!important;
  padding-bottom:3px!important;
  color:var(--cyan)!important;
}

.aux-entry-history-filters{
  flex:0 0 auto!important;
  padding:10px!important;
  border-bottom:1px solid var(--line)!important;
}

.aux-entry-history-filters input{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  padding:0 10px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  outline:0!important;
  font-size:13px!important;
  font-weight:700!important;
}

.aux-entry-history-filters input:focus{
  border-color:rgba(98,228,231,.45)!important;
  box-shadow:0 0 0 3px rgba(98,228,231,.08)!important;
}

.aux-entry-history-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
}

.aux-entry-history-row{
  width:100%!important;
  min-height:44px!important;
  align-items:center!important;
  padding:8px 11px!important;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  background:transparent!important;
  color:var(--text)!important;
  text-align:left!important;
}

.aux-entry-history-row strong,
.aux-entry-history-row span,
.aux-entry-history-row em{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-style:normal!important;
}

.aux-entry-history-row strong{
  color:var(--text)!important;
  font-size:13px!important;
  font-weight:900!important;
}

.aux-entry-history-row span{
  color:var(--cyan)!important;
  font-size:13px!important;
  font-weight:900!important;
}

.aux-entry-history-row em{
  color:var(--muted)!important;
  font-size:12px!important;
  font-weight:700!important;
}

.aux-entry-history-row:not(:disabled):hover,
.aux-entry-history-row.active{
  background:rgba(98,228,231,.09)!important;
}

.aux-entry-history-row.active{
  box-shadow:inset 3px 0 0 var(--cyan)!important;
}

.aux-entry-history-footer{
  flex:0 0 auto!important;
  padding:9px 11px!important;
  border-top:1px solid var(--line)!important;
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:800!important;
}

.aux-entry-main{
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}

.aux-entry-topbar{
  flex:0 0 auto!important;
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) auto 190px!important;
  gap:12px!important;
  align-items:stretch!important;
  padding:14px 16px!important;
  border-bottom:1px solid var(--line)!important;
  background:var(--panel)!important;
}

.aux-entry-title h1{
  margin:3px 0 4px!important;
  font-size:28px!important;
  line-height:1.15!important;
}

.aux-entry-title p{
  margin:0!important;
  color:var(--muted)!important;
  font-size:13px!important;
  font-weight:700!important;
}

.aux-entry-top-tools{
  display:grid!important;
  grid-template-columns:repeat(4,82px)!important;
  gap:8px!important;
  align-items:stretch!important;
}

.aux-top-tool-button{
  min-height:72px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background:var(--bg-soft)!important;
  color:var(--text)!important;
  font-size:11px!important;
  font-weight:800!important;
  transition:
    transform .14s ease,
    box-shadow .14s ease,
    border-color .14s ease,
    background .14s ease,
    color .14s ease,
    filter .14s ease!important;
}

.aux-top-tool-button span{
  color:#5d92c8!important;
  font-size:22px!important;
}

.aux-top-tool-button:not(:disabled):hover{
  transform:translateY(-2px)!important;
  border-color:rgba(98,228,231,.55)!important;
  background:linear-gradient(135deg, rgba(98,228,231,.14), rgba(140,124,255,.10))!important;
  box-shadow:
    0 12px 28px rgba(0,0,0,.24),
    0 0 0 1px rgba(98,228,231,.16) inset!important;
  filter:brightness(1.08)!important;
}

.aux-entry-status-card{
  padding:11px 12px!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background:var(--bg-soft)!important;
}

.aux-entry-status-card span{
  display:block!important;
  color:var(--muted)!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.8px!important;
}

.aux-entry-status-card strong{
  display:block!important;
  margin-top:5px!important;
  color:var(--text)!important;
  font-size:18px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

.aux-entry-status-card small{
  display:block!important;
  margin-top:3px!important;
  color:var(--muted)!important;
  font-size:10px!important;
}

.aux-entry-card{
  flex:0 0 auto!important;
  margin:14px!important;
  margin-bottom:10px!important;
  padding:18px!important;
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  background:var(--bg-soft)!important;
}

.aux-entry-fields{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) 150px minmax(320px,1.5fr)!important;
  gap:14px!important;
}

.aux-entry-fields label span{
  display:block!important;
  margin-bottom:6px!important;
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:900!important;
  letter-spacing:.7px!important;
}

.aux-entry-fields input,
.aux-entry-fields select{
  width:100%!important;
  height:44px!important;
  padding:0 12px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  outline:0!important;
  font-size:15px!important;
  font-weight:800!important;
}

.aux-entry-fields input[readonly],
.aux-entry-fields select:disabled{
  opacity:.78!important;
  cursor:default!important;
}

.aux-entry-fields input:focus,
.aux-entry-fields select:focus{
  border-color:rgba(98,228,231,.45)!important;
  box-shadow:0 0 0 3px rgba(98,228,231,.08)!important;
}

.aux-entry-note{
  margin-top:14px!important;
  padding:10px 12px!important;
  border:1px dashed var(--line)!important;
  border-radius:10px!important;
  color:var(--muted)!important;
  font-size:12px!important;
  font-weight:700!important;
}

.aux-entry-note span{
  margin:0 8px!important;
}

.aux-entry-main::after{
  content:""!important;
  flex:1 1 auto!important;
  min-height:8px!important;
  pointer-events:none!important;
}

.aux-entry-actions{
  order:99!important;
  flex:0 0 auto!important;
  margin-top:auto!important;
  margin-left:0!important;
  margin-right:0!important;
  margin-bottom:0!important;
  position:relative!important;
  bottom:auto!important;
  z-index:30!important;
  display:grid!important;
  grid-template-columns:repeat(8,minmax(88px,1fr))!important;
  gap:8px!important;
  padding:10px 14px!important;
  border-top:1px solid var(--line)!important;
  background:var(--bg-soft)!important;
  box-shadow:0 -10px 22px rgba(0,0,0,.18)!important;
  pointer-events:auto!important;
}

.aux-entry-actions .voucher-action-button{
  min-width:92px!important;
  min-height:58px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  border:1px solid var(--line)!important;
  border-radius:9px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  font-size:9px!important;
  font-weight:700!important;
  cursor:pointer!important;
}

.aux-entry-actions .voucher-action-button span{
  color:#5d92c8!important;
  font-size:22px!important;
}

.aux-entry-actions .voucher-action-button.save span{
  color:var(--green)!important;
}

.aux-entry-actions .voucher-action-button.delete span,
.aux-entry-actions .voucher-action-button.close span{
  color:var(--danger)!important;
}

.aux-entry-actions .voucher-action-button:not(:disabled):hover{
  transform:translateY(-2px)!important;
  border-color:rgba(98,228,231,.55)!important;
  box-shadow:
    0 12px 28px rgba(0,0,0,.26),
    0 0 0 1px rgba(98,228,231,.16) inset!important;
  filter:brightness(1.08)!important;
}

.aux-entry-actions .voucher-action-button.delete:not(:disabled):hover,
.aux-entry-actions .voucher-action-button.close:not(:disabled):hover{
  border-color:rgba(255,127,145,.55)!important;
  background:rgba(255,127,145,.13)!important;
  color:var(--danger)!important;
}

.aux-entry-loading,
.aux-entry-empty{
  padding:18px 12px!important;
  color:var(--muted)!important;
  font-size:12px!important;
  font-weight:800!important;
}

.aux-entry-empty strong{
  display:block!important;
  color:var(--text)!important;
  font-size:14px!important;
}

.aux-entry-empty small{
  display:block!important;
  margin-top:5px!important;
  line-height:1.4!important;
}

.app-shell:has(.sidebar.compact-sidebar) .aux-entry-shell{
  height:calc(100vh - 326px)!important;
  min-height:500px!important;
  max-height:calc(100vh - 326px)!important;
  grid-template-columns:610px minmax(0,1fr)!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

@media (max-height:760px){
  .aux-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .aux-entry-shell{
    height:calc(100vh - 300px)!important;
    min-height:420px!important;
    max-height:calc(100vh - 300px)!important;
  }

  .aux-entry-actions .voucher-action-button{
    min-height:52px!important;
  }

  .aux-entry-top-tools{
    grid-template-columns:repeat(4,74px)!important;
  }

  .aux-top-tool-button{
    min-height:62px!important;
  }
}

@media (max-width:1450px){
  .aux-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .aux-entry-shell{
    grid-template-columns:540px minmax(0,1fr)!important;
  }

  .aux-entry-top-tools{
    grid-template-columns:repeat(4,74px)!important;
  }

  .aux-entry-actions{
    grid-template-columns:repeat(8,minmax(74px,1fr))!important;
  }
}

@media (max-width:1180px){
  .aux-entry-shell,
  .app-shell:has(.sidebar.compact-sidebar) .aux-entry-shell{
    grid-template-columns:430px minmax(0,1fr)!important;
  }

  .aux-entry-topbar{
    grid-template-columns:1fr!important;
  }

  .aux-entry-top-tools{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }

  .aux-entry-fields{
    grid-template-columns:1fr!important;
  }

  .aux-entry-actions{
    grid-template-columns:repeat(4,minmax(76px,1fr))!important;
    overflow:auto!important;
  }
}


/* ============================================================
   Auxiliary Account correction:
   View mode shows Master Account code only + focus saved row
   ============================================================ */

.aux-entry-fields #aux-entry-master-account-code{
  font-weight:900!important;
  color:var(--text)!important;
  letter-spacing:.2px!important;
}

.aux-entry-history-row.focus-saved{
  animation:auxSavedFocusPulse 1.8s ease-out 1!important;
  border-color:rgba(98,228,231,.55)!important;
}

@keyframes auxSavedFocusPulse{
  0%{
    background:rgba(98,228,231,.26);
    box-shadow:
      inset 4px 0 0 var(--cyan),
      0 0 0 1px rgba(98,228,231,.40) inset;
  }
  55%{
    background:rgba(98,228,231,.15);
    box-shadow:
      inset 4px 0 0 var(--cyan),
      0 0 0 1px rgba(98,228,231,.24) inset;
  }
  100%{
    background:rgba(98,228,231,.09);
    box-shadow:inset 3px 0 0 var(--cyan);
  }
}

.aux-entry-history-row:focus{
  outline:2px solid rgba(98,228,231,.55)!important;
  outline-offset:-2px!important;
}


/* ============================================================
   Auxiliary Account correction:
   Keep selected left-list row focused after click
   ============================================================ */

.aux-entry-history-row.selected,
.aux-entry-history-row.active,
.aux-entry-history-row[aria-current="true"]{
  background:rgba(98,228,231,.16)!important;
  box-shadow:
    inset 4px 0 0 var(--cyan),
    0 0 0 1px rgba(98,228,231,.16) inset!important;
}

.aux-entry-history-row.selected strong,
.aux-entry-history-row.active strong,
.aux-entry-history-row[aria-current="true"] strong{
  color:#eaffff!important;
}

.aux-entry-history-row.selected span,
.aux-entry-history-row.active span,
.aux-entry-history-row[aria-current="true"] span{
  color:var(--cyan)!important;
}

.aux-entry-history-row.selected em,
.aux-entry-history-row.active em,
.aux-entry-history-row[aria-current="true"] em{
  color:#c9d8ea!important;
}

:root[data-theme="light"] .aux-entry-history-row.selected,
:root[data-theme="light"] .aux-entry-history-row.active,
:root[data-theme="light"] .aux-entry-history-row[aria-current="true"]{
  background:#dff7fa!important;
  box-shadow:
    inset 4px 0 0 var(--cyan),
    0 0 0 1px rgba(24,153,166,.18) inset!important;
}

:root[data-theme="light"] .aux-entry-history-row.selected strong,
:root[data-theme="light"] .aux-entry-history-row.active strong,
:root[data-theme="light"] .aux-entry-history-row[aria-current="true"] strong,
:root[data-theme="light"] .aux-entry-history-row.selected em,
:root[data-theme="light"] .aux-entry-history-row.active em,
:root[data-theme="light"] .aux-entry-history-row[aria-current="true"] em{
  color:#07121c!important;
}


/* ============================================================
   Chart of Accounts correction:
   Keep selected left-list row focused after click
   ============================================================ */

.coa-entry-history-row.selected,
.coa-entry-history-row.active,
.coa-entry-history-row[aria-current="true"]{
  background:rgba(98,228,231,.16)!important;
  box-shadow:
    inset 4px 0 0 var(--cyan),
    0 0 0 1px rgba(98,228,231,.16) inset!important;
}

.coa-entry-history-row.selected strong,
.coa-entry-history-row.active strong,
.coa-entry-history-row[aria-current="true"] strong{
  color:#eaffff!important;
}

.coa-entry-history-row.selected span,
.coa-entry-history-row.active span,
.coa-entry-history-row[aria-current="true"] span{
  color:#c9d8ea!important;
}

.coa-entry-history-row.focus-saved{
  animation:coaSavedFocusPulse 1.8s ease-out 1!important;
  border-color:rgba(98,228,231,.55)!important;
}

@keyframes coaSavedFocusPulse{
  0%{
    background:rgba(98,228,231,.26);
    box-shadow:
      inset 4px 0 0 var(--cyan),
      0 0 0 1px rgba(98,228,231,.40) inset;
  }
  55%{
    background:rgba(98,228,231,.15);
    box-shadow:
      inset 4px 0 0 var(--cyan),
      0 0 0 1px rgba(98,228,231,.24) inset;
  }
  100%{
    background:rgba(98,228,231,.09);
    box-shadow:inset 3px 0 0 var(--cyan);
  }
}

.coa-entry-history-row:focus{
  outline:2px solid rgba(98,228,231,.55)!important;
  outline-offset:-2px!important;
}

:root[data-theme="light"] .coa-entry-history-row.selected,
:root[data-theme="light"] .coa-entry-history-row.active,
:root[data-theme="light"] .coa-entry-history-row[aria-current="true"]{
  background:#dff7fa!important;
  box-shadow:
    inset 4px 0 0 var(--cyan),
    0 0 0 1px rgba(24,153,166,.18) inset!important;
}

:root[data-theme="light"] .coa-entry-history-row.selected strong,
:root[data-theme="light"] .coa-entry-history-row.active strong,
:root[data-theme="light"] .coa-entry-history-row[aria-current="true"] strong,
:root[data-theme="light"] .coa-entry-history-row.selected span,
:root[data-theme="light"] .coa-entry-history-row.active span,
:root[data-theme="light"] .coa-entry-history-row[aria-current="true"] span{
  color:#07121c!important;
}


/* ============================================================
   COA + Auxiliary correction:
   Keep list scroll position when selecting rows
   ============================================================ */

.coa-entry-history-list,
.aux-entry-history-list{
  scroll-behavior:auto!important;
}

.coa-entry-history-row.selected,
.aux-entry-history-row.selected{
  scroll-margin:0!important;
}


/* ============================================================
   COA + Auxiliary correction:
   Journal Voucher-like row click without list movement
   ============================================================ */

/* Same simple click/active feel as Journal Voucher. */
.coa-entry-history-row.clicked,
.aux-entry-history-row.clicked{
  background:rgba(98,228,231,.22)!important;
  transform:scale(.995)!important;
}

.coa-entry-history-row.selected,
.coa-entry-history-row.active,
.coa-entry-history-row[aria-current="true"],
.aux-entry-history-row.selected,
.aux-entry-history-row.active,
.aux-entry-history-row[aria-current="true"]{
  background:rgba(98,228,231,.12)!important;
  box-shadow:inset 3px 0 0 var(--cyan)!important;
}

/* Do not use browser focus scrolling/outline as the visible state.
   The selected class is the persistent focus. */
.coa-entry-history-row:focus,
.aux-entry-history-row:focus{
  outline:none!important;
}

.coa-entry-history-list,
.aux-entry-history-list{
  overflow-anchor:none!important;
  scroll-behavior:auto!important;
}

/* Light mode equivalent. */
:root[data-theme="light"] .coa-entry-history-row.clicked,
:root[data-theme="light"] .aux-entry-history-row.clicked{
  background:#cceff3!important;
}

:root[data-theme="light"] .coa-entry-history-row.selected,
:root[data-theme="light"] .coa-entry-history-row.active,
:root[data-theme="light"] .coa-entry-history-row[aria-current="true"],
:root[data-theme="light"] .aux-entry-history-row.selected,
:root[data-theme="light"] .aux-entry-history-row.active,
:root[data-theme="light"] .aux-entry-history-row[aria-current="true"]{
  background:#dff7fa!important;
  box-shadow:inset 3px 0 0 var(--cyan)!important;
}


/* ============================================================
   Accounting Map + clean left lists
   ============================================================ */

/* Journal Voucher: Clear button moved to the top header. */
.voucher-entry-history-header-with-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:12px 10px!important;
}

.voucher-entry-history-header-with-actions > div{
  min-width:0!important;
}

.voucher-history-clear-button.top{
  flex:0 0 auto!important;
  min-height:30px!important;
  padding:4px 10px!important;
  border:1px solid var(--line)!important;
  border-radius:8px!important;
  background:var(--panel)!important;
  color:var(--muted)!important;
  font-size:9px!important;
  font-weight:800!important;
  cursor:pointer!important;
}

.voucher-history-clear-button.top:hover{
  background:rgba(98,228,231,.10)!important;
  color:var(--text)!important;
  border-color:rgba(98,228,231,.35)!important;
}

/* Hide any stale list-level New Voucher / plus buttons if browser cache keeps old markup. */
.voucher-history-grid-actions,
.voucher-history-new-button,
.coa-entry-history-header .coa-entry-small-button,
.aux-entry-history-header .aux-entry-small-button{
  display:none!important;
}

/* Keep left headers clean after removing the plus button. */
.coa-entry-history-header,
.aux-entry-history-header{
  justify-content:flex-start!important;
}

/* Row click same visual concept as Journal Voucher, without moving the list. */
.coa-entry-history-list,
.aux-entry-history-list{
  overflow-anchor:none!important;
  scroll-behavior:auto!important;
}

.coa-entry-history-row,
.aux-entry-history-row{
  transform:none!important;
  transition:background .10s ease, box-shadow .10s ease!important;
}

.coa-entry-history-row.clicked,
.aux-entry-history-row.clicked{
  background:rgba(98,228,231,.18)!important;
}

.coa-entry-history-row.selected,
.coa-entry-history-row.active,
.coa-entry-history-row[aria-current="true"],
.aux-entry-history-row.selected,
.aux-entry-history-row.active,
.aux-entry-history-row[aria-current="true"]{
  background:rgba(98,228,231,.09)!important;
  box-shadow:inset 3px 0 0 var(--cyan)!important;
}

.coa-entry-history-row:focus,
.aux-entry-history-row:focus{
  outline:none!important;
}

/* Accounting Map page under Workspace. */
.accounting-map-page{
  padding:18px!important;
}

.accounting-map-heading{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:18px!important;
  margin-bottom:16px!important;
}

.accounting-map-heading h1{
  margin:4px 0!important;
  font-size:28px!important;
  line-height:1.1!important;
}

.accounting-map-heading p{
  margin:0!important;
  color:var(--muted)!important;
  font-size:13px!important;
  font-weight:700!important;
}

.accounting-map-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(230px,1fr))!important;
  gap:12px!important;
}

.accounting-map-button{
  min-height:122px!important;
  padding:16px!important;
  border:1px solid var(--line)!important;
  border-radius:16px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  text-align:left!important;
  cursor:pointer!important;
  transition:
    transform .14s ease,
    box-shadow .14s ease,
    border-color .14s ease,
    background .14s ease!important;
}

.accounting-map-button span{
  width:36px!important;
  height:36px!important;
  display:grid!important;
  place-items:center!important;
  margin-bottom:12px!important;
  border-radius:12px!important;
  background:rgba(98,228,231,.10)!important;
  color:var(--cyan)!important;
  font-size:22px!important;
  font-weight:900!important;
}

.accounting-map-button strong{
  display:block!important;
  color:var(--text)!important;
  font-size:19px!important;
  line-height:1.2!important;
  font-weight:900!important;
}

.accounting-map-button small{
  display:block!important;
  margin-top:6px!important;
  color:var(--muted)!important;
  font-size:13px!important;
  line-height:1.4!important;
}

.accounting-map-button:hover{
  transform:translateY(-2px)!important;
  border-color:rgba(98,228,231,.45)!important;
  background:linear-gradient(135deg, rgba(98,228,231,.11), rgba(140,124,255,.08))!important;
  box-shadow:
    0 18px 38px rgba(0,0,0,.24),
    0 0 0 1px rgba(98,228,231,.12) inset!important;
}

:root[data-theme="light"] .coa-entry-history-row.clicked,
:root[data-theme="light"] .aux-entry-history-row.clicked{
  background:#d2f4f8!important;
}

:root[data-theme="light"] .coa-entry-history-row.selected,
:root[data-theme="light"] .coa-entry-history-row.active,
:root[data-theme="light"] .coa-entry-history-row[aria-current="true"],
:root[data-theme="light"] .aux-entry-history-row.selected,
:root[data-theme="light"] .aux-entry-history-row.active,
:root[data-theme="light"] .aux-entry-history-row[aria-current="true"]{
  background:#e6f8fa!important;
  box-shadow:inset 3px 0 0 var(--cyan)!important;
}


/* ============================================================
   Global correction:
   Hide top app/status bar on all pages
   ============================================================ */

.topbar,
.workspace > .topbar,
.app-shell .topbar{
  display:none!important;
}

/* Remove the vertical space after hiding the top bar. */
.workspace{
  padding-top:0!important;
}

.page-content{
  padding-top:12px!important;
}

/* Keep the entry pages using full available height after hiding the top bar. */
.app-shell:has(.coa-entry-shell) .coa-entry-shell,
.app-shell:has(.aux-entry-shell) .aux-entry-shell,
.app-shell:has(.voucher-entry-shell) .voucher-entry-shell{
  height:calc(100vh - 24px)!important;
  max-height:calc(100vh - 24px)!important;
}

/* Hide any migration/status strip above COA and Auxiliary. */
.app-shell:has(.coa-entry-shell) .fzi-coa-migration-strip,
.app-shell:has(.aux-entry-shell) .fzi-coa-migration-strip,
.app-shell:has(.coa-entry-shell) .accounting-master-data-migration-strip,
.app-shell:has(.aux-entry-shell) .accounting-master-data-migration-strip,
.app-shell:has(.coa-entry-shell) .master-data-migration-strip,
.app-shell:has(.aux-entry-shell) .master-data-migration-strip,
.app-shell:has(.coa-entry-shell) .migration-strip,
.app-shell:has(.aux-entry-shell) .migration-strip{
  display:none!important;
}


/* ============================================================
   Cost Center / Sub Cost Center / Phase / Job Type / Sub Job Type
   Transaction Type - same concept as Chart of Accounts
   ============================================================ */

.app-shell:has(.dimension-entry-shell) .topbar,
.app-shell:has(.transaction-type-entry-shell) .topbar{
  display:none!important;
}

.app-shell:has(.dimension-entry-shell) .page-content{
  max-width:none!important;
  width:100%!important;
  margin:0!important;
  padding:12px 14px!important;
  overflow:visible!important;
}

.dimension-entry-shell{
  height:calc(100vh - 24px)!important;
  min-height:500px!important;
  max-height:calc(100vh - 24px)!important;
  display:grid!important;
  grid-template-columns:520px minmax(0,1fr)!important;
  gap:0!important;
  overflow:hidden!important;
  border:1px solid var(--line)!important;
  border-radius:16px!important;
  background:var(--panel)!important;
}

.dimension-entry-history{
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border-right:1px solid var(--line)!important;
  background:var(--bg-soft)!important;
}

.dimension-entry-history-header{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  padding:14px!important;
  border-bottom:1px solid var(--line)!important;
}

.dimension-entry-history-header strong{
  display:block!important;
  color:var(--text)!important;
  font-size:14px!important;
  font-weight:900!important;
}

.dimension-entry-history-header small{
  display:block!important;
  margin-top:4px!important;
  color:var(--muted)!important;
  font-size:10px!important;
}

.dimension-entry-history-filters{
  flex:0 0 auto!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:8px!important;
  padding:10px!important;
  border-bottom:1px solid var(--line)!important;
}

.dimension-entry-history-filters input{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  padding:0 10px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  outline:0!important;
  font-size:13px!important;
  font-weight:700!important;
}

.dimension-entry-clear-button{
  min-height:38px!important;
  padding:0 12px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--panel)!important;
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:900!important;
  cursor:pointer!important;
}

.dimension-entry-history-columns,
.dimension-entry-history-row{
  display:grid!important;
  grid-template-columns:140px minmax(0,1fr)!important;
  gap:8px!important;
}

.dimension-entry-history-columns{
  flex:0 0 auto!important;
  padding:8px 11px!important;
  border-bottom:1px solid var(--line)!important;
  color:var(--muted)!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.7px!important;
}

.dimension-entry-history-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  overflow-anchor:none!important;
  scroll-behavior:auto!important;
}

.dimension-entry-history-row{
  width:100%!important;
  min-height:44px!important;
  align-items:center!important;
  padding:8px 11px!important;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  background:transparent!important;
  color:var(--text)!important;
  text-align:left!important;
  transform:none!important;
  transition:background .10s ease, box-shadow .10s ease!important;
}

.dimension-entry-history-row strong,
.dimension-entry-history-row span{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

.dimension-entry-history-row strong{
  color:var(--text)!important;
  font-size:13px!important;
  font-weight:900!important;
}

.dimension-entry-history-row span{
  color:var(--muted)!important;
  font-size:12px!important;
  font-weight:700!important;
}

.dimension-entry-history-row.clicked{
  background:rgba(98,228,231,.18)!important;
}

.dimension-entry-history-row:hover,
.dimension-entry-history-row.active,
.dimension-entry-history-row.selected,
.dimension-entry-history-row[aria-current="true"]{
  background:rgba(98,228,231,.09)!important;
  box-shadow:inset 3px 0 0 var(--cyan)!important;
}

.dimension-entry-history-row:focus{
  outline:none!important;
}

.dimension-entry-history-footer{
  flex:0 0 auto!important;
  padding:9px 11px!important;
  border-top:1px solid var(--line)!important;
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:800!important;
}

.dimension-entry-loading,
.dimension-entry-empty{
  padding:18px 12px!important;
  color:var(--muted)!important;
  font-size:12px!important;
  font-weight:800!important;
}

.dimension-entry-empty strong{
  display:block!important;
  color:var(--text)!important;
  font-size:14px!important;
}

.dimension-entry-main{
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}

.dimension-entry-topbar{
  flex:0 0 auto!important;
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) auto 210px!important;
  gap:12px!important;
  align-items:stretch!important;
  padding:14px 16px!important;
  border-bottom:1px solid var(--line)!important;
  background:var(--panel)!important;
}

.dimension-entry-title h1{
  margin:3px 0 4px!important;
  font-size:28px!important;
  line-height:1.15!important;
}

.dimension-entry-title p{
  margin:0!important;
  color:var(--muted)!important;
  font-size:13px!important;
  font-weight:700!important;
}

.dimension-entry-top-tools{
  display:grid!important;
  grid-template-columns:repeat(4,82px)!important;
  gap:8px!important;
  align-items:stretch!important;
}

.dimension-top-tool-button{
  min-height:72px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background:var(--bg-soft)!important;
  color:var(--text)!important;
  font-size:11px!important;
  font-weight:800!important;
}

.dimension-top-tool-button span{
  color:#5d92c8!important;
  font-size:22px!important;
}

.dimension-entry-status-card{
  padding:11px 12px!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background:var(--bg-soft)!important;
}

.dimension-entry-status-card span{
  display:block!important;
  color:var(--muted)!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.8px!important;
}

.dimension-entry-status-card strong{
  display:block!important;
  margin-top:5px!important;
  color:var(--text)!important;
  font-size:18px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

.dimension-entry-status-card small{
  display:block!important;
  margin-top:3px!important;
  color:var(--muted)!important;
  font-size:10px!important;
}

.dimension-entry-card{
  flex:0 0 auto!important;
  margin:14px!important;
  margin-bottom:10px!important;
  padding:18px!important;
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  background:var(--bg-soft)!important;
}

.dimension-entry-fields{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(240px,1fr))!important;
  gap:14px!important;
}

.dimension-entry-fields.two{
  grid-template-columns:240px minmax(320px,1fr)!important;
}

.dimension-entry-field span{
  display:block!important;
  margin-bottom:6px!important;
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:900!important;
  letter-spacing:.7px!important;
}

.dimension-entry-field input,
.dimension-entry-field select{
  width:100%!important;
  height:44px!important;
  padding:0 12px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  outline:0!important;
  font-size:15px!important;
  font-weight:800!important;
}

.dimension-entry-field input[readonly],
.dimension-entry-field select:disabled{
  opacity:.78!important;
  cursor:default!important;
}

.dimension-entry-field small{
  display:block!important;
  margin-top:5px!important;
  color:var(--muted)!important;
  font-size:10px!important;
}

.dimension-entry-note{
  margin-top:14px!important;
  padding:10px 12px!important;
  border:1px dashed var(--line)!important;
  border-radius:10px!important;
  color:var(--muted)!important;
  font-size:12px!important;
  font-weight:700!important;
}

.dimension-entry-main::after{
  content:""!important;
  flex:1 1 auto!important;
  min-height:8px!important;
  pointer-events:none!important;
}

.dimension-entry-actions{
  order:99!important;
  flex:0 0 auto!important;
  margin-top:auto!important;
  position:relative!important;
  z-index:30!important;
  display:grid!important;
  grid-template-columns:repeat(7,minmax(88px,1fr))!important;
  gap:8px!important;
  padding:10px 14px!important;
  border-top:1px solid var(--line)!important;
  background:var(--bg-soft)!important;
  box-shadow:0 -10px 22px rgba(0,0,0,.18)!important;
}

.dimension-entry-actions .voucher-action-button{
  min-height:58px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  border:1px solid var(--line)!important;
  border-radius:9px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  font-size:9px!important;
  font-weight:700!important;
  cursor:pointer!important;
}

.dimension-entry-actions .voucher-action-button span{
  color:#5d92c8!important;
  font-size:22px!important;
}

.dimension-entry-actions .voucher-action-button.save span{
  color:var(--green)!important;
}

.dimension-entry-actions .voucher-action-button.delete span,
.dimension-entry-actions .voucher-action-button.close span{
  color:var(--danger)!important;
}

:root[data-theme="light"] .dimension-entry-history-row.clicked{
  background:#d2f4f8!important;
}

:root[data-theme="light"] .dimension-entry-history-row.active,
:root[data-theme="light"] .dimension-entry-history-row.selected,
:root[data-theme="light"] .dimension-entry-history-row[aria-current="true"]{
  background:#e6f8fa!important;
  box-shadow:inset 3px 0 0 var(--cyan)!important;
}

@media (max-width:1250px){
  .dimension-entry-shell{
    grid-template-columns:430px minmax(0,1fr)!important;
  }

  .dimension-entry-topbar{
    grid-template-columns:1fr!important;
  }

  .dimension-entry-fields,
  .dimension-entry-fields.two{
    grid-template-columns:1fr!important;
  }

  .dimension-entry-actions{
    grid-template-columns:repeat(4,minmax(76px,1fr))!important;
    overflow:auto!important;
  }
}


/* ============================================================
   Dimension pages correction:
   Transaction Type map open + maximize description column
   ============================================================ */

/* Wider left panel like COA/Aux so description has more space. */
.dimension-entry-shell{
  grid-template-columns:610px minmax(0,1fr)!important;
}

/* Keep Code/Number compact and give the rest to Description/Name. */
.dimension-entry-history-columns,
.dimension-entry-history-row{
  grid-template-columns:96px minmax(0,1fr)!important;
}

/* Description column gets the maximum available width. */
.dimension-entry-history-row span{
  min-width:0!important;
  width:100%!important;
}

/* Transaction Type uses same width behavior. */
.transaction-type-entry-shell .dimension-entry-history-columns,
.transaction-type-entry-shell .dimension-entry-history-row{
  grid-template-columns:96px minmax(0,1fr)!important;
}

@media (max-width:1450px){
  .dimension-entry-shell{
    grid-template-columns:560px minmax(0,1fr)!important;
  }

  .dimension-entry-history-columns,
  .dimension-entry-history-row,
  .transaction-type-entry-shell .dimension-entry-history-columns,
  .transaction-type-entry-shell .dimension-entry-history-row{
    grid-template-columns:90px minmax(0,1fr)!important;
  }
}

@media (max-width:1180px){
  .dimension-entry-shell{
    grid-template-columns:460px minmax(0,1fr)!important;
  }

  .dimension-entry-history-columns,
  .dimension-entry-history-row,
  .transaction-type-entry-shell .dimension-entry-history-columns,
  .transaction-type-entry-shell .dimension-entry-history-row{
    grid-template-columns:78px minmax(0,1fr)!important;
  }
}


/* ============================================================
   Dimension pages correction:
   Maximize Description column on the left list
   ============================================================ */

/* Dimension master data pages: Description/Name is now the wide main column,
   small status/code/company column stays compact on the right. */
.dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-columns,
.dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-row{
  grid-template-columns:minmax(0,1fr) 76px!important;
}

/* Make the description column use the full available width. */
.dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-columns span:first-child,
.dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-row strong{
  min-width:0!important;
  width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

/* Keep second column compact for Inactif/Active/Code/Company. */
.dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-columns span:nth-child(2),
.dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-row span{
  min-width:0!important;
  width:76px!important;
  max-width:76px!important;
  text-align:left!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

/* Left panel a little wider so long descriptions like phase/job/cost names are visible. */
.dimension-entry-shell:not(.transaction-type-entry-shell){
  grid-template-columns:650px minmax(0,1fr)!important;
}

/* Transaction Types keep Code compact + Description wide. */
.transaction-type-entry-shell .dimension-entry-history-columns,
.transaction-type-entry-shell .dimension-entry-history-row{
  grid-template-columns:96px minmax(0,1fr)!important;
}

@media (max-width:1450px){
  .dimension-entry-shell:not(.transaction-type-entry-shell){
    grid-template-columns:600px minmax(0,1fr)!important;
  }

  .dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-columns,
  .dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-row{
    grid-template-columns:minmax(0,1fr) 70px!important;
  }

  .dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-columns span:nth-child(2),
  .dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-row span{
    width:70px!important;
    max-width:70px!important;
  }
}

@media (max-width:1180px){
  .dimension-entry-shell:not(.transaction-type-entry-shell){
    grid-template-columns:500px minmax(0,1fr)!important;
  }

  .dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-columns,
  .dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-row{
    grid-template-columns:minmax(0,1fr) 62px!important;
  }

  .dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-columns span:nth-child(2),
  .dimension-entry-shell:not(.transaction-type-entry-shell) .dimension-entry-history-row span{
    width:62px!important;
    max-width:62px!important;
  }
}


/* ============================================================
   Cost Center correction:
   Show Company name on left list and right form
   ============================================================ */

/* Cost Centers: Description takes maximum width and Company remains visible. */
.dimension-entry-costCenters .dimension-entry-history-columns,
.dimension-entry-costCenters .dimension-entry-history-row{
  grid-template-columns:minmax(0,1fr) 185px!important;
}

.dimension-entry-costCenters .dimension-entry-history-columns span:nth-child(2),
.dimension-entry-costCenters .dimension-entry-history-row span{
  width:185px!important;
  max-width:185px!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

/* Slightly wider Cost Center left panel so both Description and Company can show. */
.dimension-entry-costCenters{
  grid-template-columns:700px minmax(0,1fr)!important;
}

/* The Company field on the right is a normal visible readonly text box in View mode. */
.dimension-entry-costCenters .dimension-entry-field input[readonly]{
  color:var(--text)!important;
  opacity:.92!important;
}

@media (max-width:1450px){
  .dimension-entry-costCenters{
    grid-template-columns:640px minmax(0,1fr)!important;
  }

  .dimension-entry-costCenters .dimension-entry-history-columns,
  .dimension-entry-costCenters .dimension-entry-history-row{
    grid-template-columns:minmax(0,1fr) 160px!important;
  }

  .dimension-entry-costCenters .dimension-entry-history-columns span:nth-child(2),
  .dimension-entry-costCenters .dimension-entry-history-row span{
    width:160px!important;
    max-width:160px!important;
  }
}

@media (max-width:1180px){
  .dimension-entry-costCenters{
    grid-template-columns:540px minmax(0,1fr)!important;
  }

  .dimension-entry-costCenters .dimension-entry-history-columns,
  .dimension-entry-costCenters .dimension-entry-history-row{
    grid-template-columns:minmax(0,1fr) 130px!important;
  }

  .dimension-entry-costCenters .dimension-entry-history-columns span:nth-child(2),
  .dimension-entry-costCenters .dimension-entry-history-row span{
    width:130px!important;
    max-width:130px!important;
  }
}


/* ============================================================
   STARTUP LOGIN FIX:
   Restore running login screen and maximize login form
   ============================================================ */

/* The login screen must always be visible before authentication. */
body:has(.login-shell),
html:has(.login-shell){
  width:100%!important;
  min-height:100vh!important;
  overflow:auto!important;
  background:var(--bg)!important;
}

.login-shell{
  display:grid!important;
  grid-template-columns:minmax(440px,40%) minmax(560px,1fr)!important;
  width:100%!important;
  min-height:100vh!important;
  height:100vh!important;
  max-height:none!important;
  overflow:hidden!important;
}

.login-brand-panel{
  display:flex!important;
  min-height:100vh!important;
  padding:64px!important;
}

.login-form-panel{
  display:flex!important;
  min-height:100vh!important;
  align-items:center!important;
  justify-content:center!important;
  padding:38px 58px!important;
}

.login-form-card{
  display:block!important;
  width:min(760px,96%)!important;
  max-width:760px!important;
  min-height:560px!important;
  padding:48px 52px!important;
  border-radius:26px!important;
  visibility:visible!important;
  opacity:1!important;
}

.login-form-heading h2{
  font-size:42px!important;
  line-height:1.05!important;
}

.login-form-heading p{
  font-size:15px!important;
}

.login-form label span{
  font-size:12px!important;
}

.login-input-wrap,
.login-submit{
  min-height:60px!important;
  border-radius:16px!important;
}

.login-input-wrap input{
  min-height:58px!important;
  font-size:17px!important;
}

.login-password-toggle{
  min-height:44px!important;
  min-width:44px!important;
}

.login-submit{
  font-size:17px!important;
  font-weight:900!important;
}

.login-source-status{
  font-size:14px!important;
}

/* Hide the top/status bar only in the authenticated app shell.
   This cannot hide the login page because login has no app-shell. */
.app-shell .topbar,
.app-shell .workspace > .topbar{
  display:none!important;
}

@media (max-width:980px){
  .login-shell{
    grid-template-columns:1fr!important;
    height:auto!important;
    min-height:100vh!important;
    overflow:auto!important;
  }

  .login-brand-panel{
    min-height:auto!important;
    padding:28px!important;
  }

  .login-form-panel{
    min-height:auto!important;
    padding:28px!important;
  }

  .login-form-card{
    width:100%!important;
    min-height:auto!important;
    padding:34px!important;
  }
}


/* ============================================================
   Final correction:
   remove Table/Fields strips and field type labels from ALL forms
   ============================================================ */

/* Remove bottom strips like:
   Table: M4D2024.dbo.phase · Fields: Description, Inactif */
.coa-entry-note,
.aux-entry-note,
.dimension-entry-note,
.accounting-dimension-source,
.accounting-dimension-note,
.master-data-source,
.master-data-note,
.form-source-note,
.form-table-note,
[class*="entry-note"],
[class*="source-note"],
[class*="table-note"]{
  display:none!important;
  visibility:hidden!important;
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
}

/* Remove field type labels like varchar, int, bit, nvarchar. */
.dimension-entry-field small,
.dimension-entry-fields small,
.coa-entry-card small,
.aux-entry-card small,
.master-data-form small,
.accounting-dimension-form small,
.dimension-entry-card label small,
.coa-entry-card label small,
.aux-entry-card label small{
  display:none!important;
  visibility:hidden!important;
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}

/* Close the empty space left by those removed labels/notes. */
.dimension-entry-card,
.coa-entry-card,
.aux-entry-card{
  padding-bottom:18px!important;
}

.dimension-entry-fields,
.coa-entry-fields,
.aux-entry-fields{
  row-gap:14px!important;
}

/* Keep status-card small text visible; hide only note/type text inside forms. */
.dimension-entry-status-card small,
.coa-entry-status-card small,
.aux-entry-status-card small{
  display:block!important;
  visibility:visible!important;
  height:auto!important;
  max-height:none!important;
  margin-top:3px!important;
  overflow:visible!important;
}


/* ============================================================
   Sub Cost Center correction:
   grouped by Cost Center with two filter columns
   ============================================================ */

.subcc-entry-shell{
  grid-template-columns:820px minmax(0,1fr)!important;
}

.subcc-entry-filter-labels,
.subcc-entry-filters,
.subcc-entry-columns,
.subcc-entry-row{
  display:grid!important;
  grid-template-columns:300px minmax(0,1fr)!important;
  gap:8px!important;
}

.subcc-entry-filter-labels{
  flex:0 0 auto!important;
  padding:9px 11px 2px!important;
  color:var(--cyan)!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.7px!important;
  border-bottom:0!important;
}

.subcc-entry-filters{
  flex:0 0 auto!important;
  grid-template-columns:300px minmax(0,1fr) auto!important;
  padding:8px 10px 10px!important;
  border-bottom:1px solid var(--line)!important;
}

.subcc-entry-filters input{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  padding:0 10px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  outline:0!important;
  font-size:13px!important;
  font-weight:700!important;
}

.subcc-entry-filters input:focus{
  border-color:rgba(98,228,231,.45)!important;
  box-shadow:0 0 0 3px rgba(98,228,231,.08)!important;
}

.subcc-entry-group-toolbar{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:8px 10px!important;
  border-bottom:1px solid var(--line)!important;
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:900!important;
}

.subcc-entry-group-toolbar > div{
  display:flex!important;
  gap:6px!important;
}

.subcc-entry-group-button{
  min-height:28px!important;
  padding:0 9px!important;
  border:1px solid var(--line)!important;
  border-radius:8px!important;
  background:var(--panel)!important;
  color:var(--text)!important;
  font-size:10px!important;
  font-weight:800!important;
  cursor:pointer!important;
}

.subcc-entry-group-button:hover{
  border-color:rgba(98,228,231,.45)!important;
  background:rgba(98,228,231,.10)!important;
}

.subcc-entry-columns{
  flex:0 0 auto!important;
  padding:8px 11px!important;
  border-bottom:1px solid var(--line)!important;
  color:var(--muted)!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.7px!important;
}

.subcc-entry-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  overflow-anchor:none!important;
}

.subcc-entry-group{
  border-bottom:1px solid rgba(255,255,255,.04)!important;
}

.subcc-entry-group-header{
  width:100%!important;
  min-height:40px!important;
  display:grid!important;
  grid-template-columns:24px minmax(0,1fr) 54px!important;
  align-items:center!important;
  gap:8px!important;
  padding:8px 10px!important;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  background:rgba(98,228,231,.06)!important;
  color:var(--text)!important;
  text-align:left!important;
  cursor:pointer!important;
}

.subcc-entry-group-header span{
  color:var(--cyan)!important;
  font-size:17px!important;
  font-weight:900!important;
}

.subcc-entry-group-header strong{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:12px!important;
  font-weight:900!important;
  color:var(--text)!important;
}

.subcc-entry-group-header em{
  justify-self:end!important;
  min-width:36px!important;
  padding:3px 7px!important;
  border-radius:999px!important;
  background:var(--panel)!important;
  color:var(--muted)!important;
  font-size:10px!important;
  font-style:normal!important;
  font-weight:900!important;
  text-align:center!important;
}

.subcc-entry-group-body{
  background:transparent!important;
}

.subcc-entry-row{
  width:100%!important;
  min-height:42px!important;
  align-items:center!important;
  padding:7px 11px!important;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  background:transparent!important;
  text-align:left!important;
  color:var(--text)!important;
}

.subcc-entry-row strong,
.subcc-entry-row span{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

.subcc-entry-row strong{
  color:var(--muted)!important;
  font-size:12px!important;
  font-weight:800!important;
}

.subcc-entry-row span{
  color:var(--text)!important;
  font-size:13px!important;
  font-weight:900!important;
}

/* Selected/clicked row same as Journal Voucher, without moving the list. */
.subcc-entry-row.active,
.subcc-entry-row.selected,
.subcc-entry-row[aria-current="true"]{
  background:rgba(98,228,231,.12)!important;
  box-shadow:inset 3px 0 0 var(--cyan)!important;
}

.subcc-entry-row:focus{
  outline:none!important;
}

/* Right form: Cost Center field before Sub Cost Center Description. */
.dimension-entry-form-subCostCenters .dimension-entry-field-cost_center_id,
.dimension-entry-form-subCostCenters .dimension-entry-field-costCenterDescription{
  order:1!important;
}

.dimension-entry-form-subCostCenters .dimension-entry-field-description,
.dimension-entry-form-subCostCenters .dimension-entry-field-sub_cost_center_description,
.dimension-entry-form-subCostCenters .dimension-entry-field-subCostCenterDescription{
  order:2!important;
}

@media (max-width:1450px){
  .subcc-entry-shell{
    grid-template-columns:720px minmax(0,1fr)!important;
  }

  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row{
    grid-template-columns:260px minmax(0,1fr)!important;
  }

  .subcc-entry-filters{
    grid-template-columns:260px minmax(0,1fr) auto!important;
  }
}

@media (max-width:1180px){
  .subcc-entry-shell{
    grid-template-columns:560px minmax(0,1fr)!important;
  }

  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row{
    grid-template-columns:200px minmax(0,1fr)!important;
  }

  .subcc-entry-filters{
    grid-template-columns:200px minmax(0,1fr) auto!important;
  }
}

:root[data-theme="light"] .subcc-entry-group-header{
  background:#eef9fb!important;
}

:root[data-theme="light"] .subcc-entry-row.active,
:root[data-theme="light"] .subcc-entry-row.selected,
:root[data-theme="light"] .subcc-entry-row[aria-current="true"]{
  background:#e6f8fa!important;
  box-shadow:inset 3px 0 0 var(--cyan)!important;
}


/* ============================================================
   Sub Cost Center correction:
   prevent duplicated Cost Center text inside grouped rows
   ============================================================ */

/* Make the child Sub Cost Center Description stand out as the main row value. */
.subcc-entry-row strong{
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:800!important;
}

.subcc-entry-row span{
  color:var(--text)!important;
  font-size:13px!important;
  font-weight:900!important;
}

/* If the description is missing, keep the row visibly different
   instead of repeating the Cost Center value. */
.subcc-entry-row span:empty::after{
  content:"No Sub Cost Center Description";
  color:var(--muted);
  font-weight:700;
}


/* ============================================================
   Restore top application/status bar
   ============================================================ */

/* Show the top bar again on the application pages. */
html body .app-shell .topbar,
html body .workspace > .topbar,
html body .topbar{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  height:auto!important;
  min-height:72px!important;
  max-height:none!important;
  overflow:visible!important;
}

/* Restore the normal workspace spacing under the top bar. */
html body .workspace{
  padding-top:0!important;
}

html body .page-content{
  padding-top:18px!important;
}

/* Keep entry pages fitting with the restored top bar. */
html body .app-shell:has(.coa-entry-shell) .coa-entry-shell,
html body .app-shell:has(.aux-entry-shell) .aux-entry-shell,
html body .app-shell:has(.voucher-entry-shell) .voucher-entry-shell,
html body .app-shell:has(.dimension-entry-shell) .dimension-entry-shell,
html body .app-shell:has(.currency-entry-shell) .currency-entry-shell{
  height:calc(100vh - 112px)!important;
  max-height:calc(100vh - 112px)!important;
  min-height:500px!important;
}

/* Login remains full screen and is not affected by the app top bar. */
html body:has(.login-page) .topbar,
html body:has(.auth-page) .topbar,
html body:has(.login-shell) .topbar,
html body:has([data-login-page]) .topbar{
  display:none!important;
}

/* Keep only the migration/table-fields strips hidden; restore only the top bar. */
.fzi-coa-migration-strip,
.accounting-master-data-migration-strip,
.master-data-migration-strip,
.migration-strip,
.coa-entry-note,
.aux-entry-note,
.dimension-entry-note,
.dimension-entry-field small,
.accounting-dimension-source,
.accounting-dimension-note,
.master-data-source,
.master-data-note,
.form-source-note,
.form-table-note,
[class*="entry-note"],
[class*="source-note"],
[class*="table-note"]{
  display:none!important;
}


/* ============================================================
   Sub Cost Center correction:
   maximize Sub Cost Center column + Print near Close
   ============================================================ */

/* Sub Cost Center left list: Cost Center a little smaller,
   Sub Cost Center Description takes maximum width. */
.subcc-entry-shell{
  grid-template-columns:840px minmax(0,1fr)!important;
}

.subcc-entry-filter-labels,
.subcc-entry-columns,
.subcc-entry-row{
  grid-template-columns:230px minmax(0,1fr)!important;
}

.subcc-entry-filters{
  grid-template-columns:230px minmax(0,1fr) auto!important;
}

.subcc-entry-row strong,
.subcc-entry-row span{
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  justify-self:stretch!important;
  text-align:left!important;
}

.subcc-entry-row span{
  font-size:13px!important;
  font-weight:900!important;
}

/* Keep top tools clean: Print belongs in the bottom bar next to Close. */
.dimension-entry-top-tools [data-dimension-entry-action="print"]{
  display:none!important;
}

/* Bottom Print button uses the same style as the other bottom buttons. */
.dimension-entry-actions .bottom-print-button,
.transaction-type-entry-shell .bottom-print-button,
.currency-entry-shell .bottom-print-button{
  display:flex!important;
  min-height:58px!important;
}

.dimension-entry-actions .bottom-print-button span,
.transaction-type-entry-shell .bottom-print-button span,
.currency-entry-shell .bottom-print-button span{
  color:#5d92c8!important;
  font-size:22px!important;
}

/* Bottom bar has one extra button now: New/Edit/Save/Delete/Cancel/Refresh/Print/Close. */
.dimension-entry-actions{
  grid-template-columns:repeat(8,minmax(82px,1fr))!important;
}

@media (max-width:1450px){
  .subcc-entry-shell{
    grid-template-columns:760px minmax(0,1fr)!important;
  }

  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row{
    grid-template-columns:210px minmax(0,1fr)!important;
  }

  .subcc-entry-filters{
    grid-template-columns:210px minmax(0,1fr) auto!important;
  }
}

@media (max-width:1180px){
  .subcc-entry-shell{
    grid-template-columns:590px minmax(0,1fr)!important;
  }

  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row{
    grid-template-columns:170px minmax(0,1fr)!important;
  }

  .subcc-entry-filters{
    grid-template-columns:170px minmax(0,1fr) auto!important;
  }

  .dimension-entry-actions{
    grid-template-columns:repeat(4,minmax(78px,1fr))!important;
    overflow:auto!important;
  }
}


/* ============================================================
   Left list column separators:
   visible separators + draggable resize handles
   ============================================================ */

.left-list-resizable-header{
  position:relative!important;
}

/* Stronger visible separators between left-list columns. */
.coa-entry-history-columns > span + span,
.coa-entry-history-row > * + *,
.coa-entry-history-filters.split > * + *,
.aux-entry-history-columns > span + span,
.aux-entry-history-row > * + *,
.aux-entry-history-filters > * + *,
.dimension-entry-history-columns > span + span,
.dimension-entry-history-row > * + *,
.dimension-entry-history-filters > * + *,
.subcc-entry-filter-labels > span + span,
.subcc-entry-filters > * + *,
.subcc-entry-columns > span + span,
.subcc-entry-row > * + *,
.voucher-history-column-titles > span + span,
.voucher-history-column-filters > * + *,
.voucher-entry-history-row > * + *{
  border-left:1px solid rgba(148,163,184,.25)!important;
  padding-left:10px!important;
}

/* The draggable separator shown in the column header. */
.left-list-column-resizer{
  position:absolute!important;
  top:0!important;
  bottom:0!important;
  width:12px!important;
  margin-left:-6px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:
    linear-gradient(
      to right,
      transparent 0,
      transparent 5px,
      rgba(98,228,231,.75) 5px,
      rgba(98,228,231,.75) 7px,
      transparent 7px,
      transparent 100%
    )!important;
  cursor:col-resize!important;
  z-index:50!important;
  opacity:.48!important;
}

.left-list-column-resizer:hover,
.left-list-column-resizer:focus{
  opacity:1!important;
  outline:0!important;
  background:
    linear-gradient(
      to right,
      transparent 0,
      transparent 4px,
      var(--cyan) 4px,
      var(--cyan) 8px,
      transparent 8px,
      transparent 100%
    )!important;
}

body.resizing-left-list-column,
body.resizing-left-list-column *{
  cursor:col-resize!important;
  user-select:none!important;
}

/* Sub Cost Center: reduce Cost Center column and maximize Sub Cost Center Description. */
.subcc-entry-shell{
  grid-template-columns:minmax(860px,54vw) minmax(0,1fr)!important;
}

.subcc-entry-filter-labels,
.subcc-entry-columns,
.subcc-entry-row{
  grid-template-columns:150px minmax(0,1fr)!important;
}

.subcc-entry-filters{
  grid-template-columns:150px minmax(0,1fr) auto!important;
}

.subcc-entry-row strong{
  font-size:10px!important;
  font-weight:800!important;
  color:var(--muted)!important;
}

.subcc-entry-row span{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  justify-self:stretch!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:13px!important;
  font-weight:900!important;
  color:var(--text)!important;
}

/* Keep the sub cost center child description visually dominant. */
.subcc-entry-columns span:nth-child(2),
.subcc-entry-filter-labels span:nth-child(2){
  color:var(--cyan)!important;
}

/* Better column widths for normal 2-column master lists after resizer is added. */
.coa-entry-history-columns,
.coa-entry-history-filters.split,
.coa-entry-history-row{
  grid-template-columns:110px minmax(0,1fr)!important;
}

.aux-entry-history-columns,
.aux-entry-history-filters,
.aux-entry-history-row{
  grid-template-columns:105px 82px minmax(0,1fr)!important;
}

.transaction-type-entry-shell .dimension-entry-history-columns,
.transaction-type-entry-shell .dimension-entry-history-row,
.transaction-type-entry-shell .dimension-entry-history-filters,
.currency-entry-shell .dimension-entry-history-columns,
.currency-entry-shell .dimension-entry-history-row,
.currency-entry-shell .dimension-entry-history-filters{
  grid-template-columns:96px minmax(0,1fr) auto!important;
}

/* Header/row grids have no Clear button; keep them exactly two columns. */
.transaction-type-entry-shell .dimension-entry-history-columns,
.transaction-type-entry-shell .dimension-entry-history-row,
.currency-entry-shell .dimension-entry-history-columns,
.currency-entry-shell .dimension-entry-history-row{
  grid-template-columns:96px minmax(0,1fr)!important;
}

/* Journal Voucher transaction list now also has visible separators. */
.voucher-history-column-titles,
.voucher-history-column-filters,
.voucher-entry-history-row{
  grid-template-columns:54px 68px minmax(0,1fr) 72px 70px!important;
}

@media (max-width:1450px){
  .subcc-entry-shell{
    grid-template-columns:minmax(760px,55vw) minmax(0,1fr)!important;
  }

  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row{
    grid-template-columns:140px minmax(0,1fr)!important;
  }

  .subcc-entry-filters{
    grid-template-columns:140px minmax(0,1fr) auto!important;
  }
}

@media (max-width:1180px){
  .subcc-entry-shell{
    grid-template-columns:minmax(600px,58vw) minmax(0,1fr)!important;
  }

  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row{
    grid-template-columns:120px minmax(0,1fr)!important;
  }

  .subcc-entry-filters{
    grid-template-columns:120px minmax(0,1fr) auto!important;
  }
}


/* ============================================================
   Column resize correction:
   make separators follow the columns exactly
   ============================================================ */

/* Use v2 grid widths; Sub Cost Center description is the wide column by default. */
.subcc-entry-shell{
  grid-template-columns:minmax(880px,56vw) minmax(0,1fr)!important;
}

.subcc-entry-filter-labels,
.subcc-entry-columns,
.subcc-entry-row{
  grid-template-columns:120px minmax(560px,1fr)!important;
}

.subcc-entry-filters{
  grid-template-columns:120px minmax(560px,1fr) auto!important;
}

/* Keep every row and filter obeying inline important width changes. */
.left-list-resizable-root .coa-entry-history-columns,
.left-list-resizable-root .coa-entry-history-row,
.left-list-resizable-root .coa-entry-history-filters,
.left-list-resizable-root .aux-entry-history-columns,
.left-list-resizable-root .aux-entry-history-row,
.left-list-resizable-root .aux-entry-history-filters,
.left-list-resizable-root .dimension-entry-history-columns,
.left-list-resizable-root .dimension-entry-history-row,
.left-list-resizable-root .dimension-entry-history-filters,
.left-list-resizable-root .subcc-entry-filter-labels,
.left-list-resizable-root .subcc-entry-columns,
.left-list-resizable-root .subcc-entry-row,
.left-list-resizable-root .subcc-entry-filters,
.left-list-resizable-root .voucher-history-column-titles,
.left-list-resizable-root .voucher-history-column-filters,
.left-list-resizable-root .voucher-entry-history-row{
  column-gap:8px!important;
}

/* Resizer line sits above the real column boundary and columns follow it. */
.left-list-column-resizer{
  pointer-events:auto!important;
  touch-action:none!important;
  z-index:80!important;
}

/* Sub Cost Center text: second column gets the visual priority. */
.subcc-entry-row strong{
  font-size:10px!important;
  max-width:120px!important;
}

.subcc-entry-row span{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  color:var(--text)!important;
  font-size:13px!important;
  font-weight:900!important;
}

@media (max-width:1450px){
  .subcc-entry-shell{
    grid-template-columns:minmax(780px,56vw) minmax(0,1fr)!important;
  }

  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row{
    grid-template-columns:115px minmax(480px,1fr)!important;
  }

  .subcc-entry-filters{
    grid-template-columns:115px minmax(480px,1fr) auto!important;
  }
}

@media (max-width:1180px){
  .subcc-entry-shell{
    grid-template-columns:minmax(640px,58vw) minmax(0,1fr)!important;
  }

  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row{
    grid-template-columns:100px minmax(360px,1fr)!important;
  }

  .subcc-entry-filters{
    grid-template-columns:100px minmax(360px,1fr) auto!important;
  }
}


/* ============================================================
   Final layout correction:
   restore top Light/Dark bar and remove bottom empty space
   ============================================================ */

:root{
  --avalanche-topbar-height:72px;
  --avalanche-page-gap:8px;
}

/* Force the project top bar back on application pages.
   This overrides the older "hide topbar" rules. */
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .topbar,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .workspace > .topbar,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .topbar{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  position:relative!important;
  z-index:100!important;
  flex:0 0 var(--avalanche-topbar-height)!important;
  height:var(--avalanche-topbar-height)!important;
  min-height:var(--avalanche-topbar-height)!important;
  max-height:var(--avalanche-topbar-height)!important;
  overflow:visible!important;
}

/* Keep login fullscreen without the application bar. */
html body:has(.login-page) .topbar,
html body:has(.auth-page) .topbar,
html body:has(.login-shell) .topbar,
html body:has([data-login-page]) .topbar{
  display:none!important;
}

/* Make the main project area a real vertical layout:
   topbar + page content = full browser height. */
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .workspace{
  min-height:100vh!important;
  height:100vh!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  padding-top:0!important;
}

html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:var(--avalanche-page-gap) var(--avalanche-page-gap) 0 var(--avalanche-page-gap)!important;
  overflow:hidden!important;
}

/* Entry forms must fill the remaining visible page.
   This removes the black/empty space under the buttons. */
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .coa-entry-shell,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .aux-entry-shell,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .voucher-entry-shell,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .dimension-entry-shell,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .currency-entry-shell,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .transaction-type-entry-shell{
  height:calc(100vh - var(--avalanche-topbar-height) - var(--avalanche-page-gap))!important;
  max-height:calc(100vh - var(--avalanche-topbar-height) - var(--avalanche-page-gap))!important;
  min-height:0!important;
  margin:0!important;
  overflow:hidden!important;
}

/* The left and right panels fill the entry shell to the bottom. */
.coa-entry-history,
.aux-entry-history,
.voucher-entry-history,
.dimension-entry-history,
.dimension-entry-main,
.coa-entry-main,
.aux-entry-main,
.voucher-entry-main{
  min-height:0!important;
  height:100%!important;
}

/* Lists should use internal scrolling, not leave empty page space below. */
.coa-entry-history-list,
.aux-entry-history-list,
.voucher-entry-history-list,
.dimension-entry-history-list,
.subcc-entry-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
}

/* Bottom action bars stay at the bottom of the form. */
.coa-entry-actions,
.aux-entry-actions,
.voucher-entry-actions,
.dimension-entry-actions{
  flex:0 0 auto!important;
  margin-top:auto!important;
  position:relative!important;
  bottom:auto!important;
}

/* Keep Accounting Map and other non-entry pages readable with restored top bar. */
.accounting-map-page{
  min-height:calc(100vh - var(--avalanche-topbar-height) - 24px)!important;
}

/* Keep the removed strips hidden. */
.coa-entry-note,
.aux-entry-note,
.dimension-entry-note,
.dimension-entry-field small,
.accounting-dimension-source,
.accounting-dimension-note,
.master-data-source,
.master-data-note,
.form-source-note,
.form-table-note,
[class*="entry-note"],
[class*="source-note"],
[class*="table-note"],
.fzi-coa-migration-strip,
.accounting-master-data-migration-strip,
.master-data-migration-strip,
.migration-strip{
  display:none!important;
}


/* ============================================================
   Final correction:
   align draggable separators and shrink bottom by 0.5 cm
   ============================================================ */

:root{
  --avalanche-bottom-gap:0.5cm;
}

/* Make column separators line up exactly on all left-list grids.
   The border belongs to the second column, while the draggable handle
   is positioned by JavaScript on that same boundary. */
.coa-entry-history-columns > span + span,
.coa-entry-history-row > * + *,
.coa-entry-history-filters.split > * + *,
.aux-entry-history-columns > span + span,
.aux-entry-history-row > * + *,
.aux-entry-history-filters > * + *,
.dimension-entry-history-columns > span + span,
.dimension-entry-history-row > * + *,
.dimension-entry-history-filters > * + *,
.subcc-entry-filter-labels > span + span,
.subcc-entry-filters > * + *,
.subcc-entry-columns > span + span,
.subcc-entry-row > * + *,
.voucher-history-column-titles > span + span,
.voucher-history-column-filters > * + *,
.voucher-entry-history-row > * + *{
  border-left:1px solid rgba(98,228,231,.32)!important;
  padding-left:10px!important;
}

/* Do not let the resize handle add layout width; it is only an overlay. */
.left-list-resizable-header{
  position:relative!important;
  isolation:isolate!important;
}

.left-list-column-resizer{
  position:absolute!important;
  top:0!important;
  bottom:0!important;
  width:14px!important;
  margin-left:-7px!important;
  z-index:200!important;
  pointer-events:auto!important;
  touch-action:none!important;
}

/* Shrink every entry form from the bottom by around 0.5 cm,
   leaving a small clean gap below the bottom button bar. */
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content{
  padding-bottom:var(--avalanche-bottom-gap)!important;
}

html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .coa-entry-shell,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .aux-entry-shell,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .voucher-entry-shell,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .dimension-entry-shell,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .currency-entry-shell,
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .app-shell .transaction-type-entry-shell{
  height:calc(100vh - var(--avalanche-topbar-height) - var(--avalanche-page-gap) - var(--avalanche-bottom-gap))!important;
  max-height:calc(100vh - var(--avalanche-topbar-height) - var(--avalanche-page-gap) - var(--avalanche-bottom-gap))!important;
}

/* Keep the bottom actions inside the smaller page height. */
.coa-entry-actions,
.aux-entry-actions,
.voucher-entry-actions,
.dimension-entry-actions{
  margin-bottom:0!important;
}


/* ============================================================
   Final column text correction:
   no ellipsis + middle separators on requested lists
   ============================================================ */

/* Cost Center list: Company first, Cost Center Description second. */
.dimension-entry-costCenters:not(.subcc-entry-shell){
  grid-template-columns:minmax(800px,52vw) minmax(0,1fr)!important;
}

.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns,
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row{
  grid-template-columns:minmax(320px,1fr) minmax(320px,1fr)!important;
}

.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-filters{
  grid-template-columns:minmax(320px,1fr) minmax(320px,1fr) auto!important;
}

/* Sub Cost Center list: separator in the middle and Sub Cost Center Description gets real space. */
.subcc-entry-shell{
  grid-template-columns:minmax(880px,54vw) minmax(0,1fr)!important;
}

.subcc-entry-filter-labels,
.subcc-entry-columns,
.subcc-entry-row{
  grid-template-columns:minmax(340px,1fr) minmax(340px,1fr)!important;
}

.subcc-entry-filters{
  grid-template-columns:minmax(340px,1fr) minmax(340px,1fr) auto!important;
}

/* Sub Job Type list: Job Type first, Sub Job Type Description second with wide text. */
.dimension-entry-subJobTypes{
  grid-template-columns:minmax(820px,52vw) minmax(0,1fr)!important;
}

.dimension-entry-subJobTypes .dimension-entry-history-columns,
.dimension-entry-subJobTypes .dimension-entry-history-row{
  grid-template-columns:minmax(340px,1fr) minmax(340px,1fr)!important;
}

.dimension-entry-subJobTypes .dimension-entry-history-filters{
  grid-template-columns:minmax(340px,1fr) minmax(340px,1fr) auto!important;
}

/* Show full descriptions: no three dots on these pages. */
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row,
.subcc-entry-row,
.dimension-entry-subJobTypes .dimension-entry-history-row{
  min-height:44px!important;
  height:auto!important;
  align-items:start!important;
}

.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row strong,
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row span,
.subcc-entry-row strong,
.subcc-entry-row span,
.dimension-entry-subJobTypes .dimension-entry-history-row strong,
.dimension-entry-subJobTypes .dimension-entry-history-row span{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  line-height:1.35!important;
  padding-top:3px!important;
  padding-bottom:3px!important;
}

/* Make the second description columns strong and readable. */
.subcc-entry-row span,
.dimension-entry-subJobTypes .dimension-entry-history-row span,
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row span{
  color:var(--text)!important;
  font-size:13px!important;
  font-weight:900!important;
}

/* Keep the real separator exactly between the two large columns. */
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns > span + span,
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row > * + *,
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-filters > * + *,
.subcc-entry-filter-labels > span + span,
.subcc-entry-columns > span + span,
.subcc-entry-row > * + *,
.subcc-entry-filters > * + *,
.dimension-entry-subJobTypes .dimension-entry-history-columns > span + span,
.dimension-entry-subJobTypes .dimension-entry-history-row > * + *,
.dimension-entry-subJobTypes .dimension-entry-history-filters > * + *{
  border-left:1px solid rgba(98,228,231,.42)!important;
  padding-left:12px!important;
}

/* Old rules made Sub Cost Center first column too small; override them. */
.subcc-entry-row strong{
  max-width:none!important;
}

/* Headers stay on one line where possible, values can wrap. */
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns span,
.subcc-entry-columns span,
.subcc-entry-filter-labels span,
.dimension-entry-subJobTypes .dimension-entry-history-columns span{
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:clip!important;
}

/* Filters should not be squeezed. */
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-filters input,
.subcc-entry-filters input,
.dimension-entry-subJobTypes .dimension-entry-history-filters input{
  min-width:0!important;
  width:100%!important;
}

/* Middle separator default on smaller screens. */
@media (max-width:1450px){
  .dimension-entry-costCenters:not(.subcc-entry-shell),
  .dimension-entry-subJobTypes{
    grid-template-columns:minmax(720px,54vw) minmax(0,1fr)!important;
  }

  .subcc-entry-shell{
    grid-template-columns:minmax(760px,54vw) minmax(0,1fr)!important;
  }

  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns,
  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row,
  .dimension-entry-subJobTypes .dimension-entry-history-columns,
  .dimension-entry-subJobTypes .dimension-entry-history-row,
  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row{
    grid-template-columns:minmax(280px,1fr) minmax(280px,1fr)!important;
  }

  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-filters,
  .dimension-entry-subJobTypes .dimension-entry-history-filters,
  .subcc-entry-filters{
    grid-template-columns:minmax(280px,1fr) minmax(280px,1fr) auto!important;
  }
}

@media (max-width:1180px){
  .dimension-entry-costCenters:not(.subcc-entry-shell),
  .dimension-entry-subJobTypes,
  .subcc-entry-shell{
    grid-template-columns:minmax(620px,58vw) minmax(0,1fr)!important;
  }

  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns,
  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row,
  .dimension-entry-subJobTypes .dimension-entry-history-columns,
  .dimension-entry-subJobTypes .dimension-entry-history-row,
  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row{
    grid-template-columns:minmax(230px,1fr) minmax(230px,1fr)!important;
  }

  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-filters,
  .dimension-entry-subJobTypes .dimension-entry-history-filters,
  .subcc-entry-filters{
    grid-template-columns:minmax(230px,1fr) minmax(230px,1fr) auto!important;
  }
}


/* ============================================================
   Final full description display:
   remove all three-dot truncation from requested left lists
   ============================================================ */

/* Give these pages enough left width. */
.subcc-entry-shell{
  grid-template-columns:minmax(980px,60vw) minmax(0,1fr)!important;
}

.dimension-entry-subJobTypes,
.dimension-entry-costCenters:not(.subcc-entry-shell){
  grid-template-columns:minmax(940px,58vw) minmax(0,1fr)!important;
}

/* Put the separator around the middle and give both columns real width. */
.subcc-entry-filter-labels,
.subcc-entry-columns,
.subcc-entry-row,
.dimension-entry-subJobTypes .dimension-entry-history-columns,
.dimension-entry-subJobTypes .dimension-entry-history-row,
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns,
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row{
  grid-template-columns:minmax(430px,1fr) minmax(430px,1fr)!important;
}

.subcc-entry-filters,
.dimension-entry-subJobTypes .dimension-entry-history-filters,
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-filters{
  grid-template-columns:minmax(430px,1fr) minmax(430px,1fr) auto!important;
}

/* Strong override against every previous ellipsis rule. */
html body .subcc-entry-row,
html body .dimension-entry-subJobTypes .dimension-entry-history-row,
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row{
  height:auto!important;
  min-height:48px!important;
  max-height:none!important;
  align-items:start!important;
  overflow:visible!important;
  white-space:normal!important;
}

html body .subcc-entry-row strong,
html body .subcc-entry-row span,
html body .dimension-entry-subJobTypes .dimension-entry-history-row strong,
html body .dimension-entry-subJobTypes .dimension-entry-history-row span,
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row strong,
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row span{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:auto!important;
  max-height:none!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.35!important;
  padding-top:4px!important;
  padding-bottom:4px!important;
}

/* Remove previous forced tiny Cost Center/Sub Cost Center cells. */
html body .subcc-entry-row strong,
html body .subcc-entry-row span{
  max-width:none!important;
}

/* Full description values should be visually readable. */
html body .subcc-entry-row span,
html body .dimension-entry-subJobTypes .dimension-entry-history-row span,
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row span{
  color:var(--text)!important;
  font-size:13px!important;
  font-weight:900!important;
}

/* Headers and filters stay single-line; data rows wrap. */
html body .subcc-entry-columns span,
html body .subcc-entry-filter-labels span,
html body .dimension-entry-subJobTypes .dimension-entry-history-columns span,
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns span{
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* The separator remains in the middle on these pages. */
html body .subcc-entry-row > * + *,
html body .subcc-entry-columns > span + span,
html body .subcc-entry-filter-labels > span + span,
html body .subcc-entry-filters > * + *,
html body .dimension-entry-subJobTypes .dimension-entry-history-row > * + *,
html body .dimension-entry-subJobTypes .dimension-entry-history-columns > span + span,
html body .dimension-entry-subJobTypes .dimension-entry-history-filters > * + *,
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row > * + *,
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns > span + span,
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-filters > * + *{
  border-left:1px solid rgba(98,228,231,.45)!important;
  padding-left:12px!important;
}

/* Keep selected rows readable when they wrap to multiple lines. */
html body .subcc-entry-row.active,
html body .subcc-entry-row.selected,
html body .subcc-entry-row[aria-current="true"],
html body .dimension-entry-subJobTypes .dimension-entry-history-row.active,
html body .dimension-entry-subJobTypes .dimension-entry-history-row.selected,
html body .dimension-entry-subJobTypes .dimension-entry-history-row[aria-current="true"],
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row.active,
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row.selected,
html body .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row[aria-current="true"]{
  background:rgba(98,228,231,.14)!important;
  box-shadow:inset 4px 0 0 var(--cyan)!important;
}

/* On medium screens still use both columns, but keep text wrapping. */
@media (max-width:1450px){
  .subcc-entry-shell,
  .dimension-entry-subJobTypes,
  .dimension-entry-costCenters:not(.subcc-entry-shell){
    grid-template-columns:minmax(860px,60vw) minmax(0,1fr)!important;
  }

  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row,
  .dimension-entry-subJobTypes .dimension-entry-history-columns,
  .dimension-entry-subJobTypes .dimension-entry-history-row,
  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns,
  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row{
    grid-template-columns:minmax(380px,1fr) minmax(380px,1fr)!important;
  }

  .subcc-entry-filters,
  .dimension-entry-subJobTypes .dimension-entry-history-filters,
  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-filters{
    grid-template-columns:minmax(380px,1fr) minmax(380px,1fr) auto!important;
  }
}

@media (max-width:1180px){
  .subcc-entry-shell,
  .dimension-entry-subJobTypes,
  .dimension-entry-costCenters:not(.subcc-entry-shell){
    grid-template-columns:minmax(700px,64vw) minmax(0,1fr)!important;
  }

  .subcc-entry-filter-labels,
  .subcc-entry-columns,
  .subcc-entry-row,
  .dimension-entry-subJobTypes .dimension-entry-history-columns,
  .dimension-entry-subJobTypes .dimension-entry-history-row,
  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns,
  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row{
    grid-template-columns:minmax(300px,1fr) minmax(300px,1fr)!important;
  }

  .subcc-entry-filters,
  .dimension-entry-subJobTypes .dimension-entry-history-filters,
  .dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-filters{
    grid-template-columns:minmax(300px,1fr) minmax(300px,1fr) auto!important;
  }
}


/* ============================================================
   Final left-list local scroll fix:
   keep right page size stable and scroll inside the left list
   ============================================================ */

/* Keep the right form width stable by using moderate left-panel widths again. */
.dimension-entry-costCenters:not(.subcc-entry-shell),
.dimension-entry-subJobTypes,
.dimension-entry-jobTypes,
.dimension-entry-phases,
.transaction-type-entry-shell,
.currency-entry-shell,
.dimension-entry-shell:not(.subcc-entry-shell):not(.transaction-type-entry-shell):not(.currency-entry-shell):not(.dimension-entry-costCenters):not(.dimension-entry-subJobTypes):not(.dimension-entry-jobTypes):not(.dimension-entry-phases){
  grid-template-columns:minmax(620px,40vw) minmax(0,1fr)!important;
}

.subcc-entry-shell{
  grid-template-columns:minmax(650px,42vw) minmax(0,1fr)!important;
}

@media (max-width:1450px){
  .dimension-entry-costCenters:not(.subcc-entry-shell),
  .dimension-entry-subJobTypes,
  .dimension-entry-jobTypes,
  .dimension-entry-phases,
  .transaction-type-entry-shell,
  .currency-entry-shell,
  .dimension-entry-shell:not(.subcc-entry-shell):not(.transaction-type-entry-shell):not(.currency-entry-shell):not(.dimension-entry-costCenters):not(.dimension-entry-subJobTypes):not(.dimension-entry-jobTypes):not(.dimension-entry-phases){
    grid-template-columns:minmax(560px,40vw) minmax(0,1fr)!important;
  }

  .subcc-entry-shell{
    grid-template-columns:minmax(590px,42vw) minmax(0,1fr)!important;
  }
}

@media (max-width:1180px){
  .dimension-entry-costCenters:not(.subcc-entry-shell),
  .dimension-entry-subJobTypes,
  .dimension-entry-jobTypes,
  .dimension-entry-phases,
  .transaction-type-entry-shell,
  .currency-entry-shell,
  .dimension-entry-shell:not(.subcc-entry-shell):not(.transaction-type-entry-shell):not(.currency-entry-shell):not(.dimension-entry-costCenters):not(.dimension-entry-subJobTypes):not(.dimension-entry-jobTypes):not(.dimension-entry-phases){
    grid-template-columns:minmax(500px,44vw) minmax(0,1fr)!important;
  }

  .subcc-entry-shell{
    grid-template-columns:minmax(520px,45vw) minmax(0,1fr)!important;
  }
}

/* The left lists themselves get their own scrollbars instead of enlarging the page. */
.coa-entry-history-list,
.aux-entry-history-list,
.dimension-entry-history-list,
.subcc-entry-list,
.voucher-entry-history{
  overflow-x:auto!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable both-edges!important;
}

/* Cost Center: Company first, Description second, wide description inside the list only. */
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns,
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row{
  width:max-content!important;
  min-width:980px!important;
  grid-template-columns:180px minmax(760px,1fr)!important;
}

.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-filters{
  width:max-content!important;
  min-width:1060px!important;
  grid-template-columns:180px minmax(760px,1fr) auto!important;
}

.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns span:first-child,
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row strong{
  width:180px!important;
  min-width:180px!important;
  max-width:180px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-columns span:nth-child(2),
.dimension-entry-costCenters:not(.subcc-entry-shell) .dimension-entry-history-row span{
  width:100%!important;
  min-width:760px!important;
  max-width:none!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* Sub Cost Center: wide Sub Cost Center Description, horizontal scroll when needed. */
.subcc-entry-filter-labels,
.subcc-entry-columns,
.subcc-entry-row{
  width:max-content!important;
  min-width:980px!important;
  grid-template-columns:280px minmax(680px,1fr)!important;
}

.subcc-entry-filters{
  width:max-content!important;
  min-width:1060px!important;
  grid-template-columns:280px minmax(680px,1fr) auto!important;
}

.subcc-entry-row strong,
.subcc-entry-row span{
  max-width:none!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

.subcc-entry-row strong{
  width:280px!important;
  min-width:280px!important;
  max-width:280px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.subcc-entry-row span{
  width:100%!important;
  min-width:680px!important;
}

/* Sub Job Type: Job Type first, Sub Job Type description second, both inside list scroll area. */
.dimension-entry-subJobTypes .dimension-entry-history-columns,
.dimension-entry-subJobTypes .dimension-entry-history-row{
  width:max-content!important;
  min-width:980px!important;
  grid-template-columns:360px minmax(600px,1fr)!important;
}

.dimension-entry-subJobTypes .dimension-entry-history-filters{
  width:max-content!important;
  min-width:1060px!important;
  grid-template-columns:360px minmax(600px,1fr) auto!important;
}

.dimension-entry-subJobTypes .dimension-entry-history-row strong{
  width:360px!important;
  min-width:360px!important;
  max-width:360px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.dimension-entry-subJobTypes .dimension-entry-history-row span,
.dimension-entry-subJobTypes .dimension-entry-history-columns span:nth-child(2){
  width:100%!important;
  min-width:600px!important;
  max-width:none!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* Other dimension pages: keep wide description inside the list with local horizontal scroll. */
.dimension-entry-shell:not(.subcc-entry-shell):not(.dimension-entry-costCenters):not(.dimension-entry-subJobTypes) .dimension-entry-history-columns,
.dimension-entry-shell:not(.subcc-entry-shell):not(.dimension-entry-costCenters):not(.dimension-entry-subJobTypes) .dimension-entry-history-row,
.transaction-type-entry-shell .dimension-entry-history-columns,
.transaction-type-entry-shell .dimension-entry-history-row,
.currency-entry-shell .dimension-entry-history-columns,
.currency-entry-shell .dimension-entry-history-row{
  width:max-content!important;
  min-width:860px!important;
}

.dimension-entry-shell:not(.subcc-entry-shell):not(.dimension-entry-costCenters):not(.dimension-entry-subJobTypes) .dimension-entry-history-filters,
.transaction-type-entry-shell .dimension-entry-history-filters,
.currency-entry-shell .dimension-entry-history-filters{
  width:max-content!important;
  min-width:940px!important;
}

.dimension-entry-shell:not(.subcc-entry-shell):not(.dimension-entry-costCenters):not(.dimension-entry-subJobTypes) .dimension-entry-history-row strong,
.dimension-entry-shell:not(.subcc-entry-shell):not(.dimension-entry-costCenters):not(.dimension-entry-subJobTypes) .dimension-entry-history-row span,
.transaction-type-entry-shell .dimension-entry-history-row strong,
.transaction-type-entry-shell .dimension-entry-history-row span,
.currency-entry-shell .dimension-entry-history-row strong,
.currency-entry-shell .dimension-entry-history-row span{
  white-space:nowrap!important;
}

/* COA and Auxiliary: same idea, scroll inside the list, do not enlarge the page. */
.coa-entry-history-columns,
.coa-entry-history-row,
.coa-entry-history-filters.split{
  width:max-content!important;
  min-width:820px!important;
}

.aux-entry-history-columns,
.aux-entry-history-row,
.aux-entry-history-filters{
  width:max-content!important;
  min-width:920px!important;
}

/* Keep resizer lines aligned while the list scrolls horizontally. */
.left-list-resizable-header{
  position:relative!important;
  overflow:visible!important;
}


/* ============================================================
   Journal Voucher correction:
   ONE left scroll area for GROUP / TYPE / COMPANY / DATE / NUMBER
   ============================================================ */

/* The outer left panel itself must never create a second scrollbar. */
html body .voucher-entry-history{
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
}

/* Single scroll owner: titles + filters + all transaction rows. */
html body .voucher-history-scroll-area{
  flex:1 1 auto!important;
  min-height:0!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
  position:relative!important;
}

/* Keep the column headings and filters visible while vertically scrolling.
   They still move together with the rows when scrolling horizontally. */
html body .voucher-history-scroll-area .voucher-entry-history-grid-head{
  position:sticky!important;
  top:0!important;
  z-index:25!important;
  width:100%!important;
  min-width:640px!important;
  box-sizing:border-box!important;
  background:var(--bg-soft)!important;
}

/* The row list no longer owns any scrollbar. */
html body .voucher-history-scroll-area .voucher-entry-history-list{
  flex:none!important;
  height:auto!important;
  min-height:0!important;
  width:100%!important;
  min-width:640px!important;
  overflow:visible!important;
  scrollbar-width:none!important;
}

html body .voucher-history-scroll-area .voucher-entry-history-list::-webkit-scrollbar{
  display:none!important;
  width:0!important;
  height:0!important;
}

/* All five columns are inside the same horizontal canvas. */
html body .voucher-history-scroll-area .voucher-history-column-titles,
html body .voucher-history-scroll-area .voucher-history-column-filters,
html body .voucher-history-scroll-area .voucher-entry-history-row{
  width:100%!important;
  min-width:640px!important;
  box-sizing:border-box!important;
}

/* Make every column visible through the one shared horizontal scrollbar. */
html body .voucher-history-scroll-area .voucher-history-column-titles,
html body .voucher-history-scroll-area .voucher-history-column-filters,
html body .voucher-history-scroll-area .voucher-entry-history-row{
  grid-template-columns:62px 86px minmax(220px,1fr) 110px 84px!important;
  gap:6px!important;
}

/* Prevent old late rules from re-introducing a scrollbar on the aside/list. */
html body .left-list-resizable-root.voucher-entry-history{
  overflow:hidden!important;
}

html body .left-list-resizable-root.voucher-entry-history .voucher-entry-history-list{
  overflow:visible!important;
}

/* Light theme sticky header. */
:root[data-theme="light"] .voucher-history-scroll-area .voucher-entry-history-grid-head{
  background:#f5f8fa!important;
}


/* ============================================================
   Journal Voucher separator correction V3:
   one exact separator line for titles, filters and rows
   ============================================================ */

html body .voucher-history-scroll-area .voucher-history-column-titles,
html body .voucher-history-scroll-area .voucher-history-column-filters,
html body .voucher-history-scroll-area .voucher-entry-history-row{
  column-gap:6px!important;
  row-gap:0!important;
}

/* One separator style in every JV row/header/filter. */
html body .voucher-history-scroll-area .voucher-history-column-titles > span,
html body .voucher-history-scroll-area .voucher-history-column-filters > *,
html body .voucher-history-scroll-area .voucher-entry-history-row > *{
  box-sizing:border-box!important;
  min-width:0!important;
}

html body .voucher-history-scroll-area .voucher-history-column-titles > span + span,
html body .voucher-history-scroll-area .voucher-history-column-filters > * + *,
html body .voucher-history-scroll-area .voucher-entry-history-row > * + *{
  border-left:1px solid rgba(98,228,231,.42)!important;
  padding-left:9px!important;
}

/* The draggable line sits exactly on the measured right edge of a title cell. */
html body .voucher-history-resizable-v3{
  position:relative!important;
}

html body .voucher-history-column-resizer-v3{
  position:absolute!important;
  top:0!important;
  bottom:0!important;
  width:12px!important;
  margin-left:-6px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  z-index:300!important;
  cursor:col-resize!important;
  touch-action:none!important;
  opacity:.72!important;
  background:
    linear-gradient(
      to right,
      transparent 0,
      transparent 5px,
      var(--cyan) 5px,
      var(--cyan) 7px,
      transparent 7px,
      transparent 100%
    )!important;
}

html body .voucher-history-column-resizer-v3:hover,
html body .voucher-history-column-resizer-v3:focus{
  opacity:1!important;
}

body.resizing-voucher-history-column-v3,
body.resizing-voucher-history-column-v3 *{
  cursor:col-resize!important;
  user-select:none!important;
}

/* Disable only the old generic handles inside Journal Voucher. */
html body .voucher-entry-history .left-list-column-resizer{
  display:none!important;
  pointer-events:none!important;
}

/* Shared horizontal canvas: header, filters and rows always scroll together. */
html body .voucher-history-scroll-area{
  overflow-x:auto!important;
  overflow-y:auto!important;
}

html body .voucher-history-scroll-area .voucher-entry-history-grid-head,
html body .voucher-history-scroll-area .voucher-entry-history-list{
  max-width:none!important;
}

/* ============================================================
   Journal Voucher - remove bold cyan/green resize bars from the
   top of the Accounting Transactions list.
   Keep the resize hit-area active and keep the thin column lines.
   ============================================================ */
html body .voucher-history-column-resizer-v3,
html body .voucher-history-column-resizer-v3:hover,
html body .voucher-history-column-resizer-v3:focus{
  background:transparent!important;
  opacity:1!important;
  box-shadow:none!important;
  border:0!important;
  outline:0!important;
}

/* Statement Of Account */
.statement-page {
  display: grid;
  gap: 14px;
}

.statement-heading {
  margin-bottom: 0;
}

.statement-criteria-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 230px 205px;
  gap: 10px;
  align-items: stretch;
}

.statement-criteria-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(99, 164, 255, 0.28);
}

.statement-panel-title {
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent, #2563eb);
  background: linear-gradient(180deg, rgba(99, 164, 255, 0.18), rgba(99, 164, 255, 0.06));
  border-bottom: 1px solid rgba(99, 164, 255, 0.22);
}

.statement-form-grid {
  display: grid;
  grid-template-columns: 145px minmax(260px, 1fr) 130px;
  gap: 10px 12px;
  padding: 12px;
  align-items: start;
}

.statement-field {
  display: grid;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--muted, #64748b);
}

.statement-field span {
  font-weight: 800;
  color: var(--text, #0f172a);
}

.statement-field b {
  color: #ef4444;
}

.statement-field input,
.statement-field select {
  min-height: 34px;
  border: 1px solid rgba(99, 164, 255, 0.35);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--input-bg, rgba(255,255,255,0.88));
  color: var(--text, #0f172a);
  font: inherit;
}

.statement-field select[multiple] {
  min-height: 95px;
}

.statement-field.account-name input {
  background: #fff8b8;
  color: #111827;
  font-weight: 700;
}

.statement-field.operations {
  grid-column: 1 / -1;
}

.statement-field.operations small {
  color: var(--muted, #64748b);
}

.statement-selected-account {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 12px 12px;
  color: var(--muted, #64748b);
}

.statement-selected-account strong {
  color: var(--text, #0f172a);
}

.statement-selected-account em {
  font-style: normal;
  color: var(--muted, #64748b);
}

.statement-criteria-card.opening,
.statement-criteria-card.currencies {
  display: grid;
  align-content: start;
}

.statement-check {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text, #0f172a);
}

.statement-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent, #2563eb);
}

.statement-table-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(99, 164, 255, 0.28);
}

.statement-table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(99, 164, 255, 0.20);
}

.statement-table-title h2 {
  margin: 0;
}

.statement-grid-helper {
  padding: 8px 14px;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  background: linear-gradient(180deg, #4d9ff1, #2e7bd1);
}

.statement-table-scroll {
  min-height: 315px;
  max-height: 56vh;
  overflow: auto;
  background: rgba(255,255,255,0.62);
}

.statement-table {
  min-width: 980px;
  width: 100%;
  border-collapse: collapse;
}

.statement-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
  font-size: 0.72rem;
  text-align: center;
  background: linear-gradient(180deg, #dbeafe, #bfdbfe);
  color: #073b84;
}

.statement-table td {
  white-space: nowrap;
  font-size: 0.78rem;
}

.statement-table .statement-description {
  min-width: 330px;
  white-space: normal;
}

.statement-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.statement-balance-before-row td {
  background: rgba(99, 164, 255, 0.13);
  font-weight: 800;
}

.statement-footer-total {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid rgba(99, 164, 255, 0.22);
  background: rgba(99, 164, 255, 0.08);
}

.statement-footer-total div {
  display: grid;
  gap: 2px;
  min-width: 130px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(99, 164, 255, 0.18);
  text-align: right;
}

.statement-footer-total span {
  font-size: 0.68rem;
  color: var(--muted, #64748b);
  text-transform: uppercase;
  font-weight: 800;
}

.statement-footer-total strong {
  font-size: 0.95rem;
  color: var(--text, #0f172a);
}

.statement-actions-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 18px;
  padding: 8px 28px 4px;
}

.statement-action {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: linear-gradient(180deg, #dbeafe, #93c5fd);
  color: #0f3a73;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.12);
}

.statement-action.load {
  outline: 2px dotted rgba(37, 99, 235, 0.7);
  outline-offset: -5px;
}

.statement-action.exit {
  color: #9a3412;
}

.statement-action:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

@media (max-width: 1180px) {
  .statement-criteria-grid {
    grid-template-columns: 1fr;
  }

  .statement-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .statement-actions-bar {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    padding: 8px 0;
  }
}

@media print {
  body > *:not(.statement-print-area) {
    display: none !important;
  }

  .statement-print-area {
    display: block !important;
    padding: 18px;
    color: #000;
    background: #fff;
  }

  .statement-print-area h1 {
    margin: 0 0 8px;
    font-size: 22px;
  }

  .statement-print-meta {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .statement-print-area table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
  }

  .statement-print-area th,
  .statement-print-area td {
    border: 1px solid #999;
    padding: 4px;
  }

  .statement-print-area th {
    background: #e5e7eb;
  }
}

/* Statement of Account - modern Financial Reports layout */
.statement-modern-page {
  gap: 14px;
}

.statement-heading-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.statement-modern-filters {
  grid-template-columns:
    minmax(300px, 1.5fr)
    150px
    150px
    120px
    minmax(220px, 1fr)
    minmax(220px, .85fr)
    auto
    auto;
  align-items: end;
}

.statement-modern-filters .statement-modern-account select {
  font-weight: 800;
}

.statement-modern-filters .statement-modern-operations select {
  height: 76px;
  padding: 6px 10px;
}

.statement-modern-filters .statement-modern-operations small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.statement-modern-currency-columns {
  min-height: 76px;
  padding: 0 1px;
}

.statement-modern-currency-columns > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .4px;
}

.statement-modern-checks {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.statement-modern-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.statement-modern-checks input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.statement-generate-button {
  min-width: 142px;
}

.statement-modern-table-panel {
  overflow: hidden;
}

.statement-modern-scroll {
  min-height: 370px;
  max-height: 61vh;
}

.statement-modern-table {
  min-width: 1180px;
}

.statement-modern-table th,
.statement-modern-table td {
  white-space: nowrap;
}

.statement-modern-table .statement-description {
  min-width: 330px;
  max-width: 520px;
  white-space: normal;
}

.statement-modern-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.statement-modern-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, var(--accent) 8%);
}

.statement-modern-footer > div {
  min-width: 145px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  text-align: right;
}

.statement-modern-footer span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .35px;
  text-transform: uppercase;
}

.statement-modern-footer strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 15px;
}

@media (max-width: 1450px) {
  .statement-modern-filters {
    grid-template-columns: minmax(300px, 1.5fr) 150px 150px 120px minmax(230px, 1fr);
  }

  .statement-modern-currency-columns {
    grid-column: span 2;
  }
}

@media (max-width: 980px) {
  .statement-modern-filters {
    grid-template-columns: 1fr 1fr;
  }

  .statement-modern-account,
  .statement-modern-operations,
  .statement-modern-currency-columns {
    grid-column: 1 / -1;
  }

  .statement-heading-actions {
    justify-content: flex-start;
  }
}

@media print {
  .statement-print-totals {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
  }

  .statement-print-totals > div {
    min-width: 110px;
    border: 1px solid #999;
    padding: 5px 7px;
    text-align: right;
  }

  .statement-print-totals span {
    display: block;
    font-size: 8px;
    text-transform: uppercase;
  }

  .statement-print-totals strong {
    display: block;
    font-size: 10px;
  }
}

/* ============================================================
   Statement of Account - scrolling + company/group filters
   + checkbox multi-select transaction types
   ============================================================ */

/* The global application layout intentionally locks .page-content.
   Statement of Account is a long report, so this page must scroll. */
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content:has(.statement-modern-page){
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-bottom:28px!important;
  scrollbar-gutter:stable;
}

.statement-modern-page{
  min-height:max-content!important;
  padding-bottom:18px;
}

/* Two clean filter rows:
   Row 1 = account, dates, currency, company, transaction group
   Row 2 = transaction types, display columns, generate, clear */
.statement-modern-filters{
  grid-template-columns:
    minmax(300px,1.7fr)
    145px
    145px
    105px
    minmax(180px,.9fr)
    minmax(190px,.95fr)!important;
  gap:10px!important;
  align-items:end!important;
  overflow:visible!important;
}

.statement-modern-operations{
  grid-column:span 2;
  position:relative;
  min-width:0;
}

.statement-modern-operations > span,
.statement-modern-currency-columns > span{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.4px;
}

.statement-modern-currency-columns{
  grid-column:span 2;
  min-height:0!important;
}

.statement-modern-company,
.statement-modern-group{
  min-width:0;
}

/* Combo-looking checklist: click once, then tick one or many types.
   No Ctrl key is needed. */
.statement-operation-picker{
  position:relative;
  width:100%;
}

.statement-operation-picker > summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel);
  color:var(--text);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  list-style:none;
  user-select:none;
}

.statement-operation-picker > summary::-webkit-details-marker{
  display:none;
}

.statement-operation-picker > summary::after{
  content:"▾";
  margin-left:10px;
  color:var(--muted);
  font-size:11px;
}

.statement-operation-picker[open] > summary{
  border-color:color-mix(in srgb,var(--accent) 65%,var(--line));
  box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 12%,transparent);
}

.statement-operation-picker[open] > summary::after{
  content:"▴";
}

.statement-operation-menu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 6px);
  z-index:500;
  max-height:330px;
  overflow-y:auto;
  padding:8px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--panel);
  box-shadow:0 18px 45px rgba(0,0,0,.35);
}

.statement-operation-hint{
  padding:5px 7px 8px;
  color:var(--muted);
  font-size:9px;
  line-height:1.35;
}

.statement-operation-item{
  display:flex!important;
  align-items:flex-start!important;
  gap:8px!important;
  width:100%;
  margin:0!important;
  padding:7px 8px!important;
  border-radius:8px;
  cursor:pointer;
}

.statement-operation-item:hover{
  background:color-mix(in srgb,var(--accent) 10%,transparent);
}

.statement-operation-item input{
  flex:0 0 auto;
  width:15px!important;
  height:15px!important;
  min-height:15px!important;
  margin:2px 0 0!important;
  padding:0!important;
  accent-color:var(--accent);
}

.statement-operation-item span{
  display:block!important;
  min-width:0;
  margin:0!important;
  color:var(--text)!important;
  font-size:11px!important;
  font-weight:700!important;
  letter-spacing:0!important;
  line-height:1.25;
}

.statement-operation-item strong{
  color:var(--text);
}

.statement-operation-item em{
  color:var(--muted);
  font-style:normal;
  font-weight:600;
}

.statement-operation-empty{
  padding:10px;
  color:var(--muted);
  font-size:11px;
}

/* Vertical scrolling belongs to the whole page; the report grid gets
   its own horizontal scrollbar only. */
.statement-modern-table-panel{
  overflow:hidden!important;
}

.statement-modern-scroll{
  display:block!important;
  width:100%!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  overscroll-behavior-x:contain;
  scrollbar-gutter:stable;
}

.statement-modern-table{
  width:max-content!important;
  min-width:max(100%,1450px)!important;
  table-layout:auto!important;
}

.statement-modern-table th,
.statement-modern-table td{
  white-space:nowrap!important;
}

.statement-modern-table .statement-description{
  min-width:340px!important;
  max-width:560px!important;
  white-space:normal!important;
}

/* Make the horizontal scrollbar easier to see and grab. */
.statement-modern-scroll::-webkit-scrollbar{
  height:13px;
}

.statement-modern-scroll::-webkit-scrollbar-thumb{
  background:color-mix(in srgb,var(--accent) 55%,var(--line));
  border:3px solid var(--panel);
  border-radius:999px;
}

.statement-modern-scroll::-webkit-scrollbar-track{
  background:color-mix(in srgb,var(--panel) 88%,var(--line));
}

@media(max-width:1450px){
  .statement-modern-filters{
    grid-template-columns:minmax(280px,1.6fr) 145px 145px 105px minmax(180px,1fr)!important;
  }

  .statement-modern-group{
    grid-column:auto;
  }

  .statement-modern-operations{
    grid-column:span 2;
  }

  .statement-modern-currency-columns{
    grid-column:span 2;
  }
}

@media(max-width:1000px){
  .statement-modern-filters{
    grid-template-columns:1fr 1fr!important;
  }

  .statement-modern-account,
  .statement-modern-company,
  .statement-modern-group,
  .statement-modern-operations,
  .statement-modern-currency-columns{
    grid-column:1 / -1!important;
  }
}

.statement-modern-operations:has(.statement-operation-picker[open]){
  z-index:650;
}

/* ============================================================
   Statement of Account - visible horizontal scrollbar + grid filters
   ============================================================ */
.statement-modern-table-panel{
  overflow:hidden!important;
}

.statement-modern-scroll{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  overflow-x:scroll!important;
  overflow-y:hidden!important;
  scrollbar-width:auto!important;
  scrollbar-color:color-mix(in srgb,var(--accent) 68%,#7d8da1) color-mix(in srgb,var(--panel) 82%,#283b50)!important;
  padding-bottom:2px;
}

.statement-modern-table{
  width:max-content!important;
  min-width:max(100%,1850px)!important;
  table-layout:auto!important;
}

.statement-modern-table thead tr:first-child th{
  position:sticky;
  top:0;
  z-index:5;
}

.statement-grid-filter-row th{
  position:sticky;
  top:34px;
  z-index:4;
  padding:5px 6px!important;
  background:color-mix(in srgb,var(--panel) 94%,var(--accent) 6%)!important;
  border-top:1px solid var(--line)!important;
  border-bottom:1px solid var(--line)!important;
}

.statement-grid-filter-input{
  width:100%!important;
  min-width:76px;
  height:30px!important;
  min-height:30px!important;
  padding:4px 8px!important;
  border:1px solid color-mix(in srgb,var(--line) 88%,var(--accent) 12%)!important;
  border-radius:6px!important;
  background:color-mix(in srgb,var(--panel) 92%,#000 8%)!important;
  color:var(--text)!important;
  font-size:10px!important;
  font-weight:700!important;
  outline:none!important;
  box-shadow:none!important;
}

.statement-grid-filter-input::placeholder{
  color:var(--muted)!important;
  opacity:.78;
}

.statement-grid-filter-input:focus{
  border-color:var(--accent)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 13%,transparent)!important;
}

.statement-modern-table th:nth-child(4),
.statement-modern-table td:nth-child(4){
  min-width:320px!important;
}

.statement-modern-table th:nth-child(5),
.statement-modern-table td:nth-child(5){
  min-width:190px!important;
}

.statement-modern-table th:nth-child(6),
.statement-modern-table td:nth-child(6){
  min-width:105px!important;
}

.statement-modern-scroll::-webkit-scrollbar{
  height:16px!important;
  display:block!important;
}

.statement-modern-scroll::-webkit-scrollbar-thumb{
  background:color-mix(in srgb,var(--accent) 70%,#8290a0)!important;
  border:3px solid color-mix(in srgb,var(--panel) 88%,#182638)!important;
  border-radius:999px!important;
}

.statement-modern-scroll::-webkit-scrollbar-track{
  background:color-mix(in srgb,var(--panel) 78%,#35475a)!important;
  border-top:1px solid var(--line)!important;
}

/* A dedicated, always-visible scrollbar is synchronized with the grid.
   This remains visible even on browsers that use overlay table scrollbars. */
.statement-grid-bottom-scroll{
  display:block!important;
  width:100%!important;
  height:20px!important;
  min-height:20px!important;
  overflow-x:scroll!important;
  overflow-y:hidden!important;
  margin:0 0 8px!important;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:color-mix(in srgb,var(--panel) 87%,#28394c)!important;
  scrollbar-width:auto!important;
  scrollbar-color:color-mix(in srgb,var(--accent) 72%,#8b98a8) color-mix(in srgb,var(--panel) 78%,#35475a)!important;
}

.statement-grid-scroll-spacer{
  height:1px;
  min-width:1851px;
}

.statement-grid-bottom-scroll::-webkit-scrollbar{
  height:17px!important;
  display:block!important;
}

.statement-grid-bottom-scroll::-webkit-scrollbar-thumb{
  background:color-mix(in srgb,var(--accent) 72%,#8b98a8)!important;
  border:3px solid color-mix(in srgb,var(--panel) 82%,#203245)!important;
  border-radius:999px!important;
}

.statement-grid-bottom-scroll::-webkit-scrollbar-track{
  background:color-mix(in srgb,var(--panel) 72%,#3b4c60)!important;
}

.statement-modern-footer{
  margin-top:0!important;
}

@media print{
  .statement-grid-bottom-scroll,
  .statement-grid-filter-row{
    display:none!important;
  }
}

/* Prevent the report card from growing to the table's intrinsic width.
   The card stays inside the page; only the grid viewport scrolls horizontally. */
.statement-modern-page,
.statement-modern-table-panel,
.statement-modern-table-panel .stock-list-header{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}

.statement-modern-table-panel{
  width:100%!important;
}

/* ============================================================
   Statement of Account - fixed report header, scroll data only
   ============================================================ */
/* Keep the Statement page inside the visible workspace. The page title,
   filters, report title and totals stay in place; only the report grid
   viewport scrolls vertically. */
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content:has(.statement-modern-page){
  overflow:hidden!important;
  padding-bottom:var(--avalanche-bottom-gap)!important;
}

.statement-modern-page{
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  padding-bottom:0!important;
}

.statement-modern-page > .page-heading,
.statement-modern-page > .statement-modern-filters{
  flex:0 0 auto!important;
}

.statement-modern-table-panel{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}

.statement-modern-table-panel > .stock-list-header{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:10!important;
  background:var(--panel)!important;
}

.statement-modern-scroll{
  flex:1 1 auto!important;
  min-height:180px!important;
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}

/* Both table header rows remain visible while the ledger rows move. */
.statement-modern-table thead tr:first-child th{
  position:sticky!important;
  top:0!important;
  z-index:12!important;
  background:var(--panel)!important;
}

.statement-modern-table .statement-grid-filter-row th{
  position:sticky!important;
  top:34px!important;
  z-index:11!important;
}

.statement-grid-bottom-scroll,
.statement-modern-footer{
  flex:0 0 auto!important;
}

/* Make the vertical grid scrollbar easy to see. */
.statement-modern-scroll::-webkit-scrollbar{
  width:14px!important;
  height:16px!important;
}

.statement-modern-scroll::-webkit-scrollbar-thumb{
  min-height:36px;
}

/* On narrow/mobile layouts the filters wrap significantly, so restore
   normal page scrolling there instead of hiding controls. */
@media(max-width:900px){
  html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content:has(.statement-modern-page){
    overflow-y:auto!important;
  }
  .statement-modern-page{
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .statement-modern-table-panel{
    min-height:520px!important;
  }
  .statement-modern-scroll{
    max-height:520px!important;
  }
}

/* ============================================================
   Statement of Account - requested column order + compact labels
   Order: group, date, type, number, description, company, amounts
   ============================================================ */
.statement-modern-table{
  min-width:max(100%,1710px)!important;
}

/* Keep descriptive columns compact so the amount columns receive more room. */
.statement-modern-table th:nth-child(1),
.statement-modern-table td:nth-child(1){
  width:88px!important;
  min-width:88px!important;
  max-width:88px!important;
}
.statement-modern-table th:nth-child(2),
.statement-modern-table td:nth-child(2){
  width:94px!important;
  min-width:94px!important;
  max-width:94px!important;
}
.statement-modern-table th:nth-child(3),
.statement-modern-table td:nth-child(3){
  width:72px!important;
  min-width:72px!important;
  max-width:72px!important;
}
.statement-modern-table th:nth-child(4),
.statement-modern-table td:nth-child(4){
  width:86px!important;
  min-width:86px!important;
  max-width:86px!important;
}
.statement-modern-table th:nth-child(5),
.statement-modern-table td:nth-child(5){
  width:255px!important;
  min-width:255px!important;
  max-width:320px!important;
}
.statement-modern-table th:nth-child(6),
.statement-modern-table td:nth-child(6){
  width:150px!important;
  min-width:150px!important;
  max-width:190px!important;
}

/* Amount columns start at column 7 and keep a little more space. */
.statement-modern-table th:nth-child(n+7),
.statement-modern-table td:nth-child(n+7){
  min-width:116px!important;
}

.statement-modern-table .statement-description{
  min-width:255px!important;
  max-width:320px!important;
}

/* ============================================================
   Statement of Account - maximum grid vertical space
   Keep only a very compact title/action strip above the filters.
   ============================================================ */
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content:has(.statement-modern-page){
  padding-top:8px!important;
  padding-bottom:4px!important;
}

.statement-modern-page > .page-heading{
  min-height:38px!important;
  height:38px!important;
  padding:0!important;
  margin:0 0 5px!important;
  gap:8px!important;
  align-items:center!important;
}

/* Breadcrumb and explanatory sentence consume useful report height.
   The sidebar/menu already identifies the current page. */
.statement-modern-page > .page-heading .breadcrumb,
.statement-modern-page > .page-heading p{
  display:none!important;
}

.statement-modern-page > .page-heading h1{
  margin:0!important;
  font-size:22px!important;
  line-height:1!important;
  letter-spacing:-.45px!important;
  white-space:nowrap!important;
}

.statement-modern-page .statement-heading-actions{
  gap:6px!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
}

.statement-modern-page .statement-heading-actions .primary-button,
.statement-modern-page .statement-heading-actions .secondary-button{
  min-height:30px!important;
  height:30px!important;
  padding:0 10px!important;
  border-radius:8px!important;
  font-size:10px!important;
  line-height:28px!important;
  white-space:nowrap!important;
}

@media(max-width:900px){
  .statement-modern-page > .page-heading{
    height:auto!important;
    min-height:0!important;
    flex-direction:column!important;
    align-items:stretch!important;
    padding:4px 0!important;
  }
  .statement-modern-page > .page-heading h1{
    font-size:20px!important;
  }
  .statement-modern-page .statement-heading-actions{
    width:100%!important;
  }
  .statement-modern-page .statement-heading-actions button{
    flex:1 1 auto!important;
  }
}

/* ============================================================
   Statement of Account - compact amount columns + visible scrollbars
   ============================================================ */
/* Keep Debit/Credit columns compact. Balance gets a little more room. */
.statement-modern-table th:nth-child(3n+7),
.statement-modern-table td:nth-child(3n+7),
.statement-modern-table th:nth-child(3n+8),
.statement-modern-table td:nth-child(3n+8){
  width:104px!important;
  min-width:104px!important;
  max-width:104px!important;
  white-space:nowrap!important;
}

.statement-modern-table th:nth-child(3n+9),
.statement-modern-table td:nth-child(3n+9){
  width:118px!important;
  min-width:118px!important;
  max-width:118px!important;
  white-space:nowrap!important;
}

/* Do not force the ledger wider than necessary when only Main is selected. */
.statement-modern-table{
  min-width:max(100%,1280px)!important;
}

/* One native horizontal scrollbar is enough; hiding the old synchronized
   duplicate gives the data grid extra vertical space. */
.statement-grid-bottom-scroll{
  display:none!important;
}

/* Always reserve and show both native scrollbars in the statement grid. */
.statement-modern-scroll{
  overflow-x:scroll!important;
  overflow-y:scroll!important;
  scrollbar-gutter:stable!important;
}

/* Dark mode: high-contrast cyan scroll thumbs. */
:root:not([data-theme="light"]) .statement-modern-scroll{
  scrollbar-width:auto!important;
  scrollbar-color:#62e4e7 #183149!important;
}

:root:not([data-theme="light"]) .statement-modern-scroll::-webkit-scrollbar{
  width:16px!important;
  height:16px!important;
  background:#183149!important;
}

:root:not([data-theme="light"]) .statement-modern-scroll::-webkit-scrollbar-track{
  background:#183149!important;
  border:1px solid #294b68!important;
  border-radius:8px!important;
}

:root:not([data-theme="light"]) .statement-modern-scroll::-webkit-scrollbar-thumb{
  min-width:44px!important;
  min-height:44px!important;
  background:#62e4e7!important;
  border:3px solid #183149!important;
  border-radius:9px!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)!important;
}

:root:not([data-theme="light"]) .statement-modern-scroll::-webkit-scrollbar-thumb:hover{
  background:#91f5f3!important;
}

:root:not([data-theme="light"]) .statement-modern-scroll::-webkit-scrollbar-corner{
  background:#183149!important;
}

/* Light mode keeps a clear but softer scrollbar. */
:root[data-theme="light"] .statement-modern-scroll{
  scrollbar-color:#169da5 #dbe7ee!important;
}

:root[data-theme="light"] .statement-modern-scroll::-webkit-scrollbar{
  width:16px!important;
  height:16px!important;
}

:root[data-theme="light"] .statement-modern-scroll::-webkit-scrollbar-track{
  background:#dbe7ee!important;
  border-radius:8px!important;
}

:root[data-theme="light"] .statement-modern-scroll::-webkit-scrollbar-thumb{
  background:#169da5!important;
  border:3px solid #dbe7ee!important;
  border-radius:9px!important;
}


/* ============================================================
   Statement of Account - accounting dimension multi-select filters
   ============================================================ */
.statement-modern-dimension-filter{
  position:relative;
  min-width:0;
}

.statement-modern-dimension-filter > span{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.4px;
  white-space:nowrap;
}

.statement-modern-dimension-filter:has(.statement-operation-picker[open]){
  z-index:650;
}

.statement-modern-dimension-filter .statement-operation-menu{
  min-width:245px;
  max-width:min(340px,calc(100vw - 40px));
}

.statement-modern-dimension-filter .statement-operation-picker > summary{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  min-height:40px!important;
  height:40px!important;
  padding:0 10px!important;
  font-size:11px!important;
}

/* Desktop placement with six columns:
   row 1 basic filters;
   row 2 transaction type + CC/SCC/Job/Sub Job;
   row 3 Phase/Cash + display columns + actions. */
@media(min-width:1451px){
  .statement-modern-filters{
    grid-template-columns:
      minmax(300px,1.7fr)
      145px
      145px
      105px
      minmax(180px,.9fr)
      minmax(190px,.95fr)!important;
  }
}

@media(max-width:1450px){
  .statement-modern-dimension-filter{
    min-width:145px;
  }
}

@media(max-width:1000px){
  .statement-modern-dimension-filter{
    grid-column:auto!important;
    min-width:0;
  }
}

/* ============================================================
   Statement of Account - searchable description-only dimension pickers
   ============================================================ */
.statement-picker-search{
  position:sticky;
  top:0;
  z-index:3;
  display:block;
  width:100%;
  height:34px;
  min-height:34px!important;
  margin:0 0 6px!important;
  padding:0 10px!important;
  border:1px solid var(--line)!important;
  border-radius:8px!important;
  outline:none;
  background:var(--panel)!important;
  color:var(--text)!important;
  font:inherit;
  font-size:11px!important;
  font-weight:700!important;
  box-shadow:0 3px 12px rgba(0,0,0,.12);
}

.statement-picker-search:focus{
  border-color:color-mix(in srgb,var(--accent) 72%,var(--line))!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 14%,transparent)!important;
}

.statement-picker-search::placeholder{
  color:var(--muted)!important;
  opacity:.9;
}

.statement-operation-item[hidden],
.statement-picker-no-match[hidden]{
  display:none!important;
}

.statement-picker-no-match{
  padding:10px 8px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}

.statement-modern-dimension-filter .statement-operation-item span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.statement-modern-dimension-filter .statement-operation-item strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text)!important;
  font-weight:700!important;
}

.trial-balance-filter-panel,
.trial-balance-table-panel{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.trial-balance-filter-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(220px,1fr));
  gap:14px;
}

.trial-balance-filter-grid label,
.trial-balance-multi-grid label,
.trial-balance-checkbox-card{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.trial-balance-filter-grid label span,
.trial-balance-multi-grid label span,
.trial-balance-checkbox-card > span{
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  color:var(--muted);
}

.trial-balance-checkbox-card{
  background:linear-gradient(180deg,var(--panel),color-mix(in srgb,var(--panel) 85%,var(--line)));
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
  justify-content:flex-start;
}

.trial-balance-checkbox-card label{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
  margin:0;
  font-size:14px;
}

.trial-balance-checkbox-card small{
  color:var(--muted);
  font-size:11px;
}

.trial-balance-multi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(180px,1fr));
  gap:14px;
}

.trial-balance-multi-grid select{
  min-height:128px;
  padding:10px;
}

.trial-balance-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.trial-balance-scroll{
  max-height:calc(100vh - 360px);
}

.trial-balance-table thead th{
  position:sticky;
  top:0;
  z-index:1;
}

.trial-balance-table td,
.trial-balance-table th{
  white-space:nowrap;
}

.trial-balance-table .trial-account-name{
  min-width:260px;
  white-space:normal;
}

.trial-balance-table td.strong{
  font-weight:800;
}

.trial-balance-footer{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.trial-balance-footer span{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:110px;
}

@media (max-width:1200px){
  .trial-balance-filter-grid,
  .trial-balance-multi-grid{
    grid-template-columns:repeat(2,minmax(220px,1fr));
  }
}

@media (max-width:768px){
  .trial-balance-filter-grid,
  .trial-balance-multi-grid{
    grid-template-columns:1fr;
  }
}

/* ============================================================
   Trial Balance - compact statement-style workspace
   ============================================================ */
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content:has(.trial-modern-page){
  overflow:hidden!important;
  padding-top:6px!important;
  padding-bottom:4px!important;
}

.trial-modern-page{
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  overflow:hidden!important;
  min-width:0!important;
}

.trial-modern-page > .trial-heading,
.trial-modern-page > .trial-modern-filters{
  flex:0 0 auto!important;
}

.trial-heading{
  min-height:34px!important;
  height:34px!important;
  margin:0!important;
  padding:0!important;
  align-items:center!important;
}

.trial-heading h1{
  margin:0!important;
  font-size:20px!important;
  line-height:1!important;
  white-space:nowrap!important;
}

.trial-heading-actions{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:nowrap!important;
}

.trial-heading-actions .primary-button,
.trial-heading-actions .secondary-button{
  min-height:28px!important;
  height:28px!important;
  padding:0 9px!important;
  border-radius:8px!important;
  font-size:10px!important;
  line-height:26px!important;
  white-space:nowrap!important;
}

.trial-error{
  flex:0 0 auto!important;
  margin:0!important;
  padding:7px 10px!important;
}

.trial-modern-filters{
  display:flex!important;
  flex-direction:column!important;
  gap:7px!important;
  padding:9px 10px!important;
  margin:0!important;
  min-width:0!important;
  overflow:visible!important;
}

.trial-primary-filters{
  display:grid!important;
  grid-template-columns:minmax(180px,1.6fr) minmax(180px,1.6fr) 82px 82px 126px 126px 92px 92px!important;
  gap:7px!important;
  align-items:end!important;
}

.trial-primary-filters label,
.trial-picker-field{
  min-width:0!important;
}

.trial-primary-filters label > span,
.trial-picker-field > span{
  display:block!important;
  margin-bottom:3px!important;
  color:var(--muted)!important;
  font-size:8px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:.35px!important;
  white-space:nowrap!important;
}

.trial-primary-filters input,
.trial-primary-filters select,
.trial-picker-field details > summary{
  min-height:32px!important;
  height:32px!important;
  box-sizing:border-box!important;
}

.trial-primary-filters input,
.trial-primary-filters select{
  padding:0 9px!important;
  font-size:11px!important;
}

.trial-primary-filters .searchable-combo,
.trial-primary-filters .searchable-combo-input{
  min-height:32px!important;
  height:32px!important;
}

.trial-primary-filters .searchable-combo-input{
  padding:0 28px 0 9px!important;
  font-size:11px!important;
}

.trial-picker-grid{
  display:grid!important;
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:6px!important;
  overflow:visible!important;
}

.trial-picker-field{
  position:relative!important;
}

.trial-picker-field:has(details[open]){
  z-index:900!important;
}

.trial-picker-field .statement-operation-picker{
  width:100%!important;
}

.trial-picker-field .statement-operation-picker > summary{
  display:flex!important;
  align-items:center!important;
  padding:0 10px!important;
  font-size:10px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

.trial-picker-field .statement-operation-menu{
  max-height:290px!important;
  overflow:auto!important;
  z-index:950!important;
}

.trial-options-row{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  flex-wrap:nowrap!important;
  min-width:0!important;
}

.trial-inline-options{
  min-height:30px!important;
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  padding:4px 8px!important;
  border:1px solid var(--line)!important;
  border-radius:9px!important;
  background:color-mix(in srgb,var(--panel) 88%,var(--line))!important;
  white-space:nowrap!important;
}

.trial-inline-options strong{
  color:var(--muted)!important;
  font-size:8px!important;
  letter-spacing:.35px!important;
}

.trial-inline-options label{
  display:flex!important;
  align-items:center!important;
  gap:3px!important;
  margin:0!important;
  font-size:10px!important;
  font-weight:700!important;
}

.trial-inline-options input[type="checkbox"]{
  width:13px!important;
  height:13px!important;
  margin:0!important;
}

.trial-level-options{
  flex:1 1 auto!important;
  min-width:0!important;
  overflow-x:auto!important;
}

.trial-actions-compact{
  display:flex!important;
  gap:5px!important;
  margin-left:auto!important;
}

.trial-actions-compact .primary-button,
.trial-actions-compact .secondary-button{
  min-height:30px!important;
  height:30px!important;
  padding:0 11px!important;
  font-size:10px!important;
  white-space:nowrap!important;
}

.trial-modern-table-panel{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  margin:0!important;
  padding:0!important;
}

.trial-modern-scroll{
  flex:1 1 auto!important;
  min-height:150px!important;
  max-height:none!important;
  width:100%!important;
  overflow-x:scroll!important;
  overflow-y:scroll!important;
  scrollbar-gutter:stable!important;
  overscroll-behavior:contain!important;
}

.trial-modern-table{
  width:max-content!important;
  min-width:max(100%,1180px)!important;
  table-layout:fixed!important;
}

.trial-modern-table th,
.trial-modern-table td{
  white-space:nowrap!important;
  padding-left:8px!important;
  padding-right:8px!important;
}

.trial-modern-table th:nth-child(1),
.trial-modern-table td:nth-child(1){
  width:72px!important;
  min-width:72px!important;
  max-width:72px!important;
}

.trial-modern-table th:nth-child(2),
.trial-modern-table td:nth-child(2){
  width:52px!important;
  min-width:52px!important;
  max-width:52px!important;
}

.trial-modern-table th:nth-child(3),
.trial-modern-table td:nth-child(3){
  width:54px!important;
  min-width:54px!important;
  max-width:54px!important;
}

.trial-modern-table th:nth-child(4),
.trial-modern-table td:nth-child(4){
  width:245px!important;
  min-width:245px!important;
  max-width:285px!important;
}

.trial-modern-table th:nth-child(n+5),
.trial-modern-table td:nth-child(n+5){
  width:100px!important;
  min-width:100px!important;
  max-width:100px!important;
  text-align:right!important;
}

.trial-modern-table .trial-account-name{
  text-align:left!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.trial-modern-table thead tr:first-child th{
  position:sticky!important;
  top:0!important;
  z-index:12!important;
  background:var(--panel)!important;
}

.trial-modern-table .trial-grid-filter-row th{
  position:sticky!important;
  top:34px!important;
  z-index:11!important;
  background:color-mix(in srgb,var(--panel) 92%,var(--line))!important;
}

.trial-modern-table .statement-grid-filter-input{
  min-width:0!important;
  width:100%!important;
}

.trial-summary-row td{
  font-weight:900!important;
  background:rgba(92,211,220,.18)!important;
  color:var(--text)!important;
  border-top-color:rgba(111,220,226,.34)!important;
  border-bottom-color:rgba(111,220,226,.34)!important;
}

.trial-summary-row.level1 td{ background:rgba(92,211,220,.27)!important; }
.trial-summary-row.level2 td{ background:rgba(92,211,220,.23)!important; }
.trial-summary-row.level3 td{ background:rgba(92,211,220,.20)!important; }
.trial-summary-row.level4 td{ background:rgba(92,211,220,.17)!important; }
.trial-summary-row.level5 td{ background:rgba(92,211,220,.14)!important; }

:root[data-theme="light"] .trial-summary-row td{
  background:#cbeaf0!important;
  color:#173145!important;
}
:root[data-theme="light"] .trial-summary-row.level1 td{ background:#b8e2e9!important; }
:root[data-theme="light"] .trial-summary-row.level2 td{ background:#c1e6ec!important; }
:root[data-theme="light"] .trial-summary-row.level3 td{ background:#cbeaf0!important; }
:root[data-theme="light"] .trial-summary-row.level4 td{ background:#d5eef2!important; }
:root[data-theme="light"] .trial-summary-row.level5 td{ background:#def2f5!important; }

.trial-modern-footer{
  flex:0 0 auto!important;
  min-height:46px!important;
  max-height:58px!important;
  overflow-x:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  padding:5px 8px!important;
}

.trial-modern-footer span{
  min-width:105px!important;
  padding:4px 7px!important;
}

/* Reuse the high-contrast Statement scrollbars for Trial Balance. */
:root:not([data-theme="light"]) .trial-modern-scroll{
  scrollbar-width:auto!important;
  scrollbar-color:#62e4e7 #183149!important;
}

:root:not([data-theme="light"]) .trial-modern-scroll::-webkit-scrollbar{
  width:16px!important;
  height:16px!important;
  background:#183149!important;
}

:root:not([data-theme="light"]) .trial-modern-scroll::-webkit-scrollbar-track{
  background:#183149!important;
  border:1px solid #294b68!important;
  border-radius:8px!important;
}

:root:not([data-theme="light"]) .trial-modern-scroll::-webkit-scrollbar-thumb{
  min-width:44px!important;
  min-height:44px!important;
  background:#62e4e7!important;
  border:3px solid #183149!important;
  border-radius:9px!important;
}

:root[data-theme="light"] .trial-modern-scroll{
  scrollbar-color:#169da5 #dbe7ee!important;
}

:root[data-theme="light"] .trial-modern-scroll::-webkit-scrollbar{
  width:16px!important;
  height:16px!important;
}

:root[data-theme="light"] .trial-modern-scroll::-webkit-scrollbar-track{
  background:#dbe7ee!important;
}

:root[data-theme="light"] .trial-modern-scroll::-webkit-scrollbar-thumb{
  background:#169da5!important;
  border:3px solid #dbe7ee!important;
  border-radius:9px!important;
}

@media(max-width:1500px){
  .trial-picker-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}

@media(max-width:1200px){
  html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content:has(.trial-modern-page){
    overflow-y:auto!important;
  }
  .trial-modern-page{
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .trial-primary-filters{
    grid-template-columns:repeat(4,minmax(120px,1fr))!important;
  }
  .trial-picker-grid{
    grid-template-columns:repeat(2,minmax(180px,1fr))!important;
  }
  .trial-options-row{
    flex-wrap:wrap!important;
  }
  .trial-modern-table-panel{
    min-height:520px!important;
  }
  .trial-modern-scroll{
    max-height:520px!important;
  }
}


/* Trial Balance refinements: auxiliary inputs match chart lookups. */
#trial-from-aux,
#trial-to-aux{
  background:#081725!important;
  color:#edf6ff!important;
  border-color:var(--line)!important;
}

#trial-from-aux:focus,
#trial-to-aux:focus{
  border-color:rgba(98,228,231,.42)!important;
  box-shadow:0 0 0 3px rgba(98,228,231,.07)!important;
}

:root[data-theme="light"] #trial-from-aux,
:root[data-theme="light"] #trial-to-aux{
  background:#ffffff!important;
  color:#183047!important;
  border-color:rgba(51,75,102,.17)!important;
}

.trial-data-row[data-trial-account-row="1"]{
  cursor:pointer!important;
}

.trial-data-row[data-trial-account-row="1"]:hover td{
  background:rgba(98,228,231,.055)!important;
}

.trial-data-row.trial-row-selected td{
  background:rgba(98,228,231,.11)!important;
  box-shadow:inset 0 1px 0 rgba(98,228,231,.20), inset 0 -1px 0 rgba(98,228,231,.20)!important;
}

:root[data-theme="light"] .trial-data-row[data-trial-account-row="1"]:hover td{
  background:#eefafb!important;
}

:root[data-theme="light"] .trial-data-row.trial-row-selected td{
  background:#dff5f6!important;
}

.trial-balance-context-menu{
  min-width:225px!important;
}

/* Trial Balance totals aligned with the report columns. */
.trial-modern-table tfoot{
  position:sticky!important;
  bottom:0!important;
  z-index:10!important;
}

.trial-modern-table tfoot td{
  font-weight:900!important;
  background:color-mix(in srgb,var(--panel) 90%,var(--accent) 10%)!important;
  border-top:1px solid color-mix(in srgb,var(--accent) 45%,var(--line))!important;
  box-shadow:0 -1px 0 color-mix(in srgb,var(--accent) 20%,transparent)!important;
}


.trial-modern-table .trial-total-native td{
  background:color-mix(in srgb,var(--panel) 92%,var(--accent) 8%)!important;
}


:root[data-theme="light"] .trial-modern-table tfoot td{
  background:#d9eef2!important;
  color:#173145!important;
}

/* Reusable loading overlay: shown automatically only when an operation takes time. */
.app-global-loading{
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(2,10,18,.42);
  backdrop-filter:blur(2px);
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease;
}

.app-global-loading.visible{
  opacity:1;
  pointer-events:auto;
}

.app-global-loading-card{
  min-width:240px;
  max-width:min(90vw,420px);
  padding:18px 22px;
  border-radius:16px;
  border:1px solid color-mix(in srgb,var(--accent) 42%,var(--line));
  background:var(--panel);
  box-shadow:0 18px 50px rgba(0,0,0,.28);
  display:grid;
  grid-template-columns:36px 1fr;
  grid-template-rows:auto auto;
  column-gap:13px;
  align-items:center;
}

.app-global-loading-spinner{
  grid-row:1 / span 2;
  width:30px;
  height:30px;
  border-radius:50%;
  border:3px solid color-mix(in srgb,var(--accent) 22%,var(--line));
  border-top-color:var(--accent);
  animation:avalanche-loading-spin .75s linear infinite;
}

.app-global-loading-card strong{
  color:var(--text);
  font-size:14px;
  line-height:1.25;
}

.app-global-loading-card small{
  color:var(--muted);
  font-size:11px;
  margin-top:3px;
}

@keyframes avalanche-loading-spin{
  to{ transform:rotate(360deg); }
}


/* ============================================================
   Accounting Transactions compact left-list columns
   Keep Company short enough so Date + Number are visible at once.
   ============================================================ */
html body .voucher-history-scroll-area .voucher-entry-history-grid-head,
html body .voucher-history-scroll-area .voucher-entry-history-list,
html body .voucher-history-scroll-area .voucher-history-column-titles,
html body .voucher-history-scroll-area .voucher-history-column-filters,
html body .voucher-history-scroll-area .voucher-entry-history-row{
  min-width:382px!important;
}

html body .voucher-history-scroll-area .voucher-history-column-titles,
html body .voucher-history-scroll-area .voucher-history-column-filters,
html body .voucher-history-scroll-area .voucher-entry-history-row{
  grid-template-columns:50px 52px 108px 84px 64px!important;
  gap:6px!important;
}

html body .voucher-history-company-cell{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

html body .voucher-history-date-cell,
html body .voucher-history-number-cell{
  white-space:nowrap!important;
}

.statement-modern-table tbody tr[data-statement-voucher-row="1"]{
  cursor:pointer!important;
}

/* Match the Trial Balance row hover/selection exactly. */
.statement-modern-table tbody tr[data-statement-voucher-row="1"]:hover td{
  background:rgba(98,228,231,.055)!important;
}

.statement-modern-table tbody tr.statement-row-selected td{
  background:rgba(98,228,231,.11)!important;
  box-shadow:inset 0 1px 0 rgba(98,228,231,.20), inset 0 -1px 0 rgba(98,228,231,.20)!important;
}

:root[data-theme="light"] .statement-modern-table tbody tr[data-statement-voucher-row="1"]:hover td{
  background:#eefafb!important;
}

:root[data-theme="light"] .statement-modern-table tbody tr.statement-row-selected td{
  background:#dff5f6!important;
}

/* ============================================================
   Companies - Master Account style left list + organized detail form
   ============================================================ */
.dimension-entry-companies .dimension-entry-history{
  width:390px!important;
  min-width:390px!important;
}

.dimension-entry-companies .dimension-entry-history-columns,
.dimension-entry-companies .dimension-entry-history-row{
  grid-template-columns:minmax(130px,.8fr) minmax(190px,1.2fr)!important;
}

.dimension-entry-companies .company-entry-fields{
  grid-template-columns:repeat(3,minmax(190px,1fr))!important;
  align-items:start!important;
}

.dimension-entry-companies .dimension-entry-card{
  max-height:calc(100vh - 245px)!important;
  overflow:auto!important;
}

@media (max-width:1250px){
  .dimension-entry-companies .company-entry-fields{
    grid-template-columns:repeat(2,minmax(210px,1fr))!important;
  }
}

@media (max-width:850px){
  .dimension-entry-companies .dimension-entry-history{
    width:100%!important;
    min-width:0!important;
  }
  .dimension-entry-companies .company-entry-fields{
    grid-template-columns:1fr!important;
  }
}

/* ============================================================
   Statement of Account - exact Trial Balance row hover behavior
   Apply to every real statement movement row, not only rows that
   currently expose the voucher context-menu metadata.
   ============================================================ */
html body .statement-modern-table tbody tr[data-statement-row]:not(.statement-balance-before-row){
  cursor:pointer!important;
}

html body .statement-modern-table tbody tr[data-statement-row]:not(.statement-balance-before-row):hover > td{
  background:rgba(98,228,231,.055)!important;
}

html body .statement-modern-table tbody tr[data-statement-row].statement-row-selected > td{
  background:rgba(98,228,231,.11)!important;
  box-shadow:inset 0 1px 0 rgba(98,228,231,.20), inset 0 -1px 0 rgba(98,228,231,.20)!important;
}

:root[data-theme="light"] body .statement-modern-table tbody tr[data-statement-row]:not(.statement-balance-before-row):hover > td{
  background:#eefafb!important;
}

:root[data-theme="light"] body .statement-modern-table tbody tr[data-statement-row].statement-row-selected > td{
  background:#dff5f6!important;
}

/* ============================================================
   Company-level Hide Dimensions
   Hides only the six accounting dimension columns selected by the
   company policy. D/I remains visible.
   ============================================================ */
.voucher-entry-shell.voucher-company-dimensions-hidden
[data-voucher-dimension-column="costCenterId"],
.voucher-entry-shell.voucher-company-dimensions-hidden
[data-voucher-dimension-column="subCostCenterId"],
.voucher-entry-shell.voucher-company-dimensions-hidden
[data-voucher-dimension-column="phaseId"],
.voucher-entry-shell.voucher-company-dimensions-hidden
[data-voucher-dimension-column="jobTypeId"],
.voucher-entry-shell.voucher-company-dimensions-hidden
[data-voucher-dimension-column="subJobTypeId"],
.voucher-entry-shell.voucher-company-dimensions-hidden
[data-voucher-dimension-column="cashTypeId"]{
  display:none!important
}

.voucher-entry-shell.voucher-company-dimensions-hidden .voucher-entry-grid{
  width:100%!important;
  min-width:1120px!important
}

/* ================================================================
   Responsive desktop density
   ----------------------------------------------------------------
   AvalancheAI is used on desktop/laptop screens with different
   resolutions and Windows display scaling.  These viewport rules make
   the whole application fit automatically without requiring browser
   zoom.  Phones/tablets keep the existing mobile responsive layout.
   ================================================================ */
@media screen and (min-width:721px){
  body{zoom:1}
}

/* Typical 15/16-inch laptop at 125% scaling: ~1536 x 864 CSS pixels. */
@media screen and (min-width:721px) and (max-width:1650px),
       screen and (min-width:721px) and (max-height:920px){
  body{zoom:.94}
}

/* 1366/1440-class laptop viewports and shorter browser windows. */
@media screen and (min-width:721px) and (max-width:1450px),
       screen and (min-width:721px) and (max-height:820px){
  body{zoom:.90}
}

/* Compact laptop / high Windows display scaling. */
@media screen and (min-width:721px) and (max-width:1280px),
       screen and (min-width:721px) and (max-height:740px){
  body{zoom:.86}
}

/* Very narrow desktop windows still use the existing responsive layout,
   with a conservative density so controls remain comfortably clickable. */
@media screen and (min-width:721px) and (max-width:1050px){
  body{zoom:.90}
}

/* Never scale printed reports with the interactive-screen density. */
@media print{
  body{zoom:1!important}
}

/* ================================================================
   Company page - compact Master Account style layout
   Fix the old generic dimension grid reserving a 650px left column
   while the visible company list was only 390px wide.
   ================================================================ */
html body .dimension-entry-companies{
  grid-template-columns:350px minmax(0,1fr)!important;
}

html body .dimension-entry-companies .dimension-entry-history{
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
}

html body .dimension-entry-companies .dimension-entry-history-columns,
html body .dimension-entry-companies .dimension-entry-history-row{
  grid-template-columns:minmax(0,1fr) 118px!important;
  gap:10px!important;
}

html body .dimension-entry-companies .dimension-entry-history-columns span:nth-child(2),
html body .dimension-entry-companies .dimension-entry-history-row span{
  width:auto!important;
  max-width:none!important;
}

html body .dimension-entry-companies .dimension-entry-main{
  min-width:0!important;
}

html body .dimension-entry-companies .dimension-entry-topbar{
  grid-template-columns:minmax(260px,1fr) auto 185px!important;
  gap:10px!important;
  padding:12px 14px!important;
}

html body .dimension-entry-companies .dimension-entry-title h1{
  font-size:25px!important;
  margin-top:2px!important;
}

html body .dimension-entry-companies .dimension-entry-top-tools{
  grid-template-columns:repeat(2,74px)!important;
  gap:7px!important;
}

html body .dimension-entry-companies .dimension-top-tool-button{
  min-height:64px!important;
}

html body .dimension-entry-companies .dimension-entry-status-card{
  min-width:0!important;
}

html body .dimension-entry-companies .dimension-entry-card{
  width:auto!important;
  max-width:none!important;
  max-height:none!important;
  margin:14px 16px 10px!important;
  padding:16px!important;
  overflow:visible!important;
}

html body .dimension-entry-companies .company-entry-fields{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px 14px!important;
  width:100%!important;
}

html body .dimension-entry-companies .dimension-entry-field input,
html body .dimension-entry-companies .dimension-entry-field select{
  height:41px!important;
  font-size:14px!important;
}

html body .dimension-entry-companies .dimension-entry-field > span{
  margin-bottom:5px!important;
  font-size:10px!important;
}

/* The address benefits from extra horizontal space. */
html body .dimension-entry-companies .dimension-entry-field[data-company-field*="address" i]{
  grid-column:span 2!important;
}

/* Keep the bottom commands in one clean row on normal desktop widths. */
html body .dimension-entry-companies .dimension-entry-actions{
  grid-template-columns:repeat(8,minmax(72px,1fr))!important;
  gap:7px!important;
  padding:9px 14px 12px!important;
}

html body .dimension-entry-companies .dimension-entry-actions .voucher-action-button{
  min-height:56px!important;
}

@media (max-width:1500px){
  html body .dimension-entry-companies{
    grid-template-columns:320px minmax(0,1fr)!important;
  }

  html body .dimension-entry-companies .company-entry-fields{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  html body .dimension-entry-companies .dimension-entry-history-columns,
  html body .dimension-entry-companies .dimension-entry-history-row{
    grid-template-columns:minmax(0,1fr) 100px!important;
  }
}

@media (max-width:1180px){
  html body .dimension-entry-companies{
    grid-template-columns:280px minmax(0,1fr)!important;
  }

  html body .dimension-entry-companies .company-entry-fields{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  html body .dimension-entry-companies .dimension-entry-field[data-company-field*="address" i]{
    grid-column:span 2!important;
  }

  html body .dimension-entry-companies .dimension-entry-actions{
    grid-template-columns:repeat(4,minmax(72px,1fr))!important;
  }
}

@media (max-width:850px){
  html body .dimension-entry-companies{
    grid-template-columns:1fr!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }

  html body .dimension-entry-companies .dimension-entry-history{
    width:100%!important;
    min-width:0!important;
    min-height:280px!important;
    max-height:42vh!important;
  }

  html body .dimension-entry-companies .company-entry-fields{
    grid-template-columns:1fr!important;
  }

  html body .dimension-entry-companies .dimension-entry-field[data-company-field*="address" i]{
    grid-column:auto!important;
  }

  html body .dimension-entry-companies .dimension-entry-topbar{
    grid-template-columns:1fr!important;
  }
}

/* ============================================================
   Currency entry + application right-side scrolling
   ============================================================ */

/* Currency now uses the same left-list / right-entry concept as the
   accounting master data pages. */
.currency-entry-shell .dimension-entry-main{
  min-width:0!important;
}

.currency-entry-shell .currency-entry-fields{
  grid-template-columns:repeat(2,minmax(220px,1fr))!important;
  gap:18px!important;
}

.currency-entry-shell .dimension-entry-card{
  overflow-y:auto!important;
  overflow-x:hidden!important;
}

/* Every application page can scroll vertically from the right edge when
   its content is taller than the available browser area. Entry grids keep
   their own internal scrolling as before. */
html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
  scrollbar-color:rgba(98,228,231,.72) rgba(255,255,255,.035);
}

html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content::-webkit-scrollbar{
  width:11px;
}

html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content::-webkit-scrollbar-track{
  background:rgba(255,255,255,.035);
  border-radius:999px;
}

html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content::-webkit-scrollbar-thumb{
  background:rgba(98,228,231,.72);
  border-radius:999px;
  border:2px solid transparent;
  background-clip:padding-box;
}

html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content::-webkit-scrollbar-thumb:hover{
  background:rgba(98,228,231,.95);
  border:2px solid transparent;
  background-clip:padding-box;
}

:root[data-theme="light"] html body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content,
:root[data-theme="light"] body:not(:has(.login-page)):not(:has(.auth-page)):not(:has(.login-shell)):not(:has([data-login-page])) .page-content{
  scrollbar-color:rgba(32,153,166,.72) rgba(18,54,72,.06);
}

@media(max-width:900px){
  .currency-entry-shell .currency-entry-fields{
    grid-template-columns:1fr!important;
  }
}


/* ============================================================
   Journal Voucher detail grid - wider + user-resizable columns
   ============================================================ */
.voucher-entry-grid-wrap{
  overflow-x:auto!important;
  overflow-y:auto!important;
  scrollbar-gutter:stable!important
}

.voucher-entry-grid{
  table-layout:fixed!important;
  max-width:none!important
}

.voucher-entry-grid th.voucher-grid-resizable-header{
  position:sticky!important;
  top:0!important;
  overflow:visible!important
}

.voucher-entry-grid td > input,
.voucher-entry-grid td > select,
.voucher-entry-grid td > .searchable-combo,
.voucher-entry-grid td > .searchable-combo .searchable-combo-input{
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
  box-sizing:border-box!important
}

.voucher-grid-column-resizer{
  position:absolute;
  top:0;
  right:-5px;
  bottom:0;
  z-index:40;
  width:10px;
  cursor:col-resize;
  touch-action:none;
  background:transparent
}

.voucher-grid-column-resizer::after{
  content:"";
  position:absolute;
  top:5px;
  right:4px;
  bottom:5px;
  width:1px;
  background:transparent;
  transition:background .12s ease
}

.voucher-grid-column-resizer:hover::after{
  background:rgba(98,228,231,.68)
}

body.resizing-voucher-grid-column,
body.resizing-voucher-grid-column *{
  cursor:col-resize!important;
  user-select:none!important
}


/* ============================================================
   Journal Voucher grid scrollbars - always visible when needed
   ============================================================ */
.voucher-entry-grid-wrap{
  overflow-x:scroll!important;
  overflow-y:scroll!important;
  scrollbar-gutter:stable!important;
  scrollbar-width:auto!important;
  scrollbar-color:rgba(98,228,231,.82) rgba(255,255,255,.055)!important
}

.voucher-entry-grid-wrap::-webkit-scrollbar{
  width:12px!important;
  height:12px!important
}

.voucher-entry-grid-wrap::-webkit-scrollbar-track{
  background:rgba(255,255,255,.055)!important;
  border-radius:999px
}

.voucher-entry-grid-wrap::-webkit-scrollbar-thumb{
  background:rgba(98,228,231,.82)!important;
  border-radius:999px;
  border:2px solid transparent;
  background-clip:padding-box
}

.voucher-entry-grid-wrap::-webkit-scrollbar-thumb:hover{
  background:rgba(98,228,231,1)!important;
  border:2px solid transparent;
  background-clip:padding-box
}

:root[data-theme="light"] .voucher-entry-grid-wrap{
  scrollbar-color:rgba(32,153,166,.78) rgba(18,54,72,.08)!important
}

/* Executive Dashboard live metric drill-downs */
.dashboard-metric-clickable{
  cursor:pointer;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.dashboard-metric-clickable:hover,
.dashboard-metric-clickable:focus-visible{
  transform:translateY(-2px);
  border-color:rgba(98,228,231,.45);
  box-shadow:0 20px 52px rgba(0,0,0,.16),0 0 0 2px rgba(98,228,231,.06);
  outline:none;
}
.dashboard-metric-clickable .trend{
  min-width:42px;
  padding:4px 8px;
  border:1px solid rgba(98,228,231,.18);
  border-radius:99px;
  background:rgba(98,228,231,.06);
  text-align:center;
}
.executive-dashboard-drilldown-backdrop{
  position:fixed;
  inset:0;
  z-index:2500;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(2,8,14,.78);
  backdrop-filter:blur(8px);
}
.executive-dashboard-drilldown{
  width:min(1180px,96vw);
  max-height:min(800px,90vh);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--panel-strong);
  box-shadow:0 30px 90px rgba(0,0,0,.42);
}
.executive-dashboard-drilldown-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:20px 22px 17px;
  border-bottom:1px solid var(--line);
}
.executive-dashboard-drilldown-header h2{
  margin:5px 0 4px;
  font-size:23px;
}
.executive-dashboard-drilldown-header p{
  margin:0;
  color:var(--muted);
  font-size:11px;
}
.executive-dashboard-drilldown-close{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border:1px solid var(--line);
  border-radius:10px;
  background:transparent;
  color:var(--text);
  font-size:25px;
  line-height:1;
  cursor:pointer;
}
.executive-dashboard-drilldown-close:hover{
  color:var(--cyan);
  border-color:rgba(98,228,231,.4);
}
.executive-dashboard-drilldown-loading{
  min-height:260px;
  display:grid;
  place-items:center;
  padding:30px;
  color:var(--muted);
  font-size:13px;
}
.executive-dashboard-drilldown-table-wrap{
  overflow:auto;
  scrollbar-gutter:stable;
}
.executive-dashboard-drilldown-table{
  width:100%;
  min-width:920px;
  border-collapse:collapse;
}
.executive-dashboard-drilldown-table th{
  position:sticky;
  top:0;
  z-index:2;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  background:var(--panel-strong);
  color:#7b92ad;
  font-size:10px;
  font-weight:900;
  letter-spacing:.45px;
  text-align:left;
  white-space:nowrap;
}
.executive-dashboard-drilldown-table td{
  padding:11px 14px;
  border-bottom:1px solid rgba(91,116,145,.11);
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
.executive-dashboard-drilldown-table tbody tr:hover{
  background:rgba(98,228,231,.055);
}
.executive-dashboard-drilldown-table .number{
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.executive-dashboard-drilldown-table tfoot td{
  position:sticky;
  bottom:0;
  z-index:2;
  padding:14px;
  border-top:1px solid rgba(98,228,231,.32);
  border-bottom:0;
  background:var(--panel-strong);
  color:var(--text);
  font-size:13px;
  font-weight:900;
}
.executive-dashboard-empty{
  height:150px;
  text-align:center!important;
  color:var(--muted-2)!important;
}
:root[data-theme="light"] .executive-dashboard-drilldown-backdrop{
  background:rgba(37,48,64,.36);
}
:root[data-theme="light"] .dashboard-metric-clickable:hover,
:root[data-theme="light"] .dashboard-metric-clickable:focus-visible{
  box-shadow:0 18px 44px rgba(42,64,86,.15),0 0 0 2px rgba(16,152,164,.06);
}
@media(max-width:720px){
  .executive-dashboard-drilldown-backdrop{padding:10px}
  .executive-dashboard-drilldown{width:98vw;max-height:92vh}
  .executive-dashboard-drilldown-header{padding:15px}
  .executive-dashboard-drilldown-header h2{font-size:19px}
}


/* ============================================================
   Journal Voucher grid - force the scrollbars to stay available
   even when Hide Dimensions is active.  The older dimensions rule
   used a more-specific overflow-x:hidden selector and could remove
   the horizontal scrollbar from the resizable grid.
   ============================================================ */
html body .voucher-entry-shell .voucher-entry-grid-wrap,
html body .voucher-entry-shell.voucher-dimensions-hidden .voucher-entry-grid-wrap,
html body .voucher-entry-shell.voucher-company-dimensions-hidden .voucher-entry-grid-wrap{
  overflow-x:scroll!important;
  overflow-y:scroll!important;
  scrollbar-gutter:stable both-edges!important;
  scrollbar-width:auto!important;
  scrollbar-color:rgba(98,228,231,.88) rgba(255,255,255,.07)!important;
}

html body .voucher-entry-shell .voucher-entry-grid-wrap::-webkit-scrollbar{
  display:block!important;
  width:14px!important;
  height:14px!important;
}

html body .voucher-entry-shell .voucher-entry-grid-wrap::-webkit-scrollbar-corner{
  background:rgba(255,255,255,.055)!important;
}

/* Executive Dashboard drill-down rows can open Statement of Account. */
.executive-dashboard-drilldown-table tbody tr[data-executive-account-row="1"]{
  cursor:context-menu;
}
.executive-dashboard-drilldown-table tbody tr[data-executive-account-row="1"]:hover td{
  background:rgba(98,228,231,.055);
  color:var(--text);
}
:root[data-theme="light"] .executive-dashboard-drilldown-table tbody tr[data-executive-account-row="1"]:hover td{
  background:#eefafb;
}


/* ============================================================
   Executive Dashboard drill-down typography = Journal Voucher grid
   ============================================================ */
.executive-dashboard-drilldown{
  font-size:16px!important;
}
.executive-dashboard-drilldown-header p,
.executive-dashboard-drilldown-loading,
.executive-dashboard-drilldown-close{
  font-size:16px!important;
}
.executive-dashboard-drilldown-table th{
  font-size:12px!important;
  font-weight:800!important;
}
.executive-dashboard-drilldown-table td,
.executive-dashboard-drilldown-table tbody td{
  font-size:16px!important;
  font-weight:500!important;
}
.executive-dashboard-drilldown-table tfoot td{
  font-size:16px!important;
  font-weight:800!important;
}
.executive-dashboard-empty{
  font-size:16px!important;
}

/* ============================================================
   Journal Voucher compact single-line header
   Company select + New Aux stay on the same control row as the
   transaction group/date/type/number controls.
   ============================================================ */
.voucher-entry-topbar{
  gap:12px!important;
  padding-left:12px!important;
  padding-right:12px!important;
}
.voucher-entry-title{
  min-width:145px!important;
  max-width:145px!important;
}
.voucher-entry-header-fields{
  grid-template-columns:
    82px
    128px
    110px
    105px
    minmax(300px,1fr)!important;
  gap:8px!important;
  align-items:end!important;
}
.voucher-transaction-group-field{
  max-width:82px!important;
}
.voucher-transaction-group-field .searchable-combo,
.voucher-transaction-group-field select,
.voucher-transaction-group-field input{
  width:82px!important;
}
.voucher-entry-company-field{
  min-width:0!important;
  align-self:end!important;
}
.voucher-company-label{
  display:block!important;
  margin-bottom:4px!important;
  color:var(--muted)!important;
  font-size:10px!important;
  font-weight:800!important;
}
.voucher-company-control-row{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  min-width:0!important;
}
.voucher-company-control-row #voucher-entry-company{
  flex:1 1 155px!important;
  min-width:135px!important;
  max-width:180px!important;
  width:auto!important;
  height:38px!important;
}
.voucher-company-control-row .voucher-company-new-button{
  flex:0 0 auto!important;
  align-self:center!important;
}

/* Slightly smaller company text/column in the left transaction list. */
.voucher-history-column-titles,
.voucher-history-column-filters,
.voucher-entry-history-row{
  grid-template-columns:62px 54px minmax(92px,1fr) 92px 72px!important;
}
.voucher-history-company-cell{
  font-size:12px!important;
}

/* Account identity shown immediately to the left of Account Balance. */
.voucher-account-balance-account{
  border-right:1px solid var(--line)!important;
  padding-right:16px!important;
}

@media(max-width:1180px){
  .voucher-entry-header-fields{
    grid-template-columns:78px 122px 104px 100px minmax(280px,1fr)!important;
  }
  .voucher-company-control-row #voucher-entry-company{
    max-width:160px!important;
  }
}

.executive-dashboard-account-context-menu,
.executive-dashboard-account-context-menu .voucher-history-context-action{
  font-size:16px!important;
}

@media(max-width:1100px){
  .voucher-entry-topbar{
    align-items:stretch!important;
    flex-direction:column!important;
  }
  .voucher-entry-title{
    min-width:0!important;
    max-width:none!important;
  }
  .voucher-entry-header-fields{
    width:100%!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .voucher-transaction-group-field,
  .voucher-transaction-group-field .searchable-combo,
  .voucher-transaction-group-field select,
  .voucher-transaction-group-field input{
    width:100%!important;
    max-width:none!important;
  }
  .voucher-entry-company-field{
    grid-column:1 / -1!important;
  }
  .voucher-company-control-row #voucher-entry-company{
    max-width:none!important;
  }
}

@media(max-width:720px){
  .voucher-entry-header-fields{
    grid-template-columns:1fr!important;
  }
  .voucher-entry-company-field{
    grid-column:auto!important;
  }
  .voucher-company-control-row{
    align-items:stretch!important;
    flex-direction:column!important;
  }
  .voucher-company-control-row #voucher-entry-company,
  .voucher-company-control-row .voucher-company-new-button{
    width:100%!important;
    max-width:none!important;
  }
}
