/* Scheme B console layout and workflows. Shared primitives: platinum-ui.css. */
body.customer-portal { --ink:var(--pl-text); --soft:var(--pl-track); --green:var(--pl-mint-ink); --console-sidebar:232px; }
.customer-portal .sidebar { position:fixed; inset:0 auto 0 0; z-index:35; display:flex; flex-direction:column; width:var(--console-sidebar); padding:22px 14px 16px; background:var(--pl-sidebar); border-right:1px solid var(--pl-line); }
.customer-portal .brand { display:flex; padding:0 12px 26px; flex-shrink:0; min-width:0; }
.customer-portal .brand strong { display:block; max-width:180px; font-size:18px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.customer-portal .brand small { display:block; font-size:10px; color:var(--pl-muted); margin-top:4px; }
.customer-portal .nav-label { display:none; }
.customer-portal .sidebar nav { display:grid; align-content:start; gap:2px; flex:1; min-height:0; overflow-y:auto; scrollbar-width:thin; }
.customer-portal .nav-section-title { margin:12px 12px 4px; color:var(--pl-muted); font-size:10px; letter-spacing:1px; }
.customer-portal .nav-section-title:first-child { margin-top:0; }
.customer-portal .sidebar nav a { display:flex; align-items:center; gap:11px; padding:8px 12px; min-height:36px; border-radius:12px; color:var(--pl-muted); font-size:12px; }
.customer-portal .sidebar nav a[aria-current='page'] { background:var(--pl-active); color:var(--pl-accent); font-weight:650; }
.customer-portal .sidebar nav a > span { display:inline-flex; flex:none; width:18px; height:18px; }
.customer-portal .sidebar svg { width:18px; height:18px; }
.customer-portal .sidebar-bottom { flex-shrink:0; margin-top:auto; padding:20px 10px 0; }
.customer-portal .identity { display:flex; align-items:center; gap:10px; padding-bottom:14px; }
.customer-portal .avatar { display:grid; place-items:center; width:35px; height:35px; flex:none; border-radius:12px; background:var(--pl-violet); color:var(--pl-violet-ink); }
.customer-portal .identity strong { display:block; max-width:135px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.customer-portal .identity small { display:block; font-size:10px; color:var(--pl-muted); }
.customer-portal .footer-links { display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--pl-line); padding-top:12px; color:var(--pl-muted); font-size:10px; }
.customer-portal .footer-links button { padding-left:0; font-size:10px; }
.customer-portal > .workspace { margin-left:var(--console-sidebar); min-height:100dvh; }
.customer-portal .topbar { position:sticky; top:0; z-index:25; display:flex; align-items:center; gap:16px; padding:14px 30px; border-bottom:1px solid var(--pl-line); background:color-mix(in srgb,var(--pl-surface) 92%,transparent); backdrop-filter:blur(18px); }
.customer-portal .shell-toggle { flex:none; padding:7px; width:32px; height:32px; }
.customer-portal .shell-toggle svg { width:19px; height:19px; }
.customer-portal .breadcrumb { flex:1; min-width:0; color:var(--pl-muted); font-size:11px; }
.customer-portal .breadcrumb span { margin-inline:9px; opacity:.5; }
.customer-portal .breadcrumb strong { font-weight:550; color:var(--pl-text); }
.customer-portal main { max-width:1580px; padding:32px clamp(20px,3vw,44px) 60px; margin:auto; }
.customer-portal .page-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:26px; border-radius:20px; }
.customer-portal h1 { margin-block:7px; font-size:30px; letter-spacing:-1px; line-height:1.3; }
.customer-portal h2 { font-size:18px; line-height:1.4; }
.customer-portal h3 { font-size:14px; line-height:1.5; }
.customer-portal .muted { font-size:12px; line-height:1.8; }
.customer-portal .card { margin-bottom:22px; min-width:0; padding:26px; border-radius:20px; }
.customer-portal .section-title { flex-wrap:wrap; }
.customer-portal .section-title p { margin-top:5px; }
.customer-portal .fields, .customer-portal .fields fieldset { display:grid; gap:18px; min-width:0; }
.customer-portal fieldset { border:0; padding:0; margin:0; }
.customer-portal .fields label,.customer-portal .code-card>label { display:grid; gap:8px; min-width:0; font-size:12px; font-weight:550; }
.customer-portal :is(input:not([type='checkbox']),select,textarea) { width:100%; min-width:0; font-size:12px; }
.customer-portal input[type='checkbox'] { accent-color:var(--pl-accent); width:15px; height:15px; margin:0; flex:none; }
.customer-portal textarea { resize:vertical; line-height:1.8; min-height:95px; }
.customer-portal fieldset:disabled { opacity:.65; }
.customer-portal .fields label:has(>input[type='checkbox']) { display:flex; align-items:center; gap:9px; }
.customer-portal .fields small { font-weight:400; }
.customer-portal :is(.test-actions,.settings-actions,.pager) { display:flex; flex-wrap:wrap; align-items:center; gap:9px; }
.customer-portal .table-wrap { width:100%; overflow:auto; scrollbar-width:thin; }
.customer-portal table { width:100%; border-collapse:collapse; font-size:11px; text-align:left; }
.customer-portal th { padding:13px 12px; color:var(--pl-muted); background:var(--pl-bg); font-weight:500; white-space:nowrap; }
.customer-portal td { padding:17px 12px; border-bottom:1px solid var(--pl-line); white-space:nowrap; max-width:360px; overflow-wrap:anywhere; }
.customer-portal td code { font-size:11px; }
.customer-portal tbody tr:last-child td { border-bottom:0; }
.customer-portal .toolbar { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
.customer-portal .toolbar input { flex:1; min-width:180px; }
.customer-portal .toolbar select { width:150px; }
.customer-portal .card-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-top:20px; font-size:11px; }
.customer-portal .empty { text-align:center; color:var(--pl-muted); font-size:12px; line-height:1.9; padding:30px 18px; grid-column:1/-1; }
.customer-portal :is(.notice,.feedback) { padding:13px 16px; border:1px solid var(--pl-line); border-radius:12px; font-size:12px; line-height:1.9; overflow-wrap:anywhere; }
.customer-portal .notice { background:var(--pl-active); color:var(--pl-accent); margin-bottom:20px; }
.customer-portal .feedback { background:var(--pl-pink); color:var(--pl-pink-ink); margin-top:14px; }
.customer-portal .feedback[data-state='success'] { background:var(--pl-mint); color:var(--pl-mint-ink); }
.customer-portal .pill[data-state='warning'] { background:var(--pl-violet); color:var(--pl-violet-ink); }
.customer-portal .pill[data-state='error'] { background:var(--pl-pink); color:var(--pl-pink-ink); }
.customer-portal .toast { position:fixed; z-index:100; left:50%; bottom:24px; translate:-50% 0; max-width:90vw; padding:12px 18px; border-radius:12px; background:var(--pl-text); color:var(--pl-surface); box-shadow:var(--pl-shadow); font-size:12px; }
/* Identity-aware overview */
.customer-portal .record-kpis .stat { padding:20px; border-radius:16px; }
.customer-portal .record-kpis .stat>strong { font-size:clamp(21px,2.2vw,30px); margin-block:10px; }
.customer-portal .record-kpis .stat>small { display:block; line-height:1.8; }
.customer-portal .record-chart-grid { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:18px; margin-bottom:22px; align-items:start; }
.customer-portal .record-chart-grid>.card { margin:0; }
.customer-portal .record-chart-grid .section-title { align-items:start; gap:12px; }
.customer-portal .record-visualization .analytics-ranking li { flex-wrap:wrap; }
@media(max-width:1100px) { .customer-portal .record-chart-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:700px) { .customer-portal .record-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.customer-portal .welcome { display:grid; grid-template-columns:1.2fr 1fr; align-items:center; gap:36px; padding:clamp(26px,4vw,58px); border:1px solid var(--pl-line); border-radius:24px; background:radial-gradient(ellipse at 4% 0,var(--pl-violet),transparent 65%),linear-gradient(120deg,var(--pl-surface),var(--pl-aurora),var(--pl-glow)); box-shadow:var(--pl-shadow); }
.customer-portal .welcome-label { color:var(--pl-accent); font-size:10px; letter-spacing:1.6px; }
.customer-portal .welcome h2 { font-size:clamp(30px,3.6vw,48px); line-height:1.35; letter-spacing:-1.6px; margin-block:16px; }
.customer-portal .welcome p { color:var(--pl-muted); font-size:13px; line-height:1.9; }
.customer-portal .hero-actions { display:flex; flex-wrap:wrap; gap:14px; align-items:center; margin-top:26px; }
.customer-portal .hero-secondary { font-size:12px; color:var(--pl-accent); }
.customer-portal .welcome-terminal { border:1px solid var(--pl-line); padding:24px; border-radius:20px; background:var(--pl-surface); min-width:0; }
.customer-portal .terminal-dots { display:flex; align-items:center; gap:5px; margin-bottom:28px; color:var(--pl-muted); font-size:10px; }
.customer-portal .terminal-dots i { width:6px; height:6px; border-radius:50%; background:var(--pl-accent); }
.customer-portal .terminal-dots i:nth-child(2) { background:#7c3aed; }
.customer-portal .terminal-dots i:nth-child(3) { background:#10b981; }
.customer-portal .terminal-dots span { margin-left:auto; }
.customer-portal .welcome-terminal code { display:block; font-size:14px; overflow-wrap:anywhere; color:var(--pl-accent); }
.customer-portal .welcome-terminal p { font-size:10px; margin-block:12px 18px; }
.customer-portal .terminal-copy { background:var(--pl-track); color:var(--pl-text); border-color:var(--pl-line); }
.customer-portal .setup-progress { margin-bottom:20px; border:1px solid var(--pl-line); border-radius:16px; background:var(--pl-surface); padding:15px 18px; }
.customer-portal .setup-progress summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:var(--pl-muted); font-size:11px; list-style:none; }
.customer-portal .setup-progress summary span:last-child { margin-left:auto; color:var(--pl-accent); }
.customer-portal .setup-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:16px 0 0; padding:0; list-style:none; counter-reset:setup; }
.customer-portal .setup-steps li { counter-increment:setup; display:flex; align-items:center; gap:8px; padding:8px; font-size:11px; color:var(--pl-muted); }
.customer-portal .setup-steps li::before { content:counter(setup); display:grid; place-items:center; width:22px; height:22px; flex:none; border-radius:50%; background:var(--pl-track); font-size:10px; }
.customer-portal .setup-steps li.complete::before { content:'✓'; background:var(--pl-mint); color:var(--pl-mint-ink); }
.customer-portal .setup-steps button { font-size:11px; padding:0; min-height:22px; }
.customer-portal .stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.customer-portal .stat { position:relative; min-width:0; border:1px solid var(--pl-line); background:var(--pl-surface); }
.customer-portal .stat>span:first-child { display:block; font-size:11px; color:var(--pl-muted); }
.customer-portal .stat>strong { display:block; margin:16px 0 7px; font-size:30px; letter-spacing:-1px; line-height:1.4; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.customer-portal .stat>small { font-size:10px; color:var(--pl-muted); }
.customer-portal .analytics-card-heading { align-items:start; }
.customer-portal #overview-connected>.card { margin-top:22px; }
.customer-portal .legacy-overview>.section-title>strong { font-size:28px; color:var(--pl-accent); font-variant-numeric:tabular-nums; }
.customer-portal .analytics-inline-stats { gap:22px; }
.customer-portal .analytics-inline-stats small { display:block; }
.customer-portal .endpoint { display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding:14px; background:var(--pl-track); border-radius:12px; font-size:11px; }
.customer-portal .endpoint code { flex:1; overflow-wrap:anywhere; min-width:0; font-size:12px; }
/* Gallery first; sticky composer has no scrolling or transformed ancestors. */
.customer-portal .studio-intro { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:24px; }
.customer-portal .studio-eyebrow { color:var(--pl-accent); letter-spacing:2px; font-size:10px; }
.customer-portal .studio-intro h2 { font-size:25px; letter-spacing:-.7px; margin-block:8px; }
.customer-portal .studio-intro p { font-size:12px; color:var(--pl-muted); }
.customer-portal [data-panel='images'] { min-height:calc(100dvh - 220px); padding-bottom:20px; }
.customer-portal .image-workspace { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:22px; align-items:start; }
.customer-portal .image-canvas { display:grid; place-items:center; min-height:330px; border:1px dashed var(--pl-line); border-radius:16px; background:radial-gradient(ellipse at 50% 30%,var(--pl-violet),transparent 70%),var(--pl-bg); }
.customer-portal .image-canvas>img { display:block; max-width:100%; max-height:520px; object-fit:contain; border-radius:14px; }
.customer-portal .image-placeholder { text-align:center; color:var(--pl-muted); padding:28px; }
.customer-portal .image-placeholder svg { display:block; margin:0 auto 20px; color:var(--pl-accent); }
.customer-portal .image-placeholder h3 { font-size:15px; }
.customer-portal .image-placeholder p { font-size:11px; margin-top:8px; line-height:1.9; }
.customer-portal .image-canvas[aria-busy='true'] { border-color:var(--pl-accent); }
.customer-portal .image-result-details { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:15px; font-size:11px; color:var(--pl-muted); }
.customer-portal .image-history { display:grid; grid-template-columns:repeat(auto-fill,minmax(135px,1fr)); gap:12px; max-height:485px; overflow:auto; scrollbar-width:thin; padding:2px; }
.customer-portal .image-history-card { min-width:0; padding:8px; border:1px solid var(--pl-line); border-radius:14px; background:var(--pl-bg); }
.customer-portal .image-history-preview { display:grid; place-items:center; width:100%; aspect-ratio:1; padding:0; border:0; background:var(--pl-track); color:var(--pl-muted); border-radius:10px; font-size:10px; overflow:hidden; }
.customer-portal .image-history-preview img { width:100%; height:100%; object-fit:cover; }
.customer-portal .image-history-card p { font-size:11px; margin-top:9px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.customer-portal .image-history-card small { display:block; font-size:9px; color:var(--pl-muted); margin-top:6px; overflow-wrap:anywhere; }
.customer-portal .image-history-card .quiet { font-size:10px; min-height:26px; padding:5px 0; }
.customer-portal .image-dock { position:sticky; bottom:max(12px,env(safe-area-inset-bottom)); z-index:18; width:100%; margin:0 auto; padding:22px; background:color-mix(in srgb,var(--pl-surface) 88%,transparent); backdrop-filter:blur(18px); border-color:color-mix(in srgb,var(--pl-accent) 20%,var(--pl-line)); box-shadow:0 -8px 45px #101c4520,var(--pl-shadow); }
.customer-portal .image-dock>.section-title { margin-bottom:12px; }
.customer-portal .image-dock h2 { font-size:14px; }
.customer-portal #image-form { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; align-items:end; }
.customer-portal #image-form>label:nth-child(1) { grid-column:1/3; grid-row:1; }
.customer-portal #image-form>label:nth-child(2) { grid-column:3/5; grid-row:1; }
.customer-portal #image-form>.prompt-label { grid-column:1/-1; }
.customer-portal .prompt-label>span { display:flex; justify-content:space-between; gap:12px; }
.customer-portal #image-prompt { min-height:76px; max-height:240px; font-size:13px; }
.customer-portal #image-prompt-count { font-size:10px; font-weight:400; color:var(--pl-muted); }
.customer-portal .prompt-templates { display:flex; flex-wrap:wrap; gap:6px; grid-column:1/-1; }
.customer-portal .prompt-templates button { border-radius:999px; padding:4px 10px; min-height:26px; border-color:var(--pl-line); background:var(--pl-track); color:var(--pl-muted); font-size:10px; }
.customer-portal #image-form>label:has(#image-size) { grid-column:1; }
.customer-portal #image-connection { grid-column:2; font-size:10px; align-self:center; }
.customer-portal .image-price-box { grid-column:1/3; display:flex; flex-wrap:wrap; align-items:center; gap:5px 10px; }
.customer-portal .image-price-box>span { color:var(--pl-muted); font-size:10px; }
.customer-portal .image-price-box>strong { font-size:12px; }
.customer-portal .image-price-box>p { width:100%; font-size:10px; color:var(--pl-muted); line-height:1.7; }
.customer-portal #image-submit { grid-column:3; grid-row:5/7; align-self:center; min-height:44px; }
.customer-portal #image-stop { grid-column:4; grid-row:5/7; align-self:center; }
.customer-portal #image-feedback { margin-top:8px; }
/* Wallet: lifetime balances and recent movements have separate scopes. */
.customer-portal .wallet-top-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr); gap:22px; margin-bottom:22px; align-items:stretch; }
.customer-portal .wallet-top-grid>.card { margin:0; padding:26px; }
.customer-portal .wallet-overview { background:linear-gradient(145deg,var(--pl-surface) 55%,var(--pl-aurora)); }
.customer-portal .wallet-overview h2,.customer-portal .wallet-recharge-card h2 { margin-top:5px; }
.customer-portal .wallet-balance-label { color:var(--pl-muted); font-size:12px; }
.customer-portal #wallet-balance { display:block; margin-block:8px; font-size:clamp(34px,3.7vw,52px); line-height:1.35; letter-spacing:-1.5px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.customer-portal .wallet-balance-help { color:var(--pl-muted); font-size:11px; line-height:1.8; }
.customer-portal .wallet-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-block:24px 12px; }
.customer-portal .wallet-metrics>div { min-width:0; padding:14px 12px; border:1px solid var(--pl-line); border-radius:13px; background:var(--pl-surface); }
.customer-portal .wallet-metrics span,.customer-portal .wallet-metrics small { display:block; color:var(--pl-muted); font-size:10px; line-height:1.8; }
.customer-portal .wallet-metrics strong { display:block; margin-block:6px; font-size:clamp(16px,1.7vw,23px); letter-spacing:-.5px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.customer-portal .wallet-hold-status { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.customer-portal .wallet-hold-status:not(:has([hidden])) { margin-block:12px; }
.customer-portal .wallet-overview>.field-help { margin-top:12px; }
.customer-portal .wallet-recharge-symbol { display:grid; place-items:center; flex:none; width:38px; height:38px; border-radius:13px; background:var(--pl-mint); color:var(--pl-mint-ink); font-size:22px; }
.customer-portal .wallet-shop-link { width:100%; margin-block:18px; }
.customer-portal .wallet-redeem-form { display:grid; gap:10px; padding-top:16px; border-top:1px solid var(--pl-line); }
.customer-portal .wallet-redeem-form label { font-size:11px; font-weight:600; }
.customer-portal .wallet-redeem-form input { min-width:0; }
.customer-portal .wallet-recharge-card>.field-help { margin-top:14px; }
.customer-portal .wallet-movement-list { display:grid; gap:14px; padding:0; margin:0; list-style:none; }
.customer-portal .wallet-movement-list>li { display:grid; grid-template-columns:180px minmax(0,1fr) minmax(110px,150px); align-items:center; gap:18px; }
.customer-portal .wallet-movement-label { display:flex; align-items:center; gap:10px; min-width:0; }
.customer-portal .wallet-movement-label small { color:var(--pl-muted); white-space:nowrap; font-size:10px; }
.customer-portal .wallet-movement-amount { text-align:right; overflow-wrap:anywhere; font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.customer-portal .wallet-movement-bar { display:block; width:100%; height:9px; border:0; border-radius:999px; overflow:hidden; appearance:none; background:var(--pl-track); color:var(--chart-blue); accent-color:var(--chart-blue); }
.customer-portal .wallet-movement-bar::-webkit-progress-bar { background:var(--pl-track); border-radius:999px; }
.customer-portal .wallet-movement-bar::-webkit-progress-value { background:currentColor; border-radius:999px; }
.customer-portal .wallet-movement-bar::-moz-progress-bar { background:currentColor; border-radius:999px; }
.customer-portal .wallet-movement-list>li[data-kind='redeem'] .wallet-movement-bar { color:var(--pl-mint-ink); accent-color:var(--pl-mint-ink); }
.customer-portal .wallet-movement-list>li[data-kind='charge'] .wallet-movement-bar { color:var(--pl-pink-ink); accent-color:var(--pl-pink-ink); }
.customer-portal .wallet-movement-list>li[data-kind='refund'] .wallet-movement-bar { color:var(--chart-green); accent-color:var(--chart-green); }
.customer-portal .wallet-movement-note { margin-top:20px; padding-top:14px; border-top:1px solid var(--pl-line); color:var(--pl-muted); font-size:11px; line-height:1.9; }
.customer-portal .wallet-ledger-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.customer-portal .wallet-filters { display:flex; flex-wrap:wrap; gap:6px; }
.customer-portal .wallet-filters>button { border:1px solid var(--pl-line); border-radius:999px; background:var(--pl-surface); color:var(--pl-muted); font-size:11px; padding:7px 12px; }
.customer-portal .wallet-filters>button[aria-pressed='true'] { background:var(--pl-active); color:var(--pl-accent); border-color:var(--pl-accent); }
.customer-portal .wallet-search { flex:1; min-width:180px; margin-left:auto; }
.customer-portal #wallet-result-count { margin-block:12px; }
.customer-portal .wallet-type { display:inline-flex; align-items:center; gap:7px; padding:5px 8px; border-radius:9px; font-size:10px; white-space:nowrap; background:var(--pl-track); color:var(--pl-muted); }
.customer-portal .wallet-type-icon { display:inline-grid; place-items:center; width:16px; height:16px; font-weight:700; font-size:14px; }
.customer-portal .wallet-type-icon svg { width:15px; height:15px; }
.customer-portal .wallet-type[data-kind='redeem'],.customer-portal .wallet-type[data-kind='refund'] { background:var(--pl-mint); color:var(--pl-mint-ink); }
.customer-portal .wallet-type[data-kind='charge'] { background:var(--pl-pink); color:var(--pl-pink-ink); }
.customer-portal .wallet-type[data-kind='reserve'],.customer-portal .wallet-type[data-kind='release'] { background:var(--pl-active); color:var(--pl-accent); }
.customer-portal .wallet-credit { color:var(--pl-mint-ink); font-weight:650; }
.customer-portal .wallet-debit { color:var(--pl-pink-ink); font-weight:600; }
.customer-portal .wallet-neutral { color:var(--pl-muted); }
.customer-portal .wallet-ledger :is(.wallet-amount,.wallet-after) { font-variant-numeric:tabular-nums; text-align:right; }
.customer-portal .wallet-ledger th:nth-child(3),.customer-portal .wallet-ledger th:nth-child(4) { text-align:right; }
.customer-portal .wallet-ledger .wallet-description { white-space:normal; min-width:190px; max-width:430px; line-height:1.9; }
.customer-portal .wallet-ledger .wallet-timestamp { color:var(--pl-muted); }
.customer-portal .wallet-ledger .wallet-empty { text-align:center; padding:30px 16px; color:var(--pl-muted); white-space:normal; }
@media(max-width:1150px) { .customer-portal .wallet-top-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:650px) {
 .customer-portal .wallet-top-grid>.card { padding:20px; }
 .customer-portal .wallet-metrics { grid-template-columns:minmax(0,1fr); gap:8px; }
 .customer-portal .wallet-metrics>div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 12px; align-items:center; }
 .customer-portal .wallet-metrics small { grid-column:1/-1; }
 .customer-portal .wallet-metrics strong { font-size:21px; }
 .customer-portal .wallet-movement-list>li { grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; }
 .customer-portal .wallet-movement-bar { grid-row:2; grid-column:1/-1; }
 .customer-portal .wallet-movement-label { gap:6px; }
 .customer-portal .wallet-search { width:100%; flex-basis:100%; }
}
/* Single-focus access docs and playground */
.customer-portal .chat-workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(290px,360px); gap:22px; align-items:start; }
.customer-portal .chat-main { min-width:0; }
.customer-portal .chat-session-bar { display:flex; flex-wrap:wrap; align-items:center; gap:14px; padding:18px; margin-bottom:16px; }
.customer-portal .chat-session-selectors { display:flex; flex:1; flex-wrap:wrap; gap:12px; min-width:0; }
.customer-portal .chat-session-selectors label { display:grid; flex:1; gap:6px; min-width:130px; font-size:10px; color:var(--pl-muted); }
.customer-portal .chat-session-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.customer-portal .chat-price { width:100%; padding:8px 12px; border-radius:12px; color:var(--pl-accent); background:var(--pl-active); font-size:10px; line-height:1.9; overflow-wrap:anywhere; }
.customer-portal .chat-messages { display:flex; flex-direction:column; gap:20px; min-height:350px; max-height:65dvh; overflow:auto; padding:10px 6px 24px; scrollbar-width:thin; }
.customer-portal .chat-message { align-self:flex-start; width:min(92%,760px); min-width:0; padding:18px; border:1px solid var(--pl-line); border-radius:18px 18px 18px 5px; background:var(--pl-surface); box-shadow:var(--pl-shadow); }
.customer-portal .chat-message[data-role='user'] { align-self:flex-end; border-radius:18px 18px 5px 18px; background:linear-gradient(135deg,var(--pl-active),var(--pl-violet)); }
.customer-portal .chat-message-meta { font-size:10px; line-height:1.9; color:var(--pl-muted); overflow-wrap:anywhere; }
.customer-portal .chat-message-body { font-size:13px; line-height:1.9; overflow-wrap:anywhere; padding-block:10px; }
.customer-portal .chat-message-body p { white-space:pre-wrap; margin:0 0 8px; }
.customer-portal .chat-code-block { min-width:0; margin-block:10px; border:1px solid var(--pl-line); border-radius:12px; background:var(--pl-bg); overflow:hidden; }
.customer-portal .chat-code-toolbar { display:flex; justify-content:space-between; align-items:center; padding:5px 12px; font-size:10px; color:var(--pl-muted); border-bottom:1px solid var(--pl-line); }
.customer-portal :is(.chat-code-block,.chat-snapshot,.chat-json) pre { margin:0; padding:14px; max-width:100%; overflow:auto; white-space:pre; font:11px/1.8 Consolas,monospace; color:var(--pl-text); }
.customer-portal .chat-message-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; }
.customer-portal .chat-include { display:flex; align-items:center; gap:6px; color:var(--pl-muted); font-size:10px; }
.customer-portal :is(.chat-message,.chat-presets) button.quiet { min-height:26px; padding:3px 5px; font-size:10px; }
.customer-portal .chat-request-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:12px; font-size:9px; color:var(--pl-muted); overflow-wrap:anywhere; }
.customer-portal .chat-message-usage { font-size:10px; color:var(--pl-muted); line-height:1.8; margin-top:7px; }
.customer-portal :is(.chat-snapshot,.chat-json) { margin-top:12px; padding-top:10px; border-top:1px solid var(--pl-line); font-size:10px; color:var(--pl-muted); }
.customer-portal :is(.chat-snapshot,.chat-json) summary { cursor:pointer; margin-bottom:10px; }
.customer-portal .chat-composer { position:sticky; bottom:12px; z-index:15; margin:10px 0 0; padding:16px; background:color-mix(in srgb,var(--pl-surface) 94%,transparent); backdrop-filter:blur(16px); box-shadow:var(--pl-shadow); }
.customer-portal .chat-composer textarea { min-height:90px; max-height:240px; font-size:13px; }
.customer-portal .chat-composer-footer { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; margin-top:10px; }
.customer-portal .chat-composer-footer>.muted { font-size:10px; }
.customer-portal #test-usage { margin-top:10px; line-height:1.8; }
.customer-portal .chat-inspector { position:sticky; top:86px; min-width:0; padding:18px; max-height:calc(100dvh - 105px); overflow:auto; scrollbar-width:thin; }
.customer-portal .chat-inspector>summary { display:flex; justify-content:space-between; gap:10px; align-items:center; cursor:pointer; font-size:14px; font-weight:650; list-style:none; }
.customer-portal .chat-inspector>summary>span { font-size:10px; color:var(--pl-muted); font-weight:400; }
.customer-portal .chat-inspector-section { padding-top:18px; margin-top:18px; border-top:1px solid var(--pl-line); min-width:0; }
.customer-portal .chat-inspector-section .section-title { margin-bottom:10px; }
.customer-portal .chat-presets { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:10px; }
.customer-portal .chat-presets button { border:1px solid var(--pl-line); border-radius:999px; }
.customer-portal .chat-parameters { display:grid; gap:14px; }
.customer-portal .chat-parameters>label { display:grid; gap:6px; font-size:11px; }
.customer-portal .chat-parameters>.chat-stream-choice { display:flex; align-items:center; gap:8px; }
.customer-portal .chat-context-list { padding-left:0; margin-block:12px; list-style:none; max-height:220px; overflow:auto; scrollbar-width:thin; }
.customer-portal .chat-context-list li { padding:8px 10px; margin-bottom:6px; border-radius:9px; background:var(--pl-bg); font-size:10px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
.customer-portal .chat-inspector .field-help { font-size:10px; line-height:1.9; margin-top:8px; overflow-wrap:anywhere; }
.customer-portal .chat-empty { margin:auto; max-width:500px; padding:48px 18px; text-align:center; }
.customer-portal .chat-empty h2 { font-size:24px; margin-block:12px; }
.customer-portal .chat-empty>p { color:var(--pl-muted); font-size:12px; line-height:1.9; }
.customer-portal .chat-suggestions { display:grid; gap:10px; margin-top:24px; }
.customer-portal .chat-suggestions .quiet { padding:12px; border:1px solid var(--pl-line); border-radius:14px; background:var(--pl-surface); color:var(--pl-accent); font-size:11px; text-align:left; }
@media(max-width:1150px) { .customer-portal .chat-workspace { grid-template-columns:minmax(0,1fr) minmax(260px,300px); gap:16px; } }
@media(max-width:950px) {
 .customer-portal .chat-workspace { grid-template-columns:minmax(0,1fr); }
 .customer-portal .chat-inspector { position:static; grid-row:1; max-height:none; margin-bottom:0; }
 .customer-portal .chat-messages { max-height:60dvh; }
}
@media(max-width:550px) {
 .customer-portal .chat-message { width:96%; padding:13px; }
 .customer-portal .chat-session-actions { width:100%; justify-content:space-between; }
 .customer-portal .chat-composer { bottom:8px; padding:12px; }
 .customer-portal .chat-composer-footer .test-actions { width:100%; justify-content:flex-end; }
}
.customer-portal .connection-parameters { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.customer-portal .connection-parameters>div { min-width:0; }
.customer-portal .connection-parameters dt { font-size:11px; color:var(--pl-muted); margin-bottom:8px; }
.customer-portal .connection-parameters dd { font-size:12px; overflow-wrap:anywhere; display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.customer-portal .connection-parameters code { min-width:0; color:var(--pl-accent); }
.customer-portal .connection-parameters button { font-size:10px; min-height:28px; padding:4px 8px; }
.customer-portal .endpoint-list { display:flex; flex-wrap:wrap; gap:10px 20px; border-top:1px solid var(--pl-line); margin-top:22px; padding-top:18px; }
.customer-portal .endpoint-list p { display:flex; align-items:center; gap:7px; font-size:10px; }
.customer-portal .method { border-radius:5px; background:var(--pl-active); color:var(--pl-accent); font-size:9px; padding:3px 5px; }
.customer-portal .doc-tabs { overflow:auto; scrollbar-width:thin; width:fit-content; max-width:100%; margin-bottom:24px; border-radius:12px; }
.customer-portal .doc-tabs button { white-space:nowrap; font-size:11px; padding:9px 14px; border-radius:9px; }
.customer-portal .doc-tabs:not([data-motion-slider]) button[aria-selected='true'] { color:var(--pl-accent); background:var(--pl-surface); }
.customer-portal [data-subpanel]>.card { margin:0; padding:0; border:0; box-shadow:none; background:transparent; }
.customer-portal [data-subpanel] p { font-size:12px; color:var(--pl-muted); line-height:1.9; }
.customer-portal .code-tabs { display:flex; width:fit-content; gap:3px; margin-block:18px 12px; padding:4px; border-radius:10px; background:var(--pl-track); }
.customer-portal .code-tabs button { border:0; background:transparent; color:var(--pl-muted); border-radius:8px; font-size:11px; }
.customer-portal .code-tabs:not([data-motion-slider]) button.selected { background:var(--pl-surface); color:var(--pl-accent); }
.customer-portal .example-code { margin-block:16px; padding:22px; max-height:500px; overflow:auto; border:1px solid var(--pl-line); border-radius:14px; background:var(--pl-bg); color:var(--pl-text); font:11px/1.9 Consolas,monospace; }
.customer-portal .first-call-station { border-color:color-mix(in srgb,var(--pl-accent) 28%,var(--pl-line)); }
.customer-portal #first-call-form { grid-template-columns:1fr 1fr; }
.customer-portal #first-call-form>p { grid-column:1/-1; }
.customer-portal #first-call-submit { justify-self:start; }
/* Modal workflows and legacy query */
.customer-portal dialog { width:min(480px,calc(100vw - 28px)); max-height:calc(100dvh - 32px); overflow:auto; overscroll-behavior:contain; padding:28px; border-radius:20px; }
.customer-portal .passkey-login-area { margin-top:18px; }
.customer-portal .passkey-login-area>button { width:100%; }
.customer-portal .legacy-login { margin-top:22px; border-top:1px solid var(--pl-line); padding-top:16px; font-size:11px; color:var(--pl-muted); }
.customer-portal #token-form { display:grid; gap:12px; margin-top:16px; }
.customer-portal dialog.auth-dialog { width:min(500px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); border-radius:24px; padding:28px; border:1px solid var(--pl-line); box-shadow:var(--pl-raise); background:radial-gradient(ellipse at 8% 0,var(--pl-aurora),transparent 38%),var(--pl-surface); }
.customer-portal .auth-brand-row { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:20px; }
.customer-portal .auth-brand { display:flex; align-items:center; gap:10px; min-width:0; }
.customer-portal .auth-brand strong { font-size:14px; overflow-wrap:anywhere; }
.customer-portal .auth-brand-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:12px; color:var(--pl-accent); background:var(--pl-active); flex:none; }
.customer-portal .auth-brand-icon svg { width:23px; height:23px; }
.customer-portal .auth-close { width:36px; height:36px; padding:0; flex:none; }
.customer-portal .auth-heading h2 { margin-block:6px 10px; font-size:28px; letter-spacing:-.7px; }
.customer-portal .auth-heading p { font-size:12px; line-height:1.9; color:var(--pl-muted); }
.customer-portal .auth-mode-switch { display:grid; grid-template-columns:1fr 1fr; width:100%; margin-block:22px; }
.customer-portal .auth-mode-switch button { min-height:38px; font-size:12px; justify-content:center; }
.customer-portal #user-auth-form { gap:13px; }
.customer-portal :is(.auth-dialog,.auth-card) input { min-height:46px; font-size:13px; }
.customer-portal :is(.auth-dialog,.auth-card) .auth-secret-control input { padding-right:46px; }
.customer-portal :is(.auth-dialog,.auth-card) :is(label,.fields label) { font-size:12px; }
.customer-portal #auth-username-hint { margin-top:-6px; font-size:10px; }
.customer-portal #access-card .passkey-login-area { margin-top:0; }
.customer-portal #passkey-login { min-height:46px; border-color:var(--pl-accent); color:var(--pl-accent); background:var(--pl-active); }
.customer-portal #passkey-login svg { width:22px; height:22px; flex:none; }
.customer-portal #passkey-login-help { font-size:10px; line-height:1.8; }
.customer-portal .auth-divider { display:flex; align-items:center; gap:12px; color:var(--pl-muted); font-size:10px; }
.customer-portal .auth-divider::before,.customer-portal .auth-divider::after { content:''; flex:1; height:1px; background:var(--pl-line); }
.customer-portal :is(#auth-password-hint,#auth-confirm-hint) { font-size:10px; line-height:1.8; margin-top:0; color:var(--pl-muted); }
.customer-portal :is(#auth-password-hint,#auth-confirm-hint)[data-valid='true'] { color:var(--pl-mint-ink); }
.customer-portal .auth-factor-card { display:grid; gap:8px; padding:14px; background:var(--pl-active); border:1px solid var(--pl-line); border-radius:14px; }
.customer-portal .auth-factor-card>span { color:var(--pl-muted); font-size:11px; line-height:1.8; font-weight:400; }
.customer-portal #user-auth-submit { min-height:46px; width:100%; margin-top:3px; }
.customer-portal :is(.auth-dialog,.auth-card) .feedback { margin-top:0; line-height:1.8; border-radius:12px; }
.customer-portal :is(.auth-dialog,.auth-card) .legacy-login { margin-top:22px; padding-top:18px; }
.customer-portal :is(.auth-dialog,.auth-card) .legacy-login summary { cursor:pointer; font-size:11px; line-height:1.8; }
.customer-portal .security-auth-dialog>.section-title { padding-bottom:17px; border-bottom:1px solid var(--pl-line); align-items:start; }
.customer-portal .security-auth-dialog>.section-title h2 { font-size:22px; }
.customer-portal .security-auth-dialog .fields { gap:16px; }
.customer-portal .security-auth-dialog :is(#password-save,#security-verify-submit,#totp-enable-submit,#verify-email-submit) { min-height:44px; width:100%; }
.customer-portal :is(.account-required,.settings-login) { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px; border-radius:16px; background:var(--pl-surface); color:var(--pl-text); border:1px solid var(--pl-line); box-shadow:var(--pl-shadow); }
.customer-portal :is(.account-required,.settings-login) button { padding:9px 13px; background:var(--pl-active); color:var(--pl-accent); border-radius:10px; }
@media(max-width:560px) {
 .customer-portal dialog.auth-dialog { padding:20px; }
 .customer-portal .auth-heading h2 { font-size:25px; }
 .customer-portal :is(.account-required,.settings-login)>button { min-height:44px; }
}
.customer-portal .key-information { display:flex; align-items:center; flex-wrap:wrap; gap:14px; padding:20px; background:var(--pl-track); border:1px solid var(--pl-line); border-radius:20px; }
.customer-portal .key-information code { display:block; color:var(--pl-muted); font-size:12px; margin-top:8px; }
.customer-portal .key-facts { display:flex; gap:36px; margin:22px 0; }
.customer-portal .key-facts dt { color:var(--pl-muted); font-size:11px; }
.customer-portal .key-facts dd { font-size:24px; margin-top:8px; font-variant-numeric:tabular-nums; }
/* shell.js owns mobile relocation and focus behavior. */
.customer-portal .navigation-sheet { position:fixed; inset:0 auto 0 0; margin:0; padding:12px 0 0; width:290px; max-width:85vw; height:100dvh; max-height:100dvh; border:0; border-radius:0 20px 20px 0; background:var(--pl-sidebar); }
.customer-portal .navigation-sheet>.sidebar { position:static; width:100%; min-height:calc(100dvh - 60px); border:0; padding-top:10px; }
.customer-portal .navigation-sheet-close { display:flex; margin:0 12px 10px auto; font-size:11px; }
body.customer-portal:has(.navigation-sheet[open]) { overflow:hidden; }
@media (min-width:761px) {
 /* Three compact rows; mobile retains its existing stacked composer. */
 .customer-portal [data-panel='images'] { padding-bottom:48px; }
 .customer-portal .image-dock { padding:12px 16px; }
 .customer-portal .image-dock>.section-title { display:none; }
 .customer-portal #image-form { grid-template-columns:repeat(10,minmax(0,1fr)); gap:6px 10px; }
 .customer-portal #image-form>label { gap:4px; font-size:10px; }
 .customer-portal #image-form>.prompt-label { grid-column:1/-1; grid-row:1; }
 .customer-portal #image-prompt { height:54px; min-height:54px; max-height:110px; padding:7px 10px; font-size:12px; }
 .customer-portal #image-form>label:nth-child(1) { grid-column:1/4; grid-row:2; }
 .customer-portal #image-form>label:nth-child(2) { grid-column:4/6; grid-row:2; }
 .customer-portal #image-form>label:has(#image-size) { grid-column:6/8; grid-row:2; }
 .customer-portal #image-form select { min-height:30px; padding:4px 8px; font-size:11px; }
 .customer-portal .prompt-templates { grid-column:1/4; grid-row:3; gap:4px; align-self:center; }
 .customer-portal .prompt-templates button { min-height:23px; padding:3px 7px; font-size:9px; }
 .customer-portal #image-connection { grid-column:4/6; grid-row:3; }
 .customer-portal .image-price-box { grid-column:6/-1; grid-row:3; gap:2px 8px; }
 .customer-portal .image-price-box>strong { font-size:11px; }
 .customer-portal .image-price-box>p { font-size:9px; line-height:1.4; }
 .customer-portal #image-submit { grid-column:8/10; grid-row:2; min-height:32px; align-self:end; }
 .customer-portal #image-stop { grid-column:10/-1; grid-row:2; align-self:end; padding-inline:3px; font-size:10px; }
 .customer-portal #image-feedback { margin-top:4px; font-size:10px; }
 .customer-portal #image-feedback:empty { display:none; }
 .customer-portal.sidebar-collapsed>.sidebar { width:72px; padding-inline:10px; }
 .customer-portal.sidebar-collapsed>.workspace { margin-left:72px; }
 .customer-portal.sidebar-collapsed>.sidebar :is(.brand,.nav-label,.nav-section-title,.sidebar-bottom) { display:none; }
 .customer-portal.sidebar-collapsed>.sidebar nav a { justify-content:center; font-size:0; gap:0; padding:10px; }
}
@media (max-width:1180px) {
 body.customer-portal { --console-sidebar:208px; }
 .customer-portal .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .customer-portal .analytics-grid,.customer-portal .image-workspace { grid-template-columns:minmax(0,1fr); }
 .customer-portal .image-history { max-height:300px; }
}
@media (max-width:960px) {
 .customer-portal .welcome { grid-template-columns:1fr; }
}
@media (max-width:760px) {
 .customer-portal>.workspace,.customer-portal.sidebar-collapsed>.workspace { margin-left:0; }
 .customer-portal .topbar { padding:12px 14px; gap:8px; }
 .customer-portal .breadcrumb { font-size:10px; }
 .customer-portal .breadcrumb span { margin-inline:4px; }
 .customer-portal .top-actions { gap:4px; }
 .customer-portal .top-actions button { padding:6px 8px; font-size:10px; min-height:30px; }
 .customer-portal .top-actions .theme-toggle { width:30px; height:30px; flex-basis:30px; }
 .customer-portal main { padding:22px 16px 40px; }
 .customer-portal .page-heading { padding:22px; gap:12px; }
 .customer-portal h1 { font-size:26px; }
 .customer-portal .page-heading .muted { font-size:11px; }
 .customer-portal .page-heading>.pill { font-size:9px; }
 .customer-portal .card { padding:20px; margin-bottom:18px; }
 .customer-portal .setup-steps { grid-template-columns:1fr 1fr; gap:8px; }
 .customer-portal .connection-parameters { grid-template-columns:1fr; gap:18px; }
 .customer-portal .doc-tabs { width:100%; }
 .customer-portal .doc-tabs button { font-size:10px; padding:8px 11px; }
 .customer-portal .image-dock { padding:17px; bottom:max(10px,env(safe-area-inset-bottom)); }
 .customer-portal .image-canvas { min-height:260px; }
 .customer-portal .image-canvas>img { max-height:380px; }
 .customer-portal .image-result-details { flex-wrap:wrap; }
 .customer-portal #image-form { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; }
 .customer-portal #image-form>label:nth-child(1) { grid-column:1; grid-row:1; }
 .customer-portal #image-form>label:nth-child(2) { grid-column:2; grid-row:1; }
 .customer-portal #image-form>label { font-size:10px; }
 .customer-portal .image-price-box { grid-column:1/-1; }
 .customer-portal #image-submit { grid-column:1; grid-row:auto; width:100%; }
 .customer-portal #image-stop { grid-column:2; grid-row:auto; }
 .customer-portal .image-dock>.section-title { display:none; }
 .customer-portal #image-prompt { min-height:65px; max-height:150px; }
 .customer-portal .prompt-templates button { font-size:9px; }
}
@media (max-width:420px) {
 .customer-portal .topbar .breadcrumb { font-size:0; }
 .customer-portal .topbar .breadcrumb strong { font-size:10px; }
 .customer-portal .welcome { padding:24px; }
 .customer-portal .welcome-terminal { padding:18px; }
 .customer-portal .analytics-card-heading .analytics-segment { width:100%; }
 .customer-portal #first-call-form { grid-template-columns:1fr; }
 .customer-portal .stat-grid { gap:10px; }
 .customer-portal .stat>strong { font-size:24px; }
 .customer-portal dialog { padding:22px; }
}

/* Profile and security component layouts, consolidated and retokenized. */
.profile-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:22px;align-items:start}
@media(min-width:761px){.customer-portal .sidebar>nav{min-height:0;overflow-y:auto;flex:1;align-content:start}.customer-portal .sidebar>.brand,.customer-portal .sidebar-bottom{flex-shrink:0}}
.profile-summary{text-align:center;padding:32px 24px}
.profile-avatar{display:grid;place-items:center;width:76px;height:76px;margin:0 auto 18px;border:5px solid var(--pl-line);border-radius:24px;background:var(--pl-track);color:var(--pl-text);font-size:28px;font-weight:600}
.profile-summary h2{overflow-wrap:anywhere;margin-bottom:6px}.profile-summary>.pill{margin-top:18px}.profile-facts{margin:24px 0;text-align:left}.profile-facts>div{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line,var(--pl-line))}.profile-facts dt{color:var(--pl-text);font-size:12px;flex-shrink:0}.profile-facts dd{margin:0;font-size:12px;text-align:right;overflow-wrap:anywhere}
.customer-portal :is(#profile-form,#password-form) fieldset{display:grid;gap:18px;min-width:0;margin:0;padding:0;border:0}.customer-portal :is(#profile-form,#password-form) .primary{justify-self:start}.customer-portal fieldset:disabled{opacity:.65}.customer-portal #profile-form label{min-width:0}.customer-portal #profile-form small{font-weight:400;line-height:1.7}
.security-intro{display:flex;align-items:center;gap:20px;padding:18px 4px 30px}.security-intro h2{font-size:24px;margin:7px 0}.security-intro>a{margin-left:auto;white-space:nowrap}.security-emblem{width:66px;height:66px;display:grid;place-items:center;flex-shrink:0;border:1px solid var(--pl-line);background:var(--pl-track);border-radius:20px;font-size:35px;color:var(--pl-text)}
.security-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.security-current{text-align:center}.security-current .section-title{text-align:left}.current-device-icon{display:grid;place-items:center;width:68px;height:68px;border-radius:20px;background:var(--pl-track);color:var(--pl-text);margin:24px auto 15px;font-size:33px}.security-current h3{font-size:16px}.security-current .profile-facts{margin-bottom:18px}.security-current .field-help{text-align:left}.security-current #security-device-agent{font-size:10px;line-height:1.6;overflow-wrap:anywhere;margin:12px 0}
.settings-actions{display:flex;gap:9px;flex-wrap:wrap}.security-devices{display:grid;gap:0}.security-device{display:flex;align-items:center;gap:16px;padding:20px 0;border-top:1px solid var(--line,var(--pl-line))}.device-symbol{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;background:var(--pl-track);color:var(--pl-text);font-size:25px}.device-description{flex:1;min-width:0}.device-description strong{font-size:13px}.device-description p{font-size:11px;line-height:1.8;margin:5px 0 0;overflow-wrap:anywhere}.device-description .device-agent{font-size:10px}.security-device>.pill,.security-device>button{flex-shrink:0}.settings-login{margin-bottom:22px}.settings-login button{margin-left:10px}.customer-portal [data-panel='security']>.card{margin-top:22px}.customer-portal :is(#profile-feedback,#password-feedback,#security-feedback)[data-state='success']{background:var(--pl-track);color:var(--pl-text);border-color:var(--pl-line)}

@media(max-width:1000px){.profile-layout{grid-template-columns:230px minmax(0,1fr)}.security-grid{grid-template-columns:1fr}.security-intro h2{font-size:22px}}
@media(max-width:650px){.profile-layout{grid-template-columns:1fr;gap:16px}.profile-summary{padding:25px 20px}.security-intro{gap:14px;flex-wrap:wrap;padding-bottom:22px}.security-intro h2{font-size:20px}.security-intro>a{margin-left:0}.security-emblem{width:48px;height:48px;border-radius:15px;font-size:28px}.security-device{gap:12px;flex-wrap:wrap;align-items:flex-start}.security-device>.pill,.security-device>button{margin-left:54px}.device-description{flex-basis:calc(100% - 54px)}.security-grid{gap:0}.security-current{margin-top:16px}.settings-actions{margin-top:10px}.profile-facts>div{gap:12px}}
/* Security follows the compact settings layout, with authentication and access kept together. */
.security-layout{display:grid;grid-template-columns:minmax(0,2.05fr) minmax(290px,1fr);gap:24px;align-items:start;max-width:1280px;margin:0 auto}
.security-main,.security-side{min-width:0}.security-section-label{font-size:12px;font-weight:650;margin:4px 0 12px}.security-main>.security-section-label:not(:first-child),.security-side>.security-section-label:not(:first-child){margin-top:26px}
.customer-portal .security-layout .card{border-radius:20px;padding:20px;margin-bottom:12px;box-shadow:var(--pl-shadow)}.security-layout h3{font-size:13px;font-weight:650;margin:0}.security-layout .section-title{align-items:flex-start;margin-bottom:14px;gap:14px}.security-layout p.muted{font-size:11px;line-height:1.7;margin:5px 0 0}.security-layout .field-help{font-size:10px;line-height:1.8}.security-layout .section-title .settings-actions{flex-shrink:0;gap:7px;margin:0}
.security-layout :is(button,.button){border-radius:20px;min-height:29px;font-size:10px;padding:4px 11px;white-space:nowrap}.security-layout .tag{border-radius:12px;font-size:9px}.security-row-icon{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;border-radius:50%;font-size:17px;background:var(--pl-track);color:var(--pl-text)}.security-row-icon.blue{background:var(--pl-track);color:var(--pl-text)}.security-row-icon.green{background:var(--pl-track);color:var(--pl-text)}
.security-password-row{display:flex;align-items:center;gap:12px}.security-password-row>div{flex:1;min-width:0}.customer-portal .security-layout .security-password-row{padding:13px 16px}.binding-heading{display:flex;align-items:center;gap:10px;padding:0 0 11px;border-bottom:1px solid var(--line)}.security-layout .binding-card{padding:13px 16px}.binding-body{display:flex;align-items:center;gap:11px;max-width:355px;padding:12px 0 2px}.binding-body>div{flex:1;min-width:0;overflow-wrap:anywhere}.binding-body strong{font-size:12px}.binding-body p{margin-top:3px!important}.binding-card>.field-help{margin:9px 0 0}
.security-layout .security-device{padding:17px 0;gap:12px}.security-layout .security-device:first-child{border-top:0}.security-layout .device-symbol{width:35px;height:35px;border-radius:11px;font-size:23px;background:var(--pl-track)}.security-layout .device-description strong{font-size:12px}.security-layout .device-description p{font-size:10px;margin-top:3px;line-height:1.7}.security-layout .security-device>.pill{font-size:9px;white-space:nowrap}.security-layout #security-checked{margin:4px 0 0}.security-layout #security-device-count{margin-left:4px}
.security-feature-card>h3,.privacy-card>h3{font-size:17px}.security-feature-action{display:flex;align-items:center;gap:10px;margin-top:23px}.security-feature-action>div{flex:1;min-width:0}.security-feature-action strong{display:block;font-size:11px}.security-feature-action small{display:block;font-size:10px;margin-top:4px}.security-feature-action>button{flex-shrink:0}.passkey-row{display:flex;justify-content:space-between;gap:10px;align-items:center;border-top:1px solid var(--line);padding-top:12px;margin-top:14px}.passkey-row strong{display:block;font-size:11px;overflow-wrap:anywhere}.passkey-row small{display:block;font-size:9px;color:var(--pl-text);margin-top:4px}
.privacy-card>form{border-top:1px solid var(--line);margin:19px -20px -20px;padding:16px 20px}.privacy-toggle{display:flex;justify-content:space-between;align-items:center;font-size:11px}.customer-portal .privacy-toggle input{appearance:none;display:block;flex:0 0 32px;width:32px;height:18px;min-height:18px;padding:2px;background:var(--pl-track);border:0;border-radius:20px;cursor:pointer;transition:background .18s}.privacy-toggle input:before{content:'';display:block;width:14px;height:14px;border-radius:50%;background:var(--pl-track);transition:translate .18s}.privacy-toggle input:checked{background:var(--pl-track)}.privacy-toggle input:checked:before{translate:14px}.privacy-toggle input:focus-visible{outline:2px solid var(--pl-line);outline-offset:3px}.privacy-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:12px}.privacy-actions>p{flex:1}.privacy-card .field-help{margin:10px 0 0}
.security-layout .security-current{text-align:left}.security-layout details>summary{display:flex;justify-content:space-between;gap:10px;align-items:center;cursor:pointer;list-style:none}.security-layout details>summary::-webkit-details-marker{display:none}.security-layout .security-current h4{font-size:12px;margin:18px 0 0}.security-layout .security-current .profile-facts{margin:12px 0}.security-current .profile-facts>div{padding-block:9px}.security-current .profile-facts dt,.security-current .profile-facts dd{font-size:10px}.security-events-card[open]>summary{margin-bottom:14px}.security-events-card .table-wrap{margin-top:12px}.security-layout .empty{font-size:11px;padding:22px 0;text-align:left}

:is(#password-dialog,#security-verify-dialog,#totp-dialog,#email-dialog){width:min(460px,calc(100% - 28px));border-radius:20px;padding:25px;max-height:90svh;overflow:auto}#totp-qr{display:block;margin:22px auto 16px;background:var(--pl-track);border-radius:8px}.totp-secret{display:block;text-align:center;overflow-wrap:anywhere;padding:10px;margin:12px 0 20px;background:var(--pl-track);border-radius:9px;font-size:12px}#totp-recovery-codes{line-height:1.8;font-size:13px;padding:16px;border-radius:12px;background:var(--pl-track);user-select:all}#totp-recovery button{margin:10px 7px 0 0}#verify-email-form{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}.passkey-login-area{margin-top:17px}.passkey-login-area>button{width:100%}.passkey-login-area p{font-size:10px;margin:8px 0 0}.passkey-login-area a{font-size:10px}

@media(max-width:1120px){.security-layout{grid-template-columns:minmax(0,1.65fr) minmax(270px,1fr);gap:18px}.security-layout .section-title{flex-wrap:wrap}.security-layout .section-title .settings-actions{margin-top:0}.security-feature-action{flex-wrap:wrap}.security-feature-action>button{margin-left:42px}}
@media(max-width:900px){.security-layout{grid-template-columns:1fr}.security-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.security-side>.security-section-label{grid-column:1/-1;margin-bottom:0}.security-side>.security-current{grid-column:1/-1}.security-side .card{margin:0}.security-feature-action>button{margin-left:0}.privacy-card{grid-column:1/-1}}
@media(max-width:540px){.security-side{display:block}.security-side .card{margin-bottom:12px}.security-side>.security-section-label{margin:22px 0 12px}.customer-portal .security-layout .card{border-radius:17px;padding:17px}.customer-portal .security-layout .security-password-row{padding:13px}.security-layout .device-description{flex-basis:calc(100% - 47px)}.security-layout .security-device>.pill,.security-layout .security-device>button{margin-left:47px}.security-layout .settings-actions{flex-wrap:wrap}.security-layout .section-title .settings-actions{gap:6px}.security-feature-action{flex-wrap:nowrap}.privacy-card>form{margin:17px -17px -17px;padding:14px 17px}.security-password-row{gap:9px}.security-password-row .security-row-icon{width:27px;height:27px}.security-layout .security-password-row button{padding-inline:9px}}
@media(prefers-reduced-motion:reduce){.privacy-toggle input,.privacy-toggle input:before{transition:none}}

/* Key management layouts and mobile row cards, consolidated and retokenized. */
.keys-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:1px 0 25px;padding:0 0 25px;border-bottom:1px solid var(--product-border)}
.keys-eyebrow{font-size:9px;font-weight:650;letter-spacing:1.7px;color:var(--pl-text)}.keys-intro h2{font-size:24px;letter-spacing:-.6px;margin:9px 0;color:var(--pl-text);font-weight:650}.keys-intro p{font-size:12px;color:var(--pl-text);margin:0;line-height:1.9}.keys-intro>button{display:flex;gap:9px;align-items:center;padding:10px 16px;font-size:12px;min-height:40px;flex-shrink:0}
.keys-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin-bottom:24px}.customer-portal .keys-metrics>button{display:grid;text-align:left;gap:10px;padding:22px;border:1px solid var(--product-border);background:var(--pl-track);border-radius:13px;box-shadow:var(--pl-shadow);color:var(--pl-text)}.customer-portal .keys-metrics>button:hover:enabled{border-color:var(--pl-line);transform:translateY(-1px)}.customer-portal .keys-metrics>button[aria-pressed='true']{border-color:var(--pl-line);box-shadow:var(--pl-shadow)}.keys-metrics>button>span{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:500;color:var(--pl-text)}.keys-metrics strong{font-size:30px;font-weight:650;line-height:1.2;letter-spacing:-1px;font-variant-numeric:tabular-nums}.keys-metrics small{font-size:10px;color:var(--pl-text);font-weight:400}.key-status-dot{width:6px;height:6px;border-radius:50%;background:var(--pl-track)}.key-status-dot.warning{background:var(--pl-track)}
.customer-portal .keys-list-card{padding:24px;border-radius:14px;overflow:hidden}.keys-list-card .section-title{margin-bottom:21px}.keys-list-card .section-title p{margin-top:6px}.keys-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:22px}.keys-search{position:relative;flex:1;max-width:470px}.keys-search svg{width:16px;height:16px;position:absolute;top:13px;left:13px;color:var(--pl-text)}.customer-portal .keys-search input{padding-left:39px;font-size:12px;min-height:42px;background:var(--pl-track)}.keys-toolbar>select{width:155px;min-height:42px;font-size:11px}.customer-portal .keys-table th{font-size:10px;padding-block:13px}.customer-portal .keys-table td{font-size:11px;padding-block:20px}.key-row-name{display:flex;align-items:center;gap:11px;min-width:170px}.key-row-icon{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border:1px solid var(--product-border);background:var(--pl-track);border-radius:9px;color:var(--pl-text)}.key-row-icon svg{width:18px;height:18px}.key-row-name>div{min-width:0}.key-row-name strong{display:block;font-size:12px;font-weight:600;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pl-text)}.key-row-name small{display:block;font-size:9px;color:var(--pl-text);margin-top:5px}.key-prefix{font:11px Consolas,monospace;color:var(--pl-text);background:var(--pl-track);border:1px solid var(--product-border);border-radius:6px;padding:5px 8px;white-space:nowrap}.key-remaining-number{font-size:13px;font-weight:550;font-variant-numeric:tabular-nums}.key-state{display:inline-flex;gap:6px;align-items:center;font-size:10px;white-space:nowrap;color:var(--pl-text);padding:4px 8px;border-radius:5px;background:var(--pl-track)}.key-state:before{content:'';width:5px;height:5px;border-radius:50%;background:var(--pl-track)}.key-state[data-state='active']{color:var(--pl-text);background:var(--pl-track)}.key-state[data-state='active']:before{background:var(--pl-track)}.key-state:is([data-state='expired'],[data-state='exhausted']){color:var(--pl-text);background:var(--pl-track)}.key-state:is([data-state='expired'],[data-state='exhausted']):before{background:var(--pl-track)}.key-access,.key-expiry{font-size:11px;color:var(--pl-text)}.customer-portal .key-edit{min-height:29px;padding:4px 10px;font-size:10px;border-radius:7px}
.customer-portal .keys-issued{display:block;background:var(--pl-track);border:1px solid var(--pl-line);border-radius:13px;padding:19px 21px;margin:0 0 24px;color:var(--pl-text)}.keys-issued-heading{display:flex;align-items:center;gap:11px}.key-issued-symbol{display:grid;place-items:center;width:31px;height:31px;flex-shrink:0;background:var(--pl-track);border-radius:9px;color:var(--pl-text)}.keys-issued-heading>div{flex:1;min-width:0}.keys-issued-heading strong{font-size:12px}.keys-issued-heading p{font-size:11px;color:var(--pl-text);margin:5px 0 0;line-height:1.8}.keys-issued-heading>button{align-self:flex-start;min-height:25px;padding:2px 5px}.keys-secret{display:flex;align-items:center;gap:14px;background:var(--pl-track);border:1px solid var(--product-border);padding:13px 14px;margin-top:16px;border-radius:9px}.keys-secret code{font:12px/1.8 Consolas,monospace;overflow-wrap:anywhere;min-width:0;flex:1;color:var(--pl-text)}.keys-secret button{font-size:11px;flex-shrink:0;min-height:32px}
.keys-bottom-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:20px}.keys-connect-card,.keys-safety-card{display:flex;align-items:flex-start;gap:13px;padding:22px;border:1px solid var(--product-border);background:var(--pl-track);border-radius:13px;min-width:0}.keys-help-icon{display:grid;place-items:center;width:31px;height:31px;border-radius:8px;background:var(--pl-track);color:var(--pl-text);flex-shrink:0;font-size:16px}.keys-bottom-grid h3{font-size:12px;margin:1px 0 8px}.keys-bottom-grid p{font-size:11px;line-height:1.9;color:var(--pl-text);margin:0}.keys-connect-card>div:nth-child(2){flex:1;min-width:0}.keys-connect-card>a{font-size:10px;white-space:nowrap}.keys-endpoint{display:flex;align-items:center;gap:8px;margin-top:13px;flex-wrap:wrap}.keys-endpoint code{font:11px/1.8 Consolas,monospace;overflow-wrap:anywhere;color:var(--pl-text)}.keys-endpoint button{font-size:10px;padding:4px 8px;min-height:28px}.keys-safety-card a{display:inline-block;margin-top:12px;font-size:10px}
.customer-portal #user-key-dialog{width:min(600px,calc(100% - 28px));padding:28px;border-radius:17px;max-height:90svh;overflow:auto}.customer-portal #user-key-dialog .section-title{align-items:flex-start;margin-bottom:0}.customer-portal #user-key-dialog h2{font-size:20px;margin:8px 0 0}.key-dialog-description{font-size:11px;color:var(--pl-text);line-height:1.8;margin:0 0 7px}.customer-portal #user-key-form{gap:20px}.customer-portal #user-key-form small{font-size:10px;font-weight:400;line-height:1.8}.key-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.key-form-grid>label{min-width:0}.key-model-access{border:1px solid var(--product-border);padding:14px 15px;border-radius:10px}.key-model-access>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;list-style:none;cursor:pointer;font-size:12px;font-weight:550}.key-model-access>summary::-webkit-details-marker{display:none}.key-model-access>summary>span:last-child{font-size:10px;color:var(--pl-text)}.key-model-access>summary>span:last-child:after{content:'⌄';display:inline-block;margin-left:8px}.key-model-access[open]>summary>span:last-child:after{rotate:180deg}.key-model-access>.field-help{font-size:10px;margin:14px 0 10px}.key-model-toolbar{display:flex;align-items:center;gap:9px}.customer-portal .key-model-toolbar input{font-size:11px;min-height:35px}.key-model-toolbar button{font-size:10px;white-space:nowrap;min-height:30px;padding:4px 5px}.key-model-options{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px;max-height:215px;overflow:auto;scrollbar-width:thin}.customer-portal .key-model-options>label{display:flex;align-items:center;gap:8px;padding:9px;border:1px solid var(--product-border);background:var(--pl-track);border-radius:7px;min-width:0;cursor:pointer}.key-model-options span{font-size:10px;overflow-wrap:anywhere;font-weight:400}.customer-portal .key-model-options input{width:13px;height:13px;min-height:13px;margin:0;flex-shrink:0}.customer-portal .key-model-options label:has(input:checked){border-color:var(--pl-line);background:var(--pl-track)}.customer-portal .key-disabled-field{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--product-border);padding-top:18px}.key-disabled-field strong{font-size:12px;font-weight:550}.key-disabled-field small{display:block;font-size:10px;color:var(--pl-text);margin-top:5px}.customer-portal .key-disabled-field input{appearance:none;width:33px;height:19px;min-height:19px;border:0;border-radius:20px;padding:2px;flex-shrink:0;background:var(--pl-track);cursor:pointer}.key-disabled-field input:before{content:'';width:15px;height:15px;display:block;background:var(--pl-track);border-radius:50%;transition:translate .15s}.key-disabled-field input:checked{background:var(--pl-track)}.key-disabled-field input:checked:before{translate:14px}.key-dialog-footer{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--product-border);padding-top:19px}.key-dialog-footer button{font-size:12px;min-height:36px;padding:8px 15px}

@media(max-width:1200px){.keys-bottom-grid{grid-template-columns:1fr}.keys-connect-card>a{margin-left:auto}.keys-connect-card>div:nth-child(2){flex:initial}}
@media(max-width:760px){.keys-intro{align-items:flex-start;flex-direction:column;gap:17px;margin-bottom:21px;padding-bottom:21px}.keys-intro h2{font-size:22px}.keys-intro p{font-size:11px}.keys-intro>button{width:100%;justify-content:center;font-size:12px}.keys-metrics{gap:9px;margin-bottom:20px}.customer-portal .keys-metrics>button{padding:15px 12px;gap:10px;border-radius:11px}.keys-metrics>button>span{font-size:10px;gap:5px}.keys-metrics strong{font-size:26px}.keys-metrics small{font-size:9px;line-height:1.7}.customer-portal .keys-list-card{padding:20px}.keys-list-card .section-title{gap:10px}.keys-list-card .section-title .tag{display:none}.keys-toolbar{gap:9px;margin-bottom:14px}.customer-portal .keys-search input{font-size:11px;min-height:39px;padding-left:32px}.keys-search svg{width:14px;height:14px;left:11px;top:12px}.keys-toolbar>select{width:111px;min-height:39px;font-size:10px;padding-inline:8px}.customer-portal .keys-table-wrap{margin:0;overflow:visible}.keys-table,.keys-table tbody{display:block}.keys-table thead{display:none}.keys-table tr{display:grid;grid-template-columns:1fr 1fr;gap:17px 10px;padding:20px 0;border-bottom:1px solid var(--product-border)}.keys-table tr:last-child{border-bottom:0;padding-bottom:4px}.customer-portal .keys-table td{display:flex;flex-direction:column;align-items:flex-start;gap:8px;white-space:normal;padding:0!important;border:0;min-width:0}.keys-table td:before{content:attr(data-label);font-size:9px;color:var(--pl-text)}.keys-table td:first-child{grid-column:1/-1}.keys-table td:first-child:before{display:none}.keys-table td:last-child{grid-column:2;grid-row:1;align-items:flex-end;justify-content:center;z-index:1;pointer-events:none}.keys-table td:last-child:before{display:none}.keys-table td:last-child button{pointer-events:auto}.keys-table .key-row-name{min-width:0;max-width:calc(100% - 55px)}.keys-table .key-row-name strong{max-width:100%;font-size:13px}.keys-table .key-row-name small{font-size:9px}.keys-table .key-prefix{font-size:10px;max-width:100%;overflow-wrap:anywhere;white-space:normal}.keys-table .key-expiry{font-size:10px;overflow-wrap:anywhere}.keys-table td:only-child{display:block;grid-column:1/-1;text-align:left;padding:18px 0!important;line-height:1.9;font-size:11px}.keys-table td:only-child:before{display:none}.customer-portal .keys-issued{padding:17px}.keys-issued-heading p{font-size:10px}.keys-secret{padding:12px;align-items:flex-start;flex-direction:column;gap:12px}.keys-secret code{font-size:11px}.keys-secret button{width:100%}.keys-bottom-grid{gap:14px}.keys-connect-card,.keys-safety-card{padding:19px;gap:11px}.keys-connect-card{flex-wrap:wrap}.keys-connect-card>div:nth-child(2){flex:1;min-width:0}.keys-connect-card>a{margin-left:42px}.keys-bottom-grid p{font-size:10px}.keys-endpoint{align-items:flex-start;flex-direction:column}.keys-endpoint code{font-size:10px}.customer-portal #user-key-dialog{padding:23px 20px}.customer-portal #user-key-dialog h2{font-size:19px}.key-form-grid{grid-template-columns:1fr;gap:17px}.key-model-options{grid-template-columns:1fr}.key-model-toolbar{flex-wrap:wrap}.key-model-toolbar input{flex-basis:100%}.key-model-toolbar button{margin-left:auto}.key-disabled-field small{max-width:210px}.key-dialog-footer button{flex:1;justify-content:center}.customer-portal .keys-metrics>button:hover:enabled{transform:none}}
@media(prefers-reduced-motion:reduce){.key-disabled-field input:before{transition:none}}
.customer-portal .keys-metrics>button{justify-content:stretch;justify-items:start;align-content:start}

@media(max-width:760px){.keys-table td:first-child{grid-row:1}.keys-intro{gap:14px;padding-bottom:18px;margin-bottom:20px}}

/* Component surfaces use Scheme B tokens in both themes. */
.customer-portal .security-layout .card,.customer-portal .keys-metrics>button,.customer-portal :is(.keys-connect-card,.keys-safety-card,.keys-list-card,.profile-summary) { background:var(--pl-surface); border-color:var(--pl-line); border-radius:20px; }
.customer-portal :is(.keys-intro p,.keys-metrics small,.keys-metrics>button>span,.key-row-name small,.key-expiry,.key-access,.keys-bottom-grid p,.keys-issued-heading p,.key-dialog-description,.key-disabled-field small,.profile-facts dt,.device-description p,.passkey-row small) { color:var(--pl-muted); }
.customer-portal :is(.key-row-icon,.keys-help-icon,.key-issued-symbol,.profile-avatar,.security-row-icon.blue) { background:var(--pl-active); color:var(--pl-accent); }
.customer-portal .security-row-icon.green,.customer-portal .key-state[data-state='active'] { background:var(--pl-mint); color:var(--pl-mint-ink); }
.customer-portal .key-state:is([data-state='expired'],[data-state='exhausted']) { background:var(--pl-violet); color:var(--pl-violet-ink); }
.customer-portal .keys-intro h2 { display:block; }
.customer-portal .keys-metrics>button:hover:enabled { transform:none; border-color:var(--pl-accent); }
.customer-portal .keys-metrics>button[aria-pressed='true'],.customer-portal .key-model-options label:has(input:checked) { border-color:var(--pl-accent); background:var(--pl-active); }
.customer-portal .key-status-dot { background:var(--chart-green); }
.customer-portal .key-status-dot.warning { background:var(--pl-violet-ink); }
.customer-portal #key-model-selection { color:var(--pl-accent); }
.customer-portal :is(.privacy-toggle,.key-disabled-field) input { background:var(--pl-muted); }
.customer-portal :is(.privacy-toggle,.key-disabled-field) input:before { background:#fff; }
.customer-portal :is(.privacy-toggle,.key-disabled-field) input:checked { background:var(--pl-action); }
.customer-portal #totp-qr { background:#fff; }
.customer-portal #user-key-dialog { border-radius:20px; }
.customer-portal .settings-login { color:var(--pl-accent); }
.customer-portal .feedback[data-state='success'] { background:var(--pl-mint); color:var(--pl-mint-ink); }
@media(max-width:960px) { .customer-portal .profile-layout,.customer-portal .security-layout { grid-template-columns:1fr; } }
@media(max-width:420px) { .customer-portal .keys-metrics { grid-template-columns:1fr; } .customer-portal .keys-metrics>button { grid-template-columns:1fr auto; } .customer-portal .keys-metrics small { grid-column:1/-1; } }
/* Give short screens and the on-screen keyboard ordinary document scrolling. */
@media(max-height:600px) { .customer-portal .image-dock { position:relative; bottom:auto; } }

/* The first frame is closed until session restoration has completed. */
body.customer-portal:is([data-auth-gate='checking'],[data-auth-gate='locked']) :is(.sidebar,.shell-toggle,.breadcrumb,#refresh,#open-access,#exit,main > .page-heading,main > [data-panel]) { display:none; }
body.customer-portal:is([data-auth-gate='checking'],[data-auth-gate='locked']) > .workspace { margin-left:0; }
body.customer-portal:is([data-auth-gate='checking'],[data-auth-gate='locked']) .topbar { justify-content:flex-end; border-bottom:0; background:transparent; backdrop-filter:none; }
body.customer-portal:is([data-auth-gate='checking'],[data-auth-gate='locked']) .top-actions > :not(.theme-toggle) { display:none; }
body.customer-portal:is([data-auth-gate='checking'],[data-auth-gate='locked']) main { display:grid; align-content:center; min-height:calc(100dvh - 64px); max-width:1160px; padding:24px 28px 48px; }
body.customer-portal[data-auth-gate='checking'] main::before { content:'正在检查登录状态…'; color:var(--pl-muted); text-align:center; font-size:13px; }
.customer-portal .console-auth-gate { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,500px); border:1px solid var(--pl-line); border-radius:28px; overflow:hidden; background:var(--pl-surface); box-shadow:var(--pl-raise); min-width:0; }
.customer-portal .console-auth-story { display:flex; flex-direction:column; align-items:flex-start; padding:44px 36px; background:radial-gradient(ellipse at 0 0,var(--pl-aurora),transparent 65%),linear-gradient(145deg,var(--pl-surface),var(--pl-track)); min-width:0; }
.customer-portal .console-auth-story > .auth-brand { margin-bottom:72px; }
.customer-portal .console-auth-story h1 { font-size:clamp(26px,2.8vw,38px); line-height:1.35; margin:14px 0 18px; letter-spacing:-1px; }
.customer-portal .console-auth-story > p { color:var(--pl-muted); font-size:13px; line-height:1.9; max-width:32em; }
.customer-portal .console-auth-capabilities { display:flex; flex-wrap:wrap; gap:8px; margin:22px 0; }
.customer-portal .console-auth-capabilities span { padding:7px 10px; border-radius:999px; border:1px solid var(--pl-line); background:var(--pl-surface); color:var(--pl-text); font-size:11px; }
.customer-portal .console-auth-story .console-auth-target { padding:12px 14px; border-left:2px solid var(--pl-accent); color:var(--pl-accent); background:var(--pl-active); border-radius:0 10px 10px 0; margin-bottom:32px; }
.customer-portal .console-auth-exits { display:flex; flex-wrap:wrap; gap:12px 24px; margin-top:auto; font-size:12px; color:var(--pl-muted); }
.customer-portal .console-auth-exits a { padding-block:10px; }
.customer-portal .console-auth-exits a:focus-visible { outline:2px solid var(--pl-accent); outline-offset:3px; border-radius:4px; }
.customer-portal .console-auth-slot { min-width:0; padding:28px; border-left:1px solid var(--pl-line); background:radial-gradient(ellipse at 100% 0,var(--pl-aurora),transparent 40%),var(--pl-surface); }
.customer-portal .auth-card { min-width:0; }
@media(max-width:960px) {
 body.customer-portal:is([data-auth-gate='checking'],[data-auth-gate='locked']) main { max-width:600px; padding:12px 16px 32px; }
 .customer-portal .console-auth-gate { grid-template-columns:minmax(0,1fr); border-radius:24px; }
 .customer-portal .console-auth-slot { grid-row:1; padding:24px; border-left:0; }
 .customer-portal .console-auth-story { padding:28px 24px; border-top:1px solid var(--pl-line); }
 .customer-portal .console-auth-story > .auth-brand { margin-bottom:24px; }
 .customer-portal .console-auth-story h1 { font-size:26px; }
}
@media(max-width:560px) {
 .customer-portal .console-auth-slot { padding:20px; }
 .customer-portal .console-auth-story { padding:24px 20px; }
 .customer-portal .console-auth-capabilities { gap:6px; }
 .customer-portal .console-auth-capabilities span { font-size:10px; padding:7px 8px; }
}
