/* Shared shell and dashboard refresh. Business data remains supplied by the API. */
:root{--bg:#0b1020;--bg2:#10182a;--panel:#111b2e;--panel2:#152037;--line:#253148;--text:#edf1fa;--muted:#a0adc4;--muted2:#8a99b1;--accent:#987fff;--shadow:0 8px 24px #0000000a}
html[data-theme="light"]{--bg:#f5f6fa;--bg2:#eef0f6;--panel:#fff;--panel2:#fafbfe;--line:#e0e4ef;--text:#202b42;--muted:#5e6b83;--muted2:#65738b;--accent:#6545d5;--shadow:0 4px 18px #25315705}
.client-live{background:var(--bg);line-height:1.5}
.client-shell{grid-template-columns:248px minmax(0,1fr)}
.client-sidebar{background:#0d1527;padding:24px 16px 16px;overflow-y:auto;scrollbar-width:thin}
.client-brand{padding:0 10px 24px;gap:11px;flex-shrink:0}
.client-brand span{font-size:1rem;letter-spacing:.015em;font-weight:800}
.client-brand small{font-size:.58rem;letter-spacing:.14em;font-weight:650;margin-top:3px}
.client-nav{gap:3px}
.client-nav a{font-size:.84rem;font-weight:550;min-height:43px;padding:10px 12px;border-radius:9px;color:var(--muted)}
.client-nav a.active{background:#8d70ff18;border-color:#8d70ff35;box-shadow:none;color:#d7ccff}
.client-nav .nav-sep{margin:12px 8px;background:var(--line)}
.client-nav .nav-label{font-weight:600;font-size:.6rem;letter-spacing:.12em;color:var(--muted2);padding-bottom:8px}
.client-nav svg{width:19px;height:19px}
.client-help{margin-top:28px;padding:15px;background:var(--panel);box-shadow:none;border-radius:12px}
.client-help .help-icon{width:32px;height:32px;border-radius:9px}
.client-help p{font-size:.74rem;line-height:1.6;margin:10px 0 14px}
.client-help .btn{font-size:.77rem}
.client-copy{color:var(--muted2)}
.client-topbar{background:#0d1527f2;height:76px;padding:0 32px;backdrop-filter:blur(12px)}
.searchbar{width:min(450px,40vw)}
.searchbar input{border-radius:9px;background:var(--bg);font-size:.84rem}
.searchbar input::placeholder{color:var(--muted2)}
.client-top-actions{gap:9px}
.icon-btn{background:transparent;border-color:transparent;border-radius:9px}
.icon-btn:hover{background:var(--panel);border-color:var(--line)}
.account-chip{border-left:1px solid var(--line);padding-left:18px;margin-left:5px}
.avatar{background:#7958e8;border-radius:11px;width:35px;height:35px;font-size:.78rem;font-weight:650}
.account-chip strong{font-weight:650}
.client-content{max-width:1500px;padding:32px 32px 48px}
.btn{border-radius:9px;font-weight:600;transition:background .15s,border-color .15s}
.btn-primary{background:#7652e8;border-color:#8c6af3;color:#fff;box-shadow:none}
.btn-primary:hover{background:#8462ed}
.link-accent{color:var(--accent);font-weight:600}
.client-live a:focus-visible,.client-live button:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
html[data-theme="light"] .client-nav a.active{background:#efebff;color:#5c3ac6;border-color:#e2d9ff}
html[data-theme="light"] .client-nav a:hover{color:#48318d}
.portal-dashboard svg{width:19px;height:19px;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.portal-eyebrow{font-size:.64rem;letter-spacing:.16em;font-weight:650;color:var(--accent);margin:0 0 8px}
.portal-dashboard .live-page-head{align-items:center;margin-bottom:26px;gap:20px}
.portal-dashboard .live-page-head h1{font-size:clamp(1.7rem,2.7vw,2.2rem);font-weight:650;letter-spacing:-.035em;line-height:1.25}
.portal-dashboard .live-page-head p{font-size:.87rem;margin-top:8px;line-height:1.65}
.portal-dashboard .live-connected{font-size:.7rem;background:#38c9970b;border-color:#38c99724;padding:7px 11px;white-space:nowrap}
.portal-metrics{gap:16px;margin-bottom:32px}
.portal-metrics .portal-metric{background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:0;box-shadow:var(--shadow);min-width:0;overflow:hidden}
.portal-metric a{padding:18px 20px 0;height:100%}
.portal-metric-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.portal-metrics .portal-metric-top>span{color:var(--muted);margin:0;font-size:.78rem;font-weight:500}
.portal-symbol{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;color:var(--accent);background:#9577ff15;flex-shrink:0;font-style:normal}
.portal-metric.tone-amber .portal-symbol{color:#e7b75d;background:#e7b75d12}
.portal-metric.tone-blue .portal-symbol{color:#84b4ff;background:#84b4ff12}
.portal-metric.tone-green .portal-symbol{color:#60d5b0;background:#60d5b012}
.portal-metrics .portal-metric strong{font-size:2rem;line-height:1.2;font-weight:600;color:var(--text);letter-spacing:-.04em;margin:7px 0 17px;font-variant-numeric:tabular-nums}
.portal-metric-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 0;border-top:1px solid var(--line);color:var(--muted)}
.portal-metrics .portal-metric small{font-size:.7rem;line-height:1.45;margin:0;color:var(--muted)}
.portal-metric-foot svg{width:15px;height:15px;color:var(--accent)}
.portal-metric a:hover{background:#9577ff06}
.portal-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr);gap:26px;align-items:start}
.portal-resources,.portal-followups{min-width:0}
.portal-section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:28px;margin-bottom:16px}
.portal-section-head h2{font-size:1.02rem;font-weight:650;margin:0;letter-spacing:-.015em}
.portal-section-head>span{font-size:.69rem;color:var(--muted)}
.portal-section-head a{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.portal-section-head svg{width:15px;height:15px}
.portal-resource{padding:22px;background:var(--panel);border:1px solid var(--line);border-radius:13px;margin-bottom:16px;box-shadow:var(--shadow)}
.portal-resource-head{display:flex;align-items:center;gap:13px;min-width:0}
.portal-resource-head>.portal-symbol{width:42px;height:42px;border-radius:11px}
.portal-resource-head>div{min-width:0;flex:1}
.portal-resource-head h3{font-size:.97rem;font-weight:600;line-height:1.5;margin:3px 0 0;overflow-wrap:anywhere}
.portal-resource-head .live-type{font-size:.6rem;letter-spacing:.1em;color:var(--muted)}
.portal-resource-head .live-badge{white-space:nowrap;font-size:.64rem;font-weight:600;padding:5px 9px}
.portal-resource-head .live-badge::before{content:"";height:5px;width:5px;border-radius:50%;background:currentColor;margin-right:6px}
.portal-resource-plan{font-size:.73rem;color:var(--muted);margin:13px 0 18px;overflow-wrap:anywhere}
.portal-resource-details{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin:0;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.portal-resource-details dt{font-size:.72rem;color:var(--muted);margin-bottom:5px}
.portal-resource-details dd{font-size:.8rem;margin:0;overflow-wrap:anywhere;color:var(--text)}
.portal-resource-details small{display:block;font-size:.7rem;color:var(--muted);margin-top:3px}
.portal-resource-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:16px}
.portal-resource-foot .btn{font-size:.74rem;min-height:37px;background:var(--bg2);padding:8px 12px;white-space:normal}
.portal-resource-foot .btn svg{width:15px;height:15px}
.portal-resource-foot .link-accent{font-size:.71rem}
.portal-followup{background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:18px;margin-bottom:14px;box-shadow:var(--shadow)}
.portal-followup-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.portal-followup-head .portal-symbol{width:30px;height:30px;border-radius:8px}
.portal-followup-head svg{width:16px;height:16px}
.portal-followup-head h3{margin:0;flex:1;font-size:.81rem;font-weight:600}
.portal-count{font-size:.66rem;min-width:23px;text-align:center;background:var(--bg2);border:1px solid var(--line);border-radius:6px;padding:2px 6px;color:var(--muted)}
.portal-followups .portal-row{gap:4px;padding:11px 0;border-color:var(--line)}
.portal-followups .portal-row strong{font-size:.76rem;font-weight:550;line-height:1.5}
.portal-followups .portal-row span{font-size:.73rem;line-height:1.6;color:var(--muted)}
.portal-followups .portal-row:last-of-type{margin-bottom:0}
.portal-followups .portal-row:hover strong{color:var(--accent)}
.portal-followup-link{display:flex;align-items:center;justify-content:space-between;font-size:.7rem;font-weight:600;color:var(--accent);padding-top:13px;min-height:35px}
.portal-followup-link svg{width:15px;height:15px}
.portal-balances{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.portal-balances>span{display:flex;align-items:baseline;gap:8px;border:1px solid var(--line);background:var(--bg2);padding:7px 10px;border-radius:7px}
.portal-balances strong{font-size:.85rem;font-weight:600;font-variant-numeric:tabular-nums}
.portal-balances small{font-size:.58rem;color:var(--muted)}
.portal-clear{display:flex;align-items:flex-start;gap:9px;color:var(--muted);font-size:.73rem;line-height:1.65;margin:3px 0 6px}
.portal-clear svg{color:#60c7a3;width:16px;height:16px;margin-top:2px}
.portal-list-note{color:var(--muted2);font-size:.66rem;line-height:1.65;margin:0 3px}
.portal-help-strip{display:flex;align-items:center;gap:14px;border:1px solid #987fff32;border-radius:13px;background:#987fff07;padding:20px;margin-top:24px}
.portal-help-strip>div{flex:1;min-width:0}
.portal-help-strip h3{font-size:.86rem;font-weight:600;margin:0 0 4px}
.portal-help-strip p{font-size:.71rem;margin:0;color:var(--muted)}
.portal-help-strip .btn{font-size:.72rem;white-space:nowrap;padding:0 12px}
.portal-help-strip .btn svg{width:15px;height:15px}
.portal-account-links{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}
.portal-account-links a{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:10px;padding:14px;color:var(--muted);font-size:.7rem}
.portal-account-links a span{flex:1}
.portal-account-links a:hover{color:var(--accent);border-color:var(--accent)}
.portal-account-links svg{width:16px;height:16px}
html[data-theme="light"] .portal-metric.tone-amber .portal-symbol{color:#996611;background:#fff4dc}
html[data-theme="light"] .portal-metric.tone-blue .portal-symbol{color:#386cc3;background:#edf3ff}
html[data-theme="light"] .portal-metric.tone-green .portal-symbol{color:#207c62;background:#eaf8f2}
html[data-theme="light"] .portal-clear svg{color:#207c62}
#attention{scroll-margin-top:100px}
@media(min-width:1181px) and (max-width:1380px){.client-content{padding:28px 24px 40px}.portal-dashboard-grid{gap:20px;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr)}.portal-help-strip{flex-wrap:wrap}.portal-help-strip .btn{margin-left:50px}.portal-metric a{padding:15px 15px 0}}
@media(max-width:1180px){.client-shell{grid-template-columns:1fr}.client-sidebar{width:248px}.portal-metrics{gap:12px}.portal-dashboard-grid{gap:22px}}
@media(max-width:1000px){.portal-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-dashboard-grid{grid-template-columns:1fr}.portal-followups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.portal-followups>.portal-section-head,.portal-followups>.portal-list-note{grid-column:1/-1;margin-bottom:0}.portal-followup{margin-bottom:0}.portal-resources{min-width:0}}
@media(max-width:640px){.client-content{padding:22px 16px 36px}.client-topbar{height:64px;padding:0 16px}.client-top-actions{gap:3px}.account-chip{padding-left:10px}.portal-dashboard .live-page-head{display:block;margin-bottom:22px}.portal-dashboard .live-connected{display:inline-flex;margin-top:13px}.portal-dashboard .live-page-head p{font-size:.82rem}.portal-metrics{gap:10px;margin-bottom:26px}.portal-metric a{padding:13px 13px 0}.portal-metric-top{gap:5px;align-items:flex-start;min-height:36px}.portal-metrics .portal-metric-top>span{font-size:.75rem;max-width:85px}.portal-metric .portal-symbol{width:27px;height:27px;border-radius:8px}.portal-metric .portal-symbol svg{width:15px;height:15px}.portal-metrics .portal-metric strong{font-size:1.7rem;margin:8px 0 13px}.portal-metrics .portal-metric small{font-size:.7rem}.portal-metric-foot{gap:6px;min-height:51px;padding:9px 0}.portal-followups{grid-template-columns:1fr;gap:12px}.portal-resource{padding:16px}.portal-resource-head{gap:10px;flex-wrap:wrap}.portal-resource-head>.portal-symbol{width:34px;height:34px}.portal-resource-head>div{flex-basis:calc(100% - 44px)}.portal-resource-head h3{font-size:.87rem}.portal-resource-head>.live-badge{margin-left:44px}.portal-resource-details{grid-template-columns:1fr 1fr;gap:14px}.portal-resource-foot{gap:10px}.portal-resource-foot .btn{font-size:.7rem}.portal-resource-foot .link-accent{font-size:.68rem}.portal-help-strip{padding:17px;flex-wrap:wrap;gap:12px}.portal-help-strip .btn{width:100%}.portal-account-links{grid-template-columns:1fr;gap:10px}.portal-section-head>span{font-size:.64rem}.portal-section-head h2{font-size:.97rem}.portal-eyebrow{font-size:.59rem}.portal-followup{padding:17px}}
@media(prefers-reduced-motion:reduce){.client-sidebar,.btn{transition:none}}
