/* Performance Studio: modern desktop command center, responsive dashboard, and motion system. */
.performance-studio {
  --bg:#f2f5fa;--card:#fff;--card-soft:#f6f8fc;--text:#101a2e;--muted:#6f7b91;--line:#dbe4f0;
  --blue:#376bff;--blue2:#7757ff;--coral:#654cf2;--coral-soft:#efedff;--purple:#8f55f4;--purple-soft:#f1ebff;
  --mint:#18b985;--mint-soft:#e5f8f1;--sky:#087fbd;--sky-soft:#e7f7ff;--amber:#d17a0d;--amber-soft:#fff2dc;
  --studio-bg:#f2f5fa;--studio-panel:#fff;--studio-panel-2:#f6f8fc;--studio-edge:#dbe4f0;--studio-text:#101a2e;--studio-muted:#6f7b91;
  --studio-blue:#376bff;--studio-cyan:#00a7ca;--studio-mint:#18b985;--studio-purple:#8250ee;--studio-amber:#d98517;
  --studio-shadow:0 18px 45px rgba(25,43,72,.08);background:var(--studio-bg);color:var(--studio-text);
}
.performance-studio.theme-dark {
  --bg:#050912;--card:#0b1323;--card-soft:#101a2d;--text:#f5f8ff;--muted:#8c9ab3;--line:#1b2b47;
  --blue:#4b7dff;--blue2:#8f55ff;--coral:#7c55ff;--coral-soft:#1e1941;--purple:#a46bff;--purple-soft:#21183d;
  --mint:#29daa1;--mint-soft:#0e302b;--sky:#31c9ed;--sky-soft:#0d2937;--amber:#ffad42;--amber-soft:#342413;
  --studio-bg:#050912;--studio-panel:#0b1323;--studio-panel-2:#101a2d;--studio-edge:#1b2b47;--studio-text:#f5f8ff;--studio-muted:#8c9ab3;
  --studio-blue:#4b7dff;--studio-cyan:#22d3ee;--studio-mint:#29daa1;--studio-purple:#a05cff;--studio-amber:#ffad42;
  --studio-shadow:0 22px 55px rgba(0,0,0,.24);
}
body.performance-studio { min-height:100vh;background:radial-gradient(circle at 63% -10%,rgba(55,107,255,.08),transparent 28%),var(--studio-bg); }
.performance-studio * { scrollbar-color:rgba(104,126,164,.5) transparent; }
.performance-studio button:focus-visible,.performance-studio input:focus-visible,.performance-studio textarea:focus-visible,.performance-studio a:focus-visible { outline:2px solid var(--studio-cyan);outline-offset:3px; }

/* Shell and navigation */
.performance-studio .app-shell { max-width:none;min-height:100vh;margin:0;padding:0;display:grid;grid-template-columns:238px minmax(0,1fr);gap:0; }
.performance-studio .workspace { max-width:none;width:100%;min-width:0;margin:0;padding:0 24px 56px; }
.performance-studio .workspace>main { margin:20px 0 0;padding:0; }
.performance-studio .desktop-sidebar {
  position:sticky;top:0;height:100vh;min-height:620px;overflow:auto;padding:18px 14px 14px;display:flex;flex-direction:column;
  border:0;border-right:1px solid #172641;border-radius:0;background:#07101f!important;color:#eef4ff;box-shadow:none;
}
.performance-studio .sidebar-brand { gap:11px;padding:3px 8px 22px; }
.performance-studio .sidebar-brand img { width:42px;height:42px;border-radius:12px;box-shadow:0 0 24px rgba(42,201,231,.2); }
.performance-studio .sidebar-brand b { color:#fff;font-size:14px;letter-spacing:-.02em; }
.performance-studio .sidebar-brand small { color:#8190aa;font-size:9px; }
.performance-studio .desktop-nav { gap:5px; }
.performance-studio .desktop-nav button { position:relative;min-height:46px;padding:0 12px;border:1px solid transparent;border-radius:10px;color:#aab5c9;background:transparent;box-shadow:none!important; }
.performance-studio .desktop-nav button span { color:#7586a4; }
.performance-studio .desktop-nav button b { font-size:12px;font-weight:650; }
.performance-studio .desktop-nav button.active { color:#fff;border-color:#315bb7;background:linear-gradient(100deg,rgba(55,107,255,.25),rgba(109,67,242,.3));box-shadow:inset 3px 0 0 #34d5ef,0 0 25px rgba(55,107,255,.13)!important; }
.performance-studio .desktop-nav button.active span { color:#70dff2; }
.performance-studio .desktop-nav button:nth-child(2) span { color:#8e6cff; }
.performance-studio .desktop-nav button:nth-child(3) span { color:#46dc9f; }
.performance-studio .desktop-nav button:nth-child(4) span { color:#39bfff; }
.performance-studio .desktop-nav button:nth-child(5) span { color:#ffad42; }
.performance-studio .desktop-nav button:nth-child(6) span { color:#30d3dc; }
.performance-studio .sidebar-spacer { flex:1 1 14px;min-height:14px; }
.performance-studio .sidebar-achievement { margin:12px 0;padding:15px;border:1px solid #263457;border-radius:12px;background:linear-gradient(145deg,#121b35,#151435)!important;color:#f7f9ff;box-shadow:none; }
.performance-studio .sidebar-achievement:after { display:none; }
.performance-studio .achievement-mark { width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,#7146ff,#29cdea);box-shadow:0 0 22px rgba(115,72,255,.28); }
.performance-studio .sidebar-achievement b { font-size:11px; }
.performance-studio .sidebar-achievement small { color:#94a0b7;font-size:9px; }
.performance-studio .sidebar-achievement>i { height:4px;margin-top:7px;overflow:hidden;border-radius:2px;background:#222e48; }
.performance-studio .sidebar-achievement>i em { display:block;height:100%;background:linear-gradient(90deg,#6c4aff,#20d9d3); }
.performance-studio .sidebar-theme { min-height:52px;border:1px solid #22304b;border-radius:10px;background:#0c1628;color:#edf2fd; }
.performance-studio .sidebar-theme>svg { color:#b16cff;background:#1d1839; }
.performance-studio .sidebar-theme small { color:#7887a1; }

/* Compact desktop header */
.performance-studio .topbar {
  position:sticky;top:0;z-index:45;height:96px;padding:14px 0;display:flex;align-items:center;gap:18px;border:0;border-bottom:1px solid var(--studio-edge);
  border-radius:0;background:color-mix(in srgb,var(--studio-bg) 92%,transparent);box-shadow:none;backdrop-filter:blur(18px);
}
.performance-studio .top-identity { min-width:255px; }
.performance-studio .top-identity .eyebrow { margin-bottom:2px;color:var(--studio-muted);font-size:8px;letter-spacing:.12em; }
.performance-studio .topbar h1 { color:var(--studio-text);font-size:27px;font-weight:780;letter-spacing:-.045em; }
.performance-subtitle { display:block;margin-top:5px;color:var(--studio-muted);font-size:9px; }
.performance-studio .redesign-header-actions { gap:9px; }
.performance-studio .profile-chip>span b { color:var(--studio-text);font-size:10px; }
.performance-studio .profile-chip>span small { color:var(--studio-muted); }
.performance-studio .profile-avatar { width:40px;height:40px;border-color:var(--studio-edge);box-shadow:0 0 0 1px var(--studio-edge); }
.performance-studio .command-launcher { flex:1 1 390px;max-width:500px;min-width:230px;height:44px;margin:0 auto;padding:0 9px 0 14px;display:flex;align-items:center;justify-content:space-between;border:1px solid var(--studio-edge);border-radius:9px;background:var(--studio-panel);color:var(--studio-muted);box-shadow:none; }
.performance-studio .command-launcher>span { min-width:0;display:flex;align-items:center;gap:9px; }
.performance-studio .command-launcher b { overflow:hidden;font-size:10px;font-weight:550;text-overflow:ellipsis;white-space:nowrap; }
.performance-studio .command-launcher kbd,.command-palette-search kbd { padding:5px 7px;border:1px solid var(--studio-edge);border-radius:5px;background:var(--studio-panel-2);color:var(--studio-muted);font:700 8px/1 inherit; }
.performance-studio #newDealButton.header-add { min-width:112px;height:42px;padding:0 14px;border-radius:9px;background:linear-gradient(110deg,#376bff,#7c45ef)!important;box-shadow:0 9px 22px rgba(72,91,233,.22)!important; }
.performance-studio #privacyToggle { width:40px;height:40px;border-radius:9px;background:var(--studio-panel);border-color:var(--studio-edge);color:var(--studio-muted); }

/* Dashboard grid */
.performance-studio #dashboardPage.active { display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr));align-items:start;gap:14px; }
.performance-studio #dashboardPage>.performance-kpis { order:1!important;grid-column:1/-1; }
.performance-studio #dashboardPage>.month-tile { order:2!important;grid-column:1/-1; }
.performance-studio #dashboardPage>.hero-card { display:none!important; }
.performance-studio #dashboardPage>.goal-card { order:3!important;grid-column:span 5; }
.performance-studio #dashboardPage>#performancePayoutBreakdown { order:4!important;grid-column:span 4; }
.performance-studio #dashboardPage>#quickActions { order:5!important;grid-column:span 3; }
.performance-studio #dashboardPage>.insight-panel { order:6!important;grid-column:1/-1; }
.performance-studio #dashboardPage>.analytics-card { order:7!important;grid-column:span 7; }
.performance-studio #dashboardPage>.month-note-card { order:8!important;grid-column:span 5; }
.performance-studio #dashboardPage>#dealershipPulse { order:9!important;grid-column:span 6; }
.performance-studio #dashboardPage>#commandInsights { order:10!important;grid-column:span 6; }
.performance-studio #dashboardPage>.search-box { order:11!important;grid-column:1/-1; }
.performance-studio #dashboardPage>.filter-pills { order:12!important;grid-column:1/-1;margin:0; }
.performance-studio #dashboardPage>.section-head { order:13!important;grid-column:1/-1; }
.performance-studio #dashboardPage>.deal-list,.performance-studio #dashboardPage>.empty-state { order:14!important;grid-column:1/-1; }

/* KPI row */
.performance-kpis { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px; }
.performance-kpi { position:relative;min-width:0;min-height:108px;padding:15px;display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:11px;overflow:hidden;border:1px solid var(--studio-edge);border-radius:12px;background:var(--studio-panel);box-shadow:var(--studio-shadow);animation:studioRise .48s calc(var(--kpi-index) * 55ms) both; }
.performance-kpi:after { content:"";position:absolute;width:90px;height:90px;right:-46px;top:-48px;border-radius:50%;background:var(--kpi-glow);filter:blur(10px);opacity:.22;pointer-events:none; }
.performance-kpi-icon { width:42px;height:42px;display:grid;place-items:center;border-radius:11px;color:var(--kpi-color);background:var(--kpi-soft);box-shadow:0 0 24px var(--kpi-glow); }
.performance-kpi>div { min-width:0;display:grid;gap:4px; }
.performance-kpi small { color:var(--studio-muted);font-size:8px;font-weight:800;letter-spacing:.09em;text-transform:uppercase; }
.performance-kpi strong { overflow:hidden;color:var(--studio-text);font-size:clamp(18px,1.55vw,27px);font-weight:760;letter-spacing:-.045em;text-overflow:ellipsis;white-space:nowrap; }
.performance-kpi em { overflow:hidden;color:var(--kpi-color);font-size:8px;font-style:normal;font-weight:700;text-overflow:ellipsis;white-space:nowrap; }
.performance-kpi.tone-mint { --kpi-color:var(--studio-mint);--kpi-soft:rgba(41,218,161,.12);--kpi-glow:rgba(41,218,161,.45); }
.performance-kpi.tone-violet { --kpi-color:#a05cff;--kpi-soft:rgba(160,92,255,.13);--kpi-glow:rgba(160,92,255,.42); }
.performance-kpi.tone-cyan { --kpi-color:var(--studio-cyan);--kpi-soft:rgba(34,211,238,.12);--kpi-glow:rgba(34,211,238,.4); }
.performance-kpi.tone-amber { --kpi-color:var(--studio-amber);--kpi-soft:rgba(255,173,66,.12);--kpi-glow:rgba(255,173,66,.38); }
.performance-kpi.tone-purple { --kpi-color:#c069ff;--kpi-soft:rgba(192,105,255,.12);--kpi-glow:rgba(192,105,255,.42); }

/* Period strip */
.performance-studio .month-tile { margin:0;padding:10px 12px;display:grid;grid-template-columns:minmax(260px,.85fr) minmax(145px,.45fr) minmax(170px,.55fr) minmax(330px,1.15fr);align-items:center;gap:10px;overflow:visible;border:1px solid var(--studio-edge)!important;border-radius:12px;background:var(--studio-panel)!important;box-shadow:none; }
.performance-studio .month-tile:after { display:none; }
.performance-studio .month-tile-top { grid-column:auto;min-width:0;min-height:42px;gap:6px; }
.performance-studio .month-tile-top .tile-icon { display:none; }
.performance-studio .month-tile-top p { margin-right:auto;color:var(--studio-text);font-size:10px;font-weight:750; }
.performance-studio .tile-print,.performance-studio .customize-button,.performance-studio .period-status { min-height:32px;padding:0 9px;border:1px solid var(--studio-edge);border-radius:7px;background:var(--studio-panel-2);color:var(--studio-text);font-size:8px;box-shadow:none; }
.performance-studio .period-status { color:var(--studio-mint); }
.performance-studio .month-display { min-height:54px;padding:0 4px;text-align:left; }
.performance-studio .month-display strong { color:var(--studio-text);font-size:18px; }
.performance-studio .month-display span { color:var(--studio-blue);font-size:8px; }
.performance-studio .month-stepper { height:40px;margin:0;border:1px solid var(--studio-edge);border-radius:8px;background:var(--studio-panel-2); }
.performance-studio .month-stepper button { color:var(--studio-cyan); }
.performance-studio .check-compare { margin:0;padding:8px 10px;border:1px solid var(--studio-edge);border-radius:9px;background:var(--studio-panel-2); }
.performance-studio .check-compare-head span { color:var(--studio-text);font-size:9px; }
.performance-studio .check-compare-head small { font-size:8px; }
.performance-studio .check-amounts { gap:6px; }
.performance-studio .check-amounts strong,.performance-studio .check-input input { font-size:11px; }
.performance-studio .check-input { min-height:34px;border-color:var(--studio-edge);background:var(--studio-panel); }

/* Shared cards */
.performance-studio .studio-card,.performance-studio .goal-card,.performance-studio .analytics-card,.performance-studio .month-note-card,.performance-studio .command-card { margin:0;border:1px solid var(--studio-edge)!important;border-radius:12px;background:var(--studio-panel)!important;box-shadow:var(--studio-shadow); }
.studio-card-heading { display:flex;align-items:start;justify-content:space-between;gap:12px; }
.studio-card-heading p { margin:0 0 5px;color:var(--studio-cyan);font-size:8px;font-weight:850;letter-spacing:.11em;text-transform:uppercase; }
.studio-card-heading h2 { margin:0;color:var(--studio-text);font-size:15px;letter-spacing:-.025em; }
.studio-live { display:flex;align-items:center;gap:6px;color:var(--studio-muted);font-size:8px;font-weight:750;text-transform:uppercase;letter-spacing:.07em; }
.studio-live i { width:6px;height:6px;border-radius:50%;background:var(--studio-mint);box-shadow:0 0 0 4px rgba(41,218,161,.1),0 0 12px rgba(41,218,161,.5);animation:commandPulse 2.4s ease-in-out infinite; }

/* Payout progress */
.performance-studio .goal-card { min-height:360px;padding:20px;display:block;position:relative; }
.performance-studio .goal-card:before { display:none!important; }
.performance-studio .goal-head { width:100%;margin-top:22px;display:flex;align-items:end;justify-content:space-between;gap:12px; }
.performance-studio .goal-head span { display:grid;gap:4px; }
.performance-studio .goal-head b { color:var(--studio-text);font-size:13px; }
.performance-studio .goal-head b:before { display:none; }
.performance-studio .goal-head small { color:var(--studio-muted);font-size:11px; }
.performance-studio .goal-head>strong { position:static;width:auto;transform:none;color:var(--studio-text);font-size:18px; }
.performance-studio .goal-track { width:100%;height:7px;margin-top:10px;border-radius:3px;background:var(--studio-panel-2); }
.performance-studio .goal-track i { border-radius:inherit;background:linear-gradient(90deg,#7851ff,#1cd7c7);box-shadow:0 0 15px rgba(34,211,238,.2); }
.goal-sparkline { height:192px;margin-top:13px; }
.goal-sparkline svg { width:100%;height:166px;overflow:visible; }
.goal-grid path { fill:none;stroke:var(--studio-edge);stroke-width:1;stroke-dasharray:3 5; }
.goal-area { fill:url(#goalAreaGradient); }
.goal-expected { fill:none;stroke:var(--studio-blue);stroke-width:2;stroke-dasharray:5 5;vector-effect:non-scaling-stroke; }
.goal-actual { fill:none;stroke:var(--studio-mint);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;stroke-dasharray:1;animation:commandLineDraw .9s ease both; }
.goal-current-dot { fill:var(--studio-panel);stroke:var(--studio-cyan);stroke-width:3;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 5px rgba(34,211,238,.6)); }
.goal-sparkline text { fill:var(--studio-muted);font:8px Inter,"Segoe UI",sans-serif; }
.goal-chart-legend { display:flex;gap:17px;margin-top:-5px;color:var(--studio-muted);font-size:8px; }
.goal-chart-legend span { display:flex;align-items:center;gap:6px; }
.goal-chart-legend i { width:17px;height:2px;background:var(--studio-mint); }
.goal-chart-legend span:last-child i { background:repeating-linear-gradient(90deg,var(--studio-blue) 0 4px,transparent 4px 7px); }

/* Breakdown */
.performance-breakdown { min-height:360px;padding:20px; }
.breakdown-layout { display:grid;grid-template-columns:minmax(135px,.85fr) minmax(150px,1fr);align-items:center;gap:18px;margin-top:24px; }
.breakdown-donut { position:relative;width:min(166px,100%);aspect-ratio:1;margin:auto;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--breakdown));box-shadow:0 0 30px rgba(55,107,255,.14); }
.breakdown-donut:before { content:"";position:absolute;inset:18%;border-radius:50%;background:var(--studio-panel);box-shadow:inset 0 0 22px rgba(55,107,255,.08); }
.breakdown-donut span { position:relative;z-index:1;display:grid;gap:3px;text-align:center; }
.breakdown-donut b { color:var(--studio-text);font-size:14px;letter-spacing:-.03em; }
.breakdown-donut small { color:var(--studio-muted);font-size:8px; }
.breakdown-legend { display:grid;gap:11px; }
.breakdown-legend>div { display:grid;grid-template-columns:7px minmax(0,1fr) auto;align-items:center;gap:8px; }
.breakdown-legend>div>i { width:7px;height:7px;border-radius:50%;background:var(--legend);box-shadow:0 0 9px var(--legend); }
.breakdown-legend span { min-width:0;display:grid;gap:2px; }
.breakdown-legend small { color:var(--studio-muted);font-size:8px; }
.breakdown-legend b { overflow:hidden;color:var(--studio-text);font-size:10px;text-overflow:ellipsis;white-space:nowrap; }
.breakdown-legend em { color:var(--studio-muted);font-size:8px;font-style:normal; }
.breakdown-link { width:100%;min-height:38px;margin-top:20px;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--studio-edge);border-radius:8px;background:var(--studio-panel-2);color:var(--studio-text);font-size:9px;box-shadow:none; }

/* Quick actions */
.quick-actions { min-height:360px;padding:20px; }
.quick-action-list { display:grid;gap:8px;margin-top:20px; }
.quick-action-list button { width:100%;min-height:58px;padding:8px 9px;display:grid;grid-template-columns:34px minmax(0,1fr) 16px;align-items:center;gap:9px;border:1px solid var(--studio-edge);border-radius:9px;background:var(--studio-panel-2);color:var(--studio-text);text-align:left;box-shadow:none; }
.quick-action-list button>span { width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:rgba(124,85,255,.14);color:#9c68ff;box-shadow:0 0 16px rgba(124,85,255,.14); }
.quick-action-list button:nth-child(2)>span { color:var(--studio-mint);background:rgba(41,218,161,.12); }
.quick-action-list button:nth-child(3)>span { color:var(--studio-amber);background:rgba(255,173,66,.12); }
.quick-action-list button:nth-child(4)>span { color:var(--studio-cyan);background:rgba(34,211,238,.12); }
.quick-action-list button>b { min-width:0;display:grid;gap:3px;font-size:9px; }
.quick-action-list button small { overflow:hidden;color:var(--studio-muted);font-size:8px;font-weight:500;text-overflow:ellipsis;white-space:nowrap; }
.quick-action-list button>svg { color:var(--studio-muted); }

/* Insights and year chart */
.performance-studio .insight-panel { margin:0;display:grid;grid-template-columns:repeat(3,1fr);gap:10px; }
.performance-studio .insight-card { min-height:116px;padding:17px 18px;display:flex;flex-direction:column;justify-content:center;border:1px solid var(--studio-edge);border-radius:12px;background:var(--studio-panel);box-shadow:none; }
.performance-studio .insight-card:after { width:58px;height:58px;right:15px;top:15px;background:rgba(130,80,238,.11); }
.performance-studio .insight-card small { color:var(--studio-muted);font-size:8px;letter-spacing:.08em; }
.performance-studio .insight-card strong { color:var(--studio-text);font-size:22px; }
.performance-studio #comparisonCard strong { color:var(--studio-mint); }
.performance-studio #projectionCard strong { color:#b06cff; }
.performance-studio #milestoneCard { background:linear-gradient(135deg,var(--studio-panel),rgba(130,80,238,.08)); }
.performance-studio #milestoneCard strong { color:#bd7cff; }
.performance-studio .analytics-card { min-height:330px;padding:20px; }
.performance-studio .analytics-card .section-head { margin:0 0 7px; }
.performance-studio .analytics-card .eyebrow { color:var(--studio-cyan);font-size:8px; }
.performance-studio .analytics-card h2 { color:var(--studio-text);font-size:17px; }
.performance-studio .analytics-card #ytdTotal { color:var(--studio-text);font-size:21px; }
.performance-studio .payout-chart-legend { display:none; }
.performance-studio .performance-controls { width:max-content;max-width:100%;margin:0 0 12px;display:flex;gap:3px;padding:3px;border:1px solid var(--studio-edge);border-radius:8px;background:var(--studio-panel-2); }
.performance-controls button { min-height:28px;padding:0 10px;border-radius:6px;background:transparent;color:var(--studio-muted);font-size:8px;box-shadow:none; }
.performance-controls button.active { background:linear-gradient(110deg,rgba(55,107,255,.2),rgba(124,85,255,.2));color:var(--studio-cyan); }
.performance-studio .year-chart { position:relative;height:210px;gap:4px;isolation:isolate; }
.performance-studio .command-chart-line { position:absolute;z-index:1;left:0;right:0;top:0;width:100%;height:170px;overflow:visible;pointer-events:none; }
.command-chart-area { fill:rgba(55,107,255,.09);stroke:none; }
.command-chart-stroke { fill:none;stroke:var(--studio-cyan);stroke-width:2.5;vector-effect:non-scaling-stroke;stroke-dasharray:1;animation:commandLineDraw .9s ease both; }
.command-chart-line circle { fill:var(--studio-panel);stroke:var(--studio-cyan);stroke-width:2;vector-effect:non-scaling-stroke; }
.performance-studio .command-chart .chart-month { position:relative;z-index:2; }
.performance-studio .command-chart .chart-month .payout-bar-track { height:170px;border:0;border-radius:3px;background:transparent; }
.performance-studio .command-chart .chart-month .payout-bar { opacity:.12;border-radius:3px 3px 0 0;background:var(--studio-blue); }
.performance-studio .command-chart .chart-month.selected .payout-bar { opacity:.26;background:var(--studio-purple); }
.performance-studio .command-chart.metric-cars .command-chart-stroke,.performance-studio .command-chart.metric-cars .command-chart-line circle { stroke:var(--studio-purple); }
.performance-studio .command-chart.metric-cars .command-chart-area { fill:rgba(160,92,255,.08); }
.performance-studio .command-chart.metric-rate .command-chart-stroke,.performance-studio .command-chart.metric-rate .command-chart-line circle { stroke:var(--studio-mint); }
.performance-studio .command-chart.metric-rate .command-chart-area { fill:rgba(41,218,161,.08); }
.performance-studio .month-note-card { min-height:330px;padding:20px; }
.performance-studio .month-note-card textarea { min-height:170px;border-color:var(--studio-edge);border-radius:9px;background:var(--studio-panel-2);line-height:1.55; }
.performance-studio .month-note-head h3 { color:var(--studio-text); }
.performance-studio .mini-button { border-radius:7px;background:rgba(124,85,255,.14);color:#a96cff; }
.performance-studio .closing-ratio-field { border-color:var(--studio-edge);border-radius:9px;background:var(--studio-panel-2); }

/* Dealership and recommendation cards */
.performance-studio .command-card { min-height:225px;padding:20px; }
.command-card-heading { display:flex;align-items:center;gap:10px; }
.command-card-heading>span { width:36px;height:36px;display:grid;place-items:center;border-radius:9px;background:rgba(55,107,255,.12);color:var(--studio-cyan); }
.command-card-heading>div { min-width:0;display:grid;gap:2px; }
.command-card-heading .eyebrow { margin:0;color:var(--studio-cyan);font-size:7px; }
.command-card-heading h3 { margin:0;color:var(--studio-text);font-size:15px; }
.command-card-heading small { color:var(--studio-muted);font-size:8px; }
.command-card-heading>.live-indicator { margin-left:auto; }
.live-indicator { display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--studio-mint);box-shadow:0 0 0 4px rgba(41,218,161,.1);animation:commandPulse 2.4s ease-in-out infinite; }
.command-card-copy { margin:18px 0 0;color:var(--studio-muted);font-size:10px;line-height:1.6; }
.pulse-metrics { display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:17px; }
.pulse-metrics span { display:grid;gap:4px;padding:10px;border:1px solid var(--studio-edge);border-radius:8px;background:var(--studio-panel-2); }
.pulse-metrics small { color:var(--studio-muted);font-size:7px;text-transform:uppercase;letter-spacing:.06em; }
.pulse-metrics b { color:var(--studio-text);font-size:15px; }
.pulse-progress { display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,.8fr);align-items:center;gap:13px;margin-top:14px; }
.pulse-progress>span { display:grid;gap:2px; }
.pulse-progress b { color:var(--studio-text);font-size:9px; }.pulse-progress small { color:var(--studio-muted);font-size:8px; }
.pulse-progress>i { height:5px;overflow:hidden;border-radius:3px;background:var(--studio-panel-2); }
.pulse-progress em { display:block;height:100%;background:linear-gradient(90deg,var(--studio-blue),var(--studio-cyan)); }
.command-insight-list { display:grid;gap:7px;margin-top:14px; }
.command-insight-row { display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:9px;padding:8px;border:1px solid transparent;border-radius:8px;background:var(--studio-panel-2);animation:commandInsightIn .4s calc(var(--insight-index) * 65ms) both; }
.command-insight-row>span { width:32px;height:32px;display:grid;place-items:center;border-radius:8px;background:rgba(160,92,255,.12);color:var(--studio-purple); }
.command-insight-row>div { min-width:0;display:grid;gap:2px; }
.command-insight-row b { color:var(--studio-text);font-size:9px; }.command-insight-row small { overflow:hidden;color:var(--studio-muted);font-size:8px;text-overflow:ellipsis;white-space:nowrap; }
.command-insight-row.tone-mint>span { color:var(--studio-mint);background:rgba(41,218,161,.11); }
.command-insight-row.tone-amber>span { color:var(--studio-amber);background:rgba(255,173,66,.11); }
.command-insight-row.tone-coral>span { color:#ff6e89;background:rgba(255,94,126,.11); }

/* Sidebar weather */
.performance-studio .sidebar-weather { position:relative;flex:0 0 auto;min-height:136px;margin:12px 0 0;padding:13px;overflow:hidden;border:1px solid #243454;border-radius:11px;background:linear-gradient(145deg,#0d1b35,#11172f); }
.sidebar-weather:after { content:"";position:absolute;right:-32px;top:-38px;width:104px;height:104px;border-radius:50%;background:rgba(55,107,255,.16);filter:blur(9px);pointer-events:none; }
.sidebar-weather header { position:relative;z-index:1;display:flex;justify-content:space-between;color:#8290aa;font-size:7px;font-weight:850;letter-spacing:.11em;text-transform:uppercase; }
.weather-current { position:relative;z-index:1;display:grid;grid-template-columns:34px auto minmax(0,1fr);align-items:center;gap:7px;margin-top:10px; }
.weather-symbol { width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#142440;color:#65dff1;animation:weatherFloat 4.5s ease-in-out infinite; }
.weather-current>strong { color:#fff;font-size:23px;letter-spacing:-.06em; }
.weather-current>div { min-width:0;display:grid;gap:2px; }
.weather-current b { overflow:hidden;color:#eef4ff;font-size:8px;text-overflow:ellipsis;white-space:nowrap; }
.weather-current small { overflow:hidden;color:#8090aa;font-size:7px;text-overflow:ellipsis;white-space:nowrap; }
.weather-details { position:relative;z-index:1;display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:9px; }
.weather-details span { display:grid;gap:2px;padding:6px 7px;border-radius:7px;background:#111e34; }
.weather-details small,.weather-source { color:#718099;font-size:7px; }.weather-details b { color:#dfe7f5;font-size:8px; }
.weather-source { display:block;margin-top:6px; }
.weather-alert { position:relative;z-index:1;display:flex;gap:5px;margin-top:7px;padding:6px;border-radius:7px;background:#342413;color:#ffbf62;font-size:7px; }
.weather-unavailable { min-height:106px;display:flex;align-items:center;gap:9px; }
.weather-unavailable>span { width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#142440;color:#65dff1; }
.weather-unavailable>div { display:grid;gap:3px; }.weather-unavailable b { color:#eef4ff;font-size:9px; }.weather-unavailable small { color:#8090aa;font-size:8px;line-height:1.4; }
.weather-loading { min-height:106px;display:grid;align-content:center;gap:8px; }
.weather-loading i,.weather-loading span { display:block;height:8px;border-radius:4px;background:linear-gradient(90deg,#101c30,#223556,#101c30);background-size:200% 100%;animation:commandShimmer 1.3s linear infinite; }
.weather-loading i { width:36px;height:36px;border-radius:9px; }.weather-loading span:nth-child(2) { width:80%; }.weather-loading span:nth-child(3) { width:55%; }

/* Deals */
.performance-studio .search-box { min-height:46px;margin:0;padding:0 13px;border:1px solid var(--studio-edge);border-radius:9px;background:var(--studio-panel);box-shadow:none; }
.performance-studio .search-box input { background:transparent;box-shadow:none; }
.performance-studio #dashboardPage>.section-head { margin:3px 2px 0; }
.performance-studio #dashboardPage>.section-head .eyebrow { color:var(--studio-cyan);font-size:8px; }
.performance-studio #dashboardPage>.section-head h2 { color:var(--studio-text);font-size:20px; }
.performance-studio #dashboardPage>.section-head .text-button { padding:9px 13px;border-radius:8px;background:linear-gradient(110deg,#376bff,#7c45ef);color:#fff; }
.performance-studio .deal-list { gap:0;padding:7px 14px 10px;display:grid!important;grid-template-columns:minmax(0,1fr)!important;border:1px solid var(--studio-edge);border-radius:12px;background:var(--studio-panel);box-shadow:none; }
.performance-studio .command-deal-table-head,.performance-studio #dashboardPage .deal-card { display:grid;grid-template-columns:34px minmax(180px,1.45fr) minmax(72px,.55fr) minmax(88px,.7fr) minmax(95px,.72fr) minmax(76px,.55fr) 32px;gap:10px;align-items:center; }
.command-deal-table-head { min-height:40px;padding:3px 2px;border-bottom:1px solid var(--studio-edge);color:var(--studio-muted); }
.command-deal-table-head b { font-size:7px;letter-spacing:.09em;text-transform:uppercase; }
.performance-studio #dashboardPage .deal-card { min-height:62px;padding:8px 2px;border-bottom:1px solid var(--studio-edge);border-radius:0;background:transparent;box-shadow:none;animation:commandRowIn .38s calc(var(--deal-index) * 38ms) both; }
.performance-studio #dashboardPage .deal-card:last-child { border-bottom:0; }
.performance-studio .deal-avatar { width:32px;height:32px;border-radius:8px;background:rgba(124,85,255,.13);color:#a970ff; }
.deal-identity { min-width:0; }.deal-identity h3,.deal-identity p { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.performance-studio .deal-card h3 { color:var(--studio-text);font-size:11px; }.performance-studio .deal-card p { color:var(--studio-muted);font-size:8px; }
.command-deal-cell { min-width:0;display:grid;gap:2px; }.command-deal-cell small { display:none; }.command-deal-cell b { overflow:hidden;color:var(--studio-text);font-size:9px;text-overflow:ellipsis;white-space:nowrap; }
.command-status { width:max-content;display:flex;align-items:center;gap:5px;padding:5px 7px;border-radius:6px;background:rgba(255,173,66,.1);color:var(--studio-amber); }
.command-status i { width:5px;height:5px;border-radius:50%;background:currentColor; }.command-status b { color:inherit;font-size:7px;text-transform:uppercase;letter-spacing:.04em; }
.command-status.status-paid { color:var(--studio-mint);background:rgba(41,218,161,.1); }
.performance-studio #dashboardPage .deal-money { min-width:0;text-align:left; }.performance-studio #dashboardPage .deal-money b { color:var(--studio-text);font-size:10px; }
.performance-studio .deal-delete { width:30px;height:30px;border-radius:7px; }

/* Command palette and desktop deal inspector */
.command-palette { position:fixed;z-index:150;inset:0;display:grid;place-items:start center;padding:9vh 18px 18px; }
.command-palette-backdrop { position:absolute;inset:0;width:100%;height:100%;background:rgba(2,6,13,.72);backdrop-filter:blur(9px);cursor:default; }
.command-palette-panel { position:relative;width:min(660px,100%);max-height:min(680px,82vh);overflow:hidden;border:1px solid var(--studio-edge);border-radius:12px;background:var(--studio-panel);box-shadow:0 34px 100px rgba(0,0,0,.35);animation:commandPaletteIn .26s ease; }
.command-palette-search { height:62px;padding:0 16px;display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:10px;border-bottom:1px solid var(--studio-edge);color:var(--studio-muted); }
.command-palette-search input { height:100%;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:14px; }
.command-palette-caption { display:flex;justify-content:space-between;padding:11px 16px 7px;color:var(--studio-muted);font-size:7px;font-weight:800;letter-spacing:.08em;text-transform:uppercase; }
.command-palette-caption small { font-size:7px;font-weight:500;letter-spacing:0;text-transform:none; }
.command-palette-results { max-height:calc(min(680px,82vh) - 103px);overflow:auto;padding:5px 8px 10px; }
.command-result { width:100%;min-height:57px;padding:8px 9px;display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:9px;border:1px solid transparent;border-radius:8px;background:transparent;text-align:left; }
.command-result.active { border-color:rgba(55,107,255,.28);background:rgba(55,107,255,.1); }
.command-result-icon { width:36px;height:36px;display:grid;place-items:center;border-radius:8px;background:var(--studio-panel-2);color:var(--studio-muted); }.command-result.active .command-result-icon { color:var(--studio-cyan); }
.command-result>span:nth-child(2) { min-width:0;display:grid;gap:3px; }.command-result b { color:var(--studio-text);font-size:10px; }.command-result small { overflow:hidden;color:var(--studio-muted);font-size:8px;text-overflow:ellipsis;white-space:nowrap; }
.command-result>strong,.command-result>svg { color:var(--studio-muted);font-size:10px; }.command-empty { padding:40px 18px;text-align:center;color:var(--studio-muted);font-size:10px; }

@media (min-width:821px) {
  .performance-studio #dealSheet:not(.hidden) { left:auto;right:14px;top:14px;bottom:14px;width:min(570px,calc(100vw - 56px));height:auto;transform:none;border:1px solid var(--studio-edge);border-radius:13px;background:var(--studio-bg)!important;animation:commandDrawerIn .36s cubic-bezier(.2,.85,.25,1); }
  .performance-studio #dealSheet>.grabber { display:none; }.performance-studio #dealSheet header { height:66px;border-radius:13px 13px 0 0; }
  .performance-studio #dealSheet .sheet-scroll { height:calc(100% - 66px);padding:16px 18px 30px; }.performance-studio #dealSheet .form-section { border-radius:10px; }
}

/* Desktop breakpoints */
@media (max-width:1380px) {
  .performance-studio .app-shell { grid-template-columns:214px minmax(0,1fr); }.performance-studio .workspace { padding-left:18px;padding-right:18px; }
  .performance-studio .top-identity { min-width:145px; }.performance-subtitle { display:none; }
  .performance-kpi { grid-template-columns:36px minmax(0,1fr);padding:12px;gap:8px; }.performance-kpi-icon { width:36px;height:36px; }.performance-kpi em { font-size:7px; }
  .performance-studio .month-tile { grid-template-columns:minmax(235px,.8fr) 135px 155px minmax(300px,1fr); }.breakdown-layout { grid-template-columns:125px minmax(130px,1fr);gap:12px; }
}
@media (max-width:1180px) {
  .performance-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }.performance-studio .month-tile { grid-template-columns:1fr 1fr 1fr; }.performance-studio .check-compare { grid-column:1/-1; }
  .performance-studio #dashboardPage>.goal-card { grid-column:span 7; }.performance-studio #dashboardPage>#performancePayoutBreakdown { grid-column:span 5; }
  .performance-studio #dashboardPage>#quickActions { grid-column:1/-1;min-height:auto; }.quick-action-list { grid-template-columns:repeat(4,1fr); }
  .quick-action-list button { grid-template-columns:31px minmax(0,1fr); }.quick-action-list button>svg { display:none; }.performance-studio .command-launcher { max-width:390px; }
}
@media (max-width:980px) and (min-width:821px) {
  .performance-studio .app-shell { grid-template-columns:178px minmax(0,1fr); }.performance-studio .sidebar-brand small,.performance-studio .sidebar-achievement { display:none; }
  .performance-studio .desktop-nav button { padding:0 9px; }.performance-studio .command-launcher b { max-width:145px; }.performance-studio .profile-chip>span { display:none; }
  .performance-studio #dashboardPage>.goal-card,.performance-studio #dashboardPage>#performancePayoutBreakdown,.performance-studio #dashboardPage>.analytics-card,.performance-studio #dashboardPage>.month-note-card,.performance-studio #dashboardPage>#dealershipPulse,.performance-studio #dashboardPage>#commandInsights { grid-column:1/-1; }
  .performance-studio .command-deal-table-head,.performance-studio #dashboardPage .deal-card { grid-template-columns:32px minmax(150px,1.2fr) 65px 78px 88px 70px 30px;gap:7px; }
}

/* Mobile */
@media (max-width:820px) {
  .performance-studio .app-shell { display:block;padding:0 0 92px; }.performance-studio .desktop-sidebar { display:none; }
  .performance-studio .workspace { max-width:760px;margin:auto;padding:0 9px 34px; }.performance-studio .topbar { height:72px;padding:9px 2px;border-radius:0; }
  .performance-studio .top-identity { min-width:0; }.performance-studio .top-identity .eyebrow,.performance-subtitle,.performance-studio .profile-chip>span { display:none; }
  .performance-studio .topbar h1 { font-size:21px; }.performance-studio .profile-avatar { width:36px;height:36px; }.performance-studio #privacyToggle { width:36px;height:36px; }
  .performance-studio #newDealButton.header-add { min-width:91px;height:37px;padding:0 10px; }.performance-studio .command-launcher { display:none; }.performance-studio .workspace>main { margin-top:10px; }
  .performance-studio #dashboardPage.active { grid-template-columns:1fr;gap:9px; }.performance-studio #dashboardPage>* { grid-column:1!important; }
  .performance-kpis { grid-template-columns:1fr 1fr;gap:8px; }.performance-kpi:first-child { grid-column:1/-1; }.performance-kpi { min-height:94px;padding:12px; }.performance-kpi strong { font-size:22px; }
  .performance-studio .month-tile { grid-template-columns:1fr 1fr;padding:10px;gap:8px; }.performance-studio .month-tile-top,.performance-studio .check-compare { grid-column:1/-1; }.performance-studio .month-display { min-height:45px; }
  .performance-studio .goal-card,.performance-breakdown,.quick-actions { min-height:auto;padding:17px; }.goal-sparkline { height:178px; }.goal-sparkline svg { height:152px; }
  .breakdown-layout { grid-template-columns:150px minmax(0,1fr); }.quick-action-list { grid-template-columns:1fr 1fr; }.quick-action-list button { grid-template-columns:32px minmax(0,1fr); }
  .performance-studio .insight-panel { grid-template-columns:1fr 1fr; }.performance-studio #milestoneCard { grid-column:1/-1; }
  .performance-studio .analytics-card,.performance-studio .month-note-card { min-height:auto;padding:17px; }.performance-studio .year-chart { height:185px; }
  .performance-studio .command-chart-line,.performance-studio .command-chart .chart-month .payout-bar-track { height:145px; }.performance-studio .command-card { min-height:auto;padding:17px; }
  .performance-studio .command-deal-table-head,.performance-studio .command-deal-cell { display:none!important; }
  .performance-studio #dashboardPage .deal-card { grid-template-columns:34px minmax(0,1fr) 32px;grid-template-areas:"avatar details delete" "avatar money delete";column-gap:9px;row-gap:3px;align-items:center; }
  .performance-studio #dashboardPage .deal-avatar { grid-area:avatar; }.performance-studio #dashboardPage .deal-card>div:nth-child(2) { grid-area:details; }
  .performance-studio #dashboardPage .deal-money { grid-area:money;display:flex;gap:7px;text-align:left; }.performance-studio #dashboardPage .deal-money small { display:inline;margin:0; }.performance-studio #dashboardPage .deal-delete { grid-area:delete; }
  .command-palette { padding-top:max(15px,env(safe-area-inset-top)); }.command-palette-panel { max-height:calc(100vh - 30px - env(safe-area-inset-top)); }.command-palette-results { max-height:calc(100vh - 140px - env(safe-area-inset-top)); }
}
@media (max-width:520px) {
  .performance-studio .workspace { padding-left:7px;padding-right:7px; }.performance-studio .redesign-header-actions { gap:5px; }.performance-studio .profile-avatar { display:none; }
  .performance-kpi { grid-template-columns:35px minmax(0,1fr);gap:8px; }.performance-kpi-icon { width:35px;height:35px; }.performance-kpi small,.performance-kpi em { font-size:7px; }
  .performance-studio .month-tile { grid-template-columns:1fr; }.performance-studio .month-tile-top,.performance-studio .check-compare { grid-column:1; }.performance-studio .month-stepper { min-height:38px; }
  .breakdown-layout { grid-template-columns:1fr; }.breakdown-donut { width:148px; }.breakdown-legend { grid-template-columns:1fr 1fr; }.quick-action-list { grid-template-columns:1fr; }
  .performance-studio .insight-panel { grid-template-columns:1fr; }.performance-studio #milestoneCard { grid-column:auto; }.performance-studio .goal-head { align-items:start; }.performance-studio .goal-head small { font-size:9px; }
  .performance-studio .performance-controls { overflow-x:auto; }.performance-controls button { flex:0 0 auto; }.pulse-metrics { grid-template-columns:1fr 1fr; }.pulse-metrics span:last-child { grid-column:1/-1; }.pulse-progress { grid-template-columns:1fr; }
  .command-palette { padding-left:6px;padding-right:6px; }.command-palette-search { height:56px;padding:0 12px; }.command-palette-caption small { display:none; }.command-result { grid-template-columns:34px minmax(0,1fr); }.command-result>strong,.command-result>svg { display:none; }
}

@media (hover:hover) and (pointer:fine) {
  .performance-kpi,.studio-card,.performance-studio .goal-card,.performance-studio .analytics-card,.performance-studio .month-note-card,.performance-studio .command-card,.quick-action-list button,.command-result,.performance-studio .deal-card,.performance-studio .desktop-nav button,.performance-studio .command-launcher { transition:transform .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease,color .2s ease; }
  .performance-kpi:hover,.studio-card:hover,.performance-studio .goal-card:hover,.performance-studio .analytics-card:hover,.performance-studio .month-note-card:hover,.performance-studio .command-card:hover { transform:translateY(-2px);border-color:rgba(76,125,255,.38)!important; }
  .performance-kpi:hover { box-shadow:0 18px 44px rgba(55,107,255,.12); }.quick-action-list button:hover,.command-result:hover { transform:translateX(3px);border-color:rgba(76,125,255,.34);background:rgba(55,107,255,.09); }
  .performance-studio .desktop-nav button:hover { color:#fff;background:#0f1a2d; }.performance-studio .command-launcher:hover { border-color:rgba(55,107,255,.45);transform:translateY(-1px); }
  .performance-studio #dashboardPage .deal-card:hover { background:var(--studio-panel-2);transform:translateX(2px); }
}
@media (prefers-reduced-motion:reduce) { .performance-studio *,.performance-studio *:before,.performance-studio *:after { scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important; } }

@keyframes studioRise { from { opacity:0;transform:translateY(12px); } to { opacity:1;transform:none; } }
@keyframes commandPaletteIn { from { opacity:0;transform:translateY(-10px) scale(.985); } to { opacity:1;transform:none; } }
@keyframes commandDrawerIn { from { opacity:.4;transform:translateX(50px) scale(.985); } to { opacity:1;transform:none; } }
@keyframes commandInsightIn { from { opacity:0;transform:translateX(-8px); } to { opacity:1;transform:none; } }
@keyframes commandRowIn { from { opacity:0;transform:translateY(7px); } to { opacity:1;transform:none; } }
@keyframes commandLineDraw { from { stroke-dashoffset:1; } to { stroke-dashoffset:0; } }
@keyframes commandPulse { 0%,100% { opacity:.55;transform:scale(.9); } 50% { opacity:1;transform:scale(1.08); } }
@keyframes weatherFloat { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-3px); } }
@keyframes commandShimmer { from { background-position:200% 0; } to { background-position:-200% 0; } }
