/* BHA EXCHANGE V5: full viewport workspace, separate local-only demo input. */
body.bha-exchange-app,body.bha-exchange-app[style]{overflow:hidden!important;height:100dvh!important;max-height:100dvh!important}
/* Truly full-screen login. Login form remains on the right with a full-height brand story. */
body.bha-exchange-app #login.exchange-login-screen{padding:0!important;margin:0!important;height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important;overflow:auto!important;align-items:stretch!important;justify-content:stretch!important;background:white!important}
body.bha-exchange-app #login .login-shell-v4{width:100%!important;max-width:none!important;height:100%!important;min-height:100%!important;border:0!important;border-radius:0!important;box-shadow:none!important;grid-template-columns:minmax(0,47%) minmax(0,53%)!important}
body.bha-exchange-app #login .login-hero-v4{min-height:100%;padding:clamp(32px,5vw,90px)!important;background:radial-gradient(circle at 93% 45%,#184f8a88,transparent 50%),linear-gradient(145deg,#0c2a4a,#0a1e38)!important}
body.bha-exchange-app #login .login-hero-content{max-width:570px!important}
body.bha-exchange-app #login .login-hero-content h2{font-size:clamp(38px,3.8vw,72px)!important;max-width:540px!important}
body.bha-exchange-app #login .login-form-side{min-height:100%!important;justify-content:center!important;padding:clamp(32px,5vw,92px)!important;background:radial-gradient(circle at 97% 10%,#dfeefa80,transparent 50%),white!important}
body.bha-exchange-app #login .login-card-standalone{max-width:470px!important}
body.bha-exchange-app #login .login-bottom{margin-top:34px!important}
/* Fixed dashboard chrome. All content scrolls inside cards, never by scrolling the browser page. */
body.bha-exchange-app #app{display:grid!important;grid-template-columns:254px minmax(0,1fr)!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow:hidden!important}
body.bha-exchange-app #app[hidden]{display:none!important}
body.bha-exchange-app #app #sidebar.exchange-sidebar{width:254px!important;min-height:0!important;height:100dvh!important;max-height:100dvh!important;position:relative!important;top:0!important;overflow-y:auto!important;padding:21px 15px!important;background:linear-gradient(180deg,#092440,#0c3152)!important}
body.bha-exchange-app #sidebar .exchange-brand{padding:0 4px 19px!important}
body.bha-exchange-app #sidebar .nav-label{padding:18px 10px 10px!important;color:#8db5db!important}
body.bha-exchange-app #sidebar .exchange-nav-parent{display:flex;align-items:center;gap:10px;margin:1px 5px 9px;padding:11px 9px;border-bottom:1px solid #ffffff16;color:#fff;font-size:13px;font-weight:820}
body.bha-exchange-app #sidebar .exchange-nav-parent span{font-size:21px;color:#85b7e4}
body.bha-exchange-app #sidebar #nav{display:grid!important;grid-template-columns:1fr!important;gap:3px!important;overflow:visible!important}
body.bha-exchange-app #sidebar #nav button{display:flex!important;align-items:center!important;gap:11px!important;padding:11px 12px!important;font-size:13px!important;white-space:normal!important;min-height:41px!important;color:#c4d9ed!important;background:transparent!important;border:0!important;border-radius:9px!important;text-align:left!important;box-shadow:none!important}
body.bha-exchange-app #sidebar #nav button.active{background:linear-gradient(100deg,#1d63b3,#2c76c8)!important;color:white!important;box-shadow:0 6px 16px #00000020!important}
body.bha-exchange-app #sidebar #nav button:not(.active):hover{background:#ffffff14!important;color:#fff!important}
body.bha-exchange-app #sidebar #nav .nav-symbol{font-size:17px!important;width:22px!important;min-width:22px!important;color:inherit!important}
body.bha-exchange-app #sidebar .system-nav-label{margin-top:14px!important;border-top:1px solid #ffffff1b!important}
body.bha-exchange-app #sidebar .exchange-system-hint{font-size:11px!important;color:#90acc6!important;line-height:1.5!important;padding:0 11px!important}
body.bha-exchange-app #app .workspace-main{min-width:0!important;min-height:0!important;height:100dvh!important;max-height:100dvh!important;overflow:hidden!important}
body.bha-exchange-app #app .workspace-main > header.topbar{position:relative!important;flex-shrink:0!important;min-height:64px!important;padding:9px 24px!important}
body.bha-exchange-app #app .exchange-page{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-width:0!important;min-height:0!important;max-width:none!important;padding:20px clamp(15px,2.3vw,34px) 10px!important;margin:0!important;overflow:hidden!important}
body.bha-exchange-app #app .exchange-page .page-head{flex-shrink:0!important;align-items:center!important;min-height:57px!important;margin-bottom:11px!important}
body.bha-exchange-app #app .exchange-page .page-head h1{margin:4px 0 2px!important;font-size:25px!important}
body.bha-exchange-app #app .exchange-page .page-head p{font-size:12px!important}
body.bha-exchange-app #app .exchange-page .read-only-banner{flex-shrink:0!important;padding:9px 13px!important;margin-bottom:11px!important}
body.bha-exchange-app #app .exchange-footer{display:none!important}
body.bha-exchange-app #app #content{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;overflow:hidden!important}
body.bha-exchange-app #app #exchange-error{flex-shrink:0!important;margin:0!important;min-height:0!important}
body.bha-exchange-app #app #exchange-result{flex:1 1 auto!important;min-height:0!important;min-width:0!important;overflow-y:auto!important;overscroll-behavior:contain!important}
body.bha-exchange-app #app.is-transactions #exchange-result{display:flex!important;flex-direction:column!important;overflow:hidden!important}
body.bha-exchange-app #app #exchange-result>.panel{max-width:100%!important}
body.bha-exchange-app #app.is-transactions #exchange-result>.panel{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;margin:0 0 8px!important;overflow:hidden!important}
body.bha-exchange-app #app.is-transactions #exchange-result>.panel .panel-head{flex-shrink:0!important;padding:10px 16px!important;min-height:42px!important}
body.bha-exchange-app #app.is-transactions #exchange-result>.panel .exchange-table-wrap{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:auto!important}
body.bha-exchange-app #app .report-filter{flex-shrink:0!important;margin:0 0 11px!important;padding:12px 14px!important}
body.bha-exchange-app #app .report-filter label{min-width:125px!important}
body.bha-exchange-app #app #exchange-result .exchange-pagination{flex-shrink:0!important;margin:0!important;padding:9px 13px!important;min-height:45px!important}
body.bha-exchange-app #app #actions .v5-add-transaction{display:inline-flex!important;align-items:center!important;gap:7px!important;background:#186cdb!important;color:white!important;border:0!important;box-shadow:0 5px 12px #1651af25!important;font-size:13px!important;font-weight:800!important}
body.bha-exchange-app #app #actions .v5-add-transaction:hover{background:#125bb9!important}
/* Keep serial number on left, actions permanently on the right. */
body.bha-exchange-app #app .exchange-table-has-actions .exchange-table .exchange-sticky-action{position:sticky!important;left:auto!important;right:0!important;min-width:184px!important;width:184px!important;max-width:184px!important;z-index:11!important;box-shadow:-4px 0 10px #123b6514,inset 1px 0 #dae6f4!important;background:#f8fbff!important}
body.bha-exchange-app #app .exchange-table-has-actions .exchange-table th.exchange-sticky-action{z-index:17!important;background:#e8f1ff!important}
body.bha-exchange-app #app .exchange-table-has-actions .exchange-table td.exchange-sticky-action{background:#fafdff!important}
body.bha-exchange-app #app .exchange-table .exchange-row-actions{display:flex!important;justify-content:flex-end!important;gap:3px!important}
body.bha-exchange-app #app .exchange-table .exchange-row-actions button{min-width:auto!important;min-height:28px!important;padding:6px 7px!important;font-size:10px!important}
body.bha-exchange-app #app .exchange-table th{padding:10px 13px!important}
body.bha-exchange-app #app .exchange-table td{height:39px!important;padding:6px 12px!important}
body.bha-exchange-app #app .exchange-table tbody tr:has(.v5-demo-serial) td{background:#eef7ff!important}
body.bha-exchange-app #app .v5-demo-serial{display:flex;align-items:center;gap:4px}
body.bha-exchange-app #app .v5-demo-serial b{display:inline-block;border-radius:5px;background:#dcefff;color:#1964a7;font-size:8px;padding:3px 5px}
/* Real persistent bar at the bottom of each table panel, synchronized with the inner table scroll. */
body.bha-exchange-app #app .panel .exchange-bottom-scroll{width:100%!important;max-width:100%!important;height:18px!important;min-height:18px!important;flex:0 0 18px!important;overflow-x:scroll!important;overflow-y:hidden!important;background:#f1f6fd!important;border-top:1px solid #e0ebf5!important;scrollbar-width:auto!important;scrollbar-color:#6d9cc9 #d6e5f3!important}
body.bha-exchange-app #app .panel .exchange-bottom-scroll-inner{height:1px!important}
body.bha-exchange-app #app .panel .exchange-bottom-scroll::-webkit-scrollbar{height:13px!important}
body.bha-exchange-app #app .panel .exchange-bottom-scroll::-webkit-scrollbar-thumb{background:#82a9d0!important;border-radius:12px!important;border:2px solid #e3eef9!important}
body.bha-exchange-app #app .panel .exchange-bottom-scroll::-webkit-scrollbar-track{background:#e3eef9!important}
/* Modal: polished form, vertical scrolling confined to dialog on shorter screens. */
body.bha-exchange-app dialog.v5-demo-dialog{position:fixed!important;border:0!important;border-radius:18px!important;padding:0!important;width:min(760px,calc(100vw - 30px))!important;max-width:760px!important;max-height:calc(100dvh - 35px)!important;box-shadow:0 28px 90px #061e3d80!important;background:#fff!important;color:#1c3551!important;overflow:hidden!important}
body.bha-exchange-app dialog.v5-demo-dialog::backdrop,body.bha-exchange-app dialog.v5-confirm-dialog::backdrop{background:rgba(7,26,48,.6);backdrop-filter:blur(3px)}
body.bha-exchange-app .v5-demo-dialog form{max-height:calc(100dvh - 35px);display:flex;flex-direction:column;min-height:0}
body.bha-exchange-app .v5-modal-head{flex:none;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:22px 26px 17px;border-bottom:1px solid #e4ebf4}
body.bha-exchange-app .v5-modal-kicker{font-size:10px;color:#2271c5;letter-spacing:.13em;font-weight:850}
body.bha-exchange-app .v5-modal-head h2{margin:5px 0 3px;font-size:26px;color:#193651;font-weight:850}
body.bha-exchange-app .v5-modal-head p{margin:0;font-size:12px;color:#7690a9}
body.bha-exchange-app .v5-modal-close{width:36px;height:36px;background:#f3f7fb;border:1px solid #d8e4f0;border-radius:9px;color:#466989;font-size:25px}
body.bha-exchange-app .v5-modal-body{padding:17px 26px;overflow-y:auto;flex:1;min-height:0}
body.bha-exchange-app .v5-demo-callout{border:1px solid #b9d8ff;background:#eaf4ff;color:#2367a8;border-radius:9px;padding:12px;font-size:12px;font-weight:650;margin-bottom:17px}
body.bha-exchange-app .v5-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
body.bha-exchange-app .v5-form-grid label{display:block;font-size:12px;font-weight:780;color:#254461;min-width:0}
body.bha-exchange-app .v5-form-grid label i{color:#d83a4d;font-style:normal;display:inline}
body.bha-exchange-app .v5-form-grid input,body.bha-exchange-app .v5-form-grid select,body.bha-exchange-app .v5-form-grid textarea{display:block;min-height:43px;width:100%;max-width:100%;border-radius:9px;border:1px solid #ceddea;background:#fff;color:#203d5b;padding:8px 11px;font-size:13px;font-weight:560;outline-offset:2px}
body.bha-exchange-app .v5-form-grid textarea{resize:vertical;min-height:59px}
body.bha-exchange-app .v5-form-grid label>input,body.bha-exchange-app .v5-form-grid label>select,body.bha-exchange-app .v5-form-grid label>textarea{margin-top:7px!important}
body.bha-exchange-app .v5-form-full{grid-column:1/-1}
body.bha-exchange-app .v5-calculated{display:flex;flex-direction:column;gap:5px;background:#f2f7fd;border:1px solid #e0ebf5;border-radius:9px;padding:10px}
body.bha-exchange-app .v5-calculated small{font-size:10px;color:#7e90a4;font-weight:750}
body.bha-exchange-app .v5-calculated output{font-size:17px;color:#20517e;font-variant-numeric:tabular-nums;font-weight:850}
body.bha-exchange-app .v5-demo-error{font-size:12px;color:#bd3443;margin:8px 0 0}
body.bha-exchange-app .v5-modal-actions{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:17px 26px;border-top:1px solid #e5edf5;background:#fff}
body.bha-exchange-app .v5-modal-actions-right{display:flex;gap:9px;align-items:center}
body.bha-exchange-app .v5-modal-actions button{min-height:42px;border-radius:9px;padding:10px 15px;font-size:12px;font-weight:800;border:1px solid #d3e2f0;background:#f7faff;color:#345b80}
body.bha-exchange-app .v5-modal-actions button.primary{background:#196bce;color:#fff;border-color:#196bce}
body.bha-exchange-app dialog.v5-confirm-dialog{border:0;border-radius:15px;width:min(440px,95vw);box-shadow:0 20px 60px #0a274955;padding:27px}
body.bha-exchange-app .v5-confirm-dialog h2{margin:0 0 10px;font-size:22px;color:#153754}
body.bha-exchange-app .v5-confirm-dialog p{font-size:13px;color:#637e98;line-height:1.55}
body.bha-exchange-app .v5-confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
body.bha-exchange-app .v5-confirm-actions button{border:1px solid #dae5ef;border-radius:9px;padding:11px;background:#f7fbff;color:#1c3f63}
body.bha-exchange-app .v5-confirm-actions button.v5-danger{background:#c63c4e;border-color:#c63c4e;color:white}
@media(max-width:920px){body.bha-exchange-app #app{grid-template-columns:1fr!important}body.bha-exchange-app #app #sidebar.exchange-sidebar{position:fixed!important;left:0!important;top:0!important;transform:translateX(-110%);z-index:50!important}body.bha-exchange-app #app.sidebar-open #sidebar.exchange-sidebar{transform:translateX(0)!important}body.bha-exchange-app #app .exchange-page{padding:12px!important}}
@media(max-width:760px){body.bha-exchange-app #login.exchange-login-screen{height:100dvh!important;min-height:100dvh!important;overflow-y:auto!important}body.bha-exchange-app #login .login-shell-v4{display:block!important;height:auto!important;min-height:100%!important}body.bha-exchange-app #login .login-hero-v4{min-height:unset!important;padding:20px!important}body.bha-exchange-app #login .login-form-side{min-height:0!important;padding:28px 19px!important}body.bha-exchange-app .v5-form-grid{grid-template-columns:1fr!important}body.bha-exchange-app .v5-modal-head,body.bha-exchange-app .v5-modal-body,body.bha-exchange-app .v5-modal-actions{padding:14px 17px!important}body.bha-exchange-app .v5-modal-actions{flex-wrap:wrap}body.bha-exchange-app .v5-modal-actions-right{flex:1;justify-content:flex-end}body.bha-exchange-app #app .exchange-table .exchange-row-actions button{padding:5px!important;font-size:9px!important}}
@media print{body.bha-exchange-app{height:auto!important;max-height:none!important;overflow:visible!important}}
