/* /var/www/html/xbusiness/ui/styles.css
   ValueIX UI Kit - Themeable (Light/Dark) + premium purple/orange palette
   Layout: Outreach-like shell + Profile dropdown + modern tabs/subnav
*/

/* ===== Base tokens (theme-independent) ===== */
:root{
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New";

  --radius: 14px;
  --radius-sm: 12px;
  --radius-lg: 16px;

  --pad: 16px;

  /* Shadows tuned for premium feel */
  --shadow: 0 10px 28px rgba(0,0,0,0.10);
  --shadow-soft: 0 6px 18px rgba(0,0,0,0.08);

  /* Focus ring */
  --focus: 0 0 0 3px rgba(139,92,246,0.25);

  /* Motion */
  --ease: cubic-bezier(.2,.8,.2,1);

  /* Shared gradients */
  --brand-gradient: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-2));
  --brand-gradient-vert: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-2));
  --brand-gold-gradient: linear-gradient(90deg, #6f5626, var(--brand-cta));
  --brand-gold-gradient-soft: linear-gradient(90deg, rgba(111,86,38,0.24), rgba(173,147,92,0.28));
  --brand-gold-gradient-hover: linear-gradient(90deg, rgba(111,86,38,0.34), rgba(173,147,92,0.40));

  --seg-nav-bg: var(--brand-gold-gradient);
  --seg-nav-bg-soft: var(--brand-gold-gradient-soft);
  --seg-nav-bg-hover: var(--brand-gold-gradient-hover);
  --seg-nav-tint-10: rgba(173,147,92,0.10);
  --seg-nav-tint-12: rgba(173,147,92,0.12);
  --seg-nav-tint-14: rgba(173,147,92,0.14);
  --seg-nav-tint-16: rgba(173,147,92,0.16);
  --seg-nav-tint-18: rgba(173,147,92,0.18);
  --seg-nav-tint-22: rgba(173,147,92,0.22);
  --seg-nav-tint-26: rgba(173,147,92,0.26);
  --seg-nav-tint-28: rgba(173,147,92,0.28);
  --seg-nav-tint-30: rgba(173,147,92,0.30);
  --seg-nav-tint-46: rgba(173,147,92,0.46);
}

/* ===== LIGHT THEME (default) ===== */
:root,
html[data-theme="light"]{
  /* Brand */
  --brand-primary: #4C1D95;       /* deep purple */
  --brand-primary-2: #6D28D9;     /* gradient partner */
  --brand-primary-3: #8B5CF6;     /* highlight */
  --brand-cta: #FF751F;
  --brand-cta-hover: #E85F14;

  /* Nav gradient tuning */
  --nav-primary-start: #2A0B5E;

  /* States */
  --brand-accent: #22C55E;        /* success */
  --brand-warn: #FF751F;
  --brand-danger: #EF4444;

  /* Surfaces */
  --bg: #F9FAFB;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;           /* secondary surface */
  --surface-3: #EEF2FF;           /* subtle purple tint surface */
  --border: rgba(17,24,39,0.10);

  /* Text */
  --text: rgba(17,24,39,0.92);
  --muted: rgba(17,24,39,0.62);
  --link: rgba(17,24,39,0.92);

  /* Inputs */
  --input-bg: rgba(17,24,39,0.04);
  --input-border: rgba(17,24,39,0.14);

  /* Buttons */
  --btn-bg: rgba(17,24,39,0.06);
  --btn-border: rgba(17,24,39,0.12);

  /* Notices */
  --notice-bg: rgba(17,24,39,0.04);
  --notice-border: rgba(17,24,39,0.16);

  /* Tabs/Subnav */
  --tab-bg: rgba(17,24,39,0.04);
  --tab-border: rgba(17,24,39,0.10);
  --tab-active-bg: rgba(139,92,246,0.18);
  --tab-active-border: rgba(109,40,217,0.45);

  /* AI surfaces */
  --ai-bubble-bg: rgba(139,92,246,0.10);
  --ai-bubble-border: rgba(109,40,217,0.22);

  /* Sidebar (always gradient) */
  --sidebar-bg: var(--brand-gradient-vert);
  --sidebar-active-bg: rgba(255,255,255,0.16);
  --sidebar-active-border: rgba(255,255,255,0.22);

  /* Top bar */
  --topbar-border: rgba(255,255,255,0.16);

  /* Shadow tuning */
  --shadow: 0 10px 28px rgba(0,0,0,0.10);
  --shadow-soft: 0 6px 18px rgba(0,0,0,0.08);
}

/* ===== DARK THEME ===== */
html[data-theme="dark"]{
  /* Brand */
  --brand-primary: #4C1D95;
  --brand-primary-2: #6D28D9;
  --brand-primary-3: #8B5CF6;
  --brand-cta: #FF751F;
  --brand-cta-hover: #E85F14;

  /* Nav gradient tuning */
  --nav-primary-start: #2A0B5E;

  /* States */
  --brand-accent: #22C55E;
  --brand-warn: #FF751F;
  --brand-danger: #EF4444;

  /* Surfaces */
  --bg: #0B0B12;
  --surface: #202020;
  --surface-2: #17172A;
  --surface-3: rgba(109,40,217,0.10);
  --border: rgba(255,255,255,0.10);

  /* Text */
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --link: rgba(255,255,255,0.92);

  /* Inputs */
  --input-bg: rgba(0,0,0,0.22);
  --input-border: rgba(255,255,255,0.14);

  /* Buttons */
  --btn-bg: rgba(255,255,255,0.06);
  --btn-border: rgba(255,255,255,0.12);

  /* Notices */
  --notice-bg: rgba(0,0,0,0.18);
  --notice-border: rgba(255,255,255,0.18);

  /* Tabs/Subnav */
  --tab-bg: rgba(255,255,255,0.05);
  --tab-border: rgba(255,255,255,0.10);
  --tab-active-bg: rgba(139,92,246,0.20);
  --tab-active-border: rgba(139,92,246,0.45);

  /* AI surfaces */
  --ai-bubble-bg: rgba(139,92,246,0.14);
  --ai-bubble-border: rgba(139,92,246,0.26);

  /* Sidebar (always gradient) */
  --sidebar-bg: var(--brand-gradient-vert);
  --sidebar-active-bg: rgba(255,255,255,0.14);
  --sidebar-active-border: rgba(255,255,255,0.20);

  /* Top bar */
  --topbar-border: rgba(255,255,255,0.14);

  /* Shadow tuning */
  --shadow: 0 12px 30px rgba(0,0,0,0.35);
  --shadow-soft: 0 8px 22px rgba(0,0,0,0.30);

  --focus: 0 0 0 3px rgba(255,117,31,0.22);

  /* Navigation text tokens */
  --nav-text: rgba(255,255,255,0.95);
  --nav-text-muted: rgba(255,255,255,0.78);
  --nav-text-strong: rgba(255,255,255,0.92);
}

/* ===== PURPLE THEME ===== */
html[data-theme="purple"]{
  /* Brand */
  --brand-primary: #4C1D95;
  --brand-primary-2: #6D28D9;
  --brand-primary-3: #8B5CF6;
  --brand-cta: #FF751F;
  --brand-cta-hover: #E85F14;

  /* Nav gradient tuning */
  --nav-primary-start: #131319;

  /* States */
  --brand-accent: #22C55E;
  --brand-warn: #FF751F;
  --brand-danger: #EF4444;

  /* Surfaces */
  --bg: #0B0B12;
  --surface: #202020;
  --surface-2: #17172A;
  --surface-3: rgba(109,40,217,0.10);
  --border: rgba(255,255,255,0.10);

  /* Text */
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --link: rgba(255,255,255,0.92);

  /* Inputs */
  --input-bg: rgba(0,0,0,0.22);
  --input-border: rgba(255,255,255,0.14);

  /* Buttons */
  --btn-bg: rgba(255,255,255,0.06);
  --btn-border: rgba(255,255,255,0.12);

  /* Notices */
  --notice-bg: rgba(0,0,0,0.18);
  --notice-border: rgba(255,255,255,0.18);

  /* Tabs/Subnav */
  --tab-bg: rgba(255,255,255,0.05);
  --tab-border: rgba(255,255,255,0.10);
  --tab-active-bg: rgba(139,92,246,0.20);
  --tab-active-border: rgba(139,92,246,0.45);

  /* AI surfaces */
  --ai-bubble-bg: rgba(139,92,246,0.14);
  --ai-bubble-border: rgba(139,92,246,0.26);

  /* Sidebar */
  --sidebar-bg: linear-gradient(180deg, #131319 0%, #291B38 100%);
  --sidebar-active-bg: rgba(255,255,255,0.14);
  --sidebar-active-border: rgba(255,255,255,0.20);

  /* Top bar */
  --topbar-border: rgba(255,255,255,0.14);

  /* Shadow tuning */
  --shadow: 0 12px 30px rgba(0,0,0,0.35);
  --shadow-soft: 0 8px 22px rgba(0,0,0,0.30);

  --focus: 0 0 0 3px rgba(255,117,31,0.22);

  /* Navigation text tokens */
  --nav-text: rgba(255,255,255,0.95);
  --nav-text-muted: rgba(255,255,255,0.78);
  --nav-text-strong: rgba(255,255,255,0.92);
}

html[data-theme="dark"] .todays-focus{
  background: linear-gradient(180deg, #262626, #404040);
}

html[data-theme="dark"] .todays-focus details{
  background: linear-gradient(180deg, #262626, #404040);
}

html[data-theme="purple"] .todays-focus{
  background: linear-gradient(180deg, #291B38, #131319);
}

html[data-theme="purple"] .todays-focus details{
  background: linear-gradient(180deg, #291B38, #131319);
}

/* ===== Navigation text tokens (theme-aware) ===== */
:root,
html[data-theme="light"]{
  --nav-text: rgba(17,24,39,0.92);
  --nav-text-muted: rgba(17,24,39,0.62);
  --nav-text-strong: rgba(17,24,39,0.92);
}

/* ===== Reset ===== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background: linear-gradient(180deg, rgba(109,40,217,0.10), var(--bg) 260px);
}

html[data-theme="purple"] body{
  background: linear-gradient(180deg, #291B38, #131319);
}
a{ color: var(--link); }
code{ font-family: var(--mono); }

/* ===== App shell ===== */
.app{
  min-height:100vh;
  display:grid;
  grid-template-rows: 56px 1fr;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-areas:
    "top top"
    "nav main";
  height: 100vh;
}

/* ===== Layout mode switch (Public vs App) ===== */
.app.app-public{
  grid-template-columns: 1fr;
  grid-template-areas:
    "top"
    "main";
}
.app.app-app{
  display: grid !important;
  grid-template-rows: 56px 1fr !important;
  grid-template-columns: 260px minmax(0, 1fr) !important;
  grid-template-areas: "top top" "nav main" !important;
}

.app.app-app.app-no-sidebar{
  grid-template-columns: 1fr !important;
  grid-template-areas:
    "top"
    "main" !important;
}

.app.app-app.is-nav-collapsed{
  grid-template-columns: 32px minmax(0, 1fr) !important;
}

/* ===== Top bar ===== */
.topbar{
  grid-area:top;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 14px;
  background: linear-gradient(90deg, #000000, #404040);
  border-bottom: 0; /* remove seam above gradient sidebar */
}

html[data-theme="light"] .topbar{
  background: linear-gradient(90deg, #FFFFFF, #F3F4F6);
  border-bottom: 1px solid rgba(17,24,39,0.10);
}

html[data-theme="purple"] .topbar{
  background: linear-gradient(90deg, #131319, #291B38);
  border-bottom: 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:500;
  letter-spacing:0.3px;
  color: var(--nav-text);
}

html[data-theme="light"] .brand a{ color: rgba(17,24,39,0.92) !important; }
.brand b{ font-weight: 800; }
.brand .logo{
  width:38px; height:38px;
  border-radius:12px;
  background: transparent;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.16);
  overflow:hidden;
}

.pill{
  background: rgba(255,255,255,0.16);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  color: var(--nav-text-strong);
}

.brand .wordmark{
  height: 38px;
  display:flex;
  align-items:center;
}

.brand .wordmark img{
  height: 100%;
  width: auto;
  display:none;
  object-fit: contain;
}

/* Wordmark swap (dark vs light background) */
.brand .wordmark .wordmark--dark{ display:block; }
html[data-theme="light"] .brand .wordmark .wordmark--dark{ display:none; }
html[data-theme="light"] .brand .wordmark .wordmark--light{ display:block; }
html[data-theme="purple"] .brand .wordmark .wordmark--dark{ display:none; }
html[data-theme="purple"] .brand .wordmark .wordmark--purple{ display:block; }

.topbar .center{
  display:flex;
  align-items:center;
  gap:10px;
  flex: 1;
  justify-content: flex-start;
}

.topnav{
  display:flex;
  align-items:center;
  gap: 22px;
  margin-left: 18px;
}

.topnav a{
  color: var(--nav-text);
  text-decoration:none;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 2px;
  border-bottom: 0;
}

.topnav a:hover{ color: rgba(0,0,0,0.92); }
html[data-theme="dark"] .topnav a:hover{ color: rgba(255,255,255,1); }
html[data-theme="purple"] .topnav a:hover{ color: rgba(255,255,255,1); }

.topnav a.is-active{
  color: #FF751F;
}

.topbar .right a.text-link,
.topbar .right button.text-link{
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  color: var(--nav-text);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.topbar .right a.text-link:hover,
.topbar .right button.text-link:hover{
  color: rgba(0,0,0,0.92);
  text-decoration: none;
}
html[data-theme="dark"] .topbar .right a.text-link:hover,
html[data-theme="dark"] .topbar .right button.text-link:hover{ color: rgba(255,255,255,1); }
html[data-theme="purple"] .topbar .right a.text-link:hover,
html[data-theme="purple"] .topbar .right button.text-link:hover{ color: rgba(255,255,255,1); }

.topbar .right a.text-link.is-active,
.topbar .right button.text-link.is-active{
  color: #FF751F;
}

.topbar .center .progress-wrap{
  margin-left: auto;
}

.progress-wrap{
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--nav-text-strong);
  font-size:13px;
}
.progress{
  flex:1;
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,0.18);
  overflow:hidden;
}
.progress > div{
  height:100%;
  width: 45%;
  background: linear-gradient(90deg, var(--brand-cta), rgba(255,117,31,0.60));
}

.topbar .right{
  display:flex;
  align-items:center;
  gap:10px;
}

.icon-btn{
  border:none;
  background: rgba(255,255,255,0.16);
  color: var(--nav-text);
  padding:8px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 700;
  font-size:13px;
  transition: background 160ms var(--ease);
}
.icon-btn:hover{ background: rgba(255,255,255,0.22); }

html[data-theme="light"] .icon-btn{
  background: rgba(17,24,39,0.06);
  color: rgba(17,24,39,0.92);
}
html[data-theme="light"] .icon-btn:hover{ background: rgba(17,24,39,0.10); }

.icon-btn--square{
  width: 36px;
  height: 36px;
  padding: 0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 12px;
}

.user-chip{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #FF751F;
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.icon-btn .caret{ opacity: 0.85; margin-left: 6px; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  transition: transform 120ms var(--ease), filter 160ms var(--ease), background 160ms var(--ease);
}
.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }
.btn:focus{ outline:none; box-shadow: var(--focus); }
.btn:disabled{ opacity: 0.55; cursor: not-allowed; filter: none; transform: none; }

/* CTA (orange) */
.btn.cta{
  background: var(--brand-cta);
  border-color: rgba(0,0,0,0.10);
  color: #fff !important;
}
.btn.cta:hover{ background: var(--brand-cta-hover); filter:none; }

/* Subtle primary (purple tint) */
.btn.primary{
  background: rgba(139,92,246,0.14);
  border-color: rgba(109,40,217,0.28);
}

/* Surface 2 */
.btn.surface2{
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

/* Theme-invariant light surface button (used when you want the same look in light + dark) */
.btn.surface2lite{
  background: #F3F4F6;
  border-color: rgba(17,24,39,0.12);
  color: rgba(17,24,39,0.92);
}

/* ===== Avatar ===== */
.avatar{
  width:30px; height:30px;
  border-radius:999px;
  background: rgba(0,0,0,0.22);
  display:grid; place-items:center;
  font-weight:800;
  color: var(--nav-text);
}

/* Avatar link (user icon circle) */
.avatar-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 40px;
  height: 40px;
  background-color: rgba(0,0,0,0.20);
  border-radius: 50%;
  color: var(--nav-text);
  text-decoration: none;
  transition: background 160ms var(--ease);
}
.avatar-link:hover{ background-color: rgba(0,0,0,0.30); }
.avatar-link svg{ width:28px; height:28px; }

/* ===== Left nav ===== */
.sidebar{
  grid-area:nav;
  background: linear-gradient(180deg,
    #7F7F7F 0%,
    #404040 100%
  ) !important;
  border-right: 0;
  padding: 44px 12px 12px;
  overflow-y: auto;
  min-height: 0;
  position: relative;
  z-index: 20;
}

html[data-theme="light"] .sidebar{
  background: linear-gradient(180deg, #FFFFFF 0%, #747474 100%) !important;
  border-right: 1px solid rgba(17,24,39,0.18);
  box-shadow: 10px 0 26px rgba(17,24,39,0.08);
}

html[data-theme="purple"] .sidebar{
  background: linear-gradient(180deg, #131319 0%, #291B38 100%) !important;
  border-right: 1px solid rgba(255,255,255,0.12);
  box-shadow: 10px 0 26px rgba(0,0,0,0.24);
}

html[data-theme="light"] .sidebar .nav-title{ color: rgba(0,0,0,0.62); }
html[data-theme="light"] .sidebar .nav a:not(.active):not(.is-active){ color: #000000; }
html[data-theme="light"] .sidebar .nav a:hover{ background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.10); }

.sidebar-toggle{
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.14);
  color: var(--nav-text);
  padding: 0;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 800;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 25;
  display:flex;
  align-items:center;
  justify-content:center;
}
.sidebar-toggle:hover{ background: rgba(255,255,255,0.20); }

html[data-theme="light"] .sidebar-toggle{
  border-color: rgba(17,24,39,0.18);
  background: rgba(255,255,255,0.65);
  color: rgba(17,24,39,0.92);
}
html[data-theme="light"] .sidebar-toggle:hover{ background: rgba(255,255,255,0.82); }

.app.is-nav-collapsed{
  grid-template-columns: 32px minmax(0, 1fr);
}

.app.is-nav-collapsed .sidebar{
  padding: 12px;
  width: 260px;
  transform: translateX(-228px);
  overflow: visible;
}

.app.is-nav-collapsed .sidebar .nav-title,
.app.is-nav-collapsed .sidebar .nav,
.app.is-nav-collapsed .sidebar .label{
  display:none;
}

.app.is-nav-collapsed .sidebar .sidebar-toggle{
  display:block;
  width: 28px;
  padding: 8px 0;
  border-radius: 999px;
  position: absolute;
  top: 10px;
  right: 2px;
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.26);
}

/* Nav titles */
.nav-title{
  color: var(--nav-text-muted);
  font-size:12px;
  margin: 10px 10px 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Nav links */
.nav a,
.nav .nav-item{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--nav-text);
  padding:10px 10px;
  border-radius: 12px;
  margin: 4px 0;
  border: 1px solid transparent;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}

.nav a:hover,
.nav .nav-item:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.14);
}

.nav a.active, .nav a.is-active,
.nav .nav-item.is-active{
  background: transparent;
  border-color: transparent;
  color: #FF751F;
  font-weight: 900;
}

.nav .icon{
  width:18px; height:18px;
  border-radius:6px;
  background: rgba(255,255,255,0.16);
  display:grid; place-items:center;
  font-size:12px;
}

.tile-header{
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.tile-header--gold{ background: var(--brand-gold-gradient); }

.tile-header-title{
  color:#fff;
  font-weight:900;
}

.focus-strip{
  padding:10px 12px;
  font-weight:800;
  color:#fff;
}

.focus-strip--risk{ background: linear-gradient(90deg, rgba(231,76,60,0.95), rgba(231,76,60,0.70)); }
.focus-strip--due{ background: linear-gradient(90deg, rgba(243,156,18,0.95), rgba(243,156,18,0.70)); }
.focus-strip--opp{ background: linear-gradient(90deg, rgba(46,204,113,0.95), rgba(46,204,113,0.70)); }
.focus-strip--mom{ background: linear-gradient(90deg, rgba(52,152,219,0.95), rgba(52,152,219,0.70)); }

/* ===== Main ===== */
.main{
  grid-area:main;
  padding: 18px;
  overflow-y: auto;
  min-height: 0;
  background: linear-gradient(180deg, #404040, #7F7F7F);
  color: #D9D9D9;
}

html[data-theme="light"] .main{
  background: linear-gradient(180deg, #FFFFFF, #F3F4F6);
  color: rgba(55,65,81,0.98);
}

html[data-theme="purple"] .main{
  background: linear-gradient(180deg, #291B38, #131319);
  color: rgba(255,255,255,0.92);
}

.main .card{
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.main .card{ font-size: 15px; }
.main .card .footer-note{ font-size: 15px; }

.home-summary-title{ color: var(--brand-cta); }

.home-alerts{
  display:flex;
  flex-direction:column;
  gap: 8px;
}

.home-alert{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 6px 0;
}

.home-alert + .home-alert{
  border-top: 1px solid rgba(127,127,127,0.18);
}

.home-alert-icon{
  width: 18px;
  height: 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: var(--brand-cta);
  flex: 0 0 auto;
}

.home-alert-icon svg{ width: 18px; height: 18px; display:block; }

.home-alert-text{
  color: var(--text);
  opacity: 0.92;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.home-activity-list{
  display:flex;
  flex-direction:column;
}

.home-activity{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px 0;
}

.home-activity + .home-activity{
  border-top: 1px solid rgba(127,127,127,0.18);
}

.home-activity-icon{
  width: 18px;
  height: 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}

.home-activity-icon svg{ width: 18px; height: 18px; display:block; }

.home-activity-icon--ok{ color: rgba(34,197,94,0.95); }
.home-activity-icon--update{ color: rgba(255,117,31,0.95); }
.home-activity-icon--new{ color: rgba(59,130,246,0.95); }

.home-activity-text{
  color: var(--text);
  opacity: 0.92;
  font-weight: 700;
  letter-spacing: -0.01em;
  min-width: 0;
}

.home-activity-time{
  margin-left: auto;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  opacity: 0.9;
  flex: 0 0 auto;
}

.home-ai-insights-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 980px){
  .home-ai-insights-grid{ grid-template-columns: 1fr; }
}

.home-ai-insight{
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-ai-insight-head{
  display:flex;
  align-items:center;
  gap: 10px;
}

.home-ai-insight-icon{
  width: 18px;
  height: 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: var(--brand-cta);
  flex: 0 0 auto;
}

.home-ai-insight-icon svg{ width: 18px; height: 18px; display:block; }

.home-ai-insight-title{
  font-weight: 900;
  letter-spacing: -0.01em;
}

.home-ai-insight-body{
  margin-top: 10px;
  color: var(--text);
  opacity: 0.9;
  font-weight: 700;
}

.home-ai-insight-cta{ margin-top: 12px; }

.home-ai-insight-cta .btn{ width: 100%; justify-content: space-between; }

.home-ai-insights .vix-section-title{ color: var(--brand-cta); }

.btn.home-ai-insight-btn{
  background: rgba(59,130,246,0.85);
  border-color: rgba(0,0,0,0.10);
  color: #fff !important;
  font-weight: 900;
}

.btn.home-ai-insight-btn:hover{ background: rgba(37,99,235,0.90); filter:none; }

.home-transform-overview .vix-section-title{ color: var(--brand-cta); }

.home-transform-overview-row{
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(0,0,0,0.14);
  overflow:hidden;
}

html[data-theme="light"] .home-transform-overview-row{
  border-color: rgba(17,24,39,0.10);
  background: rgba(0,0,0,0.04);
}

@media (max-width: 980px){
  .home-transform-overview-row{
    flex-wrap:wrap;
    justify-content:flex-start;
  }
  .home-transform-divider{ display:none; }
}

.home-transform-divider{
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,0.14);
}

html[data-theme="light"] .home-transform-divider{ background: rgba(17,24,39,0.10); }

.home-transform-gauge{
  width: 120px;
  height: 68px;
  position: relative;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.10);
  flex: 0 0 auto;
}

html[data-theme="light"] .home-transform-gauge{
  background: rgba(0,0,0,0.04);
  border-color: rgba(17,24,39,0.10);
}

.home-transform-gauge-arc{
  position:absolute;
  inset: 10px 10px 22px 10px;
  border-radius: 999px 999px 10px 10px;
  background:
    conic-gradient(
      from 180deg,
      #ef4444 0deg,
      #ff751f 60deg,
      #fde68a 110deg,
      #22c55e 180deg,
      rgba(255,255,255,0.12) 180deg,
      rgba(255,255,255,0.12) 360deg
    );
  -webkit-mask:
    radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  mask:
    radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  opacity: 0.95;
}

.home-transform-gauge-center{
  position:absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  text-align:center;
}

.home-transform-gauge-score{
  font-weight: 1000;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.home-transform-gauge-den{ font-size: 12px; font-weight: 900; opacity: 0.9; margin-left: 2px; }

.home-transform-block{
  min-width: 160px;
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.home-transform-kicker{
  font-weight: 900;
  opacity: 0.9;
}

.home-transform-value{
  font-weight: 1000;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.home-transform-value-den{ font-size: 12px; font-weight: 900; opacity: 0.9; margin-left: 2px; }

.home-transform-mini-track{
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow:hidden;
}

html[data-theme="light"] .home-transform-mini-track{ background: rgba(17,24,39,0.10); }

.home-transform-mini-fill{
  width: calc(var(--pct, 0.734) * 100%);
  height: 100%;
  background: linear-gradient(90deg, #ff751f, #fde68a);
  border-radius: 999px;
}

.home-transform-sub{
  font-weight: 900;
  opacity: 0.95;
  display:flex;
  align-items:center;
  gap: 8px;
}

.home-transform-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display:inline-block;
  background: #ff751f;
}

.home-transform-dot.is-yellow{ background: #ff751f; }

.home-transform-tri{
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid #60a5fa;
  display:inline-block;
  transform: translateY(-1px);
}

.home-transform-chevron{ opacity: 0.8; font-weight: 1000; }

.home-lifecycle .vix-section-title{ color: var(--brand-cta); }

.home-lifecycle-stepper{
  display:grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items:center;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(0,0,0,0.14);
}

html[data-theme="light"] .home-lifecycle-stepper{
  border-color: rgba(17,24,39,0.10);
  background: rgba(0,0,0,0.04);
}

@media (max-width: 980px){
  .home-lifecycle-stepper{
    grid-template-columns: 1fr;
    justify-items:start;
  }
}

.home-lifecycle-step{ min-width: 160px; }

.home-lifecycle-top{
  display:flex;
  align-items:center;
  gap: 10px;
}

.home-lifecycle-ico{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.90);
  flex: 0 0 auto;
}

html[data-theme="light"] .home-lifecycle-ico{
  background: rgba(17,24,39,0.06);
  border-color: rgba(17,24,39,0.10);
  color: rgba(17,24,39,0.85);
}

.home-lifecycle-ico svg{ width: 14px; height: 14px; display:block; }

.home-lifecycle-name{
  font-weight: 1000;
  letter-spacing: -0.02em;
  font-size: 22px;
  line-height: 1;
}

.home-lifecycle-sub{
  margin-left: 32px;
  margin-top: 6px;
  font-weight: 900;
  opacity: 0.9;
}

.home-lifecycle-step.is-complete .home-lifecycle-ico{
  background: rgba(34,197,94,0.20);
  border-color: rgba(34,197,94,0.35);
  color: rgba(34,197,94,0.95);
}

.home-lifecycle-step.is-current .home-lifecycle-ico{
  background: rgba(255,117,31,0.18);
  border-color: rgba(255,117,31,0.30);
  color: rgba(255,117,31,0.95);
}

.home-lifecycle-step.is-current .home-lifecycle-name,
.home-lifecycle-step.is-current .home-lifecycle-sub{
  color: rgba(255,117,31,0.95);
}

.home-lifecycle-rail{
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 10px;
}

html[data-theme="light"] .home-lifecycle-rail{ background: rgba(17,24,39,0.10); }

.home-lifecycle-dot{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.40);
  background: rgba(0,0,0,0.20);
}

html[data-theme="light"] .home-lifecycle-dot{
  border-color: rgba(17,24,39,0.35);
  background: rgba(255,255,255,0.65);
}

.home-lifecycle-dot.is-complete{
  border-color: rgba(34,197,94,0.70);
  background: rgba(34,197,94,0.22);
}

.home-lifecycle-dot.is-current{
  border-color: rgba(255,117,31,0.85);
  background: rgba(255,117,31,0.22);
}

.home-lifecycle-next{
  display:flex;
  gap: 22px;
  align-items:center;
  flex-wrap:wrap;
}

.home-lifecycle-next-item{
  font-weight: 900;
  opacity: 0.9;
  white-space: nowrap;
}

html[data-theme="light"] .main .card{
  background: linear-gradient(180deg, rgba(242,242,242,0.98), rgba(226,226,226,0.98));
  border-color: rgba(17,24,39,0.10);
}

.main .card.progress-dashboard{
  background: linear-gradient(180deg, #8A8A8A, #686868);
  color: #D9D9D9;
}

html[data-theme="dark"] .main .card.progress-dashboard{
  background: linear-gradient(180deg, #262626, #404040);
}

html[data-theme="purple"] .main .card.progress-dashboard{
  background: linear-gradient(180deg, #291B38, #131319);
}

html[data-theme="purple"] .main .card.progress-dashboard{
  --progress-dashboard-module-head-bg: linear-gradient(90deg, #291B38, #131319);
}

html[data-theme="purple"] .main .card.progress-dashboard .vix-section-title{
  color: var(--brand-cta);
}

html[data-theme="dark"] .main .card.snapshot-card{
  background: linear-gradient(180deg, #262626, #404040);
}

html[data-theme="purple"] .main .card.snapshot-card{
  background: linear-gradient(180deg, #291B38, #131319);
}

html[data-theme="light"] .main .card.progress-dashboard{
  background: linear-gradient(180deg, #E5E7EB, #D1D5DB);
  color: rgba(17,24,39,0.92);
}

html[data-theme="light"] .main .card.progress-dashboard p{
  color: rgba(107,114,128,0.98);
}

.main .card.progress-dashboard p{
  color: #D9D9D9;
}

label{ font-size:13px; color: var(--muted); }

input, select, textarea{
  width:100%;
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  outline:none;
}
textarea{ min-height: 90px; resize: vertical; }
input::placeholder, textarea::placeholder{ color: rgba(127,127,127,0.65); }

table{ width:100%; border-collapse: collapse; }
th{ text-align:left; font-weight:700; }
th, td{ vertical-align: top; }

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--pad);
}

.card h2{
  margin:0 0 8px 0;
  font-size:16px;
}

.vix-section-title{
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.vix-section-subtitle{
  margin: 6px 0 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
}

.card p{
  margin:0;
  color: var(--muted);
  font-size:13px;
}

 .home-focus{
   padding: 14px 16px;
 }

 .home-focus-head{
   display:flex;
   align-items:flex-start;
   justify-content:space-between;
   gap: 12px;
 }

 .home-focus-controls{
   display:flex;
   gap: 8px;
   align-items:center;
 }

 .home-focus-track{
   margin-top: 12px;
   display:flex;
   gap: 12px;
   overflow-x:auto;
   padding-bottom: 6px;
   scroll-snap-type: x mandatory;
   -webkit-overflow-scrolling: touch;
 }

 .home-focus-track::-webkit-scrollbar{
   height: 10px;
 }

 .home-focus-track::-webkit-scrollbar-thumb{
   background: rgba(127,127,127,0.25);
   border-radius: 999px;
 }

 .home-focus-card{
   scroll-snap-align: start;
   min-width: 260px;
   max-width: 320px;
   flex: 0 0 auto;
   border: 1px solid var(--border);
   border-radius: var(--radius);
   padding: 14px;
   box-shadow: var(--shadow);
 }

 .home-focus-card-title{
   font-weight: 700;
   font-size: 14px;
   margin-bottom: 6px;
 }

 .home-focus-card-body{
   color: var(--muted);
   font-size: 13px;
   line-height: 1.35;
   margin-bottom: 12px;
 }

 .home-focus-card-cta{
  display:flex;
  justify-content:flex-start;
 }

 .home-heatmaps{
   display:grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   gap: 14px;
 }

 .home-metrics{
   display:grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   gap: 14px;
   margin-top: 14px;
 }

 .home-metric{
   padding: 14px;
   border: 1px solid var(--border);
   border-radius: var(--radius);
   background: var(--surface);
   box-shadow: var(--shadow);
 }

 .home-metric-head{
   display:flex;
   align-items:flex-start;
   justify-content:space-between;
   gap: 10px;
 }

 .home-metric-title{
   font-weight: 700;
   font-size: 14px;
   margin-bottom: 4px;
 }

 .home-metric-value{
   font-weight: 800;
   font-size: 16px;
 }

 .home-metric-chart{
   margin-top: 10px;
   height: 120px;
 }

 .heatmap-table{
   width:100%;
   border-collapse: collapse;
 }

 .heatmap-table th{
   text-align:left;
   padding:8px;
   font-size:12px;
   color: var(--muted);
   border-bottom:1px solid var(--border);
   font-weight: 700;
 }

 .heatmap-table td{
   padding:10px 8px;
   border-bottom:1px solid rgba(127,127,127,0.12);
   font-size:13px;
 }

 .heatmap-legend{
   display:flex;
   gap: 8px;
   flex-wrap: wrap;
   justify-content:flex-end;
 }

 .heatmap-pill{
   display:inline-flex;
   align-items:center;
   gap:6px;
   padding: 4px 8px;
   border-radius: 999px;
   font-size: 12px;
   border: 1px solid rgba(127,127,127,0.18);
   background: rgba(127,127,127,0.08);
 }

 .heatmap-bar{
   height: 12px;
   width: 100%;
   border-radius: 999px;
   overflow: hidden;
   display:flex;
   border: 1px solid rgba(127,127,127,0.14);
   background: rgba(127,127,127,0.10);
 }

 .heatmap-seg{
   height: 100%;
 }

 .heatmap-pill.strong, .heatmap-seg.strong{ background: rgba(0,178,255,0.75); border-color: rgba(0,178,255,0.55); }
 .heatmap-pill.average, .heatmap-seg.average{ background: rgba(255,140,0,0.72); border-color: rgba(255,140,0,0.55); }
 .heatmap-pill.risk, .heatmap-seg.risk{ background: rgba(220,53,69,0.72); border-color: rgba(220,53,69,0.55); }
 .heatmap-pill.unrated, .heatmap-seg.unrated{ background: rgba(127,127,127,0.32); border-color: rgba(127,127,127,0.22); }

 .matrix-wrap{
   display:flex;
   align-items: stretch;
   gap: 12px;
 }

 .matrix-y{
   writing-mode: vertical-rl;
   transform: rotate(180deg);
   font-size: 12px;
   color: var(--muted);
   display:flex;
   align-items:center;
   justify-content:center;
   padding: 8px 6px;
 }

 .matrix-x{
   text-align:center;
   font-size: 12px;
   color: var(--muted);
   margin-bottom: 8px;
 }

 .matrix-grid{
   display:grid;
   grid-template-columns: 36px repeat(5, 52px);
   grid-template-rows: 28px repeat(5, 44px);
   gap: 4px;
   align-items: stretch;
 }

 .matrix-cell{
   border: 1px solid rgba(127,127,127,0.14);
   border-radius: 8px;
   display:flex;
   align-items:center;
   justify-content:center;
   font-size: 13px;
   font-weight: 800;
   color: rgba(0,0,0,0.72);
 }

 [data-theme="dark"] .matrix-cell{
   color: rgba(255,255,255,0.85);
 }

 .matrix-cell.head{
   background: rgba(127,127,127,0.08);
   color: var(--muted);
   font-weight: 700;
   font-size: 12px;
 }

 .marketing-scatter{
   display:grid;
   grid-template-columns: 1.2fr 0.8fr;
   gap: 14px;
   align-items: start;
 }

 .marketing-scatter-title{
   font-weight: 800;
   font-size: 13px;
 }

 .marketing-scatter-frame{
   margin-top: 10px;
   display:flex;
   gap: 10px;
   align-items: stretch;
 }

 .marketing-scatter-y{
   writing-mode: vertical-rl;
   transform: rotate(180deg);
   font-size: 12px;
   color: var(--muted);
   display:flex;
   align-items:center;
   justify-content:center;
   padding: 6px 4px;
 }

 .marketing-scatter-x{
   text-align:center;
   font-size: 12px;
   color: var(--muted);
   margin-top: 6px;
 }

 .marketing-scatter-svg{
   width: 100%;
   max-width: 700px;
   height: auto;
   border-radius: 14px;
   display:block;
 }

 .scatter-point.is-selected circle{
   stroke: rgba(255,255,255,1);
   stroke-width: 3;
 }

.marketing-scatter-panel{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(127,127,127,0.05);
}

.home-img-tile{
  display:block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
  height: 200px;
}

.home-img-tile img{
  width: 100%;
  height: 100%;
  display:block;
  object-fit: cover;
}

html[data-theme="purple"] .home-summary{
  background: linear-gradient(180deg, #131319, #291B38);
  border-color: rgba(255,255,255,0.12);
}

html[data-theme="purple"] .home-summary > div{
  border-bottom-color: rgba(255,255,255,0.12) !important;
}

html[data-theme="purple"] .home-deploy{
  background: linear-gradient(180deg, #131319, #291B38);
  border-color: rgba(255,255,255,0.12);
}

html[data-theme="purple"] .home-deploy > div{
  background: linear-gradient(180deg, #131319, #291B38) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: rgba(255,255,255,0.92);
}

html[data-theme="purple"] .home-deploy > div h3{
  color: rgba(255,255,255,0.95);
}

@media (max-width: 980px){
  .home-heatmaps{ grid-template-columns: 1fr; }
  .home-metrics{ grid-template-columns: 1fr; }
  .marketing-scatter{ grid-template-columns: 1fr; }
}

.notice{
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed var(--notice-border);
  background: var(--notice-bg);
  color: rgba(127,127,127,0.95);
  white-space: pre-wrap;
}

.footer-note{
  color: var(--muted);
  font-size:12px;
  margin-top: 14px;
}

.body-note{
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  margin-top: 14px;
}

.body-note p{
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  margin: 10px 0 0 0;
}

.body-note p:first-child{
  margin-top: 0;
}

/* ===== Page Title (2-row layout) ===== */
.page-title-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:14px;
}

.sticky-top{
  position: sticky;
  top: 0;
  z-index: 30;
  background: transparent;
  padding-top: 0;
  padding-bottom: 8px;
  margin-top: 0;
  border-bottom: 0;
}

/* When sticky content lives inside .main (which has padding:18px), sticky positioning
   starts below that padding. This variant cancels the padding so the tabs bar can
   sit flush under the topbar, matching the mock. */
.sticky-top.sticky-top--tabs{
  top: -18px;
  background: transparent;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

html[data-theme="dark"] .sticky-top{ border-bottom: 0; }

.sticky-top .page-title-wrap{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.sticky-top .page-title-main{ flex:1; max-width:60%; }
.sticky-top .page-title-actions{ flex:0 0 auto; margin-top:0; }

.sticky-top .page-title-main h1{
  font-size:32px;
  line-height:1.15;
  color: #FF751F;
  margin:0;
}

.sf-page-title .page-title-main h1{
  font-size:32px;
  line-height:1.15;
  color: #FF751F;
  margin:0;
}

.sticky-top .page-title-main h3{
  font-size:18px;
  color: var(--text);
  margin:6px 0 0 0;
  font-weight:700;
}

/* In the unified SF header card, allow the title/subtitle to use more horizontal space */
.sticky-top .sf-nav-card .page-title-main{ max-width: 100%; }
@media (min-width: 981px){
  .sticky-top .sf-nav-card .page-title-main h3{ white-space: nowrap; }
}

.sticky-top.sticky-top--compact .page-title-main h1{ font-size:28px; }
.sticky-top.sticky-top--compact .page-title-main h3{ font-size:16px; }

@media (max-width: 980px){
  .sticky-top .page-title-wrap{ flex-direction:column; }
  .sticky-top .page-title-main{ max-width:100%; }
  .sticky-top .page-title-actions{ justify-content:flex-start; width:100%; }
}

.page-title-main h1{
  margin:0;
  font-size:22px;
}

.page-title-main h3{
  margin:6px 0 0 0;
  font-size:18px;
  color:#D9D9D9;
  font-weight:700;
}

html[data-theme="light"] .page-title-main h3,
html[data-theme="light"] .sf-page-title .page-title-main h3{
  color: #000000;
  font-size: 18px;
}

/* System-wide content typography (scoped to main content area) */
.main p{ font-size:15px; }

.content-title{ font-weight:900; font-size:22px; }
.content-paragraph{ font-size:15px; }

.sf-intro h3{
  margin: 0;
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: -0.02em;
}
.sf-intro p{
  margin: 10px 0 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.vix-intro h4,
.vix-intro h3{
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.sf-intro.vix-intro{
  margin-bottom: 12px;
}

.vix-intro p{
  margin: 8px 0 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
}

.vix-intro p + p{ margin-top: 10px; }

.onboarding{
  padding: 14px;
}

.onboarding-tiles{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.onboarding-tile{
  display:block;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow:hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-decoration:none;
}

.onboarding-tile:hover{
  filter: brightness(1.01);
}

.onboarding-video{
  height: 140px;
  background: rgba(0,0,0,0.10);
}

.onboarding-video img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

html[data-theme="dark"] .onboarding-video{
  background: rgba(255,255,255,0.08);
}

.onboarding-tile-label{
  padding: 10px 12px;
  font-weight: 800;
  color: #FF751F;
}

.onboarding-tile.is-active{
  border-color: rgba(255,117,31,0.45);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.onboarding-collapsible{
  padding: 0;
  overflow: hidden;
}

.onboarding-collapsible details{ padding: 0; }

.onboarding-collapsible summary{
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
}

.onboarding-collapsible summary::-webkit-details-marker{ display:none; }

.onboarding-summary{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}

.onboarding-summary h2{ margin:0; }

.onboarding-body{
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.onboarding-collapsible .toggle-hide{ display:none; }
.onboarding-collapsible .toggle-expand{ display:none; }
.onboarding-collapsible details[open] .toggle-hide{ display:inline; }
.onboarding-collapsible details:not([open]) .toggle-expand{ display:inline; }

@media (max-width: 980px){
  .onboarding-tiles{ grid-template-columns: 1fr; }
  .onboarding-video{ height: 180px; }
}

.page-title-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
}

.page-title-actions input{
  width:260px;
}

.report-label{
  font-weight:800;
  font-size:13px;
  color:var(--muted);
}

/* Profile / Settings layout */
.pf-row{ display:grid; grid-template-columns: 200px 1fr; gap:14px; align-items:center; margin-bottom:12px; }
@media (max-width: 920px){
  .pf-row{ grid-template-columns: 1fr; }
}

/* Capabilities / Performance workbench shell */
:root{ --app-top-offset: 0px; }
.cap-page{
  height: calc(100vh - var(--app-top-offset));
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cap-top{
  flex: 0 0 auto;
  position: sticky;
  top: var(--app-top-offset);
  z-index: 50;
  background: var(--bg, #0b0f19);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cap-scroll{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-top: 12px;
}

.cap-page .tile{ padding: 12px; }
.cap-page .tile h3{ font-size: 14px; line-height: 1.2; margin: 0 0 6px 0; }
.cap-page .tile .footer-note{ font-size: 12px; opacity: 0.8; }
.cap-page .tile .notice{ font-size: 12px; padding: 10px; }
.cap-page .section-title{ font-size: 16px; margin: 0; }
.cap-page .section-subtitle{ margin-top: 6px; opacity: 0.85; }
.cap-page .tile-body{ margin-top: 10px; }

.gs details{ border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #8A8A8A, #686868); color: #D9D9D9; }
.gs summary{ list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 900; }
.gs summary::-webkit-details-marker{display:none;}
.gs summary p{ color: #D9D9D9; }
.gs .toggle-hide{display:none;}
.gs .toggle-expand{display:none;}
.gs details[open] .toggle-hide{display:inline;}
.gs details:not([open]) .toggle-expand{display:inline;}
.gs summary > div:first-child{ color: var(--brand-cta); }
.gs .body{ padding: 12px 14px; border-top: 1px solid rgba(0,0,0,0.08); }
.gs .body .footer-note{ font-size: 15px; }
.gs .video{ height: 200px; max-width: 400px; width: 100%; margin: 0 auto; border-radius: 12px; border: 1px solid rgba(0,0,0,0.10); background: rgba(0,0,0,0.03); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gs .video img{ width: 100%; height: 100%; object-fit: cover; display: block; }
html[data-theme="light"] .gs details{ background: linear-gradient(180deg, #E5E7EB, #D1D5DB); color: rgba(17,24,39,0.92); }
html[data-theme="light"] .gs summary{ color: rgba(17,24,39,0.92); }
html[data-theme="light"] .gs summary p{ color: rgba(107,114,128,0.98); }
html[data-theme="light"] .gs .toggle-hide,
html[data-theme="light"] .gs .toggle-expand{ color: rgba(107,114,128,0.98); }
html[data-theme="dark"] .gs details{ border-color: rgba(255,255,255,0.10); background: linear-gradient(180deg, #8A8A8A, #686868); color: #D9D9D9; }
html[data-theme="dark"] .gs .body{ border-top: 1px solid rgba(255,255,255,0.10); }
html[data-theme="dark"] .gs .video{ border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); }

html[data-theme="purple"] .gs details{
  background: linear-gradient(180deg, #131319, #291B38);
}

html[data-theme="dark"] .gs.todays-focus details{
  background: linear-gradient(180deg, #262626, #404040);
}

html[data-theme="purple"] .gs.todays-focus details{
  background: linear-gradient(180deg, #291B38, #131319);
}

html[data-theme="dark"] .todays-focus details .card.tile{
  background: #202020;
}

/* ===== Subnav and Seg-nav normalized ===== */
.subnav,
.seg-nav{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

/* SF unified header navigation card (wraps title + L1 + optional L2) */
.sf-nav-card{
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
/* Add breathing room between subtitle and the first nav row */
.sf-nav-card .page-title-wrap{
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 0;
}
/* When nav rows are inside the unified header card, remove their own card styling */
.sf-nav-card .seg-nav{
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sf-tabs{
  margin-top: -18px;
  margin-bottom: 10px;
  margin-left: -18px;
  margin-right: -18px;
  padding-left: 18px;
  padding-right: 18px;
  padding-top: 10px;
  padding-bottom: 10px;
  background: linear-gradient(90deg, #7F7F7F, #404040);
}
html[data-theme="dark"] .sf-tabs{
  background: linear-gradient(90deg, #7F7F7F, #404040);
}

html[data-theme="purple"] .sf-tabs{
  background: linear-gradient(90deg, #131319, #291B38);
}

.sf-tabs-l2,
.sf-tabs-l3{
  display:flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 6px 0;
  align-items:center;
}

.sf-tabs-divider{
  height: 1px;
  width: 90%;
  margin-left: 0;
  margin-right: auto;
  background: rgba(255,255,255,0.22);
}
html[data-theme="light"] .sf-tabs-divider{ background: rgba(0,0,0,0.14); }
html[data-theme="purple"] .sf-tabs-divider{ background: rgba(255,255,255,0.14); }

.sf-tabs-l3{
  padding-top: 4px;
  padding-bottom: 6px;
  min-height: 20px;
}

.sf-tabs a{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  font-weight: 600;
  font-size: 14px;
  color: rgba(255,255,255,0.98);
  text-decoration: none;
  white-space: nowrap;
}

.sf-tabs-l3 a{
  font-weight: 600;
}
html[data-theme="light"] .sf-tabs{
  background: linear-gradient(90deg, #FFFFFF 0%, #747474 100%) !important;
  border-bottom: 1px solid rgba(17,24,39,0.18);
  box-shadow: 0 10px 26px rgba(17,24,39,0.08);
}
html[data-theme="light"] .sf-tabs-divider{ background: rgba(17,24,39,0.12); }
html[data-theme="light"] .sf-tabs-l3{ border-top-color: rgba(17,24,39,0.12); }
html[data-theme="light"] .sf-tabs a:not(.active){ color: rgba(17,24,39,0.92); }
html[data-theme="light"] .sf-tabs a.active{ color: #FF751F; }

html[data-theme="purple"] .sf-tabs{
  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 26px rgba(0,0,0,0.24);
}

.sf-tabs a:hover{ text-decoration: underline; }

.sf-tabs a.active{
  color: #FF751F;
}

/* Mode nav: keep segmented boxes, but make active vs non-active shading clearer */
.seg-nav.seg-nav--segments.seg-nav--mode a,
.seg-nav.seg-nav--segments.seg-nav--mode span{
  background: rgba(17,24,39,0.08);
  color: var(--text);
}
.seg-nav.seg-nav--segments.seg-nav--mode a:hover{
  background: rgba(17,24,39,0.12);
}
.seg-nav.seg-nav--segments.seg-nav--mode a.active,
.seg-nav.seg-nav--segments.seg-nav--mode span.active{
  background: var(--seg-nav-bg);
  color: rgba(255,255,255,0.96);
}

/* Level 2: make Custom Studio a gold CTA tab */
.seg-nav.seg-nav--segments.seg-nav--mode a.is-cta{
  background: var(--seg-nav-bg-soft);
  color: var(--text);
}
.seg-nav.seg-nav--segments.seg-nav--mode a.is-cta:hover{
  background: var(--seg-nav-bg-hover);
}
.seg-nav.seg-nav--segments.seg-nav--mode a.is-cta.active{
  background: var(--seg-nav-bg);
  color: rgba(255,255,255,0.96);
}

/* Level 3: header section nav (3 columns, no background) */
.sf-level3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--tab-border);
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
}
.sf-level3 a{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px 10px;
  font-weight:900;
  font-size:13px;
  text-decoration:none;
  white-space:nowrap;
  user-select:none;
  border:0;
  border-right:1px solid rgba(0,0,0,0.10);
  background: transparent;
  color: var(--text);
}
.sf-level3 a:last-child{ border-right:none; }
.sf-level3 a:hover{ background: var(--seg-nav-tint-10); }
.sf-level3 a.active{ background: var(--seg-nav-tint-22); }
html[data-theme="dark"] .sf-level3 a{ border-right: 1px solid rgba(255,255,255,0.06); color: rgba(255,255,255,0.92); }
html[data-theme="dark"] .sf-level3 a:hover{ background: var(--seg-nav-tint-14); }
html[data-theme="dark"] .sf-level3 a.active{ background: var(--seg-nav-tint-26); }
html[data-theme="purple"] .sf-level3 a{ border-right: 1px solid rgba(255,255,255,0.06); color: rgba(255,255,255,0.92); }
html[data-theme="purple"] .sf-level3 a:hover{ background: var(--seg-nav-tint-14); }
html[data-theme="purple"] .sf-level3 a.active{ background: var(--seg-nav-tint-26); }

.seg-nav.seg-nav--segments.seg-nav--level3 a,
.seg-nav.seg-nav--segments.seg-nav--level3 span{
  background: var(--seg-nav-tint-10);
}
.seg-nav.seg-nav--segments.seg-nav--level3 a.active,
.seg-nav.seg-nav--segments.seg-nav--level3 span.active{
  background: var(--seg-nav-tint-26);
  color: var(--text);
}
html[data-theme="dark"] .seg-nav.seg-nav--segments.seg-nav--level3 a,
html[data-theme="dark"] .seg-nav.seg-nav--segments.seg-nav--level3 span{
  background: var(--seg-nav-tint-16);
}
html[data-theme="dark"] .seg-nav.seg-nav--segments.seg-nav--level3 a.active,
html[data-theme="dark"] .seg-nav.seg-nav--segments.seg-nav--level3 span.active{
  background: var(--seg-nav-tint-30);
  color: rgba(255,255,255,0.96);
}
html[data-theme="purple"] .seg-nav.seg-nav--segments.seg-nav--level3 a,
html[data-theme="purple"] .seg-nav.seg-nav--segments.seg-nav--level3 span{
  background: var(--seg-nav-tint-16);
}
html[data-theme="purple"] .seg-nav.seg-nav--segments.seg-nav--level3 a.active,
html[data-theme="purple"] .seg-nav.seg-nav--segments.seg-nav--level3 span.active{
  background: var(--seg-nav-tint-30);
  color: rgba(255,255,255,0.96);
}
html[data-theme="dark"] .seg-nav.seg-nav--segments.seg-nav--mode a,
html[data-theme="dark"] .seg-nav.seg-nav--segments.seg-nav--mode span{
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.92);
}
html[data-theme="dark"] .seg-nav.seg-nav--segments.seg-nav--mode a:hover{
  background: rgba(255,255,255,0.10);
}
html[data-theme="dark"] .seg-nav.seg-nav--segments.seg-nav--mode a.active,
html[data-theme="dark"] .seg-nav.seg-nav--segments.seg-nav--mode span.active{
  background: var(--seg-nav-bg);
  color: rgba(255,255,255,0.96);
}
html[data-theme="purple"] .seg-nav.seg-nav--segments.seg-nav--mode a,
html[data-theme="purple"] .seg-nav.seg-nav--segments.seg-nav--mode span{
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.92);
}
html[data-theme="purple"] .seg-nav.seg-nav--segments.seg-nav--mode a:hover{
  background: rgba(255,255,255,0.10);
}
html[data-theme="purple"] .seg-nav.seg-nav--segments.seg-nav--mode a.active,
html[data-theme="purple"] .seg-nav.seg-nav--segments.seg-nav--mode span.active{
  background: var(--seg-nav-bg);
  color: rgba(255,255,255,0.96);
}

/* Segmented (grid) variant for seg-nav */
.seg-nav.seg-nav--segments{
  display:grid;
  gap:0;
  padding:0;
  border-radius: 12px;
  overflow:hidden;
  border:1px solid var(--tab-border);
  background: var(--seg-nav-tint-12);
  box-shadow: var(--shadow-soft);
}

.seg-nav.seg-nav--segments.seg-nav--cols-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg-nav.seg-nav--segments.seg-nav--cols-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg-nav.seg-nav--segments.seg-nav--cols-4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg-nav.seg-nav--segments.seg-nav--cols-5{ grid-template-columns: repeat(5, minmax(0, 1fr)); }
.seg-nav.seg-nav--segments.seg-nav--cols-6{ grid-template-columns: repeat(6, minmax(0, 1fr)); }

.seg-nav.seg-nav--segments a,
.seg-nav.seg-nav--segments span{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px 10px;
  font-weight:900;
  font-size:13px;
  text-decoration:none;
  white-space:nowrap;
  user-select:none;
  border-radius:0;
  border:0;
  border-right:1px solid rgba(0,0,0,0.10);
  background: var(--seg-nav-bg-soft);
  color: var(--text);
}

.seg-nav.seg-nav--segments a:last-child,
.seg-nav.seg-nav--segments span:last-child{ border-right:none; }

.seg-nav.seg-nav--segments a:hover{ background: var(--seg-nav-bg-hover); }

.seg-nav.seg-nav--segments a.active,
.seg-nav.seg-nav--segments a.is-active,
.seg-nav.seg-nav--segments span.active,
.seg-nav.seg-nav--segments span.is-active{
  background: var(--seg-nav-bg);
  color: rgba(255,255,255,0.96);
}

html[data-theme="dark"] .seg-nav.seg-nav--segments{ border-color: rgba(255,255,255,0.12); }
html[data-theme="purple"] .seg-nav.seg-nav--segments{ border-color: rgba(255,255,255,0.12); }
html[data-theme="dark"] .seg-nav.seg-nav--segments a,
html[data-theme="dark"] .seg-nav.seg-nav--segments span{ border-right: 1px solid rgba(255,255,255,0.06); color: rgba(255,255,255,0.90); }

.subnav a,
.seg-nav a,
.seg-nav span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--tab-border);
  background: var(--tab-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), transform 120ms var(--ease);
}

.subnav a:hover,
.seg-nav a:hover{
  background: var(--seg-nav-tint-10);
  border-color: var(--seg-nav-tint-28);
}

.subnav a:active,
.seg-nav a:active{
  transform: translateY(1px);
}

.subnav a.active,
.subnav a.is-active,
.seg-nav a.active,
.seg-nav a.is-active{
  background: var(--seg-nav-tint-18);
  border-color: var(--seg-nav-tint-46);
}

.seg-nav span.is-disabled{
  opacity: 0.55;
  cursor:not-allowed;
}

/* ===== Responsive ===== */
@media (max-width: 920px){
  .app{
    grid-template-columns: 1fr;
    grid-template-areas:
      "top"
      "main";
  }
  .sidebar{ display:none; }
  .topbar .center{ display:none; }
}
