/* DW-02.1 Unified Layout — Stage-only final override */
:root{--dw-navy:#102a43;--dw-blue:#146c94;--dw-teal:#14b8a6;--dw-canvas:#f3f7fb;--dw-ink:#172f44}
body:has(.shell){background:var(--dw-canvas)}
.shell{display:grid!important;grid-template-columns:270px minmax(0,1fr)!important;align-items:stretch!important;min-height:100vh!important;direction:ltr!important}
.shell .side{position:sticky!important;inset:auto!important;top:0!important;left:auto!important;right:auto!important;grid-column:1!important;grid-row:1!important;width:270px!important;max-width:270px!important;height:100vh!important;overflow-y:auto!important;transform:none!important;background:linear-gradient(170deg,#102a43,#123d57)!important}
.shell .main{grid-column:2!important;grid-row:1!important;min-width:0!important;width:auto!important;max-width:100%!important;margin:0!important;padding:28px clamp(18px,2.6vw,40px)!important;direction:ltr}
html[dir=rtl] .shell{direction:rtl!important;grid-template-columns:270px minmax(0,1fr)!important}
html[dir=rtl] .shell .side{grid-column:1!important;left:auto!important;right:auto!important;direction:rtl!important}
html[dir=rtl] .shell .main{grid-column:2!important;direction:rtl!important;margin:0!important}
.shell .main .card{background:#fff;border-color:#e2eaf1!important;box-shadow:0 5px 22px rgba(16,42,67,.035)!important}
.shell .main .hero{background:linear-gradient(115deg,#102a43,#146c94 65%,#0f8f91)!important}
.shell .main .btn:not(.secondary){background:#146c94}
.shell .main .btn:not(.secondary):hover{background:#105a7b}
.shell .nav a.active{background:rgba(20,184,166,.16)!important}
.dw-workspace-bar{background:#fff!important;box-shadow:0 6px 24px rgba(16,42,67,.04)!important}
.shell .main table{display:table;max-width:100%}
.shell .main .section{min-width:0;max-width:100%}
.shell .main .grid{min-width:0}
@media(max-width:850px){
 .shell,html[dir=rtl] .shell{display:block!important;min-height:100vh!important}
 .shell .side,html[dir=rtl] .shell .side{position:fixed!important;top:0!important;bottom:0!important;height:100dvh!important;max-width:85vw!important;width:270px!important;z-index:110!important;transition:transform .25s ease!important}
 .shell .side{left:0!important;right:auto!important;transform:translateX(-105%)!important}
 html[dir=rtl] .shell .side{left:auto!important;right:0!important;transform:translateX(105%)!important}
 body.dw-menu-open .shell .side,html[dir=rtl] body.dw-menu-open .shell .side{transform:translateX(0)!important}
 .shell .main,html[dir=rtl] .shell .main{width:100%!important;max-width:100%!important;margin:0!important;padding:76px 16px 24px!important}
 .dw-menu-toggle{display:grid!important;place-items:center!important}
}
@media(prefers-reduced-motion:reduce){.shell .side{transition:none!important}}

/* DW-CONTRAST-RC2: keyboard visibility on workspace navigation */
.shell :is(button,a,input,select,textarea):focus-visible{outline:3px solid #16a5c5;outline-offset:3px}

/* DW-CONTRAST-RC3: secondary text on light application surfaces.
   Scoped to dashboard and billing main views; no colored button overrides. */
body:has(#dwCommandCenter) .main .top>div>div:not(:first-child),
body:has(#dwBillingPlans) .main .top>div>div:not(:first-child){color:#485b70}
#dwCommandCenter .card :is(small,.muted){color:#485b70}
#dwCommandCenter .card .top small{color:#485b70}
#dwBillingPlans .card .muted{color:#485b70}
