/* v25.16 | NEW administrative workspace layout.
   Intentionally replaces the old desktop left column with one horizontal
   navigation bar, a generous content stage, and a responsive navigation drawer.
   Visual-only changes: no API, permission or data-store code is altered. */
:root{--workspace-bg:#f4f6f9;--workspace-paper:#fff;--workspace-ink:#172332;--workspace-muted:#67768b;--workspace-line:#e4e9f0;--workspace-blue:#245aa4;--workspace-blue-soft:#edf3fd;--workspace-focus:#dceafa;--workspace-shadow:0 3px 15px rgba(26,49,83,.035)}
html,body{background:var(--workspace-bg)!important;color:var(--workspace-ink)!important}
#dashboard.shell{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;min-height:100dvh!important;background:var(--workspace-bg)!important}
/* Horizontal global navigation, rather than the previous fixed left sidebar */
#dashboard .nav{position:sticky!important;inset:auto!important;top:0!important;transform:none!important;display:flex!important;flex-direction:row!important;align-items:center!important;flex-wrap:nowrap!important;gap:15px!important;height:72px!important;min-height:72px!important;max-height:72px!important;width:100%!important;margin:0!important;padding:0 clamp(22px,3.1vw,52px)!important;overflow:visible!important;border:0!important;border-bottom:1px solid var(--workspace-line)!important;background:#fff!important;box-shadow:0 5px 18px rgba(33,52,79,.035)!important;z-index:90!important}
#dashboard .nav h2{display:flex!important;align-items:center!important;white-space:nowrap!important;flex:0 0 auto!important;margin:0 15px 0 0!important;padding:0!important;border:0!important;color:#152944!important;font-size:14px!important;font-weight:860!important;letter-spacing:.085em!important}
#dashboard .nav h2 svg{width:22px!important;height:22px!important;margin-right:9px!important;stroke:#245aa4!important}
#dashboard .admin-nav-group{display:flex!important;flex:0 0 auto!important;flex-direction:row!important;align-items:center!important;gap:3px!important;margin:0!important;padding:0!important;border:0!important}
#dashboard .admin-nav-label,#dashboard .nav small{display:none!important}
#dashboard .admin-nav-group button,#dashboard .admin-nav-group a{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:0!important;height:38px!important;min-height:38px!important;margin:0!important;padding:0 11px!important;white-space:nowrap!important;border:1px solid transparent!important;border-radius:8px!important;background:transparent!important;color:#65748a!important;font-size:11px!important;font-weight:720!important;transition:background .15s ease,color .15s ease,border-color .15s ease!important}
#dashboard .admin-nav-group button svg,#dashboard .admin-nav-group a svg{width:15px!important;height:15px!important;margin-right:1px!important;opacity:.78!important}
#dashboard .admin-nav-group button.active{color:#234f8f!important;background:#eaf1fc!important;border-color:#d8e5f6!important}
#dashboard .admin-nav-group button:hover,#dashboard .admin-nav-group a:hover{color:#234f8f!important;background:#f2f6fc!important}
#dashboard .admin-nav-group-bottom{margin-left:auto!important;flex:0 0 auto!important;padding-left:14px!important;border-left:1px solid var(--workspace-line)!important}
#dashboard .admin-nav-group-bottom button{background:#fff!important;border-color:#e3e8f0!important}
/* Main stage and hierarchy */
#dashboard .main{flex:1 1 auto!important;min-width:0!important;width:100%!important;max-width:none!important;padding:27px clamp(20px,3.1vw,52px) 60px!important;background:var(--workspace-bg)!important}
#dashboard .main>section,#dashboard .main-head{max-width:1680px!important;margin-left:auto!important;margin-right:auto!important}
#dashboard .main-head{border:0!important;margin-bottom:25px!important;padding:0 0 2px!important;align-items:flex-end!important;min-height:74px!important}
#dashboard .main-head .eyebrow{color:#8190a5!important;font-size:10px!important;letter-spacing:.13em!important}
#dashboard .main-head h1{font-size:clamp(23px,2.2vw,31px)!important;line-height:1.1!important;margin:6px 0 7px!important;letter-spacing:-.045em!important;color:#172b45!important}
#dashboard .main-head .sub{color:#8190a2!important;line-height:1.5!important}
#dashboard .head-actions{display:flex!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important;justify-content:flex-end!important}
#dashboard .head-actions .btn{min-height:37px!important}
#dashboard .mobile-nav-toggle{display:none!important}
#dashboard .metrics{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:11px!important;margin-bottom:23px!important}
#dashboard #trades-view .metrics{grid-template-columns:repeat(4,minmax(0,1fr))!important}
#dashboard .metric{min-width:0!important;min-height:96px!important;padding:17px 18px!important;border:1px solid var(--workspace-line)!important;border-radius:11px!important;background:#fff!important;box-shadow:var(--workspace-shadow)!important}
#dashboard .metric span{font-size:10px!important;color:#75859c!important;font-weight:660!important;letter-spacing:.035em!important}
#dashboard .metric strong{font-size:clamp(17px,1.55vw,25px)!important;line-height:1.2!important;letter-spacing:-.04em!important;margin-top:13px!important;color:#21344d!important;overflow:hidden;text-overflow:ellipsis}
#dashboard .panel,#dashboard .account-detail,#dashboard .profile-card{background:#fff!important;border:1px solid var(--workspace-line)!important;box-shadow:var(--workspace-shadow)!important;border-radius:12px!important}
#dashboard .panel{padding:22px 24px!important;margin-bottom:17px!important}
#dashboard .panel .split-head{align-items:center!important;margin-bottom:17px!important;flex-wrap:wrap!important;gap:10px!important}
#dashboard .panel h2{font-size:15px!important;font-weight:790!important;letter-spacing:-.025em!important;color:#1d3049!important}
#dashboard .panel h2 + p{max-width:750px!important;line-height:1.65!important}
#dashboard .btn{border:1px solid #dce4ee!important;border-radius:7px!important;background:#fff!important;color:#344b68!important;box-shadow:none!important;padding:8px 12px!important;min-height:34px!important;font-weight:690!important;font-size:11px!important}
#dashboard .btn:hover{background:#f2f6fa!important;border-color:#becfe2!important;color:#244e85!important;filter:none!important}
#dashboard .btn.primary{background:#245aa4!important;border-color:#245aa4!important;color:#fff!important}
#dashboard .btn.primary:hover{background:#1a4888!important;color:#fff!important}
#dashboard .btn.danger{background:#fff5f5!important;color:#b23e47!important;border-color:#f5d7d9!important}
#dashboard .table-wrap{border:1px solid #e8edf3!important;border-radius:9px!important;background:#fff!important;overflow:auto!important}
#dashboard table{border-spacing:0!important}
#dashboard table th{position:sticky;top:0;z-index:2;text-align:left!important;background:#f7f9fc!important;border-bottom:1px solid #e4eaf2!important;color:#6c7e94!important;font-size:10px!important;text-transform:none!important;letter-spacing:.045em!important;font-weight:750!important;padding:13px 12px!important}
#dashboard table td{border-bottom:1px solid #edf1f6!important;color:#34455d!important;font-size:11.5px!important;padding:13px 12px!important}
#dashboard table tbody tr:last-child td{border-bottom:0!important}
#dashboard table tbody tr:hover td{background:#f7faff!important}
#dashboard .trade-table-wrap{max-height:66vh!important;border-radius:9px!important}
#dashboard .tabbuttons{display:flex!important;gap:3px!important;border-bottom:1px solid #e0e7f0!important;overflow-x:auto!important;scrollbar-width:thin}
#dashboard .tabbuttons button{position:relative!important;white-space:nowrap!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;background:transparent!important;font-size:11px!important;color:#72819a!important;font-weight:720!important;padding:12px 15px!important}
#dashboard .tabbuttons button.active{background:transparent!important;border-bottom-color:#285fbc!important;color:#285fbc!important}
#dashboard .tabbuttons button:hover{background:#f3f7fc!important;color:#224f8d!important}
#dashboard .trade-filters{gap:17px!important}
#dashboard .trade-filter-controls{display:grid!important;grid-template-columns:minmax(230px,1.05fr) minmax(280px,1.1fr) auto!important;gap:14px!important;background:#f9fbfe!important;border:1px solid #e6ebf2!important;padding:16px!important;border-radius:9px!important;align-items:end!important}
#dashboard .field{font-size:11px!important;line-height:1.5!important;gap:6px!important;color:#61738b!important}
#dashboard .field input,#dashboard .field select,#dashboard .trade-filter-controls input,#dashboard .trade-filter-controls select{min-height:39px!important;background:#fff!important;border:1px solid #dce5ef!important;color:#20364f!important;box-shadow:none!important;border-radius:7px!important;padding:9px 11px!important;font-size:12px!important}
#dashboard .field input:focus,#dashboard .field select:focus{outline:2px solid #dceafa!important;border-color:#729aca!important}
#dashboard .trade-edit-form,#dashboard .margin-example,#dashboard .profile-metrics>div,#dashboard .health-item,#dashboard .status-report>div{background:#fafcfe!important;border:1px solid #e4ebf4!important;box-shadow:none!important}
#dashboard .trade-edit-form{border-radius:9px!important;padding:13px!important}
#dashboard .trade-edit-form input{background:#fff!important;color:#21364d!important;border-color:#d7e2ee!important}
#dashboard .profile-card{padding:20px!important;min-width:0!important}
#dashboard .profile-layout{gap:15px!important;align-items:start!important}
#dashboard .account-detail{margin-top:22px!important;padding:23px!important}
#dashboard .profile-card h3{font-size:13px!important;color:#253954!important}
#dashboard .profile-metrics>div{min-width:0!important;padding:13px!important}
#dashboard .profile-metrics strong{font-size:18px!important;color:#233d5a!important}
#dashboard .health-state{border-radius:6px!important}
#dashboard .status-grid{gap:14px!important}
#dashboard .pager{gap:9px!important;align-items:center!important}
#dashboard .chip{border-radius:6px!important}
#dashboard .account-detail{scroll-margin-top:95px}
/* Mid-size displays: keep all functions, switch to a proper mobile drawer. */
@media(max-width:1380px){
 #dashboard .nav{position:fixed!important;top:0!important;bottom:0!important;left:0!important;right:auto!important;transform:translateX(-110%)!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:9px!important;width:min(306px,88vw)!important;max-height:100dvh!important;height:100dvh!important;min-height:100dvh!important;overflow-y:auto!important;padding:18px 13px!important;border-right:1px solid #e2e8f0!important;box-shadow:14px 0 40px rgba(23,39,62,.14)!important;transition:transform .2s ease!important;z-index:151!important}
 #dashboard.nav-open .nav{transform:translateX(0)!important}
 #dashboard .nav h2{padding:10px 11px 23px!important;margin:0!important;border-bottom:1px solid #e9eef5!important}
 #dashboard .admin-nav-group{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:4px!important;padding:9px 0!important;width:100%!important;border:0!important;border-bottom:1px solid #ecf0f6!important}
 #dashboard .admin-nav-label{display:block!important;font-size:10px!important;letter-spacing:.13em!important;color:#97a4b5!important;margin:4px 12px 7px!important;font-weight:830!important;text-transform:uppercase!important}
 #dashboard .admin-nav-group button,#dashboard .admin-nav-group a{justify-content:flex-start!important;width:100%!important;height:41px!important;padding:0 13px!important;font-size:12px!important}
 #dashboard .admin-nav-group-bottom{border-left:0!important;margin:0!important;padding-left:0!important;margin-top:auto!important}
 #dashboard .admin-nav-group-bottom button{border-color:transparent!important}
 #dashboard .mobile-nav-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 37px!important;width:37px!important;height:37px!important;margin-right:3px!important;padding:8px!important}
 #dashboard .main{padding:21px 20px 40px!important}
 #dashboard .metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 #dashboard .main-head{align-items:center!important}
 #dashboard .mobile-nav-backdrop{z-index:150!important}
 #dashboard .trade-filter-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
 #dashboard .clear-trade-filters{grid-column:1/-1}
}
@media(max-width:720px){
 #dashboard .main{padding:13px 11px 35px!important}
 #dashboard .main-head{min-height:0!important;gap:10px!important;align-items:center!important;margin-bottom:15px!important}
 #dashboard .main-head h1{font-size:20px!important;margin:4px 0!important}
 #dashboard .main-head .eyebrow{font-size:9px!important}
 #dashboard .main-head .sub{font-size:10px!important}
 #dashboard .head-actions{width:100%!important;justify-content:stretch!important;gap:7px!important}
 #dashboard .head-actions .btn{flex:1 1 100px!important;min-height:36px!important;white-space:normal!important}
 #dashboard .metrics,#dashboard #trades-view .metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-bottom:13px!important}
 #dashboard .metric{min-height:78px!important;padding:12px!important}
 #dashboard .metric strong{font-size:17px!important;margin-top:8px!important}
 #dashboard .metric span{font-size:9px!important}
 #dashboard .panel{padding:13px 11px!important;margin-bottom:11px!important}
 #dashboard .panel .split-head{align-items:center!important;margin-bottom:12px!important}
 #dashboard .panel h2{font-size:13px!important}
 #dashboard .trade-filter-controls{grid-template-columns:1fr!important;gap:10px!important;padding:11px!important}
 #dashboard .trade-filter-controls .field,#dashboard .trade-filter-controls .clear-trade-filters{grid-column:auto!important;width:100%!important}
 #dashboard .account-detail{padding:11px!important;scroll-margin-top:12px!important}
 #dashboard .profile-layout{grid-template-columns:1fr!important;gap:9px!important}
 #dashboard .profile-card{padding:13px!important}
 #dashboard .profile-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
 #dashboard .profile-metrics strong{font-size:16px!important}
 #dashboard .trade-edit-form{gap:8px!important}
 #dashboard .trade-edit-form label{flex-basis:calc(50% - 8px)!important}
 #dashboard .status-grid{grid-template-columns:1fr!important}
 #dashboard .tabbuttons button{font-size:10px!important;padding:10px 11px!important}
 #dashboard .table-wrap{overscroll-behavior-x:contain!important}
 #dashboard .pager{flex-wrap:wrap!important}
}
@media(prefers-reduced-motion:reduce){#dashboard .nav{transition:none!important}}
