:root{
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --radius-xs:10px;--radius-sm:14px;--radius-md:18px;--radius-lg:24px;--radius-xl:32px;
  --ease:220ms ease;
}
html[data-theme="dark"]{
  --bg:#07110d;--bg-2:#0b1711;--panel:#101e17;--panel-2:#14251c;--panel-3:#1a2d22;
  --sidebar:#07110d;--sidebar-2:#0d2118;--text:#f4f0e6;--muted:#9daf9f;--soft:#d8cda6;
  --line:rgba(221,203,146,.15);--line-strong:rgba(221,203,146,.28);
  --green:#2f7a57;--green-2:#55b985;--gold:#c8a24a;--gold-2:#f1d37c;--red:#e45d6b;--amber:#d89a3d;--blue:#6ea8e5;--purple:#9177f1;
  --shadow:0 28px 80px rgba(0,0,0,.36);--glow:0 0 0 1px rgba(200,162,74,.12),0 18px 70px rgba(38,116,80,.14);
  --input:#0c1912;--chip:#17281f;
}
html[data-theme="light"]{
  --bg:#f2eee3;--bg-2:#faf8f1;--panel:#fffdf7;--panel-2:#f7f2e6;--panel-3:#efe8d6;
  --sidebar:#fffaf0;--sidebar-2:#f5eedf;--text:#14251c;--muted:#6b786f;--soft:#7f714d;
  --line:rgba(25,56,40,.13);--line-strong:rgba(32,75,53,.24);
  --green:#1f5a40;--green-2:#2f7a57;--gold:#b88e32;--gold-2:#d4aa4a;--red:#c93c52;--amber:#bd7a26;--blue:#357fb8;--purple:#6850c9;
  --shadow:0 24px 60px rgba(30,45,36,.10);--glow:0 0 0 1px rgba(184,142,50,.12),0 18px 50px rgba(31,90,64,.10);
  --input:#fffdf7;--chip:#f2ead8;
}
*{box-sizing:border-box}[hidden]{display:none!important}html,body{min-height:100%;}body{margin:0;font-family:var(--font-ui);background:radial-gradient(circle at 18% 10%,rgba(200,162,74,.10),transparent 28%),radial-gradient(circle at 90% 6%,rgba(47,122,87,.14),transparent 25%),linear-gradient(135deg,var(--bg),var(--bg-2));color:var(--text);}button,input,textarea,select{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh;display:grid;grid-template-columns:304px minmax(0,1fr)}
.sidebar{position:sticky;top:0;height:100vh;padding:26px 20px;display:flex;flex-direction:column;gap:22px;background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2));border-right:1px solid var(--line);overflow:auto}.brand-block{display:flex;align-items:center;gap:14px;padding:0 6px 14px;border-bottom:1px solid var(--line)}.brand-mark{width:52px;height:52px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,var(--gold-2),var(--gold));color:#0c1912;font-weight:950;font-size:26px;box-shadow:0 14px 34px rgba(200,162,74,.20)}.brand-name{font-family:var(--font-display);letter-spacing:.14em;font-size:18px}.brand-sub{font-size:10px;letter-spacing:.24em;color:var(--muted);font-weight:800;margin-top:3px}.nav{display:grid;gap:18px}.nav-group{display:grid;gap:7px}.nav-heading{font-size:10px;letter-spacing:.20em;text-transform:uppercase;color:var(--soft);font-weight:900;padding:0 10px}.nav-btn{width:100%;border:0;border-radius:16px;background:transparent;color:var(--muted);padding:12px 12px;display:flex;align-items:center;gap:11px;text-align:left;transition:var(--ease)}.nav-btn:hover{background:rgba(200,162,74,.08);color:var(--text)}.nav-btn.active{background:linear-gradient(135deg,rgba(47,122,87,.35),rgba(200,162,74,.16));color:var(--text);box-shadow:inset 0 0 0 1px var(--line-strong)}.nav-ico{width:31px;height:31px;border-radius:12px;display:grid;place-items:center;background:var(--chip);color:var(--gold);font-weight:900}.focus-card{position:relative;margin-top:auto;border:1px solid var(--line-strong);border-radius:24px;padding:18px;background:linear-gradient(145deg,rgba(200,162,74,.12),rgba(47,122,87,.12));box-shadow:var(--glow);overflow:hidden}.focus-card:after{content:"";position:absolute;right:-40px;bottom:-55px;width:150px;height:150px;border:1px solid rgba(200,162,74,.20);border-radius:45%;transform:rotate(28deg)}.focus-kicker,.spark{font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:var(--gold);font-weight:950}.focus-card h3{font-family:var(--font-display);font-size:22px;line-height:1.08;margin:10px 0 8px}.focus-card p{font-size:13px;line-height:1.5;color:var(--muted);margin:0 0 14px}.focus-progress{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);font-weight:800}.progress-track{height:8px;border-radius:999px;background:rgba(128,128,128,.16);overflow:hidden;margin-top:8px}.progress-track span{display:block;height:100%;background:linear-gradient(90deg,var(--green-2),var(--gold));border-radius:999px}.user-card{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:18px;padding:12px;background:rgba(128,128,128,.05)}.avatar{width:38px;height:38px;border-radius:14px;background:linear-gradient(135deg,var(--green),var(--gold));display:grid;place-items:center;font-weight:950;color:white}.user-card strong{display:block}.user-card span{display:block;color:var(--muted);font-size:12px;margin-top:2px}.main{padding:26px;min-width:0}.topbar{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:22px}.title-wrap h1{font-family:var(--font-display);font-size:44px;line-height:1;margin:8px 0 8px}.title-wrap p{margin:0;color:var(--muted)}.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.search-box{height:44px;min-width:300px;border:1px solid var(--line);border-radius:16px;padding:0 12px;display:flex;align-items:center;gap:8px;background:var(--input);color:var(--muted);box-shadow:var(--shadow)}.search-box input{border:0;background:transparent;outline:none;color:var(--text);width:100%}.theme-toggle{display:flex;padding:4px;border:1px solid var(--line);border-radius:999px;background:var(--input)}.theme-toggle button{border:0;background:transparent;color:var(--muted);border-radius:999px;padding:8px 12px;font-weight:900;font-size:12px}.theme-toggle button.active{background:var(--green);color:#fff;box-shadow:0 8px 22px rgba(47,122,87,.25)}.btn{border:1px solid transparent;border-radius:15px;padding:11px 15px;font-weight:900;transition:var(--ease);display:inline-flex;align-items:center;gap:8px;justify-content:center;text-decoration:none}.btn.primary{background:linear-gradient(135deg,var(--green),var(--green-2));color:#fff;box-shadow:0 14px 34px rgba(47,122,87,.22)}.btn.primary:hover{transform:translateY(-1px)}.btn.ghost{background:var(--input);border-color:var(--line);color:var(--text)}.btn.gold{background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#111}.btn.danger{background:rgba(228,93,107,.12);border-color:rgba(228,93,107,.32);color:var(--red)}.btn.danger.solid{background:var(--red);color:white}.btn.small{padding:7px 10px;border-radius:11px;font-size:12px}.btn.full{width:100%}.view{display:grid;gap:18px}.grid{display:grid;gap:18px}.cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.span-2{grid-column:span 2}.card{position:relative;border:1px solid var(--line);border-radius:var(--radius-lg);background:linear-gradient(145deg,var(--panel),var(--panel-2));box-shadow:var(--shadow);padding:18px;overflow:hidden}.card.decor:before{content:"";position:absolute;right:18px;top:16px;width:92px;height:92px;border:1px solid rgba(200,162,74,.15);border-radius:34px;transform:rotate(28deg);pointer-events:none}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.section-head h2,.section-head h3{margin:0;font-family:var(--font-display)}.section-head h2{font-size:28px}.section-head h3{font-size:22px}.muted{color:var(--muted)}.micro{font-size:12px;color:var(--muted)}.kpi-card{min-height:144px;display:grid;align-content:space-between}.kpi-top{display:flex;justify-content:space-between;gap:10px}.kpi-label{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-weight:950}.kpi-value{font-size:31px;font-weight:950;margin-top:8px}.kpi-icon{width:40px;height:40px;border-radius:15px;display:grid;place-items:center;background:var(--chip);color:var(--gold);font-weight:950}.trend{font-size:12px;color:var(--green-2);font-weight:900}.sparkline{height:34px;width:100%;display:block;margin-top:10px}.status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:900;border:1px solid transparent;white-space:nowrap}.status.good,.status.received,.status.reviewed,.status.done,.status.complete,.status.completed,.status.closed-won,.status.won{background:rgba(85,185,133,.14);border-color:rgba(85,185,133,.28);color:var(--green-2)}.status.warn,.status.pending,.status.requested,.status.in-progress,.status.proposal-sent,.status.medium{background:rgba(216,154,61,.14);border-color:rgba(216,154,61,.30);color:var(--amber)}.status.bad,.status.needed,.status.blocked,.status.closed-lost,.status.high{background:rgba(228,93,107,.14);border-color:rgba(228,93,107,.28);color:var(--red)}.status.planned,.status.nurture,.status.low{background:rgba(145,119,241,.13);border-color:rgba(145,119,241,.26);color:var(--purple)}.status.unknown,.status.new-lead,.status.contacted,.status.interested,.status.call-booked{background:rgba(110,168,229,.12);border-color:rgba(110,168,229,.24);color:var(--blue)}.chart{height:300px;width:100%;display:block}.mini-chart{height:42px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:18px;background:var(--panel)}table{border-collapse:collapse;width:100%;min-width:860px}th,td{padding:13px 14px;text-align:left;border-bottom:1px solid var(--line);font-size:14px;vertical-align:top}th{font-size:11px;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);background:rgba(128,128,128,.05)}tr:last-child td{border-bottom:0}.row-actions{display:flex;gap:7px}.summary-list{display:grid;gap:10px}.summary-item{border:1px solid var(--line);border-radius:16px;padding:13px;background:rgba(128,128,128,.045)}.summary-item strong{display:block;margin-bottom:5px}.metric-row{display:flex;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);padding:10px 0}.metric-row:last-child{border-bottom:0}.task-item{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(128,128,128,.045)}.task-title{font-weight:900}.task-meta{font-size:12px;color:var(--muted);margin-top:3px}.asset-row{display:flex;justify-content:space-between;gap:14px;align-items:center;border-bottom:1px solid var(--line);padding:10px 0}.asset-row:last-child{border-bottom:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field.wide{grid-column:1/-1}.field label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:950;margin-bottom:7px}.field input,.field textarea,.field select{width:100%;border:1px solid var(--line);border-radius:15px;background:var(--input);color:var(--text);padding:12px;outline:none}.field textarea{min-height:100px;resize:vertical}.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(200,162,74,.12)}.prefill{font-size:10px;color:var(--gold);letter-spacing:.08em}.wizard-wrap{display:grid;grid-template-columns:360px minmax(0,1fr);gap:18px}.wizard-side{border:1px solid var(--line);border-radius:var(--radius-lg);padding:20px;background:linear-gradient(145deg,var(--panel),var(--panel-2));box-shadow:var(--shadow)}.wizard-side h2{font-family:var(--font-display);font-size:32px;line-height:1.05;margin:10px 0}.wizard-steps{display:grid;gap:8px;margin-top:18px;max-height:430px;overflow:auto;padding-right:4px}.step-pill{border:1px solid var(--line);border-radius:14px;padding:9px 10px;color:var(--muted);font-size:12px;display:flex;justify-content:space-between;gap:12px}.step-pill.active{background:rgba(200,162,74,.12);border-color:rgba(200,162,74,.35);color:var(--text)}.step-pill.done{color:var(--green-2)}.wizard-card{min-height:520px;display:flex;flex-direction:column;justify-content:space-between}.wizard-question{animation:fadeSlide 220ms ease}.wizard-question h2{font-family:var(--font-display);font-size:36px;line-height:1.07;margin:8px 0 10px}.wizard-question p{color:var(--muted);line-height:1.6;margin:0 0 18px}.wizard-input textarea{min-height:180px}.wizard-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px}.wizard-checks{display:grid;gap:10px}.check-row{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(128,128,128,.045);line-height:1.45}.check-row input{margin-top:4px}.review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:330px;overflow:auto}.review-item{border:1px solid var(--line);border-radius:14px;padding:12px}.review-item strong{font-size:12px;color:var(--gold);display:block;margin-bottom:6px}.report-box{white-space:pre-wrap;font-family:Consolas,Monaco,monospace;line-height:1.55;background:var(--input);border:1px solid var(--line);border-radius:18px;padding:18px;color:var(--text)}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.62);display:grid;place-items:center;padding:18px;z-index:100}.modal-backdrop[hidden]{display:none!important}.modal{width:min(820px,100%);max-height:90vh;overflow:auto;background:var(--panel);border:1px solid var(--line-strong);border-radius:28px;box-shadow:0 34px 100px rgba(0,0,0,.45)}.modal-head{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:20px;border-bottom:1px solid var(--line)}.modal-head h2{font-family:var(--font-display);margin:4px 0 0}.modal-body{padding:20px}.icon-btn{width:40px;height:40px;border:1px solid var(--line);border-radius:14px;background:var(--input);color:var(--text);font-size:24px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.toast{position:fixed;right:24px;bottom:24px;background:linear-gradient(135deg,var(--green),var(--green-2));color:#fff;border-radius:15px;padding:13px 16px;box-shadow:var(--shadow);opacity:0;transform:translateY(14px);transition:var(--ease);z-index:140;pointer-events:none;font-weight:900}.toast.show{opacity:1;transform:translateY(0)}.empty{border:1px dashed var(--line-strong);border-radius:18px;padding:28px;text-align:center;color:var(--muted)}@keyframes fadeSlide{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1200px){.app-shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.nav{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar{flex-direction:column}.top-actions{width:100%;justify-content:flex-start}.cols-5,.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}.wizard-wrap{grid-template-columns:1fr}.search-box{min-width:min(100%,340px)}}@media(max-width:760px){.main{padding:16px}.cols-5,.cols-4,.cols-3,.cols-2,.form-grid,.review-grid{grid-template-columns:1fr}.nav{grid-template-columns:1fr}.title-wrap h1{font-size:34px}.wizard-question h2{font-size:29px}.top-actions{align-items:stretch}.search-box{width:100%;min-width:0}.btn{width:100%}.theme-toggle{width:100%}.theme-toggle button{flex:1}.row-actions{flex-direction:column}}

/* First-visit client intake welcome modal */
.welcome-modal{position:relative;display:grid;gap:14px;padding:2px 0 4px;animation:fadeSlide 240ms ease}
.welcome-modal:before{content:"";position:absolute;inset:-20px -20px auto auto;width:180px;height:180px;border:1px solid rgba(200,162,74,.16);border-radius:54px;transform:rotate(22deg);pointer-events:none}
.welcome-mark{width:62px;height:62px;border-radius:22px;display:grid;place-items:center;background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#111;font-family:var(--font-display);font-size:32px;font-weight:900;box-shadow:0 20px 50px rgba(200,162,74,.18)}
.welcome-modal h3{font-family:var(--font-display);font-size:34px;line-height:1.04;margin:0;max-width:680px}
.welcome-progress-card{border:1px solid var(--line);border-radius:20px;padding:14px;background:linear-gradient(145deg,var(--panel-2),var(--panel-3));box-shadow:var(--glow)}
.welcome-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:2px}
.welcome-grid div{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(128,128,128,.05)}
.welcome-grid strong{display:block;color:var(--gold);font-size:12px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:8px}
.welcome-grid span{display:block;color:var(--muted);line-height:1.45;font-size:13px}
.welcome-actions{margin-top:4px}
@media(max-width:760px){.welcome-grid{grid-template-columns:1fr}.welcome-modal h3{font-size:28px}.welcome-actions{flex-direction:column}.welcome-actions .btn{width:100%}}

/* Layout hardening: remove accidental page-level horizontal scroll and improve fit */
html, body { width:100%; max-width:100%; overflow-x:hidden; }
body { min-width:0; }
.app-shell { width:100%; max-width:100vw; overflow-x:hidden; }
.main, .view, .grid, .card, .table-wrap, .topbar, .top-actions, .wizard-wrap, .wizard-side, .wizard-card, .modal, .modal-body, .welcome-modal, .welcome-grid, .form-grid, .review-grid, .summary-item, .task-item, .asset-row { min-width:0; max-width:100%; }
.card, .summary-item, .task-item, .asset-row, .welcome-grid div, .review-item, td, th, .field, .field input, .field textarea, .field select { overflow-wrap:anywhere; word-break:normal; }
.modal-backdrop { overflow-y:auto; overflow-x:hidden; place-items:center; }
.modal { width:min(820px, calc(100vw - 36px)); max-width:calc(100vw - 36px); overflow-y:auto; overflow-x:hidden; }
.modal-head, .modal-body { max-width:100%; overflow-x:hidden; }
.modal-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; }
.client-record-modal-actions{justify-content:space-between;}
.client-record-save-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-left:auto;}
.client-record-remove{display:inline-flex;align-items:center;gap:7px;background:transparent;border-color:transparent;color:var(--muted);box-shadow:none;padding-left:0;padding-right:0;}
.client-record-remove svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.client-record-remove:hover{background:transparent;color:var(--red);}
.welcome-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; }
.welcome-actions .btn { white-space:normal; flex:0 1 auto; }
.table-wrap { width:100%; overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; }
table { max-width:none; }
.search-box { max-width:100%; }
.kpi-value, .title-wrap h1, .section-head h2, .section-head h3, .wizard-question h2, .welcome-modal h3 { overflow-wrap:normal; }

@media (max-width: 980px) {
  .cols-5, .cols-4, .cols-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .top-actions { justify-content:flex-start; }
  .modal { width:calc(100vw - 28px); max-width:calc(100vw - 28px); }
}

@media (max-width: 640px) {
  .cols-5, .cols-4, .cols-3, .cols-2, .form-grid, .review-grid, .welcome-grid { grid-template-columns:1fr; }
  .modal-backdrop { padding:10px; align-items:start; }
  .modal { width:calc(100vw - 20px); max-width:calc(100vw - 20px); border-radius:22px; }
  .modal-head, .modal-body { padding:16px; }
  .modal-actions, .welcome-actions, .wizard-actions { flex-direction:column-reverse; align-items:stretch; }
  .modal-actions .btn, .welcome-actions .btn, .wizard-actions .btn { width:100%; }
  .search-box { min-width:0; width:100%; }
  .top-actions { width:100%; }
}

/* Intake navigation refinement: compact section arrows instead of a long scroll list */
.wizard-side{overflow:visible;}
.wizard-steps{display:none!important;}
.wizard-current{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 12px;padding:12px 14px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(145deg,rgba(200,162,74,.10),rgba(47,122,87,.08));box-shadow:var(--glow)}
.wizard-current strong{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold)}
.wizard-current span{font-size:13px;color:var(--muted);font-weight:800;text-align:right}
.wizard-map{display:grid;gap:10px;margin-top:12px;overflow:visible;max-height:none;padding:0;}
.step-arrow{position:relative;width:100%;border:1px solid var(--line);border-radius:18px;padding:11px 12px;background:rgba(128,128,128,.045);color:var(--text);display:grid;grid-template-columns:34px minmax(0,1fr) 28px;align-items:center;gap:10px;text-align:left;transition:var(--ease);}
.step-arrow:hover{transform:translateX(2px);border-color:var(--line-strong);background:rgba(200,162,74,.08)}
.step-arrow.active{background:linear-gradient(135deg,rgba(47,122,87,.28),rgba(200,162,74,.16));border-color:rgba(200,162,74,.45);box-shadow:inset 0 0 0 1px rgba(200,162,74,.08), var(--glow)}
.step-arrow.done{color:var(--text)}
.step-num{width:31px;height:31px;border-radius:12px;display:grid;place-items:center;background:var(--chip);color:var(--gold);font-weight:950;font-size:12px;}
.step-copy{min-width:0;display:grid;gap:2px;}
.step-copy strong{font-size:13px;line-height:1.15;white-space:normal;overflow-wrap:anywhere;}
.step-copy small{color:var(--muted);font-size:11px;line-height:1.2;}
.step-mark{width:25px;height:25px;border-radius:999px;display:grid;place-items:center;background:rgba(128,128,128,.10);color:var(--muted);font-weight:950;}
.step-arrow.active .step-mark,.step-arrow.done .step-mark{background:rgba(85,185,133,.14);color:var(--green-2)}
.step-arrow:not(:last-child)::after{content:"";position:absolute;left:27px;bottom:-10px;width:1px;height:10px;background:linear-gradient(180deg,var(--line-strong),transparent);pointer-events:none;}
.wizard-card{min-height:520px;overflow:hidden;}
.wizard-question,.review-item,.check-row{overflow-wrap:anywhere;}

@media(max-width:1200px){
  .wizard-map{grid-template-columns:repeat(2,minmax(0,1fr));}
  .step-arrow:not(:last-child)::after{display:none;}
}
@media(max-width:760px){
  .wizard-map{grid-template-columns:1fr;}
  .wizard-current{align-items:flex-start;flex-direction:column;}
  .wizard-current span{text-align:left;}
}

/* Button and container fit pass: prevent short labels from breaking inside controls */
button,
.btn,
.icon-btn,
.nav-btn,
.theme-toggle button,
.status {
  line-height:1.15;
  overflow-wrap:normal;
  word-break:normal;
}

.btn {
  min-height:42px;
  white-space:nowrap;
  flex-shrink:0;
  text-align:center;
}

.btn.small {
  min-height:36px;
  min-width:68px;
  padding:8px 12px;
  font-size:12px;
  letter-spacing:.01em;
}

.row-actions {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:nowrap;
  min-width:150px;
}

.row-actions .btn {
  width:auto!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  min-width:168px;
  width:168px;
  white-space:nowrap;
}

.table-wrap td,
.table-wrap th {
  overflow-wrap:normal;
  word-break:normal;
}

.table-wrap td:not(:last-child),
.table-wrap th:not(:last-child) {
  overflow-wrap:anywhere;
}

/* Let longer CTA buttons wrap only where wrapping is actually useful */
.modal-actions .btn,
.welcome-actions .btn,
.wizard-actions .btn,
.field.wide > .btn,
.field.wide button.btn {
  white-space:normal;
  min-width:120px;
}

/* Keep compact controls tidy inside cards and headers */
.section-head,
.top-actions,
.wizard-actions,
.modal-actions,
.welcome-actions,
.asset-row,
.metric-row,
.task-item {
  overflow-wrap:normal;
}

.section-head .btn,
.top-actions .btn,
.asset-row .btn,
.task-item .btn {
  white-space:nowrap;
}

.kpi-card,
.summary-item,
.task-item,
.asset-row,
.review-item,
.welcome-grid div {
  line-height:1.35;
}

.kpi-label,
.nav-heading,
.focus-kicker,
.spark,
th,
.field label {
  line-height:1.25;
}

@media(max-width:760px){
  .row-actions{flex-direction:row;justify-content:flex-start;min-width:150px;}
  .row-actions .btn{width:auto!important;}
  .top-actions .btn,
  .section-head .btn{width:auto;max-width:100%;}
  .modal-actions .btn,
  .welcome-actions .btn,
  .wizard-actions .btn,
  .field.wide > .btn,
  .field.wide button.btn{width:100%;}
}


/* Client filters, column controls, and bubbled-up action cards */
.table-tools{display:grid;gap:12px;margin:0 0 16px;padding:14px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,var(--panel-2),var(--panel-3));box-shadow:var(--glow)}
.filter-grid{display:grid;grid-template-columns:repeat(6,minmax(140px,1fr));gap:10px;align-items:end}
.filter-field{display:grid;gap:6px;min-width:0}
.filter-field span{font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);font-weight:900}
.filter-field input,.filter-field select{width:100%;min-width:0;border:1px solid var(--line);border-radius:14px;background:var(--input);color:var(--text);padding:10px 12px;font:inherit;font-weight:700;outline:none}
.column-picker{border:1px solid var(--line);border-radius:16px;background:rgba(128,128,128,.04);padding:10px 12px;max-width:100%;overflow:hidden}
.column-picker summary{cursor:pointer;color:var(--gold);font-weight:950;font-size:12px;letter-spacing:.08em;text-transform:uppercase;list-style:none;display:flex;align-items:center;gap:8px}
.column-picker summary::after{content:'›';font-size:18px;transform:rotate(90deg);transition:var(--ease)}
.column-picker[open] summary::after{transform:rotate(-90deg)}
.column-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:8px;margin-top:12px}
.column-grid label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:13px;padding:9px 10px;background:rgba(128,128,128,.04);font-size:12px;color:var(--muted);font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.attention-card{border-color:rgba(200,162,74,.38)}
.compact-list{gap:8px}
.attention-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid var(--line);border-radius:16px;background:rgba(128,128,128,.045);padding:11px 12px;min-width:0}
.attention-item strong{display:block;font-size:13px;line-height:1.25;overflow-wrap:anywhere}
.attention-badges{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;max-width:220px}
.status.client-action{background:rgba(200,162,74,.16);color:var(--gold);border-color:rgba(200,162,74,.34)}
.status.important{background:rgba(85,185,133,.16);color:var(--green-2);border-color:rgba(85,185,133,.34)}
.status.past-due{background:rgba(223,54,86,.16);color:#df3656;border-color:rgba(223,54,86,.34)}
.status.no{background:rgba(128,128,128,.08);color:var(--muted);border-color:var(--line)}
.table-wrap th,.table-wrap td{vertical-align:top}
@media(max-width:1180px){.filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.column-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.filter-grid,.column-grid{grid-template-columns:1fr}.attention-item{grid-template-columns:1fr}.attention-badges{justify-content:flex-start;max-width:100%}.table-tools{padding:12px}}

/* Clean navigation, role cards, and table fit pass */
.settings-link-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.settings-link-grid .btn{width:auto;min-width:170px}
.role-list{margin:0;padding-left:18px;color:var(--muted);display:grid;gap:10px;line-height:1.5}
.role-list li::marker{color:var(--gold)}

.data-table{table-layout:auto;width:max-content;min-width:100%}
.table-wrap{overflow-x:auto;overflow-y:hidden}
.data-table th,.data-table td{white-space:normal;overflow-wrap:normal;word-break:normal;line-height:1.35}
.data-table th{white-space:nowrap}
.data-table td[data-col="contact"],.data-table td[data-col="company"],.data-table td[data-col="source"],.data-table td[data-col="owner"]{white-space:normal;overflow-wrap:break-word}
.data-table td[data-col="notes"],.data-table td[data-col="expected"],.data-table td[data-col="strategy"],.data-table td[data-col="task"]{white-space:normal;overflow-wrap:break-word;min-width:220px;max-width:420px}
.data-table td[data-col="nextAction"]{min-width:150px;max-width:260px;overflow-wrap:break-word}
.data-table th[data-col="actions"],.data-table td[data-col="actions"]{position:sticky;right:0;background:var(--panel);z-index:2;box-shadow:-10px 0 18px rgba(0,0,0,.12)}
.data-table th[data-col="actions"]{z-index:3;background:var(--panel-2)}
.data-table td[data-col="actions"]{min-width:170px;width:170px;white-space:nowrap}
.table-pipeline{min-width:1120px}
.table-pipeline th[data-col="contact"],.table-pipeline td[data-col="contact"]{min-width:145px;width:160px}
.table-pipeline th[data-col="company"],.table-pipeline td[data-col="company"]{min-width:145px;width:160px}
.table-pipeline th[data-col="source"],.table-pipeline td[data-col="source"]{min-width:100px;width:110px}
.table-pipeline th[data-col="stage"],.table-pipeline td[data-col="stage"]{min-width:130px;width:140px}
.table-pipeline th[data-col="value"],.table-pipeline td[data-col="value"]{min-width:110px;width:120px;white-space:nowrap}
.table-pipeline th[data-col="owner"],.table-pipeline td[data-col="owner"]{min-width:140px;width:150px}
.table-pipeline th[data-col="notes"],.table-pipeline td[data-col="notes"]{min-width:280px;width:34vw;max-width:520px}
.table-pipeline th[data-col="important"],.table-pipeline td[data-col="important"],
.table-pipeline th[data-col="clientAction"],.table-pipeline td[data-col="clientAction"],
.table-pipeline th[data-col="reminderDate"],.table-pipeline td[data-col="reminderDate"],
.table-pipeline th[data-col="lastTouch"],.table-pipeline td[data-col="lastTouch"]{min-width:130px}
.row-actions .btn.small{min-width:72px;text-align:center}
@media(max-width:760px){.settings-link-grid .btn{width:100%;}.data-table th[data-col="actions"],.data-table td[data-col="actions"]{position:static;box-shadow:none}}


/* --- Premium mockup alignment pass: darker private-capital UI, green CTAs, gold accents --- */
html[data-theme="dark"]{
  --bg:#050d0a;
  --bg-2:#0a1511;
  --panel:#0d1a15;
  --panel-2:#101f18;
  --panel-3:#15291f;
  --sidebar:#04120d;
  --sidebar-2:#0b271b;
  --text:#f6f0df;
  --muted:#a5b1a5;
  --soft:#d4b967;
  --line:rgba(212,185,103,.18);
  --line-strong:rgba(212,185,103,.42);
  --green:#0f4d35;
  --green-2:#2f8e61;
  --gold:#b8892e;
  --gold-2:#e1bf63;
  --shadow:0 28px 90px rgba(0,0,0,.42);
  --glow:0 0 0 1px rgba(225,191,99,.16),0 22px 75px rgba(15,77,53,.22);
}
html[data-theme="light"]{
  --bg:#f8f4eb;
  --bg-2:#fffdf7;
  --panel:#fffaf1;
  --panel-2:#f8f1e5;
  --panel-3:#efe3ce;
  --sidebar:#fffaf0;
  --sidebar-2:#f6eedf;
  --text:#101d17;
  --muted:#66736a;
  --soft:#8e773f;
  --line:rgba(38,62,47,.14);
  --line-strong:rgba(184,137,46,.34);
  --green:#06462f;
  --green-2:#1e714c;
  --gold:#b8892e;
  --gold-2:#d6ac4d;
}
body{
  overflow-x:hidden;
  background:
    radial-gradient(circle at 15% 8%,rgba(225,191,99,.10),transparent 24%),
    radial-gradient(circle at 85% 0%,rgba(27,104,71,.18),transparent 24%),
    linear-gradient(135deg,var(--bg),var(--bg-2));
}
html[data-theme="dark"] .app-shell{
  background:
    linear-gradient(180deg,rgba(225,191,99,.035),transparent 34%),
    radial-gradient(circle at 96% 6%,rgba(225,191,99,.08),transparent 17%);
}
.sidebar{
  border-right-color:rgba(225,191,99,.28);
  box-shadow:18px 0 54px rgba(0,0,0,.18);
}
html[data-theme="dark"] .sidebar{
  background:
    radial-gradient(circle at 15% 6%,rgba(225,191,99,.10),transparent 20%),
    linear-gradient(180deg,#052016,#03100b 68%,#020906);
}
.brand-block{gap:16px;padding-bottom:18px;}
.brand-mark{
  position:relative;
  width:58px;height:58px;border-radius:18px;
  background:radial-gradient(circle at 50% 42%,rgba(225,191,99,.18),transparent 40%),linear-gradient(145deg,rgba(225,191,99,.16),rgba(15,77,53,.18));
  border:1px solid rgba(225,191,99,.58);
  color:var(--gold-2);
  box-shadow:0 0 0 5px rgba(225,191,99,.035),0 16px 38px rgba(0,0,0,.24);
  font-family:var(--font-display);
  font-size:31px;
  line-height:1;
}
.brand-mark span{position:relative;z-index:2;}
.brand-mark:before,.brand-mark:after{
  content:"";position:absolute;inset:7px;border:1px solid rgba(225,191,99,.45);border-radius:14px;transform:rotate(45deg);pointer-events:none;
}
.brand-mark:after{inset:13px;border-color:rgba(225,191,99,.28);transform:rotate(0deg);border-radius:50%;}
.brand-name{font-size:20px;color:var(--text);text-shadow:0 0 24px rgba(225,191,99,.16)}
.brand-sub{color:var(--gold-2);opacity:.92;}
.nav{gap:20px;}
.nav-heading{color:var(--gold-2);opacity:.82;}
.nav-btn{border:1px solid transparent;min-height:48px;}
.nav-btn:hover{background:rgba(21,75,52,.38);border-color:rgba(225,191,99,.12);}
.nav-btn.active{
  position:relative;
  background:linear-gradient(135deg,rgba(15,77,53,.92),rgba(19,91,61,.74));
  border-color:rgba(225,191,99,.50);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 15px 34px rgba(0,0,0,.18);
}
.nav-btn.active:after{content:"";position:absolute;right:-1px;top:10px;bottom:10px;width:3px;border-radius:999px;background:var(--gold-2);box-shadow:0 0 16px rgba(225,191,99,.65)}
.nav-ico{background:rgba(225,191,99,.08);border:1px solid rgba(225,191,99,.16);}
.focus-card{
  background:linear-gradient(150deg,rgba(15,77,53,.72),rgba(8,29,21,.82));
  border-color:rgba(225,191,99,.48);
}
.focus-card h3{font-size:19px;color:var(--gold-2)}
.focus-card:before{content:"★";position:absolute;right:18px;top:14px;color:var(--gold-2);font-size:18px;}
.user-card{border-color:rgba(225,191,99,.22);background:rgba(15,77,53,.24);}
.user-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;}
#logoutBtn{width:32px;height:32px;font-size:18px;line-height:1;}
body.auth-required{overflow:hidden;}
body.auth-required .app-shell,body.auth-required .mobile-appbar{display:none!important;}
.platform-auth{position:fixed;inset:0;z-index:9999;min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 15% 12%,rgba(198,162,74,.12),transparent 30%),radial-gradient(circle at 82% 82%,rgba(47,122,87,.18),transparent 36%),linear-gradient(145deg,#020c08,#062016 54%,#020806);overflow:auto;}
.auth-back-home{position:absolute;top:clamp(18px,3vw,32px);left:clamp(18px,3vw,36px);z-index:2;display:inline-flex;align-items:center;color:var(--cream);font-size:14px;font-weight:800;text-decoration:none;transition:color .2s ease,transform .2s ease;}
.auth-back-home:hover,.auth-back-home:focus-visible{color:var(--gold-2);transform:translateX(-2px);}
.platform-auth-card{position:relative;width:min(780px,calc(100vw - 40px));display:grid;gap:24px;padding:42px 56px;border:1px solid rgba(225,191,99,.34);border-radius:20px;background:linear-gradient(155deg,rgba(7,31,22,.98),rgba(3,17,12,.99));box-shadow:0 34px 110px rgba(0,0,0,.48),0 0 0 1px rgba(225,191,99,.06);}
.platform-auth-card h1{margin:8px auto 0;font-family:var(--font-display);font-size:clamp(46px,5.2vw,64px);font-weight:900;line-height:.95;letter-spacing:0;color:var(--cream);max-width:610px;text-align:center;}
.platform-auth-card p{margin:0;}
.auth-brand-row{display:grid;justify-items:center;text-align:center;gap:14px;}
.auth-brand{width:64px;height:64px;border-radius:20px;box-shadow:0 16px 42px rgba(198,162,74,.20);}
.auth-brand-row .spark{font-size:11px;letter-spacing:2.4px;}
.auth-intro{line-height:1.55;max-width:560px;margin:14px auto 0!important;font-size:16px;color:#cfe0cf!important;}
.auth-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.auth-segmented{display:none;}
.platform-auth-card form,.auth-form-card{display:grid;gap:14px;}
.auth-form-card{width:min(600px,100%);justify-self:center;border:1px solid rgba(225,191,99,.24);border-radius:22px;padding:20px;background:rgba(2,13,9,.78);box-shadow:inset 0 1px 0 rgba(255,255,255,.035);}
.platform-auth-card .field input{height:48px;background:rgba(3,14,10,.96);border-color:rgba(225,191,99,.24);color:var(--text);font-size:15px;border-radius:14px;}
.platform-auth-card .field input:-webkit-autofill{-webkit-text-fill-color:var(--text);box-shadow:0 0 0 1000px #07140e inset;}
.platform-auth-card .field label{margin-bottom:8px;letter-spacing:1.7px;}
.platform-auth-card .auth-primary-btn{width:100%;justify-self:stretch;height:50px;border-radius:12px;background:linear-gradient(135deg,var(--green),var(--green-2));box-shadow:0 18px 42px rgba(47,122,87,.30),inset 0 1px 0 rgba(255,255,255,.10);}
.auth-access-note,.auth-help-panel{border:1px solid rgba(225,191,99,.20);border-radius:16px;padding:13px 14px;background:rgba(7,25,17,.72);display:grid;gap:6px;}
.auth-access-note strong{font-size:15px;color:var(--text);}
.auth-help-panel{gap:9px;background:rgba(255,255,255,.035);}
.auth-help-actions{display:flex;gap:9px;flex-wrap:wrap;}
.auth-help-actions button{border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.04);color:var(--gold-2);padding:8px 11px;cursor:pointer;font:inherit;font-size:12px;font-weight:900;}
.auth-help-actions button:hover{border-color:rgba(225,191,99,.42);background:rgba(225,191,99,.08);color:var(--text);}.auth-message{border:1px solid var(--gold-line);border-radius:12px;padding:10px 12px;background:rgba(198,162,74,.11);color:var(--text);font-size:.9rem;line-height:1.4;overflow-wrap:anywhere;display:grid;gap:4px}
.auth-message strong{font-size:.92rem}
.auth-message span,.auth-message small{color:var(--muted)}
.auth-message small{font-size:.78rem}
@media(max-width:640px){.platform-auth{padding:16px;align-items:center}.platform-auth-card{width:100%;padding:26px 18px;gap:18px;border-radius:18px}.auth-grid{grid-template-columns:1fr}.platform-auth-card h1{font-size:39px}.auth-form-card{padding:15px}.auth-brand{width:58px;height:58px}.auth-intro{font-size:14px}.auth-help-actions button{width:auto}}
.main{padding:30px 32px;}
.topbar{align-items:flex-start;margin-bottom:26px;}
.title-wrap h1{font-size:38px;color:var(--text);}
.spark{color:var(--gold-2)}
.top-actions{gap:12px;}
.top-pill,.date-pill{
  height:42px;
  background:rgba(11,25,18,.72);
  border-color:rgba(225,191,99,.36)!important;
  color:var(--text);
  box-shadow:none;
  white-space:nowrap;
}
html[data-theme="light"] .top-pill,html[data-theme="light"] .date-pill{background:var(--panel);}
.search-box{min-width:330px;height:42px;box-shadow:none;border-color:rgba(225,191,99,.22);}
.search-box kbd{
  border:1px solid var(--line);border-radius:8px;padding:2px 7px;font-size:11px;color:var(--muted);background:rgba(128,128,128,.08);white-space:nowrap;
}
.notify-btn,.top-avatar{
  width:40px;height:40px;border-radius:999px;border:1px solid rgba(225,191,99,.34);background:rgba(15,77,53,.34);color:var(--gold-2);display:grid;place-items:center;font-weight:950;position:relative;
}
.notify-btn span{position:absolute;right:-4px;top:-5px;background:var(--gold);color:#111;border-radius:999px;font-size:10px;padding:2px 5px;}
.top-avatar{background:linear-gradient(145deg,rgba(15,77,53,.95),rgba(225,191,99,.20));color:#f8f0dd;}
.theme-toggle{border-color:rgba(225,191,99,.36);background:rgba(8,18,13,.68);}
html[data-theme="light"] .theme-toggle{background:var(--panel);}
.theme-toggle button.active{background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#10160f;box-shadow:0 8px 22px rgba(184,137,46,.22)}
.btn.primary{
  background:linear-gradient(135deg,#0a3f2b,#17764f 58%,#218c5d);
  border-color:rgba(225,191,99,.42);
  color:#fffbe9;
  box-shadow:0 0 0 1px rgba(225,191,99,.10),0 16px 40px rgba(15,77,53,.34);
}
.btn.primary:hover{filter:brightness(1.06);transform:translateY(-1px)}
.btn.ghost,.export-btn{border-color:rgba(225,191,99,.23);background:rgba(128,128,128,.045)}
.card{
  border-color:rgba(225,191,99,.22);
  background:linear-gradient(145deg,rgba(16,31,24,.96),rgba(10,22,17,.96));
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 26px 80px rgba(0,0,0,.28);
}
html[data-theme="light"] .card{background:linear-gradient(145deg,var(--panel),var(--panel-2));box-shadow:0 18px 50px rgba(27,45,34,.08)}
.card.decor:before{border-color:rgba(225,191,99,.18);}
.kpi-card{min-height:158px;}
.kpi-icon{background:rgba(15,77,53,.36);border:1px solid rgba(225,191,99,.20);color:var(--gold-2);}
.kpi-value{font-family:var(--font-display);font-weight:500;font-size:34px;}
.kpi-label{color:var(--gold-2);}
.section-head h2,.section-head h3{color:var(--text);}
.table-wrap{border-color:rgba(225,191,99,.24);background:rgba(7,18,13,.42)}
th{color:var(--gold-2);background:rgba(225,191,99,.035)}
td{line-height:1.45;}
.row-actions .btn{min-width:72px;}
.status{font-size:11px;padding:5px 10px;}
.wizard-side{background:linear-gradient(145deg,rgba(15,77,53,.68),rgba(6,19,13,.94));border-color:rgba(225,191,99,.36);}
html[data-theme="light"] .wizard-side{background:linear-gradient(145deg,var(--panel),var(--panel-2));}
.modal{border-color:rgba(225,191,99,.38);}
.modal-head{background:linear-gradient(135deg,rgba(15,77,53,.28),transparent);}
@media(max-width:1400px){.app-shell{grid-template-columns:280px minmax(0,1fr)}.main{padding:24px}.search-box{min-width:260px}.cols-5{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1020px){.top-pill,.notify-btn,.top-avatar{display:none}.cols-5{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Phase 1 integration readiness hub */
.integration-kpis .kpi-card{min-height:145px}
.integration-hero{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,.7fr);gap:22px;align-items:stretch;overflow:hidden}
.integration-hero:after{content:"";position:absolute;right:-52px;top:-62px;width:210px;height:210px;border:1px solid rgba(225,191,99,.16);border-radius:42%;transform:rotate(28deg);pointer-events:none}
.integration-hero h2{font-family:var(--font-display);font-size:34px;margin:8px 0 10px;line-height:1.05}
.integration-hero-copy p{max-width:820px;line-height:1.65;margin:0}
.integration-next{position:relative;border:1px solid var(--line);border-radius:20px;padding:18px;background:linear-gradient(145deg,rgba(225,191,99,.10),rgba(15,77,53,.12));display:grid;gap:10px;align-content:center;z-index:1}
.integration-next strong{font-family:var(--font-display);font-size:20px;color:var(--gold-2)}
.integration-next span{display:flex;align-items:center;gap:9px;color:var(--muted);font-weight:800;font-size:13px}
.integration-next span:before{content:"";width:8px;height:8px;border-radius:999px;background:var(--gold-2);box-shadow:0 0 16px rgba(225,191,99,.45)}
.integration-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.integration-card{display:grid;gap:15px;min-height:100%}
.integration-card-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center}
.integration-card-head h3{margin:4px 0 0;font-family:var(--font-display);font-size:27px;line-height:1.05;overflow-wrap:anywhere}
.integration-logo{width:52px;height:52px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,rgba(15,77,53,.88),rgba(225,191,99,.14));border:1px solid rgba(225,191,99,.42);color:var(--gold-2);font-weight:950;box-shadow:0 12px 28px rgba(0,0,0,.18);font-size:15px}
.integration-status{white-space:nowrap;border-color:rgba(225,191,99,.28);background:rgba(128,128,128,.08)}
.integration-status.ready-to-connect{background:rgba(47,122,87,.20);color:var(--green-2);border-color:rgba(85,185,133,.35)}
.integration-status.connected{background:rgba(47,122,87,.30);color:#86e4ac;border-color:rgba(134,228,172,.38)}
.integration-status.planned{background:rgba(200,162,74,.14);color:var(--gold-2);border-color:rgba(225,191,99,.34)}
.integration-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.integration-meta span{border:1px solid var(--line);background:rgba(128,128,128,.045);border-radius:16px;padding:11px 12px;color:var(--muted);font-size:13px;display:grid;gap:3px;min-width:0}
.integration-meta strong{color:var(--text);font-size:11px;text-transform:uppercase;letter-spacing:.14em}
.integration-section{border-top:1px solid var(--line);padding-top:12px;min-width:0}
.integration-section strong{display:block;color:var(--gold-2);font-size:12px;text-transform:uppercase;letter-spacing:.15em;margin-bottom:7px}
.integration-section p{margin:0;color:var(--muted);line-height:1.55;font-size:13px;overflow-wrap:anywhere}
.integration-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:4px}
.integration-actions .btn{white-space:nowrap}
.integration-note{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:rgba(128,128,128,.045);line-height:1.5;margin:0}
.integration-log{display:grid;gap:10px}
.log-row{display:grid;grid-template-columns:110px 150px minmax(0,1fr);gap:12px;align-items:start;border:1px solid var(--line);border-radius:16px;padding:13px;background:rgba(128,128,128,.045)}
.log-row span{color:var(--gold-2);font-weight:900;font-size:12px;text-transform:uppercase;letter-spacing:.08em}.log-row strong{color:var(--text)}.log-row p{margin:0;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}
html[data-theme="light"] .integration-card,html[data-theme="light"] .integration-hero{background:linear-gradient(145deg,var(--panel),var(--panel-2))}
html[data-theme="light"] .integration-logo{background:linear-gradient(145deg,rgba(6,70,47,.10),rgba(214,172,77,.16));color:var(--green)}
@media(max-width:1200px){.integration-grid{grid-template-columns:1fr}.integration-hero{grid-template-columns:1fr}.integration-card-head{grid-template-columns:auto minmax(0,1fr);}.integration-card-head .status{grid-column:1/-1;width:max-content;max-width:100%}}
@media(max-width:720px){.integration-meta{grid-template-columns:1fr}.log-row{grid-template-columns:1fr}.integration-actions .btn{width:100%}.integration-hero h2{font-size:28px}}


/* Top bar simplification + quieter mockup-aligned scale */
body{font-size:14px;}
.topbar{align-items:flex-start;display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:20px;}
.compact-top-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:nowrap;width:auto;}
.site-search{width:min(420px,34vw);min-width:260px;box-shadow:none;}
.premium-theme-toggle{height:40px;align-items:center;padding:3px;border-color:rgba(225,191,99,.36);background:rgba(8,18,13,.72);}
.premium-theme-toggle button{height:32px;padding:0 14px;font-size:12px;line-height:1;}
.premium-theme-toggle button.active{background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#10160f;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),0 8px 22px rgba(184,137,46,.20)}
.title-wrap h1{font-size:32px;letter-spacing:-.02em;margin:6px 0 6px;}
.title-wrap p{font-size:13px;}
.spark,.focus-kicker{font-size:9px;letter-spacing:.16em;}
.card{padding:16px;border-radius:20px;}
.section-head{margin-bottom:12px;}
.section-head h2{font-size:22px;}
.section-head h3{font-size:18px;}
.kpi-card{min-height:132px;}
.kpi-label{font-size:9px;letter-spacing:.12em;}
.kpi-value{font-size:28px;margin-top:6px;}
.kpi-icon{width:35px;height:35px;border-radius:13px;font-size:13px;}
.trend{font-size:11px;}
.nav-btn{min-height:42px;padding:9px 11px;font-size:13px;}
.nav-ico{width:27px;height:27px;border-radius:10px;font-size:12px;}
.nav-heading{font-size:9px;}
.focus-card{padding:14px;border-radius:20px;}
.focus-card h3{font-size:16px;}
.focus-card p{font-size:12px;}
.btn{padding:9px 13px;border-radius:13px;font-size:13px;}
.btn.small{padding:6px 9px;font-size:11px;}
.search-box{height:40px;font-size:13px;}
.chart{height:250px;}
.summary-item,.task-item{padding:10px;border-radius:14px;}
th,td{font-size:13px;padding:11px 13px;}
th{font-size:10px;}
.search-hero p{margin-top:0;}
.search-results-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.search-result-card{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.045);padding:14px;display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0;}
.search-result-card h3{font-family:var(--font-display);font-size:18px;margin:4px 0 5px;}
.search-result-card p{margin:0;line-height:1.45;overflow-wrap:anywhere;}
.search-actions{flex:0 0 auto;}
@media(max-width:1180px){.topbar{grid-template-columns:1fr}.compact-top-actions{justify-content:flex-start;width:100%;}.site-search{width:100%;max-width:460px;}.search-results-grid{grid-template-columns:1fr;}}
@media(max-width:760px){.compact-top-actions{flex-wrap:wrap;}.site-search{max-width:100%;min-width:0}.compact-top-actions .btn,.compact-top-actions .theme-toggle{width:auto}.title-wrap h1{font-size:28px}.search-results-grid{grid-template-columns:1fr;}}

/* Pipeline fit pass: no page/table horizontal scrollbar, client-friendly columns */
.table-wrap{overflow-x:hidden!important;overflow-y:visible!important;}
.data-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;}
.data-table th,.data-table td{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.table-pipeline{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;}
.table-pipeline th[data-col="contact"],.table-pipeline td[data-col="contact"]{width:17%!important;}
.table-pipeline th[data-col="source"],.table-pipeline td[data-col="source"]{width:12%!important;}
.table-pipeline th[data-col="stage"],.table-pipeline td[data-col="stage"]{width:13%!important;}
.table-pipeline th[data-col="value"],.table-pipeline td[data-col="value"]{width:11%!important;white-space:nowrap!important;}
.table-pipeline th[data-col="nextAction"],.table-pipeline td[data-col="nextAction"]{width:14%!important;}
.table-pipeline th[data-col="notes"],.table-pipeline td[data-col="notes"]{width:auto!important;max-width:none!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.table-pipeline th[data-col="actions"],.table-pipeline td[data-col="actions"]{width:160px!important;min-width:160px!important;position:static!important;box-shadow:none!important;white-space:nowrap!important;}
.table-pipeline .row-actions{justify-content:flex-end;flex-wrap:nowrap;}
.table-pipeline .row-actions .btn{min-width:72px;white-space:nowrap;}
@media(max-width:900px){
  .table-pipeline th[data-col="source"],.table-pipeline td[data-col="source"]{display:none;}
  .table-pipeline th[data-col="notes"],.table-pipeline td[data-col="notes"]{width:22%!important;}
}

/* Integration two-panel account layout */
.integration-shell{
  display:grid;
  grid-template-columns:minmax(250px,340px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.integration-left{
  position:sticky;
  top:18px;
  display:grid;
  gap:14px;
  min-width:0;
}
.section-head.compact h3{font-size:22px;margin:2px 0 0;line-height:1.05}
.small-copy{font-size:12px;line-height:1.55;margin:0}
.integration-nav-list{display:grid;gap:10px;min-width:0}
.integration-nav-item{
  width:100%;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(128,128,128,.035);
  color:var(--text);
  padding:12px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:11px;
  align-items:center;
  text-align:left;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.integration-nav-item .status{grid-column:2;justify-self:start;margin-top:2px;font-size:10px;max-width:100%;white-space:nowrap}
.integration-nav-item:hover,.integration-nav-item.active{
  border-color:rgba(225,191,99,.54);
  background:linear-gradient(145deg,rgba(15,77,53,.32),rgba(225,191,99,.08));
  box-shadow:0 12px 28px rgba(0,0,0,.16), inset 0 0 0 1px rgba(225,191,99,.06);
}
.integration-nav-item.active{transform:translateX(2px)}
.integration-nav-copy{display:grid;gap:3px;min-width:0}
.integration-nav-copy strong{font-family:var(--font-display);font-size:16px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.integration-nav-copy small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:700}
.integration-right{display:grid;gap:18px;min-width:0}
.integration-logo.small-logo{width:38px;height:38px;border-radius:14px;font-size:11px}
.integration-logo.large-logo{width:64px;height:64px;border-radius:22px;font-size:16px;flex:0 0 auto}
.integration-detail-card{display:grid;gap:16px;overflow:hidden;min-width:0}
.integration-detail-head{display:flex;gap:15px;align-items:flex-start;min-width:0}
.integration-detail-head h2{font-family:var(--font-display);font-size:30px;line-height:1.05;margin:3px 0 5px;overflow-wrap:anywhere}
.integration-detail-head .status{margin-left:auto;white-space:nowrap;max-width:100%}
.min-w-0{min-width:0}
.integration-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.detail-metric{border:1px solid var(--line);background:rgba(128,128,128,.04);border-radius:16px;padding:11px 12px;display:grid;gap:4px;min-width:0}
.detail-metric span{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-weight:900}
.detail-metric strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.account-detail-table{border:1px solid var(--line);border-radius:18px;overflow:hidden;background:rgba(128,128,128,.03)}
.account-detail-row{display:grid;grid-template-columns:minmax(130px,.28fr) minmax(0,1fr);gap:14px;padding:13px 15px;border-bottom:1px solid var(--line);align-items:start;min-width:0}
.account-detail-row:last-child{border-bottom:0}
.account-detail-row span{font-size:11px;letter-spacing:.13em;text-transform:uppercase;color:var(--gold-2);font-weight:950;line-height:1.35}
.account-detail-row p{margin:0;color:var(--text);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.detail-actions{border-top:1px solid var(--line);padding-top:14px}
html[data-theme="light"] .integration-nav-item:hover,
html[data-theme="light"] .integration-nav-item.active{background:linear-gradient(145deg,rgba(6,70,47,.08),rgba(214,172,77,.12))}
@media(max-width:1100px){
  .integration-shell{grid-template-columns:1fr}
  .integration-left{position:relative;top:auto}
  .integration-nav-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .integration-nav-list,.integration-detail-grid,.account-detail-row{grid-template-columns:1fr}
  .integration-detail-head{display:grid;grid-template-columns:auto minmax(0,1fr)}
  .integration-detail-head .status{grid-column:1/-1;margin-left:0;justify-self:start}
  .integration-detail-head h2{font-size:25px}
}

/* Integration connection fields */
.integration-connect-form{
  border:1px solid var(--line);
  border-radius:20px;
  padding:16px;
  background:linear-gradient(145deg,rgba(225,191,99,.055),rgba(15,77,53,.08));
  display:grid;
  gap:14px;
  min-width:0;
}
.form-section-title{display:grid;gap:5px;min-width:0}
.form-section-title strong{font-family:var(--font-display);font-size:20px;line-height:1.1;color:var(--text)}
.form-section-title small{color:var(--muted);font-size:12px;line-height:1.45;max-width:780px}
.integration-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.integration-field-grid .field{min-width:0}
.integration-field-grid .field.wide{grid-column:1/-1}
.integration-field-grid label{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2);font-weight:950;line-height:1.25}
.integration-field-grid input,
.integration-field-grid select,
.integration-field-grid textarea{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(0,0,0,.12);
  color:var(--text);
  padding:10px 12px;
  font:inherit;
  font-size:13px;
  outline:0;
}
.integration-field-grid textarea{min-height:82px;resize:vertical;line-height:1.45}
.integration-field-grid input::placeholder,
.integration-field-grid textarea::placeholder{color:color-mix(in srgb,var(--muted),transparent 30%)}
.integration-field-grid input:focus,
.integration-field-grid select:focus,
.integration-field-grid textarea:focus{border-color:rgba(225,191,99,.62);box-shadow:0 0 0 3px rgba(225,191,99,.10)}
html[data-theme="light"] .integration-connect-form{background:linear-gradient(145deg,rgba(214,172,77,.08),rgba(6,70,47,.035))}
html[data-theme="light"] .integration-field-grid input,
html[data-theme="light"] .integration-field-grid select,
html[data-theme="light"] .integration-field-grid textarea{background:rgba(255,255,255,.72)}
@media(max-width:760px){.integration-field-grid{grid-template-columns:1fr}.integration-connect-form{padding:13px}.form-section-title strong{font-size:18px}}

/* Media Studio split layout */
.media-shell .integration-left{align-self:start}
.media-detail-card{overflow:hidden}
.media-workspace{display:grid;grid-template-columns:minmax(260px,360px) minmax(0,1fr);gap:16px;align-items:start}
.media-ideas-panel{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.035);padding:14px;min-width:0}
.media-idea-list{display:grid;gap:10px;min-width:0}
.media-idea-item{width:100%;border:1px solid var(--line);border-radius:16px;background:rgba(128,128,128,.04);color:var(--text);padding:12px;text-align:left;display:grid;gap:5px;cursor:pointer;transition:var(--ease);min-width:0}
.media-idea-item:hover,.media-idea-item.active{border-color:rgba(225,191,99,.55);background:linear-gradient(145deg,rgba(15,77,53,.28),rgba(225,191,99,.08));box-shadow:inset 0 0 0 1px rgba(225,191,99,.06)}
.media-idea-item strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.media-idea-item small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.media-script-panel{padding:16px;min-width:0}
.media-script-form .field.wide{grid-column:1/-1}
.media-script-form .field textarea[name="script"]{min-height:260px;font-family:inherit;line-height:1.6}
.media-connect-form{border-top:1px solid var(--line);padding-top:14px}
@media(max-width:1100px){.media-workspace{grid-template-columns:1fr}.media-idea-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.media-idea-list{grid-template-columns:1fr}.media-script-form{grid-template-columns:1fr}.media-script-form .field.wide{grid-column:auto}}

/* Stabilization pass: calmer client-facing shell, hidden admin pages, detail modals */
.title-wrap h1{font-size:30px!important;letter-spacing:-.01em}.title-wrap p{font-size:13px}.spark{font-size:9px}.card{padding:16px}.section-head h2{font-size:20px!important}.section-head h3{font-size:17px!important}.kpi-card{min-height:124px}.kpi-value{font-size:25px!important}.kpi-label{font-size:8.5px}.nav{gap:16px}.nav-group{gap:6px}.nav-btn{min-height:40px!important;font-size:12.5px!important}.focus-card h3{font-size:18px}.focus-card p{font-size:12px}.overview-note{display:flex;align-items:center;justify-content:space-between;gap:16px}.overview-note h3{margin:3px 0 5px;font-family:var(--font-display);font-size:20px}.overview-note p{margin:0;font-size:13px}.table-tools{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.045);padding:12px;margin-bottom:14px}.filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;align-items:end}.filter-field span{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:900}.filter-field input,.filter-field select{height:36px;font-size:12px;border-radius:12px}.column-picker{margin-top:10px}.column-picker summary{font-size:12px;color:var(--muted);cursor:pointer}.column-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-top:10px}.column-grid label{font-size:12px;color:var(--muted)}.table-wrap{overflow:hidden!important}.data-table{width:100%!important;table-layout:fixed!important}.data-table th,.data-table td{font-size:12px!important;padding:10px 9px!important;vertical-align:middle}.data-table th{font-size:9px!important;letter-spacing:.12em}.data-table td[data-col="notes"],.data-table td[data-col="expected"]{max-width:180px}.truncate-cell{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.data-table th[data-col="actions"],.data-table td[data-col="actions"]{position:static!important;box-shadow:none!important;width:172px!important;min-width:172px!important;background:transparent!important}.row-actions{display:flex;flex-wrap:nowrap;gap:5px}.row-actions .btn.small{padding:6px 7px;font-size:11px;min-width:45px}.record-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.record-detail-row{border:1px solid var(--line);border-radius:14px;padding:12px;background:rgba(128,128,128,.04);min-width:0}.record-detail-row span{display:block;font-size:9px;letter-spacing:.13em;text-transform:uppercase;color:var(--gold);font-weight:900;margin-bottom:6px}.record-detail-row p{margin:0;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;font-size:13px}.integration-detail-head p,.small-copy,.muted{line-height:1.5}.integration-actions .btn{white-space:normal}.settings-link-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.settings-link-grid .btn{width:100%;justify-content:center}.main{padding:22px}.topbar{margin-bottom:20px!important}.btn{font-size:12px}.btn.primary{box-shadow:0 10px 24px rgba(47,122,87,.16)}
@media(max-width:900px){.overview-note{align-items:flex-start;flex-direction:column}.record-detail-grid{grid-template-columns:1fr}.data-table th[data-col="actions"],.data-table td[data-col="actions"]{width:160px!important;min-width:160px!important}.row-actions .btn.small{font-size:10.5px;padding:6px}}

/* Patch: overview attention item renderer */
.mini-action-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background:rgba(128,128,128,.04);
  min-width:0;
}
.mini-action-copy{min-width:0;display:grid;gap:3px}
.mini-action-copy strong{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.mini-action-copy span{font-size:10.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-action-flags{grid-column:1/-1;display:flex;gap:5px;flex-wrap:wrap;min-width:0}
.micro-btn{padding:6px 9px!important;font-size:10.5px!important;min-width:auto!important;white-space:nowrap!important}

/* Smart Advisor / AI Layer */
.advisor-panel{margin-top:18px;overflow:hidden}
.advisor-suggestion-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.advisor-suggestion{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);background:var(--surface-2);border-radius:14px;padding:12px;min-width:0}
.advisor-suggestion span{color:var(--gold);flex:0 0 auto}
.advisor-suggestion p{margin:0;color:var(--text);font-size:.86rem;line-height:1.45;overflow-wrap:anywhere}
.advisor-drawer-backdrop{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.42);display:flex;justify-content:flex-end;backdrop-filter:blur(2px)}
.advisor-drawer{width:min(520px,100vw);height:100%;background:var(--bg);border-left:1px solid var(--gold-line);box-shadow:-24px 0 60px rgba(0,0,0,.35);display:flex;flex-direction:column;padding:18px;gap:14px;overflow:hidden}
.advisor-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding-bottom:12px}
.advisor-drawer-head h3{margin:0;font-size:1.05rem}
.icon-btn{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:999px;width:34px;height:34px;display:grid;place-items:center;cursor:pointer}
.advisor-messages{display:flex;flex-direction:column;gap:10px;overflow:auto;flex:1;padding:4px 4px 8px}
.advisor-msg{max-width:92%;border:1px solid var(--line);border-radius:16px;padding:12px;background:var(--surface)}
.advisor-msg.user{align-self:flex-end;background:linear-gradient(135deg,var(--green),var(--green-2));color:white;border-color:rgba(255,255,255,.12)}
.advisor-msg.assistant{align-self:flex-start;background:var(--surface-2);border-color:var(--gold-line)}
.advisor-msg p{margin:0;white-space:pre-wrap;line-height:1.5;font-size:.92rem;overflow-wrap:anywhere}
.advisor-chat-form{display:flex;gap:10px;border-top:1px solid var(--line);padding-top:12px}
.advisor-chat-form textarea{min-height:54px;max-height:140px;resize:vertical;flex:1}
.ai-action-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
.compact-static{opacity:.92}
.small-copy{font-size:.86rem;line-height:1.45}
@media (max-width:1000px){.advisor-suggestion-grid{grid-template-columns:1fr}.advisor-chat-form{flex-direction:column}.advisor-drawer{width:100vw}}


/* Advisor-first experience */
.advisor-top-btn{
  min-width:88px;
  justify-content:center;
  border-color:rgba(198,162,74,.72);
  background:linear-gradient(135deg, rgba(198,162,74,.22), rgba(21,82,55,.24));
  color:var(--text);
  box-shadow:0 0 0 1px rgba(198,162,74,.18), 0 14px 40px rgba(0,0,0,.18);
}
.advisor-top-btn:hover{ transform:translateY(-1px); border-color:var(--gold); }
.daily-advisor-brief{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(280px,.75fr);
  gap:18px;
  align-items:start;
  margin-bottom:18px;
  border-color:rgba(198,162,74,.45);
  background:
    radial-gradient(circle at 10% 5%, rgba(198,162,74,.16), transparent 28%),
    linear-gradient(135deg, rgba(16,62,43,.98), rgba(5,19,15,.96));
}
[data-theme="light"] .daily-advisor-brief{
  background:
    radial-gradient(circle at 10% 5%, rgba(198,162,74,.16), transparent 28%),
    linear-gradient(135deg, rgba(255,252,244,.96), rgba(247,243,230,.94));
}
.daily-advisor-main{
  display:flex;
  gap:16px;
  align-items:flex-start;
}
.advisor-orb{
  width:48px;
  height:48px;
  border-radius:18px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  color:#1c2f23;
  background:linear-gradient(135deg, var(--gold), #f0d483);
  box-shadow:0 0 32px rgba(198,162,74,.28);
  font-size:22px;
}
.daily-advisor-brief h2{
  margin:5px 0 8px;
  font-size:clamp(1.35rem, 2.1vw, 2.1rem);
  line-height:1.05;
}
.daily-advisor-brief p{
  max-width:72ch;
  margin:0;
  color:var(--muted);
  font-size:.94rem;
}
.daily-advisor-actions{
  border:1px solid rgba(198,162,74,.25);
  border-radius:18px;
  padding:14px;
  background:rgba(255,255,255,.035);
}
[data-theme="light"] .daily-advisor-actions{ background:rgba(255,255,255,.55); }
.daily-advisor-actions ol{
  margin:0 0 14px;
  padding-left:20px;
  display:grid;
  gap:8px;
  font-size:.86rem;
  color:var(--text);
}
.advisor-brief-btn{ width:100%; }
.advisor-priority-grid{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.advisor-priority-card{
  border:1px solid rgba(198,162,74,.2);
  border-radius:16px;
  padding:13px;
  background:rgba(255,255,255,.035);
  min-width:0;
}
[data-theme="light"] .advisor-priority-card{ background:rgba(255,255,255,.68); }
.advisor-priority-card span{
  display:block;
  margin-bottom:5px;
  color:var(--gold);
  font-size:.66rem;
  letter-spacing:.13em;
  text-transform:uppercase;
  font-weight:800;
}
.advisor-priority-card strong{
  display:block;
  font-size:.92rem;
  line-height:1.2;
  margin-bottom:5px;
}
.advisor-priority-card p{
  font-size:.78rem;
  line-height:1.4;
}
.advisor-priority-card.risk{ border-color:rgba(217,83,79,.33); }
.advisor-priority-card.move{ border-color:rgba(198,162,74,.38); }
.advisor-priority-card.opportunity{ border-color:rgba(82,171,115,.32); }
.page-advisor-brief{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
  margin-bottom:16px;
  border-color:rgba(198,162,74,.38);
  padding:16px 18px;
}
.page-advisor-copy{ min-width:0; }
.page-advisor-copy h3{
  margin:4px 0 8px;
  font-size:1rem;
  line-height:1.25;
  max-width:95ch;
}
.page-advisor-copy ul{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:3px;
  color:var(--muted);
  font-size:.82rem;
}
.advisor-drawer{
  width:min(520px, calc(100vw - 22px));
}
.advisor-drawer-head h3{ font-size:1.15rem; }
.advisor-msg p{ line-height:1.48; }
@media (max-width: 980px){
  .daily-advisor-brief{ grid-template-columns:1fr; }
  .advisor-priority-grid{ grid-template-columns:1fr; }
  .page-advisor-brief{ flex-direction:column; }
  .page-advisor-brief .btn{ width:100%; }
}
@media (max-width: 760px){
  .compact-top-actions{ flex-wrap:wrap; }
  .advisor-top-btn{ order:-1; }
}


/* AI Configuration connection status */
.ai-config-card .card-body,
.ai-config-card{ overflow:visible; }
.ai-status-card{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  border:1px solid rgba(198,162,74,.28);
  border-radius:18px;
  padding:14px;
  margin-bottom:16px;
  background:rgba(255,255,255,.035);
}
[data-theme="light"] .ai-status-card{ background:rgba(255,255,255,.72); }
.ai-status-card h3{ margin:3px 0 5px; font-size:1rem; }
.ai-status-card p{ margin:0; font-size:.82rem; }
.ai-connection-pill{
  flex:0 0 auto;
  border-radius:999px;
  padding:7px 10px;
  font-size:.72rem;
  font-weight:800;
  white-space:nowrap;
  border:1px solid rgba(198,162,74,.3);
}
.ai-connection-pill.connected,
.ai-status-inline.connected{
  color:#8af0a2;
  border-color:rgba(107,214,130,.38);
  background:rgba(57,150,84,.14);
}
[data-theme="light"] .ai-connection-pill.connected,
[data-theme="light"] .ai-status-inline.connected{ color:#116a32; }
.ai-connection-pill.not-connected,
.ai-status-inline.not-connected{
  color:#f0c36d;
  border-color:rgba(198,162,74,.35);
  background:rgba(198,162,74,.12);
}
.ai-status-inline.pending{
  color:var(--text);
  border-color:rgba(198,162,74,.45);
  background:rgba(198,162,74,.16);
}
.ai-status-inline{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  border-radius:999px;
  padding:7px 11px;
  margin:10px 0 8px;
  font-size:.76rem;
  font-weight:800;
  border:1px solid rgba(198,162,74,.22);
}
.ai-button-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.btn.danger-soft{
  border-color:rgba(217,83,79,.35);
  color:#f1a7a2;
}
.payment-links-form{display:grid;gap:14px;}
.payment-links-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.payment-link-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;}
.payment-link-actions .ai-training-progress-label{margin:0;}
@media(max-width:640px){.payment-links-grid{grid-template-columns:1fr;}.payment-link-actions{align-items:stretch;flex-direction:column;}.payment-link-actions .btn{width:100%;}}
[data-theme="light"] .btn.danger-soft{ color:#a63a34; }
@media (max-width: 720px){
  .ai-status-card{ flex-direction:column; }
  .ai-connection-pill{ white-space:normal; }
}


/* Advisor logo button + media conversational workspace */
.advisor-logo-btn{
  width:42px;
  height:42px;
  border-radius:16px;
  border:1px solid rgba(198,162,74,.72);
  background:
    radial-gradient(circle at 35% 22%, rgba(232,206,132,.34), transparent 34%),
    linear-gradient(145deg, rgba(14,64,42,.96), rgba(5,23,17,.96));
  color:var(--gold);
  display:grid;
  place-items:center;
  box-shadow:0 0 0 1px rgba(198,162,74,.16), 0 14px 40px rgba(0,0,0,.24);
  cursor:pointer;
  flex:0 0 auto;
}
.advisor-logo-btn span{
  width:28px;
  height:28px;
  border-radius:50%;
  border:1px solid rgba(198,162,74,.58);
  display:grid;
  place-items:center;
  font-family:Georgia, serif;
  font-weight:900;
  font-size:1rem;
  letter-spacing:.02em;
}
.advisor-logo-btn:hover{ transform:translateY(-1px); border-color:var(--gold); box-shadow:0 0 28px rgba(198,162,74,.22); }
.advisor-logo-btn[hidden]{ display:none !important; }

.media-detail-stack{ display:grid; gap:16px; }
.media-workspace-first{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(360px,.9fr);
  gap:16px;
  margin-top:16px;
}
.media-advisor-panel,
.media-script-panel{
  background:rgba(255,255,255,.035);
  border-color:rgba(198,162,74,.22);
}
[data-theme="light"] .media-advisor-panel,
[data-theme="light"] .media-script-panel{
  background:rgba(255,255,255,.72);
}
.media-advisor-chat{ display:grid; gap:12px; min-width:0; }
.media-prompt-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.media-prompt-chips .btn{
  white-space:normal;
  text-align:left;
  justify-content:flex-start;
  line-height:1.2;
}
.media-advisor-messages{
  min-height:250px;
  max-height:420px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px;
  border:1px solid rgba(198,162,74,.18);
  border-radius:18px;
  background:rgba(0,0,0,.14);
}
[data-theme="light"] .media-advisor-messages{ background:rgba(250,247,238,.72); }
.media-advisor-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
}
.media-advisor-form textarea{
  min-height:72px;
  resize:vertical;
}
.media-lower-grid{
  align-items:start;
}
.media-lower-grid .media-connect-form,
.media-lower-grid .media-ideas-panel{
  min-width:0;
}
.compact-media-fields{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.compact-media-metrics{
  margin-bottom:0;
}
@media (max-width: 1120px){
  .media-workspace-first{ grid-template-columns:1fr; }
}
@media (max-width: 720px){
  .media-advisor-form{ grid-template-columns:1fr; }
  .compact-media-fields{ grid-template-columns:1fr; }
}


/* Decluttered Media Studio */
.media-clean-stack{
  display:grid;
  gap:14px;
}
.media-channel-strip{
  display:flex;
  align-items:center;
  gap:14px;
  padding:16px 18px;
}
.media-channel-strip h2{
  margin:2px 0 4px;
  font-size:1.35rem;
}
.media-channel-strip p{
  margin:0;
  font-size:.84rem;
}
.media-strip-badges{
  margin-left:auto;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}
.media-primary-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);
  gap:14px;
  align-items:start;
}
.media-primary-grid > .card{
  min-width:0;
}
.media-secondary-row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
.media-details-toggle{
  padding:0;
  overflow:hidden;
}
.media-details-toggle summary{
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:15px 16px;
  list-style:none;
}
.media-details-toggle summary::-webkit-details-marker{ display:none; }
.media-details-toggle summary strong{
  display:block;
  font-size:.9rem;
}
.media-details-toggle summary small{
  display:block;
  color:var(--muted);
  font-size:.72rem;
  margin-top:2px;
}
.media-details-toggle summary > span:last-child{
  color:var(--gold);
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-weight:800;
}
.media-details-toggle[open]{
  padding-bottom:14px;
}
.media-details-toggle[open] summary{
  border-bottom:1px solid rgba(198,162,74,.16);
  margin-bottom:12px;
}
.media-details-toggle .media-idea-list,
.media-details-toggle .media-connect-form{
  padding:0 16px;
}
.compact-idea-list{
  max-height:280px;
  overflow:auto;
}
.media-advisor-panel,
.media-script-panel{
  padding:16px;
}
.media-advisor-messages{
  min-height:320px;
  max-height:460px;
}
.media-prompt-chips{
  gap:6px;
}
.media-prompt-chips .btn{
  min-height:30px;
  padding:7px 10px;
}
.compact-script-form{
  gap:10px;
}
.compact-script-form .form-section-title{
  margin-bottom:0;
}
.compact-script-form textarea[name="script"]{
  min-height:210px;
}
.script-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
@media (max-width: 1180px){
  .media-primary-grid,
  .media-secondary-row{
    grid-template-columns:1fr;
  }
  .media-strip-badges{
    margin-left:0;
    justify-content:flex-start;
  }
  .media-channel-strip{
    align-items:flex-start;
    flex-wrap:wrap;
  }
}


/* Mobile friendliness pass */
.mobile-appbar{display:none}
.mobile-nav-backdrop{display:none}
html,body{max-width:100%;overflow-x:hidden}
img,canvas,svg,video{max-width:100%}
.min-w-0{min-width:0}

@media (max-width: 1180px){
  .app-shell{grid-template-columns:252px minmax(0,1fr)}
  .sidebar{padding:20px 14px}
  .brand-name{font-size:15px}
  .brand-sub{font-size:8.5px}
  .topbar{gap:16px}
  .compact-top-actions{min-width:0}
  .site-search{width:min(100%,360px)}
  .grid.cols-5{grid-template-columns:repeat(3,minmax(0,1fr))}
  .grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .integration-shell{grid-template-columns:260px minmax(0,1fr)}
}

@media (max-width: 920px){
  body{padding-top:60px}
  .mobile-appbar{
    position:fixed;
    top:0;left:0;right:0;
    height:60px;
    z-index:900;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    background:linear-gradient(180deg,var(--sidebar),rgba(7,17,13,.94));
    border-bottom:1px solid var(--line);
    backdrop-filter:blur(16px);
  }
  [data-theme="light"] .mobile-appbar{background:rgba(255,250,240,.94)}
  .mobile-menu-btn{
    width:42px;height:42px;border-radius:14px;
    display:grid;place-items:center;
    border:1px solid var(--line-strong);
    background:rgba(200,162,74,.10);
    color:var(--text);
    font-size:1.25rem;
  }
  .mobile-brand-mini{
    display:flex;align-items:center;gap:9px;
    min-width:0;
    color:var(--text);
    text-transform:uppercase;
    letter-spacing:.12em;
  }
  .mobile-brand-mini span{
    width:32px;height:32px;border-radius:12px;
    display:grid;place-items:center;
    border:1px solid rgba(198,162,74,.58);
    color:var(--gold);
    font-family:Georgia,serif;
    font-weight:900;
  }
  .mobile-brand-mini strong{
    font-family:var(--font-display);
    font-size:.95rem;
    white-space:nowrap;
  }
  .app-shell{
    display:block;
    min-height:auto;
  }
  .sidebar{
    position:fixed;
    z-index:1000;
    top:0;bottom:0;left:0;
    width:min(86vw,320px);
    height:100dvh;
    transform:translateX(-105%);
    transition:transform 220ms ease;
    box-shadow:0 30px 90px rgba(0,0,0,.45);
    padding:20px 16px;
  }
  body.mobile-nav-open .sidebar{transform:translateX(0)}
  .mobile-nav-backdrop{
    position:fixed;
    inset:0;
    z-index:950;
    display:block;
    background:rgba(0,0,0,.55);
    backdrop-filter:blur(3px);
  }
  .mobile-nav-backdrop[hidden]{display:none!important}
  .main{
    min-width:0;
    width:100%;
  }
  .topbar{
    padding:18px 14px 10px;
    display:block;
  }
  .title-wrap h1{
    font-size:clamp(1.6rem,8vw,2.4rem);
    line-height:1.04;
  }
  .title-wrap p{font-size:.86rem}
  .compact-top-actions{
    margin-top:14px;
    display:grid;
    grid-template-columns:1fr auto;
    gap:10px;
    align-items:center;
  }
  #advisorTopBtn{display:none!important}
  .site-search{
    grid-column:1 / -1;
    width:100%;
    min-width:0;
  }
  .premium-theme-toggle{justify-self:start}
  #quickAddBtn{justify-self:end}
  .view{padding:12px 14px 28px}
  .card{border-radius:18px;padding:16px}
  .section-head{gap:10px;align-items:flex-start}
  .section-head h2{font-size:1.15rem}
  .section-head h3{font-size:.98rem}
  .grid,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .grid.cols-5,
  .integration-shell,
  .wizard-wrap,
  .media-primary-grid,
  .media-secondary-row,
  .daily-advisor-brief{
    grid-template-columns:1fr!important;
  }
  .span-2{grid-column:auto!important}
  .integration-left{
    position:relative;
    top:auto;
    max-height:none;
  }
  .integration-nav-list{
    display:flex;
    overflow-x:auto;
    gap:10px;
    padding-bottom:6px;
    scroll-snap-type:x mandatory;
  }
  .integration-nav-item{
    flex:0 0 min(78vw,280px);
    scroll-snap-align:start;
  }
  .daily-advisor-actions{padding:12px}
  .advisor-priority-grid{grid-template-columns:1fr!important}
  .advisor-drawer{
    width:100vw;
    max-width:100vw;
    border-radius:0;
  }
  .advisor-drawer-backdrop{align-items:stretch;justify-content:flex-end}
  .advisor-chat-form{grid-template-columns:1fr}
  .modal{
    width:min(94vw,620px);
    max-height:88dvh;
    overflow:auto;
  }
  .form-grid,
  .integration-field-grid,
  .compact-media-fields,
  .filter-grid,
  .column-grid{
    grid-template-columns:1fr!important;
  }
  .table-tools{gap:12px}
  .filter-grid{gap:10px}
  .table-wrap{
    overflow:visible;
    border:0;
  }
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table td{
    display:block;
    width:100%;
  }
  .data-table thead{display:none}
  .data-table tbody{
    display:grid;
    gap:12px;
  }
  .data-table tr{
    border:1px solid var(--line);
    border-radius:18px;
    padding:12px;
    background:rgba(255,255,255,.03);
  }
  [data-theme="light"] .data-table tr{background:rgba(255,255,255,.68)}
  .data-table td{
    border:0!important;
    padding:8px 0!important;
    display:grid;
    grid-template-columns:minmax(92px,35%) minmax(0,1fr);
    gap:10px;
    align-items:start;
    white-space:normal!important;
    word-break:break-word;
  }
  .data-table td::before{
    content:attr(data-label);
    font-size:.68rem;
    text-transform:uppercase;
    letter-spacing:.12em;
    color:var(--gold);
    font-weight:900;
    line-height:1.25;
  }
  .data-table td[data-col="actions"]{
    display:block;
    padding-top:12px!important;
  }
  .data-table td[data-col="actions"]::before{display:none}
  .row-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }
  .row-actions .btn{
    flex:1 1 auto;
    min-width:84px;
  }
  .media-channel-strip{
    align-items:flex-start;
    flex-wrap:wrap;
    padding:14px;
  }
  .media-strip-badges{
    width:100%;
    margin-left:0;
    justify-content:flex-start;
  }
  .media-advisor-messages{
    min-height:260px;
    max-height:360px;
  }
  .media-advisor-form{grid-template-columns:1fr}
  .media-prompt-chips .btn{flex:1 1 calc(50% - 8px)}
  .wizard-side{
    position:relative;
    top:auto;
    max-height:none;
  }
  .step-arrow{min-height:auto}
}

@media (max-width: 520px){
  body{padding-top:56px}
  .mobile-appbar{height:56px}
  .mobile-brand-mini strong{font-size:.82rem}
  .advisor-logo-btn,.mobile-menu-btn{width:38px;height:38px;border-radius:13px}
  .topbar{padding:14px 10px 8px}
  .view{padding:10px 10px 24px}
  .compact-top-actions{grid-template-columns:1fr}
  #quickAddBtn,.premium-theme-toggle{width:100%;justify-self:stretch}
  .premium-theme-toggle{display:grid;grid-template-columns:1fr 1fr}
  .premium-theme-toggle button{width:100%}
  .btn{width:auto;max-width:100%}
  #quickAddBtn{width:100%}
  .card{padding:14px;border-radius:16px}
  .kpi h2{font-size:1.65rem}
  .daily-advisor-main{flex-direction:column}
  .advisor-orb{width:42px;height:42px;border-radius:15px}
  .media-prompt-chips .btn{flex:1 1 100%}
  .data-table td{grid-template-columns:1fr;gap:4px}
  .data-table td::before{margin-bottom:2px}
  .brand-block{padding-right:36px}
  .focus-card,.user-card{display:none}
}


/* Responsive breakpoint refinement: desktop, mid, tablet, mobile */
@media (min-width: 1281px){
  .app-shell{grid-template-columns:304px minmax(0,1fr)}
  .sidebar{width:auto}
}

/* Mid-size laptop/tablet landscape: avoid the awkward half-sidebar squeeze */
@media (min-width: 921px) and (max-width: 1280px){
  body{padding-top:0}
  .app-shell{
    grid-template-columns:92px minmax(0,1fr);
  }
  .sidebar{
    width:92px;
    padding:18px 12px;
    gap:16px;
    align-items:center;
    overflow-x:hidden;
  }
  .brand-block{
    width:100%;
    justify-content:center;
    padding:0 0 14px;
  }
  .brand-block > div:not(.brand-mark){
    display:none;
  }
  .brand-mark{
    width:52px;
    height:52px;
    border-radius:18px;
  }
  .nav{
    width:100%;
    gap:12px;
  }
  .nav-group{
    width:100%;
    display:grid;
    justify-items:center;
    gap:9px;
  }
  .nav-heading{
    display:none;
  }
  .nav-btn{
    width:56px;
    height:56px;
    padding:0;
    display:grid;
    place-items:center;
    border-radius:18px;
    position:relative;
    overflow:visible;
  }
  .nav-btn span:not(.nav-ico){
    display:none;
  }
  .nav-ico{
    margin:0;
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:13px;
    font-size:.86rem;
  }
  .nav-btn.active{
    background:rgba(47,122,87,.26);
    border:1px solid rgba(200,162,74,.55);
    box-shadow:0 0 0 1px rgba(200,162,74,.08), 0 14px 34px rgba(0,0,0,.16);
  }
  .nav-btn.active::after{
    content:'';
    position:absolute;
    right:-12px;
    top:50%;
    transform:translateY(-50%);
    width:3px;
    height:30px;
    border-radius:999px;
    background:var(--gold);
  }
  .nav-btn::before{
    content:attr(aria-label);
    position:absolute;
    left:calc(100% + 12px);
    top:50%;
    transform:translateY(-50%) translateX(-4px);
    opacity:0;
    pointer-events:none;
    white-space:nowrap;
    background:var(--panel);
    color:var(--text);
    border:1px solid var(--line-strong);
    border-radius:999px;
    padding:7px 10px;
    box-shadow:var(--shadow);
    transition:var(--ease);
    z-index:30;
    font-size:.76rem;
  }
  .nav-btn:hover::before{
    opacity:1;
    transform:translateY(-50%) translateX(0);
  }
  .focus-card,
  .user-card{
    display:none;
  }
  .main{
    min-width:0;
  }
  .topbar{
    padding:24px 24px 12px;
    gap:18px;
  }
  .title-wrap h1{
    font-size:clamp(2rem,3.6vw,3.2rem);
  }
  .compact-top-actions{
    flex-wrap:wrap;
    justify-content:flex-end;
    max-width:560px;
  }
  .site-search{
    width:min(100%,360px);
  }
  .view{
    padding:16px 24px 34px;
  }
  .grid.cols-5{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .grid.cols-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .grid.cols-3{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .grid.cols-3 > .span-2{
    grid-column:span 2;
  }
  .integration-shell{
    grid-template-columns:280px minmax(0,1fr);
  }
  .media-primary-grid{
    grid-template-columns:minmax(0,1fr);
  }
  .media-secondary-row{
    grid-template-columns:1fr;
  }
}

/* Small laptop / large tablet: use mobile drawer earlier */
@media (max-width: 920px){
  .sidebar{
    transform:translateX(-105%) !important;
  }
  body.mobile-nav-open .sidebar{
    transform:translateX(0) !important;
  }
}

/* Medium-narrow safeguard before full mobile */
@media (min-width: 921px) and (max-width: 1050px){
  .topbar{
    display:block;
  }
  .compact-top-actions{
    margin-top:14px;
    justify-content:flex-start;
    max-width:none;
  }
  .site-search{
    width:min(100%,420px);
  }
}

/* Ultra-wide polish */
@media (min-width: 1600px){
  .view{
    max-width:1520px;
    margin:0 auto;
    width:100%;
  }
}


.source-intel-card{ margin-bottom:16px; }
.source-intel-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.source-intel-grid > div{
  min-width:0;
  border:1px solid rgba(198,162,74,.18);
  border-radius:16px;
  padding:13px;
  background:rgba(255,255,255,.03);
}
[data-theme="light"] .source-intel-grid > div{ background:rgba(255,255,255,.64); }
.source-intel-grid strong{
  display:block;
  font-size:.94rem;
  margin:4px 0 5px;
}
.source-intel-grid p{
  margin:0;
  font-size:.78rem;
  line-height:1.4;
}
@media (max-width: 920px){
  .source-intel-grid{grid-template-columns:1fr;}
}


/* Favicon/logo advisor polish + less intrusive drawer */
.advisor-drawer-backdrop{
  align-items:center;
  justify-content:flex-end;
  padding:22px;
  overflow:hidden;
}
.advisor-drawer{
  height:auto;
  max-height:min(82dvh,760px);
  width:min(500px, calc(100vw - 44px));
  border-radius:24px;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  box-shadow:0 34px 100px rgba(0,0,0,.46);
}
.advisor-drawer-head{
  align-items:center;
  padding:16px 16px 12px;
}
.advisor-drawer-head > div{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.advisor-mini-brand{
  width:38px;
  height:38px;
  border-radius:14px;
  border:1px solid rgba(198,162,74,.58);
  color:var(--gold);
  display:grid;
  place-items:center;
  background:linear-gradient(145deg, rgba(14,64,42,.96), rgba(5,23,17,.96));
  flex:0 0 auto;
}
.advisor-mini-brand span{
  font-family:Georgia,serif;
  font-weight:900;
  font-size:1.05rem;
}
.advisor-messages{
  overflow:auto;
  scrollbar-width:none;
  padding:14px 16px;
  gap:11px;
}
.advisor-messages::-webkit-scrollbar,
.media-advisor-messages::-webkit-scrollbar{
  width:0;
  height:0;
}
.advisor-msg{
  max-width:92%;
}
.advisor-msg.assistant{
  align-self:flex-start;
}
.advisor-msg.user{
  align-self:flex-end;
}
.advisor-msg div,
.advisor-msg p{
  margin:0;
}
.advisor-msg h4{
  margin:.15rem 0 .45rem;
  font-size:.82rem;
  color:var(--gold);
  letter-spacing:.08em;
  text-transform:uppercase;
}
.advisor-msg ul{
  margin:.25rem 0 .35rem;
  padding-left:1.15rem;
}
.advisor-msg li{
  margin:.22rem 0;
}
.advisor-chat-form{
  padding:12px 16px 16px;
  border-top:1px solid var(--line);
  background:rgba(0,0,0,.08);
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
}
[data-theme="light"] .advisor-chat-form{
  background:rgba(255,255,255,.55);
}
.advisor-chat-form textarea{
  min-height:54px;
  max-height:120px;
  resize:vertical;
  border-radius:16px;
  background:var(--input);
  color:var(--text);
  border:1px solid var(--line-strong);
  padding:12px 13px;
}
.advisor-chat-form .btn{
  min-height:54px;
  border-radius:16px;
}
.mobile-only-theme{
  display:none;
}
@media (max-width: 920px){
  .top-actions .premium-theme-toggle{
    display:none !important;
  }
  .mobile-only-theme{
    display:block;
    border:1px solid var(--line);
    border-radius:18px;
    padding:12px;
    background:rgba(255,255,255,.035);
  }
  .mobile-only-theme .premium-theme-toggle{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }
  .mobile-only-theme .premium-theme-toggle button{
    width:100%;
  }
  .advisor-drawer-backdrop{
    align-items:flex-end;
    padding:12px;
  }
  .advisor-drawer{
    width:100%;
    max-height:78dvh;
    border-radius:22px;
  }
}
@media (max-width: 520px){
  .advisor-drawer-backdrop{
    padding:8px;
  }
  .advisor-drawer{
    max-height:76dvh;
    border-radius:20px;
  }
  .advisor-chat-form{
    grid-template-columns:1fr;
  }
  .advisor-chat-form .btn{
    min-height:42px;
  }
}


/* Advisor drawer repair: visible chat, proper close position, strong site-styled container */
.advisor-drawer-backdrop{
  position:fixed !important;
  inset:0 !important;
  z-index:1300 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  padding:24px !important;
  background:rgba(0,0,0,.46) !important;
  backdrop-filter:blur(6px) !important;
  overflow:hidden !important;
}
.advisor-drawer{
  width:min(520px, calc(100vw - 48px)) !important;
  height:min(78dvh, 720px) !important;
  max-height:min(78dvh, 720px) !important;
  display:flex !important;
  flex-direction:column !important;
  border:1px solid rgba(200,162,74,.42) !important;
  border-radius:28px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(200,162,74,.13), transparent 28%),
    linear-gradient(180deg, var(--panel), var(--bg)) !important;
  box-shadow:
    0 0 0 1px rgba(200,162,74,.10),
    0 30px 90px rgba(0,0,0,.48) !important;
  overflow:hidden !important;
}
[data-theme="light"] .advisor-drawer{
  background:
    radial-gradient(circle at 18% 0%, rgba(184,142,50,.15), transparent 28%),
    linear-gradient(180deg, var(--panel), var(--bg-2)) !important;
}
.advisor-drawer-head{
  position:relative !important;
  min-height:84px !important;
  padding:18px 20px 16px 72px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  border-bottom:1px solid rgba(200,162,74,.25) !important;
  flex:0 0 auto !important;
}
.advisor-drawer-head > div{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
}
.advisor-mini-brand{
  width:38px !important;
  height:38px !important;
  border-radius:14px !important;
  border:1px solid rgba(200,162,74,.66) !important;
  color:var(--gold) !important;
  display:grid !important;
  place-items:center !important;
  background:linear-gradient(145deg, rgba(14,64,42,.96), rgba(5,23,17,.96)) !important;
  flex:0 0 auto !important;
}
.advisor-drawer-head h3{
  margin:0 !important;
  font-size:1.12rem !important;
}
.advisor-close-btn{
  position:absolute !important;
  top:18px !important;
  left:20px !important;
  width:38px !important;
  height:38px !important;
  border-radius:14px !important;
  border:1px solid rgba(200,162,74,.42) !important;
  background:rgba(255,255,255,.04) !important;
  color:var(--text) !important;
  display:grid !important;
  place-items:center !important;
  z-index:2 !important;
}
.advisor-close-btn:hover{
  background:rgba(200,162,74,.12) !important;
  border-color:var(--gold) !important;
}
.advisor-messages{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:16px 20px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
  scrollbar-width:none !important;
}
.advisor-messages::-webkit-scrollbar{width:0!important;height:0!important;}
.advisor-msg{
  max-width:92% !important;
  border:1px solid rgba(200,162,74,.16) !important;
  border-radius:18px !important;
  padding:12px 13px !important;
  background:rgba(255,255,255,.04) !important;
  color:var(--text) !important;
  line-height:1.48 !important;
  font-size:.86rem !important;
}
.advisor-msg.assistant{align-self:flex-start !important;}
.advisor-msg.user{
  align-self:flex-end !important;
  background:rgba(47,122,87,.23) !important;
  border-color:rgba(85,185,133,.28) !important;
}
.advisor-chat-form{
  flex:0 0 auto !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:10px !important;
  align-items:end !important;
  padding:14px 20px 18px !important;
  border-top:1px solid rgba(200,162,74,.25) !important;
  background:rgba(0,0,0,.13) !important;
}
[data-theme="light"] .advisor-chat-form{background:rgba(255,255,255,.58)!important;}
.advisor-chat-form textarea{
  display:block !important;
  width:100% !important;
  min-height:54px !important;
  max-height:130px !important;
  resize:vertical !important;
  border-radius:17px !important;
  border:1px solid rgba(200,162,74,.32) !important;
  background:var(--input) !important;
  color:var(--text) !important;
  padding:12px 13px !important;
  outline:none !important;
}
.advisor-chat-form textarea:focus{
  border-color:var(--gold) !important;
  box-shadow:0 0 0 3px rgba(200,162,74,.12) !important;
}
.advisor-chat-form .btn{
  min-height:54px !important;
  border-radius:17px !important;
  padding:0 18px !important;
}
@media (max-width: 920px){
  .advisor-drawer-backdrop{
    align-items:flex-end !important;
    padding:12px !important;
  }
  .advisor-drawer{
    width:100% !important;
    height:min(76dvh, 680px) !important;
    max-height:min(76dvh, 680px) !important;
    border-radius:24px !important;
  }
}
@media (max-width: 520px){
  .advisor-drawer-backdrop{padding:8px !important;}
  .advisor-drawer{
    height:76dvh !important;
    max-height:76dvh !important;
    border-radius:22px !important;
  }
  .advisor-drawer-head{
    min-height:78px !important;
    padding:16px 16px 14px 64px !important;
  }
  .advisor-close-btn{
    top:16px !important;
    left:16px !important;
    width:36px !important;
    height:36px !important;
  }
  .advisor-chat-form{
    grid-template-columns:1fr !important;
    padding:12px 16px 16px !important;
  }
  .advisor-chat-form .btn{
    min-height:42px !important;
  }
}


/* Advisor drawer hard reset using unique KGC classes */
.kgc-advisor-backdrop{
  position:fixed !important;
  inset:0 !important;
  z-index:2000 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  padding:28px !important;
  background:rgba(0,0,0,.46) !important;
  backdrop-filter:blur(6px) !important;
  overflow:hidden !important;
}
.kgc-advisor-window{
  position:relative !important;
  width:min(520px, calc(100vw - 56px)) !important;
  height:min(78dvh, 720px) !important;
  max-height:min(78dvh, 720px) !important;
  min-height:460px !important;
  display:flex !important;
  flex-direction:column !important;
  border:1px solid rgba(200,162,74,.52) !important;
  border-radius:30px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(200,162,74,.13), transparent 30%),
    linear-gradient(180deg, var(--panel), var(--bg)) !important;
  box-shadow:
    0 0 0 1px rgba(200,162,74,.11),
    0 32px 100px rgba(0,0,0,.50) !important;
  overflow:hidden !important;
}
[data-theme="light"] .kgc-advisor-window{
  background:
    radial-gradient(circle at 18% 0%, rgba(184,142,50,.15), transparent 30%),
    linear-gradient(180deg, var(--panel), var(--bg-2)) !important;
}
.kgc-advisor-close{
  position:absolute !important;
  top:18px !important;
  left:18px !important;
  z-index:5 !important;
  width:40px !important;
  height:40px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:15px !important;
  border:1px solid rgba(200,162,74,.46) !important;
  background:rgba(255,255,255,.045) !important;
  color:var(--text) !important;
  font-size:1.25rem !important;
  line-height:1 !important;
}
.kgc-advisor-close:hover{
  background:rgba(200,162,74,.12) !important;
  border-color:var(--gold) !important;
}
.kgc-advisor-header{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  flex:0 0 auto !important;
  min-height:92px !important;
  padding:20px 20px 17px 76px !important;
  border-bottom:1px solid rgba(200,162,74,.25) !important;
}
.kgc-advisor-title{
  min-width:0 !important;
}
.kgc-advisor-title h3{
  margin:0 !important;
  font-size:1.15rem !important;
  line-height:1.1 !important;
}
.kgc-advisor-messages{
  display:flex !important;
  flex-direction:column !important;
  flex:1 1 auto !important;
  gap:12px !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain !important;
  padding:18px 20px !important;
  scrollbar-width:none !important;
}
.kgc-advisor-messages::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
}
.kgc-advisor-msg{
  display:block !important;
  max-width:92% !important;
  border:1px solid rgba(200,162,74,.17) !important;
  border-radius:18px !important;
  padding:12px 13px !important;
  background:rgba(255,255,255,.045) !important;
  color:var(--text) !important;
  font-size:.86rem !important;
  line-height:1.48 !important;
}
.kgc-advisor-msg.assistant{align-self:flex-start !important;}
.kgc-advisor-msg.user{
  align-self:flex-end !important;
  background:rgba(47,122,87,.23) !important;
  border-color:rgba(85,185,133,.30) !important;
}
.kgc-advisor-form{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  flex:0 0 auto !important;
  flex-shrink:0 !important;
  gap:10px !important;
  align-items:end !important;
  padding:14px 20px 18px !important;
  border-top:1px solid rgba(200,162,74,.25) !important;
  background:rgba(0,0,0,.13) !important;
}

/* Shared card, Settings, light-theme, and short-viewport shell refinements. */
.kpi-icon{
  display:none!important;
}
.card.decor::before,
.card.decor::after{
  content:none!important;
  display:none!important;
}
.settings-grid{
  align-items:start;
}
.settings-grid .ai-config-card,
.settings-grid .train-ai-card{
  min-height:100%;
}
.settings-link-grid-single{
  grid-template-columns:minmax(180px,320px);
}
.ai-training-form{
  display:grid;
  gap:12px;
  margin-top:18px;
}
.ai-training-form input[type="file"]{
  padding:9px;
}
.field-helper{
  margin:7px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.ai-training-actions{
  display:flex;
  justify-content:flex-end;
}
.ai-training-list{
  display:grid;
  gap:8px;
  margin-top:16px;
}
.ai-training-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--input);
}
.ai-training-item>div{
  min-width:0;
}
.ai-training-item strong,
.ai-training-item span{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ai-training-item span,
.ai-training-empty{
  color:var(--muted);
  font-size:12px;
}
.ai-training-item span{
  margin-top:3px;
}
.ai-training-empty{
  margin-top:16px;
  padding:14px;
  border:1px dashed var(--line);
  border-radius:8px;
}
html[data-theme="light"] .nav-btn.active,
html[data-theme="light"] .nav-btn.active>span,
html[data-theme="light"] body.client-portal-mode .portal-menu-link.nav-btn.active,
html[data-theme="light"] body.client-portal-mode .portal-menu-link.nav-btn.active>span{
  color:#fff!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .client-portal-view.client-portal-view .card.card,
html[data-theme="light"] body.client-portal-mode :is(
  .product-selector-panel,
  .product-detail-panel,
  .product-access-details-card,
  .product-reference-image-card,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .portal-course-side,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .client-video-intro,
  .payment-mini-card
){
  background:linear-gradient(145deg,var(--panel),var(--panel-2))!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
  box-shadow:var(--shadow)!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .client-portal-view.client-portal-view .card.card :is(h1,h2,h3,h4,strong,p,li),
html[data-theme="light"] body.client-portal-mode :is(.product-selector-panel,.product-detail-panel,.product-selector-item,.product-start-card,.product-upgrade-strip,.portal-course-side,.portal-video-module,.lesson-panel,.portal-quiz,.portal-check-item,.portal-why-check-item,.readiness-card,.portal-review-card,.archetype-card,.client-video-intro,.payment-mini-card) :is(h1,h2,h3,h4,strong,p,li){
  color:inherit!important;
}
@media(min-width:981px){
  .app-shell>.sidebar,
  body:not(.client-portal-mode) .app-shell>.sidebar,
  body.client-portal-mode .app-shell>.sidebar,
  body.client-portal-mode .app-shell>.client-only-sidebar.sidebar{
    position:sticky!important;
    top:0!important;
    height:100vh!important;
    min-height:0!important;
    max-height:100vh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }
  .app-shell>.sidebar::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }
}

/* Shared progress, modal, product evidence, support, and readiness refinements. */
.progress-track,
.shared-progress-track{
  position:relative;
  width:100%;
  height:8px!important;
  margin-top:8px!important;
  overflow:hidden;
  border:0;
  border-radius:999px;
  background:rgba(128,128,128,.20)!important;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.22);
}
body.client-portal-mode #portal-home .progress-track{
  height:8px!important;
  margin-top:8px!important;
}
.progress-track>span,
.shared-progress-track>span{
  display:block!important;
  width:0;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:linear-gradient(90deg,var(--green-2),var(--gold))!important;
  box-shadow:0 0 14px rgba(85,185,133,.24);
  transition:width 420ms cubic-bezier(.2,.8,.2,1);
}
html[data-theme="light"] .progress-track,
html[data-theme="light"] .shared-progress-track{
  background:rgba(26,63,46,.16)!important;
}
.ai-training-progress-wrap{display:grid;gap:7px;}
.ai-training-progress{margin-top:0!important;}
.ai-training-progress-label{min-height:18px;color:var(--muted);font-size:12px;line-height:1.4;}
.ai-training-progress-label:empty{visibility:hidden;}
.ai-training-progress-label.not-connected{color:var(--red);}

.modal-backdrop{
  display:grid;
  place-items:center!important;
  align-items:center!important;
  padding:18px!important;
  overflow:hidden!important;
}
.modal{
  display:flex!important;
  flex-direction:column;
  width:min(680px,calc(100vw - 36px))!important;
  height:auto!important;
  max-height:calc(100dvh - 36px)!important;
  overflow:hidden!important;
}
.modal-head{flex:0 0 auto;}
.modal-body{
  min-height:0;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
}
.media-preview-open .modal{
  width:min(1240px,calc(100vw - 36px))!important;
  animation:performancePreviewIn 320ms cubic-bezier(.2,.8,.2,1) both;
}
.performance-image-modal{display:grid;gap:10px;margin:0;}
.performance-image-modal img{
  display:block;
  width:100%;
  max-height:calc(100dvh - 190px);
  object-fit:contain;
  border:1px solid var(--line);
  border-radius:8px;
  background:#020805;
}
.performance-image-modal figcaption{color:var(--muted);font-size:12px;text-align:center;}
@keyframes performancePreviewIn{
  from{opacity:0;transform:scale(.88) translateY(12px);}
  to{opacity:1;transform:scale(1) translateY(0);}
}

body.client-portal-mode .performance-image-frame{position:relative;min-width:0;overflow:hidden;}
body.client-portal-mode .performance-image-frame>img{display:block;width:100%;}
body.client-portal-mode .performance-enlarge-btn{
  position:absolute;
  right:12px;
  bottom:12px;
  z-index:2;
  min-height:34px;
  padding:7px 11px;
  border:1px solid rgba(225,191,99,.62);
  border-radius:8px;
  background:rgba(2,12,8,.88);
  color:#fff8e7;
  box-shadow:0 10px 26px rgba(0,0,0,.28);
  font-size:11px;
  font-weight:900;
  backdrop-filter:blur(8px);
}
body.client-portal-mode .performance-enlarge-btn:hover,
body.client-portal-mode .performance-enlarge-btn:focus-visible{background:var(--green);border-color:var(--gold);}
body.client-portal-mode .performance-evidence-groups{display:grid;gap:9px;}
body.client-portal-mode .performance-evidence-row{
  display:grid;
  grid-template-columns:minmax(245px,.42fr) minmax(0,1fr);
  gap:12px;
  align-items:center;
  min-width:0;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(128,128,128,.04);
}
body.client-portal-mode .performance-evidence-row>span{
  color:var(--text);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
body.client-portal-mode .performance-evidence-row .performance-evidence-tabs{padding:0;}
body.client-portal-mode .performance-net{
  max-width:100%;
  font-size:34px;
  line-height:1;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

body.client-portal-mode .old-support-clone.support-chat-card{
  display:flex!important;
  flex-direction:column;
  width:100%!important;
  max-width:1040px!important;
  height:calc(100dvh - 120px)!important;
  min-height:700px!important;
  max-height:900px!important;
  overflow:hidden!important;
}
body.client-portal-mode .old-support-clone .section-head.compact{flex:0 0 auto;}
body.client-portal-mode .old-support-clone .support-open-chat{
  display:flex!important;
  flex:1 1 auto;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}
body.client-portal-mode .old-support-clone .support-chat-messages{
  flex:1 1 auto;
  min-height:330px!important;
  max-height:none!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
}
body.client-portal-mode .old-support-clone .support-quick-questions,
body.client-portal-mode .old-support-clone textarea,
body.client-portal-mode .old-support-clone .support-send-row,
body.client-portal-mode .old-support-clone .support-secondary-row{flex:0 0 auto;}

body.client-portal-mode .readiness-journey-card{
  display:grid;
  gap:28px;
  padding:28px;
  text-align:center;
  overflow:hidden;
}
body.client-portal-mode .readiness-journey-head{display:grid;justify-items:center;gap:8px;max-width:720px;margin:0 auto;width:100%;}
body.client-portal-mode .readiness-journey-head h2{margin:2px 0 0;font-family:var(--font-display);font-size:56px;line-height:1;}
body.client-portal-mode .readiness-journey-head p{margin:0;color:var(--muted);line-height:1.45;}
body.client-portal-mode .readiness-journey-head .progress-track{max-width:580px;margin-top:8px!important;}
body.client-portal-mode .readiness-path{
  position:relative;
  display:grid;
  grid-template-columns:repeat(3,minmax(128px,1fr)) minmax(128px,.9fr);
  gap:18px;
  align-items:start;
  width:100%;
  max-width:980px;
  margin:0 auto;
}
body.client-portal-mode .readiness-path::before{
  content:"";
  position:absolute;
  top:57px;
  left:10%;
  right:10%;
  height:2px;
  background:linear-gradient(90deg,var(--green-2),var(--gold));
  opacity:.42;
}
body.client-portal-mode .readiness-path-step,
body.client-portal-mode .readiness-path-goal{
  position:relative;
  z-index:1;
  display:grid;
  justify-items:center;
  gap:9px;
  min-width:0;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:center;
}
body.client-portal-mode .readiness-path-step{cursor:pointer;}
body.client-portal-mode .readiness-step-number{color:var(--gold);font-size:10px;font-weight:950;letter-spacing:.14em;}
body.client-portal-mode .readiness-node-ring,
body.client-portal-mode .readiness-goal-mark{
  position:relative;
  display:grid;
  place-items:center;
  width:96px;
  height:96px;
  margin:0!important;
  border-radius:50%;
  background:conic-gradient(var(--green-2) calc(var(--readiness-progress) * 1%),rgba(128,128,128,.20) 0);
  box-shadow:0 14px 34px rgba(0,0,0,.18);
}
body.client-portal-mode .readiness-node-ring::before{
  content:"";
  position:absolute;
  inset:8px;
  border-radius:50%;
  background:var(--panel);
  border:1px solid var(--line);
}
body.client-portal-mode .readiness-node-ring>strong{position:relative;z-index:1;font-family:var(--font-display);font-size:23px;}
body.client-portal-mode .readiness-path-step.is-complete .readiness-node-ring{background:var(--green-2);}
body.client-portal-mode .readiness-step-copy{display:grid!important;gap:3px;margin:0!important;}
body.client-portal-mode .readiness-step-copy>strong{font-family:var(--font-display);font-size:20px;}
body.client-portal-mode .readiness-step-copy>small{color:var(--muted);font-size:11px;text-transform:uppercase;font-weight:850;}
body.client-portal-mode .readiness-goal-mark{
  margin-top:22px!important;
  background:linear-gradient(145deg,var(--gold-2),var(--gold));
  color:#0b1a12;
  font-size:28px;
  font-weight:950;
}
body.client-portal-mode .readiness-path-goal>span:last-child{display:grid;gap:3px;margin:0!important;}
body.client-portal-mode .readiness-path-goal small{color:var(--gold);font-size:10px;text-transform:uppercase;font-weight:950;letter-spacing:.14em;}
body.client-portal-mode .readiness-path-goal strong{font-family:var(--font-display);font-size:20px;}
body.client-portal-mode .readiness-path-goal.is-unlocked .readiness-goal-mark{background:var(--green-2);color:#fff;}
body.client-portal-mode .readiness-goal-panel{
  display:grid;
  justify-items:center;
  gap:14px;
  padding-top:22px;
  border-top:1px solid var(--line);
}
body.client-portal-mode .readiness-goal-panel h3{margin:5px 0 0;font-family:var(--font-display);font-size:27px;}
body.client-portal-mode .readiness-benefits{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;}
body.client-portal-mode .readiness-benefits span{margin:0!important;padding:7px 10px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:11px;font-weight:800;}
body.client-portal-mode .readiness-action-btn{min-width:180px;}

@media(max-width:900px){
  body.client-portal-mode .performance-evidence-row{grid-template-columns:1fr;}
  body.client-portal-mode .performance-evidence-row>span{white-space:normal;}
  body.client-portal-mode .readiness-path{overflow-x:auto;grid-template-columns:repeat(4,minmax(145px,1fr));padding:0 4px 12px;scrollbar-width:none;}
  body.client-portal-mode .readiness-path::-webkit-scrollbar{display:none;}
}
@media(max-width:620px){
  .modal-backdrop{padding:10px!important;}
  .modal{width:calc(100vw - 20px)!important;max-height:calc(100dvh - 20px)!important;}
  .media-preview-open .modal{width:calc(100vw - 20px)!important;}
  body.client-portal-mode .performance-net{font-size:30px;}
  body.client-portal-mode .readiness-journey-card{padding:20px 14px;gap:22px;}
  body.client-portal-mode .readiness-journey-head h2{font-size:42px;}
}
@media(max-height:820px){
  body.client-portal-mode .old-support-clone.support-chat-card{height:calc(100dvh - 86px)!important;min-height:0!important;max-height:calc(100dvh - 86px)!important;}
  body.client-portal-mode .old-support-clone .support-chat-messages{min-height:210px!important;}
}

.client-source-code{
  display:inline-grid;
  place-items:center;
  width:24px;
  height:24px;
  border:1px solid rgba(200,162,74,.42);
  border-radius:8px;
  background:rgba(200,162,74,.12);
  color:var(--gold-2);
  font-size:11px;
  font-weight:950;
  line-height:1;
}

/* Mission Control is a summary workspace, modeled after the left-nav training layout. */
body.mission-control-mode .mission-control-content{grid-template-columns:260px minmax(0,1fr)!important;align-items:start;}
body.mission-control-mode .mission-section-nav{display:grid!important;gap:8px;align-content:start;position:sticky;top:18px;}
body.mission-control-mode .mission-section-nav h2{font-family:var(--font-display);font-size:28px;line-height:1.08;margin:0;}
body.mission-control-mode .mission-section-nav .mission-nav-link{width:100%;}
body.mission-control-mode .mission-workspace{min-width:0;display:grid;gap:16px;}
body.mission-control-mode .mission-settings-link{margin-top:10px;justify-content:center;}
body.mission-control-mode .mission-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
body.mission-control-mode .mission-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
body.mission-control-mode .mission-action-card{display:grid;gap:9px;text-align:left;align-content:start;min-height:160px;color:var(--text);cursor:pointer;}
body.mission-control-mode .mission-action-card strong{font-size:18px;line-height:1.35;}
body.mission-control-mode .mission-action-card>span:last-child{color:var(--gold);font-size:12px;font-weight:850;text-transform:uppercase;margin-top:auto;}
.email-drip-studio{display:grid;gap:16px;}
.email-drip-campaigns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.email-drip-card{display:grid;gap:14px;align-content:start;}
.email-drip-card textarea{min-height:120px;}
.email-drip-tabs{width:max-content;max-width:100%}
.email-touchpoint-map{display:grid;gap:18px}
.email-touchpoint-journey{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
.email-touchpoint-stage{display:grid;gap:10px;min-width:0}
.email-touchpoint-stage-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 4px;color:var(--gold-2);font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.email-touchpoint-stage-head strong{display:grid;place-items:center;min-width:24px;height:24px;border:1px solid var(--border);border-radius:50%;color:var(--text);letter-spacing:0}
.email-touchpoint-list{display:grid;gap:10px}
.email-touchpoint-item{display:grid;gap:12px;padding:16px;border:1px solid var(--border);border-radius:8px;background:var(--panel);min-width:0}
.email-touchpoint-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.email-touchpoint-title h3{font-size:17px;overflow-wrap:anywhere}
.email-touchpoint-item dl{display:grid;gap:9px;margin:0}.email-touchpoint-item dl div{display:grid;gap:2px;min-width:0}.email-touchpoint-item dt{color:var(--gold-2);font-size:9px;font-weight:900;letter-spacing:.11em;text-transform:uppercase}.email-touchpoint-item dd{margin:0;color:var(--muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.touchpoint-implemented{border-color:color-mix(in srgb,var(--success) 55%,var(--border))}.touchpoint-gated{border-color:var(--gold)}.touchpoint-disabled{opacity:.8}
@media(max-width:1100px){.email-touchpoint-journey{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.email-touchpoint-journey{grid-template-columns:1fr}.email-drip-tabs{width:100%}.email-drip-tabs .client-hub-tab{flex:1}}
@media(max-width:980px){body.mission-control-mode .mission-control-content{grid-template-columns:1fr!important;}body.mission-control-mode .mission-section-nav{position:static;}.email-drip-campaigns,body.mission-control-mode .mission-summary-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:640px){body.mission-control-mode .mission-summary-grid,body.mission-control-mode .mission-action-grid,.email-drip-campaigns{grid-template-columns:1fr;}}

/* Production-safe platform loading veil. It prevents partially hydrated client views from flashing. */
.platform-boot-loader{
  position:fixed;
  inset:0;
  z-index:20000;
  display:grid;
  place-items:center;
  overflow:hidden;
  opacity:0;
  visibility:hidden;
  transition:opacity 220ms ease,visibility 220ms ease;
}
.platform-boot-loader[hidden]{display:none!important;}
.platform-boot-loader.is-visible{opacity:1;visibility:visible;}
.platform-boot-loader-backdrop{
  position:absolute;
  inset:-24px;
  background:rgba(2,16,11,.72);
  backdrop-filter:blur(18px) saturate(.82);
  -webkit-backdrop-filter:blur(18px) saturate(.82);
}
.platform-boot-loader-content{
  position:relative;
  z-index:1;
  display:grid;
  justify-items:center;
  gap:10px;
  padding:34px;
  text-align:center;
  color:var(--cream,#fff8e7);
}
.platform-boot-loader-content strong{
  margin-top:12px;
  font-family:var(--font-display,Georgia,serif);
  font-size:clamp(22px,2.6vw,34px);
  line-height:1.08;
}
.platform-boot-loader-content>span:last-child{
  color:var(--muted,#b8c8bd);
  font-size:14px;
}
.platform-boot-orbits{
  position:relative;
  width:190px;
  height:190px;
  display:grid;
  place-items:center;
}
.platform-boot-logo{
  position:relative;
  z-index:3;
  width:82px;
  height:82px;
  filter:drop-shadow(0 14px 30px rgba(0,0,0,.42)) drop-shadow(0 0 22px rgba(225,191,99,.16));
}
.platform-boot-orbit{
  position:absolute;
  inset:50%;
  border:1px solid rgba(225,191,99,.42);
  border-radius:50%;
  transform-origin:center;
  animation:platformOrbit 2.8s linear infinite;
}
.platform-boot-orbit::after{
  content:"";
  position:absolute;
  width:8px;
  height:8px;
  top:-4px;
  left:50%;
  border-radius:50%;
  background:#e1bf63;
  box-shadow:0 0 14px rgba(225,191,99,.9);
}
.platform-boot-orbit.orbit-one{width:112px;height:112px;margin:-56px;animation-duration:2.2s;}
.platform-boot-orbit.orbit-two{width:148px;height:82px;margin:-41px -74px;animation-duration:3.1s;animation-direction:reverse;transform:rotate(28deg);}
.platform-boot-orbit.orbit-three{width:88px;height:166px;margin:-83px -44px;animation-duration:3.8s;transform:rotate(-32deg);}
@keyframes platformOrbit{to{transform:rotate(360deg);}}
@media(prefers-reduced-motion:reduce){
  .platform-boot-orbit{animation-duration:8s;}
}

/* Hide scrollbar chrome without disabling scroll. */
*{
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}
*::-webkit-scrollbar{
  display:none!important;
  width:0!important;
  height:0!important;
}
@media(prefers-reduced-motion:reduce){
  .progress-track>span,
  .shared-progress-track>span{transition:none;}
  .media-preview-open .modal{animation:none;}
}

/* Shared form controls across Admin, Owner, Manager, Sales, and Client views. */
:where(.app-shell,.modal-backdrop) select{
  appearance:none;
  -webkit-appearance:none;
  padding-right:38px!important;
  background-color:var(--input)!important;
  background-image:
    linear-gradient(45deg,transparent 50%,var(--muted) 50%),
    linear-gradient(135deg,var(--muted) 50%,transparent 50%)!important;
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%!important;
  background-size:5px 5px,5px 5px!important;
  background-repeat:no-repeat!important;
  color:var(--text)!important;
  color-scheme:dark;
}
html[data-theme="light"] :where(.app-shell,.modal-backdrop) select{color-scheme:light;}
:where(.app-shell,.modal-backdrop) select option{
  background:var(--panel);
  color:var(--text);
}
:where(.app-shell,.modal-backdrop) input[type="file"]{
  min-height:48px;
  border:1px dashed var(--line-strong)!important;
  border-radius:8px!important;
  background:var(--input)!important;
  color:var(--muted)!important;
  padding:6px!important;
  font:inherit;
}
:where(.app-shell,.modal-backdrop) input[type="file"]::file-selector-button{
  min-height:34px;
  margin-right:10px;
  border:1px solid rgba(85,185,133,.45);
  border-radius:7px;
  padding:7px 11px;
  background:linear-gradient(135deg,var(--green),var(--green-2));
  color:#fff;
  font:inherit;
  font-weight:900;
  cursor:pointer;
}
:where(.app-shell,.modal-backdrop) input[type="file"]:focus-visible,
:where(.app-shell,.modal-backdrop) select:focus-visible{
  border-color:var(--gold)!important;
  box-shadow:0 0 0 3px rgba(200,162,74,.14)!important;
  outline:0;
}
.results-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;}
.result-client-meta{display:block;margin-top:4px;}
.client-results-table td:first-child{min-width:190px;}
@media(max-width:720px){.results-summary-grid{grid-template-columns:1fr;}}

/* Sales appointment scheduling */
body.appointments-mode #view.view{grid-template-columns:minmax(0,1fr)}body.appointments-mode #view.view>*{min-width:0;max-width:100%}
.schedule-loading-panel{min-height:430px;display:grid;place-content:center;justify-items:center;gap:10px;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:32px;text-align:center}.schedule-loading-panel h3{margin:4px 0 0;font-family:var(--font-display);font-size:28px}.schedule-loading-panel p{max-width:520px;margin:0 0 8px;color:var(--muted);line-height:1.55}.schedule-command-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-shrink:0}.schedule-page-actions{margin:12px 0 16px}.schedule-command-actions .btn{white-space:nowrap}.icon-text-btn span{font-size:17px}.icon-text-btn.is-loading span{animation:schedule-spin .8s linear infinite}@keyframes schedule-spin{to{transform:rotate(360deg)}}
.schedule-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.schedule-kpi{min-height:122px;display:grid;align-content:space-between;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:16px}.schedule-kpi>span{color:var(--gold);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.12em}.schedule-kpi strong{font-family:var(--font-display);font-size:31px;line-height:1}.schedule-kpi strong.schedule-kpi-next{font-family:var(--font-ui);font-size:24px}.schedule-kpi small{color:var(--muted);font-size:12px}
.schedule-connection-strip{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:14px;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:14px 16px}.schedule-connection-strip.is-connected{border-color:rgba(85,185,133,.36)}.schedule-connection-strip.needs-connection{border-color:rgba(216,154,61,.4)}.schedule-connection-icon{width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--line-strong);border-radius:50%;background:var(--chip);color:var(--gold);font-weight:950}.schedule-connection-strip strong{display:block;margin:3px 0 2px}.schedule-connection-strip p{margin:0;color:var(--muted);font-size:13px;line-height:1.4}.schedule-connection-actions{display:flex;justify-content:flex-end}
.schedule-workspace{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(360px,.8fr);gap:16px;align-items:start}.schedule-workspace>*{min-width:0;max-width:100%}.schedule-agenda-panel,.schedule-control-panel,.schedule-control-panel>section,.schedule-settings-form{min-width:0;max-width:100%}.schedule-agenda-panel,.schedule-control-panel>section,.schedule-settings-form{border:1px solid var(--line);border-radius:8px;background:var(--panel)}.schedule-agenda-panel{padding:18px}.schedule-timezone{color:var(--muted);font-size:12px}.schedule-week-strip{display:grid;grid-template-columns:repeat(7,minmax(56px,1fr));gap:7px;overflow-x:auto;padding:2px 0 14px}.schedule-day{min-width:56px;min-height:82px;display:grid;align-content:center;gap:4px;border:1px solid var(--line);border-radius:7px;background:var(--input);color:var(--text);text-align:left;padding:8px}.schedule-day span{color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase}.schedule-day strong{font-size:11px}.schedule-day small{color:var(--muted);font-size:9px}.schedule-day:hover,.schedule-day:focus-visible{border-color:var(--gold)}.schedule-day.active{border-color:var(--green-2);background:var(--green);color:#fff}.schedule-day.active span,.schedule-day.active small{color:rgba(255,255,255,.78)}.schedule-agenda-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding:16px 0 12px;border-top:1px solid var(--line)}.schedule-agenda-head h3{margin:4px 0 0;font-family:var(--font-display);font-size:24px}.schedule-agenda-head>strong{color:var(--muted);font-size:12px}.schedule-appointment-list{display:grid;gap:8px}.schedule-appointment-row{display:grid;grid-template-columns:82px minmax(150px,1fr) minmax(170px,1.1fr) auto;align-items:center;gap:14px;border:1px solid var(--line);border-radius:7px;background:var(--input);padding:13px}.schedule-appointment-row.has-sync-issue{border-color:rgba(228,93,107,.42)}.schedule-time-block strong,.schedule-time-block span,.schedule-attendee strong,.schedule-attendee span,.schedule-attendee small,.schedule-meeting strong,.schedule-meeting span{display:block}.schedule-time-block strong{font-size:15px}.schedule-time-block span,.schedule-attendee span,.schedule-attendee small,.schedule-meeting span{margin-top:3px;color:var(--muted);font-size:11px}.schedule-attendee,.schedule-meeting{min-width:0}.schedule-attendee strong,.schedule-meeting strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.schedule-attendee small{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.schedule-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.schedule-cancel-btn{color:var(--red)!important}.schedule-empty{border-radius:7px;padding:24px}.schedule-command-band .btn:disabled,.schedule-connection-strip .btn:disabled,.schedule-booking-link button:disabled{cursor:not-allowed;opacity:.48;transform:none;box-shadow:none}
.schedule-control-panel{display:grid;gap:16px}.schedule-booking-link,.schedule-settings-form{padding:18px}.schedule-booking-link h3,.schedule-settings-form h3{margin:5px 0 8px;font-family:var(--font-display);font-size:22px}.schedule-booking-link p{margin:0 0 14px;color:var(--muted);font-size:13px;line-height:1.5}.schedule-link-field{display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:7px;margin-bottom:9px}.schedule-link-field input{min-width:0;border:1px solid var(--line);border-radius:7px;background:var(--input);color:var(--text);padding:10px 11px;font-size:12px}.schedule-link-field .icon-btn{width:42px;height:42px;border-radius:7px;font-size:19px}.schedule-booking-link a[aria-disabled="true"]{pointer-events:none;opacity:.5}.schedule-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.schedule-settings-form label,.schedule-modal-form label{display:grid;gap:6px;color:var(--muted);font-size:11px;font-weight:800}.schedule-settings-form label>span,.schedule-modal-form label>span{text-transform:uppercase;letter-spacing:.08em}.schedule-settings-form input,.schedule-settings-form select,.schedule-settings-form textarea,.schedule-modal-form input,.schedule-modal-form select,.schedule-modal-form textarea{width:100%;min-width:0;border:1px solid var(--line);border-radius:7px;background:var(--input);color:var(--text);padding:10px;outline:0}.schedule-settings-form input:focus,.schedule-settings-form select:focus,.schedule-settings-form textarea:focus,.schedule-modal-form input:focus,.schedule-modal-form select:focus,.schedule-modal-form textarea:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(200,162,74,.12)}.schedule-description-field{margin-top:10px}.schedule-description-field textarea{min-height:72px;resize:vertical}.schedule-availability-list{display:grid;gap:6px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}.schedule-availability-row{display:grid;grid-template-columns:minmax(110px,1fr) 90px 18px 90px;align-items:center;gap:7px}.schedule-day-toggle{display:flex!important;grid-template-columns:none!important;align-items:center;gap:7px!important;color:var(--text)!important}.schedule-day-toggle input{width:16px!important;height:16px;margin:0}.schedule-day-toggle span{text-transform:none!important;letter-spacing:0!important;font-size:12px}.schedule-availability-row>span{color:var(--muted);font-size:11px;text-align:center}.schedule-availability-row input[type="time"]{padding:8px;font-size:11px}.schedule-settings-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}.schedule-settings-actions>span{color:var(--muted);font-size:11px;line-height:1.4}
.schedule-modal-form{display:grid;gap:14px}.schedule-modal-date-grid,.schedule-modal-person-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.schedule-modal-person-grid label:last-child{grid-column:1/-1}.schedule-modal-form textarea{min-height:96px;resize:vertical}.schedule-modal-form .form-error{color:var(--red)}
html[data-theme="light"] .schedule-day.active{background:var(--green-2);color:#fff}html[data-theme="light"] .schedule-appointment-row,html[data-theme="light"] .schedule-day,html[data-theme="light"] .schedule-link-field input,html[data-theme="light"] .schedule-settings-form input,html[data-theme="light"] .schedule-settings-form select,html[data-theme="light"] .schedule-settings-form textarea,html[data-theme="light"] .schedule-modal-form input,html[data-theme="light"] .schedule-modal-form select,html[data-theme="light"] .schedule-modal-form textarea{background:#fffdf7}
@media(max-width:1250px){.schedule-workspace{grid-template-columns:minmax(0,1fr)}.schedule-control-panel{grid-template-columns:repeat(2,minmax(0,1fr))}.schedule-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.schedule-command-actions{width:100%;justify-content:flex-start}.schedule-connection-strip{grid-template-columns:42px minmax(0,1fr)}.schedule-connection-actions{grid-column:1/-1;justify-content:flex-start}.schedule-control-panel{grid-template-columns:minmax(0,1fr)}.schedule-appointment-row{grid-template-columns:70px minmax(0,1fr)}.schedule-meeting{grid-column:2}.schedule-row-actions{grid-column:1/-1;justify-content:flex-start}.schedule-settings-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:560px){.schedule-kpi-grid{grid-template-columns:1fr}.schedule-command-actions{align-items:stretch;flex-direction:column}.schedule-week-strip{grid-template-columns:repeat(7,82px)}.schedule-appointment-row{grid-template-columns:1fr}.schedule-meeting,.schedule-row-actions{grid-column:auto}.schedule-time-block{display:flex;gap:8px;align-items:baseline}.schedule-availability-row{grid-template-columns:1fr 1fr}.schedule-day-toggle{grid-column:1/-1}.schedule-availability-row>span{display:none}.schedule-modal-date-grid,.schedule-modal-person-grid{grid-template-columns:1fr}.schedule-modal-person-grid label:last-child{grid-column:auto}}

.schedule-title-card{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:16px;padding:18px 20px;border:1px solid var(--line);border-left:3px solid var(--green);border-radius:8px;background:var(--panel)}.schedule-title-card h2{margin:4px 0 5px;font-family:var(--font-display);font-size:24px}.schedule-title-card p{max-width:720px;margin:0;color:var(--muted);font-size:13px;line-height:1.5}.schedule-title-actions,.schedule-inline-connection{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.schedule-inline-connection{padding-right:4px}.schedule-connection-text{color:var(--muted);font-size:12px}.schedule-connection-text.is-connected{color:var(--green-2)}.schedule-text-action{border:0;background:none;color:var(--gold);font:inherit;font-size:12px;font-weight:800;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.schedule-text-action:disabled{cursor:not-allowed;opacity:.5}.schedule-selected-panel,.schedule-calendar-panel,.schedule-secondary-grid>section{margin-bottom:16px;border:1px solid var(--line);border-radius:8px;background:var(--panel);padding:18px}.schedule-selected-panel .schedule-agenda-head{padding:0 0 12px;border-top:0}.schedule-roster-table td strong,.schedule-roster-table td small{display:block}.schedule-roster-table td small{margin-top:3px;color:var(--muted);font-size:11px}.schedule-owner-pill{display:inline-flex;max-width:110px;align-items:center;border:1px solid rgba(85,185,133,.42);border-radius:999px;background:rgba(85,185,133,.1);color:var(--green-2);padding:4px 8px;font-size:10px;font-weight:900;white-space:nowrap}.schedule-edit-btn{width:34px;height:34px}.schedule-calendar-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:14px}.schedule-calendar-toolbar h3{margin:4px 0 0;font-family:var(--font-display);font-size:22px}.schedule-calendar-filters{display:flex;align-items:flex-end;gap:9px}.schedule-calendar-filters label{display:grid;gap:5px}.schedule-calendar-filters label>span{color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase}.schedule-calendar-filters select{min-width:150px;border:1px solid var(--line);border-radius:7px;background:var(--input);color:var(--text);padding:9px}.schedule-calendar-grid{display:grid;gap:7px}.schedule-calendar-grid.is-week{grid-template-columns:repeat(7,minmax(0,1fr))}.schedule-calendar-grid.is-month{grid-template-columns:repeat(7,minmax(0,1fr))}.schedule-calendar-day{min-width:0;min-height:96px;display:flex;flex-direction:column;align-items:flex-start;gap:5px;border:1px solid var(--line);border-radius:7px;background:var(--input);color:var(--text);padding:9px;text-align:left}.schedule-calendar-day>span{color:var(--muted);font-size:9px;font-weight:900;text-transform:uppercase}.schedule-calendar-day>strong{font-size:12px}.schedule-calendar-day>div{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-top:auto}.schedule-calendar-day.is-outside{opacity:.42}.schedule-calendar-day.active{border-color:var(--green-2);box-shadow:0 0 0 2px rgba(85,185,133,.12)}.schedule-secondary-grid{display:grid;grid-template-columns:minmax(280px,.7fr) minmax(0,1.5fr);gap:16px;align-items:start}.schedule-secondary-grid .schedule-booking-link{margin:0}.schedule-rules-drawer{padding:0!important;overflow:hidden}.schedule-rules-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;border:0;background:none;color:var(--text);padding:18px 20px;text-align:left;cursor:pointer}.schedule-rules-toggle>span:first-child{display:grid;gap:4px}.schedule-rules-toggle strong{font-family:var(--font-display);font-size:21px}.schedule-rules-toggle>span:last-child{color:var(--gold);font-size:24px}.schedule-rules-content{border-top:1px solid var(--line)}.schedule-rules-content .schedule-settings-form{border:0;border-radius:0}.schedule-time-off{padding:18px;border-top:1px solid var(--line)}.schedule-time-off h3{margin:5px 0;font-family:var(--font-display);font-size:21px}.schedule-time-off p{margin:0 0 14px;color:var(--muted);font-size:12px}.schedule-time-off form{display:grid;grid-template-columns:1.2fr 1fr 1fr 1.5fr auto;align-items:end;gap:8px}.schedule-time-off label{display:grid;gap:5px;color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase}.schedule-time-off input,.schedule-time-off select{min-width:0;width:100%;border:1px solid var(--line);border-radius:7px;background:var(--input);color:var(--text);padding:10px}.schedule-override-list{display:grid;gap:7px;margin-top:14px}.schedule-override-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:7px;background:var(--input);padding:10px}.schedule-override-row>div{display:flex;align-items:center;gap:9px;min-width:0}.schedule-override-row span:last-child{color:var(--muted);font-size:11px}.schedule-override-row .icon-btn{width:30px;height:30px}.schedule-modal-date-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:980px){.schedule-title-card{align-items:flex-start;flex-direction:column}.schedule-title-actions{justify-content:flex-start}.schedule-secondary-grid{grid-template-columns:1fr}.schedule-time-off form{grid-template-columns:repeat(2,minmax(0,1fr))}.schedule-time-off form .btn{align-self:end}.schedule-calendar-day{min-height:86px}.schedule-calendar-day .schedule-owner-pill{max-width:76px}}
@media(max-width:680px){.schedule-calendar-toolbar{align-items:stretch;flex-direction:column}.schedule-calendar-filters{display:grid;grid-template-columns:1fr 1fr}.schedule-calendar-filters select{width:100%;min-width:0}.schedule-calendar-grid{overflow-x:auto}.schedule-calendar-grid.is-week,.schedule-calendar-grid.is-month{grid-template-columns:repeat(7,86px)}.schedule-time-off form{grid-template-columns:1fr}.schedule-override-row>div{align-items:flex-start;flex-direction:column}.schedule-title-actions,.schedule-inline-connection{justify-content:flex-start}.schedule-title-actions{width:100%}}
.overview-calendar-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}.overview-calendar-summary>div{display:grid;gap:3px;border:1px solid var(--line);border-radius:7px;background:var(--input);padding:11px}.overview-calendar-summary strong{font-family:var(--font-display);font-size:22px}.overview-calendar-summary span{color:var(--muted);font-size:10px}.overview-calendar-alert{display:flex;align-items:center;gap:9px}.overview-calendar-alert p{margin:0;color:var(--muted);font-size:12px}
@media(max-width:760px){
  .settings-grid{
    grid-template-columns:1fr;
  }
  .ai-training-item{
    align-items:flex-start;
  }
}
[data-theme="light"] .kgc-advisor-form{
  background:rgba(255,255,255,.58) !important;
}
.kgc-advisor-form textarea{
  display:block !important;
  width:100% !important;
  min-height:56px !important;
  max-height:132px !important;
  resize:vertical !important;
  border-radius:17px !important;
  border:1px solid rgba(200,162,74,.34) !important;
  background:var(--input) !important;
  color:var(--text) !important;
  padding:12px 13px !important;
  outline:none !important;
}
.kgc-advisor-form textarea:focus{
  border-color:var(--gold) !important;
  box-shadow:0 0 0 3px rgba(200,162,74,.12) !important;
}
.kgc-advisor-form .btn{
  display:inline-flex !important;
  min-height:56px !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:17px !important;
  padding:0 18px !important;
}
.advisor-send-btn{
  width:58px !important;
  min-width:58px !important;
  padding:0 !important;
  position:relative !important;
}
.advisor-send-icon{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:1.15rem !important;
  line-height:1 !important;
}
.advisor-loading-label{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
  clip:rect(0 0 0 0) !important;
  white-space:nowrap !important;
}
.advisor-orbit-loader{
  width:22px !important;
  height:22px !important;
  border:1px solid rgba(247,214,124,.38) !important;
  border-radius:999px !important;
  position:relative !important;
  display:inline-block !important;
}
.advisor-orbit-loader::before{
  content:"" !important;
  position:absolute !important;
  width:6px !important;
  height:6px !important;
  border-radius:999px !important;
  background:rgba(247,214,124,.88) !important;
  left:50% !important;
  top:50% !important;
  transform:translate(-50%,-50%) !important;
  box-shadow:0 0 10px rgba(247,214,124,.34) !important;
}
.advisor-orbit-dot{
  position:absolute !important;
  inset:0 !important;
  animation:advisorOrbit 1s linear infinite !important;
}
.advisor-orbit-dot::after{
  content:"" !important;
  position:absolute !important;
  width:5px !important;
  height:5px !important;
  border-radius:999px !important;
  background:rgba(247,214,124,.96) !important;
  left:50% !important;
  top:-3px !important;
  transform:translateX(-50%) !important;
  box-shadow:0 0 10px rgba(247,214,124,.62) !important;
}
@keyframes advisorOrbit{
  to{transform:rotate(360deg);}
}
@media (max-width: 920px){
  .kgc-advisor-backdrop{
    align-items:flex-end !important;
    padding:12px !important;
  }
  .kgc-advisor-window{
    width:100% !important;
    height:min(76dvh, 680px) !important;
    max-height:min(76dvh, 680px) !important;
    min-height:420px !important;
    border-radius:24px !important;
  }
}
@media (max-width: 520px){
  .kgc-advisor-backdrop{padding:8px !important;}
  .kgc-advisor-window{
    height:76dvh !important;
    max-height:76dvh !important;
    min-height:390px !important;
    border-radius:22px !important;
  }
  .kgc-advisor-header{
    min-height:82px !important;
    padding:17px 16px 15px 66px !important;
  }
  .kgc-advisor-close{
    top:16px !important;
    left:16px !important;
    width:38px !important;
    height:38px !important;
  }
  .kgc-advisor-form{
    grid-template-columns:1fr !important;
    padding:12px 16px 16px !important;
  }
  .kgc-advisor-form .btn{
    min-height:44px !important;
  }
}


/* Advisor close button inline with logo/title, right justified */
.kgc-advisor-window .kgc-advisor-header{
  padding:20px 20px 17px 76px !important;
  position:relative !important;
}
.kgc-advisor-window .kgc-advisor-close{
  top:50% !important;
  right:20px !important;
  left:auto !important;
  transform:translateY(-50%) !important;
  width:40px !important;
  height:40px !important;
}
.kgc-advisor-window .kgc-advisor-header{
  padding-right:74px !important;
}
@media (max-width: 520px){
  .kgc-advisor-window .kgc-advisor-header{
    padding:17px 64px 15px 66px !important;
  }
  .kgc-advisor-window .kgc-advisor-close{
    top:50% !important;
    right:16px !important;
    left:auto !important;
    transform:translateY(-50%) !important;
    width:38px !important;
    height:38px !important;
  }
}


/* Advisor close final placement: inside header, right aligned */
.kgc-advisor-window .kgc-advisor-header{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  min-height:92px !important;
  padding:20px 20px 17px 76px !important;
  position:relative !important;
}
.kgc-advisor-heading{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
}
.kgc-advisor-window .kgc-advisor-close{
  position:static !important;
  inset:auto !important;
  transform:none !important;
  margin-left:auto !important;
  flex:0 0 auto !important;
  width:40px !important;
  height:40px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:15px !important;
  border:1px solid rgba(200,162,74,.46) !important;
  background:rgba(255,255,255,.045) !important;
  color:var(--text) !important;
}
@media (max-width: 520px){
  .kgc-advisor-window .kgc-advisor-header{
    padding:17px 16px 15px 66px !important;
  }
  .kgc-advisor-window .kgc-advisor-close{
    position:static !important;
    inset:auto !important;
    transform:none !important;
    width:38px !important;
    height:38px !important;
  }
}


/* Advisor title left-justified closer to the logo */
.kgc-advisor-heading{
  justify-content:flex-start !important;
  align-items:center !important;
  gap:14px !important;
}
.kgc-advisor-window .kgc-advisor-header{
  justify-content:space-between !important;
}
.kgc-advisor-title{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  text-align:left !important;
  margin-left:0 !important;
}
.kgc-advisor-title .spark{
  display:block !important;
  margin:0 0 2px 0 !important;
  text-align:left !important;
}
.kgc-advisor-title h3{
  display:block !important;
  width:auto !important;
  text-align:left !important;
}

/* Growth Console V2 patch: media composer + advisor header alignment */
.media-advisor-form{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:10px !important;
  align-items:end !important;
  padding:10px !important;
  border:1px solid rgba(200,162,74,.34) !important;
  border-radius:18px !important;
  background:rgba(0,0,0,.13) !important;
}
[data-theme="light"] .media-advisor-form{
  background:rgba(255,255,255,.58) !important;
}
.media-advisor-form textarea{
  display:block !important;
  width:100% !important;
  min-height:56px !important;
  max-height:132px !important;
  resize:vertical !important;
  border-radius:17px !important;
  border:1px solid rgba(200,162,74,.34) !important;
  background:var(--input) !important;
  color:var(--text) !important;
  padding:12px 13px !important;
  outline:none !important;
  font:inherit !important;
  line-height:1.45 !important;
}
.media-advisor-form textarea::placeholder{
  color:var(--muted) !important;
}
.media-advisor-form textarea:focus{
  border-color:var(--gold) !important;
  box-shadow:0 0 0 3px rgba(200,162,74,.12) !important;
}
.media-advisor-form .btn{
  display:inline-flex !important;
  min-height:56px !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:17px !important;
  padding:0 18px !important;
}
.kgc-advisor-window .kgc-advisor-header{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:14px !important;
  min-height:92px !important;
  padding:20px !important;
  position:relative !important;
}
.kgc-advisor-heading{
  grid-column:1 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  min-width:0 !important;
  margin:0 !important;
}
.kgc-advisor-title{
  margin:0 !important;
  text-align:left !important;
  align-items:flex-start !important;
}
.kgc-advisor-window .kgc-advisor-close{
  grid-column:3 !important;
  justify-self:end !important;
  align-self:center !important;
  position:static !important;
  inset:auto !important;
  transform:none !important;
  margin:0 !important;
  flex:0 0 auto !important;
}
@media (max-width:720px){
  .media-advisor-form{
    grid-template-columns:1fr !important;
  }
  .media-advisor-form .btn{
    width:100% !important;
    min-height:46px !important;
  }
}
@media (max-width:520px){
  .kgc-advisor-window .kgc-advisor-header{
    grid-template-columns:auto minmax(0,1fr) auto !important;
    padding:17px 16px 15px !important;
  }
}

/* Media Studio: single AI workspace + working draft */
.media-primary-grid.single-workspace{
  grid-template-columns:minmax(0, 1fr);
  max-width:920px;
  margin:0 auto;
  width:100%;
}
.media-ai-workspace-panel{
  padding:18px;
}
.media-ai-workspace{
  display:grid;
  gap:16px;
}
.media-working-draft{
  border-top:1px solid rgba(198,162,74,.22);
  padding-top:16px;
}
.media-working-draft .media-script-form{
  margin:0;
}
.media-working-draft .form-section-title{
  padding:0;
}
.media-working-draft .compact-script-form{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.media-working-draft .compact-script-form .wide,
.media-working-draft .compact-script-form .script-actions{
  grid-column:1 / -1;
}
.media-working-draft textarea[name="script"]{
  min-height:180px;
}
@media (max-width: 760px){
  .media-working-draft .compact-script-form{
    grid-template-columns:1fr;
  }
}


/* Advisor recent discussion memory */
.kgc-advisor-window{
  grid-template-rows:auto auto minmax(0,1fr) auto !important;
}
.kgc-advisor-history{
  padding:12px 20px 10px !important;
  border-bottom:1px solid rgba(200,162,74,.18) !important;
  background:rgba(0,0,0,.08) !important;
}
.kgc-advisor-history-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  margin-bottom:9px !important;
}
.kgc-advisor-history-head small{
  display:block !important;
  color:var(--muted) !important;
  font-size:.72rem !important;
  margin-top:2px !important;
}
.kgc-advisor-thread-list{
  display:flex !important;
  gap:8px !important;
  overflow-x:auto !important;
  padding-bottom:2px !important;
  scrollbar-width:none !important;
}
.kgc-advisor-thread-list::-webkit-scrollbar{width:0 !important;height:0 !important;}
.kgc-advisor-thread{
  flex:0 0 210px !important;
  text-align:left !important;
  border:1px solid rgba(200,162,74,.22) !important;
  border-radius:14px !important;
  background:rgba(255,255,255,.035) !important;
  color:var(--text) !important;
  padding:9px 10px !important;
  cursor:pointer !important;
}
.kgc-advisor-thread:hover,
.kgc-advisor-thread.active{
  border-color:rgba(85,185,133,.45) !important;
  background:rgba(47,122,87,.20) !important;
}
.kgc-advisor-thread strong,
.kgc-advisor-thread span{
  display:block !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.kgc-advisor-thread strong{
  font-size:.78rem !important;
  line-height:1.2 !important;
}
.kgc-advisor-thread span{
  color:var(--muted) !important;
  font-size:.68rem !important;
  margin-top:4px !important;
}
.kgc-advisor-thread > button[data-advisor-thread]{
  appearance:none !important;
  border:0 !important;
  background:transparent !important;
  color:inherit !important;
  padding:0 !important;
  text-align:left !important;
  width:100% !important;
  cursor:pointer !important;
}
.kgc-advisor-thread-actions{
  display:flex !important;
  gap:5px !important;
  flex-wrap:wrap !important;
  margin-top:8px !important;
}
.kgc-advisor-archive{
  flex:0 0 100% !important;
}
.kgc-advisor-archive summary{
  color:var(--muted) !important;
  cursor:pointer !important;
  font-size:.72rem !important;
  padding:6px 2px !important;
  text-transform:uppercase !important;
}
@media (max-width:520px){
  .kgc-advisor-history{padding:10px 14px 9px !important;}
  .kgc-advisor-thread{flex-basis:190px !important;}
}

/* Growth Console v3 admin additions */
.portal-role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}
.portal-role-grid div{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(128,128,128,.045)}
.portal-role-grid strong{display:block;color:var(--gold);font-size:12px;letter-spacing:.12em;text-transform:uppercase;margin-bottom:7px}
.portal-role-grid span{display:block;color:var(--muted);font-size:13px;line-height:1.45}
.status.green,.status.billable{background:rgba(85,185,133,.14);border-color:rgba(85,185,133,.28);color:var(--green-2)}
.status.yellow,.status.internal,.status.needs-input,.status.expected{background:rgba(216,154,61,.14);border-color:rgba(216,154,61,.30);color:var(--amber)}
.status.red,.status.at-risk{background:rgba(228,93,107,.14);border-color:rgba(228,93,107,.28);color:var(--red)}
.status.admin-only,.status.not-invited,.status.invited{background:rgba(110,168,229,.12);border-color:rgba(110,168,229,.24);color:var(--blue)}
@media(max-width:760px){.portal-role-grid{grid-template-columns:1fr}}

/* Client Ops two-line alternative view */
.client-ops-card .table-tools{margin-bottom:14px}
.client-ops-list{display:grid;gap:12px}
.client-ops-row{border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,var(--panel),var(--panel-2));padding:14px;display:grid;gap:10px;box-shadow:var(--glow)}
.client-ops-main{display:grid;grid-template-columns:minmax(190px,1fr) auto;gap:14px;align-items:center}
.client-ops-identity{min-width:0}
.client-ops-identity strong{display:block;font-size:15px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-ops-identity span{display:block;margin-top:4px;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-ops-badges{display:flex;gap:7px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.client-ops-sub{display:grid;grid-template-columns:190px minmax(170px,.9fr) minmax(220px,1.35fr) auto;gap:12px;align-items:center;border-top:1px solid var(--line);padding-top:10px;color:var(--muted);font-size:12px}
.client-ops-progress{display:grid;grid-template-columns:42px 1fr;gap:9px;align-items:center;font-weight:900;color:var(--text)}
.client-ops-progress .progress-track{margin-top:0;height:7px}
.client-ops-metrics{font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-ops-action{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;min-width:0;color:var(--text)}
.client-ops-action span{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);font-weight:950}
.client-ops-action{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-ops-actions{justify-content:flex-end;flex-wrap:nowrap}
@media(max-width:1100px){.client-ops-sub{grid-template-columns:1fr 1fr}.client-ops-actions{justify-content:flex-start}.client-ops-main{grid-template-columns:1fr}.client-ops-badges{justify-content:flex-start}}
@media(max-width:680px){.client-ops-sub{grid-template-columns:1fr}.client-ops-actions{flex-wrap:wrap}.client-ops-identity strong,.client-ops-identity span,.client-ops-metrics,.client-ops-action{white-space:normal}}

/* Growth Console v3 IA cleanup */
.nav-group{padding-bottom:10px;border-bottom:1px solid var(--line)}
.nav-group:last-child{border-bottom:0}
.nav-heading{padding:8px 10px 4px}
.nav-ico{width:22px;text-align:center}

/* Overview command-center layout */
.compact-kpis .kpi-card{min-height:112px}
.overview-command-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:16px;margin-top:16px}
.overview-performance-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:16px;margin-top:16px}
.priority-stack{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.priority-stack section{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.04);padding:12px;min-width:0}
.priority-stack h4{margin:0 0 10px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);font-weight:950}
.command-snapshot .summary-list{margin-bottom:14px}
.overview-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}
.overview-shortcuts .btn{width:100%;justify-content:center}
.compact-chart{min-height:260px;max-height:300px}

/* Client Ops cleanup */
.client-ops-kpis{margin-bottom:16px}
.client-ops-tools{padding:10px;margin-bottom:12px}
.client-ops-filter-row{grid-template-columns:minmax(220px,1.4fr) repeat(4,minmax(120px,.8fr)) auto;gap:8px;align-items:end}
.client-ops-filter-row .btn{height:36px;white-space:nowrap}
.client-ops-card .column-picker{display:none!important}

@media(max-width:1180px){
  .overview-command-grid,.overview-performance-grid{grid-template-columns:1fr}
  .client-ops-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  .priority-stack{grid-template-columns:1fr}
  .overview-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .client-ops-filter-row{grid-template-columns:1fr}
}

/* Hotfix: overview compact lists and weekly snapshot */
.compact-empty{
  border:1px dashed var(--line);
  border-radius:14px;
  padding:10px;
  font-size:12px;
  color:var(--muted);
  background:rgba(128,128,128,.035);
}
.snapshot-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.snapshot-grid div{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:rgba(128,128,128,.04);
  min-width:0;
}
.snapshot-grid span{
  display:block;
  font-size:9px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:900;
  margin-bottom:6px;
}
.snapshot-grid strong{
  font-size:18px;
  color:var(--text);
}
@media(max-width:900px){.snapshot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.snapshot-grid{grid-template-columns:1fr}}

/* Date picker fields */
.date-input-shell{
  position:relative;
  display:flex;
  align-items:center;
  width:100%;
}
.date-input-shell input[type="date"]{
  width:100%;
  padding-right:46px;
}
.calendar-picker{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:28px;
  height:28px;
  border:1px solid var(--border);
  border-radius:10px;
  background:rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:16px;
  line-height:1;
}
.calendar-picker:hover{
  background:rgba(255,255,255,.08);
  border-color:var(--accent);
}

/* Growth Console v3 Admin Final Pass */
.nav-group{padding-top:2px;border-top:1px solid rgba(225,191,99,.10)}
.nav-group:first-child{border-top:0;padding-top:0}
.nav-heading{padding-top:2px}
.nav-btn[data-view="clientOps"] .nav-ico{background:linear-gradient(135deg,rgba(225,191,99,.20),rgba(47,122,87,.22));border-color:rgba(225,191,99,.45);color:var(--gold-2)}
.overview-kpi-strip .kpi-card,.finance-kpis .kpi-card,.time-kpis .kpi-card{min-height:116px}
.overview-final-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.8fr) minmax(280px,.8fr);gap:16px;align-items:stretch}
.overview-today-panel{grid-row:span 2}
.overview-money-panel{grid-column:2 / -1}
.priority-stack.compact-stack{display:grid;grid-template-columns:1fr;gap:14px}
.priority-stack h4{margin:0 0 8px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2)}
.ai-action-list{margin:0;padding:0;list-style:none;display:grid;gap:9px}
.ai-action-list li{border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(128,128,128,.04);font-size:12.5px;line-height:1.45;color:var(--muted)}
.ai-action-list strong{color:var(--gold-2);margin-right:5px}
.ops-brief-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(128,128,128,.04);margin-bottom:8px;min-width:0}
.ops-brief-row strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.ops-brief-row span{display:block;font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.ops-brief-row>div:last-child{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.compact-metric-list{display:grid;gap:8px}.compact-metric-row{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(128,128,128,.04)}.compact-metric-row span{color:var(--muted);font-size:12px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact-metric-row strong{font-size:13px;white-space:nowrap;color:var(--text)}
.quick-jump-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.quick-jump-card{border:1px solid var(--line);border-radius:16px;background:rgba(128,128,128,.04);color:var(--text);padding:13px;text-align:left;display:grid;gap:5px;transition:var(--ease)}.quick-jump-card:hover{border-color:rgba(225,191,99,.50);transform:translateY(-1px);background:linear-gradient(145deg,rgba(15,77,53,.28),rgba(225,191,99,.08))}.quick-jump-card strong{font-family:var(--font-display);font-size:16px}.quick-jump-card span{font-size:12px;color:var(--muted);line-height:1.35}
.finance-breakdown-grid,.support-load-grid{align-items:start}.mini-card{box-shadow:none;background:rgba(128,128,128,.035)}
.support-table{display:grid;gap:8px}.support-table-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(128,128,128,.04)}.support-table-row span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.support-table-row strong{font-size:13px}.support-table-row em{font-style:normal;color:var(--gold-2);font-size:12px;font-weight:900;white-space:nowrap}
.client-ops-tools.final-filter-row{padding:10px;margin-bottom:12px}.client-ops-filter-row{grid-template-columns:minmax(220px,1.3fr) repeat(5,minmax(120px,.75fr)) auto!important;align-items:end}.client-search-field input{min-width:0}.client-ops-row{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.04);padding:13px;margin-bottom:10px}.client-ops-main{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.client-ops-identity{display:grid;gap:2px;min-width:0}.client-ops-identity strong{font-size:15px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.client-ops-identity span{font-size:12px;color:var(--muted)}.client-ops-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.client-ops-sub{display:grid;grid-template-columns:170px minmax(160px,.7fr) minmax(220px,1fr) auto;gap:12px;align-items:center;margin-top:11px;padding-top:11px;border-top:1px solid var(--line)}.client-ops-progress{display:grid;grid-template-columns:42px minmax(0,1fr);gap:8px;align-items:center}.client-ops-progress span{font-size:12px;color:var(--gold-2);font-weight:900}.client-ops-metrics{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.client-ops-action{display:grid;gap:2px;font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.client-ops-action span{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2);font-weight:900}.client-ops-actions{justify-content:flex-end}.client-ops-actions .btn.small:first-child{min-width:94px}
.status.green,.status.active,.status.ready-to-scale,.status.invited{background:rgba(85,185,133,.14);border-color:rgba(85,185,133,.28);color:var(--green-2)}.status.yellow,.status.admin-only,.status.not-invited{background:rgba(216,154,61,.14);border-color:rgba(216,154,61,.30);color:var(--amber)}.status.red,.status.paused,.status.at-risk{background:rgba(228,93,107,.14);border-color:rgba(228,93,107,.28);color:var(--red)}
.snapshot-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.snapshot-grid div{border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(128,128,128,.04)}.snapshot-grid span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.12em;font-weight:900}.snapshot-grid strong{display:block;font-size:16px;margin-top:4px;color:var(--text)}
@media(max-width:1280px){.overview-final-grid{grid-template-columns:1fr 1fr}.overview-today-panel{grid-row:auto;grid-column:1/-1}.overview-money-panel{grid-column:auto}.quick-jump-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.client-ops-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}.client-ops-sub{grid-template-columns:1fr 1fr}.client-ops-actions{justify-content:flex-start}.client-ops-action{white-space:normal}}
@media(max-width:760px){.overview-final-grid,.finance-breakdown-grid,.support-load-grid,.quick-jump-grid,.snapshot-grid{grid-template-columns:1fr}.ops-brief-row{grid-template-columns:1fr}.ops-brief-row>div:last-child{justify-content:flex-start}.client-ops-main{display:grid}.client-ops-badges{justify-content:flex-start}.client-ops-filter-row,.client-ops-sub{grid-template-columns:1fr!important}.client-ops-metrics{white-space:normal}.support-table-row{grid-template-columns:1fr}.quick-jump-card{width:100%}}

/* Sidebar polish hotfix: remove duplicate section dividers and hide internal scrollbar */
.sidebar{
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.sidebar::-webkit-scrollbar{width:0;height:0;display:none;}
.nav{gap:14px;}
.nav-group{
  padding-top:0!important;
  padding-bottom:12px!important;
  border-top:0!important;
  border-bottom:1px solid rgba(225,191,99,.14)!important;
}
.nav-group:last-child{border-bottom:0!important;}
.nav-heading{padding:0 10px 6px!important;}

/* Sidebar focus card cleanup: remove the empty/low-value weekly focus block */
.focus-card{display:none!important;}

/* v3 admin final: data source add controls */
.section-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.integration-left .section-actions .btn{white-space:nowrap}
@media (max-width: 760px){.section-actions{justify-content:flex-start}.integration-left .section-actions{width:100%;justify-content:space-between}}

/* Pipeline compact two-line view */
.pipeline-compact-card .table-tools{margin-bottom:12px}
.pipeline-tools{padding:10px;margin-bottom:12px}
.pipeline-filter-row{grid-template-columns:minmax(240px,1.4fr) repeat(4,minmax(110px,.75fr)) auto;gap:8px;align-items:end}
.pipeline-filter-row .btn{height:36px;white-space:nowrap}
.pipeline-compact-list{display:grid;gap:10px}
.pipeline-row{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.04);padding:13px;display:grid;gap:10px;box-shadow:var(--glow)}
.pipeline-line{display:grid;align-items:center;gap:12px;min-width:0}
.primary-line{grid-template-columns:minmax(180px,1fr) minmax(180px,auto) minmax(125px,auto)}
.secondary-line{grid-template-columns:minmax(180px,.9fr) minmax(240px,1.2fr) auto;border-top:1px solid var(--line);padding-top:10px}
.pipeline-title{min-width:0}.pipeline-title strong{font-size:15px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pipeline-title span{font-size:12px;color:var(--muted)}
.pipeline-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-start}.pipeline-money{text-align:right;white-space:nowrap}.pipeline-money strong{display:block;color:var(--text);font-size:15px}.pipeline-money span{display:block;color:var(--muted);font-size:11.5px;margin-top:2px}
.pipeline-meta{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.pipeline-next{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.pipeline-next span{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2);font-weight:900}.pipeline-actions{justify-content:flex-end;flex-wrap:nowrap}
@media(max-width:1180px){.pipeline-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}.primary-line{grid-template-columns:1fr auto}.pipeline-money{grid-column:1/-1;text-align:left}.secondary-line{grid-template-columns:1fr 1fr}.pipeline-actions{justify-content:flex-start}}
@media(max-width:760px){.pipeline-filter-row,.primary-line,.secondary-line{grid-template-columns:1fr}.pipeline-badges,.pipeline-actions{justify-content:flex-start}.pipeline-meta,.pipeline-next,.pipeline-title strong{white-space:normal}}

/* Client Hub master client view */
.nav-btn[data-view="clientHub"] .nav-ico{background:linear-gradient(135deg,rgba(225,191,99,.22),rgba(47,122,87,.28));border-color:rgba(225,191,99,.48);color:var(--gold-2)}
.client-hub-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}
.kaivalya-hub-panel{display:grid;gap:4px}.kaivalya-user-list{display:grid;gap:10px}.kaivalya-user-card{display:grid;grid-template-columns:48px minmax(210px,1.1fr) minmax(120px,.45fr) minmax(230px,.8fr) auto;align-items:center;gap:14px;border:1px solid var(--line);border-radius:14px;background:rgba(128,128,128,.045);padding:14px}.kaivalya-user-avatar{width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--line-strong);border-radius:12px;color:var(--gold);background:var(--chip)}.kaivalya-user-avatar .profile-control-icon{display:grid;place-items:center}.kaivalya-user-avatar svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}.kaivalya-user-identity,.kaivalya-user-access,.kaivalya-user-platforms{display:grid;gap:4px;min-width:0}.kaivalya-user-identity strong,.kaivalya-user-identity span,.kaivalya-user-platforms span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kaivalya-user-identity span,.kaivalya-user-identity small,.kaivalya-user-access small,.kaivalya-user-platforms span{color:var(--muted);font-size:12px}.kaivalya-user-platforms b{color:var(--gold);font-size:10px;letter-spacing:.08em}.kaivalya-user-card>.row-actions{justify-content:flex-end}
.kaivalya-access-bundles{display:flex;flex-wrap:wrap;gap:5px;margin-top:2px}.kaivalya-access-bundles>span{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid var(--line);border-radius:6px;background:var(--chip);color:var(--text);font-size:11px;line-height:1.25}.kaivalya-access-field{margin:0;padding:14px;border:1px solid var(--line);border-radius:8px}.kaivalya-access-field legend{padding:0 6px;color:var(--text);font-weight:800}.kaivalya-access-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}.kaivalya-access-option{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:start;gap:9px;padding:11px;border:1px solid var(--line);border-radius:8px;background:var(--chip);cursor:pointer}.kaivalya-access-option input{width:16px;height:16px;margin:2px 0 0;accent-color:var(--green)}.kaivalya-access-option span{display:grid;gap:3px;min-width:0}.kaivalya-access-option strong{color:var(--text);font-size:13px;line-height:1.25}.kaivalya-access-option small{color:var(--muted);font-size:11px;line-height:1.45;overflow-wrap:anywhere}.kaivalya-access-option.is-disabled{opacity:.45;cursor:not-allowed}
.kaivalya-roster-tabs{display:flex;flex-wrap:wrap;gap:8px}.kaivalya-roster-summary{margin:2px 0}.kaivalya-roster-table-wrap{overflow-x:auto!important}.kaivalya-roster-table{min-width:1080px!important;table-layout:auto!important}.kaivalya-roster-table td{vertical-align:middle}.kaivalya-roster-person{display:grid;grid-template-columns:42px minmax(180px,1fr);align-items:center;gap:10px}.kaivalya-roster-person>span:last-child{display:grid;gap:3px;min-width:0}.kaivalya-roster-person strong,.kaivalya-roster-person small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kaivalya-roster-person small{color:var(--muted);font-size:11px}.kaivalya-roster-table .kaivalya-user-avatar{width:38px;height:38px;border-radius:10px}.kaivalya-roster-table .kaivalya-user-avatar svg{width:20px;height:20px}.kaivalya-roster-table .client-access-actions{min-width:210px}
@media(max-width:1050px){.kaivalya-user-card{grid-template-columns:48px minmax(0,1fr) auto}.kaivalya-user-platforms{grid-column:2}.kaivalya-user-card>.row-actions{grid-column:3;grid-row:1/3}.kaivalya-user-access{grid-column:3;grid-row:1;align-self:start;margin-bottom:52px}}
@media(max-width:680px){.kaivalya-user-card{grid-template-columns:42px minmax(0,1fr)}.kaivalya-user-access,.kaivalya-user-platforms,.kaivalya-user-card>.row-actions{grid-column:1/-1;grid-row:auto;margin:0;justify-content:flex-start}.kaivalya-user-card>.row-actions .btn{width:auto}.kaivalya-user-identity span,.kaivalya-user-platforms span{white-space:normal;overflow-wrap:anywhere}}
@media(max-width:680px){.kaivalya-access-options{grid-template-columns:1fr}.kaivalya-access-option{min-height:58px}}
@media(max-width:680px){.kaivalya-roster-tabs{display:grid;grid-template-columns:1fr 1fr}.kaivalya-roster-tabs .client-hub-tab{width:100%;min-width:0}.kaivalya-roster-summary{grid-template-columns:1fr 1fr}}
.client-hub-hero h2{margin:4px 0 8px;font-size:clamp(24px,3vw,38px);max-width:980px}
.client-hub-hero p{max-width:880px;margin:0}
.client-hub-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;min-width:280px}
.client-hub-kpis{margin-bottom:16px}
.client-hub-controls{padding:12px;margin-bottom:14px}
.client-hub-filter-row{grid-template-columns:minmax(260px,1fr) minmax(150px,.35fr) minmax(130px,.25fr) auto;align-items:end;gap:10px}
.client-hub-filter-row .btn{height:36px;white-space:nowrap}
.client-hub-lanes{display:grid;gap:16px}
.client-lane{border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.025),rgba(128,128,128,.035));padding:14px;box-shadow:var(--glow)}
.client-lane-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.client-lane-head h3{margin:2px 0 4px;font-size:20px}
.client-lane-head p{margin:0;color:var(--muted);font-size:12.5px;line-height:1.45;max-width:900px}
.lane-attention{border-color:rgba(228,93,107,.28)}
.lane-onboarding{border-color:rgba(216,154,61,.24)}
.lane-scale{border-color:rgba(85,185,133,.28)}
.client-lane-list{display:grid;gap:10px}
.client-hub-pagination{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap;margin-top:14px;padding:12px 0}.client-hub-pagination label{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);font-weight:800}.client-hub-pagination select{min-width:72px;height:36px;padding:7px 34px 7px 12px;border:1px solid var(--line);border-radius:11px;background-color:var(--input);color:var(--text);font-size:12px;font-weight:900;line-height:1;outline:none;cursor:pointer}.client-hub-pagination select:hover{border-color:var(--line-strong)}.client-hub-pagination select:focus-visible{border-color:var(--gold);box-shadow:0 0 0 3px rgba(200,162,74,.14)}.client-hub-page-summary{color:var(--muted);font-size:13px}.client-hub-page-buttons{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.client-hub-page-buttons .active{border-color:var(--accent);color:var(--accent)}
.client-hub-card{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.045);padding:13px;display:grid;gap:10px;min-width:0}
.lane-attention .client-hub-card{background:linear-gradient(145deg,rgba(228,93,107,.06),rgba(128,128,128,.035))}
.lane-scale .client-hub-card{background:linear-gradient(145deg,rgba(85,185,133,.06),rgba(128,128,128,.035))}
.client-card-line{display:grid;align-items:center;gap:12px;min-width:0}
.client-card-primary{grid-template-columns:minmax(210px,1fr) minmax(180px,auto) minmax(135px,auto)}
.client-card-secondary{grid-template-columns:170px minmax(220px,1fr) minmax(240px,1.1fr) auto;border-top:1px solid var(--line);padding-top:10px}
.client-card-name{min-width:0;display:grid;gap:2px}.client-card-name strong{font-size:15.5px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.client-card-name span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-card-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-start}.client-card-value{text-align:right;white-space:nowrap}.client-card-value strong{display:block;color:var(--text);font-size:15px}.client-card-value span{display:block;color:var(--muted);font-size:11.5px;margin-top:2px}
.client-card-progress{display:grid;grid-template-columns:42px minmax(0,1fr);gap:8px;align-items:center}.client-card-progress>span{font-size:12px;color:var(--gold-2);font-weight:900}.client-card-meta{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.client-card-next{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.client-card-next span{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2);font-weight:900}.client-card-actions{justify-content:flex-end;flex-wrap:nowrap}.compact-empty{padding:13px!important;border-radius:14px!important}
.client-edit-action{width:36px;height:36px;display:inline-grid;place-items:center;flex:0 0 36px;border:1px solid rgba(214,174,66,.48);border-radius:8px;background:rgba(214,174,66,.1);color:var(--gold-2);font:700 18px/1 Georgia,serif;cursor:pointer;transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease}.client-edit-action:hover,.client-edit-action:focus-visible{background:var(--gold);border-color:var(--gold);color:#07120d;transform:translateY(-1px);outline:none}.client-edit-action:focus-visible{box-shadow:0 0 0 3px rgba(214,174,66,.2)}
.status.action,.status.load{background:rgba(228,93,107,.14);border-color:rgba(228,93,107,.28);color:var(--red)}.status.open,.status.new-lead{background:rgba(216,154,61,.13);border-color:rgba(216,154,61,.28);color:var(--amber)}.status.won,.status.low{background:rgba(85,185,133,.14);border-color:rgba(85,185,133,.28);color:var(--green-2)}
@media(max-width:1240px){.client-card-primary{grid-template-columns:1fr auto}.client-card-value{grid-column:1/-1;text-align:left}.client-card-secondary{grid-template-columns:1fr 1fr}.client-card-actions{justify-content:flex-start}.client-hub-filter-row{grid-template-columns:repeat(2,minmax(0,1fr))}.client-hub-actions{min-width:0}}
@media(max-width:760px){.client-hub-hero{display:grid}.client-hub-actions{justify-content:flex-start}.client-hub-filter-row,.client-card-primary,.client-card-secondary{grid-template-columns:1fr}.client-card-badges,.client-card-actions{justify-content:flex-start}.client-card-name strong,.client-card-name span,.client-card-meta,.client-card-next{white-space:normal}.client-lane{padding:11px}}

/* Sidebar icon shape hotfix: keep menu icons perfectly circular */
.nav-ico{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  max-width:28px!important;
  flex:0 0 28px!important;
  aspect-ratio:1 / 1!important;
  border-radius:999px!important;
  display:inline-grid!important;
  place-items:center!important;
  line-height:1!important;
  padding:0!important;
  box-sizing:border-box!important;
}
.nav-btn{
  align-items:center!important;
}
.nav-btn span:not(.nav-ico){
  min-width:0;
}
@media(max-width:1200px){
  .nav-ico{
    width:28px!important;
    height:28px!important;
    min-width:28px!important;
    max-width:28px!important;
    flex-basis:28px!important;
  }
}

/* Client Portal Preview */
.client-portal-admin-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}
.client-portal-admin-hero h2{margin:4px 0 8px;font-size:clamp(24px,3vw,38px)}
.client-portal-admin-hero p{max-width:880px;margin:0}
.client-portal-selector{display:flex;align-items:end;gap:10px;min-width:min(420px,100%);justify-content:flex-end}
.client-portal-selector .filter-field{min-width:260px}
.client-portal-shell{display:grid;grid-template-columns:250px minmax(0,1fr);gap:16px;align-items:start}
.client-portal-menu{position:sticky;top:20px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(145deg,var(--panel),var(--panel-2));box-shadow:var(--shadow);padding:14px;display:grid;gap:8px}
.client-portal-brand{display:flex;align-items:center;gap:10px;padding:8px 8px 14px;border-bottom:1px solid var(--line);margin-bottom:6px}
.client-portal-brand strong{display:block}.client-portal-brand span{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.client-portal-menu button{border:1px solid transparent;background:transparent;color:var(--muted);text-align:left;border-radius:14px;padding:11px 12px;font-weight:900}
.client-portal-menu button.active,.client-portal-menu button:hover{background:rgba(200,162,74,.10);border-color:var(--line);color:var(--text)}
.client-portal-main{display:grid;gap:16px;min-width:0}
.client-welcome-card{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;align-items:center}
.client-welcome-card h3{font-family:var(--font-display);font-size:28px;margin:6px 0 8px}
.portal-login-preview{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(128,128,128,.045);display:grid;gap:8px}
.portal-login-preview strong{color:var(--gold);font-size:12px;letter-spacing:.12em;text-transform:uppercase}.portal-login-preview span{color:var(--muted);font-size:13px;line-height:1.45}
.portal-stage-track{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}
.portal-stage{border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(128,128,128,.045);display:grid;gap:8px;min-height:86px;align-content:center;text-align:center}
.portal-stage b{width:30px;height:30px;border-radius:999px;display:grid;place-items:center;margin:0 auto;background:var(--chip);color:var(--muted)}
.portal-stage.done{border-color:rgba(85,185,133,.28);background:rgba(85,185,133,.08)}.portal-stage.done b{background:rgba(85,185,133,.18);color:var(--green-2)}
.portal-stage span{font-size:12px;font-weight:900;color:var(--text)}
.check-pill-grid{display:flex;flex-wrap:wrap;gap:8px}.check-pill-grid.stacked{display:grid}.check-pill-grid.compact .check-pill{min-width:96px}.daily-check-grid{display:flex;flex-wrap:wrap;gap:8px}
.check-pill{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:999px;padding:8px 10px;background:rgba(128,128,128,.045);font-size:12px;font-weight:900;color:var(--muted)}
.check-pill b{color:var(--muted)}.check-pill.done{background:rgba(85,185,133,.10);border-color:rgba(85,185,133,.28);color:var(--green-2)}.check-pill.done b{color:var(--green-2)}
.week-checklist{display:grid;gap:9px}.week-check-row{border:1px solid var(--line);border-radius:16px;background:rgba(128,128,128,.045);padding:12px;display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.week-check-row strong{display:block}.week-check-row span{display:block;color:var(--muted);font-size:12px;line-height:1.45;margin-top:4px}.week-check-row b{color:var(--muted)}.week-check-row.done{border-color:rgba(85,185,133,.28);background:rgba(85,185,133,.08)}.week-check-row.done b{color:var(--green-2)}
@media(max-width:1120px){.client-portal-admin-hero,.client-welcome-card{grid-template-columns:1fr;display:grid}.client-portal-selector{justify-content:flex-start}.portal-stage-track{grid-template-columns:repeat(4,minmax(0,1fr))}.client-portal-shell{grid-template-columns:1fr}.client-portal-menu{position:relative;top:auto;display:flex;overflow:auto}.client-portal-brand{min-width:220px;border-bottom:0;border-right:1px solid var(--line);padding-bottom:8px;margin-bottom:0}.client-portal-menu button{white-space:nowrap}}
@media(max-width:760px){.client-portal-selector{display:grid}.client-portal-selector .filter-field{min-width:0}.portal-stage-track{grid-template-columns:repeat(2,minmax(0,1fr))}.client-portal-menu{display:grid}.client-portal-brand{border-right:0;border-bottom:1px solid var(--line);min-width:0}}

/* Client portal as a separate front-end shell tied to the admin client record */
body.client-portal-mode .sidebar,
body.client-portal-mode .topbar,
body.client-portal-mode .mobile-nav-toggle,
body.client-portal-mode #mobileNavBackdrop{
  display:none!important;
}
body.client-portal-mode .app-shell{
  grid-template-columns:1fr!important;
}
body.client-portal-mode .main{
  padding:0!important;
  min-height:100vh;
}
body.client-portal-mode .view{
  gap:0;
  min-height:100vh;
}
.client-auth-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:32px;
  background:
    radial-gradient(circle at 15% 10%, rgba(225,191,99,.13), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(47,122,87,.20), transparent 30%),
    linear-gradient(145deg,var(--bg),var(--sidebar));
}
.client-auth-card{
  width:min(1080px,100%);
  padding:28px;
}
.client-auth-brand{display:flex;align-items:flex-start;gap:18px;margin-bottom:24px}
.client-auth-brand h1{font-family:var(--font-display);font-size:clamp(32px,5vw,56px);line-height:.98;margin:6px 0 10px;max-width:780px}
.client-auth-brand p{max-width:760px;line-height:1.55;margin:0}
.client-auth-grid{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px;align-items:stretch}
.client-auth-panel{border:1px solid var(--line);border-radius:24px;padding:20px;background:linear-gradient(145deg,var(--panel-2),var(--panel-3));display:grid;gap:10px;align-content:start}
.client-auth-avatar{width:64px;height:64px;border-radius:22px;display:grid;place-items:center;background:linear-gradient(135deg,var(--green),var(--gold));color:#fff;font-weight:950;font-size:26px}
.client-auth-panel strong{font-size:22px}.client-auth-panel span{color:var(--muted)}
.client-auth-form{border:1px solid var(--line);border-radius:24px;padding:20px;background:rgba(128,128,128,.045);display:grid;gap:12px}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:4px}
.auth-tabs button{border:1px solid var(--line);border-radius:14px;background:var(--input);color:var(--muted);font-weight:950;padding:11px}
.auth-tabs button.active{background:linear-gradient(135deg,rgba(47,122,87,.32),rgba(225,191,99,.14));color:var(--text);border-color:var(--line-strong)}
.client-auth-form .field{display:grid;gap:7px}.client-auth-form .field label{margin:0}
.client-auth-preview-control{margin-top:16px;display:flex;justify-content:flex-end}
.client-only-shell{min-height:100vh;display:grid;grid-template-columns:292px minmax(0,1fr);background:linear-gradient(145deg,var(--bg),var(--sidebar));}
.client-only-sidebar{position:sticky;top:0;height:100vh;padding:22px 18px;display:flex;flex-direction:column;gap:14px;background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2));border-right:1px solid var(--line);overflow:auto;scrollbar-width:none}
.client-only-sidebar::-webkit-scrollbar{display:none}
.client-portal-brand.large{display:flex;align-items:center;gap:12px;padding:0 4px 16px;border-bottom:1px solid var(--line);margin-bottom:2px}
.client-portal-brand.large .avatar{width:46px;height:46px;border-radius:16px;flex:0 0 46px}.client-portal-brand.large strong{display:block}.client-portal-brand.large span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.client-step-nav{display:grid;gap:6px;flex:1;align-content:start}
.portal-menu-link{display:grid;gap:3px;text-decoration:none;color:var(--muted);border:1px solid transparent;border-radius:16px;padding:11px 12px;background:transparent;transition:var(--ease)}
.portal-menu-link span{font-weight:950;color:inherit}.portal-menu-link small{font-size:11px;color:var(--muted)}
.portal-menu-link:hover,.portal-menu-link.active{background:linear-gradient(135deg,rgba(47,122,87,.28),rgba(225,191,99,.12));border-color:var(--line);color:var(--text)}
.client-only-main{padding:28px;display:grid;gap:18px;align-content:start;min-width:0}
.client-hero-panel{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px}
.client-hero-panel h1{font-family:var(--font-display);font-size:clamp(34px,5vw,60px);line-height:.98;margin:6px 0 10px}.client-hero-panel p{max-width:820px;margin:0;line-height:1.55}
.client-hero-progress{min-width:210px;border:1px solid var(--line);border-radius:22px;padding:18px;background:rgba(128,128,128,.045)}
.client-hero-progress strong{display:block;font-size:42px;line-height:1;font-weight:950}.client-hero-progress span{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.12em;font-weight:950;margin:8px 0 0}
.portal-status-stack{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.client-journey-list{display:grid;gap:10px}.journey-row{display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;align-items:start;border:1px solid var(--line);border-radius:18px;padding:13px;background:rgba(128,128,128,.045)}
.journey-row b{width:34px;height:34px;border-radius:13px;display:grid;place-items:center;background:var(--chip);color:var(--gold);font-weight:950}.journey-row.done{border-color:rgba(85,185,133,.32);background:rgba(85,185,133,.08)}.journey-row.done b{background:rgba(85,185,133,.16);color:var(--green-2)}
.journey-row strong{display:block;margin-bottom:3px}.journey-row span{display:block;color:var(--muted);font-size:13px;line-height:1.45}
.support-box{display:grid;gap:12px;align-content:start}.support-box p{margin:0;line-height:1.55}
.readiness-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.readiness-grid div{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(128,128,128,.045)}.readiness-grid span{display:block;color:var(--muted);font-size:11px;letter-spacing:.12em;text-transform:uppercase;font-weight:950}.readiness-grid strong{display:block;font-size:28px;margin-top:8px}
/* Sidebar icon hardening */
.nav-ico{width:31px!important;height:31px!important;min-width:31px!important;min-height:31px!important;max-width:31px!important;max-height:31px!important;aspect-ratio:1/1!important;border-radius:999px!important;line-height:1!important;display:inline-grid!important;place-items:center!important;flex:0 0 31px!important;overflow:hidden!important;box-sizing:border-box!important}
.nav-btn{align-items:center!important}.nav-btn span:not(.nav-ico){min-width:0}
@media(max-width:1120px){.client-auth-grid,.client-only-shell{grid-template-columns:1fr}.client-only-sidebar{position:relative;height:auto}.client-step-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.client-hero-panel{display:grid}.client-hero-progress{min-width:0}.readiness-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.client-auth-page{padding:16px}.client-auth-card{padding:18px}.client-auth-brand{display:grid}.client-step-nav{grid-template-columns:1fr}.client-only-main{padding:16px}.client-hero-panel h1{font-size:34px}.portal-status-stack{justify-content:flex-start}.readiness-grid{grid-template-columns:1fr}}

/* IP-024 role cleanup: shared shell and Sales Client Hub */
body:not(.client-portal-mode) .sidebar{
  position:sticky!important;
  top:0!important;
  height:auto!important;
  min-height:auto!important;
  overflow:visible!important;
}
body:not(.client-portal-mode) #advisorTopBtn{
  position:fixed!important;
  right:24px!important;
  bottom:24px!important;
  z-index:75!important;
  width:58px!important;
  height:58px!important;
  border-radius:18px!important;
  box-shadow:0 18px 45px rgba(0,0,0,.28)!important;
}
.platform-top-account{
  display:flex;
  align-items:center;
  gap:8px;
}
.user-card[hidden]{display:none!important;}
.client-hub-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 14px;
}
.client-hub-tab{
  min-height:40px;
  border:1px solid color-mix(in srgb,var(--gold) 56%,transparent);
  border-radius:6px;
  background:color-mix(in srgb,var(--gold) 8%,var(--panel));
  color:var(--gold-2);
  font-weight:950;
  padding:9px 16px;
  cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(255,221,132,.04);
  transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.client-hub-tab:hover,.client-hub-tab:focus-visible{border-color:var(--gold);color:var(--gold);outline:none;box-shadow:0 0 18px rgba(216,154,61,.2)}
.client-hub-tab.active{background:linear-gradient(135deg,var(--gold),var(--gold-2));border-color:var(--gold-2);color:#171207;box-shadow:0 8px 24px rgba(216,154,61,.34),0 0 18px rgba(216,154,61,.2)}
.sales-client-list{
  display:grid;
  gap:10px;
}
.client-card-secondary{
  grid-template-columns:minmax(190px,.45fr) minmax(260px,1fr) auto!important;
}
.client-card-progress{
  grid-template-columns:auto auto minmax(70px,1fr)!important;
}
.client-card-progress strong{
  color:var(--gold-2);
  font-size:12px;
}
.client-card-badges .status.membership,
.client-card-badges .status.pro,
.client-card-badges .status.auto,
.client-card-badges .status.elite{
  background:transparent;
  border-color:rgba(225,191,99,.36);
  color:var(--gold-2);
}
.client-card-badges .status.new-client{
  background:rgba(85,185,133,.14);
  border-color:rgba(85,185,133,.28);
  color:var(--green-2);
}
@media(max-width:760px){
  body:not(.client-portal-mode) #advisorTopBtn{
    right:16px!important;
    bottom:16px!important;
  }
  .client-card-secondary,
  .client-card-progress{
    grid-template-columns:1fr!important;
  }
}

/* Client Portal overview cleanup */
.client-video-intro{
  display:grid;
  grid-template-columns:minmax(260px,420px) minmax(0,1fr);
  gap:18px;
  align-items:center;
  padding:18px;
}
.video-placeholder{
  min-height:220px;
  border:1px solid var(--line);
  border-radius:24px;
  background:linear-gradient(135deg,rgba(47,122,87,.22),rgba(225,191,99,.12));
  display:grid;
  place-items:center;
  align-content:center;
  gap:8px;
  text-align:center;
  color:var(--text);
}
.video-placeholder span{
  width:62px;
  height:62px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.14);
  border:1px solid var(--line-strong);
  font-size:24px;
  padding-left:3px;
}
.video-placeholder strong{font-size:20px}
.video-placeholder small{color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.client-video-intro h3{font-family:var(--font-display);font-size:30px;margin:6px 0 8px}
.client-video-intro p{line-height:1.55;margin:0 0 14px;max-width:760px}
@media(max-width:920px){.client-video-intro{grid-template-columns:1fr}.video-placeholder{min-height:180px}}

/* Client Portal simplified overview + Growth Advisor */
.client-next-step-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:22px;
}
.client-next-step-card h3{
  font-family:var(--font-display);
  font-size:clamp(26px,3vw,40px);
  line-height:1.02;
  margin:6px 0 8px;
}
.next-step-action{
  display:grid;
  gap:10px;
  justify-items:end;
  min-width:220px;
}
.next-step-action span{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.client-health-chat{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:95;
}
.client-health-orb{
  width:64px;
  height:64px;
  border-radius:999px;
  display:grid;
  place-items:center;
  border:1px solid var(--gold-line);
  background:linear-gradient(135deg,var(--green),var(--gold));
  color:white;
  box-shadow:0 22px 54px rgba(0,0,0,.32);
  cursor:pointer;
  transition:var(--ease);
}
.client-health-orb:hover{transform:translateY(-2px)}
.client-health-orb span{
  width:42px;
  height:42px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.28);
  font-weight:950;
  font-size:20px;
}
.client-health-panel{
  position:absolute;
  right:0;
  bottom:78px;
  width:min(420px,calc(100vw - 32px));
  max-height:min(640px,calc(100vh - 120px));
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px;
  border:1px solid var(--gold-line);
  border-radius:24px;
  background:linear-gradient(145deg,var(--panel),var(--panel-2));
  box-shadow:0 30px 80px rgba(0,0,0,.42);
  overflow:hidden;
}
.client-health-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding-bottom:12px;
  border-bottom:1px solid var(--line);
}
.client-health-head strong{display:block}
.client-health-head span{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.client-health-logo{
  width:38px;
  height:38px;
  border-radius:999px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--green),var(--gold));
  color:white;
  font-weight:950;
}
.client-health-head .icon-btn{margin-left:auto}
.client-health-messages{
  min-height:160px;
  max-height:300px;
}
.health-quick-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.client-health-form textarea{min-height:50px}
@media(max-width:760px){
  .client-next-step-card{grid-template-columns:1fr}
  .next-step-action{justify-items:start;min-width:0}
  .next-step-action span{justify-content:flex-start}
  .client-health-chat{right:16px;bottom:16px}
  .client-health-orb{width:58px;height:58px}
}


/* Client portal logo + next-step type polish */
.client-brand-mark{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  flex:0 0 46px!important;
  border-radius:16px!important;
  font-size:24px!important;
}
.client-portal-brand.large .client-brand-mark{
  width:46px!important;
  height:46px!important;
  border-radius:16px!important;
}
.client-health-orb.advisor-logo-btn{
  width:64px!important;
  height:64px!important;
  border-radius:18px!important;
  padding:0;
}
.client-health-orb.advisor-logo-btn span{
  width:42px!important;
  height:42px!important;
  border-radius:50%!important;
}
.client-health-logo.brand-mark.mini{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  flex:0 0 38px!important;
  border-radius:14px!important;
  font-size:20px!important;
  box-shadow:0 0 0 3px rgba(225,191,99,.035),0 10px 24px rgba(0,0,0,.18);
}
.client-next-step-card{
  padding:18px 20px!important;
  align-items:center;
}
.client-next-step-card h3{
  font-size:clamp(20px,2.1vw,28px)!important;
  line-height:1.14!important;
  margin:5px 0 7px!important;
  max-width:820px;
}
.client-next-step-card p{
  margin:0;
  font-size:13px;
  line-height:1.45;
}
@media(max-width:760px){
  .client-health-orb.advisor-logo-btn{width:58px!important;height:58px!important}
}

/* Client Portal first-pass training sections */
.client-step-nav button.portal-menu-link{
  width:100%;
  text-align:left;
  font-family:inherit;
  cursor:pointer;
}
.client-section-page{
  display:grid;
  gap:16px;
}
.client-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  padding:22px;
  border:1px solid var(--line);
  border-radius:28px;
  background:linear-gradient(145deg,var(--panel),var(--panel-2));
  box-shadow:var(--shadow-soft);
}
.client-section-head h2{
  font-family:var(--font-display);
  font-size:clamp(34px,4vw,58px);
  line-height:.98;
  margin:6px 0 0;
}
.section-copy{
  margin:0;
  max-width:820px;
  line-height:1.55;
}
.portal-checklist-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.portal-check-item{
  border:1px solid var(--line);
  border-radius:20px;
  padding:14px;
  background:rgba(128,128,128,.045);
  color:var(--text);
  text-align:left;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  grid-template-areas:"dot title" "dot desc";
  gap:4px 10px;
  cursor:pointer;
  transition:var(--ease);
  font-family:inherit;
}
.portal-check-item:hover{transform:translateY(-1px);border-color:var(--line-strong)}
.portal-check-item .check-dot{
  grid-area:dot;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--chip);
  color:var(--gold);
  font-weight:950;
}
.portal-check-item strong{grid-area:title;font-size:14px}
.portal-check-item small{grid-area:desc;color:var(--muted);line-height:1.35}
.portal-check-item.done{
  background:rgba(85,185,133,.08);
  border-color:rgba(85,185,133,.32);
}
.portal-check-item.done .check-dot{background:rgba(85,185,133,.18);color:var(--green-2)}
.training-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.training-grid.two{margin-top:14px}
.training-card,.portal-quiz,.support-panel,.portal-review-card{
  border:1px solid var(--line);
  border-radius:24px;
  padding:16px;
  background:rgba(128,128,128,.045);
}
.training-card h3{font-family:var(--font-display);font-size:28px;line-height:1.05;margin:0 0 8px}
.training-card p{margin:0 0 14px;line-height:1.5}
.portal-quiz{display:grid;gap:12px;background:rgba(0,0,0,.08)}
.portal-quiz.complete{border-color:rgba(85,185,133,.32);background:rgba(85,185,133,.06)}
.portal-quiz-head{display:flex;justify-content:space-between;align-items:start;gap:10px}
.portal-quiz-head h4{margin:4px 0 0;font-size:16px}
.quiz-question{display:grid;gap:8px;border-top:1px solid var(--line);padding-top:12px}
.quiz-question strong{font-size:13px;line-height:1.35}
.quiz-options{display:grid;gap:7px}
.quiz-option{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 11px;
  background:var(--input);
  color:var(--text);
  text-align:left;
  font-weight:800;
  cursor:pointer;
}
.quiz-option:hover{border-color:var(--line-strong);background:rgba(200,162,74,.08)}
.quiz-feedback{margin:0;padding:10px 12px;border-radius:14px;font-weight:900}
.quiz-feedback.ok{background:rgba(85,185,133,.12);color:var(--green-2)}
.quiz-feedback.bad{background:rgba(242,154,96,.12);color:#ffbd8a}
.archetype-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.archetype-card{
  border:1px solid var(--line);
  border-radius:22px;
  padding:14px;
  background:rgba(128,128,128,.045);
}
.archetype-card span{
  width:34px;
  height:34px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,rgba(47,122,87,.28),rgba(225,191,99,.14));
  border:1px solid var(--line);
  color:var(--gold);
  font-weight:950;
  margin-bottom:10px;
}
.archetype-card h4{margin:0 0 6px;font-size:16px}
.archetype-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}
.portal-bullets{margin:12px 0 0;padding-left:18px;color:var(--muted);line-height:1.7}
.full-video-card .video-placeholder.large{min-height:300px}
.readiness-card strong{display:block;font-size:34px;line-height:1}
.readiness-card span{display:block;margin:8px 0 10px;color:var(--muted);font-weight:950;text-transform:uppercase;letter-spacing:.08em;font-size:11px}
.support-panel{display:grid;gap:10px;max-width:780px}
.support-panel h3{font-family:var(--font-display);font-size:34px;margin:0}
@media(max-width:1080px){
  .portal-checklist-grid,.archetype-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .training-grid{grid-template-columns:1fr}
}
@media(max-width:680px){
  .client-section-head{display:grid;align-items:start}
  .portal-checklist-grid,.archetype-grid{grid-template-columns:1fr}
}

/* Client Portal course cleanup: remove duplicate intro/next pages, strengthen learning pages */
.portal-video-module{
  display:grid;
  grid-template-columns:minmax(260px,420px) minmax(0,1fr);
  gap:18px;
  align-items:center;
  padding:18px;
  border-color:var(--line-strong);
}
.video-placeholder.course-video{
  min-height:210px;
  background:radial-gradient(circle at 18% 14%,rgba(225,191,99,.18),transparent 36%),linear-gradient(135deg,rgba(47,122,87,.22),rgba(225,191,99,.10));
}
.portal-video-module h3{
  font-family:var(--font-display);
  font-size:clamp(26px,3vw,38px);
  line-height:1.02;
  margin:6px 0 8px;
}
.portal-video-module p{line-height:1.55;margin:0 0 10px;max-width:820px}
.vega-video-frame{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  overflow:hidden;
  background:#020806;
  border:1px solid var(--line-strong);
  border-radius:8px;
}
.vega-video-player{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  border:0;
}
.training-video-card{
  display:block;
  width:100%;
  min-width:0;
  padding:18px;
  overflow:hidden;
}
.training-video-frame{
  width:100%;
  aspect-ratio:16/9;
  overflow:hidden;
  border:1px solid var(--line-strong);
  border-radius:8px;
  background:#020806;
}
.training-video-frame iframe{
  display:block;
  width:100%;
  height:100%;
  border:0;
}
.bunny-lesson-frame{
  background-color:#020806;
  background-position:center;
  background-repeat:no-repeat;
  background-size:cover;
}
.training-video-footer{
  display:grid;
  gap:12px;
  padding-top:14px;
}
.training-video-footer.compact{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.training-video-footer p{margin:0;color:var(--muted);line-height:1.55}
.training-video-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.training-video-actions>span,
.training-video-footer.compact>span{color:var(--muted);font-size:12px}
.training-video-card:fullscreen{
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:0;
  background:#000;
}
.training-video-card:fullscreen .training-video-frame{
  width:100vw;
  max-height:100vh;
  border:0;
  border-radius:0;
}
.training-video-frame:fullscreen{
  width:100vw;
  height:100vh;
  border:0;
  border-radius:0;
  background:#000;
}
.training-video-frame:fullscreen iframe{width:100%;height:100%}
.vega-video-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
.vega-video-meta span{
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:6px;
  color:var(--muted);
  font-size:12px;
}
.vega-related-lessons{padding:18px}
.vega-related-lessons h3{margin:6px 0 14px}
.vega-related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.vega-completion-status{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.vega-completion-status span{
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:6px;
  color:var(--muted);
  font-size:12px;
}
.vega-completion-status span.done{
  border-color:rgba(48,181,116,.42);
  background:rgba(48,181,116,.10);
  color:var(--good);
}
.lesson-panel-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.lesson-panel.card,.pc-setup-note.card{
  padding:16px;
  border-radius:24px;
  border:1px solid var(--line);
  background:rgba(128,128,128,.045);
}
.lesson-panel h3,.pc-setup-note h3{
  font-family:var(--font-display);
  font-size:28px;
  line-height:1.05;
  margin:0 0 8px;
}
.lesson-panel p,.pc-setup-note p{margin:0;line-height:1.55}
.module-points{
  margin:0 0 14px;
  padding-left:18px;
  color:var(--muted);
  line-height:1.55;
  font-size:13px;
}
.archetype-grid.rich-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.archetype-card.rich{
  display:grid;
  gap:7px;
  align-content:start;
  min-height:220px;
}
.archetype-card.rich span{
  width:40px;
  height:40px;
  font-size:18px;
  border-radius:15px;
}
.archetype-card.rich p{
  color:var(--muted);
  font-size:12.5px;
  line-height:1.45;
}
.archetype-card.rich p b{color:var(--text)}
.quiz-option.selected{border-color:var(--line-strong);background:rgba(225,191,99,.10)}
.quiz-option.correct{border-color:rgba(85,185,133,.45);background:rgba(85,185,133,.10)}
.quiz-option.wrong{border-color:rgba(242,154,96,.45);background:rgba(242,154,96,.10)}
.portal-quiz-head .micro{margin:4px 0 0;color:var(--muted);font-size:11px;letter-spacing:.04em;text-transform:none}
@media(max-width:1080px){
  .portal-video-module,.lesson-panel-grid{grid-template-columns:1fr}
  .archetype-grid.rich-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
  .archetype-grid.rich-grid{grid-template-columns:1fr}
  .portal-video-module{padding:14px}
}

/* Client Portal journey language pass */
.journey-intro.card{
  padding:18px 20px;
  border:1px solid var(--line-strong);
  border-radius:26px;
  background:linear-gradient(135deg,rgba(47,122,87,.18),rgba(225,191,99,.06));
}
.journey-intro h3{
  font-family:var(--font-display);
  font-size:clamp(28px,3vw,40px);
  line-height:1.02;
  margin:6px 0 8px;
}
.journey-intro p{margin:0;max-width:900px;line-height:1.55}
.client-section-head .spark{color:var(--gold-2)}
.client-next-step-card h3{font-size:clamp(22px,2.2vw,34px)!important;line-height:1.08}
.portal-menu-link small{line-height:1.25}

/* VEGA course breakup: intake-style lesson flow */
.portal-course-flow{
  display:grid;
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  gap:16px;
  align-items:start;
}
.portal-course-side{
  position:sticky;
  top:18px;
  display:grid;
  gap:12px;
  align-content:start;
}
.portal-course-side h3{
  font-family:var(--font-display);
  font-size:28px;
  line-height:1.05;
  margin:6px 0 0;
}
.portal-course-side p{margin:0;line-height:1.5}
.portal-course-map{
  display:grid;
  gap:9px;
  margin-top:4px;
}
.portal-course-step{
  width:100%;
  text-align:left;
}
.portal-course-main{
  display:grid;
  gap:16px;
  overflow:visible;
}
.portal-course-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}
.portal-course-head h3{
  font-family:var(--font-display);
  font-size:clamp(30px,3.5vw,48px);
  line-height:.98;
  margin:6px 0 8px;
}
.portal-course-head p{margin:0;line-height:1.55;max-width:860px}
.portal-course-actions{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-top:1px solid var(--line);
  padding-top:14px;
}
.portal-course-actions .btn[disabled],
.portal-course-step[disabled]{
  opacity:.45;
  cursor:not-allowed;
}
.portal-course-main .portal-video-module{margin:0}
.compact-training-workspace{
  display:grid;
  gap:14px;
  min-width:0;
}
.compact-training-tabs{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  padding:6px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--input);
}
.compact-training-tab{
  min-width:0;
  min-height:68px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-rows:auto auto;
  gap:2px 10px;
  align-items:center;
  padding:11px 12px;
  border:1px solid transparent;
  border-radius:11px;
  background:transparent;
  color:var(--muted);
  text-align:left;
}
.compact-training-tab>span{
  grid-row:1/3;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border:1px solid var(--line);
  border-radius:50%;
  color:var(--gold);
  font-size:10px;
  font-weight:900;
}
.compact-training-tab strong{
  overflow:hidden;
  color:var(--text);
  font-size:13px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.compact-training-tab small{
  overflow:hidden;
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.compact-training-tab:hover{border-color:var(--line-strong);color:var(--text)}
.compact-training-tab.active{
  border-color:var(--line-strong);
  background:var(--green);
  color:#fff;
}
.compact-training-tab.active strong,
.compact-training-tab.active small{color:#fff}
.compact-training-tab.active>span{
  border-color:rgba(255,255,255,.45);
  color:#fff;
}
.compact-training-tab.done:not(.active)>span{
  border-color:rgba(85,185,133,.48);
  background:rgba(85,185,133,.12);
  color:var(--green-2);
}
.compact-training-stage-stack{min-width:0}
.compact-training-stage{
  display:grid;
  gap:14px;
  min-width:0;
  animation:compactTrainingStageIn .22s ease-out;
}
.compact-training-stage[hidden]{display:none!important}
.compact-learning-summary{
  display:grid;
  grid-template-columns:minmax(150px,.35fr) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.compact-learning-summary h3{margin:0}
.compact-learning-summary .module-points{margin:0}
.compact-cue-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  border-block:1px solid var(--line);
}
.compact-cue-list>div{
  min-width:0;
  padding:16px;
  border-right:1px solid var(--line);
}
.compact-cue-list>div:last-child{border-right:0}
.compact-cue-list p{margin:7px 0 0;color:var(--muted);line-height:1.5}
.compact-stage-complete{
  display:grid;
  gap:6px;
  min-height:180px;
  place-content:center;
  text-align:center;
}
.compact-stage-complete strong{font-family:var(--font-display);font-size:28px}
.compact-stage-complete p{margin:0;color:var(--muted)}
@keyframes compactTrainingStageIn{
  from{opacity:0;transform:translateY(5px)}
  to{opacity:1;transform:none}
}
@media(max-width:1080px){
  .portal-course-flow{grid-template-columns:1fr}
  .portal-course-side{position:relative;top:auto}
}
@media(max-width:680px){
  .portal-course-head{display:grid}
  .portal-course-actions{display:grid;grid-template-columns:1fr}
  .compact-training-tabs{grid-template-columns:1fr}
  .compact-training-tab{min-height:54px}
  .compact-learning-summary,
  .compact-cue-list{grid-template-columns:1fr}
  .compact-cue-list>div{border-right:0;border-bottom:1px solid var(--line)}
  .compact-cue-list>div:last-child{border-bottom:0}
}

/* HELIOS course breakup: intake-style archetype flow */
.helios-course-flow .portal-course-side{border-color:var(--line-strong)}
.helios-course-head{align-items:flex-start}
.helios-lesson-title{
  display:flex;
  align-items:flex-start;
  gap:16px;
}
.helios-symbol{
  flex:0 0 58px;
  width:58px;
  height:58px;
  border-radius:22px;
  display:grid;
  place-items:center;
  font-family:var(--font-display);
  font-size:30px;
  color:var(--gold-2);
  background:linear-gradient(135deg,rgba(47,122,87,.24),rgba(225,191,99,.13));
  border:1px solid var(--line-strong);
  box-shadow:var(--shadow-sm);
}
.helios-course-flow .lesson-panel-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.helios-course-flow .lesson-panel h3{font-size:24px}
@media(max-width:1180px){
  .helios-course-flow .lesson-panel-grid{grid-template-columns:1fr}
}
@media(max-width:680px){
  .helios-lesson-title{display:grid;gap:12px}
  .helios-symbol{width:50px;height:50px;flex-basis:50px;border-radius:18px;font-size:26px}
}

/* Computer setup vertical why checklist */
.portal-why-checklist{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:14px;
  max-width:980px;
}
.portal-why-check-item{
  border:1px solid var(--line);
  border-radius:22px;
  padding:16px;
  background:rgba(128,128,128,.045);
  color:var(--text);
  text-align:left;
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:12px;
  cursor:pointer;
  transition:var(--ease);
  font-family:inherit;
  width:100%;
}
.portal-why-check-item:hover{
  transform:translateY(-1px);
  border-color:var(--line-strong);
  background:rgba(128,128,128,.065);
}
.portal-why-check-item .check-dot{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:var(--chip);
  color:var(--gold);
  font-weight:950;
  line-height:1;
}
.portal-why-check-item.done{
  background:rgba(85,185,133,.08);
  border-color:rgba(85,185,133,.34);
}
.portal-why-check-item.done .check-dot{
  background:rgba(85,185,133,.18);
  color:var(--green-2);
}
.why-check-content{
  display:grid;
  gap:6px;
}
.why-check-content strong{
  font-size:15px;
  line-height:1.2;
}
.why-check-content small{
  color:var(--muted);
  line-height:1.45;
}
.why-check-content em{
  font-style:normal;
  color:var(--text-soft);
  line-height:1.45;
  border-left:3px solid rgba(208,168,92,.48);
  padding-left:10px;
}
.why-check-content em b{
  color:var(--gold);
  font-weight:950;
}
@media(max-width:680px){
  .portal-why-check-item{
    grid-template-columns:32px minmax(0,1fr);
    padding:14px;
  }
  .portal-why-check-item .check-dot{
    width:30px;
    height:30px;
  }
}

/* Client portal payment agreement card */
.portal-payment-card{
  margin-top:18px;
  padding:20px;
  display:grid;
  gap:16px;
  border-color:rgba(200,162,74,.26);
  background:linear-gradient(145deg,var(--panel),var(--panel-2));
}
.portal-payment-title{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid rgba(200,162,74,.16);
  padding-bottom:12px;
}
.portal-payment-title h3{
  margin:4px 0 0;
  font-family:var(--font-display);
  font-size:1.45rem;
  line-height:1.05;
}
.portal-payment-grid{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:14px;
  align-items:stretch;
}
.payment-mini-card{
  min-width:0;
  border:1px solid rgba(200,162,74,.18);
  border-radius:22px;
  padding:17px;
  background:linear-gradient(145deg,rgba(8,24,17,.72),rgba(19,39,28,.88));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
}
.payment-mini-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.payment-mini-card h4{
  margin:4px 0 8px;
  font-family:var(--font-display);
  font-size:1.28rem;
  line-height:1.1;
  color:var(--text);
}
.payment-mini-card p{
  margin:0;
  color:var(--muted);
  line-height:1.5;
  font-size:.92rem;
}
.payment-status-paid{
  min-width:118px;
  border:1px solid rgba(85,185,133,.32);
  border-radius:18px;
  padding:12px 14px;
  text-align:center;
  background:rgba(85,185,133,.12);
  color:var(--green-2);
}
.payment-status-paid strong{
  display:block;
  font-size:1.22rem;
  line-height:1;
  color:var(--green-2);
}
.payment-status-paid span{
  display:block;
  margin-top:6px;
  font-size:.76rem;
  color:var(--muted);
}
.payment-progress-row{
  display:grid;
  grid-template-columns:minmax(110px,150px) 1fr minmax(90px,120px);
  gap:12px;
  align-items:center;
  margin-top:16px;
  padding:13px;
  border:1px solid rgba(200,162,74,.16);
  border-radius:18px;
  background:rgba(0,0,0,.13);
}
.payment-progress-row strong,
.payment-remaining strong{
  display:block;
  font-size:.96rem;
  color:var(--text);
}
.payment-progress-row span,
.payment-remaining span{
  display:block;
  margin-top:4px;
  font-size:.76rem;
  color:var(--muted);
}
.payment-remaining{
  text-align:right;
}
.payment-reminder-card{
  display:grid;
  align-content:space-between;
  gap:16px;
  border-color:rgba(216,154,61,.24);
}
.payment-due-block{
  border-top:1px solid rgba(200,162,74,.16);
  padding-top:13px;
  text-align:right;
}
.payment-due-block strong,
.payment-due-block span{
  display:block;
}
.payment-due-block strong{
  color:var(--gold-2);
  font-size:1.05rem;
}
.payment-due-block span{
  margin-top:4px;
  color:var(--muted);
  font-size:.82rem;
}
@media (max-width: 980px){
  .portal-payment-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width: 680px){
  .portal-payment-title,
  .payment-mini-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .payment-progress-row{
    grid-template-columns:1fr;
  }
  .payment-remaining,
  .payment-due-block{
    text-align:left;
  }
}

/* First-visit client intake welcome modal */
.welcome-modal{position:relative;display:grid;gap:14px;padding:2px 0 4px;animation:fadeSlide 240ms ease}
.welcome-modal:before{content:"";position:absolute;inset:-20px -20px auto auto;width:180px;height:180px;border:1px solid rgba(200,162,74,.16);border-radius:54px;transform:rotate(22deg);pointer-events:none}
.welcome-mark{width:62px;height:62px;border-radius:22px;display:grid;place-items:center;background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#111;font-family:var(--font-display);font-size:32px;font-weight:900;box-shadow:0 20px 50px rgba(200,162,74,.18)}
.welcome-modal h3{font-family:var(--font-display);font-size:34px;line-height:1.04;margin:0;max-width:680px}
.welcome-progress-card{border:1px solid var(--line);border-radius:20px;padding:14px;background:linear-gradient(145deg,var(--panel-2),var(--panel-3));box-shadow:var(--glow)}
.welcome-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:2px}
.welcome-grid div{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(128,128,128,.05)}
.welcome-grid strong{display:block;color:var(--gold);font-size:12px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:8px}
.welcome-grid span{display:block;color:var(--muted);line-height:1.45;font-size:13px}
.welcome-actions{margin-top:4px}
@media(max-width:760px){.welcome-grid{grid-template-columns:1fr}.welcome-modal h3{font-size:28px}.welcome-actions{flex-direction:column}.welcome-actions .btn{width:100%}}

/* Layout hardening: remove accidental page-level horizontal scroll and improve fit */
html, body { width:100%; max-width:100%; overflow-x:hidden; }
body { min-width:0; }
.app-shell { width:100%; max-width:100vw; overflow-x:hidden; }
.main, .view, .grid, .card, .table-wrap, .topbar, .top-actions, .wizard-wrap, .wizard-side, .wizard-card, .modal, .modal-body, .welcome-modal, .welcome-grid, .form-grid, .review-grid, .summary-item, .task-item, .asset-row { min-width:0; max-width:100%; }
.card, .summary-item, .task-item, .asset-row, .welcome-grid div, .review-item, td, th, .field, .field input, .field textarea, .field select { overflow-wrap:anywhere; word-break:normal; }
.modal-backdrop { overflow-y:auto; overflow-x:hidden; place-items:center; }
.modal { width:min(820px, calc(100vw - 36px)); max-width:calc(100vw - 36px); overflow-y:auto; overflow-x:hidden; }
.modal-head, .modal-body { max-width:100%; overflow-x:hidden; }
.modal-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; }
.welcome-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; }
.welcome-actions .btn { white-space:normal; flex:0 1 auto; }
.table-wrap { width:100%; overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; }
table { max-width:none; }
.search-box { max-width:100%; }
.kpi-value, .title-wrap h1, .section-head h2, .section-head h3, .wizard-question h2, .welcome-modal h3 { overflow-wrap:normal; }

@media (max-width: 980px) {
  .cols-5, .cols-4, .cols-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .top-actions { justify-content:flex-start; }
  .modal { width:calc(100vw - 28px); max-width:calc(100vw - 28px); }
}

@media (max-width: 640px) {
  .cols-5, .cols-4, .cols-3, .cols-2, .form-grid, .review-grid, .welcome-grid { grid-template-columns:1fr; }
  .modal-backdrop { padding:10px; align-items:start; }
  .modal { width:calc(100vw - 20px); max-width:calc(100vw - 20px); border-radius:22px; }
  .modal-head, .modal-body { padding:16px; }
  .modal-actions, .welcome-actions, .wizard-actions { flex-direction:column-reverse; align-items:stretch; }
  .modal-actions .btn, .welcome-actions .btn, .wizard-actions .btn { width:100%; }
  .search-box { min-width:0; width:100%; }
  .top-actions { width:100%; }
}

/* Intake navigation refinement: compact section arrows instead of a long scroll list */
.wizard-side{overflow:visible;}
.wizard-steps{display:none!important;}
.wizard-current{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 12px;padding:12px 14px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(145deg,rgba(200,162,74,.10),rgba(47,122,87,.08));box-shadow:var(--glow)}
.wizard-current strong{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold)}
.wizard-current span{font-size:13px;color:var(--muted);font-weight:800;text-align:right}
.wizard-map{display:grid;gap:10px;margin-top:12px;overflow:visible;max-height:none;padding:0;}
.step-arrow{position:relative;width:100%;border:1px solid var(--line);border-radius:18px;padding:11px 12px;background:rgba(128,128,128,.045);color:var(--text);display:grid;grid-template-columns:34px minmax(0,1fr) 28px;align-items:center;gap:10px;text-align:left;transition:var(--ease);}
.step-arrow:hover{transform:translateX(2px);border-color:var(--line-strong);background:rgba(200,162,74,.08)}
.step-arrow.active{background:linear-gradient(135deg,rgba(47,122,87,.28),rgba(200,162,74,.16));border-color:rgba(200,162,74,.45);box-shadow:inset 0 0 0 1px rgba(200,162,74,.08), var(--glow)}
.step-arrow.done{color:var(--text)}
.step-num{width:31px;height:31px;border-radius:12px;display:grid;place-items:center;background:var(--chip);color:var(--gold);font-weight:950;font-size:12px;}
.step-copy{min-width:0;display:grid;gap:2px;}
.step-copy strong{font-size:13px;line-height:1.15;white-space:normal;overflow-wrap:anywhere;}
.step-copy small{color:var(--muted);font-size:11px;line-height:1.2;}
.step-mark{width:25px;height:25px;border-radius:999px;display:grid;place-items:center;background:rgba(128,128,128,.10);color:var(--muted);font-weight:950;}
.step-arrow.active .step-mark,.step-arrow.done .step-mark{background:rgba(85,185,133,.14);color:var(--green-2)}
.step-arrow:not(:last-child)::after{content:"";position:absolute;left:27px;bottom:-10px;width:1px;height:10px;background:linear-gradient(180deg,var(--line-strong),transparent);pointer-events:none;}
.wizard-card{min-height:520px;overflow:hidden;}
.wizard-question,.review-item,.check-row{overflow-wrap:anywhere;}

@media(max-width:1200px){
  .wizard-map{grid-template-columns:repeat(2,minmax(0,1fr));}
  .step-arrow:not(:last-child)::after{display:none;}
}
@media(max-width:760px){
  .wizard-map{grid-template-columns:1fr;}
  .wizard-current{align-items:flex-start;flex-direction:column;}
  .wizard-current span{text-align:left;}
}

/* Button and container fit pass: prevent short labels from breaking inside controls */
button,
.btn,
.icon-btn,
.nav-btn,
.theme-toggle button,
.status {
  line-height:1.15;
  overflow-wrap:normal;
  word-break:normal;
}

.btn {
  min-height:42px;
  white-space:nowrap;
  flex-shrink:0;
  text-align:center;
}

.btn.small {
  min-height:36px;
  min-width:68px;
  padding:8px 12px;
  font-size:12px;
  letter-spacing:.01em;
}

.row-actions {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:nowrap;
  min-width:150px;
}

.row-actions .btn {
  width:auto!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  min-width:168px;
  width:168px;
  white-space:nowrap;
}

.table-wrap td,
.table-wrap th {
  overflow-wrap:normal;
  word-break:normal;
}

.table-wrap td:not(:last-child),
.table-wrap th:not(:last-child) {
  overflow-wrap:anywhere;
}

/* Let longer CTA buttons wrap only where wrapping is actually useful */
.modal-actions .btn,
.welcome-actions .btn,
.wizard-actions .btn,
.field.wide > .btn,
.field.wide button.btn {
  white-space:normal;
  min-width:120px;
}

/* Keep compact controls tidy inside cards and headers */
.section-head,
.top-actions,
.wizard-actions,
.modal-actions,
.welcome-actions,
.asset-row,
.metric-row,
.task-item {
  overflow-wrap:normal;
}

.section-head .btn,
.top-actions .btn,
.asset-row .btn,
.task-item .btn {
  white-space:nowrap;
}

.kpi-card,
.summary-item,
.task-item,
.asset-row,
.review-item,
.welcome-grid div {
  line-height:1.35;
}

.kpi-label,
.nav-heading,
.focus-kicker,
.spark,
th,
.field label {
  line-height:1.25;
}

@media(max-width:760px){
  .row-actions{flex-direction:row;justify-content:flex-start;min-width:150px;}
  .row-actions .btn{width:auto!important;}
  .top-actions .btn,
  .section-head .btn{width:auto;max-width:100%;}
  .modal-actions .btn,
  .welcome-actions .btn,
  .wizard-actions .btn,
  .field.wide > .btn,
  .field.wide button.btn{width:100%;}
}


/* Client filters, column controls, and bubbled-up action cards */
.table-tools{display:grid;gap:12px;margin:0 0 16px;padding:14px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,var(--panel-2),var(--panel-3));box-shadow:var(--glow)}
.filter-grid{display:grid;grid-template-columns:repeat(6,minmax(140px,1fr));gap:10px;align-items:end}
.filter-field{display:grid;gap:6px;min-width:0}
.filter-field span{font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);font-weight:900}
.filter-field input,.filter-field select{width:100%;min-width:0;border:1px solid var(--line);border-radius:14px;background:var(--input);color:var(--text);padding:10px 12px;font:inherit;font-weight:700;outline:none}
.column-picker{border:1px solid var(--line);border-radius:16px;background:rgba(128,128,128,.04);padding:10px 12px;max-width:100%;overflow:hidden}
.column-picker summary{cursor:pointer;color:var(--gold);font-weight:950;font-size:12px;letter-spacing:.08em;text-transform:uppercase;list-style:none;display:flex;align-items:center;gap:8px}
.column-picker summary::after{content:'›';font-size:18px;transform:rotate(90deg);transition:var(--ease)}
.column-picker[open] summary::after{transform:rotate(-90deg)}
.column-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:8px;margin-top:12px}
.column-grid label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:13px;padding:9px 10px;background:rgba(128,128,128,.04);font-size:12px;color:var(--muted);font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.attention-card{border-color:rgba(200,162,74,.38)}
.compact-list{gap:8px}
.attention-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid var(--line);border-radius:16px;background:rgba(128,128,128,.045);padding:11px 12px;min-width:0}
.attention-item strong{display:block;font-size:13px;line-height:1.25;overflow-wrap:anywhere}
.attention-badges{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;max-width:220px}
.status.client-action{background:rgba(200,162,74,.16);color:var(--gold);border-color:rgba(200,162,74,.34)}
.status.important{background:rgba(85,185,133,.16);color:var(--green-2);border-color:rgba(85,185,133,.34)}
.status.past-due{background:rgba(223,54,86,.16);color:#df3656;border-color:rgba(223,54,86,.34)}
.status.no{background:rgba(128,128,128,.08);color:var(--muted);border-color:var(--line)}
.table-wrap th,.table-wrap td{vertical-align:top}
@media(max-width:1180px){.filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.column-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.filter-grid,.column-grid{grid-template-columns:1fr}.attention-item{grid-template-columns:1fr}.attention-badges{justify-content:flex-start;max-width:100%}.table-tools{padding:12px}}

/* Clean navigation, role cards, and table fit pass */
.settings-link-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.settings-link-grid .btn{width:auto;min-width:170px}
.role-list{margin:0;padding-left:18px;color:var(--muted);display:grid;gap:10px;line-height:1.5}
.role-list li::marker{color:var(--gold)}

.data-table{table-layout:auto;width:max-content;min-width:100%}
.table-wrap{overflow-x:auto;overflow-y:hidden}
.data-table th,.data-table td{white-space:normal;overflow-wrap:normal;word-break:normal;line-height:1.35}
.data-table th{white-space:nowrap}
.data-table td[data-col="contact"],.data-table td[data-col="company"],.data-table td[data-col="source"],.data-table td[data-col="owner"]{white-space:normal;overflow-wrap:break-word}
.data-table td[data-col="notes"],.data-table td[data-col="expected"],.data-table td[data-col="strategy"],.data-table td[data-col="task"]{white-space:normal;overflow-wrap:break-word;min-width:220px;max-width:420px}
.data-table td[data-col="nextAction"]{min-width:150px;max-width:260px;overflow-wrap:break-word}
.data-table th[data-col="actions"],.data-table td[data-col="actions"]{position:sticky;right:0;background:var(--panel);z-index:2;box-shadow:-10px 0 18px rgba(0,0,0,.12)}
.data-table th[data-col="actions"]{z-index:3;background:var(--panel-2)}
.data-table td[data-col="actions"]{min-width:170px;width:170px;white-space:nowrap}
.table-pipeline{min-width:1120px}
.table-pipeline th[data-col="contact"],.table-pipeline td[data-col="contact"]{min-width:145px;width:160px}
.table-pipeline th[data-col="company"],.table-pipeline td[data-col="company"]{min-width:145px;width:160px}
.table-pipeline th[data-col="source"],.table-pipeline td[data-col="source"]{min-width:100px;width:110px}
.table-pipeline th[data-col="stage"],.table-pipeline td[data-col="stage"]{min-width:130px;width:140px}
.table-pipeline th[data-col="value"],.table-pipeline td[data-col="value"]{min-width:110px;width:120px;white-space:nowrap}
.table-pipeline th[data-col="owner"],.table-pipeline td[data-col="owner"]{min-width:140px;width:150px}
.table-pipeline th[data-col="notes"],.table-pipeline td[data-col="notes"]{min-width:280px;width:34vw;max-width:520px}
.table-pipeline th[data-col="important"],.table-pipeline td[data-col="important"],
.table-pipeline th[data-col="clientAction"],.table-pipeline td[data-col="clientAction"],
.table-pipeline th[data-col="reminderDate"],.table-pipeline td[data-col="reminderDate"],
.table-pipeline th[data-col="lastTouch"],.table-pipeline td[data-col="lastTouch"]{min-width:130px}
.row-actions .btn.small{min-width:72px;text-align:center}
@media(max-width:760px){.settings-link-grid .btn{width:100%;}.data-table th[data-col="actions"],.data-table td[data-col="actions"]{position:static;box-shadow:none}}


/* --- Premium mockup alignment pass: darker private-capital UI, green CTAs, gold accents --- */
html[data-theme="dark"]{
  --bg:#050d0a;
  --bg-2:#0a1511;
  --panel:#0d1a15;
  --panel-2:#101f18;
  --panel-3:#15291f;
  --sidebar:#04120d;
  --sidebar-2:#0b271b;
  --text:#f6f0df;
  --muted:#a5b1a5;
  --soft:#d4b967;
  --line:rgba(212,185,103,.18);
  --line-strong:rgba(212,185,103,.42);
  --green:#0f4d35;
  --green-2:#2f8e61;
  --gold:#b8892e;
  --gold-2:#e1bf63;
  --shadow:0 28px 90px rgba(0,0,0,.42);
  --glow:0 0 0 1px rgba(225,191,99,.16),0 22px 75px rgba(15,77,53,.22);
}
html[data-theme="light"]{
  --bg:#f8f4eb;
  --bg-2:#fffdf7;
  --panel:#fffaf1;
  --panel-2:#f8f1e5;
  --panel-3:#efe3ce;
  --sidebar:#fffaf0;
  --sidebar-2:#f6eedf;
  --text:#101d17;
  --muted:#66736a;
  --soft:#8e773f;
  --line:rgba(38,62,47,.14);
  --line-strong:rgba(184,137,46,.34);
  --green:#06462f;
  --green-2:#1e714c;
  --gold:#b8892e;
  --gold-2:#d6ac4d;
}
body{
  overflow-x:hidden;
  background:
    radial-gradient(circle at 15% 8%,rgba(225,191,99,.10),transparent 24%),
    radial-gradient(circle at 85% 0%,rgba(27,104,71,.18),transparent 24%),
    linear-gradient(135deg,var(--bg),var(--bg-2));
}
html[data-theme="dark"] .app-shell{
  background:
    linear-gradient(180deg,rgba(225,191,99,.035),transparent 34%),
    radial-gradient(circle at 96% 6%,rgba(225,191,99,.08),transparent 17%);
}
.sidebar{
  border-right-color:rgba(225,191,99,.28);
  box-shadow:18px 0 54px rgba(0,0,0,.18);
}
html[data-theme="dark"] .sidebar{
  background:
    radial-gradient(circle at 15% 6%,rgba(225,191,99,.10),transparent 20%),
    linear-gradient(180deg,#052016,#03100b 68%,#020906);
}
.brand-block{gap:16px;padding-bottom:18px;}
.brand-mark{
  position:relative;
  width:58px;height:58px;border-radius:18px;
  background:radial-gradient(circle at 50% 42%,rgba(225,191,99,.18),transparent 40%),linear-gradient(145deg,rgba(225,191,99,.16),rgba(15,77,53,.18));
  border:1px solid rgba(225,191,99,.58);
  color:var(--gold-2);
  box-shadow:0 0 0 5px rgba(225,191,99,.035),0 16px 38px rgba(0,0,0,.24);
  font-family:var(--font-display);
  font-size:31px;
  line-height:1;
}
.brand-mark span{position:relative;z-index:2;}
.brand-mark:before,.brand-mark:after{
  content:"";position:absolute;inset:7px;border:1px solid rgba(225,191,99,.45);border-radius:14px;transform:rotate(45deg);pointer-events:none;
}
.brand-mark:after{inset:13px;border-color:rgba(225,191,99,.28);transform:rotate(0deg);border-radius:50%;}
.brand-name{font-size:20px;color:var(--text);text-shadow:0 0 24px rgba(225,191,99,.16)}
.brand-sub{color:var(--gold-2);opacity:.92;}
.nav{gap:20px;}
.nav-heading{color:var(--gold-2);opacity:.82;}
.nav-btn{border:1px solid transparent;min-height:48px;}
.nav-btn:hover{background:rgba(21,75,52,.38);border-color:rgba(225,191,99,.12);}
.nav-btn.active{
  position:relative;
  background:linear-gradient(135deg,rgba(15,77,53,.92),rgba(19,91,61,.74));
  border-color:rgba(225,191,99,.50);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 15px 34px rgba(0,0,0,.18);
}
.nav-btn.active:after{content:"";position:absolute;right:-1px;top:10px;bottom:10px;width:3px;border-radius:999px;background:var(--gold-2);box-shadow:0 0 16px rgba(225,191,99,.65)}
.nav-ico{background:rgba(225,191,99,.08);border:1px solid rgba(225,191,99,.16);}
.focus-card{
  background:linear-gradient(150deg,rgba(15,77,53,.72),rgba(8,29,21,.82));
  border-color:rgba(225,191,99,.48);
}
.focus-card h3{font-size:19px;color:var(--gold-2)}
.focus-card:before{content:"★";position:absolute;right:18px;top:14px;color:var(--gold-2);font-size:18px;}
.user-card{border-color:rgba(225,191,99,.22);background:rgba(15,77,53,.24);}
.main{padding:30px 32px;}
.topbar{align-items:flex-start;margin-bottom:26px;}
.title-wrap h1{font-size:38px;color:var(--text);}
.spark{color:var(--gold-2)}
.top-actions{gap:12px;}
.top-pill,.date-pill{
  height:42px;
  background:rgba(11,25,18,.72);
  border-color:rgba(225,191,99,.36)!important;
  color:var(--text);
  box-shadow:none;
  white-space:nowrap;
}
html[data-theme="light"] .top-pill,html[data-theme="light"] .date-pill{background:var(--panel);}
.search-box{min-width:330px;height:42px;box-shadow:none;border-color:rgba(225,191,99,.22);}
.search-box kbd{
  border:1px solid var(--line);border-radius:8px;padding:2px 7px;font-size:11px;color:var(--muted);background:rgba(128,128,128,.08);white-space:nowrap;
}
.notify-btn,.top-avatar{
  width:40px;height:40px;border-radius:999px;border:1px solid rgba(225,191,99,.34);background:rgba(15,77,53,.34);color:var(--gold-2);display:grid;place-items:center;font-weight:950;position:relative;
}
.notify-btn span{position:absolute;right:-4px;top:-5px;background:var(--gold);color:#111;border-radius:999px;font-size:10px;padding:2px 5px;}
.top-avatar{background:linear-gradient(145deg,rgba(15,77,53,.95),rgba(225,191,99,.20));color:#f8f0dd;}
.theme-toggle{border-color:rgba(225,191,99,.36);background:rgba(8,18,13,.68);}
html[data-theme="light"] .theme-toggle{background:var(--panel);}
.theme-toggle button.active{background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#10160f;box-shadow:0 8px 22px rgba(184,137,46,.22)}
.btn.primary{
  background:linear-gradient(135deg,#0a3f2b,#17764f 58%,#218c5d);
  border-color:rgba(225,191,99,.42);
  color:#fffbe9;
  box-shadow:0 0 0 1px rgba(225,191,99,.10),0 16px 40px rgba(15,77,53,.34);
}
.btn.primary:hover{filter:brightness(1.06);transform:translateY(-1px)}
.btn.ghost,.export-btn{border-color:rgba(225,191,99,.23);background:rgba(128,128,128,.045)}
.card{
  border-color:rgba(225,191,99,.22);
  background:linear-gradient(145deg,rgba(16,31,24,.96),rgba(10,22,17,.96));
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 26px 80px rgba(0,0,0,.28);
}
html[data-theme="light"] .card{background:linear-gradient(145deg,var(--panel),var(--panel-2));box-shadow:0 18px 50px rgba(27,45,34,.08)}
.card.decor:before{border-color:rgba(225,191,99,.18);}
.kpi-card{min-height:158px;}
.kpi-icon{background:rgba(15,77,53,.36);border:1px solid rgba(225,191,99,.20);color:var(--gold-2);}
.kpi-value{font-family:var(--font-display);font-weight:500;font-size:34px;}
.kpi-label{color:var(--gold-2);}
.section-head h2,.section-head h3{color:var(--text);}
.table-wrap{border-color:rgba(225,191,99,.24);background:rgba(7,18,13,.42)}
th{color:var(--gold-2);background:rgba(225,191,99,.035)}
td{line-height:1.45;}
.row-actions .btn{min-width:72px;}
.status{font-size:11px;padding:5px 10px;}
.wizard-side{background:linear-gradient(145deg,rgba(15,77,53,.68),rgba(6,19,13,.94));border-color:rgba(225,191,99,.36);}
html[data-theme="light"] .wizard-side{background:linear-gradient(145deg,var(--panel),var(--panel-2));}
.modal{border-color:rgba(225,191,99,.38);}
.modal-head{background:linear-gradient(135deg,rgba(15,77,53,.28),transparent);}
@media(max-width:1400px){.app-shell{grid-template-columns:280px minmax(0,1fr)}.main{padding:24px}.search-box{min-width:260px}.cols-5{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1020px){.top-pill,.notify-btn,.top-avatar{display:none}.cols-5{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Phase 1 integration readiness hub */
.integration-kpis .kpi-card{min-height:145px}
.integration-hero{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,.7fr);gap:22px;align-items:stretch;overflow:hidden}
.integration-hero:after{content:"";position:absolute;right:-52px;top:-62px;width:210px;height:210px;border:1px solid rgba(225,191,99,.16);border-radius:42%;transform:rotate(28deg);pointer-events:none}
.integration-hero h2{font-family:var(--font-display);font-size:34px;margin:8px 0 10px;line-height:1.05}
.integration-hero-copy p{max-width:820px;line-height:1.65;margin:0}
.integration-next{position:relative;border:1px solid var(--line);border-radius:20px;padding:18px;background:linear-gradient(145deg,rgba(225,191,99,.10),rgba(15,77,53,.12));display:grid;gap:10px;align-content:center;z-index:1}
.integration-next strong{font-family:var(--font-display);font-size:20px;color:var(--gold-2)}
.integration-next span{display:flex;align-items:center;gap:9px;color:var(--muted);font-weight:800;font-size:13px}
.integration-next span:before{content:"";width:8px;height:8px;border-radius:999px;background:var(--gold-2);box-shadow:0 0 16px rgba(225,191,99,.45)}
.integration-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.integration-card{display:grid;gap:15px;min-height:100%}
.integration-card-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center}
.integration-card-head h3{margin:4px 0 0;font-family:var(--font-display);font-size:27px;line-height:1.05;overflow-wrap:anywhere}
.integration-logo{width:52px;height:52px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,rgba(15,77,53,.88),rgba(225,191,99,.14));border:1px solid rgba(225,191,99,.42);color:var(--gold-2);font-weight:950;box-shadow:0 12px 28px rgba(0,0,0,.18);font-size:15px}
.integration-status{white-space:nowrap;border-color:rgba(225,191,99,.28);background:rgba(128,128,128,.08)}
.integration-status.ready-to-connect{background:rgba(47,122,87,.20);color:var(--green-2);border-color:rgba(85,185,133,.35)}
.integration-status.connected{background:rgba(47,122,87,.30);color:#86e4ac;border-color:rgba(134,228,172,.38)}
.integration-status.planned{background:rgba(200,162,74,.14);color:var(--gold-2);border-color:rgba(225,191,99,.34)}
.integration-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.integration-meta span{border:1px solid var(--line);background:rgba(128,128,128,.045);border-radius:16px;padding:11px 12px;color:var(--muted);font-size:13px;display:grid;gap:3px;min-width:0}
.integration-meta strong{color:var(--text);font-size:11px;text-transform:uppercase;letter-spacing:.14em}
.integration-section{border-top:1px solid var(--line);padding-top:12px;min-width:0}
.integration-section strong{display:block;color:var(--gold-2);font-size:12px;text-transform:uppercase;letter-spacing:.15em;margin-bottom:7px}
.integration-section p{margin:0;color:var(--muted);line-height:1.55;font-size:13px;overflow-wrap:anywhere}
.integration-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:4px}
.integration-actions .btn{white-space:nowrap}
.integration-note{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:rgba(128,128,128,.045);line-height:1.5;margin:0}
.integration-log{display:grid;gap:10px}
.log-row{display:grid;grid-template-columns:110px 150px minmax(0,1fr);gap:12px;align-items:start;border:1px solid var(--line);border-radius:16px;padding:13px;background:rgba(128,128,128,.045)}
.log-row span{color:var(--gold-2);font-weight:900;font-size:12px;text-transform:uppercase;letter-spacing:.08em}.log-row strong{color:var(--text)}.log-row p{margin:0;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}
html[data-theme="light"] .integration-card,html[data-theme="light"] .integration-hero{background:linear-gradient(145deg,var(--panel),var(--panel-2))}
html[data-theme="light"] .integration-logo{background:linear-gradient(145deg,rgba(6,70,47,.10),rgba(214,172,77,.16));color:var(--green)}
@media(max-width:1200px){.integration-grid{grid-template-columns:1fr}.integration-hero{grid-template-columns:1fr}.integration-card-head{grid-template-columns:auto minmax(0,1fr);}.integration-card-head .status{grid-column:1/-1;width:max-content;max-width:100%}}
@media(max-width:720px){.integration-meta{grid-template-columns:1fr}.log-row{grid-template-columns:1fr}.integration-actions .btn{width:100%}.integration-hero h2{font-size:28px}}


/* Top bar simplification + quieter mockup-aligned scale */
body{font-size:14px;}
.topbar{align-items:flex-start;display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:20px;}
.compact-top-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:nowrap;width:auto;}
.site-search{width:min(420px,34vw);min-width:260px;box-shadow:none;}
.premium-theme-toggle{height:40px;align-items:center;padding:3px;border-color:rgba(225,191,99,.36);background:rgba(8,18,13,.72);}
.premium-theme-toggle button{height:32px;padding:0 14px;font-size:12px;line-height:1;}
.premium-theme-toggle button.active{background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#10160f;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),0 8px 22px rgba(184,137,46,.20)}
.title-wrap h1{font-size:32px;letter-spacing:-.02em;margin:6px 0 6px;}
.title-wrap p{font-size:13px;}
.spark,.focus-kicker{font-size:9px;letter-spacing:.16em;}
.card{padding:16px;border-radius:20px;}
.section-head{margin-bottom:12px;}
.section-head h2{font-size:22px;}
.section-head h3{font-size:18px;}
.kpi-card{min-height:132px;}
.kpi-label{font-size:9px;letter-spacing:.12em;}
.kpi-value{font-size:28px;margin-top:6px;}
.kpi-icon{width:35px;height:35px;border-radius:13px;font-size:13px;}
.trend{font-size:11px;}
.nav-btn{min-height:42px;padding:9px 11px;font-size:13px;}
.nav-ico{width:27px;height:27px;border-radius:10px;font-size:12px;}
.nav-heading{font-size:9px;}
.focus-card{padding:14px;border-radius:20px;}
.focus-card h3{font-size:16px;}
.focus-card p{font-size:12px;}
.btn{padding:9px 13px;border-radius:13px;font-size:13px;}
.btn.small{padding:6px 9px;font-size:11px;}
.search-box{height:40px;font-size:13px;}
.chart{height:250px;}
.summary-item,.task-item{padding:10px;border-radius:14px;}
th,td{font-size:13px;padding:11px 13px;}
th{font-size:10px;}
.search-hero p{margin-top:0;}
.search-results-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.search-result-card{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.045);padding:14px;display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0;}
.search-result-card h3{font-family:var(--font-display);font-size:18px;margin:4px 0 5px;}
.search-result-card p{margin:0;line-height:1.45;overflow-wrap:anywhere;}
.search-actions{flex:0 0 auto;}
@media(max-width:1180px){.topbar{grid-template-columns:1fr}.compact-top-actions{justify-content:flex-start;width:100%;}.site-search{width:100%;max-width:460px;}.search-results-grid{grid-template-columns:1fr;}}
@media(max-width:760px){.compact-top-actions{flex-wrap:wrap;}.site-search{max-width:100%;min-width:0}.compact-top-actions .btn,.compact-top-actions .theme-toggle{width:auto}.title-wrap h1{font-size:28px}.search-results-grid{grid-template-columns:1fr;}}

/* Pipeline fit pass: no page/table horizontal scrollbar, client-friendly columns */
.table-wrap{overflow-x:hidden!important;overflow-y:visible!important;}
.data-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;}
.data-table th,.data-table td{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.table-pipeline{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;}
.table-pipeline th[data-col="contact"],.table-pipeline td[data-col="contact"]{width:17%!important;}
.table-pipeline th[data-col="source"],.table-pipeline td[data-col="source"]{width:12%!important;}
.table-pipeline th[data-col="stage"],.table-pipeline td[data-col="stage"]{width:13%!important;}
.table-pipeline th[data-col="value"],.table-pipeline td[data-col="value"]{width:11%!important;white-space:nowrap!important;}
.table-pipeline th[data-col="nextAction"],.table-pipeline td[data-col="nextAction"]{width:14%!important;}
.table-pipeline th[data-col="notes"],.table-pipeline td[data-col="notes"]{width:auto!important;max-width:none!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.table-pipeline th[data-col="actions"],.table-pipeline td[data-col="actions"]{width:160px!important;min-width:160px!important;position:static!important;box-shadow:none!important;white-space:nowrap!important;}
.table-pipeline .row-actions{justify-content:flex-end;flex-wrap:nowrap;}
.table-pipeline .row-actions .btn{min-width:72px;white-space:nowrap;}
@media(max-width:900px){
  .table-pipeline th[data-col="source"],.table-pipeline td[data-col="source"]{display:none;}
  .table-pipeline th[data-col="notes"],.table-pipeline td[data-col="notes"]{width:22%!important;}
}

/* Integration two-panel account layout */
.integration-shell{
  display:grid;
  grid-template-columns:minmax(250px,340px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.integration-left{
  position:sticky;
  top:18px;
  display:grid;
  gap:14px;
  min-width:0;
}
.section-head.compact h3{font-size:22px;margin:2px 0 0;line-height:1.05}
.small-copy{font-size:12px;line-height:1.55;margin:0}
.integration-nav-list{display:grid;gap:10px;min-width:0}
.integration-nav-item{
  width:100%;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(128,128,128,.035);
  color:var(--text);
  padding:12px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:11px;
  align-items:center;
  text-align:left;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.integration-nav-item .status{grid-column:2;justify-self:start;margin-top:2px;font-size:10px;max-width:100%;white-space:nowrap}
.integration-nav-item:hover,.integration-nav-item.active{
  border-color:rgba(225,191,99,.54);
  background:linear-gradient(145deg,rgba(15,77,53,.32),rgba(225,191,99,.08));
  box-shadow:0 12px 28px rgba(0,0,0,.16), inset 0 0 0 1px rgba(225,191,99,.06);
}
.integration-nav-item.active{transform:translateX(2px)}
.integration-nav-copy{display:grid;gap:3px;min-width:0}
.integration-nav-copy strong{font-family:var(--font-display);font-size:16px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.integration-nav-copy small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:700}
.integration-right{display:grid;gap:18px;min-width:0}
.integration-logo.small-logo{width:38px;height:38px;border-radius:14px;font-size:11px}
.integration-logo.large-logo{width:64px;height:64px;border-radius:22px;font-size:16px;flex:0 0 auto}
.integration-detail-card{display:grid;gap:16px;overflow:hidden;min-width:0}
.integration-detail-head{display:flex;gap:15px;align-items:flex-start;min-width:0}
.integration-detail-head h2{font-family:var(--font-display);font-size:30px;line-height:1.05;margin:3px 0 5px;overflow-wrap:anywhere}
.integration-detail-head .status{margin-left:auto;white-space:nowrap;max-width:100%}
.min-w-0{min-width:0}
.integration-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.detail-metric{border:1px solid var(--line);background:rgba(128,128,128,.04);border-radius:16px;padding:11px 12px;display:grid;gap:4px;min-width:0}
.detail-metric span{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-weight:900}
.detail-metric strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.account-detail-table{border:1px solid var(--line);border-radius:18px;overflow:hidden;background:rgba(128,128,128,.03)}
.account-detail-row{display:grid;grid-template-columns:minmax(130px,.28fr) minmax(0,1fr);gap:14px;padding:13px 15px;border-bottom:1px solid var(--line);align-items:start;min-width:0}
.account-detail-row:last-child{border-bottom:0}
.account-detail-row span{font-size:11px;letter-spacing:.13em;text-transform:uppercase;color:var(--gold-2);font-weight:950;line-height:1.35}
.account-detail-row p{margin:0;color:var(--text);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.detail-actions{border-top:1px solid var(--line);padding-top:14px}
html[data-theme="light"] .integration-nav-item:hover,
html[data-theme="light"] .integration-nav-item.active{background:linear-gradient(145deg,rgba(6,70,47,.08),rgba(214,172,77,.12))}
@media(max-width:1100px){
  .integration-shell{grid-template-columns:1fr}
  .integration-left{position:relative;top:auto}
  .integration-nav-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .integration-nav-list,.integration-detail-grid,.account-detail-row{grid-template-columns:1fr}
  .integration-detail-head{display:grid;grid-template-columns:auto minmax(0,1fr)}
  .integration-detail-head .status{grid-column:1/-1;margin-left:0;justify-self:start}
  .integration-detail-head h2{font-size:25px}
}

/* Integration connection fields */
.integration-connect-form{
  border:1px solid var(--line);
  border-radius:20px;
  padding:16px;
  background:linear-gradient(145deg,rgba(225,191,99,.055),rgba(15,77,53,.08));
  display:grid;
  gap:14px;
  min-width:0;
}
.form-section-title{display:grid;gap:5px;min-width:0}
.form-section-title strong{font-family:var(--font-display);font-size:20px;line-height:1.1;color:var(--text)}
.form-section-title small{color:var(--muted);font-size:12px;line-height:1.45;max-width:780px}
.integration-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.integration-field-grid .field{min-width:0}
.integration-field-grid .field.wide{grid-column:1/-1}
.integration-field-grid label{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2);font-weight:950;line-height:1.25}
.integration-field-grid input,
.integration-field-grid select,
.integration-field-grid textarea{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(0,0,0,.12);
  color:var(--text);
  padding:10px 12px;
  font:inherit;
  font-size:13px;
  outline:0;
}
.integration-field-grid textarea{min-height:82px;resize:vertical;line-height:1.45}
.integration-field-grid input::placeholder,
.integration-field-grid textarea::placeholder{color:color-mix(in srgb,var(--muted),transparent 30%)}
.integration-field-grid input:focus,
.integration-field-grid select:focus,
.integration-field-grid textarea:focus{border-color:rgba(225,191,99,.62);box-shadow:0 0 0 3px rgba(225,191,99,.10)}
html[data-theme="light"] .integration-connect-form{background:linear-gradient(145deg,rgba(214,172,77,.08),rgba(6,70,47,.035))}
html[data-theme="light"] .integration-field-grid input,
html[data-theme="light"] .integration-field-grid select,
html[data-theme="light"] .integration-field-grid textarea{background:rgba(255,255,255,.72)}
@media(max-width:760px){.integration-field-grid{grid-template-columns:1fr}.integration-connect-form{padding:13px}.form-section-title strong{font-size:18px}}

/* Media Studio split layout */
.media-shell .integration-left{align-self:start}
.media-detail-card{overflow:hidden}
.media-workspace{display:grid;grid-template-columns:minmax(260px,360px) minmax(0,1fr);gap:16px;align-items:start}
.media-ideas-panel{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.035);padding:14px;min-width:0}
.media-idea-list{display:grid;gap:10px;min-width:0}
.media-idea-item{width:100%;border:1px solid var(--line);border-radius:16px;background:rgba(128,128,128,.04);color:var(--text);padding:12px;text-align:left;display:grid;gap:5px;cursor:pointer;transition:var(--ease);min-width:0}
.media-idea-item:hover,.media-idea-item.active{border-color:rgba(225,191,99,.55);background:linear-gradient(145deg,rgba(15,77,53,.28),rgba(225,191,99,.08));box-shadow:inset 0 0 0 1px rgba(225,191,99,.06)}
.media-idea-item strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.media-idea-item small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.media-script-panel{padding:16px;min-width:0}
.media-script-form .field.wide{grid-column:1/-1}
.media-script-form .field textarea[name="script"]{min-height:260px;font-family:inherit;line-height:1.6}
.media-connect-form{border-top:1px solid var(--line);padding-top:14px}
@media(max-width:1100px){.media-workspace{grid-template-columns:1fr}.media-idea-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.media-idea-list{grid-template-columns:1fr}.media-script-form{grid-template-columns:1fr}.media-script-form .field.wide{grid-column:auto}}

/* Stabilization pass: calmer client-facing shell, hidden admin pages, detail modals */
.title-wrap h1{font-size:30px!important;letter-spacing:-.01em}.title-wrap p{font-size:13px}.spark{font-size:9px}.card{padding:16px}.section-head h2{font-size:20px!important}.section-head h3{font-size:17px!important}.kpi-card{min-height:124px}.kpi-value{font-size:25px!important}.kpi-label{font-size:8.5px}.nav{gap:16px}.nav-group{gap:6px}.nav-btn{min-height:40px!important;font-size:12.5px!important}.focus-card h3{font-size:18px}.focus-card p{font-size:12px}.overview-note{display:flex;align-items:center;justify-content:space-between;gap:16px}.overview-note h3{margin:3px 0 5px;font-family:var(--font-display);font-size:20px}.overview-note p{margin:0;font-size:13px}.table-tools{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.045);padding:12px;margin-bottom:14px}.filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;align-items:end}.filter-field span{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:900}.filter-field input,.filter-field select{height:36px;font-size:12px;border-radius:12px}.column-picker{margin-top:10px}.column-picker summary{font-size:12px;color:var(--muted);cursor:pointer}.column-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-top:10px}.column-grid label{font-size:12px;color:var(--muted)}.table-wrap{overflow:hidden!important}.data-table{width:100%!important;table-layout:fixed!important}.data-table th,.data-table td{font-size:12px!important;padding:10px 9px!important;vertical-align:middle}.data-table th{font-size:9px!important;letter-spacing:.12em}.data-table td[data-col="notes"],.data-table td[data-col="expected"]{max-width:180px}.truncate-cell{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.data-table th[data-col="actions"],.data-table td[data-col="actions"]{position:static!important;box-shadow:none!important;width:172px!important;min-width:172px!important;background:transparent!important}.row-actions{display:flex;flex-wrap:nowrap;gap:5px}.row-actions .btn.small{padding:6px 7px;font-size:11px;min-width:45px}.record-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.record-detail-row{border:1px solid var(--line);border-radius:14px;padding:12px;background:rgba(128,128,128,.04);min-width:0}.record-detail-row span{display:block;font-size:9px;letter-spacing:.13em;text-transform:uppercase;color:var(--gold);font-weight:900;margin-bottom:6px}.record-detail-row p{margin:0;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;font-size:13px}.integration-detail-head p,.small-copy,.muted{line-height:1.5}.integration-actions .btn{white-space:normal}.settings-link-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.settings-link-grid .btn{width:100%;justify-content:center}.main{padding:22px}.topbar{margin-bottom:20px!important}.btn{font-size:12px}.btn.primary{box-shadow:0 10px 24px rgba(47,122,87,.16)}
@media(max-width:900px){.overview-note{align-items:flex-start;flex-direction:column}.record-detail-grid{grid-template-columns:1fr}.data-table th[data-col="actions"],.data-table td[data-col="actions"]{width:160px!important;min-width:160px!important}.row-actions .btn.small{font-size:10.5px;padding:6px}}

/* Patch: overview attention item renderer */
.mini-action-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background:rgba(128,128,128,.04);
  min-width:0;
}
.mini-action-copy{min-width:0;display:grid;gap:3px}
.mini-action-copy strong{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.mini-action-copy span{font-size:10.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-action-flags{grid-column:1/-1;display:flex;gap:5px;flex-wrap:wrap;min-width:0}
.micro-btn{padding:6px 9px!important;font-size:10.5px!important;min-width:auto!important;white-space:nowrap!important}

/* Smart Advisor / AI Layer */
.advisor-panel{margin-top:18px;overflow:hidden}
.advisor-suggestion-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.advisor-suggestion{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);background:var(--surface-2);border-radius:14px;padding:12px;min-width:0}
.advisor-suggestion span{color:var(--gold);flex:0 0 auto}
.advisor-suggestion p{margin:0;color:var(--text);font-size:.86rem;line-height:1.45;overflow-wrap:anywhere}
.advisor-drawer-backdrop{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.42);display:flex;justify-content:flex-end;backdrop-filter:blur(2px)}
.advisor-drawer{width:min(520px,100vw);height:100%;background:var(--bg);border-left:1px solid var(--gold-line);box-shadow:-24px 0 60px rgba(0,0,0,.35);display:flex;flex-direction:column;padding:18px;gap:14px;overflow:hidden}
.advisor-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding-bottom:12px}
.advisor-drawer-head h3{margin:0;font-size:1.05rem}
.icon-btn{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:999px;width:34px;height:34px;display:grid;place-items:center;cursor:pointer}
.advisor-messages{display:flex;flex-direction:column;gap:10px;overflow:auto;flex:1;padding:4px 4px 8px}
.advisor-msg{max-width:92%;border:1px solid var(--line);border-radius:16px;padding:12px;background:var(--surface)}
.advisor-msg.user{align-self:flex-end;background:linear-gradient(135deg,var(--green),var(--green-2));color:white;border-color:rgba(255,255,255,.12)}
.advisor-msg.assistant{align-self:flex-start;background:var(--surface-2);border-color:var(--gold-line)}
.advisor-msg p{margin:0;white-space:pre-wrap;line-height:1.5;font-size:.92rem;overflow-wrap:anywhere}
.advisor-chat-form{display:flex;gap:10px;border-top:1px solid var(--line);padding-top:12px}
.advisor-chat-form textarea{min-height:54px;max-height:140px;resize:vertical;flex:1}
.ai-action-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
.compact-static{opacity:.92}
.small-copy{font-size:.86rem;line-height:1.45}
@media (max-width:1000px){.advisor-suggestion-grid{grid-template-columns:1fr}.advisor-chat-form{flex-direction:column}.advisor-drawer{width:100vw}}


/* Advisor-first experience */
.advisor-top-btn{
  min-width:88px;
  justify-content:center;
  border-color:rgba(198,162,74,.72);
  background:linear-gradient(135deg, rgba(198,162,74,.22), rgba(21,82,55,.24));
  color:var(--text);
  box-shadow:0 0 0 1px rgba(198,162,74,.18), 0 14px 40px rgba(0,0,0,.18);
}
.advisor-top-btn:hover{ transform:translateY(-1px); border-color:var(--gold); }
.daily-advisor-brief{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(280px,.75fr);
  gap:18px;
  align-items:start;
  margin-bottom:18px;
  border-color:rgba(198,162,74,.45);
  background:
    radial-gradient(circle at 10% 5%, rgba(198,162,74,.16), transparent 28%),
    linear-gradient(135deg, rgba(16,62,43,.98), rgba(5,19,15,.96));
}
[data-theme="light"] .daily-advisor-brief{
  background:
    radial-gradient(circle at 10% 5%, rgba(198,162,74,.16), transparent 28%),
    linear-gradient(135deg, rgba(255,252,244,.96), rgba(247,243,230,.94));
}
.daily-advisor-main{
  display:flex;
  gap:16px;
  align-items:flex-start;
}
.advisor-orb{
  width:48px;
  height:48px;
  border-radius:18px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  color:#1c2f23;
  background:linear-gradient(135deg, var(--gold), #f0d483);
  box-shadow:0 0 32px rgba(198,162,74,.28);
  font-size:22px;
}
.daily-advisor-brief h2{
  margin:5px 0 8px;
  font-size:clamp(1.35rem, 2.1vw, 2.1rem);
  line-height:1.05;
}
.daily-advisor-brief p{
  max-width:72ch;
  margin:0;
  color:var(--muted);
  font-size:.94rem;
}
.daily-advisor-actions{
  border:1px solid rgba(198,162,74,.25);
  border-radius:18px;
  padding:14px;
  background:rgba(255,255,255,.035);
}
[data-theme="light"] .daily-advisor-actions{ background:rgba(255,255,255,.55); }
.daily-advisor-actions ol{
  margin:0 0 14px;
  padding-left:20px;
  display:grid;
  gap:8px;
  font-size:.86rem;
  color:var(--text);
}
.advisor-brief-btn{ width:100%; }
.advisor-priority-grid{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.advisor-priority-card{
  border:1px solid rgba(198,162,74,.2);
  border-radius:16px;
  padding:13px;
  background:rgba(255,255,255,.035);
  min-width:0;
}
[data-theme="light"] .advisor-priority-card{ background:rgba(255,255,255,.68); }
.advisor-priority-card span{
  display:block;
  margin-bottom:5px;
  color:var(--gold);
  font-size:.66rem;
  letter-spacing:.13em;
  text-transform:uppercase;
  font-weight:800;
}
.advisor-priority-card strong{
  display:block;
  font-size:.92rem;
  line-height:1.2;
  margin-bottom:5px;
}
.advisor-priority-card p{
  font-size:.78rem;
  line-height:1.4;
}
.advisor-priority-card.risk{ border-color:rgba(217,83,79,.33); }
.advisor-priority-card.move{ border-color:rgba(198,162,74,.38); }
.advisor-priority-card.opportunity{ border-color:rgba(82,171,115,.32); }
.page-advisor-brief{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
  margin-bottom:16px;
  border-color:rgba(198,162,74,.38);
  padding:16px 18px;
}
.page-advisor-copy{ min-width:0; }
.page-advisor-copy h3{
  margin:4px 0 8px;
  font-size:1rem;
  line-height:1.25;
  max-width:95ch;
}
.page-advisor-copy ul{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:3px;
  color:var(--muted);
  font-size:.82rem;
}
.advisor-drawer{
  width:min(520px, calc(100vw - 22px));
}
.advisor-drawer-head h3{ font-size:1.15rem; }
.advisor-msg p{ line-height:1.48; }
@media (max-width: 980px){
  .daily-advisor-brief{ grid-template-columns:1fr; }
  .advisor-priority-grid{ grid-template-columns:1fr; }
  .page-advisor-brief{ flex-direction:column; }
  .page-advisor-brief .btn{ width:100%; }
}
@media (max-width: 760px){
  .compact-top-actions{ flex-wrap:wrap; }
  .advisor-top-btn{ order:-1; }
}


/* AI Configuration connection status */
.ai-config-card .card-body,
.ai-config-card{ overflow:visible; }
.ai-status-card{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  border:1px solid rgba(198,162,74,.28);
  border-radius:18px;
  padding:14px;
  margin-bottom:16px;
  background:rgba(255,255,255,.035);
}
[data-theme="light"] .ai-status-card{ background:rgba(255,255,255,.72); }
.ai-status-card h3{ margin:3px 0 5px; font-size:1rem; }
.ai-status-card p{ margin:0; font-size:.82rem; }
.ai-connection-pill{
  flex:0 0 auto;
  border-radius:999px;
  padding:7px 10px;
  font-size:.72rem;
  font-weight:800;
  white-space:nowrap;
  border:1px solid rgba(198,162,74,.3);
}
.ai-connection-pill.connected,
.ai-status-inline.connected{
  color:#8af0a2;
  border-color:rgba(107,214,130,.38);
  background:rgba(57,150,84,.14);
}
[data-theme="light"] .ai-connection-pill.connected,
[data-theme="light"] .ai-status-inline.connected{ color:#116a32; }
.ai-connection-pill.not-connected,
.ai-status-inline.not-connected{
  color:#f0c36d;
  border-color:rgba(198,162,74,.35);
  background:rgba(198,162,74,.12);
}
.ai-status-inline.pending{
  color:var(--text);
  border-color:rgba(198,162,74,.45);
  background:rgba(198,162,74,.16);
}
.ai-status-inline{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  border-radius:999px;
  padding:7px 11px;
  margin:10px 0 8px;
  font-size:.76rem;
  font-weight:800;
  border:1px solid rgba(198,162,74,.22);
}
.ai-button-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.btn.danger-soft{
  border-color:rgba(217,83,79,.35);
  color:#f1a7a2;
}
[data-theme="light"] .btn.danger-soft{ color:#a63a34; }
@media (max-width: 720px){
  .ai-status-card{ flex-direction:column; }
  .ai-connection-pill{ white-space:normal; }
}


/* Advisor logo button + media conversational workspace */
.advisor-logo-btn{
  width:42px;
  height:42px;
  border-radius:16px;
  border:1px solid rgba(198,162,74,.72);
  background:
    radial-gradient(circle at 35% 22%, rgba(232,206,132,.34), transparent 34%),
    linear-gradient(145deg, rgba(14,64,42,.96), rgba(5,23,17,.96));
  color:var(--gold);
  display:grid;
  place-items:center;
  box-shadow:0 0 0 1px rgba(198,162,74,.16), 0 14px 40px rgba(0,0,0,.24);
  cursor:pointer;
  flex:0 0 auto;
}
.advisor-logo-btn span{
  width:28px;
  height:28px;
  border-radius:50%;
  border:1px solid rgba(198,162,74,.58);
  display:grid;
  place-items:center;
  font-family:Georgia, serif;
  font-weight:900;
  font-size:1rem;
  letter-spacing:.02em;
}
.advisor-logo-btn:hover{ transform:translateY(-1px); border-color:var(--gold); box-shadow:0 0 28px rgba(198,162,74,.22); }
.advisor-logo-btn[hidden]{ display:none !important; }

.media-detail-stack{ display:grid; gap:16px; }
.media-workspace-first{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(360px,.9fr);
  gap:16px;
  margin-top:16px;
}
.media-advisor-panel,
.media-script-panel{
  background:rgba(255,255,255,.035);
  border-color:rgba(198,162,74,.22);
}
[data-theme="light"] .media-advisor-panel,
[data-theme="light"] .media-script-panel{
  background:rgba(255,255,255,.72);
}
.media-advisor-chat{ display:grid; gap:12px; min-width:0; }
.media-prompt-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.media-prompt-chips .btn{
  white-space:normal;
  text-align:left;
  justify-content:flex-start;
  line-height:1.2;
}
.media-advisor-messages{
  min-height:250px;
  max-height:420px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px;
  border:1px solid rgba(198,162,74,.18);
  border-radius:18px;
  background:rgba(0,0,0,.14);
}
[data-theme="light"] .media-advisor-messages{ background:rgba(250,247,238,.72); }
.media-advisor-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
}
.media-advisor-form textarea{
  min-height:72px;
  resize:vertical;
}
.media-lower-grid{
  align-items:start;
}
.media-lower-grid .media-connect-form,
.media-lower-grid .media-ideas-panel{
  min-width:0;
}
.compact-media-fields{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.compact-media-metrics{
  margin-bottom:0;
}
@media (max-width: 1120px){
  .media-workspace-first{ grid-template-columns:1fr; }
}
@media (max-width: 720px){
  .media-advisor-form{ grid-template-columns:1fr; }
  .compact-media-fields{ grid-template-columns:1fr; }
}


/* Decluttered Media Studio */
.media-clean-stack{
  display:grid;
  gap:14px;
}
.media-channel-strip{
  display:flex;
  align-items:center;
  gap:14px;
  padding:16px 18px;
}
.media-channel-strip h2{
  margin:2px 0 4px;
  font-size:1.35rem;
}
.media-channel-strip p{
  margin:0;
  font-size:.84rem;
}
.media-strip-badges{
  margin-left:auto;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}
.media-primary-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);
  gap:14px;
  align-items:start;
}
.media-primary-grid > .card{
  min-width:0;
}
.media-secondary-row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
.media-details-toggle{
  padding:0;
  overflow:hidden;
}
.media-details-toggle summary{
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:15px 16px;
  list-style:none;
}
.media-details-toggle summary::-webkit-details-marker{ display:none; }
.media-details-toggle summary strong{
  display:block;
  font-size:.9rem;
}
.media-details-toggle summary small{
  display:block;
  color:var(--muted);
  font-size:.72rem;
  margin-top:2px;
}
.media-details-toggle summary > span:last-child{
  color:var(--gold);
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-weight:800;
}
.media-details-toggle[open]{
  padding-bottom:14px;
}
.media-details-toggle[open] summary{
  border-bottom:1px solid rgba(198,162,74,.16);
  margin-bottom:12px;
}
.media-details-toggle .media-idea-list,
.media-details-toggle .media-connect-form{
  padding:0 16px;
}
.compact-idea-list{
  max-height:280px;
  overflow:auto;
}
.media-advisor-panel,
.media-script-panel{
  padding:16px;
}
.media-advisor-messages{
  min-height:320px;
  max-height:460px;
}
.media-prompt-chips{
  gap:6px;
}
.media-prompt-chips .btn{
  min-height:30px;
  padding:7px 10px;
}
.compact-script-form{
  gap:10px;
}
.compact-script-form .form-section-title{
  margin-bottom:0;
}
.compact-script-form textarea[name="script"]{
  min-height:210px;
}
.script-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
@media (max-width: 1180px){
  .media-primary-grid,
  .media-secondary-row{
    grid-template-columns:1fr;
  }
  .media-strip-badges{
    margin-left:0;
    justify-content:flex-start;
  }
  .media-channel-strip{
    align-items:flex-start;
    flex-wrap:wrap;
  }
}


/* Mobile friendliness pass */
.mobile-appbar{display:none}
.mobile-nav-backdrop{display:none}
html,body{max-width:100%;overflow-x:hidden}
img,canvas,svg,video{max-width:100%}
.min-w-0{min-width:0}

@media (max-width: 1180px){
  .app-shell{grid-template-columns:252px minmax(0,1fr)}
  .sidebar{padding:20px 14px}
  .brand-name{font-size:15px}
  .brand-sub{font-size:8.5px}
  .topbar{gap:16px}
  .compact-top-actions{min-width:0}
  .site-search{width:min(100%,360px)}
  .grid.cols-5{grid-template-columns:repeat(3,minmax(0,1fr))}
  .grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .integration-shell{grid-template-columns:260px minmax(0,1fr)}
}

@media (max-width: 920px){
  body{padding-top:60px}
  .mobile-appbar{
    position:fixed;
    top:0;left:0;right:0;
    height:60px;
    z-index:900;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    background:linear-gradient(180deg,var(--sidebar),rgba(7,17,13,.94));
    border-bottom:1px solid var(--line);
    backdrop-filter:blur(16px);
  }
  [data-theme="light"] .mobile-appbar{background:rgba(255,250,240,.94)}
  .mobile-menu-btn{
    width:42px;height:42px;border-radius:14px;
    display:grid;place-items:center;
    border:1px solid var(--line-strong);
    background:rgba(200,162,74,.10);
    color:var(--text);
    font-size:1.25rem;
  }
  .mobile-brand-mini{
    display:flex;align-items:center;gap:9px;
    min-width:0;
    color:var(--text);
    text-transform:uppercase;
    letter-spacing:.12em;
  }
  .mobile-brand-mini span{
    width:32px;height:32px;border-radius:12px;
    display:grid;place-items:center;
    border:1px solid rgba(198,162,74,.58);
    color:var(--gold);
    font-family:Georgia,serif;
    font-weight:900;
  }
  .mobile-brand-mini strong{
    font-family:var(--font-display);
    font-size:.95rem;
    white-space:nowrap;
  }
  .app-shell{
    display:block;
    min-height:auto;
  }
  .sidebar{
    position:fixed;
    z-index:1000;
    top:0;bottom:0;left:0;
    width:min(86vw,320px);
    height:100dvh;
    transform:translateX(-105%);
    transition:transform 220ms ease;
    box-shadow:0 30px 90px rgba(0,0,0,.45);
    padding:20px 16px;
  }
  body.mobile-nav-open .sidebar{transform:translateX(0)}
  .mobile-nav-backdrop{
    position:fixed;
    inset:0;
    z-index:950;
    display:block;
    background:rgba(0,0,0,.55);
    backdrop-filter:blur(3px);
  }
  .mobile-nav-backdrop[hidden]{display:none!important}
  .main{
    min-width:0;
    width:100%;
  }
  .topbar{
    padding:18px 14px 10px;
    display:block;
  }
  .title-wrap h1{
    font-size:clamp(1.6rem,8vw,2.4rem);
    line-height:1.04;
  }
  .title-wrap p{font-size:.86rem}
  .compact-top-actions{
    margin-top:14px;
    display:grid;
    grid-template-columns:1fr auto;
    gap:10px;
    align-items:center;
  }
  #advisorTopBtn{display:none!important}
  .site-search{
    grid-column:1 / -1;
    width:100%;
    min-width:0;
  }
  .premium-theme-toggle{justify-self:start}
  #quickAddBtn{justify-self:end}
  .view{padding:12px 14px 28px}
  .card{border-radius:18px;padding:16px}
  .section-head{gap:10px;align-items:flex-start}
  .section-head h2{font-size:1.15rem}
  .section-head h3{font-size:.98rem}
  .grid,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .grid.cols-5,
  .integration-shell,
  .wizard-wrap,
  .media-primary-grid,
  .media-secondary-row,
  .daily-advisor-brief{
    grid-template-columns:1fr!important;
  }
  .span-2{grid-column:auto!important}
  .integration-left{
    position:relative;
    top:auto;
    max-height:none;
  }
  .integration-nav-list{
    display:flex;
    overflow-x:auto;
    gap:10px;
    padding-bottom:6px;
    scroll-snap-type:x mandatory;
  }
  .integration-nav-item{
    flex:0 0 min(78vw,280px);
    scroll-snap-align:start;
  }
  .daily-advisor-actions{padding:12px}
  .advisor-priority-grid{grid-template-columns:1fr!important}
  .advisor-drawer{
    width:100vw;
    max-width:100vw;
    border-radius:0;
  }
  .advisor-drawer-backdrop{align-items:stretch;justify-content:flex-end}
  .advisor-chat-form{grid-template-columns:1fr}
  .modal{
    width:min(94vw,620px);
    max-height:88dvh;
    overflow:auto;
  }
  .form-grid,
  .integration-field-grid,
  .compact-media-fields,
  .filter-grid,
  .column-grid{
    grid-template-columns:1fr!important;
  }
  .table-tools{gap:12px}
  .filter-grid{gap:10px}
  .table-wrap{
    overflow:visible;
    border:0;
  }
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table td{
    display:block;
    width:100%;
  }
  .data-table thead{display:none}
  .data-table tbody{
    display:grid;
    gap:12px;
  }
  .data-table tr{
    border:1px solid var(--line);
    border-radius:18px;
    padding:12px;
    background:rgba(255,255,255,.03);
  }
  [data-theme="light"] .data-table tr{background:rgba(255,255,255,.68)}
  .data-table td{
    border:0!important;
    padding:8px 0!important;
    display:grid;
    grid-template-columns:minmax(92px,35%) minmax(0,1fr);
    gap:10px;
    align-items:start;
    white-space:normal!important;
    word-break:break-word;
  }
  .data-table td::before{
    content:attr(data-label);
    font-size:.68rem;
    text-transform:uppercase;
    letter-spacing:.12em;
    color:var(--gold);
    font-weight:900;
    line-height:1.25;
  }
  .data-table td[data-col="actions"]{
    display:block;
    padding-top:12px!important;
  }
  .data-table td[data-col="actions"]::before{display:none}
  .row-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }
  .row-actions .btn{
    flex:1 1 auto;
    min-width:84px;
  }
  .media-channel-strip{
    align-items:flex-start;
    flex-wrap:wrap;
    padding:14px;
  }
  .media-strip-badges{
    width:100%;
    margin-left:0;
    justify-content:flex-start;
  }
  .media-advisor-messages{
    min-height:260px;
    max-height:360px;
  }
  .media-advisor-form{grid-template-columns:1fr}
  .media-prompt-chips .btn{flex:1 1 calc(50% - 8px)}
  .wizard-side{
    position:relative;
    top:auto;
    max-height:none;
  }
  .step-arrow{min-height:auto}
}

@media (max-width: 520px){
  body{padding-top:56px}
  .mobile-appbar{height:56px}
  .mobile-brand-mini strong{font-size:.82rem}
  .advisor-logo-btn,.mobile-menu-btn{width:38px;height:38px;border-radius:13px}
  .topbar{padding:14px 10px 8px}
  .view{padding:10px 10px 24px}
  .compact-top-actions{grid-template-columns:1fr}
  #quickAddBtn,.premium-theme-toggle{width:100%;justify-self:stretch}
  .premium-theme-toggle{display:grid;grid-template-columns:1fr 1fr}
  .premium-theme-toggle button{width:100%}
  .btn{width:auto;max-width:100%}
  #quickAddBtn{width:100%}
  .card{padding:14px;border-radius:16px}
  .kpi h2{font-size:1.65rem}
  .daily-advisor-main{flex-direction:column}
  .advisor-orb{width:42px;height:42px;border-radius:15px}
  .media-prompt-chips .btn{flex:1 1 100%}
  .data-table td{grid-template-columns:1fr;gap:4px}
  .data-table td::before{margin-bottom:2px}
  .brand-block{padding-right:36px}
  .focus-card,.user-card{display:none}
}


/* Responsive breakpoint refinement: desktop, mid, tablet, mobile */
@media (min-width: 1281px){
  .app-shell{grid-template-columns:304px minmax(0,1fr)}
  .sidebar{width:auto}
}

/* Mid-size laptop/tablet landscape: avoid the awkward half-sidebar squeeze */
@media (min-width: 921px) and (max-width: 1280px){
  body{padding-top:0}
  .app-shell{
    grid-template-columns:92px minmax(0,1fr);
  }
  .sidebar{
    width:92px;
    padding:18px 12px;
    gap:16px;
    align-items:center;
    overflow-x:hidden;
  }
  .brand-block{
    width:100%;
    justify-content:center;
    padding:0 0 14px;
  }
  .brand-block > div:not(.brand-mark){
    display:none;
  }
  .brand-mark{
    width:52px;
    height:52px;
    border-radius:18px;
  }
  .nav{
    width:100%;
    gap:12px;
  }
  .nav-group{
    width:100%;
    display:grid;
    justify-items:center;
    gap:9px;
  }
  .nav-heading{
    display:none;
  }
  .nav-btn{
    width:56px;
    height:56px;
    padding:0;
    display:grid;
    place-items:center;
    border-radius:18px;
    position:relative;
    overflow:visible;
  }
  .nav-btn span:not(.nav-ico){
    display:none;
  }
  .nav-ico{
    margin:0;
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:13px;
    font-size:.86rem;
  }
  .nav-btn.active{
    background:rgba(47,122,87,.26);
    border:1px solid rgba(200,162,74,.55);
    box-shadow:0 0 0 1px rgba(200,162,74,.08), 0 14px 34px rgba(0,0,0,.16);
  }
  .nav-btn.active::after{
    content:'';
    position:absolute;
    right:-12px;
    top:50%;
    transform:translateY(-50%);
    width:3px;
    height:30px;
    border-radius:999px;
    background:var(--gold);
  }
  .nav-btn::before{
    content:attr(aria-label);
    position:absolute;
    left:calc(100% + 12px);
    top:50%;
    transform:translateY(-50%) translateX(-4px);
    opacity:0;
    pointer-events:none;
    white-space:nowrap;
    background:var(--panel);
    color:var(--text);
    border:1px solid var(--line-strong);
    border-radius:999px;
    padding:7px 10px;
    box-shadow:var(--shadow);
    transition:var(--ease);
    z-index:30;
    font-size:.76rem;
  }
  .nav-btn:hover::before{
    opacity:1;
    transform:translateY(-50%) translateX(0);
  }
  .focus-card,
  .user-card{
    display:none;
  }
  .main{
    min-width:0;
  }
  .topbar{
    padding:24px 24px 12px;
    gap:18px;
  }
  .title-wrap h1{
    font-size:clamp(2rem,3.6vw,3.2rem);
  }
  .compact-top-actions{
    flex-wrap:wrap;
    justify-content:flex-end;
    max-width:560px;
  }
  .site-search{
    width:min(100%,360px);
  }
  .view{
    padding:16px 24px 34px;
  }
  .grid.cols-5{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .grid.cols-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .grid.cols-3{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .grid.cols-3 > .span-2{
    grid-column:span 2;
  }
  .integration-shell{
    grid-template-columns:280px minmax(0,1fr);
  }
  .media-primary-grid{
    grid-template-columns:minmax(0,1fr);
  }
  .media-secondary-row{
    grid-template-columns:1fr;
  }
}

/* Small laptop / large tablet: use mobile drawer earlier */
@media (max-width: 920px){
  .sidebar{
    transform:translateX(-105%) !important;
  }
  body.mobile-nav-open .sidebar{
    transform:translateX(0) !important;
  }
}

/* Medium-narrow safeguard before full mobile */
@media (min-width: 921px) and (max-width: 1050px){
  .topbar{
    display:block;
  }
  .compact-top-actions{
    margin-top:14px;
    justify-content:flex-start;
    max-width:none;
  }
  .site-search{
    width:min(100%,420px);
  }
}

/* Ultra-wide polish */
@media (min-width: 1600px){
  .view{
    max-width:1520px;
    margin:0 auto;
    width:100%;
  }
}


.source-intel-card{ margin-bottom:16px; }
.source-intel-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.source-intel-grid > div{
  min-width:0;
  border:1px solid rgba(198,162,74,.18);
  border-radius:16px;
  padding:13px;
  background:rgba(255,255,255,.03);
}
[data-theme="light"] .source-intel-grid > div{ background:rgba(255,255,255,.64); }
.source-intel-grid strong{
  display:block;
  font-size:.94rem;
  margin:4px 0 5px;
}
.source-intel-grid p{
  margin:0;
  font-size:.78rem;
  line-height:1.4;
}
@media (max-width: 920px){
  .source-intel-grid{grid-template-columns:1fr;}
}


/* Favicon/logo advisor polish + less intrusive drawer */
.advisor-drawer-backdrop{
  align-items:center;
  justify-content:flex-end;
  padding:22px;
  overflow:hidden;
}
.advisor-drawer{
  height:auto;
  max-height:min(82dvh,760px);
  width:min(500px, calc(100vw - 44px));
  border-radius:24px;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  box-shadow:0 34px 100px rgba(0,0,0,.46);
}
.advisor-drawer-head{
  align-items:center;
  padding:16px 16px 12px;
}
.advisor-drawer-head > div{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.advisor-mini-brand{
  width:38px;
  height:38px;
  border-radius:14px;
  border:1px solid rgba(198,162,74,.58);
  color:var(--gold);
  display:grid;
  place-items:center;
  background:linear-gradient(145deg, rgba(14,64,42,.96), rgba(5,23,17,.96));
  flex:0 0 auto;
}
.advisor-mini-brand span{
  font-family:Georgia,serif;
  font-weight:900;
  font-size:1.05rem;
}
.advisor-messages{
  overflow:auto;
  scrollbar-width:none;
  padding:14px 16px;
  gap:11px;
}
.advisor-messages::-webkit-scrollbar,
.media-advisor-messages::-webkit-scrollbar{
  width:0;
  height:0;
}
.advisor-msg{
  max-width:92%;
}
.advisor-msg.assistant{
  align-self:flex-start;
}
.advisor-msg.user{
  align-self:flex-end;
}
.advisor-msg div,
.advisor-msg p{
  margin:0;
}
.advisor-msg h4{
  margin:.15rem 0 .45rem;
  font-size:.82rem;
  color:var(--gold);
  letter-spacing:.08em;
  text-transform:uppercase;
}
.advisor-msg ul{
  margin:.25rem 0 .35rem;
  padding-left:1.15rem;
}
.advisor-msg li{
  margin:.22rem 0;
}
.advisor-chat-form{
  padding:12px 16px 16px;
  border-top:1px solid var(--line);
  background:rgba(0,0,0,.08);
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
}
[data-theme="light"] .advisor-chat-form{
  background:rgba(255,255,255,.55);
}
.advisor-chat-form textarea{
  min-height:54px;
  max-height:120px;
  resize:vertical;
  border-radius:16px;
  background:var(--input);
  color:var(--text);
  border:1px solid var(--line-strong);
  padding:12px 13px;
}
.advisor-chat-form .btn{
  min-height:54px;
  border-radius:16px;
}
.mobile-only-theme{
  display:none;
}
@media (max-width: 920px){
  .top-actions .premium-theme-toggle{
    display:none !important;
  }
  .mobile-only-theme{
    display:block;
    border:1px solid var(--line);
    border-radius:18px;
    padding:12px;
    background:rgba(255,255,255,.035);
  }
  .mobile-only-theme .premium-theme-toggle{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }
  .mobile-only-theme .premium-theme-toggle button{
    width:100%;
  }
  .advisor-drawer-backdrop{
    align-items:flex-end;
    padding:12px;
  }
  .advisor-drawer{
    width:100%;
    max-height:78dvh;
    border-radius:22px;
  }
}
@media (max-width: 520px){
  .advisor-drawer-backdrop{
    padding:8px;
  }
  .advisor-drawer{
    max-height:76dvh;
    border-radius:20px;
  }
  .advisor-chat-form{
    grid-template-columns:1fr;
  }
  .advisor-chat-form .btn{
    min-height:42px;
  }
}


/* Advisor drawer repair: visible chat, proper close position, strong site-styled container */
.advisor-drawer-backdrop{
  position:fixed !important;
  inset:0 !important;
  z-index:1300 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  padding:24px !important;
  background:rgba(0,0,0,.46) !important;
  backdrop-filter:blur(6px) !important;
  overflow:hidden !important;
}
.advisor-drawer{
  width:min(520px, calc(100vw - 48px)) !important;
  height:min(78dvh, 720px) !important;
  max-height:min(78dvh, 720px) !important;
  display:flex !important;
  flex-direction:column !important;
  border:1px solid rgba(200,162,74,.42) !important;
  border-radius:28px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(200,162,74,.13), transparent 28%),
    linear-gradient(180deg, var(--panel), var(--bg)) !important;
  box-shadow:
    0 0 0 1px rgba(200,162,74,.10),
    0 30px 90px rgba(0,0,0,.48) !important;
  overflow:hidden !important;
}
[data-theme="light"] .advisor-drawer{
  background:
    radial-gradient(circle at 18% 0%, rgba(184,142,50,.15), transparent 28%),
    linear-gradient(180deg, var(--panel), var(--bg-2)) !important;
}
.advisor-drawer-head{
  position:relative !important;
  min-height:84px !important;
  padding:18px 20px 16px 72px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  border-bottom:1px solid rgba(200,162,74,.25) !important;
  flex:0 0 auto !important;
}
.advisor-drawer-head > div{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
}
.advisor-mini-brand{
  width:38px !important;
  height:38px !important;
  border-radius:14px !important;
  border:1px solid rgba(200,162,74,.66) !important;
  color:var(--gold) !important;
  display:grid !important;
  place-items:center !important;
  background:linear-gradient(145deg, rgba(14,64,42,.96), rgba(5,23,17,.96)) !important;
  flex:0 0 auto !important;
}
.advisor-drawer-head h3{
  margin:0 !important;
  font-size:1.12rem !important;
}
.advisor-close-btn{
  position:absolute !important;
  top:18px !important;
  left:20px !important;
  width:38px !important;
  height:38px !important;
  border-radius:14px !important;
  border:1px solid rgba(200,162,74,.42) !important;
  background:rgba(255,255,255,.04) !important;
  color:var(--text) !important;
  display:grid !important;
  place-items:center !important;
  z-index:2 !important;
}
.advisor-close-btn:hover{
  background:rgba(200,162,74,.12) !important;
  border-color:var(--gold) !important;
}
.advisor-messages{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:16px 20px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
  scrollbar-width:none !important;
}
.advisor-messages::-webkit-scrollbar{width:0!important;height:0!important;}
.advisor-msg{
  max-width:92% !important;
  border:1px solid rgba(200,162,74,.16) !important;
  border-radius:18px !important;
  padding:12px 13px !important;
  background:rgba(255,255,255,.04) !important;
  color:var(--text) !important;
  line-height:1.48 !important;
  font-size:.86rem !important;
}
.advisor-msg.assistant{align-self:flex-start !important;}
.advisor-msg.user{
  align-self:flex-end !important;
  background:rgba(47,122,87,.23) !important;
  border-color:rgba(85,185,133,.28) !important;
}
.advisor-chat-form{
  flex:0 0 auto !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:10px !important;
  align-items:end !important;
  padding:14px 20px 18px !important;
  border-top:1px solid rgba(200,162,74,.25) !important;
  background:rgba(0,0,0,.13) !important;
}
[data-theme="light"] .advisor-chat-form{background:rgba(255,255,255,.58)!important;}
.advisor-chat-form textarea{
  display:block !important;
  width:100% !important;
  min-height:54px !important;
  max-height:130px !important;
  resize:vertical !important;
  border-radius:17px !important;
  border:1px solid rgba(200,162,74,.32) !important;
  background:var(--input) !important;
  color:var(--text) !important;
  padding:12px 13px !important;
  outline:none !important;
}
.advisor-chat-form textarea:focus{
  border-color:var(--gold) !important;
  box-shadow:0 0 0 3px rgba(200,162,74,.12) !important;
}
.advisor-chat-form .btn{
  min-height:54px !important;
  border-radius:17px !important;
  padding:0 18px !important;
}
@media (max-width: 920px){
  .advisor-drawer-backdrop{
    align-items:flex-end !important;
    padding:12px !important;
  }
  .advisor-drawer{
    width:100% !important;
    height:min(76dvh, 680px) !important;
    max-height:min(76dvh, 680px) !important;
    border-radius:24px !important;
  }
}
@media (max-width: 520px){
  .advisor-drawer-backdrop{padding:8px !important;}
  .advisor-drawer{
    height:76dvh !important;
    max-height:76dvh !important;
    border-radius:22px !important;
  }
  .advisor-drawer-head{
    min-height:78px !important;
    padding:16px 16px 14px 64px !important;
  }
  .advisor-close-btn{
    top:16px !important;
    left:16px !important;
    width:36px !important;
    height:36px !important;
  }
  .advisor-chat-form{
    grid-template-columns:1fr !important;
    padding:12px 16px 16px !important;
  }
  .advisor-chat-form .btn{
    min-height:42px !important;
  }
}


/* Advisor drawer hard reset using unique KGC classes */
.kgc-advisor-backdrop{
  position:fixed !important;
  inset:0 !important;
  z-index:2000 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  padding:28px !important;
  background:rgba(0,0,0,.46) !important;
  backdrop-filter:blur(6px) !important;
  overflow:hidden !important;
}
.kgc-advisor-window{
  position:relative !important;
  width:min(520px, calc(100vw - 56px)) !important;
  height:min(78dvh, 720px) !important;
  max-height:min(78dvh, 720px) !important;
  min-height:460px !important;
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) auto !important;
  border:1px solid rgba(200,162,74,.52) !important;
  border-radius:30px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(200,162,74,.13), transparent 30%),
    linear-gradient(180deg, var(--panel), var(--bg)) !important;
  box-shadow:
    0 0 0 1px rgba(200,162,74,.11),
    0 32px 100px rgba(0,0,0,.50) !important;
  overflow:hidden !important;
}
[data-theme="light"] .kgc-advisor-window{
  background:
    radial-gradient(circle at 18% 0%, rgba(184,142,50,.15), transparent 30%),
    linear-gradient(180deg, var(--panel), var(--bg-2)) !important;
}
.kgc-advisor-close{
  position:absolute !important;
  top:18px !important;
  left:18px !important;
  z-index:5 !important;
  width:40px !important;
  height:40px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:15px !important;
  border:1px solid rgba(200,162,74,.46) !important;
  background:rgba(255,255,255,.045) !important;
  color:var(--text) !important;
  font-size:1.25rem !important;
  line-height:1 !important;
}
.kgc-advisor-close:hover{
  background:rgba(200,162,74,.12) !important;
  border-color:var(--gold) !important;
}
.kgc-advisor-header{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-height:92px !important;
  padding:20px 20px 17px 76px !important;
  border-bottom:1px solid rgba(200,162,74,.25) !important;
}
.kgc-advisor-title{
  min-width:0 !important;
}
.kgc-advisor-title h3{
  margin:0 !important;
  font-size:1.15rem !important;
  line-height:1.1 !important;
}
.kgc-advisor-messages{
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:18px 20px !important;
  scrollbar-width:none !important;
}
.kgc-advisor-messages::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
}
.kgc-advisor-msg{
  display:block !important;
  max-width:92% !important;
  border:1px solid rgba(200,162,74,.17) !important;
  border-radius:18px !important;
  padding:12px 13px !important;
  background:rgba(255,255,255,.045) !important;
  color:var(--text) !important;
  font-size:.86rem !important;
  line-height:1.48 !important;
}
.kgc-advisor-msg.assistant{align-self:flex-start !important;}
.kgc-advisor-msg.user{
  align-self:flex-end !important;
  background:rgba(47,122,87,.23) !important;
  border-color:rgba(85,185,133,.30) !important;
}
.kgc-advisor-form{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:10px !important;
  align-items:end !important;
  padding:14px 20px 18px !important;
  border-top:1px solid rgba(200,162,74,.25) !important;
  background:rgba(0,0,0,.13) !important;
  flex:unset !important;
}
[data-theme="light"] .kgc-advisor-form{
  background:rgba(255,255,255,.58) !important;
}
.kgc-advisor-form textarea{
  display:block !important;
  width:100% !important;
  min-height:56px !important;
  max-height:132px !important;
  resize:vertical !important;
  border-radius:17px !important;
  border:1px solid rgba(200,162,74,.34) !important;
  background:var(--input) !important;
  color:var(--text) !important;
  padding:12px 13px !important;
  outline:none !important;
}
.kgc-advisor-form textarea:focus{
  border-color:var(--gold) !important;
  box-shadow:0 0 0 3px rgba(200,162,74,.12) !important;
}
.kgc-advisor-form .btn{
  display:inline-flex !important;
  min-height:56px !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:17px !important;
  padding:0 18px !important;
}
@media (max-width: 920px){
  .kgc-advisor-backdrop{
    align-items:flex-end !important;
    padding:12px !important;
  }
  .kgc-advisor-window{
    width:100% !important;
    height:min(76dvh, 680px) !important;
    max-height:min(76dvh, 680px) !important;
    min-height:420px !important;
    border-radius:24px !important;
  }
}
@media (max-width: 520px){
  .kgc-advisor-backdrop{padding:8px !important;}
  .kgc-advisor-window{
    height:76dvh !important;
    max-height:76dvh !important;
    min-height:390px !important;
    border-radius:22px !important;
  }
  .kgc-advisor-header{
    min-height:82px !important;
    padding:17px 16px 15px 66px !important;
  }
  .kgc-advisor-close{
    top:16px !important;
    left:16px !important;
    width:38px !important;
    height:38px !important;
  }
  .kgc-advisor-form{
    grid-template-columns:1fr !important;
    padding:12px 16px 16px !important;
  }
  .kgc-advisor-form .btn{
    min-height:44px !important;
  }
}


/* Advisor close button inline with logo/title, right justified */
.kgc-advisor-window .kgc-advisor-header{
  padding:20px 20px 17px 76px !important;
  position:relative !important;
}
.kgc-advisor-window .kgc-advisor-close{
  top:50% !important;
  right:20px !important;
  left:auto !important;
  transform:translateY(-50%) !important;
  width:40px !important;
  height:40px !important;
}
.kgc-advisor-window .kgc-advisor-header{
  padding-right:74px !important;
}
@media (max-width: 520px){
  .kgc-advisor-window .kgc-advisor-header{
    padding:17px 64px 15px 66px !important;
  }
  .kgc-advisor-window .kgc-advisor-close{
    top:50% !important;
    right:16px !important;
    left:auto !important;
    transform:translateY(-50%) !important;
    width:38px !important;
    height:38px !important;
  }
}


/* Advisor close final placement: inside header, right aligned */
.kgc-advisor-window .kgc-advisor-header{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  min-height:92px !important;
  padding:20px 20px 17px 76px !important;
  position:relative !important;
}
.kgc-advisor-heading{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  min-width:0 !important;
}
.kgc-advisor-window .kgc-advisor-close{
  position:static !important;
  inset:auto !important;
  transform:none !important;
  margin-left:auto !important;
  flex:0 0 auto !important;
  width:40px !important;
  height:40px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:15px !important;
  border:1px solid rgba(200,162,74,.46) !important;
  background:rgba(255,255,255,.045) !important;
  color:var(--text) !important;
}
@media (max-width: 520px){
  .kgc-advisor-window .kgc-advisor-header{
    padding:17px 16px 15px 66px !important;
  }
  .kgc-advisor-window .kgc-advisor-close{
    position:static !important;
    inset:auto !important;
    transform:none !important;
    width:38px !important;
    height:38px !important;
  }
}


/* Advisor title left-justified closer to the logo */
.kgc-advisor-heading{
  justify-content:flex-start !important;
  align-items:center !important;
  gap:14px !important;
}
.kgc-advisor-window .kgc-advisor-header{
  justify-content:space-between !important;
}
.kgc-advisor-title{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  text-align:left !important;
  margin-left:0 !important;
}
.kgc-advisor-title .spark{
  display:block !important;
  margin:0 0 2px 0 !important;
  text-align:left !important;
}
.kgc-advisor-title h3{
  display:block !important;
  width:auto !important;
  text-align:left !important;
}

/* Growth Console V2 patch: media composer + advisor header alignment */
.media-advisor-form{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:10px !important;
  align-items:end !important;
  padding:10px !important;
  border:1px solid rgba(200,162,74,.34) !important;
  border-radius:18px !important;
  background:rgba(0,0,0,.13) !important;
}
[data-theme="light"] .media-advisor-form{
  background:rgba(255,255,255,.58) !important;
}
.media-advisor-form textarea{
  display:block !important;
  width:100% !important;
  min-height:56px !important;
  max-height:132px !important;
  resize:vertical !important;
  border-radius:17px !important;
  border:1px solid rgba(200,162,74,.34) !important;
  background:var(--input) !important;
  color:var(--text) !important;
  padding:12px 13px !important;
  outline:none !important;
  font:inherit !important;
  line-height:1.45 !important;
}
.media-advisor-form textarea::placeholder{
  color:var(--muted) !important;
}
.media-advisor-form textarea:focus{
  border-color:var(--gold) !important;
  box-shadow:0 0 0 3px rgba(200,162,74,.12) !important;
}
.media-advisor-form .btn{
  display:inline-flex !important;
  min-height:56px !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:17px !important;
  padding:0 18px !important;
}
.kgc-advisor-window .kgc-advisor-header{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:14px !important;
  min-height:92px !important;
  padding:20px !important;
  position:relative !important;
}
.kgc-advisor-heading{
  grid-column:1 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  min-width:0 !important;
  margin:0 !important;
}
.kgc-advisor-title{
  margin:0 !important;
  text-align:left !important;
  align-items:flex-start !important;
}
.kgc-advisor-window .kgc-advisor-close{
  grid-column:3 !important;
  justify-self:end !important;
  align-self:center !important;
  position:static !important;
  inset:auto !important;
  transform:none !important;
  margin:0 !important;
  flex:0 0 auto !important;
}
@media (max-width:720px){
  .media-advisor-form{
    grid-template-columns:1fr !important;
  }
  .media-advisor-form .btn{
    width:100% !important;
    min-height:46px !important;
  }
}
@media (max-width:520px){
  .kgc-advisor-window .kgc-advisor-header{
    grid-template-columns:auto minmax(0,1fr) auto !important;
    padding:17px 16px 15px !important;
  }
}

/* Media Studio: single AI workspace + working draft */
.media-primary-grid.single-workspace{
  grid-template-columns:minmax(0, 1fr);
  max-width:920px;
  margin:0 auto;
  width:100%;
}
.media-ai-workspace-panel{
  padding:18px;
}
.media-ai-workspace{
  display:grid;
  gap:16px;
}
.media-working-draft{
  border-top:1px solid rgba(198,162,74,.22);
  padding-top:16px;
}
.media-working-draft .media-script-form{
  margin:0;
}
.media-working-draft .form-section-title{
  padding:0;
}
.media-working-draft .compact-script-form{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.media-working-draft .compact-script-form .wide,
.media-working-draft .compact-script-form .script-actions{
  grid-column:1 / -1;
}
.media-working-draft textarea[name="script"]{
  min-height:180px;
}
@media (max-width: 760px){
  .media-working-draft .compact-script-form{
    grid-template-columns:1fr;
  }
}


/* Advisor recent discussion memory */
.kgc-advisor-window{
  grid-template-rows:auto auto minmax(0,1fr) auto !important;
}
.kgc-advisor-history{
  padding:12px 20px 10px !important;
  border-bottom:1px solid rgba(200,162,74,.18) !important;
  background:rgba(0,0,0,.08) !important;
}
.kgc-advisor-history-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  margin-bottom:9px !important;
}
.kgc-advisor-history-head small{
  display:block !important;
  color:var(--muted) !important;
  font-size:.72rem !important;
  margin-top:2px !important;
}
.kgc-advisor-thread-list{
  display:flex !important;
  gap:8px !important;
  overflow-x:auto !important;
  padding-bottom:2px !important;
  scrollbar-width:none !important;
}
.kgc-advisor-thread-list::-webkit-scrollbar{width:0 !important;height:0 !important;}
.kgc-advisor-thread{
  flex:0 0 210px !important;
  text-align:left !important;
  border:1px solid rgba(200,162,74,.22) !important;
  border-radius:14px !important;
  background:rgba(255,255,255,.035) !important;
  color:var(--text) !important;
  padding:9px 10px !important;
  cursor:pointer !important;
}
.kgc-advisor-thread:hover,
.kgc-advisor-thread.active{
  border-color:rgba(85,185,133,.45) !important;
  background:rgba(47,122,87,.20) !important;
}
.kgc-advisor-thread strong,
.kgc-advisor-thread span{
  display:block !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.kgc-advisor-thread strong{
  font-size:.78rem !important;
  line-height:1.2 !important;
}
.kgc-advisor-thread span{
  color:var(--muted) !important;
  font-size:.68rem !important;
  margin-top:4px !important;
}
@media (max-width:520px){
  .kgc-advisor-history{padding:10px 14px 9px !important;}
  .kgc-advisor-thread{flex-basis:190px !important;}
}

/* Growth Console v3 admin additions */
.portal-role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}
.portal-role-grid div{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(128,128,128,.045)}
.portal-role-grid strong{display:block;color:var(--gold);font-size:12px;letter-spacing:.12em;text-transform:uppercase;margin-bottom:7px}
.portal-role-grid span{display:block;color:var(--muted);font-size:13px;line-height:1.45}
.status.green,.status.billable{background:rgba(85,185,133,.14);border-color:rgba(85,185,133,.28);color:var(--green-2)}
.status.yellow,.status.internal,.status.needs-input,.status.expected{background:rgba(216,154,61,.14);border-color:rgba(216,154,61,.30);color:var(--amber)}
.status.red,.status.at-risk{background:rgba(228,93,107,.14);border-color:rgba(228,93,107,.28);color:var(--red)}
.status.admin-only,.status.not-invited,.status.invited{background:rgba(110,168,229,.12);border-color:rgba(110,168,229,.24);color:var(--blue)}
@media(max-width:760px){.portal-role-grid{grid-template-columns:1fr}}

/* Client Ops two-line alternative view */
.client-ops-card .table-tools{margin-bottom:14px}
.client-ops-list{display:grid;gap:12px}
.client-ops-row{border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,var(--panel),var(--panel-2));padding:14px;display:grid;gap:10px;box-shadow:var(--glow)}
.client-ops-main{display:grid;grid-template-columns:minmax(190px,1fr) auto;gap:14px;align-items:center}
.client-ops-identity{min-width:0}
.client-ops-identity strong{display:block;font-size:15px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-ops-identity span{display:block;margin-top:4px;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-ops-badges{display:flex;gap:7px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.client-ops-sub{display:grid;grid-template-columns:190px minmax(170px,.9fr) minmax(220px,1.35fr) auto;gap:12px;align-items:center;border-top:1px solid var(--line);padding-top:10px;color:var(--muted);font-size:12px}
.client-ops-progress{display:grid;grid-template-columns:42px 1fr;gap:9px;align-items:center;font-weight:900;color:var(--text)}
.client-ops-progress .progress-track{margin-top:0;height:7px}
.client-ops-metrics{font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-ops-action{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;min-width:0;color:var(--text)}
.client-ops-action span{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);font-weight:950}
.client-ops-action{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-ops-actions{justify-content:flex-end;flex-wrap:nowrap}
@media(max-width:1100px){.client-ops-sub{grid-template-columns:1fr 1fr}.client-ops-actions{justify-content:flex-start}.client-ops-main{grid-template-columns:1fr}.client-ops-badges{justify-content:flex-start}}
@media(max-width:680px){.client-ops-sub{grid-template-columns:1fr}.client-ops-actions{flex-wrap:wrap}.client-ops-identity strong,.client-ops-identity span,.client-ops-metrics,.client-ops-action{white-space:normal}}

/* Growth Console v3 IA cleanup */
.nav-group{padding-bottom:10px;border-bottom:1px solid var(--line)}
.nav-group:last-child{border-bottom:0}
.nav-heading{padding:8px 10px 4px}
.nav-ico{width:22px;text-align:center}

/* Overview command-center layout */
.compact-kpis .kpi-card{min-height:112px}
.overview-command-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:16px;margin-top:16px}
.overview-performance-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:16px;margin-top:16px}
.priority-stack{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.priority-stack section{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.04);padding:12px;min-width:0}
.priority-stack h4{margin:0 0 10px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);font-weight:950}
.command-snapshot .summary-list{margin-bottom:14px}
.overview-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}
.overview-shortcuts .btn{width:100%;justify-content:center}
.compact-chart{min-height:260px;max-height:300px}

/* Client Ops cleanup */
.client-ops-kpis{margin-bottom:16px}
.client-ops-tools{padding:10px;margin-bottom:12px}
.client-ops-filter-row{grid-template-columns:minmax(220px,1.4fr) repeat(4,minmax(120px,.8fr)) auto;gap:8px;align-items:end}
.client-ops-filter-row .btn{height:36px;white-space:nowrap}
.client-ops-card .column-picker{display:none!important}

@media(max-width:1180px){
  .overview-command-grid,.overview-performance-grid{grid-template-columns:1fr}
  .client-ops-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  .priority-stack{grid-template-columns:1fr}
  .overview-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .client-ops-filter-row{grid-template-columns:1fr}
}

/* Hotfix: overview compact lists and weekly snapshot */
.compact-empty{
  border:1px dashed var(--line);
  border-radius:14px;
  padding:10px;
  font-size:12px;
  color:var(--muted);
  background:rgba(128,128,128,.035);
}
.snapshot-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.snapshot-grid div{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:rgba(128,128,128,.04);
  min-width:0;
}
.snapshot-grid span{
  display:block;
  font-size:9px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:900;
  margin-bottom:6px;
}
.snapshot-grid strong{
  font-size:18px;
  color:var(--text);
}
@media(max-width:900px){.snapshot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.snapshot-grid{grid-template-columns:1fr}}

/* Date picker fields */
.date-input-shell{
  position:relative;
  display:flex;
  align-items:center;
  width:100%;
}
.date-input-shell input[type="date"]{
  width:100%;
  padding-right:46px;
}
.calendar-picker{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:28px;
  height:28px;
  border:1px solid var(--border);
  border-radius:10px;
  background:rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:16px;
  line-height:1;
}
.calendar-picker:hover{
  background:rgba(255,255,255,.08);
  border-color:var(--accent);
}

/* Growth Console v3 Admin Final Pass */
.nav-group{padding-top:2px;border-top:1px solid rgba(225,191,99,.10)}
.nav-group:first-child{border-top:0;padding-top:0}
.nav-heading{padding-top:2px}
.nav-btn[data-view="clientOps"] .nav-ico{background:linear-gradient(135deg,rgba(225,191,99,.20),rgba(47,122,87,.22));border-color:rgba(225,191,99,.45);color:var(--gold-2)}
.overview-kpi-strip .kpi-card,.finance-kpis .kpi-card,.time-kpis .kpi-card{min-height:116px}
.overview-final-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.8fr) minmax(280px,.8fr);gap:16px;align-items:stretch}
.overview-today-panel{grid-row:span 2}
.overview-money-panel{grid-column:2 / -1}
.priority-stack.compact-stack{display:grid;grid-template-columns:1fr;gap:14px}
.priority-stack h4{margin:0 0 8px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2)}
.ai-action-list{margin:0;padding:0;list-style:none;display:grid;gap:9px}
.ai-action-list li{border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(128,128,128,.04);font-size:12.5px;line-height:1.45;color:var(--muted)}
.ai-action-list strong{color:var(--gold-2);margin-right:5px}
.ops-brief-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(128,128,128,.04);margin-bottom:8px;min-width:0}
.ops-brief-row strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.ops-brief-row span{display:block;font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.ops-brief-row>div:last-child{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.compact-metric-list{display:grid;gap:8px}.compact-metric-row{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(128,128,128,.04)}.compact-metric-row span{color:var(--muted);font-size:12px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact-metric-row strong{font-size:13px;white-space:nowrap;color:var(--text)}
.quick-jump-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.quick-jump-card{border:1px solid var(--line);border-radius:16px;background:rgba(128,128,128,.04);color:var(--text);padding:13px;text-align:left;display:grid;gap:5px;transition:var(--ease)}.quick-jump-card:hover{border-color:rgba(225,191,99,.50);transform:translateY(-1px);background:linear-gradient(145deg,rgba(15,77,53,.28),rgba(225,191,99,.08))}.quick-jump-card strong{font-family:var(--font-display);font-size:16px}.quick-jump-card span{font-size:12px;color:var(--muted);line-height:1.35}
.finance-breakdown-grid,.support-load-grid{align-items:start}.mini-card{box-shadow:none;background:rgba(128,128,128,.035)}
.support-table{display:grid;gap:8px}.support-table-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(128,128,128,.04)}.support-table-row span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.support-table-row strong{font-size:13px}.support-table-row em{font-style:normal;color:var(--gold-2);font-size:12px;font-weight:900;white-space:nowrap}
.client-ops-tools.final-filter-row{padding:10px;margin-bottom:12px}.client-ops-filter-row{grid-template-columns:minmax(220px,1.3fr) repeat(5,minmax(120px,.75fr)) auto!important;align-items:end}.client-search-field input{min-width:0}.client-ops-row{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.04);padding:13px;margin-bottom:10px}.client-ops-main{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.client-ops-identity{display:grid;gap:2px;min-width:0}.client-ops-identity strong{font-size:15px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.client-ops-identity span{font-size:12px;color:var(--muted)}.client-ops-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.client-ops-sub{display:grid;grid-template-columns:170px minmax(160px,.7fr) minmax(220px,1fr) auto;gap:12px;align-items:center;margin-top:11px;padding-top:11px;border-top:1px solid var(--line)}.client-ops-progress{display:grid;grid-template-columns:42px minmax(0,1fr);gap:8px;align-items:center}.client-ops-progress span{font-size:12px;color:var(--gold-2);font-weight:900}.client-ops-metrics{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.client-ops-action{display:grid;gap:2px;font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.client-ops-action span{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2);font-weight:900}.client-ops-actions{justify-content:flex-end}.client-ops-actions .btn.small:first-child{min-width:94px}
.status.green,.status.active,.status.ready-to-scale,.status.invited{background:rgba(85,185,133,.14);border-color:rgba(85,185,133,.28);color:var(--green-2)}.status.yellow,.status.admin-only,.status.not-invited{background:rgba(216,154,61,.14);border-color:rgba(216,154,61,.30);color:var(--amber)}.status.red,.status.paused,.status.at-risk{background:rgba(228,93,107,.14);border-color:rgba(228,93,107,.28);color:var(--red)}
.snapshot-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.snapshot-grid div{border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(128,128,128,.04)}.snapshot-grid span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.12em;font-weight:900}.snapshot-grid strong{display:block;font-size:16px;margin-top:4px;color:var(--text)}
@media(max-width:1280px){.overview-final-grid{grid-template-columns:1fr 1fr}.overview-today-panel{grid-row:auto;grid-column:1/-1}.overview-money-panel{grid-column:auto}.quick-jump-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.client-ops-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}.client-ops-sub{grid-template-columns:1fr 1fr}.client-ops-actions{justify-content:flex-start}.client-ops-action{white-space:normal}}
@media(max-width:760px){.overview-final-grid,.finance-breakdown-grid,.support-load-grid,.quick-jump-grid,.snapshot-grid{grid-template-columns:1fr}.ops-brief-row{grid-template-columns:1fr}.ops-brief-row>div:last-child{justify-content:flex-start}.client-ops-main{display:grid}.client-ops-badges{justify-content:flex-start}.client-ops-filter-row,.client-ops-sub{grid-template-columns:1fr!important}.client-ops-metrics{white-space:normal}.support-table-row{grid-template-columns:1fr}.quick-jump-card{width:100%}}

/* Sidebar polish hotfix: remove duplicate section dividers and hide internal scrollbar */
.sidebar{
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.sidebar::-webkit-scrollbar{width:0;height:0;display:none;}
.nav{gap:14px;}
.nav-group{
  padding-top:0!important;
  padding-bottom:12px!important;
  border-top:0!important;
  border-bottom:1px solid rgba(225,191,99,.14)!important;
}
.nav-group:last-child{border-bottom:0!important;}
.nav-heading{padding:0 10px 6px!important;}

/* Sidebar focus card cleanup: remove the empty/low-value weekly focus block */
.focus-card{display:none!important;}

/* v3 admin final: data source add controls */
.section-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.integration-left .section-actions .btn{white-space:nowrap}
@media (max-width: 760px){.section-actions{justify-content:flex-start}.integration-left .section-actions{width:100%;justify-content:space-between}}

/* Pipeline compact two-line view */
.pipeline-compact-card .table-tools{margin-bottom:12px}
.pipeline-tools{padding:10px;margin-bottom:12px}
.pipeline-filter-row{grid-template-columns:minmax(240px,1.4fr) repeat(4,minmax(110px,.75fr)) auto;gap:8px;align-items:end}
.pipeline-filter-row .btn{height:36px;white-space:nowrap}
.pipeline-compact-list{display:grid;gap:10px}
.pipeline-row{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.04);padding:13px;display:grid;gap:10px;box-shadow:var(--glow)}
.pipeline-line{display:grid;align-items:center;gap:12px;min-width:0}
.primary-line{grid-template-columns:minmax(180px,1fr) minmax(180px,auto) minmax(125px,auto)}
.secondary-line{grid-template-columns:minmax(180px,.9fr) minmax(240px,1.2fr) auto;border-top:1px solid var(--line);padding-top:10px}
.pipeline-title{min-width:0}.pipeline-title strong{font-size:15px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pipeline-title span{font-size:12px;color:var(--muted)}
.pipeline-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-start}.pipeline-money{text-align:right;white-space:nowrap}.pipeline-money strong{display:block;color:var(--text);font-size:15px}.pipeline-money span{display:block;color:var(--muted);font-size:11.5px;margin-top:2px}
.pipeline-meta{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.pipeline-next{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.pipeline-next span{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2);font-weight:900}.pipeline-actions{justify-content:flex-end;flex-wrap:nowrap}
@media(max-width:1180px){.pipeline-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}.primary-line{grid-template-columns:1fr auto}.pipeline-money{grid-column:1/-1;text-align:left}.secondary-line{grid-template-columns:1fr 1fr}.pipeline-actions{justify-content:flex-start}}
@media(max-width:760px){.pipeline-filter-row,.primary-line,.secondary-line{grid-template-columns:1fr}.pipeline-badges,.pipeline-actions{justify-content:flex-start}.pipeline-meta,.pipeline-next,.pipeline-title strong{white-space:normal}}

/* Client Hub master client view */
.nav-btn[data-view="clientHub"] .nav-ico{background:linear-gradient(135deg,rgba(225,191,99,.22),rgba(47,122,87,.28));border-color:rgba(225,191,99,.48);color:var(--gold-2)}
.client-hub-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}
.client-hub-hero h2{margin:4px 0 8px;font-size:clamp(24px,3vw,38px);max-width:980px}
.client-hub-hero p{max-width:880px;margin:0}
.client-hub-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;min-width:280px}
.client-hub-kpis{margin-bottom:16px}
.client-hub-controls{padding:12px;margin-bottom:14px}
.client-hub-filter-row{grid-template-columns:minmax(260px,1fr) minmax(150px,.35fr) minmax(130px,.25fr) auto;align-items:end;gap:10px}
.client-hub-filter-row .btn{height:36px;white-space:nowrap}
.client-hub-lanes{display:grid;gap:16px}
.client-lane{border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.025),rgba(128,128,128,.035));padding:14px;box-shadow:var(--glow)}
.client-lane-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.client-lane-head h3{margin:2px 0 4px;font-size:20px}
.client-lane-head p{margin:0;color:var(--muted);font-size:12.5px;line-height:1.45;max-width:900px}
.lane-attention{border-color:rgba(228,93,107,.28)}
.lane-onboarding{border-color:rgba(216,154,61,.24)}
.lane-scale{border-color:rgba(85,185,133,.28)}
.client-lane-list{display:grid;gap:10px}
.client-hub-card{border:1px solid var(--line);border-radius:18px;background:rgba(128,128,128,.045);padding:13px;display:grid;gap:10px;min-width:0}
.lane-attention .client-hub-card{background:linear-gradient(145deg,rgba(228,93,107,.06),rgba(128,128,128,.035))}
.lane-scale .client-hub-card{background:linear-gradient(145deg,rgba(85,185,133,.06),rgba(128,128,128,.035))}
.client-card-line{display:grid;align-items:center;gap:12px;min-width:0}
.client-card-primary{grid-template-columns:minmax(210px,1fr) minmax(180px,auto) minmax(135px,auto)}
.client-card-secondary{grid-template-columns:170px minmax(220px,1fr) minmax(240px,1.1fr) auto;border-top:1px solid var(--line);padding-top:10px}
.client-card-name{min-width:0;display:grid;gap:2px}.client-card-name strong{font-size:15.5px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.client-card-name span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-card-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-start}.client-card-value{text-align:right;white-space:nowrap}.client-card-value strong{display:block;color:var(--text);font-size:15px}.client-card-value span{display:block;color:var(--muted);font-size:11.5px;margin-top:2px}
.client-card-progress{display:grid;grid-template-columns:42px minmax(0,1fr);gap:8px;align-items:center}.client-card-progress>span{font-size:12px;color:var(--gold-2);font-weight:900}.client-card-meta{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.client-card-next{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.client-card-next span{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2);font-weight:900}.client-card-actions{justify-content:flex-end;flex-wrap:nowrap}.compact-empty{padding:13px!important;border-radius:14px!important}
.status.action,.status.load{background:rgba(228,93,107,.14);border-color:rgba(228,93,107,.28);color:var(--red)}.status.open,.status.new-lead{background:rgba(216,154,61,.13);border-color:rgba(216,154,61,.28);color:var(--amber)}.status.won,.status.low{background:rgba(85,185,133,.14);border-color:rgba(85,185,133,.28);color:var(--green-2)}
@media(max-width:1240px){.client-card-primary{grid-template-columns:1fr auto}.client-card-value{grid-column:1/-1;text-align:left}.client-card-secondary{grid-template-columns:1fr 1fr}.client-card-actions{justify-content:flex-start}.client-hub-filter-row{grid-template-columns:repeat(2,minmax(0,1fr))}.client-hub-actions{min-width:0}}
@media(max-width:760px){.client-hub-hero{display:grid}.client-hub-actions{justify-content:flex-start}.client-hub-filter-row,.client-card-primary,.client-card-secondary{grid-template-columns:1fr}.client-card-badges,.client-card-actions{justify-content:flex-start}.client-card-name strong,.client-card-name span,.client-card-meta,.client-card-next{white-space:normal}.client-lane{padding:11px}}

/* Sidebar icon shape hotfix: keep menu icons perfectly circular */
.nav-ico{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  max-width:28px!important;
  flex:0 0 28px!important;
  aspect-ratio:1 / 1!important;
  border-radius:999px!important;
  display:inline-grid!important;
  place-items:center!important;
  line-height:1!important;
  padding:0!important;
  box-sizing:border-box!important;
}
.nav-btn{
  align-items:center!important;
}
.nav-btn span:not(.nav-ico){
  min-width:0;
}
@media(max-width:1200px){
  .nav-ico{
    width:28px!important;
    height:28px!important;
    min-width:28px!important;
    max-width:28px!important;
    flex-basis:28px!important;
  }
}

/* Client Portal Preview */
.client-portal-admin-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}
.client-portal-admin-hero h2{margin:4px 0 8px;font-size:clamp(24px,3vw,38px)}
.client-portal-admin-hero p{max-width:880px;margin:0}
.client-portal-selector{display:flex;align-items:end;gap:10px;min-width:min(420px,100%);justify-content:flex-end}
.client-portal-selector .filter-field{min-width:260px}
.client-portal-shell{display:grid;grid-template-columns:250px minmax(0,1fr);gap:16px;align-items:start}
.client-portal-menu{position:sticky;top:20px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(145deg,var(--panel),var(--panel-2));box-shadow:var(--shadow);padding:14px;display:grid;gap:8px}
.client-portal-brand{display:flex;align-items:center;gap:10px;padding:8px 8px 14px;border-bottom:1px solid var(--line);margin-bottom:6px}
.client-portal-brand strong{display:block}.client-portal-brand span{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.client-portal-menu button{border:1px solid transparent;background:transparent;color:var(--muted);text-align:left;border-radius:14px;padding:11px 12px;font-weight:900}
.client-portal-menu button.active,.client-portal-menu button:hover{background:rgba(200,162,74,.10);border-color:var(--line);color:var(--text)}
.client-portal-main{display:grid;gap:16px;min-width:0}
.client-welcome-card{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;align-items:center}
.client-welcome-card h3{font-family:var(--font-display);font-size:28px;margin:6px 0 8px}
.portal-login-preview{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(128,128,128,.045);display:grid;gap:8px}
.portal-login-preview strong{color:var(--gold);font-size:12px;letter-spacing:.12em;text-transform:uppercase}.portal-login-preview span{color:var(--muted);font-size:13px;line-height:1.45}
.portal-stage-track{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}
.portal-stage{border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(128,128,128,.045);display:grid;gap:8px;min-height:86px;align-content:center;text-align:center}
.portal-stage b{width:30px;height:30px;border-radius:999px;display:grid;place-items:center;margin:0 auto;background:var(--chip);color:var(--muted)}
.portal-stage.done{border-color:rgba(85,185,133,.28);background:rgba(85,185,133,.08)}.portal-stage.done b{background:rgba(85,185,133,.18);color:var(--green-2)}
.portal-stage span{font-size:12px;font-weight:900;color:var(--text)}
.check-pill-grid{display:flex;flex-wrap:wrap;gap:8px}.check-pill-grid.stacked{display:grid}.check-pill-grid.compact .check-pill{min-width:96px}.daily-check-grid{display:flex;flex-wrap:wrap;gap:8px}
.check-pill{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:999px;padding:8px 10px;background:rgba(128,128,128,.045);font-size:12px;font-weight:900;color:var(--muted)}
.check-pill b{color:var(--muted)}.check-pill.done{background:rgba(85,185,133,.10);border-color:rgba(85,185,133,.28);color:var(--green-2)}.check-pill.done b{color:var(--green-2)}
.week-checklist{display:grid;gap:9px}.week-check-row{border:1px solid var(--line);border-radius:16px;background:rgba(128,128,128,.045);padding:12px;display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.week-check-row strong{display:block}.week-check-row span{display:block;color:var(--muted);font-size:12px;line-height:1.45;margin-top:4px}.week-check-row b{color:var(--muted)}.week-check-row.done{border-color:rgba(85,185,133,.28);background:rgba(85,185,133,.08)}.week-check-row.done b{color:var(--green-2)}
@media(max-width:1120px){.client-portal-admin-hero,.client-welcome-card{grid-template-columns:1fr;display:grid}.client-portal-selector{justify-content:flex-start}.portal-stage-track{grid-template-columns:repeat(4,minmax(0,1fr))}.client-portal-shell{grid-template-columns:1fr}.client-portal-menu{position:relative;top:auto;display:flex;overflow:auto}.client-portal-brand{min-width:220px;border-bottom:0;border-right:1px solid var(--line);padding-bottom:8px;margin-bottom:0}.client-portal-menu button{white-space:nowrap}}
@media(max-width:760px){.client-portal-selector{display:grid}.client-portal-selector .filter-field{min-width:0}.portal-stage-track{grid-template-columns:repeat(2,minmax(0,1fr))}.client-portal-menu{display:grid}.client-portal-brand{border-right:0;border-bottom:1px solid var(--line);min-width:0}}

/* Client portal as a separate front-end shell tied to the admin client record */
body.client-portal-mode .sidebar,
body.client-portal-mode .topbar,
body.client-portal-mode .mobile-nav-toggle,
body.client-portal-mode #mobileNavBackdrop{
  display:none!important;
}
body.client-portal-mode .app-shell{
  grid-template-columns:1fr!important;
}
body.client-portal-mode .main{
  padding:0!important;
  min-height:100vh;
}
body.client-portal-mode .view{
  gap:0;
  min-height:100vh;
}
.client-auth-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:32px;
  background:
    radial-gradient(circle at 15% 10%, rgba(225,191,99,.13), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(47,122,87,.20), transparent 30%),
    linear-gradient(145deg,var(--bg),var(--sidebar));
}
.client-auth-card{
  width:min(1080px,100%);
  padding:28px;
}
.client-auth-brand{display:flex;align-items:flex-start;gap:18px;margin-bottom:24px}
.client-auth-brand h1{font-family:var(--font-display);font-size:clamp(32px,5vw,56px);line-height:.98;margin:6px 0 10px;max-width:780px}
.client-auth-brand p{max-width:760px;line-height:1.55;margin:0}
.client-auth-grid{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px;align-items:stretch}
.client-auth-panel{border:1px solid var(--line);border-radius:24px;padding:20px;background:linear-gradient(145deg,var(--panel-2),var(--panel-3));display:grid;gap:10px;align-content:start}
.client-auth-avatar{width:64px;height:64px;border-radius:22px;display:grid;place-items:center;background:linear-gradient(135deg,var(--green),var(--gold));color:#fff;font-weight:950;font-size:26px}
.client-auth-panel strong{font-size:22px}.client-auth-panel span{color:var(--muted)}
.client-auth-form{border:1px solid var(--line);border-radius:24px;padding:20px;background:rgba(128,128,128,.045);display:grid;gap:12px}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:4px}
.auth-tabs button{border:1px solid var(--line);border-radius:14px;background:var(--input);color:var(--muted);font-weight:950;padding:11px}
.auth-tabs button.active{background:linear-gradient(135deg,rgba(47,122,87,.32),rgba(225,191,99,.14));color:var(--text);border-color:var(--line-strong)}
.client-auth-form .field{display:grid;gap:7px}.client-auth-form .field label{margin:0}
.client-auth-preview-control{margin-top:16px;display:flex;justify-content:flex-end}
.client-only-shell{min-height:100vh;display:grid;grid-template-columns:292px minmax(0,1fr);background:linear-gradient(145deg,var(--bg),var(--sidebar));}
.client-only-sidebar{position:sticky;top:0;height:100vh;padding:22px 18px;display:flex;flex-direction:column;gap:14px;background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2));border-right:1px solid var(--line);overflow:auto;scrollbar-width:none}
.client-only-sidebar::-webkit-scrollbar{display:none}
.client-portal-brand.large{display:flex;align-items:center;gap:12px;padding:0 4px 16px;border-bottom:1px solid var(--line);margin-bottom:2px}
.client-portal-brand.large .avatar{width:46px;height:46px;border-radius:16px;flex:0 0 46px}.client-portal-brand.large strong{display:block}.client-portal-brand.large span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.client-step-nav{display:grid;gap:6px;flex:1;align-content:start}
.portal-menu-link{display:grid;gap:3px;text-decoration:none;color:var(--muted);border:1px solid transparent;border-radius:16px;padding:11px 12px;background:transparent;transition:var(--ease)}
.portal-menu-link span{font-weight:950;color:inherit}.portal-menu-link small{font-size:11px;color:var(--muted)}
.portal-menu-link:hover,.portal-menu-link.active{background:linear-gradient(135deg,rgba(47,122,87,.28),rgba(225,191,99,.12));border-color:var(--line);color:var(--text)}
.client-only-main{padding:28px;display:grid;gap:18px;align-content:start;min-width:0}
.client-hero-panel{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px}
.client-hero-panel h1{font-family:var(--font-display);font-size:clamp(34px,5vw,60px);line-height:.98;margin:6px 0 10px}.client-hero-panel p{max-width:820px;margin:0;line-height:1.55}
.client-hero-progress{min-width:210px;border:1px solid var(--line);border-radius:22px;padding:18px;background:rgba(128,128,128,.045)}
.client-hero-progress strong{display:block;font-size:42px;line-height:1;font-weight:950}.client-hero-progress span{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.12em;font-weight:950;margin:8px 0 0}
.portal-status-stack{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.client-journey-list{display:grid;gap:10px}.journey-row{display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;align-items:start;border:1px solid var(--line);border-radius:18px;padding:13px;background:rgba(128,128,128,.045)}
.journey-row b{width:34px;height:34px;border-radius:13px;display:grid;place-items:center;background:var(--chip);color:var(--gold);font-weight:950}.journey-row.done{border-color:rgba(85,185,133,.32);background:rgba(85,185,133,.08)}.journey-row.done b{background:rgba(85,185,133,.16);color:var(--green-2)}
.journey-row strong{display:block;margin-bottom:3px}.journey-row span{display:block;color:var(--muted);font-size:13px;line-height:1.45}
.support-box{display:grid;gap:12px;align-content:start}.support-box p{margin:0;line-height:1.55}
.readiness-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.readiness-grid div{border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(128,128,128,.045)}.readiness-grid span{display:block;color:var(--muted);font-size:11px;letter-spacing:.12em;text-transform:uppercase;font-weight:950}.readiness-grid strong{display:block;font-size:28px;margin-top:8px}
/* Sidebar icon hardening */
.nav-ico{width:31px!important;height:31px!important;min-width:31px!important;min-height:31px!important;max-width:31px!important;max-height:31px!important;aspect-ratio:1/1!important;border-radius:999px!important;line-height:1!important;display:inline-grid!important;place-items:center!important;flex:0 0 31px!important;overflow:hidden!important;box-sizing:border-box!important}
.nav-btn{align-items:center!important}.nav-btn span:not(.nav-ico){min-width:0}
@media(max-width:1120px){.client-auth-grid,.client-only-shell{grid-template-columns:1fr}.client-only-sidebar{position:relative;height:auto}.client-step-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.client-hero-panel{display:grid}.client-hero-progress{min-width:0}.readiness-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.client-auth-page{padding:16px}.client-auth-card{padding:18px}.client-auth-brand{display:grid}.client-step-nav{grid-template-columns:1fr}.client-only-main{padding:16px}.client-hero-panel h1{font-size:34px}.portal-status-stack{justify-content:flex-start}.readiness-grid{grid-template-columns:1fr}}

/* Client Portal overview cleanup */
.client-video-intro{
  display:grid;
  grid-template-columns:minmax(260px,420px) minmax(0,1fr);
  gap:18px;
  align-items:center;
  padding:18px;
}
.video-placeholder{
  min-height:220px;
  border:1px solid var(--line);
  border-radius:24px;
  background:linear-gradient(135deg,rgba(47,122,87,.22),rgba(225,191,99,.12));
  display:grid;
  place-items:center;
  align-content:center;
  gap:8px;
  text-align:center;
  color:var(--text);
}
.video-placeholder span{
  width:62px;
  height:62px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.14);
  border:1px solid var(--line-strong);
  font-size:24px;
  padding-left:3px;
}
.video-placeholder strong{font-size:20px}
.video-placeholder small{color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.client-video-intro h3{font-family:var(--font-display);font-size:30px;margin:6px 0 8px}
.client-video-intro p{line-height:1.55;margin:0 0 14px;max-width:760px}
@media(max-width:920px){.client-video-intro{grid-template-columns:1fr}.video-placeholder{min-height:180px}}

/* Client Portal simplified overview + Growth Advisor */
.client-next-step-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:22px;
}
.client-next-step-card h3{
  font-family:var(--font-display);
  font-size:clamp(26px,3vw,40px);
  line-height:1.02;
  margin:6px 0 8px;
}
.next-step-action{
  display:grid;
  gap:10px;
  justify-items:end;
  min-width:220px;
}
.next-step-action span{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.client-health-chat{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:95;
}
.client-health-orb{
  width:64px;
  height:64px;
  border-radius:999px;
  display:grid;
  place-items:center;
  border:1px solid var(--gold-line);
  background:linear-gradient(135deg,var(--green),var(--gold));
  color:white;
  box-shadow:0 22px 54px rgba(0,0,0,.32);
  cursor:pointer;
  transition:var(--ease);
}
.client-health-orb:hover{transform:translateY(-2px)}
.client-health-orb span{
  width:42px;
  height:42px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.28);
  font-weight:950;
  font-size:20px;
}
.client-health-panel{
  position:absolute;
  right:0;
  bottom:78px;
  width:min(420px,calc(100vw - 32px));
  max-height:min(640px,calc(100vh - 120px));
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px;
  border:1px solid var(--gold-line);
  border-radius:24px;
  background:linear-gradient(145deg,var(--panel),var(--panel-2));
  box-shadow:0 30px 80px rgba(0,0,0,.42);
  overflow:hidden;
}
.client-health-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding-bottom:12px;
  border-bottom:1px solid var(--line);
}
.client-health-head strong{display:block}
.client-health-head span{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.client-health-logo{
  width:38px;
  height:38px;
  border-radius:999px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--green),var(--gold));
  color:white;
  font-weight:950;
}
.client-health-head .icon-btn{margin-left:auto}
.client-health-messages{
  min-height:160px;
  max-height:300px;
}
.health-quick-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.client-health-form textarea{min-height:50px}
@media(max-width:760px){
  .client-next-step-card{grid-template-columns:1fr}
  .next-step-action{justify-items:start;min-width:0}
  .next-step-action span{justify-content:flex-start}
  .client-health-chat{right:16px;bottom:16px}
  .client-health-orb{width:58px;height:58px}
}


/* Client portal logo + next-step type polish */
.client-brand-mark{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  flex:0 0 46px!important;
  border-radius:16px!important;
  font-size:24px!important;
}
.client-portal-brand.large .client-brand-mark{
  width:46px!important;
  height:46px!important;
  border-radius:16px!important;
}
.client-health-orb.advisor-logo-btn{
  width:64px!important;
  height:64px!important;
  border-radius:18px!important;
  padding:0;
}
.client-health-orb.advisor-logo-btn span{
  width:42px!important;
  height:42px!important;
  border-radius:50%!important;
}
.client-health-logo.brand-mark.mini{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  flex:0 0 38px!important;
  border-radius:14px!important;
  font-size:20px!important;
  box-shadow:0 0 0 3px rgba(225,191,99,.035),0 10px 24px rgba(0,0,0,.18);
}
.client-next-step-card{
  padding:18px 20px!important;
  align-items:center;
}
.client-next-step-card h3{
  font-size:clamp(20px,2.1vw,28px)!important;
  line-height:1.14!important;
  margin:5px 0 7px!important;
  max-width:820px;
}
.client-next-step-card p{
  margin:0;
  font-size:13px;
  line-height:1.45;
}
@media(max-width:760px){
  .client-health-orb.advisor-logo-btn{width:58px!important;height:58px!important}
}

/* Client Portal first-pass training sections */
.client-step-nav button.portal-menu-link{
  width:100%;
  text-align:left;
  font-family:inherit;
  cursor:pointer;
}
.client-section-page{
  display:grid;
  gap:16px;
}
.client-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  padding:22px;
  border:1px solid var(--line);
  border-radius:28px;
  background:linear-gradient(145deg,var(--panel),var(--panel-2));
  box-shadow:var(--shadow-soft);
}
.client-section-head h2{
  font-family:var(--font-display);
  font-size:clamp(34px,4vw,58px);
  line-height:.98;
  margin:6px 0 0;
}
.section-copy{
  margin:0;
  max-width:820px;
  line-height:1.55;
}
.portal-checklist-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.portal-check-item{
  border:1px solid var(--line);
  border-radius:20px;
  padding:14px;
  background:rgba(128,128,128,.045);
  color:var(--text);
  text-align:left;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  grid-template-areas:"dot title" "dot desc";
  gap:4px 10px;
  cursor:pointer;
  transition:var(--ease);
  font-family:inherit;
}
.portal-check-item:hover{transform:translateY(-1px);border-color:var(--line-strong)}
.portal-check-item .check-dot{
  grid-area:dot;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--chip);
  color:var(--gold);
  font-weight:950;
}
.portal-check-item strong{grid-area:title;font-size:14px}
.portal-check-item small{grid-area:desc;color:var(--muted);line-height:1.35}
.portal-check-item.done{
  background:rgba(85,185,133,.08);
  border-color:rgba(85,185,133,.32);
}
.portal-check-item.done .check-dot{background:rgba(85,185,133,.18);color:var(--green-2)}
.training-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.training-grid.two{margin-top:14px}
.training-card,.portal-quiz,.support-panel,.portal-review-card{
  border:1px solid var(--line);
  border-radius:24px;
  padding:16px;
  background:rgba(128,128,128,.045);
}
.training-card h3{font-family:var(--font-display);font-size:28px;line-height:1.05;margin:0 0 8px}
.training-card p{margin:0 0 14px;line-height:1.5}
.portal-quiz{display:grid;gap:12px;background:rgba(0,0,0,.08)}
.portal-quiz.complete{border-color:rgba(85,185,133,.32);background:rgba(85,185,133,.06)}
.portal-quiz-head{display:flex;justify-content:space-between;align-items:start;gap:10px}
.portal-quiz-head h4{margin:4px 0 0;font-size:16px}
.quiz-question{display:grid;gap:8px;border-top:1px solid var(--line);padding-top:12px}
.quiz-question strong{font-size:13px;line-height:1.35}
.quiz-options{display:grid;gap:7px}
.quiz-option{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 11px;
  background:var(--input);
  color:var(--text);
  text-align:left;
  font-weight:800;
  cursor:pointer;
}
.quiz-option:hover{border-color:var(--line-strong);background:rgba(200,162,74,.08)}
.quiz-feedback{margin:0;padding:10px 12px;border-radius:14px;font-weight:900}
.quiz-feedback.ok{background:rgba(85,185,133,.12);color:var(--green-2)}
.quiz-feedback.bad{background:rgba(242,154,96,.12);color:#ffbd8a}
.archetype-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.archetype-card{
  border:1px solid var(--line);
  border-radius:22px;
  padding:14px;
  background:rgba(128,128,128,.045);
}
.archetype-card span{
  width:34px;
  height:34px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,rgba(47,122,87,.28),rgba(225,191,99,.14));
  border:1px solid var(--line);
  color:var(--gold);
  font-weight:950;
  margin-bottom:10px;
}
.archetype-card h4{margin:0 0 6px;font-size:16px}
.archetype-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}
.portal-bullets{margin:12px 0 0;padding-left:18px;color:var(--muted);line-height:1.7}
.full-video-card .video-placeholder.large{min-height:300px}
.readiness-card strong{display:block;font-size:34px;line-height:1}
.readiness-card span{display:block;margin:8px 0 10px;color:var(--muted);font-weight:950;text-transform:uppercase;letter-spacing:.08em;font-size:11px}
.support-panel{display:grid;gap:10px;max-width:780px}
.support-panel h3{font-family:var(--font-display);font-size:34px;margin:0}
@media(max-width:1080px){
  .portal-checklist-grid,.archetype-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .training-grid{grid-template-columns:1fr}
}
@media(max-width:680px){
  .client-section-head{display:grid;align-items:start}
  .portal-checklist-grid,.archetype-grid{grid-template-columns:1fr}
  .vega-related-grid{grid-template-columns:1fr}
}

/* Client Portal course cleanup: remove duplicate intro/next pages, strengthen learning pages */
.portal-video-module{
  display:grid;
  grid-template-columns:minmax(260px,420px) minmax(0,1fr);
  gap:18px;
  align-items:center;
  padding:18px;
  border-color:var(--line-strong);
}
.video-placeholder.course-video{
  min-height:210px;
  background:radial-gradient(circle at 18% 14%,rgba(225,191,99,.18),transparent 36%),linear-gradient(135deg,rgba(47,122,87,.22),rgba(225,191,99,.10));
}
.portal-video-module h3{
  font-family:var(--font-display);
  font-size:clamp(26px,3vw,38px);
  line-height:1.02;
  margin:6px 0 8px;
}
.portal-video-module p{line-height:1.55;margin:0 0 10px;max-width:820px}
.lesson-panel-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.lesson-panel.card,.pc-setup-note.card{
  padding:16px;
  border-radius:24px;
  border:1px solid var(--line);
  background:rgba(128,128,128,.045);
}
.lesson-panel h3,.pc-setup-note h3{
  font-family:var(--font-display);
  font-size:28px;
  line-height:1.05;
  margin:0 0 8px;
}
.lesson-panel p,.pc-setup-note p{margin:0;line-height:1.55}
.module-points{
  margin:0 0 14px;
  padding-left:18px;
  color:var(--muted);
  line-height:1.55;
  font-size:13px;
}
.archetype-grid.rich-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.archetype-card.rich{
  display:grid;
  gap:7px;
  align-content:start;
  min-height:220px;
}
.archetype-card.rich span{
  width:40px;
  height:40px;
  font-size:18px;
  border-radius:15px;
}
.archetype-card.rich p{
  color:var(--muted);
  font-size:12.5px;
  line-height:1.45;
}
.archetype-card.rich p b{color:var(--text)}
.quiz-option.selected{border-color:var(--line-strong);background:rgba(225,191,99,.10)}
.quiz-option.correct{border-color:rgba(85,185,133,.45);background:rgba(85,185,133,.10)}
.quiz-option.wrong{border-color:rgba(242,154,96,.45);background:rgba(242,154,96,.10)}
.portal-quiz-head .micro{margin:4px 0 0;color:var(--muted);font-size:11px;letter-spacing:.04em;text-transform:none}
@media(max-width:1080px){
  .portal-video-module,.lesson-panel-grid{grid-template-columns:1fr}
  .archetype-grid.rich-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
  .archetype-grid.rich-grid{grid-template-columns:1fr}
  .portal-video-module{padding:14px}
}

/* Client Portal journey language pass */
.journey-intro.card{
  padding:18px 20px;
  border:1px solid var(--line-strong);
  border-radius:26px;
  background:linear-gradient(135deg,rgba(47,122,87,.18),rgba(225,191,99,.06));
}
.journey-intro h3{
  font-family:var(--font-display);
  font-size:clamp(28px,3vw,40px);
  line-height:1.02;
  margin:6px 0 8px;
}
.journey-intro p{margin:0;max-width:900px;line-height:1.55}
.client-section-head .spark{color:var(--gold-2)}
.client-next-step-card h3{font-size:clamp(22px,2.2vw,34px)!important;line-height:1.08}
.portal-menu-link small{line-height:1.25}

/* VEGA course breakup: intake-style lesson flow */
.portal-course-flow{
  display:grid;
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  gap:16px;
  align-items:start;
}
.portal-course-side{
  position:sticky;
  top:18px;
  display:grid;
  gap:12px;
  align-content:start;
}
.portal-course-side h3{
  font-family:var(--font-display);
  font-size:28px;
  line-height:1.05;
  margin:6px 0 0;
}
.portal-course-side p{margin:0;line-height:1.5}
.portal-course-map{
  display:grid;
  gap:9px;
  margin-top:4px;
}
.portal-course-step{
  width:100%;
  text-align:left;
}
.portal-course-main{
  display:grid;
  gap:16px;
  overflow:visible;
}
.portal-course-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}
.portal-course-head h3{
  font-family:var(--font-display);
  font-size:clamp(30px,3.5vw,48px);
  line-height:.98;
  margin:6px 0 8px;
}
.portal-course-head p{margin:0;line-height:1.55;max-width:860px}
.portal-course-actions{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-top:1px solid var(--line);
  padding-top:14px;
}
.portal-course-actions .btn[disabled],
.portal-course-step[disabled]{
  opacity:.45;
  cursor:not-allowed;
}
.portal-course-main .portal-video-module{margin:0}
@media(max-width:1080px){
  .portal-course-flow{grid-template-columns:1fr}
  .portal-course-side{position:relative;top:auto}
}
@media(max-width:680px){
  .portal-course-head{display:grid}
  .portal-course-actions{display:grid;grid-template-columns:1fr}
}

/* HELIOS course breakup: intake-style archetype flow */
.helios-course-flow .portal-course-side{border-color:var(--line-strong)}
.helios-course-head{align-items:flex-start}
.helios-lesson-title{
  display:flex;
  align-items:flex-start;
  gap:16px;
}
.helios-symbol{
  flex:0 0 58px;
  width:58px;
  height:58px;
  border-radius:22px;
  display:grid;
  place-items:center;
  font-family:var(--font-display);
  font-size:30px;
  color:var(--gold-2);
  background:linear-gradient(135deg,rgba(47,122,87,.24),rgba(225,191,99,.13));
  border:1px solid var(--line-strong);
  box-shadow:var(--shadow-sm);
}
.helios-course-flow .lesson-panel-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.helios-course-flow .lesson-panel h3{font-size:24px}
@media(max-width:1180px){
  .helios-course-flow .lesson-panel-grid{grid-template-columns:1fr}
}
@media(max-width:680px){
  .helios-lesson-title{display:grid;gap:12px}
  .helios-symbol{width:50px;height:50px;flex-basis:50px;border-radius:18px;font-size:26px}
}

/* Computer setup vertical why checklist */
.portal-why-checklist{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:14px;
  max-width:980px;
}
.portal-why-check-item{
  border:1px solid var(--line);
  border-radius:22px;
  padding:16px;
  background:rgba(128,128,128,.045);
  color:var(--text);
  text-align:left;
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:12px;
  cursor:pointer;
  transition:var(--ease);
  font-family:inherit;
  width:100%;
}
.portal-why-check-item:hover{
  transform:translateY(-1px);
  border-color:var(--line-strong);
  background:rgba(128,128,128,.065);
}
.portal-why-check-item .check-dot{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:var(--chip);
  color:var(--gold);
  font-weight:950;
  line-height:1;
}
.portal-why-check-item.done{
  background:rgba(85,185,133,.08);
  border-color:rgba(85,185,133,.34);
}
.portal-why-check-item.done .check-dot{
  background:rgba(85,185,133,.18);
  color:var(--green-2);
}
.why-check-content{
  display:grid;
  gap:6px;
}
.why-check-content strong{
  font-size:15px;
  line-height:1.2;
}
.why-check-content small{
  color:var(--muted);
  line-height:1.45;
}
.why-check-content em{
  font-style:normal;
  color:var(--text-soft);
  line-height:1.45;
  border-left:3px solid rgba(208,168,92,.48);
  padding-left:10px;
}
.why-check-content em b{
  color:var(--gold);
  font-weight:950;
}
@media(max-width:680px){
  .portal-why-check-item{
    grid-template-columns:32px minmax(0,1fr);
    padding:14px;
  }
  .portal-why-check-item .check-dot{
    width:30px;
    height:30px;
  }
}

/* Client portal payment agreement card */
.portal-payment-card{
  margin-top:18px;
  padding:22px;
  display:grid;
  gap:18px;
}
.portal-payment-head{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
}
.portal-payment-head h3{
  margin:4px 0 8px;
  font-size:1.08rem;
}
.portal-payment-head p{
  max-width:760px;
}
.payment-status-paid{
  min-width:140px;
  border:1px solid rgba(65,82,70,.16);
  border-radius:18px;
  padding:14px 16px;
  text-align:center;
  background:rgba(240,247,240,.74);
}
.payment-status-paid strong{
  display:block;
  font-size:1.55rem;
  line-height:1;
}
.payment-status-paid span{
  display:block;
  margin-top:6px;
  font-size:.78rem;
  color:var(--muted);
}
.payment-progress-row{
  display:grid;
  grid-template-columns:minmax(150px,220px) 1fr minmax(110px,160px);
  gap:16px;
  align-items:center;
  padding:14px 16px;
  border:1px solid rgba(65,82,70,.12);
  border-radius:18px;
  background:rgba(255,255,255,.58);
}
.payment-progress-row strong,
.payment-remaining strong{
  display:block;
  font-size:1rem;
}
.payment-progress-row span,
.payment-remaining span{
  display:block;
  margin-top:4px;
  font-size:.78rem;
  color:var(--muted);
}
.payment-remaining{
  text-align:right;
}
.payment-reminder-box{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
  border:1px solid rgba(132,99,58,.18);
  border-radius:18px;
  padding:16px;
  background:rgba(255,248,236,.72);
}
.payment-reminder-box p{
  margin:5px 0 0;
  color:var(--text);
}
.payment-due-block{
  min-width:170px;
  text-align:right;
}
.payment-due-block strong,
.payment-due-block span{
  display:block;
}
.payment-due-block span{
  margin-top:4px;
  color:var(--muted);
  font-size:.82rem;
}
@media (max-width: 760px){
  .portal-payment-head,
  .payment-reminder-box{
    flex-direction:column;
  }
  .payment-progress-row{
    grid-template-columns:1fr;
  }
  .payment-remaining,
  .payment-due-block{
    text-align:left;
  }
}

/* Client portal login should behave like an external-facing page: no known-client preview card. */
.client-login-only-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:clamp(24px,4vw,56px);
}
.client-login-only-card{
  width:min(720px,100%);
  margin:0 auto;
}
.client-auth-brand.centered{
  justify-content:center;
  text-align:center;
  align-items:center;
  margin-bottom:24px;
}
.client-auth-brand.centered .brand-mark{
  margin:0 auto 12px;
}
.client-auth-form-only{
  max-width:560px;
  margin:0 auto;
}
.client-auth-form-only .auth-tabs{
  margin-bottom:18px;
}

/* Client login hero spacing hotfix: prevent the title from feeling cramped/squished. */
.client-login-only-page{
  align-items:start;
  padding:clamp(32px,5vw,72px) clamp(18px,4vw,56px);
}
.client-login-only-card{
  width:min(780px,100%);
  margin:0 auto;
  padding:clamp(24px,4vw,42px);
}
.client-auth-brand.centered{
  display:grid;
  grid-template-columns:1fr;
  justify-items:center;
  gap:14px;
  margin-bottom:clamp(24px,3vw,34px);
}
.client-auth-brand.centered .brand-mark{
  margin:0;
  width:48px;
  height:48px;
  min-width:48px;
  border-radius:14px;
}
.client-auth-brand.centered h1{
  max-width:640px;
  margin:8px auto 12px;
  font-size:clamp(34px,4.2vw,52px);
  line-height:1.08;
  letter-spacing:-.025em;
  text-wrap:balance;
}
.client-auth-brand.centered p{
  max-width:620px;
  margin:0 auto;
  font-size:clamp(.95rem,1.25vw,1.05rem);
  line-height:1.65;
}
.client-auth-form-only{
  max-width:600px;
}
@media (max-width: 760px){
  .client-login-only-page{
    padding:22px 14px;
  }
  .client-login-only-card{
    padding:22px 16px;
  }
  .client-auth-brand.centered h1{
    font-size:clamp(32px,11vw,42px);
    line-height:1.08;
  }
}

/* Payment card brand hotfix: remove leftover gray/light payment surfaces */
.portal-payment-card{
  border-color:rgba(200,162,74,.28) !important;
  background:linear-gradient(145deg,var(--panel),var(--panel-2)) !important;
  box-shadow:var(--shadow) !important;
}
.portal-payment-grid{
  display:grid !important;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr) !important;
  gap:16px !important;
  align-items:stretch !important;
}
.payment-mini-card,
.payment-plan-card,
.payment-reminder-card{
  border:1px solid rgba(200,162,74,.22) !important;
  border-radius:22px !important;
  background:linear-gradient(145deg,rgba(7,24,17,.92),rgba(13,44,31,.86)) !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 18px 38px rgba(0,0,0,.14) !important;
  color:var(--text) !important;
}
.payment-progress-row{
  display:grid !important;
  grid-template-columns:minmax(120px,170px) 1fr minmax(90px,130px) !important;
  gap:12px !important;
  align-items:center !important;
  margin-top:16px !important;
  padding:13px !important;
  border:1px solid rgba(200,162,74,.18) !important;
  border-radius:18px !important;
  background:rgba(0,0,0,.18) !important;
}
.payment-progress-row .progress-track{
  background:rgba(200,162,74,.12) !important;
  border:1px solid rgba(200,162,74,.12) !important;
}
.payment-progress-row .progress-track span{
  background:linear-gradient(90deg,var(--green-2),var(--gold)) !important;
}
.payment-status-paid{
  border:1px solid rgba(85,185,133,.34) !important;
  background:rgba(85,185,133,.12) !important;
  color:var(--green-2) !important;
}
.payment-status-paid strong{
  color:var(--green-2) !important;
}
.payment-reminder-box{
  border:1px solid rgba(200,162,74,.22) !important;
  background:linear-gradient(145deg,rgba(7,24,17,.92),rgba(13,44,31,.86)) !important;
  color:var(--text) !important;
}
.payment-reminder-box p,
.payment-mini-card p{
  color:var(--muted) !important;
}
.payment-due-block{
  border-top:1px solid rgba(200,162,74,.16) !important;
  padding-top:13px !important;
}
.payment-due-block strong{
  color:var(--gold-2) !important;
}
.payment-due-block span,
.payment-progress-row span,
.payment-remaining span{
  color:var(--muted) !important;
}
@media (max-width:980px){
  .portal-payment-grid{
    grid-template-columns:1fr !important;
  }
}
@media (max-width:680px){
  .payment-progress-row{
    grid-template-columns:1fr !important;
  }
  .payment-remaining,
  .payment-due-block{
    text-align:left !important;
  }
}

/* Client portal nav + payment action polish */
.client-step-nav{
  display:grid!important;
  gap:14px!important;
  flex:1;
  align-content:start;
}
.client-nav-section{
  display:grid;
  gap:7px;
  padding:0 0 12px;
  border-bottom:1px solid rgba(225,191,99,.16);
}
.client-nav-section:last-child{border-bottom:0;padding-bottom:0;}
.client-only-sidebar .nav-heading{
  color:var(--gold);
  font-size:10px;
  letter-spacing:2.4px;
  font-weight:950;
  text-transform:uppercase;
  padding:2px 9px 5px;
}
.client-step-nav button.portal-menu-link,
.portal-menu-link{
  width:100%;
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr);
  align-items:center;
  gap:10px!important;
  text-align:left;
  text-decoration:none;
  color:var(--muted);
  border:1px solid transparent;
  border-radius:16px;
  padding:9px 10px!important;
  background:transparent;
  transition:var(--ease);
}
.portal-nav-icon{
  width:28px;
  height:28px;
  min-width:28px;
  border-radius:999px;
  display:grid;
  place-items:center;
  color:var(--gold);
  background:rgba(225,191,99,.08);
  border:1px solid rgba(225,191,99,.35);
  font-size:13px;
  font-weight:950;
  line-height:1;
}
.portal-nav-text{
  min-width:0;
  display:grid;
  gap:2px;
}
.portal-nav-text strong{
  color:inherit;
  font-size:13px;
  font-weight:950;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.portal-nav-text small{
  color:var(--muted);
  font-size:10.5px;
  line-height:1.2;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.portal-menu-link:hover,
.portal-menu-link.active{
  background:linear-gradient(135deg,rgba(47,122,87,.35),rgba(225,191,99,.12));
  border-color:rgba(225,191,99,.45);
  color:var(--text);
}
.portal-menu-link.active .portal-nav-icon{
  background:linear-gradient(135deg,rgba(47,122,87,.75),rgba(225,191,99,.28));
  box-shadow:0 0 0 1px rgba(225,191,99,.18), 0 12px 24px rgba(0,0,0,.18);
}
.payment-action-stack{
  display:grid;
  justify-items:end;
  gap:10px;
  align-content:center;
  min-width:160px;
}
.payment-action-stack .btn{min-width:118px;justify-content:center;}
.client-health-orb.advisor-logo-btn,
.client-health-orb{
  width:64px!important;
  height:64px!important;
  border-radius:16px!important;
  display:grid!important;
  place-items:center!important;
  background:rgba(7,33,22,.95)!important;
  border:1px solid rgba(225,191,99,.55)!important;
  box-shadow:0 18px 44px rgba(0,0,0,.36), inset 0 0 0 1px rgba(255,255,255,.05)!important;
}
.client-health-orb.advisor-logo-btn span,
.client-health-orb span{
  width:42px!important;
  height:42px!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  background:linear-gradient(135deg,rgba(47,122,87,.55),rgba(225,191,99,.42))!important;
  border:1px solid rgba(225,191,99,.62)!important;
  color:#fff8df!important;
  font-family:var(--serif)!important;
  font-size:22px!important;
  font-weight:950!important;
  line-height:1!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)!important;
}
@media(max-width:1120px){
  .client-step-nav{grid-template-columns:repeat(2,minmax(0,1fr));}
  .client-nav-section{border-bottom:0;padding-bottom:0;}
}
@media(max-width:760px){
  .client-step-nav{grid-template-columns:1fr;}
  .payment-action-stack{justify-items:start;min-width:0;}
}


/* Growth Advisor logo uses the same brand-mark markup as the client side nav */
.client-health-orb.advisor-logo-btn,
.client-health-orb{
  width:64px!important;
  height:64px!important;
  padding:0!important;
  border-radius:18px!important;
  display:grid!important;
  place-items:center!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.client-health-orb .brand-mark.client-brand-mark{
  width:52px!important;
  height:52px!important;
  min-width:52px!important;
  flex:0 0 52px!important;
  border-radius:18px!important;
  display:grid!important;
  place-items:center!important;
  background:linear-gradient(145deg,var(--gold-2),var(--gold))!important;
  color:#0c1912!important;
  font-weight:950!important;
  font-size:26px!important;
  box-shadow:0 14px 34px rgba(200,162,74,.20)!important;
}
.client-health-orb .brand-mark.client-brand-mark span{
  width:auto!important;
  height:auto!important;
  border:0!important;
  background:transparent!important;
  color:inherit!important;
  font-family:inherit!important;
  font-size:inherit!important;
  font-weight:inherit!important;
  border-radius:0!important;
}
.client-health-orb:hover .brand-mark.client-brand-mark{
  transform:translateY(-1px);
  box-shadow:0 18px 44px rgba(200,162,74,.26)!important;
}
@media(max-width:760px){
  .client-health-orb.advisor-logo-btn,
  .client-health-orb{width:58px!important;height:58px!important;}
  .client-health-orb .brand-mark.client-brand-mark{width:48px!important;height:48px!important;min-width:48px!important;flex-basis:48px!important;}
}


/* Client portal sidebar: match admin sidebar system */
body.client-portal-mode .client-only-shell{
  grid-template-columns:300px minmax(0,1fr) !important;
}
body.client-portal-mode .client-only-sidebar{
  padding:26px 20px !important;
  gap:22px !important;
  background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2)) !important;
  border-right:1px solid var(--line) !important;
  overflow:auto !important;
  scrollbar-width:none !important;
}
body.client-portal-mode .client-only-sidebar::-webkit-scrollbar{display:none!important;}
body.client-portal-mode .client-brand-block{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
  padding:0 6px 14px !important;
  border-bottom:1px solid var(--line) !important;
  margin:0 !important;
}
body.client-portal-mode .client-brand-block .brand-mark,
body.client-portal-mode .client-brand-mark{
  width:52px !important;
  height:52px !important;
  min-width:52px !important;
  flex:0 0 52px !important;
  border-radius:18px !important;
  display:grid !important;
  place-items:center !important;
  background:linear-gradient(145deg,var(--gold-2),var(--gold)) !important;
  color:#0c1912 !important;
  font-weight:950 !important;
  font-size:26px !important;
  box-shadow:0 14px 34px rgba(200,162,74,.20) !important;
}
body.client-portal-mode .client-brand-block .brand-name{
  font-family:var(--font-display) !important;
  letter-spacing:.14em !important;
  font-size:18px !important;
  line-height:1 !important;
  color:var(--text) !important;
}
body.client-portal-mode .client-brand-block .brand-sub{
  font-size:10px !important;
  letter-spacing:.24em !important;
  color:var(--gold) !important;
  font-weight:900 !important;
  margin-top:5px !important;
}
body.client-portal-mode .client-step-nav{
  display:grid !important;
  gap:18px !important;
  flex:1 !important;
  align-content:start !important;
}
body.client-portal-mode .client-nav-section{
  display:grid !important;
  gap:7px !important;
  padding:0 0 18px !important;
  border-bottom:1px solid var(--line) !important;
}
body.client-portal-mode .client-nav-section:last-child{
  border-bottom:0 !important;
  padding-bottom:0 !important;
}
body.client-portal-mode .client-only-sidebar .nav-heading{
  font-size:10px !important;
  letter-spacing:.20em !important;
  text-transform:uppercase !important;
  color:var(--soft) !important;
  font-weight:900 !important;
  padding:0 10px !important;
}
body.client-portal-mode .portal-menu-link,
body.client-portal-mode .client-step-nav button.portal-menu-link{
  width:100% !important;
  border:0 !important;
  border-radius:16px !important;
  background:transparent !important;
  color:var(--muted) !important;
  padding:12px 12px !important;
  display:flex !important;
  align-items:center !important;
  gap:11px !important;
  text-align:left !important;
  transition:var(--ease) !important;
  box-shadow:none !important;
}
body.client-portal-mode .portal-menu-link:hover{
  background:rgba(200,162,74,.08) !important;
  color:var(--text) !important;
}
body.client-portal-mode .portal-menu-link.active{
  background:linear-gradient(135deg,rgba(47,122,87,.35),rgba(200,162,74,.16)) !important;
  color:var(--text) !important;
  box-shadow:inset 0 0 0 1px var(--line-strong) !important;
  border-right:4px solid var(--gold) !important;
}
body.client-portal-mode .portal-nav-icon{
  width:31px !important;
  height:31px !important;
  min-width:31px !important;
  flex:0 0 31px !important;
  border-radius:12px !important;
  display:grid !important;
  place-items:center !important;
  background:var(--chip) !important;
  border:0 !important;
  color:var(--gold) !important;
  font-weight:900 !important;
  font-size:13px !important;
  box-shadow:none !important;
}
body.client-portal-mode .portal-menu-link.active .portal-nav-icon{
  background:var(--chip) !important;
  box-shadow:none !important;
}
body.client-portal-mode .portal-nav-text{
  display:block !important;
  min-width:0 !important;
}
body.client-portal-mode .portal-nav-text strong{
  display:block !important;
  color:inherit !important;
  font-size:14px !important;
  font-weight:500 !important;
  letter-spacing:0 !important;
  overflow:visible !important;
  text-overflow:clip !important;
  white-space:normal !important;
}
body.client-portal-mode .portal-nav-text small{
  display:none !important;
}
body.client-portal-mode .client-only-sidebar .btn.full{
  border-radius:16px !important;
}
@media(max-width:1120px){
  body.client-portal-mode .client-only-shell{grid-template-columns:1fr!important;}
  body.client-portal-mode .client-only-sidebar{position:relative!important;height:auto!important;}
  body.client-portal-mode .client-step-nav{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body.client-portal-mode .client-nav-section{border-bottom:0!important;padding-bottom:0!important;}
}
@media(max-width:760px){
  body.client-portal-mode .client-step-nav{grid-template-columns:1fr!important;}
}

/* Client portal logo parity: use the exact same brand-mark treatment as admin nav and Growth Advisor. */
body.client-portal-mode .client-brand-block .brand-mark,
body.client-portal-mode .client-brand-mark,
body.client-portal-mode .client-health-orb .brand-mark.client-brand-mark,
body.client-portal-mode .client-health-logo.brand-mark,
body.client-portal-mode .client-auth-brand.centered .brand-mark{
  position:relative !important;
  width:58px !important;
  height:58px !important;
  min-width:58px !important;
  flex:0 0 58px !important;
  border-radius:18px !important;
  display:grid !important;
  place-items:center !important;
  background:radial-gradient(circle at 50% 42%,rgba(225,191,99,.18),transparent 40%),linear-gradient(145deg,rgba(225,191,99,.16),rgba(15,77,53,.18)) !important;
  border:1px solid rgba(225,191,99,.58) !important;
  color:var(--gold-2) !important;
  box-shadow:0 0 0 5px rgba(225,191,99,.035),0 16px 38px rgba(0,0,0,.24) !important;
  font-family:var(--font-display) !important;
  font-size:31px !important;
  font-weight:900 !important;
  line-height:1 !important;
  overflow:hidden !important;
}
body.client-portal-mode .client-brand-block .brand-mark span,
body.client-portal-mode .client-brand-mark span,
body.client-portal-mode .client-health-orb .brand-mark.client-brand-mark span,
body.client-portal-mode .client-health-logo.brand-mark span,
body.client-portal-mode .client-auth-brand.centered .brand-mark span{
  position:relative !important;
  z-index:2 !important;
  width:auto !important;
  height:auto !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:var(--gold-2) !important;
  font-family:var(--font-display) !important;
  font-size:31px !important;
  line-height:1 !important;
}
body.client-portal-mode .client-brand-block .brand-mark:before,
body.client-portal-mode .client-brand-block .brand-mark:after,
body.client-portal-mode .client-brand-mark:before,
body.client-portal-mode .client-brand-mark:after,
body.client-portal-mode .client-health-orb .brand-mark.client-brand-mark:before,
body.client-portal-mode .client-health-orb .brand-mark.client-brand-mark:after,
body.client-portal-mode .client-health-logo.brand-mark:before,
body.client-portal-mode .client-health-logo.brand-mark:after,
body.client-portal-mode .client-auth-brand.centered .brand-mark:before,
body.client-portal-mode .client-auth-brand.centered .brand-mark:after{
  content:"" !important;
  position:absolute !important;
  inset:7px !important;
  border:1px solid rgba(225,191,99,.45) !important;
  border-radius:14px !important;
  transform:rotate(45deg) !important;
  pointer-events:none !important;
  background:transparent !important;
}
body.client-portal-mode .client-brand-block .brand-mark:after,
body.client-portal-mode .client-brand-mark:after,
body.client-portal-mode .client-health-orb .brand-mark.client-brand-mark:after,
body.client-portal-mode .client-health-logo.brand-mark:after,
body.client-portal-mode .client-auth-brand.centered .brand-mark:after{
  inset:13px !important;
  border-color:rgba(225,191,99,.28) !important;
  transform:rotate(0deg) !important;
  border-radius:50% !important;
}
body.client-portal-mode .client-health-orb.advisor-logo-btn,
body.client-portal-mode .client-health-orb{
  width:70px !important;
  height:70px !important;
  border-radius:22px !important;
  display:grid !important;
  place-items:center !important;
  background:rgba(3,16,11,.88) !important;
  border:1px solid rgba(225,191,99,.16) !important;
  box-shadow:0 22px 46px rgba(0,0,0,.34) !important;
}

/* Client portal market rhythm additions */
.signal-chip-row{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0 12px}
.signal-chip-row span{display:inline-flex;align-items:center;border:1px solid var(--gold-soft);background:rgba(212,175,55,.08);color:var(--cream);border-radius:999px;padding:8px 10px;font-family:var(--mono);font-size:12px;letter-spacing:.04em}
.rhythm-course-flow .portal-course-main{position:relative;overflow:hidden}
.rhythm-course-flow .portal-course-main:before{content:"";position:absolute;inset:auto -10% -25% -10%;height:180px;background:radial-gradient(circle at 50% 50%, rgba(212,175,55,.10), transparent 65%);pointer-events:none}


/* ==========================================================
   STYLE GUIDE AUDIT PATCH — client portal parity with admin
   Goal: client portal uses the same admin visual system for
   sidebar/nav, logo, icons, headings, cards, buttons, and chat.
   ========================================================== */
body.client-portal-mode .client-only-shell{
  background:
    linear-gradient(180deg,rgba(225,191,99,.035),transparent 34%),
    radial-gradient(circle at 96% 6%,rgba(225,191,99,.08),transparent 17%),
    linear-gradient(135deg,var(--bg),var(--bg-2))!important;
}
body.client-portal-mode .client-only-sidebar{
  padding:26px 20px!important;
  gap:22px!important;
  background:
    radial-gradient(circle at 15% 6%,rgba(225,191,99,.10),transparent 20%),
    linear-gradient(180deg,#052016,#03100b 68%,#020906)!important;
  border-right:1px solid rgba(225,191,99,.28)!important;
  box-shadow:18px 0 54px rgba(0,0,0,.18)!important;
}
body.client-portal-mode .client-brand-block,
body.client-portal-mode .client-portal-brand.large{
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
  padding:0 6px 18px!important;
  border-bottom:1px solid var(--line)!important;
  margin:0!important;
}
body.client-portal-mode .client-brand-block .brand-name,
body.client-portal-mode .client-portal-brand.large .brand-name{
  font-family:var(--font-display)!important;
  font-size:20px!important;
  line-height:1!important;
  letter-spacing:.14em!important;
  color:var(--text)!important;
  text-shadow:0 0 24px rgba(225,191,99,.16)!important;
}
body.client-portal-mode .client-brand-block .brand-sub,
body.client-portal-mode .client-portal-brand.large .brand-sub{
  font-size:10px!important;
  letter-spacing:.24em!important;
  color:var(--gold-2)!important;
  opacity:.92!important;
  font-weight:800!important;
  margin-top:3px!important;
}
body.client-portal-mode .client-brand-mark,
body.client-portal-mode .client-health-orb .client-brand-mark,
body.client-portal-mode .client-health-logo.brand-mark,
body.client-portal-mode .client-auth-brand .client-brand-mark{
  position:relative!important;
  width:58px!important;
  height:58px!important;
  min-width:58px!important;
  min-height:58px!important;
  max-width:58px!important;
  max-height:58px!important;
  flex:0 0 58px!important;
  border-radius:18px!important;
  display:grid!important;
  place-items:center!important;
  background:radial-gradient(circle at 50% 42%,rgba(225,191,99,.18),transparent 40%),linear-gradient(145deg,rgba(225,191,99,.16),rgba(15,77,53,.18))!important;
  border:1px solid rgba(225,191,99,.58)!important;
  color:var(--gold-2)!important;
  box-shadow:0 0 0 5px rgba(225,191,99,.035),0 16px 38px rgba(0,0,0,.24)!important;
  font-family:var(--font-display)!important;
  font-size:31px!important;
  line-height:1!important;
}
body.client-portal-mode .client-brand-mark span,
body.client-portal-mode .client-health-orb .client-brand-mark span,
body.client-portal-mode .client-health-logo.brand-mark span{
  position:relative!important;
  z-index:2!important;
  width:auto!important;
  height:auto!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  font-size:inherit!important;
  color:inherit!important;
  padding:0!important;
}
body.client-portal-mode .client-brand-mark:before,
body.client-portal-mode .client-brand-mark:after,
body.client-portal-mode .client-health-logo.brand-mark:before,
body.client-portal-mode .client-health-logo.brand-mark:after{
  content:""!important;
  position:absolute!important;
  inset:7px!important;
  border:1px solid rgba(225,191,99,.45)!important;
  border-radius:14px!important;
  transform:rotate(45deg)!important;
  pointer-events:none!important;
}
body.client-portal-mode .client-brand-mark:after,
body.client-portal-mode .client-health-logo.brand-mark:after{
  inset:13px!important;
  border-color:rgba(225,191,99,.28)!important;
  transform:rotate(0deg)!important;
  border-radius:50%!important;
}
body.client-portal-mode .client-step-nav{
  display:grid!important;
  gap:20px!important;
  flex:1 1 auto!important;
  align-content:start!important;
}
body.client-portal-mode .client-nav-section{
  display:grid!important;
  gap:7px!important;
  padding-top:0!important;
  border-top:1px solid rgba(225,191,99,.16)!important;
}
body.client-portal-mode .client-nav-section:first-child{border-top:0!important;}
body.client-portal-mode .client-nav-section .nav-heading{
  font-size:10px!important;
  letter-spacing:.20em!important;
  text-transform:uppercase!important;
  color:var(--gold-2)!important;
  opacity:.82!important;
  font-weight:900!important;
  padding:0 10px!important;
}
body.client-portal-mode .portal-menu-link.nav-btn{
  width:100%!important;
  min-height:48px!important;
  border:1px solid transparent!important;
  border-radius:16px!important;
  background:transparent!important;
  color:var(--muted)!important;
  padding:12px 12px!important;
  display:flex!important;
  align-items:center!important;
  gap:11px!important;
  text-align:left!important;
  font-family:var(--font-body)!important;
  font-weight:400!important;
  transition:var(--ease)!important;
}
body.client-portal-mode .portal-menu-link.nav-btn:hover{
  background:rgba(21,75,52,.38)!important;
  border-color:rgba(225,191,99,.12)!important;
  color:var(--text)!important;
}
body.client-portal-mode .portal-menu-link.nav-btn.active{
  position:relative!important;
  background:linear-gradient(135deg,rgba(15,77,53,.92),rgba(19,91,61,.74))!important;
  border-color:rgba(225,191,99,.50)!important;
  color:var(--text)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 15px 34px rgba(0,0,0,.18)!important;
}
body.client-portal-mode .portal-menu-link.nav-btn.active:after{
  content:""!important;
  position:absolute!important;
  right:-1px!important;
  top:10px!important;
  bottom:10px!important;
  width:3px!important;
  border-radius:999px!important;
  background:var(--gold-2)!important;
  box-shadow:0 0 16px rgba(225,191,99,.65)!important;
}
body.client-portal-mode .portal-nav-icon.nav-ico{
  width:31px!important;
  height:31px!important;
  min-width:31px!important;
  min-height:31px!important;
  max-width:31px!important;
  max-height:31px!important;
  flex:0 0 31px!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  background:rgba(225,191,99,.08)!important;
  border:1px solid rgba(225,191,99,.16)!important;
  color:var(--gold-2)!important;
  font-weight:900!important;
  font-size:13px!important;
  line-height:1!important;
  overflow:hidden!important;
}
body.client-portal-mode .portal-nav-text{display:block!important;min-width:0!important;}
body.client-portal-mode .portal-nav-text strong{
  display:block!important;
  font-size:14px!important;
  font-weight:400!important;
  color:inherit!important;
  line-height:1.2!important;
}
body.client-portal-mode .portal-nav-text small{display:none!important;}
body.client-portal-mode .client-only-sidebar > .btn{
  border-color:rgba(225,191,99,.23)!important;
  background:rgba(128,128,128,.045)!important;
  color:var(--text)!important;
  border-radius:15px!important;
}
body.client-portal-mode .client-only-main{padding:30px 32px!important;}
body.client-portal-mode .client-section-head,
body.client-portal-mode .client-hero-panel,
body.client-portal-mode .portal-video-module,
body.client-portal-mode .journey-intro,
body.client-portal-mode .lesson-panel,
body.client-portal-mode .client-next-step-card,
body.client-portal-mode .portal-payment-card,
body.client-portal-mode .portal-payment-card .payment-mini-card,
body.client-portal-mode .portal-quiz,
body.client-portal-mode .portal-why-check-item,
body.client-portal-mode .portal-check-item,
body.client-portal-mode .support-panel,
body.client-portal-mode .readiness-card,
body.client-portal-mode .portal-review-card{
  border-color:rgba(225,191,99,.22)!important;
  background:linear-gradient(145deg,rgba(16,31,24,.96),rgba(10,22,17,.96))!important;
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 26px 80px rgba(0,0,0,.28)!important;
}
body.client-portal-mode .client-section-head h2,
body.client-portal-mode .client-hero-panel h1,
body.client-portal-mode .client-video-intro h3,
body.client-portal-mode .journey-intro h3,
body.client-portal-mode .lesson-panel h3,
body.client-portal-mode .client-next-step-card h3,
body.client-portal-mode .portal-payment-title h3,
body.client-portal-mode .payment-mini-card h4,
body.client-portal-mode .portal-quiz h4,
body.client-portal-mode .client-auth-brand h1{
  font-family:var(--font-display)!important;
  color:var(--text)!important;
  font-weight:500!important;
  letter-spacing:0!important;
}
body.client-portal-mode .client-section-head h2{font-size:clamp(34px,4vw,58px)!important;line-height:.98!important;}
body.client-portal-mode .client-hero-panel h1{font-size:clamp(34px,5vw,60px)!important;line-height:.98!important;}
body.client-portal-mode .spark,
body.client-portal-mode .kpi-label,
body.client-portal-mode .portal-payment-card .spark{
  color:var(--gold-2)!important;
  font-size:10px!important;
  letter-spacing:.18em!important;
  text-transform:uppercase!important;
  font-weight:950!important;
}
body.client-portal-mode .video-placeholder,
body.client-portal-mode .course-video{
  border-color:rgba(225,191,99,.24)!important;
  background:linear-gradient(135deg,rgba(15,77,53,.36),rgba(225,191,99,.08))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)!important;
}
body.client-portal-mode .video-placeholder span{
  background:rgba(225,191,99,.08)!important;
  border:1px solid rgba(225,191,99,.30)!important;
  color:var(--gold-2)!important;
}
body.client-portal-mode .btn.primary{
  background:linear-gradient(135deg,#0a3f2b,#17764f 58%,#218c5d)!important;
  border-color:rgba(225,191,99,.42)!important;
  color:#fffbe9!important;
  box-shadow:0 0 0 1px rgba(225,191,99,.10),0 16px 40px rgba(15,77,53,.34)!important;
}
body.client-portal-mode .btn.ghost{
  border-color:rgba(225,191,99,.23)!important;
  background:rgba(128,128,128,.045)!important;
  color:var(--text)!important;
}
body.client-portal-mode .client-health-orb.advisor-logo-btn{
  width:68px!important;
  height:68px!important;
  border-radius:22px!important;
  border:1px solid rgba(225,191,99,.34)!important;
  background:linear-gradient(145deg,rgba(16,31,24,.96),rgba(10,22,17,.96))!important;
  box-shadow:0 26px 70px rgba(0,0,0,.36)!important;
  padding:4px!important;
}
body.client-portal-mode .client-health-orb.advisor-logo-btn .client-brand-mark{
  width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;flex:0 0 58px!important;
}
body.client-portal-mode .client-health-panel{
  border-color:rgba(225,191,99,.34)!important;
  background:linear-gradient(145deg,rgba(16,31,24,.98),rgba(10,22,17,.98))!important;
  box-shadow:0 30px 80px rgba(0,0,0,.42)!important;
}
body.client-portal-mode .client-health-head{border-bottom-color:var(--line)!important;}
body.client-portal-mode .client-health-head .client-health-logo.brand-mark{
  width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;flex:0 0 46px!important;border-radius:16px!important;font-size:24px!important;
}
@media(max-width:1120px){
  body.client-portal-mode .client-only-sidebar{position:relative!important;height:auto!important;}
  body.client-portal-mode .client-step-nav{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:760px){
  body.client-portal-mode .client-only-main{padding:16px!important;}
  body.client-portal-mode .client-step-nav{grid-template-columns:1fr!important;}
  body.client-portal-mode .client-brand-mark,
  body.client-portal-mode .client-auth-brand .client-brand-mark{width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;flex-basis:52px!important;font-size:28px!important;}
}

/* Client sidebar double-line hotfix: keep one divider per section */
body.client-portal-mode .client-step-nav{
  gap:18px!important;
}
body.client-portal-mode .client-nav-section{
  border-top:0!important;
  border-bottom:1px solid var(--line)!important;
  padding-top:0!important;
  padding-bottom:18px!important;
}
body.client-portal-mode .client-nav-section:first-child{
  border-top:0!important;
}
body.client-portal-mode .client-nav-section:last-child{
  border-bottom:0!important;
  padding-bottom:0!important;
}


/* Payment progress bar fit hotfix */
.payment-progress-row .progress-track{
  height:8px !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  display:block !important;
  position:relative !important;
  overflow:hidden !important;
  border-radius:999px !important;
  line-height:0 !important;
}
.payment-progress-row .progress-track > span{
  display:block !important;
  height:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:inherit !important;
  line-height:0 !important;
  font-size:0 !important;
  position:relative !important;
  top:0 !important;
}

/* Client portal account/support cleanup */
body.client-portal-mode .portal-check-item,
body.client-portal-mode .portal-why-check-item{
  grid-template-columns:minmax(0,1fr) 38px !important;
  grid-template-areas:"title dot" "desc dot" !important;
  align-items:center !important;
}
body.client-portal-mode .portal-why-check-item .check-dot,
body.client-portal-mode .portal-check-item .check-dot{
  grid-area:dot !important;
  justify-self:end !important;
}
body.client-portal-mode .why-check-content{
  grid-column:1 !important;
  grid-row:1 / span 2 !important;
  padding-right:10px !important;
}
body.client-portal-mode .portal-check-item strong{grid-area:title !important;}
body.client-portal-mode .portal-check-item small{grid-area:desc !important;}
body.client-portal-mode .portal-account-flow{
  display:grid;
  gap:16px;
  max-width:1050px;
}
body.client-portal-mode .portal-account-card{
  border:1px solid rgba(225,191,99,.22)!important;
  background:linear-gradient(145deg,rgba(16,31,24,.96),rgba(10,22,17,.96))!important;
  border-radius:24px;
  padding:20px;
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 26px 80px rgba(0,0,0,.28)!important;
}
body.client-portal-mode .account-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:14px;
}
body.client-portal-mode .account-card-head h3{
  margin:3px 0 6px;
  font-family:var(--font-display);
  font-size:clamp(24px,2.8vw,36px);
  font-weight:500;
  line-height:1;
}
body.client-portal-mode .portal-profile-grid,
body.client-portal-mode .payment-commit-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
body.client-portal-mode .payment-commit-grid > div{
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(225,191,99,.045);
  padding:12px;
}
body.client-portal-mode .payment-commit-grid span{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.12em;margin-bottom:4px;}
body.client-portal-mode .payment-commit-grid strong{font-size:16px;}
body.client-portal-mode .process-steps{display:grid;gap:12px;}
body.client-portal-mode .process-steps > div{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px 12px;
  align-items:start;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(0,0,0,.14);
  padding:14px;
}
body.client-portal-mode .process-steps b{
  width:30px;height:30px;border-radius:12px;display:grid;place-items:center;
  background:rgba(225,191,99,.10);border:1px solid rgba(225,191,99,.25);color:var(--gold-2);
}
body.client-portal-mode .process-steps strong,
body.client-portal-mode .process-steps p,
body.client-portal-mode .process-steps a{grid-column:2;}
body.client-portal-mode .process-steps p{margin:0;color:var(--muted);line-height:1.45;}
body.client-portal-mode .support-chat-card{max-width:900px!important;gap:18px!important;}
body.client-portal-mode .support-open-chat{
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(0,0,0,.16);
  padding:16px;
  display:grid;
  gap:12px;
}
body.client-portal-mode .support-chat-bubble{
  max-width:460px;
  border:1px solid rgba(225,191,99,.24);
  background:rgba(225,191,99,.06);
  border-radius:18px 18px 18px 6px;
  padding:12px 14px;
}
body.client-portal-mode .support-chat-bubble strong{display:block;color:var(--gold-2);font-size:11px;text-transform:uppercase;letter-spacing:.14em;margin-bottom:5px;}
body.client-portal-mode .support-chat-bubble p{margin:0;font-family:var(--font-display);font-size:28px;line-height:1.05;color:var(--text);}
body.client-portal-mode .support-open-chat textarea{
  width:100%;min-height:90px;border:1px solid var(--line);border-radius:18px;background:rgba(0,0,0,.18);color:var(--text);padding:14px;font:inherit;resize:vertical;
}
.agreement-preview-box{
  margin-top:16px;border:1px solid var(--line);border-radius:20px;padding:18px;background:rgba(225,191,99,.05);
}
.agreement-preview-box h3{margin-top:0;font-family:var(--font-display);font-size:30px;}
.agreement-preview-box li{margin:8px 0;color:var(--muted);}
@media(max-width:900px){
  body.client-portal-mode .portal-profile-grid,
  body.client-portal-mode .payment-commit-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.client-portal-mode .account-card-head{flex-direction:column;}
}
@media(max-width:620px){
  body.client-portal-mode .portal-profile-grid,
  body.client-portal-mode .payment-commit-grid{grid-template-columns:1fr;}
  body.client-portal-mode .portal-check-item,
  body.client-portal-mode .portal-why-check-item{grid-template-columns:minmax(0,1fr) 34px!important;}
}

/* Account setup: use the same left-step course structure as training */
body.client-portal-mode .portal-account-course-flow{
  grid-template-columns:minmax(260px,340px) minmax(0,1fr)!important;
  width:100%!important;
  max-width:none!important;
}
body.client-portal-mode .portal-account-main{
  width:100%!important;
  max-width:none!important;
  padding:20px!important;
  box-sizing:border-box!important;
}
body.client-portal-mode .portal-account-main .portal-video-module,
body.client-portal-mode .portal-account-main .portal-account-card,
body.client-portal-mode .portal-account-main .lesson-panel{
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
}
body.client-portal-mode .portal-account-card.full{
  display:grid;
  gap:14px;
}
body.client-portal-mode .portal-account-flow{
  max-width:none!important;
  width:100%!important;
}
body.client-portal-mode .portal-account-side{
  align-self:start;
}
body.client-portal-mode .portal-account-main .portal-course-head h3{
  font-size:clamp(30px,3.2vw,46px)!important;
}
body.client-portal-mode .portal-profile-grid,
body.client-portal-mode .payment-commit-grid{
  width:100%;
}
body.client-portal-mode .portal-support-chat-inline{
  display:grid;
  gap:14px;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  background:rgba(225,191,99,.045);
}
body.client-portal-mode .portal-support-chat-inline .chat-message{
  max-width:760px;
}
body.client-portal-mode .inline-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
@media(max-width:1080px){
  body.client-portal-mode .portal-account-course-flow{
    grid-template-columns:1fr!important;
  }
}

/* Client Support page: open chat without framed question/header bubble */
body.client-portal-mode .support-chat-card{
  max-width:900px!important;
  gap:18px!important;
}
body.client-portal-mode .support-open-chat{
  border:1px solid var(--line)!important;
  border-radius:22px!important;
  background:rgba(0,0,0,.16)!important;
  padding:16px!important;
  display:grid!important;
  gap:12px!important;
}
body.client-portal-mode .support-chat-messages{
  max-height:260px;
  overflow:auto;
  padding:0;
  border:0;
  background:transparent;
}
body.client-portal-mode .support-open-chat .advisor-msg.assistant:first-child p{
  font-family:var(--font-display);
  font-size:clamp(24px,2.8vw,34px);
  line-height:1.05;
  color:var(--text);
}
body.client-portal-mode .support-chat-bubble{display:none!important;}
body.client-portal-mode .support-open-chat textarea{
  width:100%!important;
  min-height:90px!important;
  border:1px solid var(--line)!important;
  border-radius:18px!important;
  background:rgba(0,0,0,.18)!important;
  color:var(--text)!important;
  padding:14px!important;
  font:inherit!important;
  resize:vertical!important;
}


/* ==========================================================
   Final layout consistency audit: admin/client parity
   - Client portal uses the same page shell rhythm as admin.
   - Sidebar stays pinned left on desktop.
   - Mobile uses a hamburger/drawer like the admin console.
   - Client cards/page framing inherit the shared admin card system.
   ========================================================== */
body.client-portal-mode .app-shell{
  display:grid !important;
  grid-template-columns:1fr !important;
  min-height:100vh !important;
}
body.client-portal-mode .main{
  padding:0 !important;
  min-height:100vh !important;
  width:100% !important;
}
body.client-portal-mode .view{
  min-height:100vh !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  gap:0 !important;
}
body.client-portal-mode .client-only-shell{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  min-height:100vh !important;
  display:grid !important;
  grid-template-columns:304px minmax(0,1fr) !important;
  background:radial-gradient(circle at 18% 10%,rgba(200,162,74,.10),transparent 28%),radial-gradient(circle at 90% 6%,rgba(47,122,87,.14),transparent 25%),linear-gradient(135deg,var(--bg),var(--bg-2)) !important;
}
body.client-portal-mode .client-only-sidebar{
  position:sticky !important;
  top:0 !important;
  left:0 !important;
  width:auto !important;
  height:100vh !important;
  padding:26px 20px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:22px !important;
  background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2)) !important;
  border-right:1px solid var(--line) !important;
  box-shadow:none !important;
  overflow:auto !important;
  scrollbar-width:none !important;
  z-index:60 !important;
}
body.client-portal-mode .client-only-main{
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  padding:26px !important;
  display:grid !important;
  gap:18px !important;
  align-content:start !important;
}
body.client-portal-mode .client-only-main > *{
  max-width:none !important;
}
body.client-portal-mode .client-brand-block{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
  padding:0 6px 14px !important;
  border-bottom:1px solid var(--line) !important;
  margin:0 !important;
}
body.client-portal-mode .client-brand-block .brand-name{
  font-family:var(--font-display) !important;
  letter-spacing:.14em !important;
  font-size:18px !important;
  line-height:1 !important;
  color:var(--text) !important;
}
body.client-portal-mode .client-brand-block .brand-sub{
  font-size:10px !important;
  letter-spacing:.24em !important;
  color:var(--muted) !important;
  font-weight:800 !important;
  margin-top:3px !important;
}
body.client-portal-mode .client-step-nav{
  display:grid !important;
  gap:18px !important;
  flex:1 1 auto !important;
  align-content:start !important;
}
body.client-portal-mode .client-nav-section{
  display:grid !important;
  gap:7px !important;
  border-top:0 !important;
  border-bottom:1px solid var(--line) !important;
  padding:0 0 18px !important;
}
body.client-portal-mode .client-nav-section:last-child{
  border-bottom:0 !important;
  padding-bottom:0 !important;
}
body.client-portal-mode .portal-menu-link.nav-btn{
  width:100% !important;
  border:0 !important;
  border-radius:16px !important;
  background:transparent !important;
  color:var(--muted) !important;
  padding:12px 12px !important;
  display:flex !important;
  align-items:center !important;
  gap:11px !important;
  text-align:left !important;
  transition:var(--ease) !important;
  min-height:auto !important;
}
body.client-portal-mode .portal-menu-link.nav-btn:hover{
  background:rgba(200,162,74,.08) !important;
  border-color:transparent !important;
  color:var(--text) !important;
}
body.client-portal-mode .portal-menu-link.nav-btn.active{
  background:linear-gradient(135deg,rgba(47,122,87,.35),rgba(200,162,74,.16)) !important;
  color:var(--text) !important;
  box-shadow:inset 0 0 0 1px var(--line-strong) !important;
  border-color:transparent !important;
}
body.client-portal-mode .portal-menu-link.nav-btn.active:after{
  display:none !important;
}
body.client-portal-mode .portal-nav-icon.nav-ico,
body.client-portal-mode .nav-ico{
  width:31px !important;
  height:31px !important;
  min-width:31px !important;
  min-height:31px !important;
  max-width:31px !important;
  max-height:31px !important;
  flex:0 0 31px !important;
  border-radius:999px !important;
  display:grid !important;
  place-items:center !important;
  background:var(--chip) !important;
  border:0 !important;
  color:var(--gold) !important;
  font-weight:900 !important;
  font-size:13px !important;
  line-height:1 !important;
  overflow:hidden !important;
}
body.client-portal-mode .portal-nav-text strong{
  display:block !important;
  font-size:14px !important;
  font-weight:400 !important;
  color:inherit !important;
  line-height:1.2 !important;
}
body.client-portal-mode .portal-nav-text small{display:none !important;}
body.client-portal-mode .client-only-sidebar > .btn{
  border-color:var(--line) !important;
  background:var(--input) !important;
  color:var(--text) !important;
  border-radius:15px !important;
}
body.client-portal-mode .client-section-head,
body.client-portal-mode .client-hero-panel,
body.client-portal-mode .portal-video-module,
body.client-portal-mode .journey-intro,
body.client-portal-mode .lesson-panel,
body.client-portal-mode .client-next-step-card,
body.client-portal-mode .portal-payment-card,
body.client-portal-mode .portal-payment-card .payment-mini-card,
body.client-portal-mode .portal-quiz,
body.client-portal-mode .portal-why-check-item,
body.client-portal-mode .portal-check-item,
body.client-portal-mode .support-panel,
body.client-portal-mode .readiness-card,
body.client-portal-mode .portal-review-card,
body.client-portal-mode .portal-course-main,
body.client-portal-mode .portal-course-side,
body.client-portal-mode .portal-account-card{
  border:1px solid var(--line) !important;
  border-radius:var(--radius-lg) !important;
  background:linear-gradient(145deg,var(--panel),var(--panel-2)) !important;
  box-shadow:var(--shadow) !important;
}
body.client-portal-mode .client-section-head h2,
body.client-portal-mode .client-hero-panel h1,
body.client-portal-mode .client-video-intro h3,
body.client-portal-mode .journey-intro h3,
body.client-portal-mode .lesson-panel h3,
body.client-portal-mode .client-next-step-card h3,
body.client-portal-mode .portal-payment-title h3,
body.client-portal-mode .payment-mini-card h4,
body.client-portal-mode .portal-quiz h4,
body.client-portal-mode .portal-course-head h3,
body.client-portal-mode .portal-account-card h3{
  font-family:var(--font-display) !important;
  color:var(--text) !important;
  font-weight:500 !important;
  letter-spacing:0 !important;
}
body.client-portal-mode .client-mobile-nav-toggle,
body.client-portal-mode .client-mobile-backdrop{
  display:none;
}

@media (max-width:1180px){
  body.client-portal-mode .client-only-shell{grid-template-columns:252px minmax(0,1fr) !important;}
  body.client-portal-mode .client-only-sidebar{padding:20px 14px !important;}
}
@media (max-width:900px){
  body.client-portal-mode .client-only-shell{grid-template-columns:1fr !important;}
  body.client-portal-mode .client-only-main{padding:72px 18px 18px !important;}
  body.client-portal-mode .client-mobile-nav-toggle{
    position:fixed !important;
    top:16px !important;
    left:16px !important;
    z-index:90 !important;
    display:grid !important;
    place-items:center !important;
    width:44px !important;
    height:44px !important;
    border:1px solid var(--line-strong) !important;
    border-radius:15px !important;
    background:linear-gradient(145deg,var(--panel),var(--panel-2)) !important;
    color:var(--gold) !important;
    box-shadow:var(--shadow) !important;
    font-weight:950 !important;
  }
  body.client-portal-mode .client-only-sidebar{
    position:fixed !important;
    inset:0 auto 0 0 !important;
    width:min(304px,86vw) !important;
    height:100vh !important;
    transform:translateX(-104%) !important;
    transition:transform .22s ease !important;
  }
  body.client-portal-mode.client-mobile-nav-open .client-only-sidebar{transform:translateX(0) !important;}
  body.client-portal-mode.client-mobile-nav-open .client-mobile-backdrop{
    display:block !important;
    position:fixed !important;
    inset:0 !important;
    z-index:55 !important;
    background:rgba(0,0,0,.54) !important;
    backdrop-filter:blur(2px) !important;
  }
}
@media (max-width:760px){
  body.client-portal-mode .client-only-main{padding:72px 16px 16px !important;}
}


/* Admin / Client final layout parity audit
   The client portal now reuses the same page shell, sidebar, topbar, card, and nav rhythm as admin. */
body.client-portal-mode .app-shell{
  display:block !important;
  min-height:100vh !important;
}
body.client-portal-mode .main{
  padding:0 !important;
  max-width:none !important;
  width:100% !important;
}
body.client-portal-mode .client-only-shell{
  min-height:100vh !important;
  display:grid !important;
  grid-template-columns:304px minmax(0,1fr) !important;
  gap:0 !important;
  align-items:stretch !important;
  background:transparent !important;
}
body.client-portal-mode .client-only-sidebar.sidebar{
  position:sticky !important;
  top:0 !important;
  height:100vh !important;
  padding:26px 20px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:22px !important;
  background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2)) !important;
  border-right:1px solid var(--line) !important;
  border-radius:0 !important;
  box-shadow:none !important;
  overflow:auto !important;
}
body.client-portal-mode .client-brand-block.brand-block{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
  padding:0 6px 14px !important;
  border-bottom:1px solid var(--line) !important;
  margin:0 !important;
}
body.client-portal-mode .client-step-nav.nav{
  display:grid !important;
  gap:18px !important;
}
body.client-portal-mode .client-nav-section.nav-group{
  display:grid !important;
  gap:7px !important;
  border:0 !important;
  padding:0 !important;
  margin:0 !important;
}
body.client-portal-mode .client-nav-section + .client-nav-section{
  border-top:1px solid var(--line) !important;
  padding-top:18px !important;
}
body.client-portal-mode .client-only-sidebar .nav-heading{
  font-size:10px !important;
  letter-spacing:.20em !important;
  text-transform:uppercase !important;
  color:var(--soft) !important;
  font-weight:900 !important;
  padding:0 10px !important;
  margin:0 !important;
}
body.client-portal-mode .portal-menu-link.nav-btn{
  width:100% !important;
  border:0 !important;
  border-radius:16px !important;
  background:transparent !important;
  color:var(--muted) !important;
  padding:12px 12px !important;
  display:flex !important;
  align-items:center !important;
  gap:11px !important;
  text-align:left !important;
  transition:var(--ease) !important;
  min-height:auto !important;
  box-shadow:none !important;
}
body.client-portal-mode .portal-menu-link.nav-btn:hover{
  background:rgba(200,162,74,.08) !important;
  color:var(--text) !important;
}
body.client-portal-mode .portal-menu-link.nav-btn.active{
  background:linear-gradient(135deg,rgba(47,122,87,.35),rgba(200,162,74,.16)) !important;
  color:var(--text) !important;
  box-shadow:inset 0 0 0 1px var(--line-strong) !important;
}
body.client-portal-mode .portal-menu-link.nav-btn.active:after{display:none !important;}
body.client-portal-mode .portal-nav-icon.nav-ico{
  width:31px !important;
  height:31px !important;
  min-width:31px !important;
  border-radius:12px !important;
  display:grid !important;
  place-items:center !important;
  background:var(--chip) !important;
  color:var(--gold) !important;
  font-weight:900 !important;
  border:0 !important;
  box-shadow:none !important;
}
body.client-portal-mode .portal-nav-text strong{
  font:inherit !important;
  font-weight:500 !important;
  letter-spacing:0 !important;
  color:inherit !important;
}
body.client-portal-mode .portal-nav-text small{display:none !important;}
body.client-portal-mode .client-user-card{margin-top:auto !important;}
body.client-portal-mode .client-only-sidebar > .btn{
  flex:0 0 auto !important;
}
body.client-portal-mode .client-only-main.main{
  min-width:0 !important;
  padding:26px !important;
}
body.client-portal-mode .client-topbar.topbar{
  display:flex !important;
  justify-content:space-between !important;
  gap:20px !important;
  align-items:flex-start !important;
  margin-bottom:22px !important;
}
body.client-portal-mode .client-topbar .title-wrap h1{
  font-family:var(--font-display) !important;
  font-size:44px !important;
  line-height:1 !important;
  margin:8px 0 8px !important;
  color:var(--text) !important;
  font-weight:700 !important;
}
body.client-portal-mode .client-topbar .title-wrap p{margin:0 !important;color:var(--muted) !important;}
body.client-portal-mode .client-topbar .top-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}
body.client-portal-mode .client-portal-view.view{
  display:grid !important;
  gap:18px !important;
  max-width:none !important;
  width:100% !important;
}
body.client-portal-mode .client-section-head,
body.client-portal-mode .client-hero-panel,
body.client-portal-mode .portal-video-module,
body.client-portal-mode .journey-intro,
body.client-portal-mode .lesson-panel,
body.client-portal-mode .client-next-step-card,
body.client-portal-mode .portal-payment-card,
body.client-portal-mode .portal-payment-card .payment-mini-card,
body.client-portal-mode .portal-quiz,
body.client-portal-mode .portal-why-check-item,
body.client-portal-mode .portal-check-item,
body.client-portal-mode .support-panel,
body.client-portal-mode .readiness-card,
body.client-portal-mode .portal-review-card,
body.client-portal-mode .portal-account-card,
body.client-portal-mode .portal-course-side,
body.client-portal-mode .portal-course-main{
  border:1px solid var(--line) !important;
  border-radius:var(--radius-lg) !important;
  background:linear-gradient(145deg,var(--panel),var(--panel-2)) !important;
  box-shadow:var(--shadow) !important;
}
body.client-portal-mode .client-section-head h2,
body.client-portal-mode .client-hero-panel h1,
body.client-portal-mode .client-video-intro h3,
body.client-portal-mode .journey-intro h3,
body.client-portal-mode .lesson-panel h3,
body.client-portal-mode .client-next-step-card h3,
body.client-portal-mode .portal-payment-title h3,
body.client-portal-mode .payment-mini-card h4,
body.client-portal-mode .portal-quiz h4{
  font-family:var(--font-display) !important;
  color:var(--text) !important;
  font-weight:700 !important;
  letter-spacing:0 !important;
}
body.client-portal-mode .client-section-head h2,
body.client-portal-mode .client-hero-panel h1{
  font-size:44px !important;
  line-height:1 !important;
}
body.client-portal-mode .video-placeholder,
body.client-portal-mode .course-video{
  border-color:var(--line) !important;
  background:rgba(128,128,128,.045) !important;
  box-shadow:none !important;
}
body.client-portal-mode .btn.primary{
  background:linear-gradient(135deg,var(--green),var(--green-2)) !important;
  color:#fff !important;
  box-shadow:0 14px 34px rgba(47,122,87,.22) !important;
  border-color:transparent !important;
}
body.client-portal-mode .btn.ghost{
  background:var(--input) !important;
  border-color:var(--line) !important;
  color:var(--text) !important;
}
body.client-portal-mode .client-health-orb.advisor-logo-btn{
  width:68px !important;
  height:68px !important;
  border-radius:22px !important;
  border:1px solid var(--line) !important;
  background:linear-gradient(145deg,var(--panel),var(--panel-2)) !important;
  box-shadow:var(--shadow) !important;
  padding:4px !important;
}
@media(max-width:980px){
  body.client-portal-mode .client-only-shell{grid-template-columns:1fr !important;}
  body.client-portal-mode .client-only-sidebar.sidebar{
    position:fixed !important;
    inset:0 auto 0 0 !important;
    z-index:60 !important;
    width:min(304px,86vw) !important;
    transform:translateX(-105%) !important;
    transition:var(--ease) !important;
  }
  body.client-mobile-nav-open.client-portal-mode .client-only-sidebar.sidebar{transform:translateX(0) !important;}
  body.client-portal-mode .client-mobile-nav-toggle{display:grid !important;}
  body.client-portal-mode .client-mobile-backdrop{
    position:fixed !important;inset:0 !important;background:rgba(0,0,0,.45) !important;z-index:55 !important;
  }
  body.client-mobile-nav-open.client-portal-mode .client-mobile-backdrop{display:block !important;}
  body.client-portal-mode .client-only-main.main{padding:76px 16px 16px !important;}
  body.client-portal-mode .client-topbar.topbar{display:grid !important;}
  body.client-portal-mode .client-topbar .top-actions{justify-content:flex-start !important;}
  body.client-portal-mode .client-topbar .search-box{min-width:0 !important;width:100% !important;}
}
@media(max-width:760px){
  body.client-portal-mode .client-section-head h2,
  body.client-portal-mode .client-hero-panel h1,
  body.client-portal-mode .client-topbar .title-wrap h1{font-size:34px !important;}
}


/* V3 parity hardening: client portal uses the admin shell, mobile menu, and card rhythm */
body.client-portal-mode .client-only-shell{
  display:grid !important;
  grid-template-columns:304px minmax(0,1fr) !important;
  min-height:100vh !important;
  width:100% !important;
  max-width:100vw !important;
  overflow-x:hidden !important;
}
body.client-portal-mode .client-only-sidebar.sidebar{
  width:304px !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2)) !important;
}
body.client-portal-mode .client-only-main.main{
  padding:26px !important;
  min-width:0 !important;
  width:100% !important;
  overflow-x:hidden !important;
}
body.client-portal-mode .client-topbar.topbar,
body.client-portal-mode .client-portal-view.view{
  width:100% !important;
  max-width:1480px !important;
  margin-left:0 !important;
  margin-right:auto !important;
}
body.client-portal-mode .client-topbar.topbar{
  display:flex !important;
  justify-content:space-between !important;
  align-items:flex-start !important;
  gap:20px !important;
  margin-bottom:22px !important;
}
body.client-portal-mode .client-topbar .top-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle{
  height:40px !important;
  align-items:center !important;
  padding:3px !important;
  border-color:rgba(225,191,99,.36) !important;
  background:rgba(8,18,13,.72) !important;
  width:auto !important;
  min-width:128px !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button{
  height:32px !important;
  min-width:58px !important;
  padding:0 14px !important;
  font-size:12px !important;
  line-height:1 !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button.active{
  background:linear-gradient(135deg,var(--gold),var(--gold-2)) !important;
  color:#10160f !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),0 8px 22px rgba(184,137,46,.20) !important;
}
body.client-portal-mode .client-mobile-nav-toggle,
body.client-portal-mode .client-mobile-backdrop{
  display:none !important;
}
body.client-portal-mode .client-section-page{
  display:grid !important;
  gap:18px !important;
  width:100% !important;
  max-width:100% !important;
}
body.client-portal-mode .client-section-head{
  min-height:0 !important;
  height:auto !important;
  padding:18px !important;
  align-items:flex-start !important;
}
body.client-portal-mode .client-section-head h2{
  font-size:clamp(30px,3vw,44px) !important;
  line-height:1 !important;
  margin:6px 0 0 !important;
}
body.client-portal-mode .section-support .client-section-head,
body.client-portal-mode .section-access-checklist .client-section-head,
body.client-portal-mode .section-readiness-review .client-section-head{
  display:none !important;
}
body.client-portal-mode .support-chat-card{
  width:100% !important;
  max-width:900px !important;
  min-height:0 !important;
  padding:18px !important;
  display:grid !important;
  gap:14px !important;
}
body.client-portal-mode .support-chat-card .section-head.compact{
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
body.client-portal-mode .support-chat-card .section-head.compact h3{
  font-family:var(--font-display) !important;
  font-size:clamp(26px,3vw,38px) !important;
  line-height:1.02 !important;
  margin:5px 0 8px !important;
}
body.client-portal-mode .support-open-chat{
  border:1px solid var(--line) !important;
  border-radius:20px !important;
  background:var(--input) !important;
  padding:14px !important;
  display:grid !important;
  gap:12px !important;
}
body.client-portal-mode .support-chat-messages{
  max-height:220px !important;
  min-height:78px !important;
  overflow:auto !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
}
body.client-portal-mode .support-open-chat .advisor-msg.assistant:first-child p{
  font-family:var(--font-ui) !important;
  font-size:14px !important;
  line-height:1.5 !important;
  color:var(--text) !important;
}
body.client-portal-mode .support-open-chat textarea{
  min-height:110px !important;
  width:100% !important;
  background:var(--input) !important;
  border:1px solid var(--line) !important;
  border-radius:18px !important;
  color:var(--text) !important;
}
body.client-portal-mode .readiness-grid,
body.client-portal-mode .portal-checklist-grid{
  width:100% !important;
  max-width:100% !important;
}
body.client-portal-mode .section-readiness-review .journey-intro,
body.client-portal-mode .section-access-checklist .journey-intro{
  padding:18px !important;
}
@media (max-width:980px){
  body.client-portal-mode .client-only-shell{
    display:block !important;
  }
  body.client-portal-mode .client-only-sidebar.sidebar{
    position:fixed !important;
    inset:0 auto 0 0 !important;
    z-index:60 !important;
    width:min(304px,86vw) !important;
    height:100vh !important;
    transform:translateX(-105%) !important;
    transition:var(--ease) !important;
  }
  body.client-portal-mode.mobile-nav-open .client-only-sidebar.sidebar,
  body.client-portal-mode.client-mobile-nav-open .client-only-sidebar.sidebar{
    transform:translateX(0) !important;
  }
  body.client-portal-mode #mobileNavBackdrop[hidden]{display:none !important;}
  body.client-portal-mode.mobile-nav-open #mobileNavBackdrop,
  body.client-portal-mode.client-mobile-nav-open #mobileNavBackdrop{
    display:block !important;
  }
  body.client-portal-mode .client-only-main.main{
    padding:76px 16px 16px !important;
  }
  body.client-portal-mode .client-topbar.topbar{
    display:grid !important;
    gap:16px !important;
  }
  body.client-portal-mode .client-topbar .top-actions{
    justify-content:flex-start !important;
    width:100% !important;
  }
  body.client-portal-mode .client-topbar .search-box{
    width:min(100%,420px) !important;
    min-width:0 !important;
  }
}
@media (max-width:760px){
  body.client-portal-mode .client-topbar .theme-toggle,
  body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle{
    display:none !important;
  }
  body.client-portal-mode .client-topbar .top-actions .btn.primary{
    width:auto !important;
  }
  body.client-portal-mode .client-section-head h2,
  body.client-portal-mode .client-hero-panel h1,
  body.client-portal-mode .client-topbar .title-wrap h1{
    font-size:34px !important;
  }
  body.client-portal-mode .support-chat-card{
    max-width:100% !important;
  }
  body.client-portal-mode .support-open-chat .row-actions{
    flex-direction:column !important;
    align-items:stretch !important;
  }
  body.client-portal-mode .support-open-chat .row-actions .btn{
    width:100% !important;
  }
}


/* =========================================================
   V3 CLIENT PORTAL RESPONSIVE PARITY WITH ADMIN SHELL
   Matches the admin resize behavior shown in adminExample.mp4:
   desktop fixed left nav -> compressed left nav -> mobile appbar + drawer.
   ========================================================= */
body.client-portal-mode{
  overflow-x:hidden !important;
}
body.client-portal-mode .app-shell{
  display:block !important;
  min-height:100vh !important;
}
body.client-portal-mode .main{
  padding:0 !important;
  width:100% !important;
  max-width:none !important;
}
body.client-portal-mode .client-only-shell{
  display:grid !important;
  grid-template-columns:304px minmax(0,1fr) !important;
  gap:0 !important;
  align-items:stretch !important;
  min-height:100vh !important;
  width:100% !important;
  max-width:100vw !important;
  overflow-x:hidden !important;
  background:transparent !important;
}
body.client-portal-mode .client-only-sidebar.sidebar{
  position:sticky !important;
  top:0 !important;
  left:auto !important;
  bottom:auto !important;
  width:304px !important;
  height:100vh !important;
  transform:none !important;
  z-index:auto !important;
  padding:26px 20px !important;
  border-radius:0 !important;
  border-right:1px solid var(--line) !important;
  background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2)) !important;
  box-shadow:none !important;
  overflow:auto !important;
  scrollbar-width:none !important;
}
body.client-portal-mode .client-only-sidebar.sidebar::-webkit-scrollbar{display:none !important;}
body.client-portal-mode .client-only-main.main{
  padding:26px !important;
  min-width:0 !important;
  width:100% !important;
  max-width:none !important;
  overflow-x:hidden !important;
  display:grid !important;
  gap:18px !important;
  align-content:start !important;
}
body.client-portal-mode .client-topbar.topbar,
body.client-portal-mode .client-portal-view.view{
  width:100% !important;
  max-width:1480px !important;
  margin:0 auto 0 0 !important;
}
body.client-portal-mode .client-topbar.topbar{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:20px !important;
  margin-bottom:4px !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
body.client-portal-mode .client-topbar .top-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}
body.client-portal-mode .client-topbar .search-box{
  min-width:300px !important;
  width:auto !important;
  max-width:420px !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle{
  display:flex !important;
  padding:4px !important;
  border:1px solid var(--line) !important;
  border-radius:999px !important;
  background:var(--input) !important;
  height:auto !important;
  min-width:0 !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button{
  border:0 !important;
  background:transparent !important;
  color:var(--muted) !important;
  border-radius:999px !important;
  padding:8px 12px !important;
  min-width:0 !important;
  height:auto !important;
  font-weight:900 !important;
  font-size:12px !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button.active{
  background:var(--green) !important;
  color:#fff !important;
  box-shadow:0 8px 22px rgba(47,122,87,.25) !important;
}
body.client-portal-mode .client-section-page,
body.client-portal-mode .client-hero-panel,
body.client-portal-mode .client-video-intro,
body.client-portal-mode .client-next-step-card,
body.client-portal-mode .portal-payment-card,
body.client-portal-mode .portal-course-flow,
body.client-portal-mode .portal-account-flow,
body.client-portal-mode .portal-checklist-grid,
body.client-portal-mode .readiness-grid,
body.client-portal-mode .support-chat-card{
  width:100% !important;
  max-width:100% !important;
}
body.client-portal-mode .client-section-head,
body.client-portal-mode .journey-intro,
body.client-portal-mode .support-chat-card,
body.client-portal-mode .portal-course-main,
body.client-portal-mode .portal-account-main,
body.client-portal-mode .portal-course-side,
body.client-portal-mode .portal-account-side,
body.client-portal-mode .portal-review-card,
body.client-portal-mode .portal-check-item,
body.client-portal-mode .portal-why-check-item,
body.client-portal-mode .readiness-card{
  min-height:0 !important;
}
body.client-portal-mode .section-support .client-section-head,
body.client-portal-mode .section-access-checklist .client-section-head,
body.client-portal-mode .section-readiness-review .client-section-head{
  display:none !important;
}
body.client-portal-mode .section-support,
body.client-portal-mode .section-access-checklist,
body.client-portal-mode .section-readiness-review{
  gap:18px !important;
}
body.client-portal-mode .support-chat-card{
  max-width:900px !important;
  padding:18px !important;
  display:grid !important;
  gap:14px !important;
  align-content:start !important;
}
body.client-portal-mode .support-chat-card .section-head.compact{
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
body.client-portal-mode .support-chat-card .section-head.compact h3{
  font-size:clamp(28px,3vw,42px) !important;
  line-height:1 !important;
  margin:4px 0 8px !important;
}
body.client-portal-mode .support-open-chat{
  padding:14px !important;
  border:1px solid var(--line) !important;
  border-radius:20px !important;
  background:var(--input) !important;
  display:grid !important;
  gap:12px !important;
}
body.client-portal-mode .support-chat-messages{
  min-height:64px !important;
  max-height:220px !important;
  overflow:auto !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}
body.client-portal-mode .support-open-chat textarea{
  min-height:110px !important;
}
body.client-portal-mode .client-mobile-nav-toggle,
body.client-portal-mode .client-mobile-backdrop{
  display:none !important;
}

@media (max-width:1180px){
  body.client-portal-mode .client-only-shell{
    grid-template-columns:252px minmax(0,1fr) !important;
  }
  body.client-portal-mode .client-only-sidebar.sidebar{
    width:252px !important;
    padding:20px 14px !important;
  }
  body.client-portal-mode .client-only-main.main{
    padding:24px !important;
  }
  body.client-portal-mode .client-topbar .search-box{
    min-width:260px !important;
    max-width:360px !important;
  }
  body.client-portal-mode .brand-name{font-size:15px !important;}
  body.client-portal-mode .brand-sub{font-size:8.5px !important;}
}

@media (max-width:920px){
  body.client-portal-mode{
    padding-top:60px !important;
  }
  body.client-portal-mode .mobile-appbar{
    display:flex !important;
  }
  body.client-portal-mode .app-shell,
  body.client-portal-mode .client-only-shell{
    display:block !important;
    min-height:auto !important;
  }
  body.client-portal-mode .client-only-sidebar.sidebar{
    position:fixed !important;
    z-index:1000 !important;
    top:0 !important;
    bottom:0 !important;
    left:0 !important;
    width:min(86vw,320px) !important;
    height:100dvh !important;
    transform:translateX(-105%) !important;
    transition:transform 220ms ease !important;
    box-shadow:0 30px 90px rgba(0,0,0,.45) !important;
    padding:20px 16px !important;
  }
  body.client-portal-mode.mobile-nav-open .client-only-sidebar.sidebar,
  body.client-portal-mode.client-mobile-nav-open .client-only-sidebar.sidebar{
    transform:translateX(0) !important;
  }
  body.client-portal-mode #mobileNavBackdrop{
    position:fixed !important;
    inset:0 !important;
    z-index:950 !important;
    display:block !important;
    background:rgba(0,0,0,.55) !important;
    backdrop-filter:blur(3px) !important;
  }
  body.client-portal-mode #mobileNavBackdrop[hidden]{display:none !important;}
  body.client-portal-mode .client-only-main.main{
    padding:18px 14px 16px !important;
    width:100% !important;
  }
  body.client-portal-mode .client-topbar.topbar{
    display:block !important;
    margin-bottom:18px !important;
    padding:0 !important;
  }
  body.client-portal-mode .client-topbar .title-wrap h1{
    font-size:clamp(1.6rem,8vw,2.4rem) !important;
    line-height:1.04 !important;
  }
  body.client-portal-mode .client-topbar .title-wrap p{font-size:.86rem !important;}
  body.client-portal-mode .client-topbar .top-actions{
    margin-top:14px !important;
    display:grid !important;
    grid-template-columns:1fr auto !important;
    gap:10px !important;
    align-items:center !important;
    justify-content:stretch !important;
    width:100% !important;
  }
  body.client-portal-mode .client-topbar .search-box{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
  }
  body.client-portal-mode .client-topbar .theme-toggle,
  body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle{
    display:none !important;
  }
  body.client-portal-mode .client-topbar .top-actions .btn.primary{
    width:auto !important;
    white-space:nowrap !important;
  }
  body.client-portal-mode .client-portal-view.view{
    max-width:none !important;
  }
}

@media (max-width:760px){
  body.client-portal-mode .client-topbar .top-actions{
    grid-template-columns:1fr auto !important;
  }
  body.client-portal-mode .client-section-head h2,
  body.client-portal-mode .client-hero-panel h1,
  body.client-portal-mode .client-topbar .title-wrap h1{
    font-size:34px !important;
  }
  body.client-portal-mode .client-hero-panel,
  body.client-portal-mode .client-video-intro,
  body.client-portal-mode .client-next-step-card,
  body.client-portal-mode .portal-payment-card,
  body.client-portal-mode .portal-course-flow,
  body.client-portal-mode .portal-account-flow{
    grid-template-columns:1fr !important;
  }
  body.client-portal-mode .support-chat-card{
    max-width:100% !important;
  }
  body.client-portal-mode .support-open-chat .row-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
    align-items:stretch !important;
  }
  body.client-portal-mode .support-open-chat .row-actions .btn{
    width:100% !important;
  }
}

@media (max-width:520px){
  body.client-portal-mode .client-topbar .top-actions{
    grid-template-columns:1fr auto !important;
  }
  body.client-portal-mode .client-topbar .top-actions .btn.primary{
    padding-inline:12px !important;
  }
  body.client-portal-mode .client-hero-panel,
  body.client-portal-mode .client-video-intro,
  body.client-portal-mode .client-next-step-card,
  body.client-portal-mode .portal-payment-card,
  body.client-portal-mode .card{
    border-radius:22px !important;
  }
}

/* =========================================================
   CLIENT PORTAL PADDING / FRAMING PARITY HOTFIX
   Tightens Portal Home, Access Checklist, and Readiness Review
   so they match the compact Account Setup / training module rhythm.
   ========================================================= */
body.client-portal-mode .client-portal-view.view{
  gap:18px !important;
}
body.client-portal-mode .client-section-page{
  gap:18px !important;
  align-content:start !important;
}
body.client-portal-mode .client-section-head,
body.client-portal-mode .client-hero-panel,
body.client-portal-mode .client-video-intro,
body.client-portal-mode .portal-video-module,
body.client-portal-mode .journey-intro.card,
body.client-portal-mode .portal-payment-card,
body.client-portal-mode .client-next-step-card,
body.client-portal-mode .portal-review-card,
body.client-portal-mode .support-chat-card{
  min-height:0 !important;
  height:auto !important;
  padding:18px !important;
  align-content:start !important;
}
body.client-portal-mode .client-hero-panel,
body.client-portal-mode .client-video-intro,
body.client-portal-mode .portal-video-module{
  align-items:center !important;
}
body.client-portal-mode .journey-intro.card{
  display:block !important;
}
body.client-portal-mode .journey-intro.card h3,
body.client-portal-mode .client-video-intro h3,
body.client-portal-mode .portal-video-module h3,
body.client-portal-mode .client-hero-panel h1{
  margin-top:6px !important;
  margin-bottom:8px !important;
}
body.client-portal-mode .journey-intro.card p,
body.client-portal-mode .client-video-intro p,
body.client-portal-mode .portal-video-module p,
body.client-portal-mode .client-hero-panel p{
  margin-bottom:0 !important;
}
body.client-portal-mode .client-video-intro,
body.client-portal-mode .portal-video-module{
  grid-template-columns:minmax(240px,420px) minmax(0,1fr) !important;
}
body.client-portal-mode .video-placeholder,
body.client-portal-mode .video-placeholder.course-video{
  min-height:180px !important;
}
body.client-portal-mode .section-access-checklist .journey-intro,
body.client-portal-mode .section-readiness-review .journey-intro,
body.client-portal-mode #portal-home.client-hero-panel{
  padding:18px !important;
  min-height:0 !important;
}
body.client-portal-mode .section-access-checklist .portal-video-module,
body.client-portal-mode .section-readiness-review .portal-video-module{
  padding:18px !important;
  min-height:0 !important;
}
body.client-portal-mode .section-access-checklist .portal-checklist-grid,
body.client-portal-mode .section-readiness-review .readiness-grid{
  margin-top:0 !important;
}
body.client-portal-mode .portal-checklist-grid,
body.client-portal-mode .readiness-grid{
  gap:14px !important;
}
body.client-portal-mode .portal-check-item,
body.client-portal-mode .readiness-card{
  padding:16px !important;
  min-height:0 !important;
}
body.client-portal-mode .section-support .support-chat-card{
  max-width:min(900px,100%) !important;
}
@media (max-width:760px){
  body.client-portal-mode .client-section-head,
  body.client-portal-mode .client-hero-panel,
  body.client-portal-mode .client-video-intro,
  body.client-portal-mode .portal-video-module,
  body.client-portal-mode .journey-intro.card,
  body.client-portal-mode .portal-payment-card,
  body.client-portal-mode .client-next-step-card,
  body.client-portal-mode .portal-review-card,
  body.client-portal-mode .support-chat-card{
    padding:16px !important;
  }
  body.client-portal-mode .client-video-intro,
  body.client-portal-mode .portal-video-module{
    grid-template-columns:1fr !important;
  }
  body.client-portal-mode .video-placeholder,
  body.client-portal-mode .video-placeholder.course-video{
    min-height:150px !important;
  }
}


/* Client portal nav/theme parity cleanup */
body.client-portal-mode .client-user-card{
  display:none !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle{
  display:inline-flex !important;
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  height:40px !important;
  padding:3px !important;
  gap:0 !important;
  border:1px solid rgba(225,191,99,.36) !important;
  border-radius:999px !important;
  background:rgba(8,18,13,.72) !important;
  box-shadow:none !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button{
  width:auto !important;
  min-width:58px !important;
  height:32px !important;
  padding:0 14px !important;
  border:0 !important;
  border-radius:999px !important;
  background:transparent !important;
  color:var(--muted) !important;
  font-size:12px !important;
  font-weight:900 !important;
  line-height:1 !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button.active{
  background:linear-gradient(135deg,var(--gold),var(--gold-2)) !important;
  color:#10160f !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),0 8px 22px rgba(184,137,46,.20) !important;
}
@media(max-width:760px){
  body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle,
  body.client-portal-mode .client-topbar .theme-toggle{
    display:none !important;
  }
}

/* Client portal support: keep the Growth Advisor input full-width under the message */
body.client-portal-mode .support-open-chat.advisor-chat-form,
body.client-portal-mode form.support-open-chat{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  width:100% !important;
  max-width:100% !important;
}
body.client-portal-mode .support-open-chat .support-chat-messages,
body.client-portal-mode .support-open-chat .advisor-messages{
  width:100% !important;
  max-width:100% !important;
  flex:0 0 auto !important;
}
body.client-portal-mode .support-open-chat textarea{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  min-height:132px !important;
  box-sizing:border-box !important;
  flex:0 0 auto !important;
  margin:0 !important;
}
body.client-portal-mode .support-open-chat .row-actions{
  width:100% !important;
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:flex-start !important;
  gap:10px !important;
}

/* Client portal support action layout: quick questions, full-width input, send right, Discord below left */
body.client-portal-mode .support-quick-questions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  width:100% !important;
  margin:0 0 10px !important;
}
body.client-portal-mode .quick-question-chip{
  appearance:none !important;
  border:1px solid var(--line-strong) !important;
  background:rgba(8,24,16,.78) !important;
  color:var(--text) !important;
  border-radius:999px !important;
  padding:10px 14px !important;
  font-size:12px !important;
  font-weight:900 !important;
  cursor:pointer !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04) !important;
}
body.client-portal-mode .quick-question-chip:hover{
  border-color:rgba(214,174,72,.7) !important;
  background:rgba(21,82,55,.72) !important;
  transform:translateY(-1px) !important;
}
body.client-portal-mode .support-open-chat .support-send-row{
  width:100% !important;
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  margin-top:0 !important;
}
body.client-portal-mode .support-open-chat .support-send-row .btn{
  min-width:112px !important;
}
body.client-portal-mode .support-open-chat .support-secondary-row{
  width:100% !important;
  display:flex !important;
  justify-content:flex-start !important;
  align-items:center !important;
  margin-top:0 !important;
}
body.client-portal-mode .support-open-chat .row-actions{
  display:none !important;
}
@media(max-width:760px){
  body.client-portal-mode .support-open-chat .support-send-row{
    justify-content:stretch !important;
  }
  body.client-portal-mode .support-open-chat .support-send-row .btn,
  body.client-portal-mode .support-open-chat .support-secondary-row .btn{
    width:100% !important;
  }
}

/* Computer Setup course flow: left stepper + right detail, matching learning modules */
body.client-portal-mode .portal-platform-course-flow{
  grid-template-columns:minmax(260px,340px) minmax(0,1fr)!important;
  width:100%!important;
  max-width:none!important;
}
body.client-portal-mode .portal-platform-main{
  width:100%!important;
  max-width:none!important;
  padding:20px!important;
  box-sizing:border-box!important;
}
body.client-portal-mode .portal-platform-side{
  align-self:start;
}
body.client-portal-mode .portal-platform-main .portal-video-module,
body.client-portal-mode .portal-platform-main .lesson-panel,
body.client-portal-mode .platform-detail-card{
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
}
body.client-portal-mode .platform-detail-card{
  display:grid;
  gap:14px;
  border:1px solid rgba(225,191,99,.22)!important;
  background:linear-gradient(145deg,rgba(16,31,24,.96),rgba(10,22,17,.96))!important;
  border-radius:24px;
  padding:20px;
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 26px 80px rgba(0,0,0,.20)!important;
}
body.client-portal-mode .platform-detail-card h3{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(24px,2.5vw,36px);
  line-height:1.02;
}
body.client-portal-mode .platform-detail-card p{
  margin:0;
  line-height:1.55;
}
body.client-portal-mode .platform-os-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
body.client-portal-mode .platform-steps{
  display:grid;
  gap:10px;
  margin:0;
  padding:0;
  list-style:none;
}
body.client-portal-mode .platform-steps li{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:4px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(0,0,0,.14);
  padding:12px 14px;
}
body.client-portal-mode .platform-steps strong{
  color:var(--text);
  font-size:14px;
}
body.client-portal-mode .platform-steps span{
  color:var(--muted);
  line-height:1.45;
}
body.client-portal-mode .platform-action-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
body.client-portal-mode .platform-score-field{
  margin-top:2px;
  max-width:360px;
}
body.client-portal-mode .platform-score-field input{
  width:100%;
}
body.client-portal-mode code{
  color:var(--gold-2);
  background:rgba(225,191,99,.10);
  border:1px solid rgba(225,191,99,.20);
  border-radius:8px;
  padding:2px 6px;
}
@media(max-width:1080px){
  body.client-portal-mode .portal-platform-course-flow{
    grid-template-columns:1fr!important;
  }
}
@media(max-width:780px){
  body.client-portal-mode .platform-os-grid{
    grid-template-columns:1fr;
  }
  body.client-portal-mode .platform-action-row .btn,
  body.client-portal-mode .platform-action-row a.btn{
    width:100%;
  }
}

/* Computer Setup completion action sits with the task content, not the main navigation CTA. */
.computer-why-grid{
  grid-template-columns:1fr;
}
.step-complete-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:12px 0 2px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(128,128,128,.035);
  color:var(--muted);
  font-size:13px;
}
.step-complete-row .step-complete-btn{
  flex:0 0 auto;
  opacity:.9;
}
.step-complete-row .step-complete-btn.is-complete{
  border-color:rgba(47,122,87,.5);
  color:var(--ok);
}
@media (max-width: 720px){
  .step-complete-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .step-complete-row .step-complete-btn{
    width:100%;
  }
}

/* Interactive learning labs: VEGA + HELIOS */
.interactive-lab{margin:18px 0;padding:20px;border-radius:var(--radius-lg);background:linear-gradient(145deg,var(--panel),var(--panel-2));border:1px solid var(--line)}
.interactive-lab-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.interactive-lab-head h3{margin:4px 0 6px;font-family:var(--font-display);font-size:clamp(1.8rem,3vw,2.8rem);line-height:.95;color:var(--cream)}
.vega-readout{font-family:var(--font-display);font-size:2rem;color:var(--gold);white-space:nowrap}
.vega-meter{position:relative;height:54px;display:grid;grid-template-columns:repeat(5,1fr);overflow:hidden;border:1px solid rgba(212,175,55,.28);border-radius:18px;background:rgba(0,0,0,.24)}
.vega-band{display:flex;align-items:center;justify-content:center;text-align:center;font-size:.68rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,248,222,.88);border-right:1px solid rgba(255,255,255,.08)}
.vega-band:last-child{border-right:0}
.vega-band.good{background:rgba(15,112,82,.42)}
.vega-band.warn{background:rgba(181,125,30,.42)}
.vega-band.danger{background:rgba(128,28,42,.58)}
.vega-marker{position:absolute;top:0;bottom:0;width:3px;background:var(--cream);box-shadow:0 0 16px rgba(255,248,222,.9);transform:translateX(-50%);transition:left .16s ease}
.vega-slider{width:100%;margin:18px 0 12px;accent-color:var(--gold)}
.vega-lab-result{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:14px;border:1px solid var(--line);background:rgba(0,0,0,.18)}
.vega-lab-result strong{font-size:.78rem;text-transform:uppercase;letter-spacing:.12em}
.vega-lab-result span{color:var(--muted);font-size:.9rem;text-align:right}
.vega-lab-result.good strong{color:#7ee2ad}.vega-lab-result.warn strong{color:var(--gold)}.vega-lab-result.danger strong{color:#ff9a9a}
.vega-rules-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px}
.vega-rules-grid div{border:1px solid var(--line);border-radius:14px;padding:12px;background:rgba(0,0,0,.16)}
.vega-rules-grid b{display:block;color:var(--cream);margin-bottom:4px}.vega-rules-grid span{font-size:.83rem;color:var(--muted)}
.helios-lab-symbol{width:64px;height:64px;border-radius:999px;border:1px solid rgba(212,175,55,.38);display:grid;place-items:center;font-family:var(--font-display);font-size:2.2rem;color:var(--gold);background:rgba(212,175,55,.08);flex:0 0 auto}
.helios-lab-grid{display:grid;grid-template-columns:minmax(220px,.75fr) minmax(0,1.25fr);gap:16px;align-items:stretch}
.helios-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.helios-choice{display:flex;align-items:center;gap:8px;text-align:left;border:1px solid var(--line);border-radius:14px;background:rgba(0,0,0,.16);color:var(--text);padding:10px;cursor:pointer;font-weight:800}
.helios-choice span{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(212,175,55,.28);color:var(--gold)}
.helios-choice.active{background:linear-gradient(135deg,rgba(13,112,72,.72),rgba(18,86,63,.55));border-color:rgba(212,175,55,.55);box-shadow:var(--shadow-soft)}
.helios-lab-result{border:1px solid var(--line);border-radius:18px;background:rgba(0,0,0,.17);padding:18px}
.helios-lab-result h4{font-family:var(--font-display);font-size:clamp(1.4rem,2.4vw,2rem);line-height:1;margin:5px 0 14px;color:var(--cream)}
.helios-lab-result dl{display:grid;gap:10px;margin:0}.helios-lab-result dt{font-size:.72rem;text-transform:uppercase;letter-spacing:.12em;color:var(--gold);font-weight:900}.helios-lab-result dd{margin:2px 0 0;color:var(--muted)}
@media (max-width:900px){.helios-lab-grid,.vega-rules-grid{grid-template-columns:1fr}.interactive-lab-head{flex-direction:column}.vega-lab-result{align-items:flex-start;flex-direction:column}.vega-lab-result span{text-align:left}.helios-choice-grid{grid-template-columns:1fr 1fr}}
@media (max-width:540px){.helios-choice-grid{grid-template-columns:1fr}.vega-band{font-size:.56rem}.interactive-lab{padding:14px}}

/* Client portal typography hierarchy pass: reduce competing display headlines and simplify HELIOS lab. */
body.client-portal-mode .portal-course-head h3,
body.client-portal-mode .portal-video-module h3,
body.client-portal-mode .lesson-panel h3,
body.client-portal-mode .pc-setup-note h3,
body.client-portal-mode .platform-detail-card h3,
body.client-portal-mode .interactive-lab-head h3,
body.client-portal-mode .helios-lab-result h4,
body.client-portal-mode .client-next-step-card h3,
body.client-portal-mode .journey-intro h3{
  text-wrap:balance;
}
body.client-portal-mode .portal-course-head h3{
  font-size:clamp(28px,2.8vw,40px) !important;
  line-height:1.04 !important;
  letter-spacing:-.015em;
}
body.client-portal-mode .portal-video-module h3{
  font-size:clamp(22px,2.15vw,30px) !important;
  line-height:1.08 !important;
  letter-spacing:-.01em;
}
body.client-portal-mode .lesson-panel h3,
body.client-portal-mode .pc-setup-note h3,
body.client-portal-mode .platform-detail-card h3{
  font-family:var(--font-sans) !important;
  font-size:17px !important;
  line-height:1.25 !important;
  font-weight:950 !important;
  letter-spacing:-.005em;
}
body.client-portal-mode .platform-os-grid .platform-detail-card h3{
  font-size:clamp(22px,2.4vw,32px) !important;
  font-family:var(--font-display) !important;
  line-height:1.05 !important;
}
body.client-portal-mode .interactive-lab-head h3{
  font-size:clamp(24px,2.4vw,34px) !important;
  line-height:1.05 !important;
  letter-spacing:-.01em;
}
body.client-portal-mode .interactive-lab-head p,
body.client-portal-mode .portal-course-head p,
body.client-portal-mode .portal-video-module p,
body.client-portal-mode .lesson-panel p,
body.client-portal-mode .platform-detail-card p{
  font-size:14px;
  line-height:1.55;
}
body.client-portal-mode .helios-lab-grid{
  display:block !important;
}
body.client-portal-mode .helios-choice-grid{
  display:none !important;
}
body.client-portal-mode .helios-lab-result{
  padding:18px !important;
  max-width:none !important;
}
body.client-portal-mode .helios-lab-result h4{
  font-size:clamp(22px,2.25vw,34px) !important;
  line-height:1.05 !important;
  margin:6px 0 14px !important;
}
body.client-portal-mode .helios-lab-result.compact dl,
body.client-portal-mode .helios-read-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
body.client-portal-mode .helios-read-grid div{
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(128,128,128,.045);
  padding:14px;
}
body.client-portal-mode .helios-read-grid dt{
  color:var(--gold);
  font-size:10px;
  font-weight:950;
  letter-spacing:.16em;
  text-transform:uppercase;
  margin:0 0 7px;
}
body.client-portal-mode .helios-read-grid dd{
  margin:0;
  color:var(--muted);
  line-height:1.5;
  font-size:14px;
}
body.client-portal-mode .portal-course-side h3{
  font-size:clamp(22px,2vw,28px) !important;
  line-height:1.08 !important;
}
body.client-portal-mode .video-placeholder h3,
body.client-portal-mode .video-placeholder strong{
  font-size:clamp(16px,1.5vw,20px) !important;
  line-height:1.12 !important;
}
body.client-portal-mode .module-points,
body.client-portal-mode .platform-steps{
  font-size:13px;
}
@media(max-width:760px){
  body.client-portal-mode .helios-read-grid{grid-template-columns:1fr;}
  body.client-portal-mode .portal-course-head h3{font-size:30px !important;}
  body.client-portal-mode .interactive-lab-head h3{font-size:26px !important;}
  body.client-portal-mode .helios-lab-result h4{font-size:25px !important;}
}


/* Portal Home tight spacing + focused next step action */
body.client-portal-mode #portal-home.client-hero-panel{
  padding:18px 20px !important;
  gap:16px !important;
}
body.client-portal-mode #portal-home.client-hero-panel h1{
  font-size:clamp(30px,4.2vw,52px) !important;
  margin:4px 0 8px !important;
}
body.client-portal-mode #portal-home.client-hero-panel p{
  line-height:1.45 !important;
  max-width:760px !important;
}
body.client-portal-mode #portal-home .client-hero-progress{
  padding:14px !important;
}
body.client-portal-mode #portal-home .client-hero-progress strong{
  font-size:clamp(34px,4vw,52px) !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module,
body.client-portal-mode .client-portal-view #portal-home + .card{
  margin-top:0 !important;
}
body.client-portal-mode .client-next-step-card{
  padding:16px 18px !important;
  gap:16px !important;
  align-items:center !important;
}
body.client-portal-mode .client-next-step-card h3{
  font-size:clamp(20px,1.7vw,28px) !important;
  line-height:1.12 !important;
  margin:4px 0 6px !important;
}
body.client-portal-mode .client-next-step-card p{
  line-height:1.45 !important;
}
body.client-portal-mode .client-next-step-card .next-step-action{
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:0 !important;
}
body.client-portal-mode .client-next-step-card .next-step-action .btn{
  white-space:nowrap !important;
}
body.client-portal-mode .portal-payment-card{
  padding:16px 18px !important;
}
body.client-portal-mode .portal-payment-title{
  margin-bottom:12px !important;
}
body.client-portal-mode .payment-mini-card{
  padding:16px !important;
}
@media(max-width:760px){
  body.client-portal-mode #portal-home.client-hero-panel{
    padding:16px !important;
  }
  body.client-portal-mode .client-next-step-card{
    padding:16px !important;
  }
  body.client-portal-mode .client-next-step-card .next-step-action,
  body.client-portal-mode .client-next-step-card .next-step-action .btn{
    width:100% !important;
  }
}

/* Portal Home density pass: match the tighter learning-page rhythm */
body.client-portal-mode .client-portal-view{
  gap:12px !important;
}
body.client-portal-mode .client-portal-view > .title-wrap{
  margin-bottom:4px !important;
}
body.client-portal-mode #portal-home.client-hero-panel{
  padding:14px 16px !important;
  gap:14px !important;
  min-height:auto !important;
  align-items:center !important;
}
body.client-portal-mode #portal-home.client-hero-panel h1{
  font-size:clamp(28px,3.2vw,44px) !important;
  line-height:1.02 !important;
  margin:3px 0 6px !important;
}
body.client-portal-mode #portal-home.client-hero-panel p{
  max-width:720px !important;
  line-height:1.4 !important;
  font-size:13px !important;
}
body.client-portal-mode #portal-home.client-hero-panel .spark{
  margin-bottom:2px !important;
}
body.client-portal-mode #portal-home .client-hero-progress{
  min-width:160px !important;
  padding:10px 12px !important;
  border-radius:18px !important;
}
body.client-portal-mode #portal-home .client-hero-progress strong{
  font-size:clamp(28px,3vw,42px) !important;
  line-height:.95 !important;
}
body.client-portal-mode #portal-home .client-hero-progress span{
  font-size:10px !important;
  margin-top:4px !important;
}
body.client-portal-mode #portal-home .client-hero-progress .progress-track{
  height:7px !important;
  margin-top:6px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
  padding:14px 16px !important;
  gap:14px !important;
  grid-template-columns:minmax(220px,320px) minmax(0,1fr) !important;
  min-height:auto !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
  min-height:124px !important;
  border-radius:18px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module h3{
  font-size:clamp(22px,2vw,30px) !important;
  line-height:1.05 !important;
  margin:3px 0 6px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module p,
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module li{
  font-size:13px !important;
  line-height:1.38 !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module ul{
  margin:8px 0 0 !important;
}
body.client-portal-mode .client-next-step-card{
  padding:13px 16px !important;
  min-height:auto !important;
  grid-template-columns:minmax(0,1fr) auto !important;
}
body.client-portal-mode .client-next-step-card h3{
  font-size:clamp(20px,1.55vw,26px) !important;
  margin:3px 0 5px !important;
}
body.client-portal-mode .client-next-step-card p{
  font-size:12.5px !important;
  line-height:1.35 !important;
}
body.client-portal-mode .portal-payment-card{
  margin-top:0 !important;
  padding:14px 16px !important;
  gap:12px !important;
}
body.client-portal-mode .portal-payment-title{
  padding-bottom:9px !important;
  margin-bottom:0 !important;
}
body.client-portal-mode .portal-payment-title h3{
  font-size:clamp(20px,1.6vw,26px) !important;
}
body.client-portal-mode .portal-payment-grid{
  gap:12px !important;
}
body.client-portal-mode .portal-payment-card .payment-mini-card{
  padding:13px 14px !important;
  border-radius:18px !important;
}
body.client-portal-mode .payment-mini-card h4{
  font-size:clamp(18px,1.35vw,22px) !important;
  margin:3px 0 6px !important;
}
body.client-portal-mode .payment-mini-card p,
body.client-portal-mode .payment-progress-row span,
body.client-portal-mode .payment-due-block span{
  font-size:12px !important;
  line-height:1.35 !important;
}
body.client-portal-mode .payment-progress-row{
  margin-top:10px !important;
  padding:10px !important;
  gap:10px !important;
  border-radius:14px !important;
}
body.client-portal-mode .payment-due-block{
  padding-top:10px !important;
}
@media(max-width:760px){
  body.client-portal-mode .client-portal-view{gap:10px !important;}
  body.client-portal-mode #portal-home.client-hero-panel,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module,
  body.client-portal-mode .client-next-step-card,
  body.client-portal-mode .portal-payment-card{padding:12px !important;}
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module,
  body.client-portal-mode .client-next-step-card{grid-template-columns:1fr !important;}
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{min-height:110px !important;}
}

/* Account setup completion action should live inside the task card, not compete with page navigation. */
.client-portal-page .account-action-grid{
  grid-template-columns:1fr !important;
}
.client-portal-page .account-action-panel{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.client-portal-page .account-step-complete-row{
  margin-top:4px;
  padding-top:12px;
  border-top:1px solid var(--line);
}

/* Final portal home density + account completion parity hotfix */
body.client-portal-mode .client-portal-view{
  gap:12px !important;
}
body.client-portal-mode .client-portal-view > .title-wrap{
  margin-bottom:8px !important;
}
body.client-portal-mode #portal-home.client-hero-panel{
  padding:14px 16px !important;
  min-height:0 !important;
  align-items:center !important;
  gap:14px !important;
  border-radius:20px !important;
}
body.client-portal-mode #portal-home.client-hero-panel h1{
  font-size:clamp(28px,2.8vw,42px) !important;
  line-height:1.02 !important;
  margin:3px 0 6px !important;
}
body.client-portal-mode #portal-home.client-hero-panel p{
  font-size:13px !important;
  line-height:1.4 !important;
  max-width:720px !important;
}
body.client-portal-mode #portal-home.client-hero-panel .spark{
  margin-bottom:2px !important;
}
body.client-portal-mode #portal-home .client-hero-progress{
  padding:12px 14px !important;
  min-width:140px !important;
  border-radius:16px !important;
}
body.client-portal-mode #portal-home .client-hero-progress strong{
  font-size:34px !important;
  line-height:.92 !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
  padding:14px 16px !important;
  min-height:0 !important;
  gap:14px !important;
  border-radius:20px !important;
  align-items:center !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
  min-height:118px !important;
  padding:14px !important;
  border-radius:16px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module h3{
  font-size:clamp(22px,1.8vw,30px) !important;
  line-height:1.05 !important;
  margin:3px 0 8px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module p,
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module li{
  font-size:12.5px !important;
  line-height:1.4 !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module ul{
  margin:8px 0 0 !important;
}
body.client-portal-mode .client-next-step-card{
  padding:14px 16px !important;
  min-height:0 !important;
  border-radius:20px !important;
  align-items:center !important;
}
body.client-portal-mode .client-next-step-card h3{
  font-size:clamp(20px,1.6vw,28px) !important;
  line-height:1.05 !important;
  margin:3px 0 5px !important;
}
body.client-portal-mode .client-next-step-card p{
  font-size:12.5px !important;
  line-height:1.35 !important;
}
body.client-portal-mode .portal-payment-card{
  padding:14px 16px !important;
  border-radius:20px !important;
  gap:12px !important;
}
body.client-portal-mode .portal-payment-title{
  padding-bottom:8px !important;
  margin-bottom:0 !important;
}
body.client-portal-mode .portal-payment-grid{
  gap:12px !important;
}
body.client-portal-mode .portal-payment-card .payment-mini-card{
  padding:12px 14px !important;
  border-radius:16px !important;
}
body.client-portal-mode .portal-payment-title h3,
body.client-portal-mode .payment-mini-card h4{
  font-size:clamp(18px,1.45vw,24px) !important;
  line-height:1.08 !important;
  margin:3px 0 6px !important;
}
body.client-portal-mode .payment-progress-row{
  margin-top:8px !important;
  padding:9px !important;
  gap:10px !important;
  border-radius:14px !important;
}
body.client-portal-mode .payment-due-block{
  padding-top:8px !important;
}
body.client-portal-mode .account-step-complete-row{
  margin-top:12px !important;
}
@media(max-width:760px){
  body.client-portal-mode .client-portal-view{gap:10px !important;}
  body.client-portal-mode #portal-home.client-hero-panel,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module,
  body.client-portal-mode .client-next-step-card,
  body.client-portal-mode .portal-payment-card{
    padding:12px !important;
    grid-template-columns:1fr !important;
  }
  body.client-portal-mode #portal-home.client-hero-panel h1{font-size:30px !important;}
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{min-height:96px !important;}
}


/* FINAL CLIENT PORTAL HOME COMPRESSION
   Targets the blank space inside Portal Home cards, not just the page top. */
body.client-portal-mode .client-only-main.main{
  padding:6px 8px 10px !important;
  gap:6px !important;
}
body.client-portal-mode .client-topbar.topbar{
  margin:0 0 6px !important;
  padding:0 !important;
}
body.client-portal-mode .client-topbar .title-wrap h1{
  font-size:clamp(24px,2vw,32px) !important;
  margin:1px 0 2px !important;
  line-height:.96 !important;
}
body.client-portal-mode .client-topbar .title-wrap p{
  font-size:11.5px !important;
  line-height:1.25 !important;
}
body.client-portal-mode .client-topbar .search-box{
  height:34px !important;
}
body.client-portal-mode .client-topbar .btn,
body.client-portal-mode .client-topbar .theme-toggle{
  min-height:34px !important;
}

/* Remove the oversized home-card rhythm */
body.client-portal-mode .client-portal-view.view{
  gap:6px !important;
  padding:0 !important;
  align-content:start !important;
}
body.client-portal-mode .client-portal-view > .card,
body.client-portal-mode .client-portal-view > section.card{
  margin:0 !important;
}

/* Welcome card */
body.client-portal-mode .client-portal-view #portal-home.client-hero-panel.card{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 118px !important;
  align-items:center !important;
  min-height:118px !important;
  height:auto !important;
  padding:8px 12px !important;
  gap:10px !important;
  border-radius:16px !important;
}
body.client-portal-mode .client-portal-view #portal-home.client-hero-panel.card::before{
  width:72px !important;
  height:72px !important;
  right:10px !important;
  top:8px !important;
  border-radius:24px !important;
}
body.client-portal-mode #portal-home.client-hero-panel .spark{
  font-size:8px !important;
  letter-spacing:.14em !important;
}
body.client-portal-mode #portal-home.client-hero-panel h1{
  font-size:clamp(24px,2.35vw,36px) !important;
  line-height:.96 !important;
  margin:2px 0 3px !important;
}
body.client-portal-mode #portal-home.client-hero-panel p{
  font-size:11.5px !important;
  line-height:1.28 !important;
  max-width:760px !important;
}
body.client-portal-mode #portal-home .client-hero-progress{
  min-width:0 !important;
  width:118px !important;
  padding:8px 9px !important;
  border-radius:14px !important;
  align-self:center !important;
}
body.client-portal-mode #portal-home .client-hero-progress strong{
  font-size:27px !important;
  line-height:.9 !important;
}
body.client-portal-mode #portal-home .client-hero-progress span{
  font-size:8px !important;
  line-height:1.1 !important;
  margin:4px 0 0 !important;
}
body.client-portal-mode #portal-home .progress-track{
  height:5px !important;
  margin-top:6px !important;
}

/* Welcome video card */
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
  display:grid !important;
  grid-template-columns:260px minmax(0,1fr) !important;
  align-items:center !important;
  min-height:116px !important;
  height:auto !important;
  padding:8px 12px !important;
  gap:10px !important;
  border-radius:16px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
  min-height:96px !important;
  height:96px !important;
  padding:8px !important;
  border-radius:14px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .play-button{
  width:46px !important;
  height:46px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module h3{
  font-size:clamp(18px,1.45vw,24px) !important;
  line-height:1 !important;
  margin:1px 0 4px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module p,
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module li{
  font-size:11px !important;
  line-height:1.25 !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module ul{
  margin:5px 0 0 !important;
  padding-left:15px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .btn{
  min-height:28px !important;
  padding:5px 9px !important;
  font-size:10px !important;
}

/* Next step */
body.client-portal-mode .client-portal-view .client-next-step-card{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  min-height:78px !important;
  height:auto !important;
  padding:8px 12px !important;
  gap:10px !important;
  border-radius:16px !important;
}
body.client-portal-mode .client-next-step-card h3{
  font-size:clamp(16px,1.25vw,21px) !important;
  line-height:1.02 !important;
  margin:1px 0 3px !important;
}
body.client-portal-mode .client-next-step-card p{
  font-size:11px !important;
  line-height:1.25 !important;
}
body.client-portal-mode .client-next-step-card .next-step-action{
  min-width:160px !important;
}
body.client-portal-mode .client-next-step-card .btn{
  min-height:34px !important;
  padding:7px 12px !important;
}

/* Payment section */
body.client-portal-mode .client-portal-view .portal-payment-card{
  padding:9px 12px !important;
  gap:8px !important;
  border-radius:16px !important;
}
body.client-portal-mode .portal-payment-title{
  padding-bottom:5px !important;
  margin-bottom:0 !important;
}
body.client-portal-mode .portal-payment-title h3,
body.client-portal-mode .payment-mini-card h4{
  font-size:clamp(16px,1.25vw,21px) !important;
  line-height:1.02 !important;
  margin:1px 0 4px !important;
}
body.client-portal-mode .portal-payment-card p,
body.client-portal-mode .payment-mini-card p{
  font-size:11px !important;
  line-height:1.25 !important;
}
body.client-portal-mode .portal-payment-grid{
  gap:8px !important;
}
body.client-portal-mode .portal-payment-card .payment-mini-card{
  padding:8px 10px !important;
  border-radius:14px !important;
}
body.client-portal-mode .payment-progress-row{
  margin-top:5px !important;
  padding:6px !important;
  gap:7px !important;
  border-radius:12px !important;
}
body.client-portal-mode .payment-due-block{
  padding-top:5px !important;
}

/* Client portal left nav density */
body.client-portal-mode .client-only-sidebar{
  padding:10px 10px !important;
  gap:8px !important;
}
body.client-portal-mode .client-portal-brand.large{
  padding-bottom:9px !important;
  margin-bottom:0 !important;
}
body.client-portal-mode .portal-menu-link{
  padding:7px 9px !important;
  border-radius:12px !important;
}
body.client-portal-mode .portal-menu-link small{
  font-size:9.5px !important;
  line-height:1.15 !important;
}

@media(max-width:900px){
  body.client-portal-mode .client-portal-view #portal-home.client-hero-panel.card,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module,
  body.client-portal-mode .client-portal-view .client-next-step-card{
    grid-template-columns:1fr !important;
  }
  body.client-portal-mode #portal-home .client-hero-progress{
    width:100% !important;
  }
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
    height:86px !important;
    min-height:86px !important;
  }
}


/* CLIENT PORTAL HOME BALANCED PADDING
   Adds controlled breathing room around page elements without returning to the oversized layout. */
body.client-portal-mode .client-only-main.main{
  padding:12px 14px 16px !important;
  gap:10px !important;
}
body.client-portal-mode .client-topbar.topbar{
  margin:0 0 10px !important;
  padding:0 2px !important;
}
body.client-portal-mode .client-portal-view.view{
  gap:10px !important;
}

/* Welcome card */
body.client-portal-mode .client-portal-view #portal-home.client-hero-panel.card{
  min-height:142px !important;
  padding:16px 18px !important;
  gap:16px !important;
  border-radius:18px !important;
}
body.client-portal-mode #portal-home.client-hero-panel h1{
  margin:4px 0 6px !important;
}
body.client-portal-mode #portal-home.client-hero-panel p{
  line-height:1.36 !important;
}
body.client-portal-mode #portal-home .client-hero-progress{
  padding:12px 13px !important;
  border-radius:15px !important;
}

/* Welcome video */
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
  min-height:142px !important;
  padding:16px 18px !important;
  gap:16px !important;
  border-radius:18px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
  height:108px !important;
  min-height:108px !important;
  padding:12px !important;
  border-radius:15px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module h3{
  margin:3px 0 6px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module ul{
  margin:7px 0 0 !important;
}

/* Next step and payment cards */
body.client-portal-mode .client-portal-view .client-next-step-card{
  min-height:96px !important;
  padding:14px 18px !important;
  gap:14px !important;
  border-radius:18px !important;
}
body.client-portal-mode .client-next-step-card h3{
  margin:3px 0 5px !important;
}
body.client-portal-mode .client-next-step-card .next-step-action{
  padding-left:8px !important;
}
body.client-portal-mode .client-portal-view .portal-payment-card{
  padding:16px 18px !important;
  gap:12px !important;
  border-radius:18px !important;
}
body.client-portal-mode .portal-payment-title{
  padding-bottom:8px !important;
}
body.client-portal-mode .portal-payment-grid{
  gap:12px !important;
}
body.client-portal-mode .portal-payment-card .payment-mini-card{
  padding:12px 14px !important;
  border-radius:15px !important;
}
body.client-portal-mode .payment-progress-row{
  margin-top:8px !important;
  padding:9px !important;
}

/* Sidebar spacing */
body.client-portal-mode .client-only-sidebar{
  padding:14px 12px !important;
  gap:10px !important;
}
body.client-portal-mode .portal-menu-link{
  padding:9px 10px !important;
}

/* Small screens */
@media(max-width:900px){
  body.client-portal-mode .client-only-main.main{
    padding:10px !important;
  }
  body.client-portal-mode .client-portal-view #portal-home.client-hero-panel.card,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module,
  body.client-portal-mode .client-portal-view .client-next-step-card,
  body.client-portal-mode .client-portal-view .portal-payment-card{
    padding:13px 14px !important;
  }
}


/* CLIENT PORTAL HOME: extra breathing room for Welcome Video section */
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
  min-height:164px !important;
  padding:22px 26px !important;
  gap:24px !important;
  border-radius:20px !important;
  grid-template-columns:300px minmax(0,1fr) !important;
  align-items:center !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
  height:124px !important;
  min-height:124px !important;
  padding:18px !important;
  border-radius:18px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .play-button{
  width:56px !important;
  height:56px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module h3{
  margin:4px 0 8px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module p{
  margin-bottom:8px !important;
  line-height:1.42 !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module ul{
  margin:9px 0 10px !important;
  padding-left:18px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module li{
  line-height:1.36 !important;
  margin-bottom:2px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .btn{
  margin-top:2px !important;
}

@media(max-width:900px){
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
    grid-template-columns:1fr !important;
    padding:18px !important;
    gap:16px !important;
  }
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
    height:118px !important;
    min-height:118px !important;
  }
}


/* CLIENT PORTAL HOME: make Welcome Video placeholder 50% larger */
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
  grid-template-columns:450px minmax(0,1fr) !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
  height:186px !important;
  min-height:186px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .play-button{
  width:70px !important;
  height:70px !important;
}

@media(max-width:900px){
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
    grid-template-columns:1fr !important;
  }
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
    height:177px !important;
    min-height:177px !important;
  }
}


/* CLIENT PORTAL: compact gold/dark theme toggle like the mockup */
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle{
  width:auto !important;
  min-height:38px !important;
  height:38px !important;
  display:inline-grid !important;
  grid-template-columns:1fr 1fr !important;
  align-items:center !important;
  gap:0 !important;
  padding:3px !important;
  border:1px solid rgba(225,191,99,.55) !important;
  border-radius:999px !important;
  background:rgba(5,20,14,.72) !important;
  box-shadow:
    inset 0 0 0 1px rgba(47,122,87,.24),
    0 8px 22px rgba(0,0,0,.18) !important;
  overflow:hidden !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button{
  min-width:70px !important;
  height:30px !important;
  min-height:30px !important;
  padding:0 14px !important;
  border:0 !important;
  border-radius:999px !important;
  background:transparent !important;
  color:var(--text) !important;
  font-size:12px !important;
  font-weight:950 !important;
  line-height:1 !important;
  box-shadow:none !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button.active{
  background:linear-gradient(180deg,#e8c965,#c89f3f) !important;
  color:#07130d !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.32),
    0 6px 14px rgba(200,162,74,.20) !important;
}
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button[data-theme-set="dark"]::before{
  content:"☾ ";
  font-weight:950;
}
[data-theme="light"] body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle,
body.client-portal-mode[data-theme="light"] .client-topbar .theme-toggle.premium-theme-toggle{
  background:rgba(255,249,234,.78) !important;
}


/* CLIENT PORTAL: force the correct active yellow pill by current theme */
html[data-theme="dark"] body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button[data-theme-set="dark"],
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button[data-theme-set="dark"].active{
  background:linear-gradient(180deg,#e8c965,#c89f3f) !important;
  color:#07130d !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    0 6px 14px rgba(200,162,74,.24) !important;
}
html[data-theme="dark"] body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button[data-theme-set="light"]{
  background:transparent !important;
  color:var(--text) !important;
  box-shadow:none !important;
}
html[data-theme="light"] body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button[data-theme-set="light"],
body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button[data-theme-set="light"].active{
  background:linear-gradient(180deg,#e8c965,#c89f3f) !important;
  color:#07130d !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    0 6px 14px rgba(200,162,74,.24) !important;
}
html[data-theme="light"] body.client-portal-mode .client-topbar .theme-toggle.premium-theme-toggle button[data-theme-set="dark"]{
  background:transparent !important;
  color:var(--text) !important;
  box-shadow:none !important;
}


/* CLIENT PORTAL HOME: make Welcome Video section substantially larger */
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
  grid-template-columns:560px minmax(0,1fr) !important;
  min-height:320px !important;
  padding:28px 30px !important;
  gap:28px !important;
  border-radius:22px !important;
  align-items:start !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
  height:260px !important;
  min-height:260px !important;
  padding:22px !important;
  border-radius:22px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .play-button{
  width:82px !important;
  height:82px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module h3{
  margin:6px 0 10px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module p{
  margin-bottom:12px !important;
  line-height:1.46 !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module ul{
  margin:12px 0 14px !important;
  padding-left:20px !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module li{
  margin-bottom:4px !important;
  line-height:1.4 !important;
}
body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .btn{
  margin-top:4px !important;
}

@media(max-width:1100px){
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
    grid-template-columns:420px minmax(0,1fr) !important;
    min-height:280px !important;
    padding:22px 24px !important;
    gap:22px !important;
  }
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
    height:220px !important;
    min-height:220px !important;
  }
}

@media(max-width:900px){
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module{
    grid-template-columns:1fr !important;
    min-height:auto !important;
    padding:18px !important;
    gap:16px !important;
  }
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder,
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .video-placeholder.course-video{
    height:190px !important;
    min-height:190px !important;
  }
  body.client-portal-mode .client-portal-view #portal-home + .portal-video-module .play-button{
    width:70px !important;
    height:70px !important;
  }
}
body.client-portal-mode .learning-dashboard{display:grid;gap:18px}
body.client-portal-mode .learning-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
body.client-portal-mode .learning-hero h2{font-family:var(--font-display);font-size:34px;line-height:1.08;margin:8px 0}
body.client-portal-mode .learning-grid,
body.client-portal-mode .learning-checklist-grid,
body.client-portal-mode .learning-assignment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
body.client-portal-mode .learning-card{display:grid;gap:18px;min-height:230px}
body.client-portal-mode .learning-assignment-card{display:grid;gap:16px;min-height:245px}
body.client-portal-mode .learning-card h3,
body.client-portal-mode .learning-checklist h3,
body.client-portal-mode .learning-assignment-card h3{font-family:var(--font-display);font-size:25px;line-height:1.12;margin:8px 0}
body.client-portal-mode .learning-card p,
body.client-portal-mode .learning-checklist p,
body.client-portal-mode .learning-assignment-card p{line-height:1.55}
body.client-portal-mode .learning-card-foot{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:end}
body.client-portal-mode .learning-card-foot strong{display:block;font-size:24px}
body.client-portal-mode .learning-assignment-meta{display:flex;flex-wrap:wrap;gap:8px;color:var(--muted);font-size:12px;font-weight:800}
body.client-portal-mode .learning-assignment-meta span{border:1px solid var(--line);border-radius:999px;background:var(--input);padding:6px 9px}
body.client-portal-mode .learning-assignment-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
body.client-portal-mode .learning-assignment-panel{display:grid;gap:16px}
body.client-portal-mode .learning-assignment-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.client-portal-mode .learning-assignment-detail-grid div{border:1px solid var(--line);border-radius:14px;background:var(--input);padding:12px}
body.client-portal-mode .learning-assignment-detail-grid span,
body.client-portal-mode .learning-assignment-detail-grid strong{display:block}
body.client-portal-mode .learning-assignment-detail-grid span{color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase}
body.client-portal-mode .learning-assignment-detail-grid strong{margin-top:4px;color:var(--text)}
body.client-portal-mode .learning-course-flow .portal-course-main{display:grid;gap:16px}
body.client-portal-mode .learning-module{display:grid;gap:14px}
body.client-portal-mode .learning-lesson-list{display:grid;gap:10px}
body.client-portal-mode .learning-lesson-row{width:100%;border:1px solid var(--line);border-radius:16px;background:var(--input);color:var(--text);padding:13px;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left}
body.client-portal-mode .learning-lesson-row:hover{border-color:var(--line-strong);transform:translateY(-1px)}
body.client-portal-mode .learning-lesson-row strong,
body.client-portal-mode .learning-lesson-row small{display:block}
body.client-portal-mode .learning-lesson-row small{margin-top:4px;color:var(--muted);line-height:1.35}
body.client-portal-mode .learning-lesson-view{display:grid;gap:16px}
body.client-portal-mode .learning-lesson-body{color:var(--text);line-height:1.7}
body.client-portal-mode .learning-lesson-body p:first-child{margin-top:0}
body.client-portal-mode .learning-checklist .portal-checklist-grid{grid-template-columns:1fr}
body.client-portal-mode .learning-checklist .portal-check-item{text-align:left}
body.client-portal-mode .client-dashboard-shell{display:grid;gap:16px}
body.client-portal-mode .client-dashboard-hero{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr);gap:18px;align-items:stretch}
body.client-portal-mode .client-dashboard-hero h1{font-family:var(--font-display);font-size:clamp(34px,4vw,58px);line-height:.98;margin:8px 0}
body.client-portal-mode .client-dashboard-hero p{max-width:680px;line-height:1.55}
body.client-portal-mode .dashboard-identity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.client-portal-mode .dashboard-identity-grid div{border:1px solid var(--line);border-radius:16px;background:var(--input);padding:12px}
body.client-portal-mode .dashboard-identity-grid span{display:block;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-weight:900}
body.client-portal-mode .dashboard-identity-grid strong{display:block;margin-top:6px;font-size:15px}
body.client-portal-mode .client-dashboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
body.client-portal-mode .client-dashboard-card{display:grid;gap:14px;align-content:start;min-height:170px}
body.client-portal-mode .client-dashboard-card h3{font-family:var(--font-display);font-size:24px;line-height:1.08;margin:6px 0}
body.client-portal-mode .dashboard-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
body.client-portal-mode .dashboard-card-head > strong{font-size:30px;line-height:1;color:var(--gold)}
body.client-portal-mode .client-dashboard-activation{grid-column:span 2}
body.client-portal-mode .client-dashboard-learning{grid-column:span 2}
body.client-portal-mode .dashboard-learning-meta{display:flex;flex-wrap:wrap;gap:10px;color:var(--muted);font-size:12px;font-weight:800}
body.client-portal-mode .client-dashboard-products{display:grid;gap:9px}
body.client-portal-mode .dashboard-product-pill{border:1px solid var(--line);border-radius:14px;background:var(--input);padding:10px}
body.client-portal-mode .dashboard-product-pill strong,
body.client-portal-mode .dashboard-product-pill span{display:block}
body.client-portal-mode .dashboard-product-pill span{margin-top:4px;color:var(--muted);font-size:12px;line-height:1.35}
body.client-portal-mode .dashboard-chip-row{display:flex;flex-wrap:wrap;gap:8px}
body.client-portal-mode .dashboard-shortcut .btn[disabled]{opacity:.62}
body.client-portal-mode .empty.compact{padding:16px;text-align:left}
body.client-portal-mode .portal-error-state{display:grid;gap:5px;text-align:left}
body.client-portal-mode .portal-error-state strong{font-size:16px;color:var(--text)}
body.client-portal-mode .portal-error-state span,
body.client-portal-mode .portal-error-state small{color:var(--muted)}
@media (max-width:900px){
  body.client-portal-mode .learning-grid,
  body.client-portal-mode .learning-checklist-grid,
  body.client-portal-mode .learning-assignment-grid,
  body.client-portal-mode .learning-assignment-detail-grid,
  body.client-portal-mode .learning-card-foot{grid-template-columns:1fr}
  body.client-portal-mode .learning-assignment-actions{justify-content:flex-start}
  body.client-portal-mode .learning-hero{display:grid}
  body.client-portal-mode .client-dashboard-hero,
  body.client-portal-mode .client-dashboard-grid,
  body.client-portal-mode .dashboard-identity-grid{grid-template-columns:1fr}
  body.client-portal-mode .client-dashboard-activation{grid-column:auto}
  body.client-portal-mode .client-dashboard-learning{grid-column:auto}
}

/* IP-008 Client Portal shell and navigation */
body.client-portal-mode .client-only-shell[data-client-shell]{
  min-height:100vh;
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  background:linear-gradient(135deg,var(--bg),var(--bg-2));
}
body.client-portal-mode .client-shell-identity,
body.client-portal-mode .client-shell-footer,
body.client-portal-mode .client-topbar-identity{
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(128,128,128,.05);
  padding:12px;
}
body.client-portal-mode .client-shell-identity{display:flex;align-items:center;gap:11px;min-width:0;}
body.client-portal-mode .client-shell-identity strong,
body.client-portal-mode .client-shell-identity span,
body.client-portal-mode .client-shell-identity small,
body.client-portal-mode .client-topbar-identity strong,
body.client-portal-mode .client-topbar-identity span,
body.client-portal-mode .client-topbar-identity small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
body.client-portal-mode .client-shell-identity span,
body.client-portal-mode .client-shell-identity small,
body.client-portal-mode .client-topbar-identity span,
body.client-portal-mode .client-topbar-identity small,
body.client-portal-mode .client-shell-footer span{color:var(--muted);font-size:12px;line-height:1.35;}
body.client-portal-mode .client-shell-footer{margin-top:auto;display:grid;gap:4px;}
body.client-portal-mode .client-step-nav{display:grid;gap:8px;}
body.client-portal-mode .client-step-nav .portal-menu-link{width:100%;min-height:52px;border-radius:16px;grid-template-columns:34px minmax(0,1fr);}
body.client-portal-mode .client-step-nav .portal-menu-link[aria-current="page"]{background:linear-gradient(135deg,rgba(47,122,87,.34),rgba(200,162,74,.14));color:var(--text);border-color:var(--line-strong);}
body.client-portal-mode .client-shell-topbar{align-items:start;grid-template-columns:minmax(0,1fr) auto;}
body.client-portal-mode .client-shell-actions{align-items:center;}
body.client-portal-mode .client-notification-placeholder[disabled],
body.client-portal-mode .client-search-placeholder input:disabled{opacity:.7;cursor:not-allowed;}
body.client-portal-mode .client-topbar-identity{min-width:180px;max-width:260px;}
body.client-portal-mode .client-placeholder-page,
body.client-portal-mode .client-account-summary,
body.client-portal-mode .client-shell-state{display:grid;gap:16px;}
body.client-portal-mode .client-placeholder-page h3,
body.client-portal-mode .client-account-summary h3,
body.client-portal-mode .client-shell-state h2{font-family:var(--font-display);font-size:clamp(24px,2.4vw,34px);line-height:1.08;margin:6px 0;}
body.client-portal-mode .client-mobile-nav-toggle,
body.client-portal-mode .client-mobile-backdrop{display:none;}
@media(max-width:980px){
  body.client-portal-mode .client-only-shell[data-client-shell]{grid-template-columns:1fr;}
  body.client-portal-mode .client-mobile-nav-toggle{display:inline-grid;position:fixed;left:14px;top:14px;z-index:180;min-width:48px;height:42px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--text);place-items:center;font-weight:900;box-shadow:var(--shadow);}
  body.client-portal-mode .client-mobile-backdrop{position:fixed;inset:0;z-index:160;background:rgba(0,0,0,.56);border:0;}
  body.client-portal-mode.client-mobile-nav-open .client-mobile-backdrop{display:block;}
  body.client-portal-mode .client-only-sidebar{position:fixed!important;left:0;top:0;bottom:0;width:min(300px,86vw);height:100vh!important;z-index:170;transform:translateX(-105%);transition:transform var(--ease);}
  body.client-portal-mode.client-mobile-nav-open .client-only-sidebar{transform:translateX(0)!important;}
  body.client-portal-mode .client-only-main{padding-top:70px;}
  body.client-portal-mode .client-shell-topbar{grid-template-columns:1fr;}
  body.client-portal-mode .client-shell-actions{justify-content:flex-start;width:100%;}
  body.client-portal-mode .client-search-placeholder{width:100%;min-width:0;}
  body.client-portal-mode .client-topbar-identity{width:100%;max-width:none;}
}

/* IP-009 Product Center */
body.client-portal-mode .product-center-page,
body.client-portal-mode .product-detail-page{display:grid;gap:16px;}
body.client-portal-mode .product-center-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
body.client-portal-mode .product-center-card{min-height:260px;display:grid;align-content:space-between;}
body.client-portal-mode .product-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
body.client-portal-mode .product-action-grid .btn{width:100%;min-width:0;white-space:normal;}
body.client-portal-mode .product-detail-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
body.client-portal-mode .product-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
body.client-portal-mode .product-resource-list{display:grid;gap:9px;}
body.client-portal-mode .product-resource-item{border:1px solid var(--line);border-radius:14px;background:var(--input);padding:10px;display:grid;gap:4px;}
body.client-portal-mode .product-resource-item strong{color:var(--text);}
body.client-portal-mode .product-resource-item span{color:var(--muted);font-size:12px;line-height:1.35;overflow-wrap:anywhere;}
body.client-portal-mode .delivery-center-card{grid-column:span 2;min-height:0;}
body.client-portal-mode .delivery-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
body.client-portal-mode .delivery-summary-grid>div{border:1px solid var(--line);border-radius:14px;background:var(--input);padding:10px;display:grid;gap:4px;}
body.client-portal-mode .delivery-summary-grid span{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em;}
body.client-portal-mode .delivery-resource-item{grid-template-columns:minmax(0,1fr) auto;align-items:center;}
body.client-portal-mode .delivery-resource-list{margin-top:2px;}
body.client-portal-mode .product-reference-image-card{padding:0;overflow:hidden;}
body.client-portal-mode .product-reference-image{background:#010201;}
body.client-portal-mode .product-reference-image img{display:block;width:100%;height:auto;}
@media(max-width:760px){
  body.client-portal-mode .product-center-grid,
  body.client-portal-mode .product-detail-grid,
  body.client-portal-mode .product-action-grid{grid-template-columns:1fr;}
  body.client-portal-mode .product-detail-actions .btn{width:100%;}
  body.client-portal-mode .delivery-center-card{grid-column:span 1;}
  body.client-portal-mode .delivery-summary-grid,
  body.client-portal-mode .delivery-resource-item{grid-template-columns:1fr;}
}
body.client-portal-mode .license-center-card{grid-column:span 2;min-height:0;}
body.client-portal-mode .license-status-pill{border:1px solid var(--line);border-radius:999px;background:var(--input);color:var(--text);font-size:12px;font-weight:800;padding:7px 10px;white-space:nowrap;}
body.client-portal-mode .license-status-pill.active{border-color:rgba(104,211,145,.45);color:#9ae6b4;}
body.client-portal-mode .license-status-pill.not_activated,
body.client-portal-mode .license-status-pill.needs_review{border-color:rgba(245,190,91,.42);color:var(--gold);}
body.client-portal-mode .license-status-pill.expired,
body.client-portal-mode .license-status-pill.disabled{border-color:rgba(248,113,113,.42);color:#fecaca;}
body.client-portal-mode .license-status-pill.grace_period{border-color:rgba(96,165,250,.42);color:#bfdbfe;}
body.client-portal-mode .license-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
body.client-portal-mode .license-detail-grid > div{border:1px solid var(--line);border-radius:14px;background:var(--input);padding:10px;display:grid;gap:4px;min-width:0;}
body.client-portal-mode .license-detail-grid span{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em;}
body.client-portal-mode .license-detail-grid strong{color:var(--text);font-size:13px;overflow-wrap:anywhere;}
body.client-portal-mode .license-event-list{margin-top:2px;}
@media(max-width:980px){body.client-portal-mode .license-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:760px){body.client-portal-mode .license-center-card{grid-column:span 1;}body.client-portal-mode .license-detail-grid{grid-template-columns:1fr;}}

/* IP-011 Billing Center */
body.client-portal-mode .billing-center-card{display:grid;gap:14px;}
body.client-portal-mode .billing-detail-grid{margin-top:2px;}
body.client-portal-mode .billing-invoices-head{margin-top:2px;}
body.client-portal-mode .billing-invoice-list{display:grid;gap:9px;}
body.client-portal-mode .license-status-pill.not_connected,
body.client-portal-mode .license-status-pill.needs_review,
body.client-portal-mode .license-status-pill.past_due{border-color:rgba(245,190,91,.42);color:var(--gold);}
body.client-portal-mode .license-status-pill.canceled,
body.client-portal-mode .license-status-pill.paused{border-color:rgba(248,113,113,.42);color:#fecaca;}
body.client-portal-mode .license-status-pill.trialing{border-color:rgba(96,165,250,.42);color:#bfdbfe;}

/* IP-012 Notifications */
body.client-portal-mode .client-notification-wrap{position:relative;display:inline-flex;align-items:center;}
body.client-portal-mode .client-notification-button{position:relative;display:inline-flex;align-items:center;gap:8px;}
body.client-portal-mode .notification-count{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#f4c95d;color:#15120a;font-size:11px;font-weight:900;display:inline-flex;align-items:center;justify-content:center;}
body.client-portal-mode .client-notification-panel{position:absolute;right:0;top:calc(100% + 10px);z-index:40;width:min(420px,calc(100vw - 32px));max-height:70vh;overflow:auto;padding:14px;box-shadow:0 24px 60px rgba(0,0,0,.38);}
body.client-portal-mode .notification-panel-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
body.client-portal-mode .notification-list,
body.client-portal-mode .announcement-list{display:grid;gap:10px;}
body.client-portal-mode .notification-item,
body.client-portal-mode .announcement-item{display:grid;gap:10px;padding:12px;border:1px solid color-mix(in srgb,var(--line),transparent 20%);border-radius:8px;background:color-mix(in srgb,var(--panel),transparent 12%);}
body.client-portal-mode .notification-item.unread{border-color:color-mix(in srgb,#f4c95d,transparent 45%);background:color-mix(in srgb,#f4c95d,transparent 92%);}
body.client-portal-mode .notification-item strong,
body.client-portal-mode .announcement-item strong{display:block;margin:3px 0 4px;font-size:15px;line-height:1.25;}
body.client-portal-mode .notification-item p,
body.client-portal-mode .announcement-item p{margin:0;color:var(--muted);line-height:1.45;}
body.client-portal-mode .notification-item small{color:var(--muted);font-weight:800;text-transform:uppercase;font-size:10px;letter-spacing:.08em;}
body.client-portal-mode .notification-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
body.client-portal-mode .dashboard-announcements-card{min-height:170px;}
@media(max-width:720px){body.client-portal-mode .client-notification-wrap{position:static;}body.client-portal-mode .client-notification-panel{position:fixed;left:12px;right:12px;top:76px;width:auto;max-height:calc(100vh - 100px);}body.client-portal-mode .notification-actions{justify-content:flex-start;}}
/* IP-013 Mission Control */
body.mission-control-mode .app-shell>.sidebar,
body.mission-control-mode .app-shell>.main>.topbar{display:none;}
body.mission-control-mode .app-shell{display:block;}
body.mission-control-mode #view{padding:0;}
body.mission-control-mode .mission-control-shell{min-height:100vh;display:grid;grid-template-columns:280px minmax(0,1fr);background:linear-gradient(135deg,#10130f 0%,#161a16 42%,#0b0d0d 100%);color:var(--text);}
body.mission-control-mode .mission-sidebar{padding:18px;border-right:1px solid color-mix(in srgb,var(--line),transparent 18%);background:rgba(10,12,10,.72);position:sticky;top:0;height:100vh;overflow:auto;}
body.mission-control-mode .mission-nav{display:grid;gap:8px;margin-top:18px;}
body.mission-control-mode .mission-nav-link{display:grid;gap:4px;text-align:left;padding:12px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--text);cursor:pointer;}
body.mission-control-mode .mission-nav-link span{color:var(--muted);font-size:12px;line-height:1.25;}
body.mission-control-mode .mission-nav-link.active,
body.mission-control-mode .mission-nav-link:hover{border-color:color-mix(in srgb,#f4c95d,transparent 58%);background:rgba(244,201,93,.08);}
body.mission-control-mode .mission-main{padding:18px;min-width:0;}
body.mission-control-mode .mission-topbar{margin-bottom:16px;border:1px solid color-mix(in srgb,var(--line),transparent 28%);border-radius:8px;background:rgba(255,255,255,.035);}
body.mission-control-mode .mission-section{display:grid;gap:16px;}
body.mission-control-mode .mission-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;}
body.mission-control-mode .mission-hero h2{font-family:var(--font-display);font-size:clamp(30px,4vw,50px);margin:6px 0;line-height:1;}
body.mission-control-mode .mission-metric-grid,
body.mission-control-mode .mission-twin-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
body.mission-control-mode .mission-placeholder-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
body.mission-control-mode .mission-metric{display:grid;gap:8px;min-height:136px;}
body.mission-control-mode .mission-metric span,
body.mission-control-mode .mission-customer-meta span{color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;}
body.mission-control-mode .mission-metric strong{font-family:var(--font-display);font-size:34px;line-height:1;}
body.mission-control-mode .mission-filter-row{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:12px;}
body.mission-control-mode .mission-customer-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.6fr) auto;gap:12px;align-items:center;margin-bottom:10px;}
body.mission-control-mode .mission-customer-row strong{display:block;font-size:18px;margin-bottom:4px;}
body.mission-control-mode .mission-customer-meta{display:flex;gap:8px;flex-wrap:wrap;}
body.mission-control-mode .mission-health-banner{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.8fr);gap:14px;align-items:start;border-color:color-mix(in srgb,#f4c95d,transparent 54%);background:linear-gradient(135deg,rgba(244,201,93,.10),rgba(255,255,255,.035));}
body.mission-control-mode .mission-health-banner h3{font-family:var(--font-display);font-size:30px;line-height:1;margin:4px 0;}
body.mission-control-mode .mission-health-banner.needs-attention{border-color:color-mix(in srgb,#f4c95d,transparent 38%);}
body.mission-control-mode .mission-health-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
body.mission-control-mode .mission-health-grid>div{padding:10px;border:1px solid color-mix(in srgb,var(--line),transparent 30%);border-radius:8px;background:rgba(255,255,255,.035);}
body.mission-control-mode .mission-health-grid span{display:block;color:var(--muted);font-size:11px;font-weight:900;text-transform:uppercase;margin-bottom:5px;}
body.mission-control-mode .mission-health-grid strong{display:block;font-size:16px;line-height:1.15;}
body.mission-control-mode .mission-health-list{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;}
body.mission-control-mode .mission-health-list span{border:1px solid color-mix(in srgb,#f4c95d,transparent 48%);border-radius:999px;padding:7px 10px;background:rgba(244,201,93,.08);font-size:12px;font-weight:850;}
@media(max-width:980px){body.mission-control-mode .mission-control-shell{grid-template-columns:1fr;}body.mission-control-mode .mission-sidebar{position:relative;height:auto;}body.mission-control-mode .mission-metric-grid,body.mission-control-mode .mission-twin-grid,body.mission-control-mode .mission-placeholder-grid{grid-template-columns:1fr 1fr;}body.mission-control-mode .mission-customer-row{grid-template-columns:1fr;}}
@media(max-width:640px){body.mission-control-mode .mission-metric-grid,body.mission-control-mode .mission-twin-grid,body.mission-control-mode .mission-placeholder-grid,body.mission-control-mode .mission-filter-row,body.mission-control-mode .mission-health-banner,body.mission-control-mode .mission-health-grid{grid-template-columns:1fr;}body.mission-control-mode .mission-hero{display:grid;}}
/* IP-014 Platform foundation */
body.mission-control-mode .mission-product-grid,
body.mission-control-mode .mission-foundation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
body.mission-control-mode .mission-product-card,
body.mission-control-mode .mission-foundation-card{display:grid;gap:12px;align-content:start;min-height:150px;}
body.mission-control-mode .mission-product-card h3,
body.mission-control-mode .mission-foundation-card h3{font-family:var(--font-display);font-size:24px;line-height:1.08;margin:2px 0 0;}
body.mission-control-mode .mission-product-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto;}
body.mission-control-mode .mission-product-meta span{border:1px solid color-mix(in srgb,var(--line),transparent 24%);border-radius:999px;padding:6px 9px;color:var(--muted);font-size:12px;font-weight:850;text-transform:uppercase;}
body.mission-control-mode .mission-foundation-list{display:grid;gap:8px;}
body.mission-control-mode .mission-foundation-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start;padding:10px;border:1px solid color-mix(in srgb,var(--line),transparent 30%);border-radius:8px;background:rgba(255,255,255,.03);}
body.mission-control-mode .mission-foundation-row strong{display:block;font-size:14px;margin-bottom:3px;}
body.mission-control-mode .mission-foundation-row span{color:var(--muted);font-size:12px;white-space:nowrap;}
@media(max-width:980px){body.mission-control-mode .mission-product-grid,body.mission-control-mode .mission-foundation-grid{grid-template-columns:1fr;}}
@media(max-width:640px){body.mission-control-mode .mission-foundation-row{grid-template-columns:1fr;}}
/* IP-015 Commerce foundation */
body.mission-control-mode .mission-commerce-card,
body.mission-control-mode .mission-access-card,
body.mission-control-mode .mission-delivery-card,
body.mission-control-mode .mission-activation-card{min-height:190px;}
body.mission-control-mode .mission-commerce-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
body.mission-control-mode .mission-commerce-grid>div{padding:10px;border:1px solid color-mix(in srgb,var(--line),transparent 30%);border-radius:8px;background:rgba(255,255,255,.03);}
body.mission-control-mode .mission-commerce-grid span{display:block;color:var(--muted);font-size:11px;font-weight:900;text-transform:uppercase;margin-bottom:5px;}
body.mission-control-mode .mission-commerce-grid strong{display:block;font-size:17px;line-height:1.12;}
@media(max-width:640px){body.mission-control-mode .mission-commerce-grid{grid-template-columns:1fr;}}
/* IP-016 Workflow foundation */
body.mission-control-mode .mission-workflow-card,
body.mission-control-mode .mission-learning-card{min-height:170px;}
body.mission-control-mode .mission-workflow-card h3{font-family:var(--font-display);font-size:24px;line-height:1.08;margin:2px 0 8px;}

/* IP-023 Operations Health Center */
body.mission-control-mode .mission-operations-card{min-height:180px;}
body.mission-control-mode .mission-operations-row{grid-template-columns:minmax(0,1fr) auto;}
body.mission-control-mode .mission-operations-row .btn{align-self:start;}

/* IP-019 Learning Assignment foundation */
body.mission-control-mode .mission-learning-list{display:grid;gap:10px;}
body.mission-control-mode .mission-learning-row{grid-template-columns:minmax(0,1fr) minmax(100px,auto);}

/* RC-003 Dashboard v3: Kaivalya Pro experience */
body.client-portal-mode .client-pro-shell .client-only-sidebar{padding-bottom:18px;}
body.client-portal-mode .client-pro-shell .client-step-nav{gap:18px;margin-top:20px;}
body.client-portal-mode .portal-nav-group{display:grid;gap:8px;padding-top:12px;border-top:1px solid color-mix(in srgb,var(--line),transparent 30%);}
body.client-portal-mode .portal-nav-group:first-child{border-top:0;padding-top:0;}
body.client-portal-mode .portal-nav-group-label{color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.16em;text-transform:uppercase;padding:0 4px;}
body.client-portal-mode .portal-nav-glyph{width:32px;height:32px;border:1px solid color-mix(in srgb,var(--line),transparent 16%);border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.035);position:relative;}
body.client-portal-mode .portal-nav-glyph:before,
body.client-portal-mode .portal-nav-glyph:after,
body.client-portal-mode .portal-nav-glyph i{content:"";display:block;position:absolute;background:var(--text);opacity:.86;}
body.client-portal-mode .portal-nav-glyph-home:before{width:15px;height:11px;bottom:7px;border:2px solid var(--text);border-top:0;background:transparent;}
body.client-portal-mode .portal-nav-glyph-home:after{width:14px;height:14px;top:6px;transform:rotate(45deg);border-left:2px solid var(--text);border-top:2px solid var(--text);background:transparent;}
body.client-portal-mode .portal-nav-glyph-products:before{width:14px;height:14px;border:2px solid var(--text);border-radius:4px;background:transparent;left:7px;top:7px;}
body.client-portal-mode .portal-nav-glyph-products:after{width:12px;height:12px;border:2px solid var(--text);border-radius:4px;background:transparent;right:6px;bottom:6px;opacity:.62;}
body.client-portal-mode .portal-nav-glyph-support:before{width:16px;height:11px;border:2px solid var(--text);border-radius:8px;background:transparent;top:8px;}
body.client-portal-mode .portal-nav-glyph-support:after{width:7px;height:7px;border-left:2px solid var(--text);border-bottom:2px solid var(--text);background:transparent;transform:rotate(-45deg);bottom:7px;right:9px;}
body.client-portal-mode .client-pro-shell .client-shell-topbar{grid-template-columns:1fr;padding-bottom:12px;margin-bottom:10px;}
body.client-portal-mode .client-dashboard-v3{display:grid;gap:14px;}
body.client-portal-mode .client-dashboard-v3-hero{grid-template-columns:minmax(0,1fr) auto;align-items:end;min-height:132px;padding-top:16px;padding-bottom:16px;}
body.client-portal-mode .client-dashboard-v3-hero h1{font-size:clamp(30px,4vw,52px);line-height:1;max-width:720px;}
body.client-portal-mode .client-dashboard-v3-layout{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:14px;align-items:start;}
body.client-portal-mode .client-dashboard-v3-layout .client-dashboard-card{display:grid;gap:12px;min-height:0;}
body.client-portal-mode .membership-card,
body.client-portal-mode .advisor-guidance-card{align-content:start;}
body.client-portal-mode .today-mission-card{grid-row:span 2;border-color:color-mix(in srgb,#f4c95d,transparent 54%);background:linear-gradient(145deg,rgba(244,201,93,.09),rgba(255,255,255,.035));}
body.client-portal-mode .today-mission-card h3{font-family:var(--font-display);font-size:clamp(26px,3vw,42px);line-height:1.02;margin:4px 0;}
body.client-portal-mode .current-product-section{grid-column:span 1;}
body.client-portal-mode .current-product-card{border-radius:8px;padding:12px;background:var(--input);border:1px solid var(--line);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;box-shadow:none;}
body.client-portal-mode .product-progress-card{grid-column:span 1;}
body.client-portal-mode .product-progress-list{display:grid;gap:8px;}
body.client-portal-mode .product-progress-step{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:8px;background:var(--input);padding:9px 10px;color:var(--muted);font-size:13px;font-weight:750;}
body.client-portal-mode .product-progress-step b{width:10px;height:10px;border-radius:999px;border:2px solid color-mix(in srgb,var(--muted),transparent 25%);}
body.client-portal-mode .product-progress-step.done{color:var(--text);border-color:rgba(104,211,145,.35);}
body.client-portal-mode .product-progress-step.done b{background:#68d391;border-color:#68d391;}
body.client-portal-mode .recent-activity-card{grid-column:span 2;}
body.client-portal-mode .product-workspace-page{gap:14px;}
body.client-portal-mode .product-workspace-card{border-radius:8px;min-height:240px;}
body.client-portal-mode .product-workspace-detail .client-dashboard-hero{grid-template-columns:minmax(0,1fr) minmax(280px,.55fr);}
body.client-portal-mode .product-overview-card,
body.client-portal-mode .product-installation-card,
body.client-portal-mode .product-methodology-card,
body.client-portal-mode .product-support-card{min-height:170px;}
body.client-portal-mode .client-support-workspace{display:grid;gap:14px;}
body.client-portal-mode .support-workspace-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
body.client-portal-mode .support-workspace-grid .client-dashboard-card{min-height:170px;align-content:start;}
@media(max-width:980px){
  body.client-portal-mode .client-dashboard-v3-layout,
  body.client-portal-mode .client-dashboard-v3-hero,
  body.client-portal-mode .product-workspace-detail .client-dashboard-hero,
  body.client-portal-mode .support-workspace-grid{grid-template-columns:1fr;}
  body.client-portal-mode .today-mission-card,
  body.client-portal-mode .recent-activity-card{grid-column:auto;grid-row:auto;}
  body.client-portal-mode .current-product-card{grid-template-columns:1fr;}
}
body.client-portal-mode .product-empty-state{padding:22px;border:1px solid var(--line);border-radius:8px;background:var(--input);display:grid;gap:10px;justify-items:start;}
body.client-portal-mode .product-empty-state h3{margin:0;font-family:var(--font-display);font-size:24px;line-height:1.08;}
body.client-portal-mode .client-support-workspace>.client-dashboard-hero{min-height:122px;padding:16px;grid-template-columns:minmax(0,1fr) auto;align-items:center;}
body.client-portal-mode .client-support-workspace>.client-dashboard-hero h1{font-size:clamp(28px,3.6vw,46px);line-height:1;margin:4px 0;}
body.client-portal-mode .client-support-workspace>.client-dashboard-hero .btn.primary{min-height:36px;padding:8px 12px;font-size:12px;}

/* RC-003B: Kaivalya Design System v1 migration for Client Portal */
body.client-portal-mode .client-only-shell[data-client-shell]{
  grid-template-columns:304px minmax(0,1fr);
  background:
    linear-gradient(180deg,rgba(225,191,99,.035),transparent 34%),
    radial-gradient(circle at 96% 6%,rgba(225,191,99,.08),transparent 17%),
    linear-gradient(135deg,var(--bg),var(--bg-2));
}
body.client-portal-mode .client-only-sidebar.sidebar{
  padding:26px 20px;
  gap:22px;
  background:
    radial-gradient(circle at 15% 6%,rgba(225,191,99,.10),transparent 20%),
    linear-gradient(180deg,#052016,#03100b 68%,#020906);
  border-right-color:rgba(225,191,99,.28);
  box-shadow:18px 0 54px rgba(0,0,0,.18);
}
body.client-portal-mode .client-brand-block{
  padding:0 6px 18px;
  gap:16px;
}
body.client-portal-mode .client-brand-block .brand-name{
  color:var(--text);
  font-size:20px;
  text-shadow:0 0 24px rgba(225,191,99,.16);
}
body.client-portal-mode .client-brand-block .brand-sub{
  color:var(--gold-2);
  opacity:.92;
}
body.client-portal-mode .client-step-nav{
  gap:20px;
  margin-top:0;
}
body.client-portal-mode .portal-nav-group{
  gap:7px;
  padding:0 0 18px;
  border-top:0;
  border-bottom:1px solid rgba(225,191,99,.16);
}
body.client-portal-mode .portal-nav-group:last-child{border-bottom:0;}
body.client-portal-mode .portal-nav-group-label{
  color:var(--gold-2);
  opacity:.82;
  letter-spacing:.20em;
  padding:0 10px;
}
body.client-portal-mode .portal-menu-link.nav-btn{
  min-height:50px;
  border:1px solid transparent;
  border-radius:16px;
  padding:12px;
  color:var(--muted);
  grid-template-columns:31px minmax(0,1fr);
}
body.client-portal-mode .portal-menu-link.nav-btn:hover{
  background:rgba(21,75,52,.38);
  border-color:rgba(225,191,99,.12);
  color:var(--text);
}
body.client-portal-mode .portal-menu-link.nav-btn.active{
  position:relative;
  background:linear-gradient(135deg,rgba(15,77,53,.92),rgba(19,91,61,.74));
  border-color:rgba(225,191,99,.50);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 15px 34px rgba(0,0,0,.18);
}
body.client-portal-mode .portal-menu-link.nav-btn.active:after{
  content:"";
  position:absolute;
  right:-1px;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:999px;
  background:var(--gold-2);
  box-shadow:0 0 16px rgba(225,191,99,.65);
}
body.client-portal-mode .portal-nav-glyph{
  width:31px;
  height:31px;
  border-radius:12px;
  border:1px solid rgba(225,191,99,.16);
  background:rgba(225,191,99,.08);
}
body.client-portal-mode .portal-nav-glyph:before,
body.client-portal-mode .portal-nav-glyph:after,
body.client-portal-mode .portal-nav-glyph i{
  background:var(--gold-2);
  border-color:var(--gold-2)!important;
}
body.client-portal-mode .client-membership-card{
  margin-top:auto;
}
body.client-portal-mode .focus-card,
body.client-portal-mode .client-membership-card{
  height:auto!important;
  max-height:none!important;
  min-height:0;
  overflow:visible;
}
body.client-portal-mode .membership-card-title-row{
  position:relative;
  z-index:2;
}
body.client-portal-mode .client-membership-card h3{
  font-size:19px;
  color:var(--gold-2);
}
body.client-portal-mode .client-shell-user{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  border-color:rgba(225,191,99,.22);
  background:rgba(15,77,53,.24);
}
body.client-portal-mode .client-only-main{
  padding:30px 32px;
}
body.client-portal-mode .client-shell-topbar{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  margin-bottom:26px;
  padding-bottom:0;
}
body.client-portal-mode .client-shell-topbar .title-wrap h1{
  font-size:44px;
  color:var(--text);
}
body.client-portal-mode .client-shell-topbar .title-wrap p{
  color:var(--muted);
}
body.client-portal-mode .client-portal-view,
body.client-portal-mode .client-dashboard-shell,
body.client-portal-mode .client-support-workspace,
body.client-portal-mode .product-center-page,
body.client-portal-mode .product-detail-page{
  gap:18px;
}
body.client-portal-mode .client-dashboard-hero.card,
body.client-portal-mode .client-dashboard-card.card,
body.client-portal-mode .product-center-card.card,
body.client-portal-mode .client-placeholder-page.card,
body.client-portal-mode .client-shell-state.card{
  border-radius:var(--radius-lg);
  border-color:rgba(225,191,99,.22);
  background:linear-gradient(145deg,rgba(16,31,24,.98),rgba(13,26,21,.98));
  box-shadow:var(--shadow);
}
body.client-portal-mode .client-dashboard-hero.card{
  padding:18px;
}
body.client-portal-mode .client-dashboard-hero.card.decor:before,
body.client-portal-mode .client-dashboard-card.card.decor:before{
  width:92px;
  height:92px;
  border-color:rgba(225,191,99,.15);
  border-radius:34px;
}
body.client-portal-mode .client-dashboard-v3{
  gap:18px;
}
body.client-portal-mode .client-dashboard-v3-hero{
  min-height:0;
  grid-template-columns:minmax(0,1fr) minmax(280px,.42fr);
  align-items:center;
  border-color:rgba(225,191,99,.38);
  background:linear-gradient(145deg,rgba(15,77,53,.76),rgba(13,26,21,.98));
}
body.client-portal-mode .client-dashboard-v3-hero h1{
  font-size:clamp(34px,4.4vw,58px);
  margin:8px 0;
  max-width:820px;
}
body.client-portal-mode .client-hero-mission-list{
  border:1px solid rgba(225,191,99,.28);
  border-radius:18px;
  background:rgba(6,18,13,.58);
  padding:14px;
  display:grid;
  gap:12px;
}
body.client-portal-mode .client-hero-mission-list ol{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:8px;
  color:var(--text);
  font-size:13px;
  font-weight:750;
  line-height:1.35;
}
body.client-portal-mode .client-hero-mission-list .btn{
  width:100%;
}
body.client-portal-mode .client-dashboard-v3-layout{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
body.client-portal-mode .today-mission-card{
  grid-column:span 2;
  grid-row:span 2;
  min-height:246px;
  border-color:rgba(225,191,99,.38)!important;
  background:linear-gradient(150deg,rgba(15,77,53,.62),rgba(13,26,21,.98))!important;
}
body.client-portal-mode .today-mission-card h3{
  font-size:clamp(28px,3.2vw,44px);
}
body.client-portal-mode .membership-card,
body.client-portal-mode .advisor-guidance-card,
body.client-portal-mode .current-product-section,
body.client-portal-mode .product-progress-card{
  min-height:170px;
}
body.client-portal-mode .recent-activity-card{
  grid-column:span 3;
}
body.client-portal-mode .current-product-card,
body.client-portal-mode .product-resource-item,
body.client-portal-mode .product-progress-step,
body.client-portal-mode .delivery-summary-grid>div,
body.client-portal-mode .license-detail-grid>div{
  border-radius:16px;
  background:rgba(128,128,128,.045);
}
body.client-portal-mode .product-center-grid{
  gap:18px;
}
body.client-portal-mode .product-workspace-card{
  min-height:252px;
  align-content:space-between;
}
body.client-portal-mode .product-action-grid .btn.ghost{
  background:rgba(128,128,128,.045);
}
body.client-portal-mode .product-workspace-detail .client-dashboard-hero{
  grid-template-columns:minmax(0,1fr) minmax(320px,.55fr);
  background:linear-gradient(145deg,rgba(15,77,53,.56),rgba(13,26,21,.98));
}
body.client-portal-mode .support-workspace-grid{
  gap:18px;
}
body.client-portal-mode .client-support-workspace>.client-dashboard-hero{
  min-height:0;
  padding:18px;
  border-color:rgba(225,191,99,.34);
  background:linear-gradient(145deg,rgba(15,77,53,.62),rgba(13,26,21,.98));
}
body.client-portal-mode .client-support-workspace>.client-dashboard-hero h1{
  font-size:clamp(34px,4vw,54px);
  margin:8px 0;
}
body.client-portal-mode .product-empty-state{
  border-radius:18px;
  border-style:dashed;
  background:rgba(128,128,128,.045);
}
@media(max-width:1180px){
  body.client-portal-mode .client-dashboard-v3-layout{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.client-portal-mode .recent-activity-card{grid-column:span 2;}
}
@media(max-width:980px){
  body.client-portal-mode .client-only-shell[data-client-shell]{grid-template-columns:1fr;}
  body.client-portal-mode .client-only-sidebar.sidebar{
    width:min(304px,86vw);
    padding:26px 20px;
  }
  body.client-portal-mode .client-dashboard-v3-hero,
  body.client-portal-mode .product-workspace-detail .client-dashboard-hero{grid-template-columns:1fr;}
  body.client-portal-mode .client-dashboard-v3-layout,
  body.client-portal-mode .product-center-grid,
  body.client-portal-mode .product-detail-grid,
  body.client-portal-mode .support-workspace-grid{grid-template-columns:1fr;}
  body.client-portal-mode .today-mission-card,
  body.client-portal-mode .recent-activity-card,
  body.client-portal-mode .delivery-center-card,
  body.client-portal-mode .license-center-card{grid-column:auto;}
}
@media(max-width:760px){
  body.client-portal-mode .client-only-main{padding:70px 16px 16px;}
  body.client-portal-mode .client-shell-topbar .title-wrap h1{font-size:34px;}
  body.client-portal-mode .client-dashboard-v3-hero h1,
  body.client-portal-mode .client-support-workspace>.client-dashboard-hero h1{font-size:34px;}
}

/* Canonical authenticated shell: Client Portal and Mission Control render inside the shared Admin Overview shell. */
.app-shell{
  display:grid!important;
  grid-template-columns:304px minmax(0,1fr)!important;
  min-height:100vh!important;
}
.app-shell>.sidebar{
  width:auto!important;
}
.app-shell .nav{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:18px!important;
  justify-items:stretch!important;
}
.app-shell .nav-heading{
  display:block!important;
}
.app-shell .nav-btn{
  width:100%!important;
  height:auto!important;
  min-height:48px!important;
  padding:12px!important;
  display:flex!important;
  justify-content:flex-start!important;
  align-items:center!important;
  gap:11px!important;
  border-radius:16px!important;
}
.app-shell .nav-btn span:not(.nav-ico){
  display:inline!important;
}
.app-shell .nav-ico{
  width:31px!important;
  height:31px!important;
  min-width:31px!important;
  margin:0!important;
}
body.client-portal-mode .app-shell,
body.mission-control-mode .app-shell{
  display:grid!important;
  grid-template-columns:304px minmax(0,1fr)!important;
  min-height:100vh!important;
}
body.client-portal-mode .app-shell>.sidebar,
body.mission-control-mode .app-shell>.sidebar{
  display:flex!important;
  position:sticky!important;
  top:0!important;
  height:100vh!important;
  width:auto!important;
}
body.client-portal-mode .app-shell>.main,
body.mission-control-mode .app-shell>.main{
  display:block!important;
  padding:30px 32px!important;
  min-width:0!important;
}
body.client-portal-mode .app-shell>.main>.topbar,
body.mission-control-mode .app-shell>.main>.topbar{
  display:grid!important;
}
body.client-portal-mode #view,
body.mission-control-mode #view{
  padding:0!important;
}
body.client-portal-mode .mobile-appbar,
body.mission-control-mode .mobile-appbar{
  display:none;
}
body.client-portal-mode .client-portal-view,
body.mission-control-mode .mission-control-content{
  display:grid;
  gap:18px;
}
body.mission-control-mode .mission-control-content{grid-template-columns:260px minmax(0,1fr);align-items:start;}
body.mission-control-mode .mission-section-nav{display:grid;gap:8px;align-content:start;position:sticky;top:18px;}
body.mission-control-mode .mission-section-nav h2{font-family:var(--font-display);font-size:28px;line-height:1.08;margin:0;}
body.mission-control-mode .mission-section-nav .mission-nav-link{width:100%;}
body.mission-control-mode .mission-workspace{min-width:0;display:grid;gap:16px;}
body.mission-control-mode .mission-settings-link{margin-top:10px;justify-content:center;}
body.mission-control-mode .mission-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
body.mission-control-mode .mission-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
body.mission-control-mode .mission-action-card{display:grid;gap:9px;text-align:left;align-content:start;min-height:160px;color:var(--text);cursor:pointer;}
body.mission-control-mode .mission-action-card strong{font-size:18px;line-height:1.35;}
body.mission-control-mode .mission-action-card>span:last-child{color:var(--gold);font-size:12px;font-weight:850;text-transform:uppercase;margin-top:auto;}
.email-drip-studio{display:grid;gap:16px;}
.email-drip-campaigns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.email-drip-card{display:grid;gap:14px;align-content:start;}
.email-drip-card textarea{min-height:120px;}
@media(max-width:980px){body.mission-control-mode .mission-control-content{grid-template-columns:1fr;}body.mission-control-mode .mission-section-nav{position:static;}body.mission-control-mode .mission-summary-grid,.email-drip-campaigns{grid-template-columns:1fr 1fr;}}
@media(max-width:640px){body.mission-control-mode .mission-summary-grid,body.mission-control-mode .mission-action-grid,.email-drip-campaigns{grid-template-columns:1fr;}}
body.client-portal-mode .nav{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:18px!important;
  justify-items:stretch!important;
}
body.client-portal-mode .nav-heading{
  display:block!important;
}
body.client-portal-mode .nav-btn{
  width:100%!important;
  height:auto!important;
  min-height:48px!important;
  padding:12px!important;
  display:flex!important;
  justify-content:flex-start!important;
  align-items:center!important;
  gap:11px!important;
  border-radius:16px!important;
}
body.client-portal-mode .nav-btn span:not(.nav-ico){
  display:inline!important;
}
body.client-portal-mode .nav-ico{
  width:31px!important;
  height:31px!important;
  min-width:31px!important;
  margin:0!important;
}
body.client-portal-mode .focus-card{
  display:block!important;
}
body.client-portal-mode .user-card{
  display:flex!important;
}
body.client-portal-mode #quickAddBtn,
body.client-portal-mode #quickAddBtn[hidden]{
  display:none!important;
}
body.client-portal-mode .search-box,
body.client-portal-mode .search-box[hidden]{
  display:none!important;
}
.app-shell .nav-heading,
body.client-portal-mode .nav-heading{
  text-align:left!important;
}
.client-top-account{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  border:1px solid rgba(225,191,99,.22);
  border-radius:16px;
  padding:5px 6px 5px 8px;
  background:rgba(15,77,53,.18);
}
.client-top-account[hidden]{display:none!important;}
.client-top-account .avatar.mini{
  width:30px;
  height:30px;
  min-width:30px;
  border-radius:11px;
  font-size:13px;
}
.client-top-account-copy{
  display:grid;
  gap:1px;
  min-width:110px;
}
.client-top-account-copy strong{
  font-size:12px;
  line-height:1.15;
  color:var(--text);
}
.client-top-account-copy span{
  font-size:11px;
  color:var(--muted);
}
.client-top-account .icon-btn{
  width:32px;
  height:32px;
  min-width:32px;
  border-radius:11px;
  font-size:18px;
}
body.client-portal-mode .theme-toggle,
body.mission-control-mode .theme-toggle{
  height:40px;
  align-items:center;
}
body.client-portal-mode .theme-toggle button,
body.mission-control-mode .theme-toggle button{
  height:32px;
  padding:0 14px;
}
body.client-portal-mode .product-center-card{
  display:grid;
  gap:16px;
}
body.client-portal-mode .product-positioning{
  margin:4px 0 8px;
  color:var(--gold-2);
  font-weight:900;
  letter-spacing:.01em;
}
body.client-portal-mode .product-capability-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
body.client-portal-mode .product-capability-block{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:rgba(128,128,128,.045);
}
body.client-portal-mode .product-capability-block>strong{
  display:block;
  margin-bottom:9px;
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--gold-2);
}
body.client-portal-mode .product-capability-list{
  display:grid;
  gap:7px;
}
body.client-portal-mode .product-capability-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:30px;
}
body.client-portal-mode .product-capability-row>span:first-child{
  color:var(--text);
  font-size:13px;
}
body.client-portal-mode .product-upgrade-note{
  border:1px dashed rgba(225,191,99,.28);
  border-radius:14px;
  padding:10px 12px;
  color:var(--muted);
  font-size:13px;
  background:rgba(225,191,99,.055);
}
@media(max-width:980px){
  body.client-portal-mode .product-capability-grid{grid-template-columns:1fr;}
  .client-top-account{width:100%;justify-content:space-between;}
}
.user-card #logoutBtn{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  display:grid!important;
  place-items:center!important;
}
body.mission-control-mode .mission-section-nav{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px;
}
body.mission-control-mode .mission-nav-link{
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--input);
  color:var(--muted);
  padding:10px 12px;
  min-height:46px;
  display:grid;
  gap:2px;
  text-align:left;
}
body.mission-control-mode .mission-nav-link.active{
  color:var(--text);
  border-color:var(--gold);
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
}
body.client-portal-mode .search-box input:disabled{
  opacity:.68;
  cursor:not-allowed;
}
@media(max-width:980px){
  body.client-portal-mode .app-shell,
  body.mission-control-mode .app-shell{
    grid-template-columns:1fr!important;
  }
  body.client-portal-mode .app-shell>.sidebar,
  body.mission-control-mode .app-shell>.sidebar{
    position:relative!important;
    height:auto!important;
  }
  body.client-portal-mode .app-shell>.main,
  body.mission-control-mode .app-shell>.main{
    padding:18px!important;
  }
}

/* RC-003E: Client Home returns to the pre-overhaul guided content rhythm inside the canonical shell. */
body.client-portal-mode .client-home-baseline{
  display:grid;
  gap:16px;
}
body.client-portal-mode .client-home-hero{
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  padding:18px 20px;
  border-color:rgba(225,191,99,.34);
  background:linear-gradient(145deg,rgba(15,77,53,.58),rgba(13,26,21,.98));
}
body.client-portal-mode .client-home-hero h1{
  font-size:clamp(30px,3.6vw,50px);
  line-height:1;
  margin:5px 0 7px;
}
body.client-portal-mode .client-home-hero p{
  max-width:760px;
  line-height:1.45;
}
body.client-portal-mode .client-home-video{
  display:grid;
  grid-template-columns:minmax(320px,.8fr) minmax(0,1fr);
  align-items:center;
  gap:22px;
  padding:20px;
  border-radius:var(--radius-lg);
  border-color:rgba(225,191,99,.28);
  background:linear-gradient(145deg,rgba(16,31,24,.98),rgba(13,26,21,.98));
  box-shadow:var(--shadow);
}
body.client-portal-mode .client-home-video .video-placeholder{
  min-height:220px;
  height:220px;
  border-radius:18px;
  background:radial-gradient(circle at 45% 35%,rgba(225,191,99,.20),transparent 42%),rgba(5,20,14,.72);
}
body.client-portal-mode .client-home-video h3{
  font-size:clamp(24px,2.4vw,36px);
  line-height:1.05;
  margin:5px 0 8px;
}
body.client-portal-mode .client-home-video .module-points{
  margin:10px 0 12px;
}
body.client-portal-mode .client-home-next-step{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  padding:18px 20px;
  border-color:rgba(225,191,99,.34);
  background:linear-gradient(145deg,rgba(15,77,53,.42),rgba(13,26,21,.98));
}
body.client-portal-mode .client-home-next-step h3{
  font-size:clamp(24px,2.8vw,40px);
  line-height:1.05;
  margin:4px 0 7px;
}
body.client-portal-mode .client-home-grid{
  display:grid;
  grid-template-columns:minmax(0,1.18fr) minmax(280px,.82fr);
  gap:16px;
  align-items:stretch;
}
body.client-portal-mode .client-product-guidance-card,
body.client-portal-mode .client-support-guidance-card{
  min-height:190px;
  align-content:start;
}
body.client-portal-mode .client-home-product-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
body.client-portal-mode .product-capability-grid{
  grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);
  align-items:start;
}
body.client-portal-mode .product-capability-owned{
  border-color:rgba(104,211,145,.28);
  background:linear-gradient(145deg,rgba(15,77,53,.28),rgba(255,255,255,.035));
}
body.client-portal-mode .product-capability-upgrade{
  opacity:.86;
  background:rgba(128,128,128,.035);
}
body.client-portal-mode .product-capability-upgrade>strong{
  color:var(--muted);
}
body.client-portal-mode .product-upgrade-note{
  font-size:12px;
  color:var(--muted);
}
@media(min-width:1200px){
  body.client-portal-mode .client-home-baseline{gap:9px;}
  body.client-portal-mode .client-portal-view .client-home-hero.card{
    gap:11px;
    padding-top:11px;
    padding-bottom:11px;
  }
  body.client-portal-mode .client-portal-view .client-home-video.card{
    gap:13px;
    padding-top:12px !important;
    padding-bottom:12px !important;
  }
  body.client-portal-mode .client-portal-view .client-home-video .video-placeholder,
  body.client-portal-mode .client-portal-view .client-home-video .video-placeholder.course-video{
    min-height:145px !important;
    height:145px !important;
  }
  body.client-portal-mode .client-home-video h3{margin:3px 0 5px;}
  body.client-portal-mode .client-home-video .module-points{margin:6px 0 7px;}
  body.client-portal-mode .client-portal-view .client-home-next-step.card{
    gap:11px;
    padding-top:11px !important;
    padding-bottom:11px !important;
  }
  body.client-portal-mode .client-home-next-step h3{margin:3px 0 4px;}
  body.client-portal-mode .client-home-grid{gap:10px;}
  body.client-portal-mode .client-product-guidance-card,
  body.client-portal-mode .client-support-guidance-card{min-height:138px;}
  body.client-portal-mode .client-home-product-list{gap:7px;}
}
@media(max-width:1180px){
  body.client-portal-mode .client-home-video{grid-template-columns:minmax(280px,.95fr) minmax(0,1fr);}
  body.client-portal-mode .client-home-product-list{grid-template-columns:1fr;}
}
@media(max-width:980px){
  body.client-portal-mode .client-home-hero,
  body.client-portal-mode .client-home-video,
  body.client-portal-mode .client-home-next-step,
  body.client-portal-mode .client-home-grid,
  body.client-portal-mode .product-capability-grid{grid-template-columns:1fr;}
  body.client-portal-mode .client-home-video .video-placeholder{min-height:190px;height:190px;}
  body.client-portal-mode .client-home-next-step .next-step-action{justify-self:start;}
}
@media(max-width:640px){
  body.client-portal-mode .client-home-hero,
  body.client-portal-mode .client-home-video,
  body.client-portal-mode .client-home-next-step{padding:15px;}
  body.client-portal-mode .client-home-video .video-placeholder{min-height:170px;height:170px;}
}
/* RC polish: Support page guided chat layout. Scoped to the Client Portal page only. */
body.client-portal-mode .old-support-clone.support-chat-card{
  width:100% !important;
  max-width:900px !important;
  display:grid !important;
  gap:18px !important;
  padding:18px !important;
  min-height:0 !important;
}

/* Client topbar polish: old-reference icon toggle and no advisor logo. */
body.client-portal-mode #advisorTopBtn{
  display:none !important;
}
body.client-portal-mode .theme-toggle.premium-theme-toggle{
  height:38px !important;
  padding:3px !important;
  border-color:rgba(225,191,99,.36) !important;
  background:rgba(8,18,13,.72) !important;
}
body.client-portal-mode .theme-toggle.premium-theme-toggle button{
  width:48px !important;
  min-width:48px !important;
  height:30px !important;
  min-height:30px !important;
  padding:0 !important;
  border-radius:999px !important;
  font-size:13px !important;
  line-height:1 !important;
}
body.client-portal-mode .theme-toggle.premium-theme-toggle button.active{
  background:linear-gradient(180deg,#e8c965,#c89f3f) !important;
  color:#07130d !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),0 8px 22px rgba(184,137,46,.20) !important;
}
body.client-portal-mode .membership-upgrade-btn{
  position:relative !important;
  z-index:2 !important;
  min-height:28px !important;
  padding:5px 10px !important;
  border-color:rgba(225,191,99,.45) !important;
  background:linear-gradient(180deg,#e8c965,#c89f3f) !important;
  color:#07130d !important;
  font-size:10px !important;
  box-shadow:0 8px 18px rgba(184,137,46,.16) !important;
}
body.client-portal-mode .membership-top-tier-chip{
  position:relative !important;
  z-index:2 !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:5px 10px;
  border:1px solid rgba(225,191,99,.45);
  border-radius:11px;
  background:rgba(225,191,99,.14);
  color:var(--gold-2);
  font-size:10px;
  font-weight:900;
  white-space:nowrap;
}
body.client-portal-mode .old-support-clone .section-head.compact{
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
body.client-portal-mode .old-support-clone .section-head.compact h3{
  font-family:var(--font-display) !important;
  font-size:clamp(28px,3vw,38px) !important;
  line-height:1.02 !important;
  margin:5px 0 8px !important;
}
body.client-portal-mode .old-support-clone .support-open-chat{
  border:1px solid var(--line) !important;
  border-radius:20px !important;
  background:var(--input) !important;
  padding:14px !important;
  display:grid !important;
  grid-template-columns:1fr !important;
  align-items:stretch !important;
  gap:12px !important;
}
body.client-portal-mode .old-support-clone .support-open-chat > *{
  grid-column:1 / -1 !important;
}
body.client-portal-mode .old-support-clone .support-chat-messages{
  max-height:264px !important;
  min-height:78px !important;
  overflow:auto !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}
body.client-portal-mode .old-support-clone .support-open-chat textarea{
  width:100% !important;
  min-height:90px !important;
  border:1px solid var(--line) !important;
  border-radius:18px !important;
  background:rgba(0,0,0,.18) !important;
  color:var(--text) !important;
  padding:14px !important;
  font:inherit !important;
  resize:vertical !important;
}
body.client-portal-mode .old-support-clone .support-send-row{
  display:flex !important;
  justify-content:flex-end !important;
}
body.client-portal-mode .old-support-clone .support-send-row .btn{
  min-width:112px !important;
}
body.client-portal-mode .old-support-clone .support-secondary-row{
  display:flex !important;
  justify-content:flex-start !important;
}
body.client-portal-mode .old-support-clone .support-quick-questions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:center !important;
}

/* My Products: guided ownership layout adapted from the preferred v1 product experience. */
body.client-portal-mode .product-access-details-card{
  border:1px solid var(--line);
  border-radius:20px;
  background:linear-gradient(145deg,rgba(15,77,53,.26),rgba(8,24,16,.72));
  padding:16px;
  display:grid;
  grid-template-columns:minmax(260px,.75fr) minmax(520px,1.25fr) auto;
  gap:16px;
  align-items:end;
}
body.client-portal-mode .product-access-details-card h3,
body.client-portal-mode .product-selector-panel h3,
body.client-portal-mode .product-start-panel h3,
body.client-portal-mode .product-start-card h4,
body.client-portal-mode .product-upgrade-strip h4{
  font-family:var(--font-display);
  margin:4px 0 8px;
}
body.client-portal-mode .product-account-fields{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
body.client-portal-mode .product-account-fields .field{
  margin:0;
}
body.client-portal-mode .product-account-fields .field span{
  display:block;
  color:var(--gold);
  font-size:10px;
  font-weight:950;
  letter-spacing:.14em;
  margin-bottom:7px;
  text-transform:uppercase;
}
body.client-portal-mode .product-account-fields input{
  min-height:42px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(0,0,0,.18);
  color:var(--text);
  padding:10px 12px;
}
body.client-portal-mode .product-account-fields .is-disabled{
  opacity:.58;
}
body.client-portal-mode .product-account-save{
  align-self:end;
  margin:0;
  white-space:nowrap;
}
body.client-portal-mode .my-products-layout{
  display:grid;
  grid-template-columns:minmax(230px,.34fr) minmax(0,1fr);
  gap:14px;
  align-items:start;
}
body.client-portal-mode .product-selector-panel,
body.client-portal-mode .product-detail-panel{
  border:1px solid var(--line);
  border-radius:20px;
  background:rgba(128,128,128,.035);
  padding:14px;
}
body.client-portal-mode .product-selector-list{
  display:grid;
  gap:9px;
  margin-top:12px;
}
body.client-portal-mode .product-selector-item{
  width:100%;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(8,24,16,.62);
  color:var(--text);
  padding:12px;
  display:grid;
  gap:5px;
  text-align:left;
  transition:var(--ease);
}
body.client-portal-mode .product-selector-item:hover,
body.client-portal-mode .product-selector-item.active{
  border-color:rgba(214,174,72,.55);
  background:linear-gradient(135deg,rgba(47,122,87,.32),rgba(200,162,74,.12));
}
body.client-portal-mode .product-selector-item strong{
  font-size:17px;
}
body.client-portal-mode .product-selector-item small{
  color:var(--muted);
  line-height:1.45;
}
body.client-portal-mode .product-start-panel{
  display:grid;
  gap:14px;
}
body.client-portal-mode .product-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
body.client-portal-mode .product-title-row h3{
  font-size:clamp(30px,4vw,50px);
  line-height:.95;
}
body.client-portal-mode .product-platform-badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
body.client-portal-mode .product-platform-pill{
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(0,0,0,.16);
  padding:7px 10px;
  display:inline-flex;
  gap:8px;
  align-items:center;
}
body.client-portal-mode .product-platform-pill strong{
  font-size:12px;
}
body.client-portal-mode .product-platform-pill em{
  color:var(--gold);
  font-size:11px;
  font-style:normal;
  font-weight:950;
}
body.client-portal-mode .product-platform-pill.active{
  border-color:rgba(104,211,145,.36);
  background:rgba(47,122,87,.22);
}
body.client-portal-mode .product-platform-pill.upgrade-path,
body.client-portal-mode .product-platform-pill.auto-tier,
body.client-portal-mode .product-platform-pill.pending-username{
  border-color:rgba(214,174,72,.32);
}
body.client-portal-mode .product-detail-notes{
  display:grid;
  gap:7px;
}
body.client-portal-mode .product-detail-notes p{
  margin:0;
  color:var(--muted);
  line-height:1.5;
}
body.client-portal-mode .product-overview-media{
  display:grid;
  grid-template-columns:minmax(0,3fr) minmax(210px,1fr);
  gap:14px;
  align-items:stretch;
}
body.client-portal-mode .product-overview-video{
  min-width:0;
}
body.client-portal-mode .product-overview-video .training-video-frame{
  height:100%;
}
body.client-portal-mode .product-chart-passes{
  min-width:0;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(8,24,16,.58);
  padding:18px;
}
body.client-portal-mode .product-chart-passes h4{
  font-family:var(--font-display);
  margin:5px 0 14px;
}
body.client-portal-mode .product-chart-passes ol{
  margin:0;
  padding-left:20px;
  display:grid;
  gap:12px;
  color:var(--muted);
}
body.client-portal-mode .product-chart-passes li{
  padding-left:3px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
body.client-portal-mode .product-start-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
body.client-portal-mode .product-start-card,
body.client-portal-mode .product-upgrade-strip{
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(8,24,16,.58);
  padding:14px;
}
body.client-portal-mode .product-inline-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
body.client-portal-mode .product-start-steps{
  margin:10px 0 0;
  padding-left:20px;
  display:grid;
  gap:8px;
  color:var(--muted);
}
body.client-portal-mode .product-start-steps li{
  line-height:1.45;
}
body.client-portal-mode .product-upgrade-strip{
  display:grid;
  grid-template-columns:minmax(0,.85fr) minmax(280px,1fr);
  gap:14px;
  align-items:center;
}
body.client-portal-mode .product-upgrade-strip p{
  margin:0;
  color:var(--muted);
}
body.client-portal-mode .product-upgrade-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
body.client-portal-mode .product-upgrade-pills span{
  border:1px solid rgba(214,174,72,.28);
  border-radius:999px;
  background:rgba(200,162,74,.08);
  color:var(--text);
  padding:7px 10px;
  font-size:12px;
  font-weight:900;
}
@media(max-width:1100px){
  body.client-portal-mode .product-access-details-card,
  body.client-portal-mode .my-products-layout,
  body.client-portal-mode .product-upgrade-strip{
    grid-template-columns:1fr;
  }
  body.client-portal-mode .product-platform-badges,
  body.client-portal-mode .product-upgrade-pills{
    justify-content:flex-start;
  }
}
@media(max-width:760px){
  body.client-portal-mode .old-support-clone .support-send-row,
  body.client-portal-mode .old-support-clone .support-secondary-row{
    justify-content:stretch !important;
  }
  body.client-portal-mode .old-support-clone .support-send-row .btn,
  body.client-portal-mode .old-support-clone .support-secondary-row .btn{
    width:100% !important;
  }
  body.client-portal-mode .product-account-fields,
  body.client-portal-mode .product-start-grid,
  body.client-portal-mode .product-overview-media{
    grid-template-columns:1fr;
  }
}

/* Client Home final density pass: larger welcome video and no lower guidance cards. */
body.client-portal-mode .client-portal-view .client-home-video.card{
  display:grid !important;
  grid-template-columns:minmax(0,3fr) minmax(320px,2fr) !important;
  align-items:center !important;
  gap:20px !important;
  padding:20px !important;
}
body.client-portal-mode .client-portal-view .client-home-video .video-placeholder,
body.client-portal-mode .client-portal-view .client-home-video .video-placeholder.course-video{
  width:100% !important;
  height:300px !important;
  min-height:300px !important;
  padding:24px !important;
}
body.client-portal-mode .client-home-grid{
  display:none !important;
}
@media(max-width:980px){
  body.client-portal-mode .client-portal-view .client-home-video.card{
    grid-template-columns:1fr !important;
  }
  body.client-portal-mode .client-portal-view .client-home-video .video-placeholder,
  body.client-portal-mode .client-portal-view .client-home-video .video-placeholder.course-video{
    height:220px !important;
    min-height:220px !important;
  }
}


/* Client Home compact one-off: keeps canonical shell, removes inherited dashboard spacing. */
body.client-portal-mode .client-home-compact{
  display:grid;
  gap:10px;
  align-self:start;
  align-content:start;
  align-items:start;
  grid-auto-rows:max-content;
  height:auto;
  min-height:0;
}
body.client-portal-mode .client-home-compact .card{
  align-self:start;
  height:auto;
  min-height:0;
}
body.client-portal-mode .client-home-compact-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:center;
  gap:18px;
  padding:20px 22px;
}
body.client-portal-mode .client-home-compact-hero h1{
  font-family:var(--font-display);
  font-size:clamp(32px,4vw,52px);
  line-height:.98;
  margin:5px 0 7px;
}
body.client-portal-mode .client-home-compact-hero p{
  max-width:900px;
  margin:0;
  line-height:1.42;
}
body.client-portal-mode .client-home-compact-video{
  display:grid;
  grid-template-columns:minmax(0,3fr) minmax(320px,2fr);
  align-items:center;
  gap:28px;
  padding:28px 30px;
}
body.client-portal-mode .client-home-compact-video-frame,
body.client-portal-mode .client-home-compact-video .video-placeholder,
body.client-portal-mode .client-home-compact-video .video-placeholder.course-video{
  width:100%;
  height:260px;
  min-height:260px;
  padding:22px;
  border-radius:20px;
}
body.client-portal-mode .client-home-compact-video-copy h3{
  font-family:var(--font-display);
  font-size:clamp(24px,2.4vw,36px);
  line-height:1.05;
  margin:6px 0 8px;
}
body.client-portal-mode .client-home-compact-video-copy p{
  margin:0 0 10px;
  line-height:1.45;
}
body.client-portal-mode .client-home-compact-video-copy .module-points{
  margin:8px 0 13px;
  padding-left:18px;
}
body.client-portal-mode .client-home-compact-video-copy li{
  margin-bottom:3px;
  line-height:1.36;
}
body.client-portal-mode .client-home-advisor-preview{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(280px,1fr);
  gap:28px;
  align-items:stretch;
  padding:28px 30px;
  overflow:hidden;
}
body.client-portal-mode .client-home-advisor-panel{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}
body.client-portal-mode .client-home-advisor-heading{
  display:flex;
  align-items:center;
  gap:14px;
}
body.client-portal-mode .client-home-advisor-heading img{
  width:56px;
  height:56px;
  border:1px solid var(--line);
  border-radius:8px;
  box-shadow:var(--glow);
}
body.client-portal-mode .client-home-advisor-heading h2{
  margin:4px 0 0;
  font-family:var(--font-display);
  font-size:clamp(28px,3vw,42px);
  line-height:1.03;
}
body.client-portal-mode .client-home-advisor-typed{
  position:relative;
  min-height:4.8em;
  max-width:760px;
  margin:18px 0;
  color:var(--text);
  font-size:17px;
  line-height:1.6;
}
body.client-portal-mode .client-home-advisor-typed span:after{
  content:"";
  display:inline-block;
  width:2px;
  height:1em;
  margin-left:4px;
  vertical-align:-2px;
  background:var(--gold);
  animation:advisor-caret .8s steps(1,end) infinite;
}
body.client-portal-mode .client-home-advisor-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
body.client-portal-mode .client-home-advisor-video{
  display:grid;
  align-content:start;
  gap:9px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(0,0,0,.14);
}
body.client-portal-mode .client-home-advisor-video .training-video-frame{
  width:100%;
  min-height:0;
  aspect-ratio:16/9;
  border-radius:6px;
}
body.client-portal-mode .client-home-advisor-video h3,
body.client-portal-mode .client-home-advisor-video p{margin:0;}
@keyframes advisor-caret{50%{opacity:0;}}
@media(prefers-reduced-motion:reduce){body.client-portal-mode .client-home-advisor-typed span:after{animation:none;}}
body.client-portal-mode .client-home-compact-next{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(320px,3fr);
  align-items:center;
  gap:16px;
  padding:18px 20px;
}
body.client-portal-mode .client-home-compact-next h3{
  font-family:var(--font-display);
  font-size:clamp(22px,2.4vw,32px);
  line-height:1.05;
  margin:4px 0 5px;
}
body.client-portal-mode .client-home-compact-next p{
  margin:0;
  line-height:1.38;
}
body.client-portal-mode .client-home-compact-next .next-step-action{
  justify-self:end;
}
body.client-portal-mode .client-home-next-progress .next-step-progress-area{
  display:grid;
  grid-template-columns:auto minmax(160px,1fr) auto;
  align-items:center;
  gap:12px;
}
body.client-portal-mode .client-home-next-progress .next-step-progress-head{
  display:grid;
  gap:1px;
  min-width:76px;
}
body.client-portal-mode .client-home-next-progress .next-step-progress-head strong{
  font-family:var(--font-display);
  font-size:28px;
  line-height:1;
}
body.client-portal-mode .client-home-next-progress .next-step-progress-head span{
  font-size:11px;
  letter-spacing:.13em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:900;
}
body.client-portal-mode .client-auto-progress-card{
  display:grid;
  gap:14px;
  align-content:start;
  padding:18px 20px;
}
body.client-portal-mode .client-auto-progress-card h3{
  margin:4px 0 4px;
}
body.client-portal-mode .client-auto-progress-card .progress-track{
  max-width:520px;
}
body.client-portal-mode .product-selector-first{
  padding-top:0;
}
body.client-portal-mode .product-selector-first .product-selector-list{
  margin-top:0;
}
body.client-portal-mode .client-profile-actions,
.internal-profile-page .client-profile-actions,
body.client-portal-mode .training-leave-actions{
  margin-top:20px;
  justify-content:flex-end;
}

/* Launch polish: softer login surface and consistent client completion/readiness states. */
.platform-auth{
  background:
    radial-gradient(circle at 18% 14%,rgba(225,191,99,.14),transparent 31%),
    radial-gradient(circle at 82% 78%,rgba(47,122,87,.20),transparent 38%),
    linear-gradient(145deg,#04130d,#0b2a1d 54%,#03100b)!important;
}
.platform-auth-card,
body.client-portal-mode .client-login-only-card{
  background:
    radial-gradient(circle at 78% 18%,rgba(225,191,99,.08),transparent 24%),
    linear-gradient(155deg,rgba(9,38,27,.98),rgba(3,20,14,.99))!important;
}
.platform-auth-card{
  padding:48px 58px!important;
  gap:28px!important;
}
.auth-brand-row{
  padding:10px 0 12px;
}
.platform-auth-card h1,
body.client-portal-mode .client-auth-brand.centered h1{
  font-size:clamp(34px,3.95vw,49px)!important;
  line-height:1.02!important;
}
.auth-access-note{display:none!important;}
.auth-help-panel{
  margin-top:4px;
  justify-items:start;
}
.auth-help-panel .spark{
  display:block;
  margin-bottom:2px;
}
.auth-help-panel p{
  max-width:100%;
}
.auth-help-actions{
  justify-content:flex-start;
  width:100%;
}
.client-auth-help-panel{
  margin-top:8px;
}
body.client-portal-mode .client-membership-card{
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  overflow:hidden!important;
  display:grid;
  align-content:start;
  gap:7px;
  box-sizing:border-box;
  padding:14px!important;
  margin-bottom:14px;
  flex-shrink:0;
}
body.client-portal-mode .client-membership-card:after{
  display:none!important;
}
body.client-portal-mode .client-membership-card .focus-progress{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  position:relative;
  z-index:2;
  margin-top:2px;
  font-size:11px;
}
body.client-portal-mode .client-membership-card h3{
  font-size:17px;
  line-height:1.05;
}
body.client-portal-mode .client-membership-card p{
  font-size:12px;
  line-height:1.35;
  margin:0;
}
body.client-portal-mode .app-shell>.sidebar,
body.client-portal-mode .app-shell>.client-only-sidebar.sidebar{
  height:100dvh!important;
  max-height:100dvh!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  gap:14px!important;
}
body.client-portal-mode .app-shell>.sidebar .brand-block,
body.client-portal-mode .app-shell>.client-only-sidebar.sidebar .brand-block{
  flex:0 0 auto;
}
body.client-portal-mode .app-shell>.sidebar .nav,
body.client-portal-mode .app-shell>.client-only-sidebar.sidebar .nav{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden!important;
  align-content:start;
  gap:10px!important;
}
body.client-portal-mode .app-shell>.sidebar .nav-group,
body.client-portal-mode .app-shell>.client-only-sidebar.sidebar .nav-group{
  gap:5px!important;
}
body.client-portal-mode .app-shell>.sidebar .nav-heading,
body.client-portal-mode .app-shell>.client-only-sidebar.sidebar .nav-heading{
  padding:0 8px;
  font-size:9px;
}
body.client-portal-mode .app-shell>.sidebar .nav-btn,
body.client-portal-mode .app-shell>.client-only-sidebar.sidebar .nav-btn{
  min-height:36px!important;
  padding:8px 10px!important;
  gap:9px!important;
}
body.client-portal-mode .app-shell>.sidebar .nav-ico,
body.client-portal-mode .app-shell>.client-only-sidebar.sidebar .nav-ico{
  width:28px;
  height:28px;
  border-radius:11px;
}
body.client-portal-mode .app-shell>.sidebar .client-membership-card,
body.client-portal-mode .app-shell>.client-only-sidebar.sidebar .client-membership-card{
  margin-top:0!important;
  margin-bottom:0!important;
  flex:0 0 auto;
}
body.client-portal-mode .step-complete-row,
body.client-portal-mode .account-step-complete-row{
  align-items:center;
}
body.client-portal-mode .step-complete-btn.is-complete{
  border-color:rgba(85,185,133,.42);
  background:rgba(85,185,133,.14);
  color:var(--green-2);
}
body.client-portal-mode .readiness-overall-card{
  display:grid;
  gap:14px;
}
body.client-portal-mode .shared-client-progress,
body.client-portal-mode .readiness-progress-track{
  height:8px;
  background:rgba(128,128,128,.16);
  border-radius:999px;
  overflow:hidden;
  margin-top:8px;
}
body.client-portal-mode .shared-client-progress span,
body.client-portal-mode .readiness-progress-track span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,var(--green-2),var(--gold));
}
body.client-portal-mode .readiness-card{
  display:grid;
  gap:10px;
  align-content:start;
}
body.client-portal-mode .readiness-card.recommended,
body.client-portal-mode .readiness-card.readiness-complete{
  border-color:rgba(225,191,99,.48);
  background:linear-gradient(145deg,rgba(225,191,99,.14),rgba(47,122,87,.16));
  box-shadow:0 18px 46px rgba(47,122,87,.18),0 0 0 1px rgba(225,191,99,.12);
}
body.client-portal-mode .readiness-continue-btn{
  margin-top:2px;
}
body.client-portal-mode .readiness-card-actions{
  display:flex;
  justify-content:flex-end;
}
body.client-portal-mode .readiness-live-room-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:end;
}
body.client-portal-mode .readiness-action-row{
  display:flex;
  justify-content:flex-end;
}
body.client-portal-mode .readiness-action-btn{
  min-width:132px;
}
@media(max-width:760px){
  body.client-portal-mode .readiness-live-room-card{
    grid-template-columns:1fr;
  }
  body.client-portal-mode .readiness-action-row{
    justify-content:flex-start;
  }
}
@media(max-width:980px){
  body.client-portal-mode .client-home-compact-hero,
  body.client-portal-mode .client-home-compact-video,
  body.client-portal-mode .client-home-compact-next{
    grid-template-columns:1fr;
  }
  body.client-portal-mode .client-home-advisor-preview{grid-template-columns:1fr;}
  body.client-portal-mode .client-home-compact-video-frame,
  body.client-portal-mode .client-home-compact-video .video-placeholder,
  body.client-portal-mode .client-home-compact-video .video-placeholder.course-video{
    height:220px;
    min-height:220px;
  }
  body.client-portal-mode .client-home-compact-next .next-step-action{
    justify-self:start;
  }
  body.client-portal-mode .client-home-next-progress .next-step-progress-area{
    grid-template-columns:1fr;
    justify-items:start;
  }
}
@media(max-width:640px){
  .platform-auth-card{
    padding:30px 18px!important;
    gap:20px!important;
  }
  .auth-brand-row{
    padding:4px 0 6px;
  }
  .platform-auth-card h1,
  body.client-portal-mode .client-auth-brand.centered h1{
    font-size:35px!important;
  }
  body.client-portal-mode .client-home-compact-hero,
  body.client-portal-mode .client-home-compact-video,
  body.client-portal-mode .client-home-compact-next{
    padding:15px;
  }
  body.client-portal-mode .client-home-compact-video-frame,
  body.client-portal-mode .client-home-compact-video .video-placeholder,
  body.client-portal-mode .client-home-compact-video .video-placeholder.course-video{
    height:180px;
    min-height:180px;
  }
}


/* Client Portal Upgrade page: scoped membership comparison view. */
body.client-portal-mode .client-upgrade-page{
  display:grid;
  gap:16px;
}
body.client-portal-mode .client-upgrade-intro{
  max-width:760px;
  padding:0 4px 2px;
}
body.client-portal-mode .client-upgrade-intro h3,
body.client-portal-mode .upgrade-training-card h3,
body.client-portal-mode .upgrade-plan-card h3{
  font-family:var(--font-display);
  line-height:1.04;
  margin:6px 0 8px;
}
body.client-portal-mode .client-upgrade-intro h3{
  font-size:clamp(24px,2.6vw,34px);
}
body.client-portal-mode .upgrade-plan-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  align-items:stretch;
}
body.client-portal-mode .upgrade-plan-card{
  display:grid;
  grid-template-rows:auto 1fr auto;
  gap:16px;
  min-height:360px;
  border-color:rgba(225,191,99,.22);
}
body.client-portal-mode .upgrade-plan-card.current{
  border-color:rgba(104,211,145,.38);
  background:linear-gradient(145deg,rgba(15,77,53,.34),rgba(13,26,21,.98));
}
body.client-portal-mode .upgrade-plan-card.recommended{
  border-color:rgba(225,191,99,.58);
  background:
    radial-gradient(circle at 78% 12%,rgba(225,191,99,.18),transparent 28%),
    linear-gradient(145deg,rgba(20,89,58,.50),rgba(13,26,21,.98));
  box-shadow:0 0 0 1px rgba(225,191,99,.14),0 20px 60px rgba(20,89,58,.18);
}
body.client-portal-mode .upgrade-plan-card.recommended .spark{
  color:var(--gold);
}
body.client-portal-mode .upgrade-plan-card h3{
  font-size:clamp(28px,3vw,42px);
}
body.client-portal-mode .upgrade-feature-list{
  display:grid;
  gap:9px;
  margin:0;
  padding-left:18px;
  color:var(--muted);
}
body.client-portal-mode .upgrade-feature-list li{
  line-height:1.4;
}
body.client-portal-mode .upgrade-training-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  border-color:rgba(225,191,99,.28);
  background:linear-gradient(145deg,rgba(200,162,74,.10),rgba(13,26,21,.98));
}
body.client-portal-mode .upgrade-training-card h3{
  font-size:clamp(26px,3vw,40px);
}
body.client-portal-mode .upgrade-training-booking-btn{
  min-width:190px;
  min-height:56px;
  padding:15px 24px;
  font-size:15px;
  white-space:nowrap;
}
@media(max-width:1100px){
  body.client-portal-mode .upgrade-plan-grid{grid-template-columns:1fr;}
  body.client-portal-mode .upgrade-plan-card{min-height:0;}
}
@media(max-width:760px){
  body.client-portal-mode .upgrade-training-card{grid-template-columns:1fr;}
  body.client-portal-mode .upgrade-training-booking-btn{width:100%;}
}

@media(max-width:980px){
  body.client-portal-mode .app-shell>.client-only-sidebar.sidebar{
    position:fixed!important;
    left:0!important;
    top:0!important;
    bottom:0!important;
    width:min(300px,86vw)!important;
    height:100vh!important;
    z-index:170!important;
    transform:translateX(-105%)!important;
    transition:transform var(--ease)!important;
  }
  body.client-portal-mode.client-mobile-nav-open .app-shell>.client-only-sidebar.sidebar{
    transform:translateX(0)!important;
  }
  body.client-portal-mode .app-shell>.client-only-main.main{
    padding:70px 16px 16px!important;
  }
}

/* Light mode contrast repair: dark Client Portal cards keep readable foregrounds. */
html[data-theme="light"] body.client-portal-mode :is(
  .client-dashboard-hero.card,
  .client-dashboard-card.card,
  .client-placeholder-page.card,
  .client-shell-state.card,
  .client-membership-card,
  .client-home-compact .card,
  .product-center-page.card,
  .product-detail-page .card,
  .product-access-details-card,
  .product-selector-panel,
  .product-detail-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .support-chat-card,
  .client-profile-hero.card,
  .client-profile-card.card,
  .upgrade-plan-card.card,
  .upgrade-training-card.card,
  .journey-intro,
  .portal-course-side,
  .portal-course-main.card,
  .portal-course-main .card,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .client-video-intro,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card
){
  color:#f8f1df;
}
html[data-theme="light"] body.client-portal-mode :is(
  .client-dashboard-hero.card,
  .client-dashboard-card.card,
  .client-placeholder-page.card,
  .client-shell-state.card,
  .client-membership-card,
  .client-home-compact .card,
  .product-center-page.card,
  .product-detail-page .card,
  .product-access-details-card,
  .product-selector-panel,
  .product-detail-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .support-chat-card,
  .client-profile-hero.card,
  .client-profile-card.card,
  .upgrade-plan-card.card,
  .upgrade-training-card.card,
  .journey-intro,
  .portal-course-side,
  .portal-course-main.card,
  .portal-course-main .card,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .client-video-intro,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card
) :is(h1,h2,h3,h4,h5,h6,strong){
  color:#fff7e8;
}
html[data-theme="light"] body.client-portal-mode :is(
  .client-dashboard-hero.card,
  .client-dashboard-card.card,
  .client-placeholder-page.card,
  .client-shell-state.card,
  .client-membership-card,
  .client-home-compact .card,
  .product-center-page.card,
  .product-detail-page .card,
  .product-access-details-card,
  .product-selector-panel,
  .product-detail-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .support-chat-card,
  .client-profile-hero.card,
  .client-profile-card.card,
  .upgrade-plan-card.card,
  .upgrade-training-card.card,
  .journey-intro,
  .portal-course-side,
  .portal-course-main.card,
  .portal-course-main .card,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .client-video-intro,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card
) :is(p,li,small,span,em,.muted,.micro,dd){
  color:#c9d8c8;
}
html[data-theme="light"] body.client-portal-mode :is(
  .client-dashboard-hero.card,
  .client-dashboard-card.card,
  .client-placeholder-page.card,
  .client-shell-state.card,
  .client-membership-card,
  .client-home-compact .card,
  .product-center-page.card,
  .product-detail-page .card,
  .product-access-details-card,
  .product-selector-panel,
  .product-detail-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .support-chat-card,
  .client-profile-hero.card,
  .client-profile-card.card,
  .upgrade-plan-card.card,
  .upgrade-training-card.card,
  .journey-intro,
  .portal-course-side,
  .portal-course-main.card,
  .portal-course-main .card,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .client-video-intro,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card
) :is(.spark,.focus-kicker,label span,.field span,dt){
  color:var(--gold-2);
}
html[data-theme="light"] body.client-portal-mode :is(
  .product-access-details-card,
  .product-center-page.card,
  .product-detail-page .card,
  .support-chat-card,
  .client-profile-card.card
) :is(input,textarea,select){
  background:rgba(4,18,12,.72);
  border-color:rgba(225,191,99,.30);
  color:#fff7e8;
}
html[data-theme="light"] body.client-portal-mode :is(
  .product-access-details-card,
  .product-center-page.card,
  .product-detail-page .card,
  .support-chat-card,
  .client-profile-card.card
) :is(input,textarea)::placeholder{
  color:#9fb5a6;
}

/* Light mode final contrast pass: keep shell light, make content panels clearly dark. */
html[data-theme="light"] body.client-portal-mode :is(
  .client-dashboard-hero.card,
  .client-dashboard-card.card,
  .client-placeholder-page.card,
  .client-shell-state.card,
  .client-home-compact .card,
  .product-center-page.card,
  .product-detail-page .card,
  .product-access-details-card,
  .product-selector-panel,
  .product-detail-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .product-reference-image-card,
  .support-chat-card,
  .client-profile-hero.card,
  .client-profile-card.card,
  .upgrade-plan-card.card,
  .upgrade-training-card.card,
  .journey-intro,
  .portal-course-side,
  .portal-course-main.card,
  .portal-course-main .card,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .client-video-intro,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card
){
  background:
    radial-gradient(circle at 82% 8%, rgba(225,191,99,.10), transparent 24%),
    linear-gradient(145deg, #10261d, #07150f) !important;
  border-color:rgba(133,104,42,.42) !important;
  box-shadow:0 18px 48px rgba(22,42,31,.18) !important;
}
html[data-theme="light"] body.client-portal-mode .client-membership-card{
  background:
    radial-gradient(circle at 84% 18%, rgba(225,191,99,.16), transparent 28%),
    linear-gradient(145deg, #286244, #173828) !important;
  color:#fff7e8;
  border-color:rgba(133,104,42,.48) !important;
}
html[data-theme="light"] body.client-portal-mode :is(
  .client-home-compact-video-frame,
  .client-home-compact-video .video-placeholder,
  .client-home-compact-video .video-placeholder.course-video,
  .portal-video-module .video-placeholder,
  .portal-video-module .video-placeholder.course-video
){
  background:rgba(4,18,12,.50) !important;
  border-color:rgba(225,191,99,.28) !important;
  color:#fff7e8 !important;
}
html[data-theme="light"] body.client-portal-mode :is(
  .client-dashboard-hero.card,
  .client-dashboard-card.card,
  .client-placeholder-page.card,
  .client-shell-state.card,
  .client-membership-card,
  .client-home-compact .card,
  .product-center-page.card,
  .product-detail-page .card,
  .product-access-details-card,
  .product-selector-panel,
  .product-detail-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .support-chat-card,
  .client-profile-hero.card,
  .client-profile-card.card,
  .upgrade-plan-card.card,
  .upgrade-training-card.card,
  .journey-intro,
  .portal-course-side,
  .portal-course-main.card,
  .portal-course-main .card,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .client-video-intro,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card
) :is(h1,h2,h3,h4,h5,h6,strong){
  color:#fff8e9 !important;
  text-shadow:0 1px 0 rgba(0,0,0,.18);
}
html[data-theme="light"] body.client-portal-mode :is(
  .client-dashboard-hero.card,
  .client-dashboard-card.card,
  .client-placeholder-page.card,
  .client-shell-state.card,
  .client-membership-card,
  .client-home-compact .card,
  .product-center-page.card,
  .product-detail-page .card,
  .product-access-details-card,
  .product-selector-panel,
  .product-detail-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .support-chat-card,
  .client-profile-hero.card,
  .client-profile-card.card,
  .upgrade-plan-card.card,
  .upgrade-training-card.card,
  .journey-intro,
  .portal-course-side,
  .portal-course-main.card,
  .portal-course-main .card,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .client-video-intro,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card
) :is(p,li,small,span,em,.muted,.micro,dd){
  color:#cfe2d1 !important;
}
html[data-theme="light"] body.client-portal-mode :is(
  .client-dashboard-hero.card,
  .client-dashboard-card.card,
  .client-placeholder-page.card,
  .client-shell-state.card,
  .client-membership-card,
  .client-home-compact .card,
  .product-center-page.card,
  .product-detail-page .card,
  .product-access-details-card,
  .product-selector-panel,
  .product-detail-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .support-chat-card,
  .client-profile-hero.card,
  .client-profile-card.card,
  .upgrade-plan-card.card,
  .upgrade-training-card.card,
  .journey-intro,
  .portal-course-side,
  .portal-course-main.card,
  .portal-course-main .card,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .client-video-intro,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card
) :is(.spark,.focus-kicker,label span,.field span,dt){
  color:#e7bf55 !important;
}
html[data-theme="light"] body.client-portal-mode .progress-track{
  background:rgba(255,248,233,.18);
}
html[data-theme="light"] body.client-portal-mode .btn.ghost{
  background:#fffaf0;
  color:#10261d;
  border-color:rgba(133,104,42,.30);
}

/* Light mode sweep: every Client Portal content card uses the readable dark panel surface. */
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(
  .card,
  .journey-intro,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .support-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card,
  .learning-lesson-row,
  .learning-assignment-detail-grid > div,
  .dashboard-identity-grid > div,
  .dashboard-product-pill
){
  background:
    radial-gradient(circle at 82% 8%, rgba(225,191,99,.10), transparent 24%),
    linear-gradient(145deg,#10261d,#07150f) !important;
  border-color:rgba(133,104,42,.42) !important;
  color:#f8f1df !important;
  box-shadow:0 18px 48px rgba(22,42,31,.18) !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(
  .card,
  .journey-intro,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .support-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card,
  .learning-lesson-row,
  .learning-assignment-detail-grid > div,
  .dashboard-identity-grid > div,
  .dashboard-product-pill
) :is(h1,h2,h3,h4,h5,h6,strong){
  color:#fff8e9 !important;
  text-shadow:0 1px 0 rgba(0,0,0,.18);
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(
  .card,
  .journey-intro,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .support-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card,
  .learning-lesson-row,
  .learning-assignment-detail-grid > div,
  .dashboard-identity-grid > div,
  .dashboard-product-pill
) :is(p,li,small,span,em,.muted,.micro,dd){
  color:#cfe2d1 !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(
  .card,
  .journey-intro,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .support-panel,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card,
  .learning-lesson-row,
  .learning-assignment-detail-grid > div,
  .dashboard-identity-grid > div,
  .dashboard-product-pill
) :is(.spark,.focus-kicker,label span,.field span,dt){
  color:#e7bf55 !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(
  input,
  textarea,
  select,
  .step-pill,
  .portal-course-map button,
  .quiz-option
){
  background:rgba(4,18,12,.66) !important;
  border-color:rgba(225,191,99,.26) !important;
  color:#f8f1df !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(input,textarea)::placeholder{
  color:#9fb5a6 !important;
}

/* Client Portal light theme: all content surfaces use the shared light palette. */
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(
  .card,
  .journey-intro,
  .portal-video-module,
  .lesson-panel,
  .portal-quiz,
  .portal-check-item,
  .portal-why-check-item,
  .readiness-card,
  .portal-review-card,
  .archetype-card,
  .support-panel,
  .product-selector-panel,
  .product-detail-panel,
  .product-access-details-card,
  .product-reference-image-card,
  .product-selector-item,
  .product-start-card,
  .product-upgrade-strip,
  .client-next-step-card,
  .portal-payment-card,
  .payment-mini-card,
  .learning-lesson-row,
  .learning-assignment-detail-grid > div,
  .dashboard-identity-grid > div,
  .dashboard-product-pill
){
  background:linear-gradient(145deg,var(--panel),var(--panel-2)) !important;
  border-color:var(--line-strong) !important;
  color:var(--text) !important;
  box-shadow:0 18px 48px rgba(22,42,31,.09) !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(
  .card,.journey-intro,.portal-video-module,.lesson-panel,.portal-quiz,
  .portal-check-item,.portal-why-check-item,.readiness-card,.portal-review-card,
  .archetype-card,.support-panel,.product-selector-panel,.product-detail-panel,.product-access-details-card,.product-reference-image-card,
  .product-selector-item,.product-start-card,.product-upgrade-strip,
  .client-next-step-card,.portal-payment-card,.payment-mini-card,
  .learning-lesson-row,.learning-assignment-detail-grid > div,
  .dashboard-identity-grid > div,.dashboard-product-pill
) :is(h1,h2,h3,h4,h5,h6,strong){
  color:var(--text) !important;
  text-shadow:none !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(
  .card,.journey-intro,.portal-video-module,.lesson-panel,.portal-quiz,
  .portal-check-item,.portal-why-check-item,.readiness-card,.portal-review-card,
  .archetype-card,.support-panel,.product-selector-panel,.product-detail-panel,.product-access-details-card,.product-reference-image-card,
  .product-selector-item,.product-start-card,.product-upgrade-strip,
  .client-next-step-card,.portal-payment-card,.payment-mini-card,
  .learning-lesson-row,.learning-assignment-detail-grid > div,
  .dashboard-identity-grid > div,.dashboard-product-pill
) :is(p,li,small,span,em,.muted,.micro,dd){
  color:var(--muted) !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(
  .card,.journey-intro,.portal-video-module,.lesson-panel,.portal-quiz,
  .portal-check-item,.portal-why-check-item,.readiness-card,.portal-review-card,
  .archetype-card,.support-panel,.product-selector-panel,.product-detail-panel,.product-access-details-card,.product-reference-image-card,
  .product-selector-item,.product-start-card,.product-upgrade-strip,
  .client-next-step-card,.portal-payment-card,.payment-mini-card,
  .learning-lesson-row,.learning-assignment-detail-grid > div,
  .dashboard-identity-grid > div,.dashboard-product-pill
) :is(.spark,.focus-kicker,label span,.field span,dt){
  color:var(--gold) !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(input,textarea,select,.step-pill,.portal-course-map button,.quiz-option,.quick-question-chip){
  background:var(--bg-2) !important;
  border-color:var(--line-strong) !important;
  color:var(--text) !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(input,textarea)::placeholder{
  color:var(--muted) !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view :is(.portal-quiz,.quiz-question,.support-chat-messages,.support-open-chat){
  border-color:var(--line) !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view .support-chat-messages .advisor-msg.assistant{
  background:var(--bg-2) !important;
  border-color:var(--line-strong) !important;
  color:var(--text) !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view .upgrade-plan-card.current{
  background:linear-gradient(145deg,#eef7ef,#e0eee2) !important;
  border-color:rgba(30,113,76,.42) !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view .upgrade-plan-card.recommended{
  background:linear-gradient(145deg,#fff8e8,#f3ead5) !important;
  border-color:rgba(184,137,46,.54) !important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view .upgrade-plan-card.included{
  box-shadow:none !important;
}

/* Launch breakpoint repair: keep the canonical shell usable below wide desktop. */
@media(min-width:981px) and (max-width:1199px){
  body.client-portal-mode .app-shell{
    grid-template-columns:244px minmax(0,1fr)!important;
  }
  body.client-portal-mode .app-shell>.sidebar,
  body.client-portal-mode .app-shell>.client-only-sidebar.sidebar{
    padding:16px 12px!important;
    gap:12px!important;
  }
  body.client-portal-mode .client-pro-shell .client-step-nav,
  body.client-portal-mode .nav{
    gap:10px!important;
  }
  body.client-portal-mode .nav-btn{
    min-height:42px!important;
    padding:9px 10px!important;
  }
  body.client-portal-mode .focus-card,
  body.client-portal-mode .client-membership-card{
    padding:13px!important;
  }
  body.client-portal-mode .app-shell>.main,
  body.client-portal-mode .app-shell>.client-only-main.main{
    padding:18px!important;
  }
  body.client-portal-mode .client-shell-topbar{
    align-items:flex-start!important;
    gap:12px!important;
    margin-bottom:14px!important;
  }
  body.client-portal-mode .client-shell-actions{
    flex-wrap:wrap!important;
    justify-content:flex-end!important;
    gap:8px!important;
  }
  body.client-portal-mode .my-products-layout{
    grid-template-columns:1fr!important;
  }
  body.client-portal-mode .product-selector-panel{
    position:static!important;
  }
  body.client-portal-mode .product-selector-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:980px){
  body.client-portal-mode{
    padding-top:0!important;
  }
  body.client-portal-mode .mobile-appbar{
    display:flex!important;
  }
  body.client-portal-mode .app-shell{
    display:block!important;
    min-height:100vh!important;
  }
  body.client-portal-mode .app-shell>.sidebar,
  body.client-portal-mode .app-shell>.client-only-sidebar.sidebar{
    position:fixed!important;
    left:0!important;
    top:0!important;
    bottom:0!important;
    height:100vh!important;
    width:min(300px,86vw)!important;
    transform:translateX(-105%)!important;
  }
  body.client-portal-mode.client-mobile-nav-open .app-shell>.sidebar,
  body.client-portal-mode.mobile-nav-open .app-shell>.sidebar,
  body.client-portal-mode.client-mobile-nav-open .app-shell>.client-only-sidebar.sidebar,
  body.client-portal-mode.mobile-nav-open .app-shell>.client-only-sidebar.sidebar{
    transform:translateX(0)!important;
  }
  body.client-portal-mode .app-shell>.main,
  body.client-portal-mode .app-shell>.client-only-main.main{
    padding:70px 16px 16px!important;
  }
  body.client-portal-mode .client-shell-topbar{
    margin-bottom:12px!important;
  }
  body.client-portal-mode .client-shell-actions{
    flex-wrap:wrap!important;
    justify-content:flex-start!important;
    gap:8px!important;
  }
  body.client-portal-mode .client-top-account{
    width:auto!important;
    max-width:100%!important;
  }
  body.client-portal-mode .my-products-layout,
  body.client-portal-mode .product-center-grid,
  body.client-portal-mode .product-detail-grid,
  body.client-portal-mode .product-platform-grid{
    grid-template-columns:1fr!important;
  }
  body.client-portal-mode .product-selector-panel{
    position:static!important;
  }
  body.client-portal-mode .product-selector-list{
    grid-template-columns:1fr!important;
  }
  body.client-portal-mode .product-reference-image img{
    max-width:100%!important;
  }
}

@media(max-width:767px){
  body.client-portal-mode .app-shell>.main,
  body.client-portal-mode .app-shell>.client-only-main.main{
    padding:66px 12px 14px!important;
  }
  body.client-portal-mode .client-shell-topbar{
    gap:8px!important;
  }
  body.client-portal-mode .client-shell-topbar .title-wrap h1{
    font-size:30px!important;
  }
  body.client-portal-mode .client-shell-topbar .title-wrap p{
    font-size:13px!important;
  }
  body.client-portal-mode .client-shell-actions{
    align-items:center!important;
  }
  body.client-portal-mode .client-top-account-copy{
    min-width:0!important;
  }
  body.client-portal-mode .client-top-account{
    flex:0 1 auto!important;
    max-width:min(100%, 230px)!important;
  }
  body.client-portal-mode .theme-toggle.premium-theme-toggle{
    width:auto!important;
  }
  body.client-portal-mode .theme-toggle.premium-theme-toggle button{
    min-width:44px!important;
    padding:0 10px!important;
  }
  body.client-portal-mode .product-workspace-page.card,
  body.client-portal-mode .client-dashboard-card,
  body.client-portal-mode .product-selector-panel{
    padding:14px!important;
  }
}

body.auth-required{
  padding-top:0!important;
}
body.auth-required .mobile-appbar{
  display:none!important;
}

/* Client profile control and profile page */
body.client-portal-mode .client-top-identity{
  display:grid;
  gap:1px;
  min-width:128px;
  padding:0 4px;
  border:0;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
body.client-portal-mode .client-top-identity:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:4px;
  border-radius:10px;
}
body.client-portal-mode .client-logout-btn span{
  display:block;
  transform:translateX(1px);
  font-size:15px;
  line-height:1;
}
body.client-portal-mode .client-profile-page,
.internal-profile-page{
  display:grid;
  gap:14px;
}
body.client-portal-mode .client-profile-hero,
body.client-portal-mode .client-profile-card,
.internal-profile-page .client-profile-hero,
.internal-profile-page .client-profile-card{
  padding:18px;
}
body.client-portal-mode .client-profile-hero,
.internal-profile-page .client-profile-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}
body.client-portal-mode .client-profile-hero h3,
body.client-portal-mode .client-profile-card h3,
.internal-profile-page .client-profile-hero h3,
.internal-profile-page .client-profile-card h3{
  margin:4px 0 6px;
}
body.client-portal-mode .client-profile-grid,
.internal-profile-page .client-profile-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
body.client-portal-mode .client-profile-grid .field:nth-child(3),
body.client-portal-mode .client-profile-grid .field:nth-child(4),
body.client-portal-mode .client-profile-grid .field:nth-child(5),
.client-profile-grid .field.wide{
  grid-column:1/-1;
}
#profilePasswordForm .field{
  grid-column:1/-1;
}
.client-profile-actions{
  display:flex;
  justify-content:flex-end;
}
.field-helper{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
  font-weight:400;
  letter-spacing:0;
  text-transform:none;
}
body.client-portal-mode .daily-prep-page{
  display:grid;
  gap:14px;
}
body.client-portal-mode .daily-prep-hero,
body.client-portal-mode .daily-prep-form-card{
  padding:18px;
}
body.client-portal-mode .daily-prep-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}
body.client-portal-mode .daily-prep-hero h3,
body.client-portal-mode .daily-prep-form-card h3{
  margin:4px 0 6px;
}
body.client-portal-mode .daily-prep-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
body.client-portal-mode .daily-prep-grid .field:nth-child(5){
  grid-column:1/-1;
}
body.client-portal-mode .daily-prep-ready{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.04);
}
body.client-portal-mode .daily-prep-actions{
  justify-content:flex-end;
  margin-top:16px;
}
@media(max-width:767px){
  body.client-portal-mode .client-profile-hero{
    display:grid;
  }
  .internal-profile-page .client-profile-hero{
    display:grid;
  }
  body.client-portal-mode .client-profile-grid,
  .internal-profile-page .client-profile-grid{
    grid-template-columns:1fr;
  }
  body.client-portal-mode .daily-prep-hero{
    display:grid;
  }
  body.client-portal-mode .daily-prep-grid{
    grid-template-columns:1fr;
  }
}

/* Signed-out override: authenticated shell never appears beneath the login screen. */
body.auth-required .app-shell,
body.auth-required .mobile-appbar,
body.auth-required .sidebar,
body.auth-required .main{display:none!important;}
body.auth-required #authRoot{display:block!important;}

/* Client launch polish: focused corrections for login, readiness, products, and training modals. */
.platform-auth-card h1,
body.client-portal-mode .client-auth-brand.centered h1{
  margin:18px auto 20px!important;
  font-weight:600!important;
}
.auth-form-card{
  padding:20px!important;
  border:1px solid rgba(225,191,99,.22)!important;
  border-radius:20px!important;
  background:
    radial-gradient(circle at 84% 16%,rgba(225,191,99,.08),transparent 26%),
    linear-gradient(145deg,rgba(8,35,24,.94),rgba(5,22,15,.98))!important;
}
.auth-help-panel{
  grid-template-columns:minmax(0,7fr) minmax(132px,3fr)!important;
  align-items:center!important;
  column-gap:18px!important;
}
.auth-help-panel .spark,
.auth-help-panel p{
  grid-column:1!important;
}
.auth-help-actions{
  grid-column:2!important;
  grid-row:1 / span 2!important;
  justify-content:flex-end!important;
}
.auth-help-actions button{
  white-space:nowrap;
}
.modal{
  width:min(680px,calc(100vw - 36px))!important;
}
body.client-portal-mode .product-selector-first{
  padding-top:18px!important;
}
body.client-portal-mode .product-selector-first .product-selector-list{
  margin-top:0!important;
}
.quiz-option{
  font-weight:400!important;
}
body.client-portal-mode .readiness-state-chip{
  border:1px solid rgba(225,191,99,.42);
  border-radius:999px;
  padding:8px 13px;
  justify-self:end;
  font-size:12px;
  font-weight:950;
  background:rgba(225,191,99,.12);
  color:var(--gold);
}
body.client-portal-mode .readiness-state-chip.in-progress{
  background:linear-gradient(135deg,var(--gold),var(--gold-2));
  color:#102016;
  box-shadow:0 8px 22px rgba(225,191,99,.22);
}
body.client-portal-mode .readiness-state-chip.complete{
  background:linear-gradient(135deg,var(--green),var(--green-2));
  color:#fff;
  border-color:rgba(85,185,133,.42);
}
body.client-portal-mode .client-progress-bar{
  height:8px!important;
  border:0!important;
  padding:0!important;
  background:rgba(128,128,128,.16)!important;
  box-shadow:none!important;
}
body.client-portal-mode .client-progress-bar span{
  background:linear-gradient(90deg,var(--green-2),var(--gold))!important;
}
body.client-portal-mode .client-home-next-progress .next-step-progress-area{
  gap:14px 26px!important;
}
body.client-portal-mode .client-home-next-progress .next-step-progress-area .btn{
  margin-left:10px;
}
body.client-portal-mode .readiness-card-actions{
  border:0!important;
  background:transparent!important;
  padding:0!important;
  box-shadow:none!important;
}
body.client-portal-mode .daily-prep-form-card{
  display:grid;
  gap:16px;
}
body.client-portal-mode .daily-prep-grid{
  gap:16px 14px;
  align-items:start;
}
body.client-portal-mode .daily-prep-grid .field{
  display:grid;
  gap:8px;
  align-content:start;
}
body.client-portal-mode .daily-prep-grid .field:nth-child(5){
  grid-column:auto;
}
body.client-portal-mode .daily-prep-grid .field:nth-child(6),
body.client-portal-mode .daily-prep-grid .field:nth-child(7){
  grid-column:1/-1;
}
body.client-portal-mode .daily-prep-grid textarea{
  min-height:92px;
}
body.client-portal-mode .ready-toggle-btn{
  justify-self:start;
  border:1px solid rgba(225,191,99,.36);
  border-radius:999px;
  padding:11px 16px;
  background:rgba(225,191,99,.10);
  color:var(--gold);
  font-weight:950;
  cursor:pointer;
}
body.client-portal-mode .ready-toggle-btn.active{
  background:linear-gradient(135deg,var(--gold),var(--gold-2));
  color:#102016;
  box-shadow:0 10px 28px rgba(225,191,99,.22);
}
body.client-portal-mode .daily-prep-saved{
  display:grid;
  gap:12px;
}
body.client-portal-mode .daily-prep-week-archive{
  display:grid;
  gap:10px;
}
body.client-portal-mode .daily-prep-analysis-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
body.client-portal-mode .daily-prep-analysis-card{
  text-align:left;
  display:grid;
  gap:7px;
  cursor:pointer;
  color:var(--cream)!important;
}
body.client-portal-mode .daily-prep-analysis-card strong{
  font-family:var(--font-display);
  font-size:20px;
  line-height:1.08;
  color:var(--cream)!important;
}
body.client-portal-mode .daily-prep-analysis-card small{
  color:var(--muted);
}
body.client-portal-mode .daily-prep-choice-pills{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
body.client-portal-mode .daily-prep-choice-pill{
  display:inline-flex;
  align-items:center;
  gap:5px;
  width:max-content;
  max-width:100%;
  border:1px solid rgba(225,191,99,.34);
  border-radius:999px;
  padding:5px 8px;
  color:var(--muted);
  font-size:11px;
  line-height:1.1;
}
body.client-portal-mode .daily-prep-choice-pill strong{
  font-family:var(--font-body);
  font-size:10px;
  color:var(--gold);
  letter-spacing:.08em;
  text-transform:uppercase;
}
.daily-prep-edit-modal{
  display:grid;
  gap:16px;
}
.daily-prep-edit-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.daily-prep-edit-grid .field{
  display:grid;
  gap:8px;
}
.daily-prep-edit-grid .field:nth-child(6),
.daily-prep-edit-grid .field:nth-child(7){
  grid-column:1/-1;
}
.daily-prep-modal-actions{
  justify-content:flex-end;
}
@media(max-width:640px){
  .platform-auth-card h1,
  body.client-portal-mode .client-auth-brand.centered h1{
    margin:12px auto 14px!important;
  }
  .auth-form-card{
    padding:16px!important;
  }
  .auth-help-panel{
    grid-template-columns:1fr!important;
  }
  .auth-help-actions{
    grid-column:1!important;
    grid-row:auto!important;
    justify-content:flex-start!important;
  }
  body.client-portal-mode .daily-prep-analysis-list,
  .daily-prep-edit-grid{
    grid-template-columns:1fr;
  }
}

/* Advisor containment repair: keep admin/sales/manager advisor content inside the drawer. */
.kgc-advisor-window{
  width:min(560px, calc(100vw - 32px)) !important;
  max-width:calc(100vw - 32px) !important;
  height:min(78dvh, 720px) !important;
  max-height:min(78dvh, 720px) !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}
.kgc-advisor-header{
  flex:0 0 auto !important;
}
.kgc-advisor-history,
.kgc-advisor-messages,
.kgc-advisor-form,
.kgc-advisor-thread-list{
  min-width:0 !important;
  max-width:100% !important;
  overflow-x:hidden !important;
}
.kgc-advisor-title .spark{
  text-transform:none !important;
  letter-spacing:0 !important;
}
body.client-portal-mode .kgc-advisor-title .spark{
  text-transform:none !important;
  letter-spacing:0 !important;
}
.kgc-advisor-messages{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overscroll-behavior:contain !important;
}
.kgc-advisor-form{
  flex:0 0 auto !important;
  flex-shrink:0 !important;
}
.kgc-advisor-thread{
  min-width:0 !important;
  max-width:100% !important;
}
.kgc-advisor-msg{
  max-width:100% !important;
  min-width:0 !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
}
.kgc-advisor-msg div,
.kgc-advisor-msg p,
.kgc-advisor-thread strong,
.kgc-advisor-thread span{
  max-width:100% !important;
  overflow-wrap:anywhere !important;
}
.advisor-next-action{
  margin-top:12px !important;
  padding-top:12px !important;
  border-top:1px solid var(--line) !important;
  display:grid !important;
  gap:8px !important;
}
.advisor-next-action h4{
  margin:0 !important;
}
.advisor-next-link{
  width:max-content !important;
  max-width:100% !important;
  white-space:normal !important;
}
.kgc-advisor-msg h4,
.advisor-msg.assistant h4{
  margin:.8rem 0 .12rem !important;
}
.kgc-advisor-msg h4:first-child,
.advisor-msg.assistant h4:first-child{
  margin-top:0 !important;
}
.kgc-advisor-msg h4+ul,
.advisor-msg.assistant h4+ul{
  margin-top:.08rem !important;
}

/* Internal Advisors leave the working page visible behind the conversation. */
body:not(.client-portal-mode) .kgc-advisor-backdrop{
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  background:rgba(0,0,0,.14) !important;
}

/* Sales keeps the shared Advisor available beneath its focused navigation. */
.sales-sidebar-advisor{
  flex:1 1 380px;
  min-height:300px;
  max-height:520px;
  margin-top:auto;
  padding-top:18px;
  border-top:1px solid var(--line-strong);
  display:flex;
  flex-direction:column;
  gap:10px;
  position:sticky;
  bottom:18px;
  overflow:hidden;
}
.sales-sidebar-advisor header strong{
  display:block;
  margin-top:4px;
  font-family:var(--font-display);
  font-size:17px;
}
.sales-sidebar-advisor-messages{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:none;
}
.sales-sidebar-advisor-messages::-webkit-scrollbar{display:none;}
.sales-sidebar-advisor-msg{
  max-width:92%;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel);
  color:var(--text);
  font-size:12px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.sales-sidebar-advisor-msg.user{
  align-self:flex-end;
  background:rgba(47,122,87,.2);
  border-color:rgba(85,185,133,.3);
}
.sales-sidebar-advisor-msg p{margin:0 0 6px;}
.sales-sidebar-advisor-msg p:last-child{margin-bottom:0;}
.sales-sidebar-advisor-msg h4{
  margin:8px 0 2px;
  color:var(--gold);
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.sales-sidebar-advisor-msg h4:first-child{margin-top:0;}
.sales-sidebar-advisor-msg ul{margin:2px 0 6px;padding-left:17px;}
.sales-sidebar-advisor-msg .advisor-next-action{margin-top:7px!important;padding-top:7px!important;}
.sales-sidebar-advisor-msg .advisor-next-link{width:100%!important;font-size:11px!important;}
.sales-sidebar-advisor-form{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) 48px;
  gap:7px;
  align-items:end;
}
.sales-sidebar-advisor-form textarea{
  width:100%;
  height:48px;
  min-height:48px;
  max-height:48px;
  resize:none;
  border:1px solid var(--line-strong);
  border-radius:8px;
  padding:9px;
  background:var(--input);
  color:var(--text);
  font-size:12px;
  outline:none;
}
.sales-sidebar-advisor-form textarea:focus{border-color:var(--gold);}
.sales-sidebar-advisor-form .btn{
  width:48px;
  height:48px;
  min-width:48px;
  padding:0;
  border-radius:8px;
}
@media(max-width:980px){
  .sales-sidebar-advisor{
    flex-basis:360px;
    min-height:280px;
    max-height:55vh;
    position:relative;
    bottom:auto;
  }
}

/* Sidebar shell repair: keep one page scroller while the sidebar remains usable. */
@media(min-width:981px){
  html,
  body{
    height:100% !important;
    overflow:hidden !important;
  }
  .app-shell,
  body.client-portal-mode .app-shell,
  body.mission-control-mode .app-shell{
    height:100vh !important;
    min-height:100vh !important;
    overflow:hidden !important;
  }
  .app-shell>.sidebar,
  body.client-portal-mode .app-shell>.sidebar,
  body.client-portal-mode .app-shell>.client-only-sidebar.sidebar,
  body.mission-control-mode .app-shell>.sidebar{
    position:sticky !important;
    top:0 !important;
    height:100vh !important;
    min-height:0 !important;
    max-height:100vh !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain !important;
    scrollbar-gutter:stable !important;
  }
  .app-shell>.main,
  body.client-portal-mode .app-shell>.main,
  body.mission-control-mode .app-shell>.main{
    height:100vh !important;
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain !important;
  }
  body.client-portal-mode .app-shell>.sidebar .nav,
  body.client-portal-mode .app-shell>.client-only-sidebar.sidebar .nav{
    flex:0 0 auto !important;
    min-height:auto !important;
    overflow:visible !important;
  }
}
@media(max-width:640px){
  .kgc-advisor-window{
    width:calc(100vw - 16px) !important;
    max-width:calc(100vw - 16px) !important;
  }
}

/* Sales role pages reuse the canonical card, lane, KPI, and button system. */
.sales-performance-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.sales-performance-grid>div{
  border:1px solid var(--line);
  border-radius:8px;
  padding:12px;
  background:rgba(255,255,255,.035);
}
.sales-performance-grid span,
.sales-action-row span{
  display:block;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.sales-performance-grid strong{
  display:block;
  margin-top:4px;
  font-size:20px;
}
.sales-action-row{
  display:grid;
  grid-template-columns:minmax(160px,1.2fr) minmax(110px,.7fr) minmax(180px,1.4fr) auto;
  gap:12px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:8px;
  padding:12px;
  background:rgba(255,255,255,.035);
}
.sales-action-row strong{
  display:block;
  line-height:1.25;
}
.sales-pipeline-lanes .client-lane,
.sales-followup-lanes .client-lane,
.sales-upgrade-lanes .client-lane{
  min-width:0;
}
.sales-advisor-grid .advisor-suggestion{
  text-align:left;
}
@media(max-width:900px){
  .sales-action-row{
    grid-template-columns:1fr;
  }
  .sales-performance-grid{
    grid-template-columns:1fr;
  }
}

/* Final overrides for Sales/Admin role cleanup. */
body:not(.client-portal-mode) .sidebar{
  position:sticky!important;
  top:0!important;
  height:auto!important;
  min-height:auto!important;
  overflow:visible!important;
}
body:not(.client-portal-mode) #advisorTopBtn{
  display:grid!important;
  position:fixed!important;
  right:24px!important;
  bottom:24px!important;
  z-index:75!important;
  width:58px!important;
  height:58px!important;
  border-radius:18px!important;
}
body.client-portal-mode #advisorTopBtn{display:none!important;}

/* IP-027: Client Hub cleanup and shared Admin/Sales shell corrections. */
.client-top-account,
.platform-top-account{
  width:auto!important;
  max-width:100%;
  justify-content:space-between;
}
.client-top-identity{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-width:0!important;
  padding:0 4px!important;
  border:0!important;
  background:transparent!important;
  color:inherit!important;
  text-align:left!important;
}
.client-top-identity:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:4px;
  border-radius:10px;
}
.shared-profile-control{
  flex:0 1 auto;
}
.client-top-account .profile-control-icon,
.platform-top-account .profile-control-icon{
  width:30px;
  height:30px;
  min-width:30px;
  border-radius:11px;
  display:grid;
  place-items:center;
  background:transparent!important;
  border:1px solid rgba(225,191,99,.55);
  color:var(--gold);
  box-shadow:none;
}
.client-top-account .profile-control-icon-logo span,
.platform-top-account .profile-control-icon-logo span{
  font-family:var(--font-display);
  font-size:14px;
  line-height:1;
  color:var(--gold);
}
.client-top-account .profile-control-icon svg,
.platform-top-account .profile-control-icon svg{
  width:17px;
  height:17px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.client-top-account-copy{
  display:grid;
  gap:1px;
  min-width:0!important;
  max-width:178px;
  line-height:1.12;
}
.client-top-account-copy strong,
.client-top-account-copy span{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.client-top-account-copy strong{
  max-width:100%;
}
.platform-top-account .client-top-account-copy{
  max-width:150px;
}
body:not(.client-portal-mode) .user-card{
  display:none!important;
}
.client-hub-filter-row{
  align-items:end;
}
.client-hub-tabs{
  flex-wrap:wrap;
}
.client-hub-tabbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:0 0 14px;
}
.client-hub-tabbar .client-hub-tabs{
  flex:1 1 auto;
  margin:0;
}
.client-hub-refresh{
  flex:0 0 auto;
  min-width:38px;
  min-height:38px;
}
.client-hub-refresh .advisor-orbit-loader{
  width:20px;
  height:20px;
}
.client-hub-refresh:disabled{
  opacity:.78;
  cursor:wait;
}
.client-hub-tab-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex:0 0 auto;
}
.client-access-roster{display:grid;gap:16px;margin-bottom:16px}
.client-access-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.client-access-summary>div{border:1px solid var(--line);border-radius:14px;padding:12px;background:rgba(128,128,128,.045)}
.client-access-summary span{display:block;font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:900}
.client-access-summary strong{display:block;margin-top:5px;font-family:var(--font-display);font-size:25px}
.client-access-summary .needs-action{border-color:rgba(216,154,61,.38);background:rgba(216,154,61,.08)}
.client-access-tools{display:grid;grid-template-columns:minmax(220px,1fr) minmax(170px,220px) auto;gap:10px;align-items:end}
.client-access-table-wrap{overflow-x:auto!important}
.client-access-table{min-width:1050px!important;table-layout:auto!important}
.client-access-table td small{display:block;margin-top:4px;color:var(--muted)}
.client-access-table td:nth-child(3),.client-access-table td:nth-child(5){font-family:Consolas,Monaco,monospace;font-size:12px}
.client-access-actions{display:flex;gap:5px;flex-wrap:wrap}
.client-access-actions .btn{white-space:nowrap}
.client-access-text{
  appearance:none;
  border:0;
  background:transparent;
  padding:4px 2px;
  font:inherit;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.client-access-text.missing{
  color:var(--gold-2);
  cursor:not-allowed;
}
.client-access-text.ready{color:var(--green-2);}
.client-access-text.ready:hover{text-decoration:underline;}
.client-access-text.revoke{color:#e6a65d;}
.client-access-text.revoke:hover{text-decoration:underline;}
.client-revoke-action{
  color:var(--gold);
  border-color:color-mix(in srgb,var(--gold) 58%,transparent);
}
.client-revoke-action:hover{
  color:var(--ink);
  border-color:var(--gold);
  background:color-mix(in srgb,var(--gold) 16%,transparent);
}
.client-support-tabs{
  display:flex;
  gap:8px;
  padding:4px;
  margin-bottom:18px;
  width:max-content;
  max-width:100%;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel);
}
.client-support-tab{
  min-height:40px;
  padding:0 16px;
  border:0;
  border-radius:6px;
  color:var(--muted);
  background:transparent;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.client-support-tab.active{
  color:var(--ink);
  background:var(--green);
}
@media (max-width:640px){
  .client-support-tabs{width:100%;}
  .client-support-tab{flex:1;min-width:0;padding-inline:10px;}
}
.client-invitation-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;}
.client-access-state{
  padding:4px 2px;
  font-size:12px;
  font-weight:900;
  color:var(--green-2);
}
.client-access-state.disabled{color:#f1a7a2;}
@media(max-width:640px){
  .client-hub-tabbar{align-items:stretch;flex-direction:column;}
  .client-hub-tab-actions{align-self:stretch;}
  .client-hub-tab-actions .btn{flex:1 1 0;}
  .client-access-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .client-access-tools{grid-template-columns:1fr}
  .client-access-tools .btn{width:100%}
}
.modal-backdrop{
  align-items:flex-start!important;
  place-items:start center!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
.modal{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
.modal-body{
  max-height:none!important;
  overflow:visible!important;
}
@media(max-width:980px){
  html,
  body{
    overflow-x:hidden!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .mobile-appbar{
    display:flex!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .app-shell{
    display:block!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    max-width:100vw!important;
    min-height:100vh!important;
    overflow-x:hidden!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .app-shell>.sidebar{
    position:fixed!important;
    inset:0 auto 0 0!important;
    width:min(304px,86vw)!important;
    height:100vh!important;
    max-height:100vh!important;
    z-index:180!important;
    transform:translateX(-105%)!important;
    transition:transform var(--ease)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode).mobile-nav-open .app-shell>.sidebar{
    transform:translateX(0)!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) #mobileNavBackdrop{
    position:fixed!important;
    inset:0!important;
    z-index:170!important;
    background:rgba(0,0,0,.58)!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) #mobileNavBackdrop[hidden]{
    display:none!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode).mobile-nav-open #mobileNavBackdrop{
    display:block!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .app-shell>.main{
    width:100%!important;
    max-width:100vw!important;
    min-width:0!important;
    padding:72px 16px 18px!important;
    overflow-x:hidden!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .topbar{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
    align-items:start!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .top-actions{
    width:100%!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .site-search{
    width:100%!important;
    min-width:0!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .client-top-account,
  body:not(.client-portal-mode):not(.mission-control-mode) .platform-top-account{
    width:auto!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) #mobileAdvisorBtn{
    display:none!important;
  }
body:not(.client-portal-mode):not(.mission-control-mode) .mobile-brand-mini strong{
    display:none!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) #platformTopAccount{
    position:fixed!important;
    top:8px!important;
    right:12px!important;
    z-index:1200!important;
    min-height:40px!important;
    padding:4px!important;
    background:rgba(7,17,13,.92)!important;
    backdrop-filter:blur(12px);
  }
  body:not(.client-portal-mode):not(.mission-control-mode) #platformTopAccount .client-top-account-copy{
    display:grid!important;
    max-width:88px!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .grid,
  body:not(.client-portal-mode):not(.mission-control-mode) .cols-5,
  body:not(.client-portal-mode):not(.mission-control-mode) .cols-4,
  body:not(.client-portal-mode):not(.mission-control-mode) .cols-3,
  body:not(.client-portal-mode):not(.mission-control-mode) .cols-2,
  body:not(.client-portal-mode):not(.mission-control-mode) .client-hub-kpis,
  body:not(.client-portal-mode):not(.mission-control-mode) .client-hub-hero,
  body:not(.client-portal-mode):not(.mission-control-mode) .filter-grid,
  body:not(.client-portal-mode):not(.mission-control-mode) .client-card-primary,
  body:not(.client-portal-mode):not(.mission-control-mode) .client-card-secondary{
    grid-template-columns:1fr!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .client-card-badges,
  body:not(.client-portal-mode):not(.mission-control-mode) .client-card-actions,
  body:not(.client-portal-mode):not(.mission-control-mode) .client-hub-actions{
    justify-content:flex-start!important;
  }
  body:not(.client-portal-mode):not(.mission-control-mode) #advisorTopBtn{
    right:16px!important;
    bottom:16px!important;
  }
}

/* Final shell/theme authority for shared role views. */
.kpi-icon{display:none!important;}
.card.decor::before,
.card.decor::after{content:none!important;display:none!important;}
html[data-theme="light"] .nav-btn.active,
html[data-theme="light"] .nav-btn.active>span,
html[data-theme="light"] body.client-portal-mode .portal-menu-link.nav-btn.active,
html[data-theme="light"] body.client-portal-mode .portal-menu-link.nav-btn.active>span{color:#fff!important;}
html[data-theme="light"] body.client-portal-mode .client-portal-view .card,
html[data-theme="light"] body.client-portal-mode :is(.product-selector-panel,.product-detail-panel,.product-selector-item,.product-start-card,.product-upgrade-strip,.portal-course-side,.portal-video-module,.lesson-panel,.portal-quiz,.portal-check-item,.portal-why-check-item,.readiness-card,.portal-review-card,.archetype-card,.client-video-intro,.payment-mini-card){
  background:linear-gradient(145deg,#fffaf1,#f8f1e5)!important;
  border-color:rgba(133,104,42,.24)!important;
  color:#132019!important;
  box-shadow:0 18px 48px rgba(61,48,23,.10)!important;
}
html[data-theme="light"] body.client-portal-mode .client-portal-view .card :is(h1,h2,h3,h4,strong,p,li),
html[data-theme="light"] body.client-portal-mode :is(.product-selector-panel,.product-detail-panel,.product-selector-item,.product-start-card,.product-upgrade-strip,.portal-course-side,.portal-video-module,.lesson-panel,.portal-quiz,.portal-check-item,.portal-why-check-item,.readiness-card,.portal-review-card,.archetype-card,.client-video-intro,.payment-mini-card) :is(h1,h2,h3,h4,strong,p,li){color:inherit!important;}
@media(min-width:981px){
  .app-shell>.sidebar,
  body:not(.client-portal-mode) .app-shell>.sidebar,
  body.client-portal-mode .app-shell>.sidebar,
  body.client-portal-mode .app-shell>.client-only-sidebar.sidebar{
    position:sticky!important;
    top:0!important;
    height:100vh!important;
    min-height:0!important;
    max-height:100vh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }
  .app-shell>.sidebar::-webkit-scrollbar{width:0!important;height:0!important;display:none!important;}
}

/* Light-theme contrast authority. Dark theme intentionally remains unchanged. */
html[data-theme="light"] .nav-btn.active{
  --text:#fff;
  color:#fff!important;
}
html[data-theme="light"] .nav-btn.active>span,
html[data-theme="light"] .nav-btn.active .nav-ico,
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-menu-link.nav-btn.active .portal-nav-glyph{
  color:#fff!important;
}
html[data-theme="light"] .nav-btn.active .nav-ico,
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-menu-link.nav-btn.active .portal-nav-glyph{
  background:rgba(255,255,255,.14)!important;
  border-color:rgba(255,255,255,.55)!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-menu-link.nav-btn.active .portal-nav-glyph{
  --text:#fff;
}

html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-side .focus-progress,
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-side .focus-progress span,
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-side .focus-progress strong{
  color:#294b3b!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step{
  background:#fffaf1!important;
  border-color:#d8b96f!important;
  color:#244d3a!important;
  box-shadow:none!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step:hover:not(.active){
  background:#f3ecde!important;
  border-color:#b98928!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step.active{
  background:linear-gradient(135deg,#16734f,#0f5e40)!important;
  border-color:#c89b35!important;
  color:#fff!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step .step-num{
  background:#f2ead9!important;
  border:1px solid #dfc98f!important;
  color:#24563f!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step .step-copy strong,
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step .step-mark{
  color:#244d3a!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step .step-copy small{
  color:#52665b!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step .step-mark{
  background:#f2ead9!important;
  border:1px solid #dfc98f!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step.active .step-copy strong,
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step.active .step-mark{
  color:#fff!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step.active .step-copy small{
  color:#e1eee5!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-step.active .step-mark{
  background:rgba(255,255,255,.12)!important;
  border-color:rgba(255,255,255,.36)!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view.client-portal-view .portal-course-step .step-num{
  background:#f2ead9!important;
  color:#24563f!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view.client-portal-view .portal-course-step .step-copy strong,
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view.client-portal-view .portal-course-step .step-mark{
  color:#244d3a!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view.client-portal-view .portal-course-step .step-copy small{
  color:#52665b!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-side .focus-progress,
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-side .focus-progress span,
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-side .focus-progress strong{
  color:#294b3b!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-step .step-num{
  background:#f2ead9!important;
  color:#24563f!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-step .step-copy strong,
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-step .step-mark{
  color:#244d3a!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-step .step-copy small{
  color:#52665b!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view.client-portal-view .portal-course-step.active .step-copy strong,
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view.client-portal-view .portal-course-step.active .step-mark,
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-step.active .step-copy strong,
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-step.active .step-mark{
  color:#fff!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view.client-portal-view .portal-course-step.active .step-copy small,
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-step.active .step-copy small{
  color:#e1eee5!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view.client-portal-view .portal-course-map .portal-course-step:not(.active),
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-map .portal-course-step:not(.active){
  background:#fffaf1!important;
  border-color:#d8b96f!important;
  color:#244d3a!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view.client-portal-view .portal-course-map .portal-course-step:hover:not(.active),
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-map .portal-course-step:hover:not(.active){
  background:#f3ecde!important;
  border-color:#b98928!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view.client-portal-view .portal-course-map .portal-course-step.active,
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view .portal-course-map .portal-course-step.active{
  background:linear-gradient(135deg,#16734f,#0f5e40)!important;
  border-color:#c89b35!important;
  color:#fff!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-side .progress-track{
  background:#d9d2c4!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .portal-course-side .progress-track>span{
  background:linear-gradient(90deg,#16734f,#c89b35)!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .client-portal-view :is(.muted,.micro,.module-points li,.portal-course-head p,.step-complete-row span,.payment-commit-grid span){
  color:#52665b!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode #view .client-portal-view :is(.muted,.micro,.module-points li,.portal-course-head p,.step-complete-row span,.payment-commit-grid span){
  color:#52665b!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .status.good,
html[data-theme="light"] body.client-portal-mode.client-portal-mode .status.complete,
html[data-theme="light"] body.client-portal-mode.client-portal-mode .status.completed,
html[data-theme="light"] body.client-portal-mode.client-portal-mode .status.in-progress{
  background:#dcecdf!important;
  border-color:#9fc4a8!important;
  color:#1c5d3e!important;
}

html[data-theme="light"] body.client-portal-mode.client-portal-mode .client-membership-card,
html[data-theme="light"] body.client-portal-mode.client-portal-mode .sidebar>.focus-card{
  background:linear-gradient(145deg,#286244,#173828)!important;
  border-color:rgba(133,104,42,.58)!important;
  color:#fff7e8!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .client-membership-card :is(h3,strong),
html[data-theme="light"] body.client-portal-mode.client-portal-mode .sidebar>.focus-card :is(h3,strong){
  color:#fff7e8!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .client-membership-card :is(p,.focus-progress,.focus-progress span,.focus-progress strong),
html[data-theme="light"] body.client-portal-mode.client-portal-mode .sidebar>.focus-card :is(p,.focus-progress,.focus-progress span,.focus-progress strong){
  color:#dce9df!important;
}
html[data-theme="light"] body.client-portal-mode.client-portal-mode .client-membership-card :is(.focus-kicker,.spark),
html[data-theme="light"] body.client-portal-mode.client-portal-mode .sidebar>.focus-card :is(.focus-kicker,.spark){
  color:#f2c85b!important;
}

html[data-theme="light"] body.auth-required .platform-auth{
  --text:#f8f1df;
  --muted:#bfd0c3;
  --input:rgba(3,14,10,.96);
  --line:rgba(225,191,99,.24);
  color:#f8f1df!important;
}
html[data-theme="light"] body.auth-required .platform-auth-card,
html[data-theme="light"] body.auth-required .platform-auth-card.card{
  background:radial-gradient(circle at 78% 18%,rgba(225,191,99,.08),transparent 24%),linear-gradient(155deg,rgba(9,38,27,.98),rgba(3,20,14,.99))!important;
  color:#f8f1df!important;
}
html[data-theme="light"] body.auth-required .platform-auth-card h1{
  color:#fff7e8!important;
}
html[data-theme="light"] body.auth-required .platform-auth-card :is(label,p,strong,span,small){
  color:inherit;
}
html[data-theme="light"] body.auth-required .platform-auth-card :is(.auth-intro,.muted,.auth-message span,.auth-message small){
  color:#cfe0cf!important;
}
html[data-theme="light"] body.auth-required .platform-auth-card input{
  background:#03100b!important;
  border-color:rgba(225,191,99,.30)!important;
  color:#fff7e8!important;
}

html[data-theme="light"] body:not(.client-portal-mode) .table-wrap{
  background:#fffaf1!important;
  border-color:rgba(133,104,42,.28)!important;
}
html[data-theme="light"] body:not(.client-portal-mode) .data-table{
  background:#fffaf1!important;
  color:#132019!important;
}
html[data-theme="light"] body:not(.client-portal-mode) .data-table thead,
html[data-theme="light"] body:not(.client-portal-mode) .data-table th{
  background:#eee6d8!important;
  color:#785b19!important;
}
html[data-theme="light"] body:not(.client-portal-mode) .data-table tbody,
html[data-theme="light"] body:not(.client-portal-mode) .data-table tr,
html[data-theme="light"] body:not(.client-portal-mode) .data-table td,
html[data-theme="light"] body:not(.client-portal-mode) .data-table td[data-col="actions"]{
  background:#fffaf1!important;
  color:#132019!important;
  border-color:rgba(133,104,42,.18)!important;
}
html[data-theme="light"] body:not(.client-portal-mode) .data-table tbody tr:nth-child(even) td{
  background:#faf3e7!important;
}

/* Auto and Elite performance evidence plus shared offer pricing. */
body.client-portal-mode .upgrade-price{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:end;
  column-gap:7px;
  row-gap:4px;
  margin:14px 0 16px;
}
body.client-portal-mode .upgrade-price strong{
  font-family:var(--font-display);
  font-size:38px;
  line-height:1;
  color:var(--text);
}
body.client-portal-mode .upgrade-price span{
  color:var(--muted);
  font-weight:800;
  padding-bottom:4px;
}
body.client-portal-mode .upgrade-price small{
  grid-column:1/-1;
  color:var(--gold);
  font-size:12px;
  font-weight:850;
}
body.client-portal-mode .coaching-price{
  display:flex;
  align-items:baseline;
  gap:7px;
  margin:10px 0;
}
body.client-portal-mode .coaching-price strong{
  font-family:var(--font-display);
  font-size:32px;
  color:var(--text);
}
body.client-portal-mode .coaching-price span{color:var(--muted);font-weight:800;}
body.client-portal-mode .performance-showcase{
  display:grid;
  gap:14px;
  padding-top:8px;
}
body.client-portal-mode .performance-showcase-copy{
  max-width:760px;
  padding:0 4px;
}
body.client-portal-mode .performance-showcase-copy h2{
  font-family:var(--font-display);
  font-size:34px;
  line-height:1.05;
  margin:7px 0 8px;
}
body.client-portal-mode .performance-showcase-copy p{
  color:var(--muted);
  line-height:1.55;
  margin:0;
}
body.client-portal-mode .performance-lab.card{
  display:grid;
  gap:14px;
  padding:18px;
  border-color:rgba(225,191,99,.34);
  overflow:hidden;
}
body.client-portal-mode .performance-lab-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}
body.client-portal-mode .performance-lab-head h3{
  font-family:var(--font-display);
  font-size:28px;
  line-height:1.05;
  margin:6px 0 7px;
}
body.client-portal-mode .performance-lab-head p{
  color:var(--muted);
  line-height:1.5;
  margin:0;
}
body.client-portal-mode .performance-testing-chip{
  flex:0 0 auto;
  border:1px solid rgba(225,191,99,.40);
  border-radius:999px;
  padding:7px 10px;
  color:var(--gold);
  background:rgba(200,162,74,.08);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  white-space:nowrap;
}
body.client-portal-mode .performance-family-tabs{
  width:max-content;
  display:flex;
  padding:4px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--input);
}
body.client-portal-mode .performance-family-tabs button{
  min-width:104px;
  border:0;
  border-radius:9px;
  padding:9px 14px;
  background:transparent;
  color:var(--muted);
  font-weight:900;
}
body.client-portal-mode .performance-family-tabs button.active{
  background:var(--green);
  color:#fff;
}
body.client-portal-mode .performance-evidence-tabs{
  display:flex;
  gap:7px;
  max-width:100%;
  overflow-x:auto;
  padding:1px 0 4px;
  scrollbar-width:none;
}
body.client-portal-mode .performance-evidence-tabs::-webkit-scrollbar{display:none;}
body.client-portal-mode .performance-evidence-tabs button{
  flex:0 0 auto;
  min-width:68px;
  min-height:38px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 11px;
  background:var(--input);
  color:var(--muted);
  font-size:12px;
  font-weight:900;
}
body.client-portal-mode .performance-evidence-tabs button:hover{
  border-color:var(--gold);
  color:var(--text);
}
body.client-portal-mode .performance-evidence-tabs button.active{
  border-color:var(--gold);
  background:linear-gradient(135deg,var(--green),var(--green-2));
  color:#fff;
}
body.client-portal-mode .performance-evidence-stage{
  display:grid;
  grid-template-columns:minmax(0,1.65fr) minmax(250px,.55fr);
  gap:14px;
  align-items:stretch;
}
body.client-portal-mode .performance-evidence-stage figure{
  display:grid;
  grid-template-rows:minmax(300px,1fr) auto;
  min-width:0;
  margin:0;
  border:1px solid var(--line);
  border-radius:14px;
  background:#020805;
  overflow:hidden;
}
body.client-portal-mode .performance-evidence-stage img{
  display:block;
  width:100%;
  height:100%;
  max-height:520px;
  min-height:300px;
  object-fit:contain;
  background:#020805;
}
body.client-portal-mode .performance-evidence-stage figcaption{
  padding:10px 12px;
  background:#07110d;
  color:#c8d8cc;
  border-top:1px solid rgba(221,203,146,.18);
  font-size:11px;
  font-weight:750;
}
body.client-portal-mode .performance-evidence-summary{
  display:flex;
  flex-direction:column;
  min-width:0;
  border:1px solid var(--line);
  border-radius:14px;
  padding:18px;
  background:rgba(128,128,128,.045);
}
body.client-portal-mode .performance-net{
  display:block;
  margin:10px 0 8px;
  font-family:var(--font-display);
  font-size:38px;
  line-height:1;
}
body.client-portal-mode .performance-net.positive{color:var(--green-2);}
body.client-portal-mode .performance-net.negative{color:var(--red);}
body.client-portal-mode .performance-evidence-summary>p{
  color:var(--muted);
  line-height:1.45;
  margin:0 0 16px;
}
body.client-portal-mode .performance-metric-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:auto;
}
body.client-portal-mode .performance-metric-grid>div{
  min-width:0;
  border-top:1px solid var(--line);
  padding-top:9px;
}
body.client-portal-mode .performance-metric-grid span,
body.client-portal-mode .performance-metric-grid strong{
  display:block;
}
body.client-portal-mode .performance-metric-grid span{
  color:var(--muted);
  font-size:10px;
  font-weight:850;
  text-transform:uppercase;
}
body.client-portal-mode .performance-metric-grid strong{
  margin-top:4px;
  color:var(--text);
  font-size:15px;
}
body.client-portal-mode .performance-disclosure{
  margin:0;
  padding-top:12px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
}
body.client-portal-mode .performance-disclosure strong{color:var(--text);}
html[data-theme="light"] body.client-portal-mode .performance-lab.card{
  background:linear-gradient(145deg,#fffdf7,#f7f2e6)!important;
  color:#14251c!important;
}
html[data-theme="light"] body.client-portal-mode .performance-evidence-summary{
  background:#f5efe3;
}
html[data-theme="light"] body.client-portal-mode .performance-evidence-tabs button{
  background:#fffaf1!important;
  color:#365747!important;
  border-color:#d8c79e!important;
}
html[data-theme="light"] body.client-portal-mode .performance-evidence-tabs button.active{
  background:linear-gradient(135deg,#16734f,#0f5e40)!important;
  color:#fff!important;
  border-color:#b88e32!important;
}
@media(max-width:1100px){
  body.client-portal-mode .performance-evidence-stage{grid-template-columns:1fr;}
  body.client-portal-mode .performance-evidence-stage figure{grid-template-rows:minmax(260px,1fr) auto;}
  body.client-portal-mode .performance-evidence-stage img{min-height:260px;}
}
@media(max-width:620px){
  body.client-portal-mode .performance-lab.card{padding:14px;}
  body.client-portal-mode .performance-lab-head{display:grid;gap:10px;}
  body.client-portal-mode .performance-testing-chip{width:max-content;}
  body.client-portal-mode .performance-family-tabs{width:100%;}
  body.client-portal-mode .performance-family-tabs button{flex:1;min-width:0;}
  body.client-portal-mode .performance-evidence-stage figure{grid-template-rows:210px auto;}
  body.client-portal-mode .performance-evidence-stage img{height:210px;min-height:210px;}
  body.client-portal-mode .performance-metric-grid{grid-template-columns:1fr 1fr;}
  body.client-portal-mode .performance-net{font-size:32px;}
  body.client-portal-mode .performance-showcase-copy h2{font-size:29px;}
}
/* Platform service connections and protected video delivery */
.settings-workspace{display:grid;grid-template-columns:minmax(220px,280px) minmax(0,1fr);gap:24px;align-items:start}
.settings-nav{position:sticky;top:18px;padding:22px;border:1px solid var(--line);border-radius:8px;background:var(--panel);box-shadow:var(--shadow)}
.settings-nav h2,.settings-content-head h2{margin:6px 0 8px;font-size:26px}
.settings-nav>p,.settings-content-head>p{margin:0;color:var(--muted);line-height:1.55}
.settings-nav-list{display:grid;gap:7px;margin-top:22px}
.settings-nav-item{display:grid;gap:3px;width:100%;padding:13px 14px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--text);text-align:left;cursor:pointer}
.settings-nav-item strong{font-size:.9rem}.settings-nav-item span{color:var(--muted);font-size:.76rem;line-height:1.35}
.settings-nav-item:hover{border-color:var(--line)}
.settings-nav-item.active{border-color:var(--line-strong);background:var(--green);color:#fff}.settings-nav-item.active span{color:#fff}
.settings-content{min-width:0}.settings-content-head{margin:2px 0 18px}.settings-content>.card{width:100%}
.product-releases-card{min-width:0;max-width:100%;overflow:hidden}.product-release-intro{max-width:760px;line-height:1.55}.product-release-upload-list{display:grid;gap:14px;margin:18px 0 26px}.product-release-upload-row{display:grid;gap:14px;min-width:0;padding:16px;border:1px solid var(--line);border-radius:8px;background:var(--input)}
.product-release-history-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.product-release-email-test-result{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:14px 0;padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:var(--input)}.product-release-email-test-result span{overflow-wrap:anywhere;color:var(--muted)}
.product-release-upload-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-bottom:12px;border-bottom:1px solid var(--line)}.product-release-upload-head>div{display:grid;gap:4px;min-width:0}.product-release-upload-head strong{font-family:var(--font-display);font-size:22px;line-height:1.05}.product-release-current{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:4px;color:var(--muted);font-size:12px}.product-release-current span{overflow-wrap:anywhere}.product-release-current b{color:var(--mint)}.product-release-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}.product-release-fields .field{min-width:0}.product-release-fields .field>span{color:var(--gold-2)}.product-release-fields :is(input,select){min-width:0;border-radius:8px}.product-release-fields input:disabled{opacity:1;color:var(--text);background:var(--panel)}.product-release-file input[type="file"]{max-width:100%;padding:7px;border:1px dashed var(--line-strong);border-radius:8px;background:var(--panel);color:var(--muted);overflow:hidden}.product-release-file input[type="file"]::file-selector-button{margin-right:10px;border:0;border-radius:7px;padding:8px 11px;background:var(--green);color:#fff;font-weight:900;cursor:pointer}.product-release-file small{display:block;margin-top:6px;color:var(--muted);font-size:11px;line-height:1.4}
.product-release-upload-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:12px;border-top:1px solid var(--line)}.product-release-upload-actions .compact-check{display:flex;align-items:flex-start;gap:9px;min-width:0;margin:0;padding:0;border:0;background:transparent;white-space:normal}.product-release-upload-actions .compact-check input{flex:0 0 auto;margin-top:2px}.product-release-upload-actions .compact-check span{color:var(--muted);font-size:12px;line-height:1.4}.product-release-upload-actions .btn{flex:0 0 auto;white-space:nowrap}.product-release-history{display:grid;gap:8px}.product-release-history-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:12px;border-top:1px solid var(--line)}.product-release-history-row>div{display:grid;gap:4px;min-width:0}.product-release-history-row span{overflow-wrap:anywhere}.universe-download-button{margin-top:8px;width:max-content}
@media(max-width:620px){.product-release-fields,.product-release-history-row{grid-template-columns:1fr}.product-release-upload-head{align-items:flex-start}.product-release-upload-actions{align-items:stretch;flex-direction:column}.product-release-upload-actions .btn,.product-release-history-row .btn{width:100%}}
.confirmation-video-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-top:18px}.confirmation-video-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px}.confirmation-video-action-buttons{display:flex;gap:8px;align-items:center;flex-shrink:0}.confirmation-video-preview{margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}.confirmation-video-preview .spark{margin-bottom:10px}
.settings-grid .platform-connections-card{grid-column:1/-1}
.platform-connection-list{margin-top:18px;border-top:1px solid var(--line)}
.platform-connection-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:center;padding:18px 0;border-bottom:1px solid var(--line)}
.platform-connection-copy{min-width:0}
.platform-connection-title{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.platform-connection-title strong{font-size:1rem}
.platform-connection-copy p{margin:5px 0 0;color:var(--muted);font-size:.86rem;line-height:1.5}
.platform-connection-status{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid var(--line-strong);border-radius:999px;font-size:.68rem;font-weight:800;text-transform:uppercase}
.platform-connection-status.connected{border-color:rgba(85,185,133,.55);background:rgba(85,185,133,.12);color:var(--green-2)}
.platform-connection-status.needs-setup{border-color:rgba(210,164,36,.5);background:rgba(210,164,36,.1);color:var(--gold)}
.platform-connection-missing{display:flex!important;flex-wrap:wrap;gap:6px;align-items:center}
.platform-connection-missing code{padding:2px 6px;border:1px solid var(--line);border-radius:4px;background:var(--bg-deep);color:var(--text);font-size:.72rem}
.platform-connection-actions{display:flex;gap:8px;justify-content:flex-end}
.platform-connection-row-stacked{grid-template-columns:minmax(0,1fr) auto}
.platform-connection-row-stacked>.brevo-recipient-test{grid-column:1/-1}
.brevo-recipient-test{display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:8px;background:rgba(128,128,128,.04)}
.brevo-recipient-intro p{margin:6px 0 0}
.brevo-recipient-controls{display:grid;grid-template-columns:minmax(260px,1.2fr) minmax(320px,1.35fr) auto;gap:12px;align-items:end}
.brevo-recipient-test .field{margin:0}
.brevo-recipient-test .check-row{padding:10px 12px;border-radius:6px;min-height:43px;align-items:center}
.brevo-recipient-test .check-row input{margin-top:0}
.brevo-recipient-controls>.platform-connection-actions{align-self:end;white-space:nowrap}
.delivery-video-frame{width:min(960px,82vw);aspect-ratio:16/9;overflow:hidden;border:1px solid var(--line-strong);border-radius:8px;background:#000}
.delivery-video-frame iframe{display:block;width:100%;height:100%;border:0}
.auth-setup-link-ready{padding:11px 12px;border:1px solid rgba(85,185,133,.4);border-radius:8px;background:rgba(85,185,133,.1);color:#b9e6ce;font-size:.82rem;line-height:1.45}
html[data-theme="light"] .platform-connection-missing code{background:#fffaf1;color:#183326}
html[data-theme="light"] .platform-connection-status.connected{color:#116543}
html[data-theme="light"] .platform-connection-status.needs-setup{color:#74530c}
@media(max-width:900px){.settings-workspace{grid-template-columns:1fr}.settings-nav{position:static}.settings-nav-list{grid-template-columns:repeat(2,minmax(0,1fr))}.confirmation-video-form{grid-template-columns:1fr}}
@media(max-width:960px){.brevo-recipient-controls{grid-template-columns:1fr}.brevo-recipient-controls>.platform-connection-actions{justify-content:flex-start}}
@media(max-width:720px){.platform-connection-row{grid-template-columns:1fr}.platform-connection-actions{justify-content:flex-start}.delivery-video-frame{width:min(92vw,960px)}.settings-nav-list{grid-template-columns:1fr}.confirmation-video-actions{align-items:stretch;flex-direction:column}.confirmation-video-action-buttons{width:100%;flex-direction:column}.confirmation-video-actions .btn{width:100%}}

/* Admin workspaces stay left aligned on wide screens and share one section-nav language. */
@media(min-width:1600px){.view{margin:0 auto 0 0}}
.settings-workspace{grid-template-columns:260px minmax(0,1fr)}
.settings-nav{display:grid;gap:8px;align-content:start;padding:10px;border-radius:8px}
.settings-nav h2{font-family:var(--font-display);font-size:28px;line-height:1.08;margin:0}
.settings-nav>p{margin:0 2px 8px}
.settings-nav-list{display:grid;gap:8px;margin-top:0}
.settings-nav-item{border:1px solid var(--line);border-radius:8px;background:var(--input);color:var(--muted);padding:10px 12px;min-height:46px}
.settings-nav-item:hover{border-color:color-mix(in srgb,#f4c95d,transparent 58%);background:rgba(244,201,93,.08)}
.settings-nav-item.active{color:var(--text);border-color:var(--gold);background:linear-gradient(135deg,var(--green),var(--green-2))}
.settings-nav-item.active span{color:var(--muted)}

/* Branded, data-driven email journey overview. */
.email-journey-poster-button{position:relative;width:100%;padding:0;border:0;border-radius:8px;background:transparent;color:inherit;text-align:left;cursor:zoom-in}
.email-journey-poster{position:relative;overflow:hidden;border:1px solid color-mix(in srgb,var(--gold) 58%,var(--line));border-radius:8px;padding:24px;background:radial-gradient(circle at 86% 0,rgba(200,162,74,.13),transparent 28%),linear-gradient(145deg,#07140f,#0c2118);box-shadow:var(--shadow)}
.email-journey-poster:after{content:"K";position:absolute;right:22px;bottom:-30px;color:rgba(225,191,99,.055);font-family:var(--font-display);font-size:180px;line-height:1;pointer-events:none}
.email-journey-poster header{position:relative;z-index:1;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding-bottom:20px;border-bottom:1px solid rgba(225,191,99,.2)}
.email-journey-poster h3{margin:5px 0 4px;color:#fff8e8;font-family:var(--font-display);font-size:30px;letter-spacing:0}
.email-journey-poster p{margin:0;color:#9bb7a8;font-size:13px}
.email-journey-poster-legend{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;color:#b8c9bf;font-size:11px}
.email-journey-poster-legend span{display:flex;align-items:center;gap:6px;white-space:nowrap}
.email-journey-poster-legend i,.email-journey-poster-node i{display:block;width:8px;height:8px;border-radius:50%;background:#6b7d73}
.email-journey-poster-legend .implemented,.email-journey-poster-node.implemented i{background:#55b985;box-shadow:0 0 0 4px rgba(85,185,133,.12)}
.email-journey-poster-legend .disabled,.email-journey-poster-node.disabled i{background:#708078}
.email-journey-poster-legend .gated,.email-journey-poster-node.gated i,.email-journey-poster-node.internal i{background:#e1bf63;box-shadow:0 0 0 4px rgba(225,191,99,.11)}
.email-journey-poster-flow{position:relative;z-index:1;display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:12px;padding-top:22px;overflow-x:auto}
.email-journey-poster-lane{position:relative;display:grid;gap:13px;align-content:start;min-width:0}
.email-journey-poster-lane:not(:last-child):after{content:"";position:absolute;top:16px;right:-12px;width:12px;border-top:1px solid rgba(225,191,99,.42)}
.email-journey-poster-step{display:flex;align-items:center;gap:8px;color:#fff8e8;min-height:33px}
.email-journey-poster-step>span{display:grid;place-items:center;width:29px;height:29px;border:1px solid rgba(225,191,99,.48);border-radius:50%;color:#e1bf63;font-size:10px;font-weight:900}
.email-journey-poster-step strong{font-size:12px;line-height:1.25}
.email-journey-poster-nodes{display:grid;gap:7px}
.email-journey-poster-node{display:grid;grid-template-columns:8px minmax(0,1fr);gap:8px;align-items:start;padding:9px;border:1px solid rgba(155,183,168,.18);border-radius:6px;background:rgba(255,255,255,.035);color:#c9d8d0;font-size:10px;line-height:1.35;overflow-wrap:anywhere}
.email-journey-poster-node i{margin-top:3px}
.email-journey-poster-expand{position:absolute;right:14px;top:14px;z-index:2;display:flex;align-items:center;gap:7px;padding:7px 9px;border:1px solid rgba(225,191,99,.32);border-radius:6px;background:rgba(7,20,15,.88);color:#e1bf63;font-size:11px;font-weight:900;text-transform:uppercase}
#modalBackdrop.email-journey-open .modal{width:min(1500px,calc(100vw - 36px));max-height:calc(100dvh - 36px)}
#modalBackdrop.email-journey-open .modal-body{padding:16px}
#modalBackdrop.email-journey-open .email-journey-poster{min-height:min(720px,calc(100dvh - 150px));display:grid;grid-template-rows:auto 1fr}
#modalBackdrop.email-journey-open .email-journey-poster-flow{align-items:stretch}
@media(max-width:980px){.email-journey-poster header{align-items:flex-start;flex-direction:column}.email-journey-poster-legend{justify-content:flex-start}.email-journey-poster-flow{grid-template-columns:repeat(6,minmax(190px,1fr))}}
@media(max-width:900px){.settings-workspace{grid-template-columns:1fr}.settings-nav{position:static}}

.backup-status-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:start}
.backup-status-row h3{margin:6px 0;font-size:1rem;line-height:1.35}
.backup-status-row p{margin:0;line-height:1.5}
.backup-last-run{display:flex;justify-content:space-between;gap:16px;margin-top:18px;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.backup-last-run span{color:var(--muted)}
.backup-last-run strong{text-align:right}
.backup-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:9px;margin-top:16px}
@media(max-width:720px){.backup-status-row{grid-template-columns:1fr}.backup-actions{justify-content:stretch}.backup-actions .btn{flex:1}.backup-last-run{display:grid}}

/* Shared authenticated content measure: client surfaces use the Admin cap while staying left aligned. */
:root{--authenticated-content-max:1520px;}
@media(min-width:981px){
  body.client-portal-mode .app-shell>.main>.topbar,
  body.client-portal-mode .app-shell>.main>#view.view,
  body.client-hub-mode .app-shell>.main>.topbar,
  body.client-hub-mode .app-shell>.main>#view.view{
    width:100%!important;
    max-width:var(--authenticated-content-max)!important;
    margin-left:0!important;
    margin-right:auto!important;
  }
  body.client-portal-mode .app-shell>.main>#view.view>.client-portal-view{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }
}

/* Final interaction layout guard: keep these rules after all historical theme blocks. */
.progress-track,
.shared-progress-track,
body.client-portal-mode #portal-home .progress-track{
  position:relative;
  width:100%;
  height:8px!important;
  margin-top:8px!important;
  overflow:hidden;
  border-radius:999px;
  background:rgba(128,128,128,.20)!important;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.22);
}
.progress-track>span,
.shared-progress-track>span{
  display:block!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:linear-gradient(90deg,var(--green-2),var(--gold))!important;
  box-shadow:0 0 14px rgba(85,185,133,.24);
  transition:width 420ms cubic-bezier(.2,.8,.2,1);
}
html[data-theme="light"] .progress-track,
html[data-theme="light"] .shared-progress-track{background:rgba(26,63,46,.16)!important;}
.modal-backdrop{
  display:grid;
  place-items:center!important;
  align-items:center!important;
  padding:18px!important;
  overflow:hidden!important;
}
.modal{
  display:flex!important;
  flex-direction:column;
  height:auto!important;
  max-height:calc(100dvh - 36px)!important;
  overflow:hidden!important;
}
.modal-head{flex:0 0 auto;}
.modal-body{min-height:0;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;}
.media-preview-open .modal{width:min(1240px,calc(100vw - 36px))!important;animation:performancePreviewIn 320ms cubic-bezier(.2,.8,.2,1) both;}
body.client-portal-mode .performance-net{max-width:100%;font-size:clamp(26px,2.4vw,32px);line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums;}

/* Compact Client Hub intake. The full operational schema remains available when editing. */
#modalBackdrop.client-intake-open .modal{
  width:min(660px,100%);
  max-height:min(90vh,760px);
}
#modalBackdrop.client-intake-open .modal-head{
  padding:18px 20px;
}
#modalBackdrop.client-intake-open .modal-body{
  padding:18px 20px 20px;
}
.client-intake-form{
  display:grid;
  gap:14px;
}
.client-intake-section{
  display:grid;
  gap:9px;
  padding-bottom:14px;
  border-bottom:1px solid var(--line);
}
.client-intake-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:18px;
}
.client-intake-section-head .spark{
  margin:0;
}
.client-intake-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 12px;
}
.client-intake-name,
.client-intake-grid .wide{
  grid-column:1/-1;
}
.client-intake-form .field{
  gap:6px;
}
.client-intake-form .field label{
  margin:0;
}
.client-intake-form input,
.client-intake-form select,
.client-intake-form textarea{
  min-height:44px;
}
.client-intake-form textarea{
  min-height:76px;
  resize:vertical;
}
.client-intake-followup{
  padding-bottom:0;
  border-bottom:0;
}
.client-intake-actions{
  margin-top:0;
  padding-top:2px;
}
.client-intake-actions .btn{
  min-width:132px;
}

/* Shared Admin/Sales client editor: essential fields first, details on demand. */
#modalBackdrop.client-edit-open .modal{
  width:min(760px,100%);
  max-height:min(92vh,860px);
}
#modalBackdrop.client-edit-open .modal-head{
  padding:18px 20px;
}
#modalBackdrop.client-edit-open .modal-body{
  padding:0 20px 20px;
}
.modal-description{
  margin:5px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}
.modal-description b{color:var(--gold)}
.client-edit-form{
  display:grid;
  gap:0;
}
.client-edit-required-mark{
  color:var(--gold);
  font-size:13px;
}
.client-edit-section{
  display:grid;
  gap:12px;
  padding:18px 0;
  border-bottom:1px solid var(--line);
}
.client-edit-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.client-edit-section-head h3{
  margin:4px 0 0;
  font-family:var(--font-display);
  font-size:20px;
}
.client-edit-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.client-edit-grid > .wide,
.client-edit-conditional.wide{
  grid-column:1/-1;
}
.client-edit-form .field label{
  margin-bottom:6px;
}
.client-edit-form .field textarea{
  min-height:76px;
}
.client-edit-required,
.client-edit-access-required{
  flex:0 0 auto;
  border-radius:999px;
  padding:3px 6px;
  font-size:8px;
  letter-spacing:.08em;
  white-space:nowrap;
}
.client-edit-required{
  background:rgba(200,162,74,.14);
  color:var(--gold);
}
.client-edit-access-required{
  background:rgba(216,154,61,.12);
  color:var(--amber);
}
.client-edit-field-help{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}
.client-edit-form input[readonly]{
  cursor:not-allowed;
  color:var(--muted);
  background:rgba(255,255,255,.025);
  border-style:dashed;
}
.client-intake-form .field small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}
.client-edit-input-with-action{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:stretch;
  gap:8px;
}
.client-edit-input-with-action .client-edit-input-action{
  min-height:44px;
  white-space:nowrap;
}
.client-edit-readiness{
  border:1px solid rgba(216,154,61,.30);
  border-radius:999px;
  padding:5px 9px;
  color:var(--amber);
  background:rgba(216,154,61,.10);
  font-size:10px;
  font-weight:900;
  white-space:nowrap;
}
.client-edit-readiness.ready{
  border-color:rgba(85,185,133,.28);
  color:var(--green-2);
  background:rgba(85,185,133,.10);
}
.client-edit-section-copy{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}
.client-account-access-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--input);
}
.client-account-status{
  display:grid;
  gap:4px;
}
.client-account-status span{
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.client-account-status strong{color:var(--gold-2);}
.client-account-status strong.ready{color:var(--green-2);}
.client-account-status strong.disabled{color:#f1a7a2;}
.client-account-actions{display:flex;justify-content:flex-end;gap:8px;}
.client-account-disable-warning{
  margin-top:10px;
  padding:13px 14px;
  border:1px solid rgba(217,83,79,.45);
  border-radius:8px;
  background:rgba(217,83,79,.09);
}
.client-account-disable-warning[hidden]{display:none!important;}
.client-account-disable-warning p{
  margin:0 0 10px;
  color:#f2c4c0;
  font-size:12px;
  line-height:1.5;
}
.client-account-disable-warning>div{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.client-edit-disclosure{
  border-bottom:1px solid var(--line);
}
.client-edit-disclosure summary{
  position:relative;
  display:flex;
  align-items:center;
  min-height:72px;
  padding:14px 42px 14px 0;
  cursor:pointer;
  list-style:none;
}
.client-edit-disclosure summary::-webkit-details-marker{
  display:none;
}
.client-edit-disclosure summary:after{
  content:"+";
  position:absolute;
  right:4px;
  top:50%;
  width:30px;
  height:30px;
  transform:translateY(-50%);
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:10px;
  color:var(--gold);
  background:var(--input);
  font-size:19px;
}
.client-edit-disclosure[open] summary:after{
  content:"-";
}
.client-edit-disclosure summary span{
  display:grid;
  gap:3px;
}
.client-edit-disclosure summary strong{
  font-family:var(--font-display);
  font-size:19px;
}
.client-edit-disclosure summary em{
  color:var(--muted);
  font-size:11px;
  font-style:normal;
}
.client-edit-disclosure-body{
  padding:2px 0 18px;
}
.client-edit-conditional{
  min-width:0;
}
.client-edit-conditional > .field{
  width:100%;
}
.client-edit-conditional > p{
  margin:0;
  padding:12px 14px;
  border:1px dashed var(--line);
  border-radius:14px;
  color:var(--muted);
  font-size:12px;
}
.client-edit-form .client-record-modal-actions{
  position:sticky;
  bottom:-20px;
  z-index:2;
  margin:0 -20px;
  padding:15px 20px 0;
  background:linear-gradient(180deg,rgba(16,30,23,0),var(--panel) 24%);
}
html[data-theme="light"] .client-edit-form .client-record-modal-actions{
  background:linear-gradient(180deg,rgba(255,253,247,0),var(--panel) 24%);
}
@media(max-width:620px){
  #modalBackdrop.client-intake-open{
    padding:10px;
  }
  #modalBackdrop.client-intake-open .modal{
    max-height:calc(100vh - 20px);
  }
  #modalBackdrop.client-intake-open .modal-head,
  #modalBackdrop.client-intake-open .modal-body{
    padding:15px;
  }
  .client-intake-grid{
    grid-template-columns:1fr;
  }
  .client-intake-actions .btn{
    width:100%;
  }
  #modalBackdrop.client-edit-open{
    padding:10px;
  }
  #modalBackdrop.client-edit-open .modal{
    max-height:calc(100vh - 20px);
  }
  #modalBackdrop.client-edit-open .modal-head{
    padding:15px;
  }
  #modalBackdrop.client-edit-open .modal-body{
    padding:0 15px 15px;
  }
  .client-edit-grid{
    grid-template-columns:1fr;
  }
  .client-edit-grid > .wide,
  .client-edit-conditional.wide{
    grid-column:auto;
  }
  .client-edit-input-with-action{
    grid-template-columns:1fr;
  }
  .client-edit-input-with-action .client-edit-input-action{
    width:100%;
  }
  .client-edit-section-head{
    align-items:flex-start;
  }
  .client-edit-readiness{
    white-space:normal;
    text-align:right;
  }
  .client-account-access-row{
    align-items:stretch;
    flex-direction:column;
  }
  .client-account-actions,
  .client-account-actions .btn{
    width:100%;
  }
  .client-account-actions .btn{justify-content:center;}
  .client-edit-form .client-record-modal-actions{
    bottom:-15px;
    margin:0 -15px;
    padding:15px;
  }
}

/* Shared Advisor launcher: Admin, Manager, and Sales use the client-facing mark. */
body:not(.client-portal-mode) #advisorTopBtn.platform-advisor-launcher{
  width:68px!important;
  height:68px!important;
  padding:4px!important;
  border-radius:22px!important;
  border:1px solid rgba(225,191,99,.34)!important;
  background:linear-gradient(145deg,rgba(16,31,24,.96),rgba(10,22,17,.96))!important;
  box-shadow:0 26px 70px rgba(0,0,0,.36)!important;
}
body:not(.client-portal-mode) #advisorTopBtn.platform-advisor-launcher .client-brand-mark{
  width:58px!important;
  height:58px!important;
  min-width:58px!important;
  min-height:58px!important;
  flex:0 0 58px!important;
}
body.client-portal-mode .readiness-action-btn{min-width:180px;}
body.client-portal-mode .old-support-clone.support-chat-card{
  display:flex!important;
  flex-direction:column;
  width:100%!important;
  max-width:1040px!important;
  height:calc(100dvh - 120px)!important;
  min-height:700px!important;
  max-height:900px!important;
  overflow:hidden!important;
}
body.client-portal-mode .old-support-clone .section-head.compact{flex:0 0 auto;}
body.client-portal-mode .old-support-clone .support-open-chat{display:flex!important;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden;}
body.client-portal-mode .old-support-clone .support-chat-messages{flex:1 1 auto;min-height:330px!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain;}
body.client-portal-mode .old-support-clone .support-quick-questions,
body.client-portal-mode .old-support-clone textarea,
body.client-portal-mode .old-support-clone .support-send-row,
body.client-portal-mode .old-support-clone .support-secondary-row{flex:0 0 auto;}
@media(max-width:620px){
  .modal-backdrop{padding:10px!important;}
  .modal{width:calc(100vw - 20px)!important;max-height:calc(100dvh - 20px)!important;}
  .media-preview-open .modal{width:calc(100vw - 20px)!important;}
  body.client-portal-mode .performance-net{font-size:30px;}
}
@media(max-height:820px){
  body.client-portal-mode .old-support-clone.support-chat-card{height:calc(100dvh - 86px)!important;min-height:0!important;max-height:calc(100dvh - 86px)!important;}
  body.client-portal-mode .old-support-clone .support-chat-messages{min-height:210px!important;}
}
/* Native client Product Handbook */
body.client-portal-mode .handbook-shell{
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  gap:16px;
}
body.client-portal-mode .handbook-nav{
  padding:18px;
}
body.client-portal-mode .handbook-nav h2{
  margin:6px 0 8px;
  font-family:var(--font-display);
  font-size:28px;
  font-weight:500;
  line-height:1.05;
}
body.client-portal-mode .handbook-nav>p{margin:0;line-height:1.5}
body.client-portal-mode .handbook-nav-list{margin-top:4px}
body.client-portal-mode .handbook-nav-list button{
  min-height:58px;
}
body.client-portal-mode .handbook-nav-list button:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:2px;
}
body.client-portal-mode .handbook-content{
  min-width:0;
  padding:20px;
  outline:none;
}
body.client-portal-mode .handbook-page-copy{display:grid;gap:20px}
body.client-portal-mode .handbook-intro.card{
  padding:0 0 20px;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.client-portal-mode .handbook-intro h1{
  max-width:760px;
  margin:8px 0 12px;
  font-family:var(--font-display);
  font-size:clamp(30px,3.5vw,48px);
  font-weight:500;
  line-height:.98;
}
body.client-portal-mode .handbook-intro p{max-width:850px;margin:0;color:var(--muted);line-height:1.7}
body.client-portal-mode .pro-reading-example{
  display:grid;
  gap:0;
  margin:0;
  overflow:hidden;
}
body.client-portal-mode .pro-reading-example img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:16/9;
  object-fit:contain;
  border:1px solid var(--line);
  background:#050907;
}
body.client-portal-mode .pro-reading-example figcaption{
  display:grid;
  gap:4px;
  padding:14px 0 0;
}
body.client-portal-mode .pro-reading-example figcaption strong{color:var(--cream)}
body.client-portal-mode .pro-reading-example figcaption span{color:var(--muted);line-height:1.55}
body.client-portal-mode .pro-reading-framework{
  display:grid;
  grid-template-columns:minmax(210px,.36fr) minmax(0,1fr);
  gap:clamp(28px,5vw,72px);
  padding-top:12px;
}
body.client-portal-mode .pro-reading-framework header{align-self:start;position:sticky;top:24px}
body.client-portal-mode .pro-reading-framework h2,
body.client-portal-mode .pro-reading-sequence h2{
  margin:7px 0 0;
  font-family:var(--font-display);
  font-size:clamp(25px,2.4vw,36px);
  font-weight:500;
  line-height:1.08;
}
body.client-portal-mode .pro-reading-steps{border-top:1px solid var(--line)}
body.client-portal-mode .pro-reading-step{
  display:grid;
  grid-template-columns:54px minmax(190px,.58fr) minmax(0,1fr);
  gap:20px;
  align-items:start;
  padding:25px 0;
  border-bottom:1px solid var(--line);
}
body.client-portal-mode .pro-reading-step-number{
  color:var(--gold);
  font-family:var(--font-display);
  font-size:.92rem;
  font-weight:700;
}
body.client-portal-mode .pro-reading-step h3{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(19px,1.45vw,24px);
  font-weight:500;
  line-height:1.16;
}
body.client-portal-mode .pro-reading-step p{margin:0;color:var(--muted);line-height:1.65}
body.client-portal-mode .pro-reading-sequence{
  display:grid;
  grid-template-columns:minmax(210px,.36fr) minmax(0,1fr);
  gap:clamp(28px,5vw,72px);
  padding:30px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
body.client-portal-mode .pro-reading-sequence ol{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 28px;
  margin:0;
  padding:0;
  list-style:none;
  counter-reset:pro-reading-order;
}
body.client-portal-mode .pro-reading-sequence li{
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  gap:12px;
  padding:13px 0;
  border-bottom:1px solid color-mix(in srgb,var(--line) 68%,transparent);
  color:var(--muted);
  line-height:1.5;
  counter-increment:pro-reading-order;
}
body.client-portal-mode .pro-reading-sequence li::before{
  content:counter(pro-reading-order,decimal-leading-zero);
  color:var(--gold);
  font-size:.78rem;
  font-weight:800;
}
body.client-portal-mode .pro-reading-risk{
  display:grid;
  grid-template-columns:minmax(120px,.2fr) minmax(0,1fr);
  gap:24px;
  padding:22px 0 22px 20px;
  border-left:3px solid var(--gold);
}
body.client-portal-mode .pro-reading-risk strong{font-family:var(--font-display);font-size:1.2rem;font-weight:500}
body.client-portal-mode .pro-reading-risk p{max-width:820px;margin:7px 0 0;color:var(--muted);line-height:1.6}
body.client-portal-mode .pro-reading-actions{justify-content:flex-end;margin-top:0}
body.client-portal-mode .handbook-card-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
body.client-portal-mode .handbook-card{padding:20px}
body.client-portal-mode .handbook-card h3{
  margin:0 0 8px;
  font-family:var(--font-display);
  font-size:1.2rem;
  font-weight:500;
}
body.client-portal-mode .handbook-card p{margin:0;color:var(--muted);line-height:1.6}
body.client-portal-mode .handbook-list{margin:14px 0 0;padding-left:20px;color:var(--muted)}
body.client-portal-mode .handbook-risk,
body.client-portal-mode .handbook-layer,
body.client-portal-mode .handbook-crosslinks,
body.client-portal-mode .handbook-sequence,
body.client-portal-mode .handbook-scope-table{padding:24px}
body.client-portal-mode .handbook-risk p{max-width:850px;color:var(--muted)}
body.client-portal-mode .handbook-layer h2,
body.client-portal-mode .handbook-scope-table h2{
  margin:8px 0 12px;
  font-family:var(--font-display);
  font-size:1.65rem;
  font-weight:500;
}
body.client-portal-mode .handbook-layer>p{max-width:880px;color:var(--muted);line-height:1.7}
body.client-portal-mode .handbook-notice{
  display:grid;
  gap:5px;
  margin:18px 0;
  padding:16px;
  border-left:3px solid var(--gold);
  background:var(--panel-soft);
}
body.client-portal-mode .handbook-notice span{color:var(--muted)}
body.client-portal-mode .handbook-related-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
body.client-portal-mode .handbook-sequence ol{margin:14px 0 0;padding-left:22px}
body.client-portal-mode .handbook-sequence li{padding:5px 0;color:var(--muted)}
body.client-portal-mode .handbook-image-section{display:grid;gap:12px}
body.client-portal-mode .handbook-image-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
body.client-portal-mode .handbook-image-grid.is-single{grid-template-columns:minmax(0,1fr)}
body.client-portal-mode .handbook-image-grid.is-pair{grid-template-columns:repeat(2,minmax(0,1fr))}
body.client-portal-mode .handbook-image-slot{
  margin:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel);
}
body.client-portal-mode .handbook-image-placeholder{
  display:grid;
  place-content:center;
  gap:6px;
  aspect-ratio:16/9;
  min-height:160px;
  color:var(--gold);
  text-align:center;
  background:
    linear-gradient(135deg,transparent 49.5%,color-mix(in srgb,var(--line) 55%,transparent) 50%,transparent 50.5%),
    var(--panel-soft);
}
body.client-portal-mode .handbook-image-placeholder strong{font-size:1.15rem}
body.client-portal-mode .handbook-image-placeholder span{color:var(--muted);font-size:.8rem}
body.client-portal-mode .handbook-image-slot figcaption{display:grid;gap:4px;padding:13px 15px}
body.client-portal-mode .handbook-image-slot figcaption span{color:var(--muted);font-size:.76rem}
body.client-portal-mode .handbook-command-reference{
  display:grid;
  gap:22px;
  min-width:0;
  padding:24px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel);
}
body.client-portal-mode .handbook-command-reference>header{display:grid;gap:8px;min-width:0}
body.client-portal-mode .handbook-command-reference>header h2,
body.client-portal-mode .handbook-command-reference>header p{margin:0}
body.client-portal-mode .handbook-command-reference>header p{max-width:900px;color:var(--muted);line-height:1.65}
body.client-portal-mode .handbook-command-groups{display:grid;gap:24px;min-width:0}
body.client-portal-mode .handbook-command-group{display:grid;gap:12px;min-width:0}
body.client-portal-mode .handbook-command-group-heading{display:grid;gap:4px;min-width:0}
body.client-portal-mode .handbook-command-group-heading h3,
body.client-portal-mode .handbook-command-group-heading p{margin:0;overflow-wrap:anywhere}
body.client-portal-mode .handbook-command-group-heading p{color:var(--muted);line-height:1.55}
body.client-portal-mode .handbook-command-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  min-width:0;
  margin:0;
}
body.client-portal-mode .handbook-command-action{
  display:grid;
  grid-template-columns:minmax(110px,150px) minmax(0,1fr);
  gap:12px;
  min-width:0;
  padding:13px 14px;
  border:1px solid var(--line);
  border-left:3px solid var(--gold);
  border-radius:6px;
  background:var(--panel-soft);
}
body.client-portal-mode .handbook-command-action dt,
body.client-portal-mode .handbook-command-action dd{min-width:0;margin:0;overflow-wrap:anywhere;word-break:normal}
body.client-portal-mode .handbook-command-action dt{color:var(--text);font-weight:800;line-height:1.4}
body.client-portal-mode .handbook-command-action dd{color:var(--muted);line-height:1.5}
body.client-portal-mode .handbook-scope-table table{width:100%;border-collapse:collapse}
body.client-portal-mode .handbook-scope-table th,
body.client-portal-mode .handbook-scope-table td{padding:12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
body.client-portal-mode .handbook-scope-table th{color:var(--gold);font-size:.72rem;text-transform:uppercase}
body.client-portal-mode .handbook-scope-table td:first-child{font-weight:700;white-space:normal;overflow-wrap:anywhere}
body.client-portal-mode .handbook-preflight{margin:0;padding:24px;list-style:none;counter-reset:preflight}
body.client-portal-mode .handbook-preflight li{
  display:grid;
  grid-template-columns:minmax(120px,180px) 1fr;
  gap:18px;
  padding:16px 0;
  border-bottom:1px solid var(--line);
  counter-increment:preflight;
}
body.client-portal-mode .handbook-preflight li:last-child{border-bottom:0}
body.client-portal-mode .handbook-preflight strong:before{content:counter(preflight,decimal-leading-zero) " ";color:var(--gold)}
body.client-portal-mode .handbook-preflight span{color:var(--muted)}
body.client-portal-mode .handbook-support-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body.client-portal-mode .handbook-pager{
  margin-top:24px;
}
@media(max-width:900px){
  body.client-portal-mode .handbook-shell{grid-template-columns:1fr}
  body.client-portal-mode .handbook-nav-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body.client-portal-mode .pro-reading-framework,
  body.client-portal-mode .pro-reading-sequence{grid-template-columns:1fr;gap:20px}
  body.client-portal-mode .pro-reading-framework header{position:static}
  body.client-portal-mode .handbook-command-actions{grid-template-columns:1fr}
}
@media(max-width:620px){
  body.client-portal-mode .pro-reading-step{grid-template-columns:40px minmax(0,1fr);gap:8px 12px;padding:20px 0}
  body.client-portal-mode .pro-reading-step p{grid-column:2}
  body.client-portal-mode .pro-reading-sequence ol{grid-template-columns:1fr}
  body.client-portal-mode .pro-reading-risk{grid-template-columns:1fr;gap:8px}
  body.client-portal-mode .handbook-card-grid,
  body.client-portal-mode .handbook-image-grid,
  body.client-portal-mode .handbook-support-grid,
  body.client-portal-mode .handbook-nav-list{grid-template-columns:1fr}
  body.client-portal-mode .handbook-content{padding:16px}
  body.client-portal-mode .handbook-command-reference{padding:18px}
  body.client-portal-mode .handbook-command-action{grid-template-columns:1fr;gap:5px}
  body.client-portal-mode .handbook-preflight li{grid-template-columns:1fr;gap:5px}
  body.client-portal-mode .handbook-pager{align-items:stretch;flex-direction:column}
  body.client-portal-mode .handbook-pager .btn{width:100%}
}
@media(prefers-reduced-motion:reduce){
  body.client-portal-mode .handbook-nav-list button{scroll-behavior:auto}
}

/* NinjaTrader 8 setup and maintenance training */
body.client-portal-mode .nt8-course-flow{
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
}
body.client-portal-mode .nt8-course-side{
  gap:12px;
}
body.client-portal-mode .nt8-course-side .portal-course-map{margin-top:0}
body.client-portal-mode .nt8-resource-label{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin:7px 2px 0;
  padding-top:12px;
  border-top:1px solid var(--line);
  color:var(--gold);
  font-size:.66rem;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
body.client-portal-mode .nt8-resource-label small{
  color:var(--muted);
  font-size:.64rem;
  letter-spacing:0;
  text-transform:none;
}
body.client-portal-mode .nt8-tier-rule{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 0;
  border-block:1px solid var(--line);
  color:var(--muted);
  font-size:.82rem;
}
body.client-portal-mode .nt8-course-main{min-width:0}
body.client-portal-mode .nt8-video-card{overflow:hidden}
body.client-portal-mode .nt8-video-frame{
  width:100%;
  aspect-ratio:16/9;
  overflow:hidden;
  background:#020805;
}
body.client-portal-mode .nt8-video-frame iframe{
  display:block;
  width:100%;
  height:100%;
  border:0;
}
body.client-portal-mode .nt8-safety-warning{
  display:grid;
  gap:7px;
  padding:16px 18px;
  border:1px solid color-mix(in srgb,var(--gold) 64%,var(--line));
  border-left:4px solid var(--gold);
  border-radius:8px;
  background:color-mix(in srgb,var(--gold) 7%,var(--panel));
}
body.client-portal-mode .nt8-safety-warning strong{line-height:1.55}
body.client-portal-mode .nt8-safety-warning.critical{
  border-color:color-mix(in srgb,#d25b55 70%,var(--line));
  border-left-color:#d25b55;
  background:color-mix(in srgb,#d25b55 8%,var(--panel));
}
body.client-portal-mode .nt8-related-resource,
body.client-portal-mode .nt8-support-resource,
body.client-portal-mode .nt8-weekly-shortcut{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
body.client-portal-mode .nt8-related-resource>div,
body.client-portal-mode .nt8-support-resource>div,
body.client-portal-mode .nt8-weekly-shortcut>div{min-width:0}
body.client-portal-mode .nt8-completion-copy{
  padding:14px 16px;
  border-left:3px solid var(--green);
  color:var(--text);
  background:color-mix(in srgb,var(--green) 8%,var(--panel));
}
@media(max-width:900px){
  body.client-portal-mode .nt8-course-flow{grid-template-columns:1fr}
  body.client-portal-mode .nt8-course-side{position:static}
}
@media(max-width:620px){
  .training-video-footer.compact,
  .training-video-actions{align-items:stretch;flex-direction:column}
  .training-video-footer .btn{width:100%}
  body.client-portal-mode .nt8-related-resource,
  body.client-portal-mode .nt8-support-resource,
  body.client-portal-mode .nt8-weekly-shortcut{
    align-items:stretch;
    flex-direction:column;
  }
  body.client-portal-mode .nt8-related-resource .btn,
  body.client-portal-mode .nt8-support-resource .btn,
  body.client-portal-mode .nt8-weekly-shortcut .btn{width:100%}
}

/* Approved Kaivalya brand artwork. Keep supplied PNGs unmodified. */
.brand-logo-primary,
.brand-mark-image{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  object-fit:contain;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
}
.shell-brand-logo{
  width:auto;
  height:80px;
  max-width:100%;
}
.brand-mark-image{
  width:40px;
  height:40px;
  flex:0 0 40px;
}
.mobile-brand-image{width:38px;height:38px}
.advisor-brand-image{width:100%;height:100%}
.advisor-orb .brand-mark-image,
.advisor-mini-brand .brand-mark-image,
.profile-control-icon-logo .brand-mark-image{
  width:100%;
  height:100%;
}
.platform-boot-logo{
  width:82px;
  height:82px;
  object-fit:contain;
  border-radius:0;
  filter:none;
}
.auth-brand-logo{
  width:128px;
  height:128px;
  max-width:min(100%,128px);
  justify-self:center;
}
.client-auth-logo{
  width:112px;
  height:112px;
  max-width:min(100%,112px);
}
.client-auth-brand.centered{
  display:grid;
  justify-items:center;
  text-align:center;
}
@media(max-width:720px){
  .shell-brand-logo{height:50px}
  .auth-brand-logo{width:96px;height:96px;max-width:96px}
  .client-auth-logo{width:84px;height:84px;max-width:84px}
}

/* Client records use grouped operational sections instead of a flat field wall. */
.client-detail-workspace{display:grid;gap:16px}
.client-detail-section{border-top:1px solid var(--line);padding-top:14px}
.client-detail-section:first-child{border-top:0;padding-top:0}
.client-detail-section-head{margin-bottom:10px}
.client-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px}
.client-detail-item{min-width:0;padding:2px 0 10px;border-bottom:0}
.client-detail-item.wide{grid-column:1/-1}
.client-detail-item span{display:block;margin-bottom:5px;color:var(--muted);font-size:9px;font-weight:900;letter-spacing:.13em;text-transform:uppercase}
.client-detail-item p{margin:0;color:var(--text);font-size:13px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}
.client-detail-actions{justify-content:flex-end;margin-top:18px}

/* Client Hub operational view */
.client-hub-filter-row{grid-template-columns:minmax(260px,1.5fr) repeat(3,minmax(150px,.65fr)) auto;align-items:end}
.client-hub-clear{width:auto;min-width:68px;padding-inline:16px}
.client-name-link{display:inline-flex;align-items:center;gap:8px;width:max-content;max-width:100%;padding:0;border:0;background:transparent;color:var(--text);font:inherit;font-weight:900;text-align:left;cursor:pointer}
.client-name-link:hover,.client-name-link:focus-visible{color:var(--gold-2)}
.client-name-search{display:inline-grid;place-items:center;width:20px;height:20px;border:0;background:transparent;color:var(--gold-2);font-size:15px;line-height:1;flex:0 0 auto}
.client-detail-operations{grid-column:1/-1}
.client-detail-operation-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.client-detail-action-note{margin:10px 0 0;color:var(--muted);font-size:12px}
@media(max-width:1240px){.client-hub-filter-row{grid-template-columns:repeat(2,minmax(0,1fr))}.client-hub-search{grid-column:1/-1}.client-hub-clear{justify-self:start}}
@media(max-width:760px){.client-hub-filter-row{grid-template-columns:1fr}.client-hub-search{grid-column:auto}.client-name-link{width:100%;justify-content:space-between}}
.schedule-scope-notice{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:14px;padding:13px 16px;border:1px solid var(--line);border-left:3px solid var(--green);border-radius:8px;background:color-mix(in srgb,var(--green) 7%,var(--panel))}
.schedule-scope-notice strong{font-family:var(--font-display);font-size:17px}
.schedule-scope-notice span{max-width:760px;color:var(--muted);font-size:12px;line-height:1.5;text-align:right}
.client-hub-filter-row{grid-template-columns:minmax(220px,420px) auto}
.training-leave-actions{display:flex;align-items:center;width:100%}
.training-leave-actions .training-warning-preference{margin-right:auto}
.training-warning-preference{display:flex;align-items:center;gap:8px;width:max-content;margin:0;color:var(--muted);font-size:11px;line-height:1;cursor:pointer}
.training-warning-preference input{width:15px;height:15px;margin:0;accent-color:var(--green-2)}
.training-warning-preference:has(input:disabled){opacity:.6;cursor:wait}
.nt8-dashboard-recovery{display:grid;gap:16px;padding:20px}
.nt8-dashboard-recovery h3{margin:4px 0 8px}
.nt8-dashboard-recovery p{margin:0;color:var(--muted);line-height:1.6}
.nt8-recovery-steps{display:grid;gap:10px;margin:0;padding-left:22px;color:var(--text);line-height:1.55}
.nt8-file-risk{border:1px solid rgba(209,79,62,.55);border-left:4px solid #d14f3e;border-radius:8px;background:rgba(209,79,62,.08);padding:14px 16px}
.nt8-file-risk strong{display:block;margin-bottom:5px;color:#ffb2a8}
.nt8-file-risk p{color:var(--text)}
@media(max-width:700px){
  .client-detail-grid{grid-template-columns:1fr}
  .client-detail-item.wide{grid-column:auto}
  .schedule-scope-notice{align-items:flex-start;flex-direction:column}
  .schedule-scope-notice span{text-align:left}
  .client-hub-filter-row{grid-template-columns:1fr}
  .training-leave-actions{display:grid;grid-template-columns:1fr 1fr}
  .training-leave-actions .training-warning-preference{grid-column:1/-1;margin:0 0 8px}
}

/* Client records: matching Client / Billing / Sales navigation in view and edit. */
.client-record-tabs{
  display:inline-flex;
  align-items:center;
  gap:9px;
  width:max-content;
  max-width:100%;
  margin:16px 0;
  padding:0;
  border:0;
  background:transparent;
}
.client-record-tab{
  min-height:40px;
  padding:9px 18px;
  border:1px solid color-mix(in srgb,var(--gold) 56%,transparent);
  border-radius:6px;
  background:color-mix(in srgb,var(--gold) 8%,var(--panel));
  color:var(--gold-2);
  font-weight:900;
  cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(255,221,132,.04);
  transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.client-record-tab:hover,.client-record-tab:focus-visible{border-color:var(--gold);color:var(--gold);outline:none;box-shadow:0 0 18px rgba(216,154,61,.2)}
.client-record-tab.active{background:linear-gradient(135deg,var(--gold),var(--gold-2));border-color:var(--gold-2);color:#171207;box-shadow:0 8px 24px rgba(216,154,61,.34),0 0 18px rgba(216,154,61,.2)}
.client-record-panel[hidden]{display:none!important}
.client-record-panel{min-width:0}
.client-record-panel>.client-detail-section:first-child,
.client-record-panel>.client-edit-section:first-child{border-top:0}

/* Leave room for the persistent Growth Advisor control on every authenticated view. */
.main{padding-bottom:max(120px,calc(96px + env(safe-area-inset-bottom)))}

/* Client Hub identity treatment and compact two-column primary row. */
.client-card-primary{grid-template-columns:minmax(240px,1fr) auto!important}
.client-name-link>span:first-child{color:var(--gold-2);font-size:18.6px;line-height:1.15}
.client-name-link:hover>span:first-child,.client-name-link:focus-visible>span:first-child{color:var(--gold)}
.client-card-name>span{margin-top:3px}
@media(max-width:620px){
  .client-record-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
  .client-record-tab{min-width:0;padding-inline:8px}
  .main{padding-bottom:max(128px,calc(104px + env(safe-area-inset-bottom)))}
}

/* Client Hub lead rows and modal date controls. */
.lead-hub-row{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  padding:14px 16px;
}
.lead-hub-identity{display:grid;gap:4px;min-width:0}
.lead-hub-identity strong{color:var(--gold-2);font-size:17px;line-height:1.2}
.lead-hub-identity span{color:var(--muted);font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.lead-hub-identity .lead-call-pill,.lead-hub-identity .lead-lifecycle-pill{justify-self:start;width:auto;color:var(--green-2)}
.lead-call-detail{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;margin-top:4px}
.lead-call-detail>span:not(.status){font-size:12px;color:var(--muted)}
.lead-call-detail b{color:var(--text)}
.lead-calendar-link{border:0;background:transparent;color:var(--gold-2);font:inherit;font-size:12px;font-weight:900;padding:2px 0;text-decoration:underline;text-underline-offset:3px}
.client-hub-tab-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.client-hub-view-toggle{display:flex!important;gap:7px!important}
.client-hub-refresh.action-icon-btn,.client-hub-view-toggle .action-icon-btn{color:#aeb6b1;border-color:rgba(174,182,177,.44)}
.client-hub-view-toggle .action-icon-btn{width:36px;height:36px;border-radius:11px}
.client-hub-view-toggle .action-icon-btn.active{color:var(--gold-2);border-color:rgba(225,191,99,.62);background:rgba(225,191,99,.14);box-shadow:0 0 18px rgba(225,191,99,.12)}
.client-hub-grid-view{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.client-hub-grid-view .client-hub-card{height:100%;align-content:space-between}
.lead-hub-edit{min-width:72px}
.client-delete-action,.client-edit-action{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--input);
  color:var(--muted);
  font-size:17px;
  line-height:1;
}
.client-delete-action:hover,.client-delete-action:focus-visible{border-color:rgba(228,93,107,.48);color:var(--red);outline:none;box-shadow:0 0 14px rgba(228,93,107,.12)}
.client-edit-action:hover,.client-edit-action:focus-visible{border-color:var(--gold);color:var(--gold-2);outline:none;box-shadow:0 0 14px rgba(216,154,61,.16)}
.client-card-secondary{grid-template-columns:minmax(240px,1fr) auto!important}
.pipeline-conversion-membership[hidden]{display:none!important}
.pipeline-conversion-membership>.field{height:100%}
.modal input[type="date"]{color-scheme:dark}
.modal input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(1) brightness(2);opacity:.9}
html[data-theme="light"] .modal input[type="date"]{color-scheme:light}
html[data-theme="light"] .modal input[type="date"]::-webkit-calendar-picker-indicator{filter:none;opacity:.75}
@media(max-width:620px){
  .lead-hub-row{grid-template-columns:minmax(0,1fr) auto;gap:10px}
  .lead-hub-identity span{white-space:normal}
  .client-hub-grid-view{grid-template-columns:1fr}
}

/* Persisted client agreement */
.agreement-preview{display:grid;gap:18px}
.agreement-signature-record>span{color:var(--gold);font-size:9px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.agreement-preview-box{padding:18px;border:1px solid var(--line);background:var(--panel)}
.agreement-preview-box>p{margin-top:0;white-space:pre-wrap}
.agreement-legal-links{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.agreement-legal-links a{color:var(--gold);font-size:12px}
.agreement-signing{display:grid;gap:14px;padding:18px;border-left:3px solid var(--gold);background:color-mix(in srgb,var(--gold) 7%,var(--panel))}
.agreement-signing-readiness{display:grid;gap:3px;padding:10px 12px;border:1px solid var(--gold);background:color-mix(in srgb,var(--gold) 8%,transparent);font-size:12px;line-height:1.45}
.agreement-signing-readiness strong{color:var(--cream)}
.agreement-signing-readiness span{color:var(--muted)}
.agreement-confirm{display:flex;align-items:flex-start;gap:10px;color:var(--muted);font-size:12px;line-height:1.5}
.agreement-confirm input{width:17px;height:17px;flex:0 0 17px;margin-top:2px;accent-color:var(--green-2)}
.agreement-signing .btn{justify-self:end}
.agreement-signature-record{display:grid;gap:5px;padding:18px;border-left:3px solid var(--green);background:color-mix(in srgb,var(--green) 9%,var(--panel))}
.agreement-signature-record strong{font-family:var(--font-display);font-size:20px}
.agreement-signature-record p{margin:5px 0 0;color:var(--muted);font-size:12px}
.agreement-document-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:2px}
.agreement-document-head h2{margin:5px 0 8px}
.agreement-summary{overflow:hidden;border:1px solid var(--line);background:color-mix(in srgb,var(--panel) 94%,var(--green) 6%)}
.agreement-summary>h3{margin:0;padding:11px 14px;border-bottom:1px solid var(--line);font-size:1rem}
.agreement-summary-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.agreement-summary-groups>section{min-width:0;padding:10px 14px 12px}
.agreement-summary-groups>section+section{border-left:1px solid var(--line)}
.agreement-summary-groups h4{margin:0 0 5px;color:var(--gold);font-size:9px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.agreement-summary-groups dl{margin:0}
.agreement-summary-row{display:grid;grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr);gap:12px;padding:5px 0;border-bottom:1px solid color-mix(in srgb,var(--line) 55%,transparent)}
.agreement-summary-row:last-child{border-bottom:0}
.agreement-summary-row dt{color:var(--muted);font-size:11px}
.agreement-summary-row dd{min-width:0;margin:0;color:var(--text);font-size:12px;font-weight:750;text-align:right;overflow-wrap:anywhere}
.agreement-native-document{padding:6px 2px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.agreement-native-section{padding:18px 0;border-bottom:1px solid color-mix(in srgb,var(--line) 70%,transparent)}
.agreement-native-section:last-of-type{border-bottom:0}
.agreement-native-section h3{margin:0 0 10px;font-size:1.05rem}
.agreement-native-section p{margin:0 0 10px;line-height:1.65}
.agreement-native-section li{margin:0 0 8px;line-height:1.55}
.agreement-gate-note{margin:16px 0 0;padding:12px 14px;border:1px solid var(--gold);background:color-mix(in srgb,var(--gold) 9%,transparent);color:var(--cream)}
.portal-course-step.is-locked{opacity:.62;cursor:not-allowed}
.portal-course-step.is-locked .step-mark{font-size:.62rem;letter-spacing:0}

/* Approved handbook captures */
.handbook-image-slot.has-image{overflow:hidden}
.handbook-image-button{position:relative;display:block;width:100%;padding:0;border:0;background:#050807;cursor:zoom-in}
.handbook-image-button img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:contain}
.handbook-image-button>span{position:absolute;right:10px;bottom:10px;padding:7px 9px;border:1px solid var(--line);background:rgba(3,14,10,.88);color:var(--text);font-size:10px;font-weight:800}
@media(max-width:480px){
  .agreement-document-head{display:block}
  .agreement-document-head .badge{margin-top:12px}
  .agreement-native-document{padding-right:2px}
  .agreement-summary-groups{grid-template-columns:1fr}
  .agreement-summary-groups>section+section{border-top:1px solid var(--line);border-left:0}
  .agreement-summary-row{grid-template-columns:minmax(95px,.8fr) minmax(0,1.2fr)}
}
.client-support-intake{margin-bottom:20px}
.client-support-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.client-support-wide{grid-column:1/-1}
.client-support-status{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;padding:16px;margin:0 0 18px;border:1px solid var(--line);background:var(--panel-2)}
.client-support-status.has-failure{border-color:var(--gold)}
.support-delivery-grid{display:grid;gap:6px;font-size:13px}
.support-delivery-grid span{display:flex;justify-content:space-between;gap:16px}
.support-delivery-grid strong{text-transform:capitalize}
@media(max-width:700px){.client-support-fields,.client-support-status{grid-template-columns:1fr}.client-support-wide{grid-column:auto}}

/* Training videos share VEGA's full-card-width media treatment. */
body.client-portal-mode .portal-course-main .portal-video-module.training-video-card{
  display:block!important;
  width:100%;
  min-width:0;
  padding:18px!important;
}
body.client-portal-mode .portal-course-main .portal-video-module.training-video-card .video-placeholder.course-video{
  width:100%;
  min-height:0!important;
  aspect-ratio:16/9;
}
body.client-portal-mode .portal-course-main .training-video-placeholder-footer{
  display:grid;
  gap:10px;
  padding-top:14px;
}
body.client-portal-mode .portal-course-main .training-video-placeholder-footer .btn{
  justify-self:start;
}

/* Client Portal login: calm hierarchy with an unframed form surface. */
.platform-auth{
  place-items:center!important;
  padding:32px!important;
  background:
    radial-gradient(circle,rgba(225,191,99,.075) 0 1px,transparent 1.5px) 0 0/28px 28px,
    radial-gradient(circle at 18% 14%,rgba(225,191,99,.13),transparent 32%),
    radial-gradient(circle at 82% 78%,rgba(47,122,87,.18),transparent 38%),
    linear-gradient(145deg,#04130d,#0b2a1d 54%,#03100b)!important;
}
.platform-auth-card{
  width:min(760px,calc(100vw - 48px))!important;
  gap:30px!important;
  padding:44px 28px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.auth-brand-row{
  display:grid!important;
  justify-items:center!important;
  gap:34px!important;
  padding:0!important;
  text-align:center!important;
}
.auth-brand-lockup{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:24px;
}
.auth-brand-lockup:after{
  content:"";
  order:1;
  width:1px;
  height:54px;
  background:rgba(225,191,99,.42);
}
.auth-brand-lockup .auth-brand-logo{
  width:82px;
  height:82px;
  max-width:82px;
}
.auth-brand-lockup .spark{
  order:2;
  color:var(--gold-2);
  font-size:12px;
  letter-spacing:.34em;
  white-space:nowrap;
}
.auth-heading{display:grid;justify-items:center;gap:14px}
.platform-auth-card .auth-heading h1{
  max-width:690px;
  margin:0!important;
  font-size:clamp(42px,6vw,60px)!important;
  font-weight:600!important;
  line-height:1.14!important;
  text-wrap:balance;
}
.platform-auth-card .auth-intro{
  max-width:560px;
  margin:0!important;
  font-size:16px;
  line-height:1.55;
}
.auth-form-card{
  width:min(620px,100%)!important;
  gap:20px!important;
  padding:32px 0 0!important;
  border:0!important;
  border-top:1px solid rgba(225,191,99,.38)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.platform-auth-card .field{display:grid;gap:9px}
.auth-field-label-row{display:flex;align-items:center;justify-content:space-between;gap:16px}
.platform-auth-card .field label{
  margin:0!important;
  color:var(--gold-2);
  font-size:11px;
  font-weight:900;
  letter-spacing:.18em;
  text-transform:uppercase;
}
.platform-auth-card .field input{
  height:56px!important;
  padding:0 18px;
  border:1px solid rgba(225,191,99,.34)!important;
  border-radius:8px!important;
  background:#030c08!important;
  font-size:16px;
}
.auth-inline-help{
  padding:0;
  border:0;
  border-bottom:1px solid currentColor;
  background:transparent;
  color:var(--gold-2);
  font:inherit;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.auth-inline-help:hover,.auth-inline-help:focus-visible{color:var(--cream)}
.platform-auth-card .auth-primary-btn{
  height:54px!important;
  min-width:220px;
  margin-top:2px;
  border-radius:8px!important;
  background:var(--green-2)!important;
  box-shadow:none!important;
}
.auth-submit-row{display:flex;justify-content:center}
.auth-submit-row .auth-primary-btn{width:50%!important;min-width:0}
.auth-help-row{display:flex;justify-content:center;padding-top:2px}
@media(max-width:640px){
  .platform-auth{padding:20px!important;align-items:start!important}
  .platform-auth-card{width:100%!important;padding:30px 0!important;gap:24px!important}
  .auth-brand-row{gap:26px!important}
  .auth-brand-lockup{gap:16px}
  .auth-brand-lockup:after{height:42px}
  .auth-brand-lockup .auth-brand-logo{width:64px;height:64px;max-width:64px}
  .auth-brand-lockup .spark{font-size:10px;letter-spacing:.26em}
  .platform-auth-card .auth-heading h1{font-size:clamp(36px,11vw,48px)!important}
  .platform-auth-card .auth-intro{font-size:14px}
  .auth-form-card{padding-top:24px!important;gap:17px!important}
  .auth-submit-row .auth-primary-btn{width:100%!important}
}
@media(max-width:700px){
  body.client-portal-mode .portal-course-main .portal-video-module.training-video-card{padding:12px!important}
}
/* Meta Lead Ads live admin report */
.meta-lead-report{border:1px solid var(--line);border-radius:20px;padding:16px;background:linear-gradient(145deg,rgba(15,77,53,.15),rgba(225,191,99,.04));display:grid;gap:14px;min-width:0}
.meta-report-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.meta-report-head h3{font-family:var(--font-display);font-size:22px;line-height:1.1;margin:4px 0 5px}
.meta-report-head p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}
.meta-report-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.meta-report-actions .status i{width:7px;height:7px;border-radius:50%;background:currentColor}
.integration-status.running{background:rgba(47,122,87,.30);color:#86e4ac;border-color:rgba(134,228,172,.38)}
.integration-status.stopped,.integration-status.needs-setup{background:rgba(216,154,61,.14);border-color:rgba(216,154,61,.30);color:var(--amber)}
.meta-result-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.meta-result-grid>div{border:1px solid var(--line);border-radius:15px;padding:12px;background:rgba(128,128,128,.04);display:grid;gap:5px;min-width:0}
.meta-result-grid span{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:900;line-height:1.35}
.meta-result-grid strong{font-size:25px;line-height:1;color:var(--text)}
.meta-quality-section{display:grid;gap:10px}
.meta-quality-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}
.meta-quality-grid>div{overflow:hidden;border:1px solid var(--line);border-radius:15px;padding:12px;background:rgba(128,128,128,.04);display:grid;gap:4px;min-width:0}
.meta-quality-grid span{font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-weight:900;overflow-wrap:anywhere}
.meta-quality-grid strong{font-size:22px;color:var(--text)}
.meta-quality-grid small{font-size:10px;color:var(--mint)}
.meta-report-timing{display:flex;gap:12px 24px;flex-wrap:wrap;padding:0 2px;color:var(--muted);font-size:11px}
.meta-report-timing strong{color:var(--text);font-weight:800}
.meta-result-list{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:rgba(128,128,128,.025)}
.meta-result-list-head{display:flex;justify-content:space-between;gap:12px;padding:11px 13px;border-bottom:1px solid var(--line);font-size:12px}
.meta-result-list-head span{color:var(--muted)}
.meta-result-row{display:grid;grid-template-columns:minmax(150px,1fr) auto auto 72px;gap:10px;align-items:center;padding:11px 13px;border-bottom:1px solid var(--line);min-width:0}
.meta-result-row:last-child{border-bottom:0}
.meta-result-row>div{display:grid;gap:3px;min-width:0}
.meta-result-row>div strong,.meta-result-row>div span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meta-result-row>div span,.meta-attempts{font-size:10px;color:var(--muted)}
.meta-result-row .status{text-transform:capitalize;font-size:10px}
.meta-report-loading,.meta-report-error{padding:18px;border:1px dashed var(--line-strong);border-radius:15px;color:var(--muted);text-align:center}
.meta-report-error{display:grid;gap:8px;justify-items:center;color:var(--red)}
.meta-report-inline-error{border:1px solid rgba(228,93,107,.28);background:rgba(228,93,107,.1);color:var(--red);border-radius:12px;padding:9px 11px;font-size:11px}
.meta-campaign-section{display:grid;gap:10px;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:rgba(128,128,128,.025)}.meta-campaign-section>.meta-result-list-head{align-items:end}.meta-result-list-head>div{display:grid;gap:3px}.meta-result-list-head>div span{font-size:10px}.meta-campaign-filter{display:grid;grid-template-columns:auto minmax(180px,260px);align-items:center;gap:8px}.meta-campaign-filter>span{font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.1em}.meta-campaign-filter select{height:36px;padding:7px 32px 7px 10px}.meta-campaign-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:0 12px}.meta-campaign-summary article{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--input);font-size:10px}.meta-campaign-summary article>div{grid-column:1/-1;display:grid;gap:2px;min-width:0}.meta-campaign-summary article strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.meta-campaign-summary article span{color:var(--muted)}.meta-ad-table{display:grid;border-top:1px solid var(--line)}.meta-ad-row{display:grid;grid-template-columns:minmax(180px,1.5fr) minmax(120px,1fr) repeat(4,minmax(58px,.45fr));gap:10px;align-items:center;padding:10px 13px;border-bottom:1px solid var(--line);font-size:11px}.meta-ad-row:last-child{border-bottom:0}.meta-ad-row>div{display:grid;gap:2px;min-width:0}.meta-ad-row strong,.meta-ad-row small,.meta-ad-row>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.meta-ad-row small{color:var(--muted)}.meta-ad-head{color:var(--gold);font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.meta-campaign-section>.micro{padding:0 13px 12px;margin:0}
.meta-campaign-auth{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 13px;border-bottom:1px solid var(--line);background:rgba(214,168,35,.055)}.meta-campaign-auth>div{display:grid;gap:3px}.meta-campaign-auth strong{font-size:12px}.meta-campaign-auth span{color:var(--muted);font-size:10px;line-height:1.45}.meta-campaign-auth.ready{background:rgba(52,190,129,.07)}.meta-manual-campaign{margin:0 12px;border:1px solid var(--line);border-radius:8px;background:var(--input)}.meta-manual-campaign summary{padding:11px 12px;color:var(--gold);font-size:11px;font-weight:900;cursor:pointer}.meta-manual-campaign form{padding:0 12px 12px}.meta-manual-campaign .integration-actions{align-items:center;justify-content:space-between}.meta-campaign-summary article small{grid-column:1/-1;color:var(--gold);font-size:9px;text-transform:uppercase}
@media(max-width:1100px){.meta-quality-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:820px){.meta-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.meta-quality-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.meta-result-row{grid-template-columns:minmax(130px,1fr) auto}.meta-attempts{display:none}.meta-report-head{display:grid}.meta-report-actions{justify-content:flex-start}.meta-campaign-section>.meta-result-list-head{align-items:stretch;display:grid}.meta-campaign-filter{grid-template-columns:1fr}.meta-campaign-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.meta-campaign-auth{align-items:flex-start;flex-direction:column}.meta-ad-table{overflow-x:auto}.meta-ad-row{min-width:720px}}
@media(max-width:480px){.meta-result-grid{grid-template-columns:1fr 1fr}.meta-result-grid strong{font-size:21px}.meta-result-row{grid-template-columns:1fr auto}.meta-result-row .btn{grid-column:1/-1;width:100%}}

/* Meta Ads campaign hub */
.meta-hub-detail{display:grid;gap:15px}.meta-hub-title{padding-bottom:0}.meta-settings-drawer{border:1px solid var(--line);border-radius:14px;background:var(--input);overflow:hidden}.meta-settings-drawer>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;cursor:pointer;color:var(--gold);list-style:none}.meta-settings-drawer>summary::-webkit-details-marker{display:none}.meta-settings-drawer>summary>span:first-child{display:grid;gap:2px}.meta-settings-drawer>summary strong{font-size:12px}.meta-settings-drawer>summary small{color:var(--muted);font-size:10px;font-weight:500}.meta-settings-content{display:grid;gap:15px;padding:0 15px 15px;border-top:1px solid var(--line)}.meta-settings-content .account-detail-table{margin-top:15px}.meta-hub-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.meta-hub-kpis>div{display:grid;gap:5px;padding:14px;border:1px solid var(--line);border-radius:13px;background:var(--input)}.meta-hub-kpis span{color:var(--muted);font-size:9px;font-weight:900;letter-spacing:.11em;text-transform:uppercase}.meta-hub-kpis strong{font-size:24px;color:var(--text)}.meta-hub-kpis small{color:var(--muted);font-size:10px}.meta-hub-refresh .advisor-orbit-loader{width:20px!important;height:20px!important}.meta-campaign-summary{grid-template-columns:1fr;padding-bottom:12px}.meta-campaign-summary article{display:grid;grid-template-columns:1fr;gap:12px;padding:14px;border-radius:13px}.meta-campaign-title{display:flex!important;grid-column:auto!important;align-items:flex-start;justify-content:space-between;gap:12px}.meta-campaign-title>div{display:grid;gap:3px;min-width:0}.meta-campaign-title strong{font-size:14px}.meta-campaign-title small{color:var(--muted);font-size:9px}.meta-campaign-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.meta-campaign-metrics>span{display:grid;gap:4px;padding:9px;border:1px solid var(--line);border-radius:9px;background:rgba(128,128,128,.04)}.meta-campaign-metrics small{color:var(--muted);font-size:8px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.meta-campaign-metrics strong{font-size:15px}.meta-campaign-summary article footer{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:9px}.meta-campaign-section>.meta-result-list-head{align-items:end}
@media(max-width:1000px){.meta-hub-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.meta-campaign-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.meta-hub-kpis{grid-template-columns:1fr 1fr}.meta-campaign-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.meta-campaign-summary article footer{display:grid}.meta-hub-title{display:flex}.meta-settings-content{padding-inline:11px}}

body.client-portal-mode .client-support-tab-panel{width:100%;min-width:0}
body.client-portal-mode .client-support-tab-panel>.support-panel,
body.client-portal-mode .client-support-tab-panel>.client-support-intake{width:100%;max-width:none}
body.client-portal-mode .client-support-tab-panel .support-chat-messages{min-height:clamp(440px,56vh,680px)!important;max-height:68vh!important;overflow-y:auto!important}
body.client-portal-mode .support-composer{display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:end;gap:8px;border:1px solid var(--line);border-radius:8px;padding:7px;background:var(--panel-2)}
body.client-portal-mode .support-composer textarea{width:100%!important;height:44px!important;min-height:44px!important;max-height:64px!important;resize:none!important;border:0!important;background:transparent!important;padding:10px 12px!important;overflow-y:auto!important}
body.client-portal-mode .support-composer textarea:focus{box-shadow:none;outline:1px solid var(--gold)}
body.client-portal-mode .support-composer-send{width:42px;height:42px;border:1px solid color-mix(in srgb,var(--green) 75%,var(--line));border-radius:7px;background:var(--green);color:#fff;display:grid;place-items:center;cursor:pointer;font-size:20px}
body.client-portal-mode .support-composer-send:disabled{cursor:wait;opacity:.62}
body.client-portal-mode .nt8-support-resource{margin-top:20px}

/* Shared typography: 12pt-equivalent body copy without inflating labels or microcopy. */
body p:not(.micro){font-size:1rem!important;line-height:1.55}

body.client-portal-mode .client-login-only-page{position:relative}
body.client-portal-mode .client-auth-home-link{position:absolute;top:22px;left:24px;z-index:2;display:inline-flex;align-items:center;gap:8px;color:var(--gold);font-weight:800;text-decoration:none}
body.client-portal-mode .client-auth-home-link:hover{color:var(--text)}
@media(max-width:560px){body.client-portal-mode .client-auth-home-link{top:14px;left:16px}}
/* Mission Control email journey board */
body:is(.mission-control-mode,.email-hub-mode) .mission-email-section{display:grid;gap:16px;min-width:0;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-summary{grid-template-columns:repeat(4,minmax(0,1fr));}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-board{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:14px;align-items:start;min-width:0;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-lane{display:grid;gap:10px;min-width:0;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-lane-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 3px 8px;border-bottom:2px solid var(--gold);}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-lane-head h3{font-size:13px;text-transform:uppercase;letter-spacing:.08em;overflow-wrap:anywhere;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-lane-head span{display:grid;place-items:center;min-width:24px;height:24px;border:1px solid var(--border);border-radius:50%;font-size:11px;font-weight:900;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-lane-stack{display:grid;gap:10px;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-card{display:grid;gap:10px;min-width:0;padding:15px;border-left:4px solid var(--gold);}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-implemented{border-left-color:var(--green);}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-disabled{border-left-color:var(--muted);}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-internal{border-left-color:var(--blue);}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;min-width:0;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-card-head h3{font-size:16px;line-height:1.25;overflow-wrap:anywhere;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-card .status{flex:0 0 auto;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-provider{margin:0;color:var(--text);font-size:12px;font-weight:800;overflow-wrap:anywhere;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-card dl{display:grid;gap:8px;margin:0;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-card dl div{display:grid;gap:2px;min-width:0;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-card dt{color:var(--gold-2);font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-card dd{margin:0;color:var(--muted);font-size:12px;line-height:1.45;overflow-wrap:anywhere;}
@media(max-width:1180px){body:is(.mission-control-mode,.email-hub-mode) .mission-email-board{grid-template-columns:repeat(2,minmax(230px,1fr));}}
@media(max-width:760px){body:is(.mission-control-mode,.email-hub-mode) .mission-email-summary,body:is(.mission-control-mode,.email-hub-mode) .mission-email-board{grid-template-columns:1fr;}body:is(.mission-control-mode,.email-hub-mode) .mission-email-card-head{display:grid;}body:is(.mission-control-mode,.email-hub-mode) .mission-email-card .status{justify-self:start;}}

/* Client Hub billing and record UX */
.client-hub-filter-row{grid-template-columns:minmax(240px,1.35fr) minmax(160px,.7fr) minmax(170px,.7fr);grid-template-areas:"search membership sort" "payment billing clear";align-items:end}
.client-hub-search{grid-area:search}.client-hub-membership{grid-area:membership}.client-hub-sort{grid-area:sort}.client-hub-payment{grid-area:payment}.client-hub-billing{grid-area:billing}.client-hub-clear{grid-area:clear;justify-self:start;min-width:96px}
.client-hub-filter-row.lead-mode{grid-template-columns:minmax(240px,1fr) auto;grid-template-areas:"search clear"}.client-hub-filter-row.lead-mode .client-hub-clear{justify-self:end}
.client-card-name>span{font-size:14px;line-height:1.45}
.client-overdue-pill{font:inherit;cursor:pointer}
.client-overdue-summary{display:grid;gap:12px}.client-overdue-summary>p{margin:0;line-height:1.55}.client-overdue-summary article{display:grid;gap:5px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--input)}.client-overdue-summary article>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.client-overdue-summary small{color:var(--muted)}
.modal{position:relative}
.modal-head .icon-btn{display:grid;place-items:center;padding:0;line-height:1;text-align:center}
.modal-head .icon-btn>span{display:grid;place-items:center;width:100%;height:100%;line-height:1;transform:translateY(-1px)}
.client-payment-confirm-copy{grid-column:1/-1;width:100%;max-width:none;line-height:1.55;margin:0}
.client-billing-calculation{display:grid;grid-template-columns:repeat(5,auto);align-items:center;justify-content:start;gap:14px;padding:14px;border:1px solid var(--line);border-radius:8px;background:var(--input)}.client-billing-calculation div{display:grid;gap:4px}.client-billing-calculation span{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em}.client-billing-calculation strong{font-size:16px}
.modal-exit-confirm{position:absolute;inset:0;z-index:20;display:grid;align-items:start;justify-items:center;padding:22px;background:rgba(3,10,7,.72);backdrop-filter:blur(5px)}
.modal-exit-dialog{width:min(560px,100%);display:grid;gap:18px;margin-top:0;padding:20px;border:1px solid var(--gold);border-radius:10px;background:var(--panel);box-shadow:0 26px 80px rgba(0,0,0,.45)}
.modal-exit-dialog>div:first-child{display:grid;gap:6px}.modal-exit-dialog strong{font-family:var(--font-display);font-size:24px}.modal-exit-dialog p{margin:0;color:var(--muted);font-size:13px}.modal-exit-dialog .modal-actions{margin:0;justify-content:flex-end;flex-wrap:wrap}.modal-discard-text{border:0;background:transparent;color:var(--muted);padding:10px 8px;font-weight:800}.modal-discard-text:hover,.modal-discard-text:focus-visible{color:var(--red);outline:none;text-decoration:underline}
.modal input[type="date"]{color-scheme:dark}
.modal input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(1) brightness(2)!important;opacity:1!important}
html[data-theme="light"] .modal input[type="date"]{color-scheme:light}
html[data-theme="light"] .modal input[type="date"]::-webkit-calendar-picker-indicator{filter:none!important;opacity:.75!important}
.kpi-card{isolation:isolate}.kpi-card>.kpi-top,.kpi-card>.trend{position:relative;z-index:1}.kpi-orbit-watermark{position:absolute;right:18px;top:15px;width:78px;height:78px;border:1px solid rgba(200,162,74,.16);border-radius:44% 56% 48% 52%;transform:rotate(27deg);pointer-events:none}.kpi-orbit-watermark::before{content:"";position:absolute;inset:12px 9px 10px 13px;border:1px solid rgba(47,122,87,.2);border-radius:57% 43% 54% 46%;transform:rotate(-38deg)}.kpi-orbit-watermark::after{content:"";position:absolute;inset:27px;border:1px solid rgba(200,162,74,.14);border-radius:50%}
@media(max-width:1240px){.client-hub-filter-row{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"search search" "membership sort" "payment billing" "clear clear"}}
@media(max-width:760px){.client-hub-filter-row,.client-hub-filter-row.lead-mode{grid-template-columns:1fr;grid-template-areas:"search" "membership" "sort" "payment" "billing" "clear"}.client-hub-filter-row.lead-mode{grid-template-areas:"search" "clear"}.client-hub-filter-row.lead-mode .client-hub-clear{justify-self:start}.client-billing-calculation{grid-template-columns:1fr}.client-billing-calculation>span{display:none}.modal-exit-confirm{padding:12px}.modal-exit-dialog .modal-actions,.client-record-save-actions{width:100%}.modal-exit-dialog .modal-actions>*{width:auto}.client-record-save-actions .btn{flex:1}}

/* Responsive, data-driven Mission Control email journey. */
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey{min-width:0;display:grid;gap:18px;padding:20px;border:1px solid color-mix(in srgb,var(--gold) 54%,var(--line));border-radius:10px;background:radial-gradient(circle at 88% 0,rgba(200,162,74,.12),transparent 28%),linear-gradient(145deg,#07140f,#0c2118);box-shadow:var(--shadow);overflow:hidden}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:20px;padding-bottom:16px;border-bottom:1px solid rgba(225,191,99,.22)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-head h3{margin:5px 0 4px;color:#fff8e8;font-family:var(--font-display);font-size:30px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-head p{margin:0;color:#9bb7a8;font-size:13px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-controls{display:flex;align-items:flex-end;gap:10px;min-width:0}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-selector{display:grid;gap:6px;width:min(300px,100%);color:#e1bf63;font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-selector select{width:100%;min-height:42px;border:1px solid rgba(225,191,99,.35);border-radius:7px;padding:9px 34px 9px 11px;background:#0c1912;color:#fff8e8;font-size:14px;text-transform:none;letter-spacing:0;outline:none}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-refresh{min-height:42px;white-space:nowrap}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-selector select:focus{border-color:#e1bf63;box-shadow:0 0 0 3px rgba(225,191,99,.12)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-refresh.action-icon-btn{flex:0 0 auto;color:#aeb6b1;border-color:rgba(174,182,177,.44)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.55fr);align-items:start;gap:22px;padding:16px;border:1px solid rgba(155,183,168,.2);border-radius:8px;background:rgba(255,255,255,.035)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-overview h4{margin:5px 0 7px;color:#fff8e8;font-family:var(--font-display);font-size:22px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-overview p{margin:0;color:#c9d8d0;font-size:13px;line-height:1.5}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-health{display:grid;justify-items:end;gap:7px;text-align:right}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-health small{max-width:360px;color:#9bb7a8;font-size:11px;line-height:1.45}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-legend{display:flex;flex-wrap:wrap;gap:10px 18px;color:#b8c9bf;font-size:11px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-legend span{display:inline-flex;align-items:center;gap:7px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-legend i,body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone i{width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:#6b7d73}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-legend .automatic,body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone.automatic i{background:#55b985;box-shadow:0 0 0 4px rgba(85,185,133,.12)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-legend .transactional,body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone.transactional i{background:#6ea8e5;box-shadow:0 0 0 4px rgba(110,168,229,.11)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-legend .manual,body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone.manual i{background:#e1bf63;box-shadow:0 0 0 4px rgba(225,191,99,.11)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-legend .draft,body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone.draft i{background:#73847a}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-lanes{display:grid;gap:20px;min-width:0}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-lane{display:grid;grid-template-columns:minmax(150px,.22fr) minmax(0,1fr);gap:18px;min-width:0;padding-top:2px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-lane+.mission-email-journey-lane{padding-top:20px;border-top:1px solid rgba(155,183,168,.18)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-lane-label h3{margin:6px 0 0;color:#b8c9bf;font-family:var(--font-ui);font-size:13px;line-height:1.45}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-flow{display:grid;gap:13px;min-width:0}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-meta{display:flex;align-items:center;justify-content:space-between;gap:14px;color:#9bb7a8;font-size:10px;line-height:1.4}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-mode{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border:1px solid rgba(225,191,99,.28);border-radius:999px;background:rgba(225,191,99,.08);color:#e1bf63;font-weight:900;white-space:nowrap}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-track{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto repeat(var(--flow-rows),auto);gap:12px 0;min-width:0;padding:0 0 6px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-track::before{content:"";position:absolute;z-index:0;top:67px;bottom:8px;left:50%;width:2px;transform:translateX(-1px);background:linear-gradient(#e1bf63,rgba(225,191,99,.2));pointer-events:none}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-entry,body:is(.mission-control-mode,.email-hub-mode) .mission-email-branch-gate{position:relative;z-index:2;grid-column:1/-1;justify-self:center;display:grid;gap:3px;width:min(420px,82%);padding:11px 15px;border:1px solid rgba(225,191,99,.42);border-radius:8px;background:#0d2017;text-align:center}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-entry{grid-row:1}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-entry span,body:is(.mission-control-mode,.email-hub-mode) .mission-email-branch-gate span{color:#e1bf63;font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-entry strong,body:is(.mission-control-mode,.email-hub-mode) .mission-email-branch-gate strong{color:#fff8e8;font-size:12px;overflow-wrap:anywhere}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-branch-gate{grid-row:var(--flow-rows);margin-top:2px;border-style:dashed}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step{position:relative;z-index:1;grid-row:var(--flow-row);min-width:0}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-left{grid-column:1;padding-right:51px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-right{grid-column:2;padding-left:51px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step::before{content:"";position:absolute;top:50%;width:51px;border-top:1px solid rgba(225,191,99,.44)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-left::before{right:0}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-right::before{left:0}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step::after{content:"";position:absolute;top:50%;width:8px;height:8px;border-right:2px solid #e1bf63;border-bottom:2px solid #e1bf63;background:#0b1912}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-left::after{right:-4px;transform:translateY(-50%) rotate(-45deg)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-right::after{left:-4px;transform:translateY(-50%) rotate(135deg)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-transition{position:absolute;z-index:3;top:50%;width:76px;padding:3px 5px;transform:translateY(-50%);border:1px solid rgba(225,191,99,.22);border-radius:999px;background:#0b1912;color:#e1bf63;font-size:8px;font-weight:900;line-height:1.2;text-align:center;overflow-wrap:anywhere}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-left .mission-email-flow-transition{right:-38px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-right .mission-email-flow-transition{left:-38px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone{position:relative;z-index:1;display:grid;width:100%;grid-template-columns:24px 9px auto minmax(0,1fr);grid-template-areas:"sequence dot timing name" "sequence dot template template" "sequence dot reason reason";gap:5px 8px;min-width:0;padding:42px 12px 12px;border:1px solid rgba(155,183,168,.2);border-radius:7px;background:rgba(255,255,255,.035);color:#c9d8d0;text-align:left}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone:hover,body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone:focus-visible{border-color:rgba(225,191,99,.58);outline:none;box-shadow:0 0 0 3px rgba(225,191,99,.1)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone.active{border-color:#e1bf63;background:rgba(225,191,99,.1)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-sequence{grid-area:sequence;align-self:center;color:rgba(225,191,99,.55);font-family:var(--font-display);font-size:18px;font-weight:700}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone i{grid-area:dot;margin-top:4px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone span{grid-area:timing;min-width:0;color:#e1bf63;font-size:10px;font-weight:900;text-transform:uppercase;overflow-wrap:anywhere}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone strong{grid-area:name;min-width:0;color:#fff8e8;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone small{grid-area:template;min-width:0;color:#9bb7a8;font-size:10px;overflow-wrap:anywhere}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-step-state{position:absolute;top:9px;right:9px;font-style:normal}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-step-reason{grid-area:reason!important;padding-top:6px;border-top:1px solid rgba(155,183,168,.14);color:#d7a0a3!important;line-height:1.4}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-branches{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;min-width:0}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-branch{display:grid;gap:5px;min-width:0;padding:10px;border:1px solid rgba(155,183,168,.18);border-top:2px solid #55b985;border-radius:7px;background:rgba(255,255,255,.03)}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-branch.is-pause{border-top-color:#e1bf63}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-branch.is-exit{border-top-color:#d86d72}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-branch span{color:#fff8e8;font-size:10px;font-weight:900}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-branch p{margin:0;color:#9bb7a8;font-size:9px;line-height:1.45;overflow-wrap:anywhere}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-detail{display:grid;gap:14px;padding:17px;background:rgba(255,255,255,.04);border-color:rgba(155,183,168,.2);box-shadow:none}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-detail-head h3{margin:5px 0 0;color:#fff8e8;font-family:var(--font-display);font-size:23px}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-state-wrap{display:grid;justify-items:end;gap:6px;max-width:340px;text-align:right}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-state-wrap small{color:#9bb7a8;font-size:10px;line-height:1.4}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-state{white-space:nowrap;text-align:center}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-state.good{background:rgba(85,185,133,.14);border-color:rgba(85,185,133,.42);color:#68d39a}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-state.bad{background:rgba(216,109,114,.13);border-color:rgba(216,109,114,.42);color:#ef8d91}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-detail dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px;margin:0}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-detail dl div{min-width:0}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-detail dt{margin-bottom:4px;color:#9bb7a8;font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-detail dd{margin:0;color:#d9e3de;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
body:is(.mission-control-mode,.email-hub-mode) .mission-email-detail>p{margin:0;padding-top:13px;border-top:1px solid rgba(155,183,168,.18);color:#9bb7a8;font-size:12px;line-height:1.55}
@media(max-width:1100px){body:is(.mission-control-mode,.email-hub-mode) .mission-email-branches{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-lane{grid-template-columns:1fr;gap:10px}}
@media(max-width:720px){body:is(.mission-control-mode,.email-hub-mode) .mission-email-summary{grid-template-columns:1fr 1fr}body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-head{grid-template-columns:1fr;align-items:start}body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-controls{width:100%}body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-selector{width:auto;flex:1}body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-overview{grid-template-columns:1fr}body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-health{justify-items:start;text-align:left}body:is(.mission-control-mode,.email-hub-mode) .mission-email-detail-head{display:grid}body:is(.mission-control-mode,.email-hub-mode) .mission-email-state-wrap{justify-items:start;text-align:left}body:is(.mission-control-mode,.email-hub-mode) .mission-email-detail dl{grid-template-columns:1fr}}
@media(max-width:620px){body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-meta{align-items:flex-start;flex-direction:column}body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-track{grid-template-columns:minmax(0,1fr);padding-left:24px}body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-track::before{left:13px;transform:none}body:is(.mission-control-mode,.email-hub-mode) .mission-email-entry,body:is(.mission-control-mode,.email-hub-mode) .mission-email-branch-gate{grid-column:1;width:100%;justify-self:stretch;text-align:left}body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-left,body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-right{grid-column:1;padding:30px 0 0 18px}body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-left::before,body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-right::before{left:-11px;right:auto;top:50%;width:29px}body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-left::after,body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-right::after{left:-2px;right:auto;top:50%;transform:translateY(-50%) rotate(135deg)}body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-left .mission-email-flow-transition,body:is(.mission-control-mode,.email-hub-mode) .mission-email-flow-step.is-right .mission-email-flow-transition{left:18px;right:auto;top:3px;width:auto;max-width:calc(100% - 18px);transform:none;text-align:left}body:is(.mission-control-mode,.email-hub-mode) .mission-email-branches{grid-template-columns:minmax(0,1fr)}}
@media(max-width:420px){body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey{padding:14px}body:is(.mission-control-mode,.email-hub-mode) .mission-email-summary{grid-template-columns:1fr}body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-head h3{font-size:25px}body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end}body:is(.mission-control-mode,.email-hub-mode) .mission-email-journey-legend{display:grid}body:is(.mission-control-mode,.email-hub-mode) .mission-email-milestone{width:100%}}

body.email-hub-mode .email-hub-page{display:grid;gap:18px;min-width:0}
body.email-hub-mode .email-hub-tabs{width:max-content;max-width:100%}
body.email-hub-mode .email-hub-tabs .client-hub-tab{text-decoration:none}
body.email-hub-mode .email-hub-tabs .client-hub-tab.active{border-color:#e1bf63;background:linear-gradient(135deg,#d6a82d,#f0cb61);color:#07140f;box-shadow:0 0 22px rgba(225,191,99,.22)}
body.email-hub-mode .mission-section,body.email-hub-mode .email-stats-view{display:grid;gap:16px;min-width:0}
body.email-hub-mode .mission-metric-grid,body.email-hub-mode .email-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
body.email-hub-mode .mission-metric,body.email-hub-mode .email-stat-card{display:grid;gap:7px;min-height:126px;align-content:start}
body.email-hub-mode .mission-metric span,body.email-hub-mode .email-stat-card>span{color:var(--muted);font-size:11px;font-weight:900;text-transform:uppercase}
body.email-hub-mode .mission-metric strong,body.email-hub-mode .email-stat-card>strong{font-family:var(--font-display);font-size:32px;line-height:1}
body.email-hub-mode .mission-metric p,body.email-hub-mode .email-stat-card>p{margin:0;color:var(--muted);font-size:12px;line-height:1.45}
body.email-hub-mode .email-stat-card.failed{border-color:rgba(220,99,82,.46)}
body.email-hub-mode .email-stat-card.delivered{border-color:rgba(85,185,133,.5)}
body.email-hub-mode .email-hub-secondary{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:12px}
body.email-hub-mode .email-provider-checks{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
body.email-hub-mode .email-provider-checks span{display:inline-flex;align-items:center;gap:7px;padding:7px 9px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:12px;font-weight:800}
body.email-hub-mode .email-provider-checks .pass{border-color:rgba(85,185,133,.42);color:#8ee0b2}
body.email-hub-mode .email-provider-checks .blocked{border-color:rgba(225,191,99,.4);color:#e1bf63}
body.email-hub-mode .email-signal-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}
body.email-hub-mode .email-signal-grid div{padding:10px;border:1px solid var(--line);border-radius:7px;background:rgba(255,255,255,.025)}
body.email-hub-mode .email-signal-grid strong,body.email-hub-mode .email-signal-grid span{display:block}
body.email-hub-mode .email-signal-grid strong{font-size:22px}.email-signal-grid span{color:var(--muted);font-size:11px}
body.email-hub-mode .email-source-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}
body.email-hub-mode .email-source-grid div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:1px solid var(--line);border-radius:7px;background:rgba(255,255,255,.025)}
body.email-hub-mode .email-source-grid span{min-width:0;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
body.email-hub-mode .email-source-grid strong{font-size:18px}
body.email-hub-mode .email-recent-card{min-width:0;padding:0;overflow:hidden}
body.email-hub-mode .email-recent-card .section-head{padding:16px 18px 0}
body.email-hub-mode .email-recent-card table{min-width:860px}
body.email-hub-mode .email-recent-card td strong,body.email-hub-mode .email-recent-card td span{display:block}
body.email-hub-mode .email-recent-card td span{margin-top:3px;color:var(--muted);font-size:11px}
body.email-hub-mode .email-campaign-acceptance{display:grid;gap:16px;min-width:0}
body.email-hub-mode .email-campaign-acceptance-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-width:0}
body.email-hub-mode .email-campaign-acceptance-form .wide{grid-column:1/-1}
body.email-hub-mode .email-campaign-param-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-width:0}
body.email-hub-mode .email-campaign-preview,body.email-hub-mode .email-campaign-result{display:grid;gap:5px;padding:12px 14px;border:1px solid rgba(85,185,133,.42);border-radius:7px;background:rgba(85,185,133,.08)}
body.email-hub-mode .email-campaign-preview span,body.email-hub-mode .email-campaign-result span{color:var(--muted);font-size:12px;overflow-wrap:anywhere}
body.email-hub-mode .email-campaign-acceptance .modal-actions{justify-content:flex-end}
@media(max-width:980px){body.email-hub-mode .mission-metric-grid,body.email-hub-mode .email-stats-grid,body.email-hub-mode .email-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body.email-hub-mode .email-hub-secondary{grid-template-columns:1fr}}
@media(max-width:620px){body.email-hub-mode .mission-metric-grid,body.email-hub-mode .email-stats-grid,body.email-hub-mode .email-source-grid,body.email-hub-mode .email-campaign-acceptance-form,body.email-hub-mode .email-campaign-param-grid{grid-template-columns:1fr}body.email-hub-mode .email-hub-tabs{width:100%}body.email-hub-mode .email-hub-tabs .client-hub-tab{flex:1}body.email-hub-mode .email-signal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Keep the shared admin header aligned to the same wide-screen canvas as Client Hub. */
@media(min-width:981px){
  body:not(.client-portal-mode) .app-shell>.main>.topbar,
  body:not(.client-portal-mode) .app-shell>.main>.view{
    width:100%;
    max-width:1520px;
    margin-left:0;
    margin-right:auto;
  }
}

/* Kaivalya Hub roster actions follow the shared compact-table pattern. */
.kaivalya-roster-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:220px}
.kaivalya-invite-action{margin-right:auto;border:0;background:transparent;color:var(--gold);font:inherit;font-size:11px;font-weight:900;cursor:pointer;white-space:nowrap;padding:7px 5px}
.kaivalya-invite-action:hover,.kaivalya-invite-action:focus-visible{text-decoration:underline;outline:none}
.kaivalya-invite-action.is-sent{color:#72d69d}
.kaivalya-invite-action:disabled{cursor:not-allowed;opacity:.45;text-decoration:none}
.kaivalya-row-action{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;color:var(--gold)}
.kaivalya-row-action svg,.kaivalya-remove-action svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kaivalya-row-action.is-disable{color:var(--red);border-color:rgba(228,93,107,.38)}
.kaivalya-row-action.is-enable{color:#72d69d;border-color:rgba(114,214,157,.38)}
.kaivalya-modal-footer{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%}
.kaivalya-modal-footer .modal-actions{margin:0}
.kaivalya-remove-action{display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;color:var(--red);font:inherit;font-weight:900;padding:9px 2px;cursor:pointer}
.kaivalya-remove-action:hover,.kaivalya-remove-action:focus-visible{text-decoration:underline;outline:none}

/* Shared outline action icon language for dense tables and overlays. */
.action-icon-btn{width:38px;height:38px;flex:0 0 38px;display:inline-grid;place-items:center;padding:0;border:1px solid currentColor;border-radius:9px;background:var(--input);line-height:0;overflow:visible;cursor:pointer;transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease}
.action-icon-btn svg{display:block;width:18px;height:18px;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.action-icon-btn:hover,.action-icon-btn:focus-visible{transform:translateY(-1px);outline:none;box-shadow:0 0 14px currentColor}
.action-icon-edit{color:var(--gold-2);border-color:rgba(214,174,66,.48);background:rgba(214,174,66,.08)}
.action-icon-disable{color:var(--red);border-color:rgba(228,93,107,.42);background:rgba(228,93,107,.07)}
.action-icon-enable{color:#72d69d;border-color:rgba(114,214,157,.42);background:rgba(114,214,157,.07)}
.client-edit-action.action-icon-btn{font:inherit}

/* Team roster stays inside its frame while retaining a useful desktop table. */
.kaivalya-roster-table-wrap{max-width:100%;overflow-x:auto!important}
.kaivalya-roster-table{width:100%!important;min-width:980px!important;table-layout:fixed!important}
.kaivalya-roster-table th:nth-child(1){width:17%}.kaivalya-roster-table th:nth-child(2){width:10%}.kaivalya-roster-table th:nth-child(3){width:15%}.kaivalya-roster-table th:nth-child(4){width:13%}.kaivalya-roster-table th:nth-child(5){width:10%}.kaivalya-roster-table th:nth-child(6){width:8%}.kaivalya-roster-table th:nth-child(7){width:27%}
.kaivalya-roster-table th,.kaivalya-roster-table td{min-width:0;overflow:hidden;overflow-wrap:anywhere}
.kaivalya-roster-person{grid-template-columns:42px minmax(0,1fr)}
.kaivalya-roster-actions{min-width:0;max-width:100%;white-space:nowrap;overflow:visible}

/* Future schedule actions, clickable calendar pills, and appointment details. */
.schedule-title-card{border-left-width:1px;border-left-color:var(--line)}
.schedule-roster-table{min-width:980px}
.schedule-roster-table th:last-child,.schedule-roster-table td:last-child{width:220px;min-width:220px;overflow:visible}
.schedule-row-actions{min-width:max-content;flex-wrap:nowrap;white-space:nowrap}
.schedule-cancel-link{flex:0 0 auto;border:0;background:transparent;color:var(--red);padding:8px 4px;font:inherit;font-size:11px;font-weight:900;cursor:pointer}
.schedule-cancel-link:hover,.schedule-cancel-link:focus-visible{text-decoration:underline;outline:none}
.schedule-calendar-day{display:flex;cursor:default}
.schedule-calendar-date{width:100%;display:grid;gap:3px;border:0;background:transparent;color:var(--text);padding:0;text-align:left;cursor:pointer}
.schedule-calendar-date span{color:var(--muted);font-size:9px;font-weight:900;text-transform:uppercase}.schedule-calendar-date strong{font-size:12px}
.schedule-calendar-appointments{width:100%;display:grid!important;gap:4px!important;margin-top:auto}
.schedule-calendar-appointment{width:100%;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:5px;border:1px solid rgba(85,185,133,.36);border-radius:999px;background:rgba(85,185,133,.1);color:var(--green-2);padding:4px 7px;cursor:pointer}
.schedule-calendar-appointment strong,.schedule-calendar-appointment span{min-width:0;font-size:9px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.schedule-calendar-appointment span{color:var(--muted)}
.schedule-calendar-appointment:hover,.schedule-calendar-appointment:focus-visible{border-color:var(--gold);outline:none;box-shadow:0 0 0 2px rgba(214,174,66,.12)}
.schedule-detail{display:grid;gap:18px}.schedule-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.schedule-detail-grid>div,.schedule-detail-notes{display:grid;gap:4px;padding:13px;border:1px solid var(--line);border-radius:8px;background:var(--input)}.schedule-detail span{color:var(--gold);font-size:10px;font-weight:900;text-transform:uppercase}.schedule-detail small{color:var(--muted);font-size:11px}.schedule-detail-notes p{margin:0;color:var(--muted);line-height:1.5;white-space:pre-wrap}.schedule-detail-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px}

/* Calendar controls stay white in both themes for legibility on dark inputs. */
.modal input[type="date"],.schedule-time-off input[type="date"],.schedule-modal-form input[type="date"]{color-scheme:dark!important}
.modal input[type="date"]::-webkit-calendar-picker-indicator,.schedule-time-off input[type="date"]::-webkit-calendar-picker-indicator,.schedule-modal-form input[type="date"]::-webkit-calendar-picker-indicator,html[data-theme="light"] .modal input[type="date"]::-webkit-calendar-picker-indicator,html[data-theme="light"] .schedule-time-off input[type="date"]::-webkit-calendar-picker-indicator,html[data-theme="light"] .schedule-modal-form input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(1) brightness(3)!important;opacity:1!important}

@media(max-width:760px){.schedule-detail-grid{grid-template-columns:1fr}.schedule-detail-actions{flex-wrap:wrap}.schedule-roster-table .schedule-row-actions{justify-content:flex-start;flex-wrap:wrap;white-space:normal}}

/* Results uses one shared toolbar plus column-level filters for fast operational review. */
.results-filter-bar{display:grid;grid-template-columns:minmax(220px,1.5fr) repeat(3,minmax(150px,1fr)) auto;align-items:end;gap:10px;margin-bottom:14px;padding:14px;border:1px solid var(--line);border-radius:8px;background:var(--panel)}
.results-filter-bar .btn{height:42px}
.results-table-wrap{overflow-x:auto}
.client-results-table{min-width:1120px}
.results-column-filters th{padding:6px}
.results-column-filters :is(input,select){width:100%;min-width:0;height:34px;border:1px solid var(--line);border-radius:6px;background:var(--input);color:var(--text);padding:5px 8px;font-size:10px;font-weight:700}
.results-column-filters input::placeholder{color:var(--muted)}
@media(max-width:980px){.results-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.results-filter-bar .btn{width:max-content}}
@media(max-width:560px){.results-filter-bar{grid-template-columns:1fr}.results-filter-bar .btn{width:100%}}

/* Admin Overview: concise daily briefing and expandable invoice attention. */
.overview-daily-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:0;padding:20px}
.overview-ai-summary,.overview-ai-suggestions{display:grid;gap:12px;min-width:0;align-content:start}
.overview-ai-summary{padding-right:20px}
.overview-ai-suggestions{padding-left:20px;border-left:1px solid var(--line)}
.overview-ai-summary-head{display:flex;align-items:baseline;justify-content:space-between;gap:14px}
.overview-ai-summary-head h3{margin:0;font-family:var(--font-display);font-size:21px}
.overview-ai-summary-head span{color:var(--muted);font-size:11px;white-space:nowrap}
.overview-ai-summary ul{display:grid;gap:8px;margin:0;padding-left:18px;color:var(--muted);font-size:12px;line-height:1.45}
.overview-suggestion-list{display:grid;gap:8px}.overview-suggestion-list article{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 11px;border:1px solid var(--line);border-radius:8px;background:var(--input)}.overview-suggestion-list article>div{display:grid;gap:3px;min-width:0}.overview-suggestion-list article strong{font-size:12px}.overview-suggestion-list article span{color:var(--muted);font-size:11px;line-height:1.35}.overview-suggestion-list .btn{white-space:nowrap}
.overview-payment-drawer{padding:0;overflow:hidden}
.overview-payment-drawer>summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 19px;cursor:pointer;list-style:none}
.overview-payment-drawer>summary::-webkit-details-marker{display:none}
.overview-payment-drawer>summary>span:first-child{display:grid;gap:4px}
.overview-payment-drawer>summary strong{font-family:var(--font-display);font-size:20px}
.overview-payment-drawer>summary small{color:var(--muted);font-size:11px}
.overview-payment-drawer>summary:after{content:"+";color:var(--gold);font-size:20px;font-weight:900}
.overview-payment-drawer>summary>.status{margin-left:auto}
.overview-payment-drawer>summary:after{margin-left:0}
.overview-payment-drawer[open]>summary:after{content:"-"}
.overview-payment-drawer-body{display:grid;gap:14px;padding:0 19px 19px;border-top:1px solid var(--line)}
.overview-payment-drawer-body>.section-head{padding-top:14px}
.overview-final-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.overview-social-panel,.overview-client-health-panel{display:grid;gap:14px;align-content:start}.overview-client-health-panel{overflow:visible}
.overview-social-list,.overview-health-list{display:grid;gap:8px}
.overview-social-list article,.overview-health-list article{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--input)}
.overview-social-list article>div,.overview-health-list article>div{display:grid;gap:3px;min-width:0}
.overview-social-list article span,.overview-health-list article span{color:var(--muted);font-size:11px}
.overview-social-list .status.connected{color:var(--mint);border-color:rgba(89,205,146,.3);background:rgba(89,205,146,.1)}
.overview-campaign-snapshot{display:grid;gap:7px;padding-top:4px}.overview-subhead{display:flex;align-items:center;justify-content:space-between;gap:12px}.overview-subhead strong{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--gold)}.overview-subhead .text-link{font-size:11px}.overview-campaign-snapshot article{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:var(--input)}.overview-campaign-snapshot article>div{display:grid;gap:2px;min-width:0}.overview-campaign-snapshot article strong,.overview-campaign-snapshot article span{font-size:11px}.overview-campaign-snapshot article strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overview-campaign-snapshot article span{color:var(--muted);white-space:nowrap}
.overview-health-list article{grid-template-columns:minmax(0,1fr) auto auto}
.overview-sales-outcomes{text-align:right}.overview-sales-outcomes span{white-space:nowrap}.overview-sales-rank{display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(214,174,66,.42);border-radius:999px;background:rgba(214,174,66,.1);color:var(--gold-2)!important;padding:5px 8px;font-size:10px!important;font-weight:900;white-space:nowrap}
.overview-section-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.overview-ranking-help{position:relative}.overview-ranking-help>summary{list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:7px;padding:8px 10px;color:var(--text);font-size:10px;font-weight:900}.overview-ranking-help>summary::-webkit-details-marker{display:none}.overview-ranking-help>summary:after{content:" ?";color:var(--gold)}.overview-ranking-help>div{position:absolute;z-index:20;right:0;top:calc(100% + 8px);width:min(300px,80vw);display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;padding:14px;border:1px solid var(--line-strong);border-radius:8px;background:var(--panel);box-shadow:var(--shadow)}.overview-ranking-help>div strong{grid-column:1/-1;color:var(--gold);font-size:10px;text-transform:uppercase;letter-spacing:.08em}.overview-ranking-help>div span{font-size:11px}.overview-ranking-help>div small{grid-column:1/-1;padding-top:7px;border-top:1px solid var(--line);color:var(--muted);line-height:1.45}.overview-calendar-next{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.overview-calendar-next p{margin:0}.schedule-owner-pill{display:inline-flex;align-items:center;border:1px solid rgba(214,174,66,.4);border-radius:999px;padding:5px 9px;color:var(--gold-2);background:rgba(214,174,66,.1);font-size:10px;font-weight:900;white-space:nowrap}
.overview-performance-panel{grid-column:1/-1;display:grid;gap:14px}.overview-performance-panel .section-head p{margin:4px 0 0}.overview-performance-insights{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.overview-performance-insights article{display:grid;align-content:start;gap:7px;padding:13px;border:1px solid var(--line);border-radius:8px;background:var(--input);min-width:0}.overview-performance-insights article>span{font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.1em;color:var(--gold)}.overview-performance-insights article p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}.overview-performance-insights article.good{border-top-color:rgba(89,205,146,.55)}.overview-performance-insights article.review{border-top-color:rgba(214,174,66,.65)}
@media(max-width:1100px){.overview-performance-insights{grid-template-columns:repeat(2,minmax(0,1fr))}}

.kaivalya-roster-controls{display:flex;align-items:center;justify-content:space-between;gap:16px}.kaivalya-roster-controls .kaivalya-roster-tabs{min-width:0}.kaivalya-roster-controls>.btn{margin-left:auto;white-space:nowrap}

/* One partially clipped circular watermark, shared by summary cards. */
.kpi-card{overflow:hidden}
.kpi-orbit-watermark{right:-24px;top:-28px;width:96px;height:96px;border:1px solid rgba(200,162,74,.18);border-radius:50%;transform:none}
.kpi-orbit-watermark::before,.kpi-orbit-watermark::after{content:none}

@media(max-width:760px){
  .kaivalya-modal-footer{align-items:stretch;flex-direction:column-reverse}.kaivalya-modal-footer .modal-actions{width:100%}.kaivalya-modal-footer .modal-actions .btn{flex:1}.kaivalya-remove-action{align-self:flex-start}
  .overview-daily-summary{grid-template-columns:1fr}.overview-ai-summary{padding:0 0 16px}.overview-ai-suggestions{padding:16px 0 0;border-left:0;border-top:1px solid var(--line)}
  .overview-ai-summary-head{align-items:flex-start;flex-direction:column;gap:4px}
  .overview-final-grid{grid-template-columns:1fr}.overview-performance-insights{grid-template-columns:1fr}.overview-section-actions{align-items:flex-end;flex-direction:column}.overview-ranking-help>div{right:0}
  .overview-health-list article{grid-template-columns:minmax(0,1fr) auto}.overview-sales-outcomes{grid-column:1/-1;text-align:left}.overview-calendar-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kaivalya-roster-controls{align-items:stretch;flex-direction:column}.kaivalya-roster-controls>.btn{align-self:flex-end;margin-left:0}.overview-suggestion-list article{grid-template-columns:1fr}.overview-suggestion-list .btn{justify-self:start}
  .overview-payment-drawer>summary{align-items:flex-start;flex-wrap:wrap}
}
/* Appointment timezone, reschedule, and header controls share one Admin/Sales pattern. */
.schedule-title-controls{display:grid;justify-items:end;gap:8px}
.schedule-refresh-btn.action-icon-btn{color:#aeb6b1;border-color:rgba(174,182,177,.44)}
.schedule-refresh-btn.is-loading svg{animation:schedule-spin .8s linear infinite}
.schedule-detail-actions,.schedule-modal-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.schedule-detail-actions>div{display:flex;align-items:center;justify-content:flex-end;gap:9px}
.schedule-modal-footer .modal-actions{margin:0}
.schedule-destructive-link{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:#aeb6b1;padding:8px 4px;font:inherit;font-weight:850;cursor:pointer}
.schedule-destructive-link svg{width:17px;height:17px}
.schedule-destructive-link:hover,.schedule-destructive-link:focus-visible{color:var(--red);text-decoration:underline;outline:none}
.schedule-modal-help{display:grid;gap:5px;border:1px solid var(--line);border-radius:8px;background:var(--input);padding:13px}
.schedule-modal-help p{margin:0;color:var(--muted);line-height:1.5}
@media(max-width:980px){.schedule-title-controls{justify-items:start}}
@media(max-width:760px){.schedule-detail-actions,.schedule-modal-footer{align-items:stretch;flex-direction:column-reverse}.schedule-detail-actions>div{justify-content:flex-end}.schedule-destructive-link{align-self:flex-start}}

/* Native date icons vary by browser; use one guaranteed light console glyph. */
.modal input[type="date"],.schedule-time-off input[type="date"],.schedule-modal-form input[type="date"]{padding-right:40px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d8dedb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 12px center!important;background-size:18px 18px!important}
.modal input[type="date"]::-webkit-calendar-picker-indicator,.schedule-time-off input[type="date"]::-webkit-calendar-picker-indicator,.schedule-modal-form input[type="date"]::-webkit-calendar-picker-indicator{opacity:0!important;cursor:pointer}

/* Console mobile interaction authority: preserve the visual system while making every workspace operable by touch. */
body.modal-open,body.mobile-nav-open,body.client-mobile-nav-open{overflow:hidden!important}

@media(max-width:980px){
  .mobile-appbar{
    grid-template-columns:44px minmax(0,1fr) 44px;
    align-items:center;
    gap:10px;
    min-height:62px;
    padding:8px 12px;
    padding-top:max(8px,env(safe-area-inset-top));
  }
  body:not(.client-portal-mode):not(.mission-control-mode) .mobile-appbar,
  body.client-portal-mode .mobile-appbar{display:grid!important}
  .mobile-brand-mini{display:flex!important;align-items:center;justify-content:flex-start;gap:9px;min-width:0;overflow:hidden}
  .mobile-brand-mini .mobile-brand-image{width:28px!important;height:28px!important;flex:0 0 28px}
  body:not(.client-portal-mode):not(.mission-control-mode) .mobile-brand-mini strong,
  body.client-portal-mode .mobile-brand-mini strong{
    display:block!important;
    min-width:0;
    overflow:hidden;
    color:var(--text);
    font:800 12px var(--font-ui);
    letter-spacing:0;
    text-overflow:ellipsis;
    text-transform:none;
    white-space:nowrap;
  }
  .mobile-menu-btn,.mobile-appbar .advisor-logo-btn{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
  .app-shell>.sidebar{padding-bottom:calc(24px + env(safe-area-inset-bottom))!important}
  .sidebar .nav-btn{min-height:48px}
  .main,.view,.card,.section-head,.section-head>div{min-width:0}
  .topbar,.view{padding-inline:0!important}
  #platformTopAccount .client-top-account-copy{max-width:84px}
  .client-hub-grid-view{grid-template-columns:1fr!important}
  .overview-performance-insights,
  body.email-hub-mode .mission-metric-grid,
  body.email-hub-mode .email-stats-grid,
  body.email-hub-mode .email-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
.client-access-summary-compact{grid-template-columns:repeat(3,minmax(0,1fr))!important}.client-access-sort{width:100%;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:left;cursor:pointer}.client-access-sort span{color:var(--gold);font-size:12px}.client-access-sort:hover,.client-access-sort:focus-visible{color:var(--gold);outline:none}
@media(max-width:680px){.client-access-summary-compact{grid-template-columns:1fr!important}}
body.client-portal-mode .product-download-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:14px 16px;border:1px solid var(--line);border-radius:18px;background:rgba(8,24,16,.58)}
body.client-portal-mode .product-download-row p{margin:4px 0 0;color:var(--muted)}
body.client-portal-mode .product-download-buttons{display:flex;align-items:stretch;justify-content:flex-end;gap:10px;flex-wrap:wrap}
body.client-portal-mode .product-version-download{display:grid;grid-template-columns:auto auto;align-items:center;gap:2px 8px;text-align:left}
body.client-portal-mode .product-version-download small{grid-column:1/-1;color:inherit;opacity:.78}
body.client-portal-mode .product-download-row.needs-email{border-color:rgba(214,174,72,.32)}
body.client-portal-mode .product-download-row.needs-email .product-version-download{opacity:.62}

@media(max-width:760px){
  :is(button,.btn,.action-icon-btn,.icon-btn,summary){min-height:44px}
  :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){font-size:16px!important}

  .main{padding-bottom:max(112px,calc(88px + env(safe-area-inset-bottom)))!important}
  .section-head{align-items:flex-start!important;flex-wrap:wrap!important;gap:10px!important}
  .section-head>.actions,.section-head>.modal-actions{width:100%;justify-content:flex-start;overflow-x:auto}

  .client-hub-tabs,
  .email-hub-tabs,
  .client-support-tabs,
  .kaivalya-roster-tabs,
  .client-record-tabs,
  .email-drip-tabs,
  .compact-training-tabs,
  .performance-evidence-tabs,
  .performance-family-tabs{
    display:flex!important;
    width:100%!important;
    max-width:100%!important;
    flex-wrap:nowrap!important;
    gap:8px!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain;
    padding-bottom:4px;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }
  .client-hub-tabs::-webkit-scrollbar,
  .email-hub-tabs::-webkit-scrollbar,
  .client-support-tabs::-webkit-scrollbar,
  .kaivalya-roster-tabs::-webkit-scrollbar,
  .client-record-tabs::-webkit-scrollbar,
  .email-drip-tabs::-webkit-scrollbar,
  .compact-training-tabs::-webkit-scrollbar,
  .performance-evidence-tabs::-webkit-scrollbar,
  .performance-family-tabs::-webkit-scrollbar{display:none}
  .client-hub-tabs>* ,
  .email-hub-tabs>* ,
  .client-support-tabs>* ,
  .kaivalya-roster-tabs>* ,
  .client-record-tabs>* ,
  .email-drip-tabs>* ,
  .compact-training-tabs>* ,
  .performance-evidence-tabs>* ,
  .performance-family-tabs>*{flex:0 0 auto!important;scroll-snap-align:start}

  .client-hub-tabbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  .client-hub-tab-actions{justify-content:flex-start!important;overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:2px}
  .client-hub-tab-actions .btn{flex:0 0 auto!important}

  .table-wrap,.results-table-wrap,.kaivalya-roster-table-wrap,.schedule-table-wrap,.client-access-table-wrap{
    max-width:100%;
    overflow-x:auto!important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
  }

  .form-grid,.client-profile-grid,.schedule-modal-date-grid,.schedule-time-off form,
  .product-release-fields,.email-campaign-acceptance-form,.email-campaign-param-grid,
  .results-filter-bar,.client-access-tools{grid-template-columns:1fr!important}

  .schedule-calendar-toolbar{align-items:stretch!important;flex-direction:column!important}
  .schedule-calendar-filters{display:grid!important;grid-template-columns:1fr 1fr!important}
  .schedule-calendar-filters select{width:100%!important;min-width:0!important}
  .schedule-calendar-grid{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;padding-bottom:5px}
  .schedule-calendar-grid.is-week,.schedule-calendar-grid.is-month{grid-template-columns:repeat(7,86px)!important}
  .schedule-secondary-grid{grid-template-columns:1fr!important}

  .modal-backdrop{padding:0!important;align-items:stretch!important;place-items:stretch!important;overflow:hidden!important}
  .modal{
    width:100%!important;
    height:100dvh!important;
    max-width:none!important;
    max-height:100dvh!important;
    margin:0!important;
    border-radius:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }
  .modal-head{
    position:sticky;
    top:0;
    z-index:5;
    flex:0 0 auto;
    padding:16px!important;
    padding-top:max(16px,env(safe-area-inset-top))!important;
    background:var(--panel);
  }
  .modal-body{
    flex:1 1 auto;
    min-height:0!important;
    max-height:none!important;
    padding:16px!important;
    padding-bottom:max(24px,env(safe-area-inset-bottom))!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  .modal-actions{gap:8px;flex-wrap:wrap}
  .client-record-modal-actions,.schedule-modal-footer,.kaivalya-modal-footer{
    position:sticky;
    bottom:-16px;
    z-index:4;
    margin-inline:-1px;
    padding:12px 0 max(12px,env(safe-area-inset-bottom));
    border-top:1px solid var(--line);
    background:var(--panel);
  }
  .modal-exit-confirm{position:fixed!important;inset:0!important;align-items:flex-end!important;padding:12px!important}

  .portal-course-actions,.training-video-actions,.client-home-advisor-actions,
  .product-detail-actions,.client-account-actions,.auth-help-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%!important;
  }
  .portal-course-actions .btn,.training-video-actions .btn,.client-home-advisor-actions .btn,
  .product-detail-actions .btn,.client-account-actions .btn{width:100%!important;justify-content:center}

  .advisor-drawer{width:100vw!important;max-width:100vw!important;padding:14px!important;padding-bottom:max(14px,env(safe-area-inset-bottom))!important;border-left:0!important}
  .advisor-drawer-head{padding-top:max(2px,env(safe-area-inset-top))}
}

@media(max-width:560px){
  .overview-performance-insights,.overview-final-grid,.overview-daily-summary,
  body.email-hub-mode .mission-metric-grid,body.email-hub-mode .email-stats-grid,
  body.email-hub-mode .email-source-grid,body.email-hub-mode .email-signal-grid,
  .client-access-summary,.schedule-calendar-filters{grid-template-columns:1fr!important}
  .overview-social-list article,.overview-health-list article,.overview-campaign-snapshot article,
  .overview-suggestion-list article{grid-template-columns:1fr!important}
  .overview-sales-outcomes{text-align:left!important}
  .schedule-title-actions,.schedule-inline-connection,.schedule-detail-actions>div{justify-content:flex-start!important}
  .schedule-title-actions{width:100%}
  .modal-actions .btn{flex:1 1 140px}
}

/* Client console mobile shell correction: one Advisor, a usable app bar, and a fully scrollable drawer. */
@media(max-width:980px){
  body.client-portal-mode .mobile-appbar{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr) 44px!important;
    min-height:76px!important;
    height:auto!important;
    padding:12px 14px!important;
    padding-top:max(12px,env(safe-area-inset-top))!important;
  }
  body.client-portal-mode .mobile-appbar #mobileAdvisorBtn{
    display:grid!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
    border-radius:14px!important;
    place-items:center!important;
    justify-self:end!important;
    opacity:1!important;
    visibility:visible!important;
    position:static!important;
    transform:none!important;
  }
  body.client-portal-mode .mobile-appbar #mobileAdvisorBtn .advisor-brand-image{
    width:34px!important;
    height:34px!important;
    max-width:34px!important;
    max-height:34px!important;
  }
  body.client-portal-mode .app-shell>.sidebar,
  body.client-portal-mode .app-shell>.client-only-sidebar.sidebar{
    top:0!important;
    bottom:auto!important;
    height:100dvh!important;
    max-height:100dvh!important;
    z-index:1000!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
    touch-action:pan-y!important;
    -webkit-overflow-scrolling:touch;
    scrollbar-gutter:auto!important;
    padding-bottom:max(28px,calc(18px + env(safe-area-inset-bottom)))!important;
  }
  body.client-portal-mode .app-shell>.sidebar .nav,
  body.client-portal-mode .app-shell>.client-only-sidebar.sidebar .nav{
    flex:0 0 auto!important;
    min-height:max-content!important;
    overflow:visible!important;
    touch-action:pan-y!important;
  }
  body.client-portal-mode .app-shell>.sidebar .client-membership-card,
  body.client-portal-mode .app-shell>.client-only-sidebar.sidebar .client-membership-card{
    height:auto!important;
    min-height:max-content!important;
    max-height:none!important;
    overflow:visible!important;
    flex:0 0 auto!important;
    box-sizing:border-box!important;
  }
  body.client-portal-mode .client-health-chat{
    display:none!important;
  }
  body.client-portal-mode .app-shell>.main,
  body.client-portal-mode .app-shell>.client-only-main.main{
    padding-top:88px!important;
  }
}
