/* Codex v3 - real layout alternatives; scoped to authenticated application. */
@media(min-width:1101px){
/* EXECUTIVE: premium, generous management workspace with persistent left rail */
html[data-codex-style="executive"] .app{grid-template-columns:272px minmax(0,1fr)!important;min-height:100vh;background:#edf0f5!important}
html[data-codex-style="executive"] .app .side{width:272px!important;min-width:0!important;position:sticky;top:0;height:100vh!important;padding:30px 20px!important;background:#142237!important;border-right:0!important;box-shadow:8px 0 30px rgba(20,34,55,.08)}
html[data-codex-style="executive"] .app .brand-mini{background:transparent!important;border:0!important;padding:9px 7px 24px!important;border-radius:0!important;border-bottom:1px solid rgba(255,255,255,.12)!important;margin-bottom:24px!important}
html[data-codex-style="executive"] .app .brand-mini strong{font-size:21px!important;line-height:1.2!important;letter-spacing:-.7px!important}
html[data-codex-style="executive"] .app .nav{gap:7px!important}
html[data-codex-style="executive"] .app .nav>a{border-radius:10px!important;min-height:43px!important;padding:12px 15px!important;border:1px solid transparent!important}
html[data-codex-style="executive"] .app .nav>a.active{background:#dfbe82!important;color:#192538!important;box-shadow:0 5px 18px rgba(0,0,0,.12)!important}
html[data-codex-style="executive"] .app .main{padding:32px clamp(26px,3vw,55px) 44px!important;background:#edf0f5!important}
html[data-codex-style="executive"] .app .top{margin-bottom:27px!important;padding:3px 0 22px!important;border-bottom:1px solid #d5dce6!important}
html[data-codex-style="executive"] .app .title h1{color:#202f44!important;font-size:36px!important;letter-spacing:-1.3px!important}
html[data-codex-style="executive"] .app .title p{color:#66768c!important}
html[data-codex-style="executive"] .app .workspace{padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
html[data-codex-style="executive"] .app .stats{gap:18px!important;margin-bottom:22px!important}
html[data-codex-style="executive"] .app .stat{background:#fff!important;border:1px solid #e1e5eb!important;border-radius:16px!important;box-shadow:0 5px 26px rgba(17,35,57,.06)!important;padding:24px!important}
html[data-codex-style="executive"] .app .stat .value{color:#23354c!important;font-size:29px!important}
html[data-codex-style="executive"] .app .box,html[data-codex-style="executive"] .app .summary-card{border:1px solid #dde4ec!important;border-radius:17px!important;box-shadow:0 6px 22px rgba(17,35,57,.04)!important}
html[data-codex-style="executive"] .app .dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important}
html[data-codex-style="executive"] .app .dash-chart-card{min-width:0!important}
html[data-codex-style="executive"] .app .tabs{padding:7px!important;background:#e0e6ef!important;border-radius:15px!important;gap:5px!important}
html[data-codex-style="executive"] .app .tab{border-radius:10px!important;box-shadow:none!important}
html[data-codex-style="executive"] .app .tab.active{background:#23364e!important;color:white!important}
html[data-codex-style="executive"] .app .user-pill{background:#fff!important;color:#1c3049!important;border:1px solid #dfe5ed!important;box-shadow:0 3px 10px rgba(20,33,55,.04)}
html[data-codex-style="executive"] .app .result-grid{padding:12px!important;border-radius:15px!important;background:#e6ebf3!important;gap:10px!important}
html[data-codex-style="executive"] .app .result-tile{box-shadow:0 3px 10px rgba(20,35,55,.05)!important}
html[data-codex-style="executive"] .app .calc-actions-row{padding:14px!important;background:#e8edf4!important;border-radius:12px!important}
/* TRADING: horizontal operations header, full-width dense data views */
html[data-codex-style="modern"] .app{display:block!important;min-height:100vh;background:#101b27!important}
html[data-codex-style="modern"] .app .side{position:sticky!important;z-index:60!important;top:0!important;width:100%!important;height:auto!important;min-height:74px!important;padding:10px 24px!important;display:flex!important;align-items:center!important;gap:20px!important;background:#142838!important;box-shadow:0 8px 24px rgba(0,0,0,.20)!important;border-right:0!important;border-bottom:1px solid #294254!important;overflow:visible!important}
html[data-codex-style="modern"] .app .brand-mini{flex:0 0 175px!important;padding:8px 10px!important;margin:0!important;background:transparent!important;border:0!important}
html[data-codex-style="modern"] .app .brand-mini strong{font-size:15px!important;letter-spacing:-.5px!important}
html[data-codex-style="modern"] .app .brand-mini span{font-size:10px!important}
html[data-codex-style="modern"] .app .nav{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:4px!important;min-width:0!important;flex:1!important;overflow-x:auto!important;scrollbar-width:thin;margin:0!important;padding:5px 1px!important}
html[data-codex-style="modern"] .app .nav>a{flex:none!important;display:inline-flex!important;gap:6px!important;min-height:38px!important;padding:9px 12px!important;font-size:12px!important;border-radius:7px!important;white-space:nowrap!important}
html[data-codex-style="modern"] .app .nav>a.active{background:#00b4a6!important;color:#08222a!important;font-weight:900!important}
html[data-codex-style="modern"] .app .sidebar-copyright,html[data-codex-style="modern"] .app .side-footer{display:none!important}
html[data-codex-style="modern"] .app .main{max-width:1920px!important;margin:auto!important;padding:20px 27px 45px!important;background:#101b27!important}
html[data-codex-style="modern"] .app .top{margin-bottom:13px!important;padding:0!important;gap:16px!important}
html[data-codex-style="modern"] .app .top .title h1{font-size:26px!important;letter-spacing:-.7px!important}
html[data-codex-style="modern"] .app .top .title p{margin-top:3px!important;font-size:12px!important}
html[data-codex-style="modern"] .app .user-pill{border-radius:8px!important;padding:5px 10px!important}
html[data-codex-style="modern"] .app .avatar{width:32px!important;height:32px!important;border-radius:7px!important}
html[data-codex-style="modern"] .app .workspace{padding:17px!important;border-radius:10px!important;background:#172736!important;border:1px solid #2b4455!important;box-shadow:none!important}
html[data-codex-style="modern"] .app .stats{gap:8px!important;margin-bottom:11px!important}
html[data-codex-style="modern"] .app .stat{border-radius:7px!important;padding:13px 16px!important;box-shadow:none!important;background:#203545!important;border-left:3px solid #08b9aa!important}
html[data-codex-style="modern"] .app .stat .value{font-size:24px!important}
html[data-codex-style="modern"] .app .box,html[data-codex-style="modern"] .app .summary-card{border-radius:8px!important;padding:16px!important}
html[data-codex-style="modern"] .app .box h2,html[data-codex-style="modern"] .app .summary-card h2{font-size:18px!important;margin-bottom:8px!important}
html[data-codex-style="modern"] .app .dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
html[data-codex-style="modern"] .app .book-cash{gap:7px!important}
html[data-codex-style="modern"] .app .book-card{border-radius:6px!important;padding:10px!important}
html[data-codex-style="modern"] .app .tabs{position:sticky!important;top:74px!important;z-index:40!important;flex-wrap:nowrap!important;overflow-x:auto!important;padding:7px!important;border-radius:8px!important;background:#203443!important;border:1px solid #345064!important;gap:5px!important}
html[data-codex-style="modern"] .app .tab{border-radius:5px!important;padding:9px 12px!important;min-height:36px!important;font-size:12px!important;white-space:nowrap!important}
html[data-codex-style="modern"] .app .tab.active{background:#0eafa3!important;color:#052c2a!important}
html[data-codex-style="modern"] .app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),html[data-codex-style="modern"] .app select{border-radius:6px!important;padding:8px 10px!important;font-size:13px!important}
html[data-codex-style="modern"] .app .field-label{margin:9px 0 4px!important;font-size:11px!important}
html[data-codex-style="modern"] .app .result-grid{position:sticky!important;bottom:0!important;z-index:30!important;background:#123044!important;border:1px solid #21847e!important;border-radius:8px!important;padding:9px!important;box-shadow:0 -8px 25px rgba(0,0,0,.20)!important;gap:6px!important}
html[data-codex-style="modern"] .app .result-tile{border-radius:5px!important;padding:9px!important}
html[data-codex-style="modern"] .app .result-tile strong{font-size:19px!important}
html[data-codex-style="modern"] .app .calc-actions-row{border-radius:6px!important;padding:9px!important;background:#223b4e!important}
html[data-codex-style="modern"] .app table th,html[data-codex-style="modern"] .app table td{padding:8px 9px!important;font-size:12px!important}
html[data-codex-style="modern"] .app table th{font-size:10px!important}
html[data-codex-style="modern"] .app .archive-item{border-radius:7px!important;padding:12px!important}
html[data-codex-style="modern"] .app .codex-sidebar-toggle{display:none!important}
}
/* Both redesigned experiences retain responsive mobile sidebar behavior */
@media(max-width:1100px){
html[data-codex-style="executive"] .app,html[data-codex-style="modern"] .app{display:block!important}
html[data-codex-style="executive"] .app .main,html[data-codex-style="modern"] .app .main{padding:16px!important}
html[data-codex-style="executive"] .app .dashboard-grid,html[data-codex-style="modern"] .app .dashboard-grid{grid-template-columns:1fr!important}
html[data-codex-style="executive"] .app .workspace,html[data-codex-style="modern"] .app .workspace{padding:12px!important}
}

/* V4: Dashboard layout genuinely changes the placement and hierarchy of sections. */
@media(min-width:1101px){
html[data-codex-style="executive"] .codex-dashboard-layout{
 display:grid!important;grid-template-columns:minmax(0,1.65fr) minmax(285px,.82fr)!important;
 grid-template-areas:"metrics metrics" "charts operations" "accounts operations"!important;
 gap:20px!important;align-items:start!important}
html[data-codex-style="executive"] .codex-dashboard-metrics{grid-area:metrics!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;margin:0!important}
html[data-codex-style="executive"] .codex-dashboard-operations{grid-area:operations!important;min-width:0!important;position:sticky!important;top:22px!important}
html[data-codex-style="executive"] .codex-dashboard-accounts{grid-area:accounts!important;margin:0!important}
html[data-codex-style="executive"] .codex-dashboard-charts{grid-area:charts!important;grid-template-columns:1fr!important;margin:0!important}
html[data-codex-style="executive"] .codex-dashboard-operations .dash-today-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
html[data-codex-style="executive"] .codex-dashboard-operations .dash-today-grid{grid-template-columns:1fr!important;gap:9px!important}
html[data-codex-style="executive"] .codex-dashboard-operations .dash-today-box{padding:17px!important}
html[data-codex-style="executive"] .codex-dashboard-metrics .stat:first-child{border-top:4px solid #caab72!important}
html[data-codex-style="executive"] .codex-dashboard-operations .dash-today-head{align-items:flex-start!important;flex-wrap:wrap!important}
html[data-codex-style="modern"] .codex-dashboard-layout{
 display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(260px,.85fr)!important;
 grid-template-areas:"metrics metrics accounts" "operations charts charts"!important;
 gap:12px!important;align-items:start!important}
html[data-codex-style="modern"] .codex-dashboard-metrics{grid-area:metrics!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;margin:0!important}
html[data-codex-style="modern"] .codex-dashboard-operations{grid-area:operations!important;min-width:0!important}
html[data-codex-style="modern"] .codex-dashboard-accounts{grid-area:accounts!important;margin:0!important}
html[data-codex-style="modern"] .codex-dashboard-charts{grid-area:charts!important;grid-template-columns:1fr 1fr!important;margin:0!important}
html[data-codex-style="modern"] .codex-dashboard-operations .dash-today-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
html[data-codex-style="modern"] .codex-dashboard-operations .dash-today-grid{grid-template-columns:1fr!important;gap:7px!important}
html[data-codex-style="modern"] .codex-dashboard-operations .dash-today-box{padding:14px!important}
html[data-codex-style="modern"] .codex-dashboard-metrics .stat{min-height:108px!important}
html[data-codex-style="modern"] .codex-dashboard-accounts .book-cash{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(min-width:1101px) and (max-width:1510px){
html[data-codex-style="executive"] .codex-dashboard-layout{grid-template-columns:minmax(0,1fr) minmax(255px,.78fr)!important}
html[data-codex-style="modern"] .codex-dashboard-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-areas:"metrics accounts" "operations charts"!important}
html[data-codex-style="modern"] .codex-dashboard-charts{grid-template-columns:1fr!important}
}
@media(max-width:1100px){
.codex-dashboard-layout{display:block!important}
.codex-dashboard-layout>*{margin-bottom:14px!important}
}
