/* Dashboard-only refinement. No public, admin, or business-rule changes. */
#dashboardOverlay .dash-page[data-workspace-pending]>:not(.workspace-section-state):not(.dash-h1):not(.dash-sub){display:none!important}
#dashboardOverlay .workspace-section-state{padding:24px;border:1px solid var(--d-border);border-radius:12px;background:var(--d-panel);color:var(--d-muted);line-height:1.6}
#dashboardOverlay .workspace-section-state p{margin:0 0 12px}
.workspace-load-notice{position:absolute;right:24px;top:72px;z-index:24;max-width:calc(100% - 48px);padding:7px 12px;background:var(--d-panel);border:1px solid var(--d-border);border-radius:8px;color:var(--d-muted);font-size:12px;display:flex;align-items:center;gap:12px}
.workspace-load-notice[hidden]{display:none}
.workspace-load-notice button{border:0;background:transparent;color:var(--d-accent);font:inherit;cursor:pointer;padding:4px}
#dashboardOverlay[data-dashboard-loading] #pgKeyWarn{display:none!important}
#dashboardOverlay[data-dashboard-loading] .cc-kpi .k-val{color:transparent;background:var(--d-line);border-radius:5px;width:90px;max-width:100%}
#dashboardOverlay{--d-bg:#0b100e;--d-panel:#121a16;--d-rail:#0f1512;--d-border:#29362f;--d-line:#223027;--d-text:#edf4ef;--d-muted:#a9b9af;--d-dim:#9bac9f;--d-faint:#88998e;--d-accent:#72dfb5;--d-shadow:none;height:var(--dashboard-height,100dvh);overflow:hidden}
html[data-theme="light"] #dashboardOverlay{--d-bg:#f4f7f5;--d-panel:#fff;--d-rail:#edf3ef;--d-border:#cad8cf;--d-line:#dce5df;--d-text:#172a20;--d-muted:#4d6355;--d-dim:#526958;--d-faint:#5a7060;--d-accent:#187451}
#dashboardOverlay .dash-workspace{min-height:0!important;height:100%;min-width:0}
#dashboardOverlay .dash-topbar{min-height:64px;flex-shrink:0;padding:10px 24px;gap:16px;background:var(--d-bg)}
#dashboardOverlay #dashTitle{display:block!important;font-size:15px;font-weight:600;white-space:nowrap}
#dashboardOverlay .topbar-search{max-width:280px;min-width:100px;margin-right:auto}
#dashboardOverlay .dash-topbar-right{gap:8px}
#dashboardOverlay .dash-topbar-identity,#dashboardOverlay .close-dash{display:none}
#dashboardOverlay .dash-main{padding:28px 32px;min-height:0;min-width:0;overscroll-behavior:contain;scrollbar-gutter:stable}
#dashboardOverlay .dash-page{max-width:1200px;margin-inline:auto;min-width:0}
#dashboardOverlay .dash-h1{font-size:26px;letter-spacing:-.6px;line-height:1.3}
#dashboardOverlay .dash-sub{font-size:14px;line-height:1.65;max-width:72ch;margin-bottom:24px}
#dashboardOverlay .dash-card{padding:22px;border-radius:12px;box-shadow:none;min-width:0}
#dashboardOverlay .dash-card p{font-size:14px;line-height:1.65}
#dashboardOverlay :is(button,input,select,textarea){font-family:inherit}
#dashboardOverlay :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--d-accent);outline-offset:3px}
#dashboardOverlay :is(input,select,textarea){max-width:100%;min-width:0}
#dashboardOverlay :is(button,.dash-nav-item){min-height:44px}
#dashboardOverlay .dash-nav{overflow-y:auto;min-height:0;padding:12px 8px}
#dashboardOverlay .dash-nav-item{border:0;border-radius:8px;margin:3px 0;font-size:14px;gap:12px}
#dashboardOverlay .dash-sidebar{min-height:0;height:100%;flex-shrink:0}
#dashboardOverlay .dash-sidebar-foot{flex-shrink:0}
#dashboardOverlay .cc-kpi-grid{gap:12px}
#dashboardOverlay .cc-kpi{padding:18px;border-radius:10px;box-shadow:none;min-width:0}
#dashboardOverlay .cc-kpi .k-lab{font-size:13px}
#dashboardOverlay .cc-kpi .k-val{font-size:28px;overflow-wrap:anywhere}
#dashboardOverlay :is(.cc-head,.api-head){gap:16px;flex-wrap:wrap}
#dashboardOverlay :is(.cc-grid,.test-grid,.api-base-grid,.stat-grid){gap:16px;min-width:0}
#dashboardOverlay :is(.cc-grid,.test-grid,.api-base-grid,.stat-grid)>*{min-width:0}
#dashboardOverlay :is(.billing-table-wrap,.table-wrap){max-width:100%;overflow:auto}
#dashboardOverlay :is(th,td){font-size:13px;line-height:1.5}
#dashboardOverlay .billing-fact span{font-size:12px}
#dashboardOverlay .billing-fact strong{font-size:15px}
#dashboardOverlay .dash-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#dashboardOverlay :is(pre,code){overflow-wrap:anywhere}
#dashboardOverlay pre{max-width:100%;overflow:auto}
#dashboardOverlay .dash-main:has(#dash-playground.active){display:flex;overflow:hidden;padding:16px 24px}
#dashboardOverlay #dash-playground.active{display:flex;flex:1;min-height:0;width:100%;max-width:1100px}
#dash-playground .pg-wrap{height:100%;width:100%;min-height:0;gap:10px}
#dash-playground .pg-header{display:none}
#dash-playground .pg-layout{display:flex;flex-direction:column;flex:1;min-height:0;gap:10px}
#dash-playground .pg-history{flex:none;max-height:none;border:0;background:transparent;position:relative;overflow:visible}
#dash-playground .pg-history-head{padding:0;border:0}
#dash-playground .pg-history-list{display:none}
#dash-playground .pg-history.open .pg-history-list{display:block;position:absolute;z-index:20;top:100%;left:0;width:min(340px,85vw);max-height:45dvh;overflow:auto;background:var(--d-panel);border:1px solid var(--d-border);border-radius:12px;padding:8px;box-shadow:0 12px 32px #0004}
#dash-playground .pg-chat-wrap{flex:1;height:auto!important;min-height:0!important;max-height:none!important;border:0;border-radius:0;overflow:visible}
#dash-playground .pg-toolbar{padding:0 0 10px;flex-shrink:0;background:transparent}
#dash-playground .pg-model-kicker,#dash-playground .pg-stat{display:none}
#dash-playground .pg-chat{flex:1;min-height:0;overflow-y:auto;padding:24px max(8px,calc((100% - 780px)/2));scrollbar-width:thin}
#dash-playground .pg-empty{margin:auto;padding:24px 12px;max-width:620px}
#dash-playground .pg-empty h3{font-size:30px;letter-spacing:-.8px;font-weight:600}
#dash-playground .pg-empty p{font-size:15px;line-height:1.7}
#dash-playground .pg-suggestions{flex-wrap:wrap;justify-content:center}
#dash-playground .pg-suggestion{font-size:13px;border-radius:8px;min-height:44px}
#dash-playground .pg-composer{width:min(100%,820px);align-self:center;flex-shrink:0;margin:12px 0 0;padding:12px 14px;border-radius:16px;box-shadow:none}
#dash-playground .pg-input-wrap textarea{font-size:16px;min-height:52px}
#dash-playground .pg-composer-foot{padding-top:8px}
#dash-playground .pg-plan-note{font-size:11px;line-height:1.5;margin:6px 0 0;flex-shrink:0}
#dash-playground .pg-msg{min-width:0}
#dash-playground .pg-bubble{font-size:15px;line-height:1.8;overflow-wrap:anywhere}
#dash-playground .pg-composer-model .pg-model-picker{max-width:min(400px,48vw)}
#dash-playground .pg-composer-model summary{font-size:13px;min-height:44px}
#dashboardOverlay .dashboard-account{position:relative;flex-shrink:0}
#dashboardOverlay .dashboard-account>summary{cursor:pointer;list-style:none;display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--d-border);border-radius:50%;color:var(--d-accent);background:var(--d-panel)}
#dashboardOverlay .dashboard-account-panel{position:absolute;right:0;top:52px;width:250px;padding:16px;display:grid;gap:14px;background:var(--d-panel);border:1px solid var(--d-border);border-radius:12px;box-shadow:0 12px 32px #0005;z-index:40}
#dashboardOverlay .dashboard-account-panel .dash-topbar-identity{display:grid;max-width:100%;gap:6px}
#dashboardOverlay .dashboard-account-panel .dash-topbar-name{font-size:14px}
#dashboardOverlay .dashboard-account-panel .dash-topbar-email{font-size:12px}
#dashboardOverlay .dashboard-account-panel .language-switch{display:flex}
#dashboardOverlay .dashboard-account-panel .theme-toggle{display:flex;width:fit-content}
#dashboardOverlay .dashboard-account-panel .theme-toggle button{width:44px}
@media(min-width:769px){#dashboardOverlay:not(.rail-collapsed) .dash-sidebar{width:224px}#dashboardOverlay .dash-sidebar .dash-ws{padding:18px 14px}#dashboardOverlay .dash-sidebar .ws-name{font-size:15px}}
@media(max-width:1100px){#dashboardOverlay .topbar-search{display:none}#dashboardOverlay .dash-topbar-right{margin-left:auto}#dashboardOverlay .cc-doc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:768px){
 #dashboardOverlay #dashSidebar{position:fixed;z-index:60}
 #dashboardOverlay .dash-sidebar-scrim{z-index:50}
 #dashboardOverlay .dash-topbar{display:flex;height:60px;min-height:60px;padding:8px 12px;flex-wrap:nowrap;gap:8px}
 #dashboardOverlay .dash-topbar-right{position:static;display:flex;width:auto;flex:0 1 auto;gap:6px;min-width:0;flex-wrap:nowrap;grid-column:auto}
 #dashboardOverlay .dash-balance{padding:6px 9px;min-width:0;max-width:140px;border-radius:8px}
 #dashboardOverlay .dash-balance svg,#dashboardOverlay .dash-balance-held{display:none!important}
 #dashboardOverlay .dash-balance-amt{font-size:12px;overflow:hidden;text-overflow:ellipsis}
 #dashboardOverlay .dash-burger{display:grid;place-items:center;width:44px;height:44px}
 #dashboardOverlay .dash-main{padding:20px 16px}
 #dashboardOverlay .dash-main:has(#dash-playground.active){padding:8px 12px}
 #dashboardOverlay .dash-h1{font-size:24px}
 #dashboardOverlay .dash-card{padding:16px}
 #dashboardOverlay :is(.cc-grid,.test-grid,.api-base-grid,.cc-doc-grid,.dash-plan-grid){grid-template-columns:minmax(0,1fr)}
 #dashboardOverlay :is(.cc-kpi-grid,.stat-grid){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #dashboardOverlay .cc-kpi{padding:14px}
 #dashboardOverlay .cc-kpi .k-val{font-size:23px}
 #dashboardOverlay .cc-log-row{min-width:720px}
 #dashboardOverlay .cc-card:has(.cc-log-row){overflow:auto}
 #dashboardOverlay :is(input,select,textarea){font-size:16px}
 #dash-playground .pg-toolbar{flex-direction:row;align-items:center;gap:8px}
 #dash-playground .pg-toolbar-actions{width:auto;margin-left:auto}
 #dash-playground .pg-empty h3{font-size:25px}
 #dash-playground .pg-empty{padding:12px;gap:12px;min-height:0}
 #dash-playground .pg-chat{padding:12px 2px}
 #dash-playground .pg-suggestions{flex-direction:column;gap:6px}
 #dash-playground .pg-composer{margin-top:8px;padding:8px 10px}
 #dash-playground .pg-composer-foot{flex-wrap:nowrap;gap:4px}
 #dash-playground .pg-plan-note{display:none}
 #dash-playground .pg-input-wrap textarea{min-height:44px;max-height:100px}
 #dash-playground .pg-composer-model{flex:1;min-width:0}
 #dash-playground .pg-composer-model .pg-model-picker{max-width:100%}
 #dash-playground .pg-composer-model summary span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
#dashboardOverlay .code-row{min-width:0;max-width:100%}
#dashboardOverlay .code-row code{min-width:0;flex:1;overflow:auto}
#dashboardOverlay .copy-btn{flex-shrink:0}
#dashboardOverlay :is(.apikey-box,.ref-link-box){min-width:0;max-width:100%;gap:8px;flex-wrap:wrap}
#dashboardOverlay :is(.apikey-box,.ref-link-box)>span{min-width:0;flex:1 1 120px;overflow-wrap:anywhere;white-space:normal}
@media(max-width:768px){#dashboardOverlay .dash-topbar>div:first-child{width:auto;flex:1;min-width:0}#dashboardOverlay .dash-topbar-right{flex:none;margin-left:auto}#dashboardOverlay .dash-topbar-right>.round-btn{display:none}#dashboardOverlay .dash-topbar #dashTitle{overflow:hidden;text-overflow:ellipsis}#dash-playground .pg-empty{align-content:center;flex:1;gap:18px}#dash-playground .pg-empty p{margin:0}#dash-playground .pg-suggestions{margin-top:6px}}
@media(max-width:370px){#dashboardOverlay .dash-topbar-right>.round-btn{display:none}#dashboardOverlay .dash-balance{max-width:112px}#dashboardOverlay #dashTitle{font-size:13px}}
@media(prefers-reduced-motion:reduce){#dashboardOverlay *,#dashboardOverlay *::before,#dashboardOverlay *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
