/* Scoped commercial reporting and the four shared Admin Overview tiles. */
body:has(#metricsGrid .admin-navigation-groups) .admin-hero-actions:has([data-open-commercial]){display:grid;grid-template-columns:repeat(4,172px);align-items:stretch;gap:18px}
body:has(#adminView:not(.hidden) [data-commercial-dashboard]) .hero-panel,body:has(#adminView:not(.hidden) [data-commercial-dashboard]) #metricsGrid{display:none}
body:has(#adminView:not(.hidden) [data-commercial-dashboard]) .app-shell{max-width:1600px;width:100%}
body.portal-authenticated #adminView:has([data-commercial-dashboard]){padding-top:64px}
.commercial-dashboard{color:#092747;padding:0 12px 40px;max-width:1500px;margin:auto}
.commercial-toolbar{display:flex;align-items:center;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.commercial-toolbar button{padding:10px 16px;border:1px solid #d8e2eb;border-radius:10px;background:#fff;color:#153a5e;font:inherit;cursor:pointer}
.commercial-toolbar [data-live]{margin-left:auto;font-size:12px;color:#27684f;font-weight:700}
.commercial-hero{position:relative;isolation:isolate;overflow:hidden;border-radius:22px;min-height:300px;display:flex;align-items:center;padding:44px 42px 76px;background:#082747}
.commercial-hero:before{content:'';position:absolute;inset:-4px;z-index:-2;background:url('./public/assets/academy-commercial-classroom.jpg') center 65% /cover no-repeat; background-position:center 65%;background-size:cover;filter:blur(1.4px)}
.commercial-hero:after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(4,26,49,.96),rgba(4,26,49,.83) 42%,rgba(4,26,49,.3))}
.commercial-hero p,.commercial-summary>p:first-child{font-size:12px;font-weight:800;letter-spacing:.18em;color:#e2b653;margin:0 0 18px}
.commercial-hero h1{font-size:clamp(30px,3.6vw,49px);line-height:1.1;color:#fff;margin:0 0 16px;letter-spacing:-.03em}
.commercial-hero span{color:#e3eaf2;font-size:17px}
.commercial-kpis{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:-42px 22px 24px}
.commercial-kpi{background:#fff;border:1px solid #e1e8ef;border-radius:17px;padding:24px;box-shadow:0 7px 24px #08274709;min-width:0;transition:transform .2s,box-shadow .2s}
.commercial-kpi:hover{transform:translateY(-2px);box-shadow:0 10px 28px #08274713}
.commercial-kpi p{font-size:11px;letter-spacing:.08em;font-weight:800;color:#60738a;margin:0 0 16px}
.commercial-kpi strong{display:block;font-size:clamp(30px,3vw,44px);line-height:1.1;letter-spacing:-.035em;margin-bottom:14px;color:#082747}
.commercial-kpi span{display:block;font-size:12px;line-height:1.55;color:#62758a}
.commercial-kpis .commercial-kpi:last-child{border-top:3px solid #c99731}
.commercial-operations{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:0 0 24px}
.commercial-operations .commercial-kpi{padding:19px;box-shadow:none}.commercial-operations strong{font-size:28px}
.commercial-lower{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(285px,1fr);gap:22px}
.commercial-activity{padding:26px;background:#fff;border:1px solid #e1e8ef;border-radius:19px;min-width:0;box-shadow:0 7px 24px #08274709}
.commercial-section-heading{display:flex;align-items:center;gap:14px;margin-bottom:26px}.commercial-section-heading>span{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:#082747;color:#fff;font-size:23px;flex-shrink:0}
.commercial-section-heading h2{margin:0 0 5px;font-size:21px}.commercial-section-heading p{margin:0;font-size:13px;color:#677d94}
.commercial-table{overflow-x:auto} .commercial-table table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}.commercial-table th{font-weight:700;background:#f3f7fb;color:#566e87;padding:14px 10px}.commercial-table td{padding:20px 10px;border-bottom:1px solid #e6edf3}.commercial-table td:first-child{font-weight:700}.commercial-status{color:#315a73;background:#edf4f8;border-radius:20px;padding:5px 9px;white-space:nowrap}
.commercial-note{font-size:11px;line-height:1.6;color:#6c7f93;margin-top:24px}
.commercial-summary{border-radius:19px;background:linear-gradient(135deg,#082747,#153b60);padding:28px;color:#fff;box-shadow:0 7px 24px #08274715}.commercial-summary h2{color:#fff;font-size:25px;margin:0 0 22px}.commercial-summary dl{margin:0 0 22px}.commercial-summary dl div{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid #ffffff20}.commercial-summary dd{font-weight:800;margin:0}.commercial-summary dt{font-size:13px}.commercial-total{color:#f5ce75}.commercial-summary>p:not(:first-child){font-size:12px;display:flex;justify-content:space-between;gap:14px}.commercial-summary small{display:block;color:#becddc;font-size:11px;line-height:1.65;margin-top:20px}.commercial-loading{padding:40px;background:#fff;border-radius:16px}
@media(max-width:1350px){body:has(#metricsGrid .admin-navigation-groups) .hero-panel.admin-hero-panel{grid-template-columns:1fr}body:has(#metricsGrid .admin-navigation-groups) .admin-hero-actions:has([data-open-commercial]){grid-template-columns:repeat(4,minmax(0,1fr));width:100%}body:has(#metricsGrid .admin-navigation-groups) .admin-hero-actions:has([data-open-commercial]) .admin-tool-card{width:100%}}
@media(max-width:950px){.commercial-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.commercial-operations{grid-template-columns:repeat(3,minmax(0,1fr))}.commercial-lower{grid-template-columns:1fr}}
@media(max-width:600px){body:has(#metricsGrid .admin-navigation-groups) .admin-hero-actions:has([data-open-commercial]){grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.commercial-dashboard{padding:0 0 25px}.commercial-hero{padding:30px 23px 65px;min-height:280px}.commercial-kpis{gap:10px;margin:-32px 10px 18px}.commercial-kpi{padding:18px 14px}.commercial-kpi strong{font-size:28px}.commercial-operations{grid-template-columns:repeat(2,minmax(0,1fr))}.commercial-toolbar{gap:10px}.commercial-toolbar [data-live]{order:3;width:100%;margin:0}.commercial-activity{padding:18px}.commercial-table th,.commercial-table td{padding:12px 8px}.commercial-summary{padding:23px}}
@media(prefers-reduced-motion:reduce){.commercial-kpi{transition:none}}
/* Dashboard-only polish: retain account controls everywhere else. */
body:has(#adminView:not(.hidden) [data-commercial-dashboard]) > aside[aria-label="TFE account"]{display:none}
.commercial-toolbar [data-refresh]{min-width:158px;display:inline-flex;justify-content:center;align-items:center;gap:8px;transition:transform .18s,background-color .2s,border-color .2s,box-shadow .2s;color:#153a5e}
.commercial-toolbar [data-refresh]:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px #08274713}
.commercial-toolbar [data-refresh]:active:not(:disabled){transform:translateY(1px) scale(.98);box-shadow:inset 0 2px 4px #08274712}
.commercial-toolbar [data-refresh-icon]{display:inline-block;width:1em;text-align:center}
.commercial-toolbar [data-refresh][data-state="loading"]{cursor:wait;opacity:1;background:#f3f6fa}
.commercial-toolbar [data-state="loading"] [data-refresh-icon]{animation:commercial-refresh-spin .85s linear infinite}
.commercial-toolbar [data-refresh][data-state="success"]{background:#e8f5ec;border-color:#b9ddc6;color:#256b43}
.commercial-toolbar [data-refresh][data-state="error"]{background:#fff8ee;border-color:#dfc9a5;color:#79582c}
.commercial-toolbar [data-refresh-message]{flex-basis:100%;min-height:1.2em;font-size:12px;color:#79582c}
@keyframes commercial-refresh-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.commercial-toolbar [data-refresh]{transition:none}.commercial-toolbar [data-refresh]:hover:not(:disabled),.commercial-toolbar [data-refresh]:active:not(:disabled){transform:none}.commercial-toolbar [data-state="loading"] [data-refresh-icon]{animation:none}}
