/* Business-owner (client) portal theme — redesign 2026-11-17 (Doug: "yes, please do as you recommend and continue",
   after the agency redesign he approved on 2026-11-16). Same visual language as agency-theme.css.
   Scoped to .cr-app--client so the agency and sales portals, which share components.css, are unchanged.
   White label is preserved: every accent uses the runtime --brand set from the agency's branding. */

body:has(.cr-app--client) { background: #f4f7fb; }

.cr-app--client {
  --client-navy: #0b1b33;
  --client-navy-2: #12264a;
  --client-side-ink: #c9d4e6;
  --client-side-faint: #7f93b2;
  --client-side-line: rgba(255, 255, 255, 0.08);
  --client-card-line: #e3e9f1;
  --client-card-shadow: 0 1px 2px rgba(11, 27, 51, 0.05), 0 4px 14px rgba(11, 27, 51, 0.05);
}

/* Sidebar: dark, with the current website on top */
.cr-app--client .cr-sidebar {
  border-right: 0;
  background: linear-gradient(180deg, var(--client-navy) 0%, var(--client-navy-2) 100%);
  color: var(--client-side-ink);
}
.cr-app--client .cr-sidebar__brand { border-bottom-color: var(--client-side-line); color: #fff; }
.cr-app--client .cr-sidebar__brand .cr-avatar { background: var(--brand); color: var(--brand-contrast, #fff); }
.cr-app--client .cr-sidebar__logo { border-radius: 0.6rem; background: #fff; padding: 0.15rem; }
.cr-app--client .cr-sidebar__scroll { padding-top: var(--space-5); }
.cr-app--client .cr-site-switcher {
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0.8rem; background: rgba(255, 255, 255, 0.06); color: #fff;
}
.cr-app--client .cr-site-switcher__name { color: #fff; }
.cr-app--client .cr-site-switcher__url { color: var(--client-side-faint); }
.cr-app--client .cr-sidebar select,
.cr-app--client .cr-sidebar .cr-select {
  border-color: rgba(255, 255, 255, 0.16); background-color: rgba(255, 255, 255, 0.08); color: #fff;
}
.cr-app--client .cr-sidebar select option { color: #0b1b33; }
.cr-app--client .cr-sidebar__label { color: var(--client-side-faint); padding-top: var(--space-4); }
.cr-app--client .cr-nav__link { color: var(--client-side-ink); font-weight: 550; min-height: 2.5rem; }
.cr-app--client .cr-nav__link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.cr-app--client .cr-nav__link[aria-current="page"] { background: rgba(var(--brand-rgb), 0.28); color: #fff; }
.cr-app--client .cr-nav__link[aria-current="page"]::before { background: color-mix(in srgb, var(--brand) 55%, #ffffff); }
.cr-app--client .cr-sidebar__footer { border-top-color: var(--client-side-line); }
.cr-app--client .cr-user:hover { background: rgba(255, 255, 255, 0.06); }
.cr-app--client .cr-user .cr-avatar { background: #2a3f63; color: #fff; }
.cr-app--client .cr-user__name { color: #fff; }
.cr-app--client .cr-user__meta { color: var(--client-side-faint); }
.cr-app--client .cr-sidebar a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, #fff); outline-offset: 2px; }

/* Top bar */
.cr-app--client .cr-topbar { background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(10px); }
.cr-app--client .cr-topbar__title { font-size: var(--text-lg); letter-spacing: var(--tracking-tight); }

/* Page surfaces */
.cr-app--client .cr-page__header h1 { letter-spacing: -0.025em; }
.cr-app--client .cr-card { border-color: var(--client-card-line); border-radius: 1.2rem; box-shadow: var(--client-card-shadow); }
.cr-app--client .cr-table-wrap { border-color: var(--client-card-line); border-radius: 1rem; }
.cr-app--client .cr-table th { background: #f8fafd; letter-spacing: 0.06em; }
.cr-app--client .cr-btn { border-radius: 0.75rem; }
.cr-app--client .cr-btn:not(.cr-btn--secondary):not(.cr-btn--ghost):not(.cr-btn--danger):not(.cr-btn--success) {
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.28);
}
.cr-app--client .cr-alert { border-radius: 1rem; }

/* Home: welcome banner */
.cr-app--client .cr-client-hero {
  position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-5);
  margin-bottom: var(--space-6); padding: var(--space-8); overflow: hidden; border-radius: 1.6rem; color: #fff;
  background: radial-gradient(1100px 280px at 92% -20%, rgba(var(--brand-rgb), 0.55), transparent 60%),
              linear-gradient(120deg, #0b1b33 0%, #16336a 58%, color-mix(in srgb, var(--brand) 85%, #0b1b33) 100%);
}
.cr-app--client .cr-client-hero::after {
  position: absolute; right: -3rem; bottom: -5rem; width: 16rem; height: 16rem; border: 2.5rem solid rgba(255, 255, 255, 0.06);
  border-radius: 50%; content: ""; pointer-events: none;
}
.cr-app--client .cr-client-hero .cr-eyebrow { color: rgba(255, 255, 255, 0.72); }
.cr-app--client .cr-client-hero h1 { margin: 0.35rem 0 0.4rem; color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 800; }
.cr-app--client .cr-client-hero .cr-lede { max-width: 38rem; margin: 0; color: #c6d5ee; font-size: 1.05rem; }
.cr-app--client .cr-client-hero__actions { position: relative; z-index: 1; }
.cr-app--client .cr-client-hero__primary { background: #fff; color: #0b1b33; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2); }
.cr-app--client .cr-client-hero__primary:hover { background: #eef3fa; text-decoration: none; }

/* Home: what needs you comes first, then the scores */
.cr-app--client .cr-client-home__work { margin-bottom: var(--space-2); }
.cr-app--client #needs-you { scroll-margin-top: 5rem; }
.cr-app--client .cr-client-home__section {
  margin: var(--space-7) 0 var(--space-3); color: var(--ink-faint); font-size: var(--text-2xs); font-weight: 800;
  letter-spacing: var(--tracking-caps); text-transform: uppercase;
}
.cr-app--client .cr-action { border-color: var(--client-card-line); border-radius: 0.9rem; background: #fbfcfe; }
.cr-app--client .cr-action__marker { border-radius: 0.6rem; }
.cr-app--client .cr-card--brand { background: linear-gradient(180deg, #f8fbff, #fff); }
.cr-app--client .cr-progress { height: 0.55rem; border-radius: 999px; }
.cr-app--client .cr-progress__bar { border-radius: 999px; background: var(--brand); }
.cr-app--client .cr-check { border-color: var(--client-card-line); border-radius: 0.8rem; text-decoration: none; }
.cr-app--client .cr-check .cr-check__title,
.cr-app--client .cr-check .cr-check__meta { text-decoration: none; }
.cr-app--client a.cr-check:hover { border-color: rgba(var(--brand-rgb), 0.45); background: var(--brand-soft); }
.cr-app--client .cr-check--done .cr-check__mark { background: var(--success); border-color: var(--success); color: #fff; }

/* Home: score cards */
.cr-app--client .cr-score-primary {
  border-radius: 1.4rem;
  background: radial-gradient(700px 240px at 100% 0%, rgba(var(--brand-rgb), 0.45), transparent 60%),
              linear-gradient(145deg, #0b1b33 0%, #133762 70%, color-mix(in srgb, var(--brand) 70%, #0b1b33) 120%);
}
.cr-app--client .cr-score-primary[data-score-ring] .cr-metric__value--hero {
  display: grid; width: 8.5rem; height: 8.5rem; margin: var(--space-3) 0; place-items: center; border-radius: 50%;
  background: radial-gradient(closest-side, #10284b 78%, transparent 79% 100%),
              conic-gradient(color-mix(in srgb, var(--brand) 70%, #fff) calc(var(--p) * 1%), rgba(255, 255, 255, 0.14) 0);
  font-size: 2.9rem;
}
.cr-app--client .cr-score-side { border-radius: 1.4rem; }
.cr-app--client .cr-score-side .cr-metric__value { font-size: clamp(2rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
.cr-app--client .cr-score-side .cr-metric__meta { margin-top: var(--space-3); color: var(--ink-muted); font-size: var(--text-xs); line-height: 1.55; }

/* Phone */
@media (max-width: 820px) {
  .cr-app--client .cr-client-hero { align-items: stretch; padding: var(--space-6) var(--space-5); border-radius: 1.3rem; }
  .cr-app--client .cr-client-hero__actions { width: 100%; }
  .cr-app--client .cr-client-hero__primary { width: 100%; }
  .cr-app--client .cr-score-primary[data-score-ring] .cr-metric__value--hero { width: 7.25rem; height: 7.25rem; font-size: 2.4rem; }
  .cr-app--client .cr-mobile-nav { box-shadow: 0 -6px 24px rgba(11, 27, 51, 0.08); }
  .cr-app--client .cr-mobile-nav__link[aria-current="page"] { color: var(--brand-text, var(--brand)); }
  .cr-app--client .cr-mobile-nav__link[aria-current="page"] .cr-mobile-nav__icon { background: var(--brand-soft); border-radius: 999px; }
}
/* Phone: a long unbroken token in a card heading (e.g. a "sha256:..." revision on Website > AI access) made the whole
   page 909px wide on a 390px screen. Let headings in card headers break anywhere; nothing else changes. */
.cr-app--client .cr-card__header h3, .cr-app--client .cr-card__header h4, .cr-app--client .cr-card__header .cr-eyebrow { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .cr-app--client * { scroll-behavior: auto; } }
@media print {
  body:has(.cr-app--client) { background: #fff; }
  .cr-app--client .cr-card, .cr-app--client .cr-btn { box-shadow: none !important; }
  .cr-app--client .cr-client-hero__actions { display: none; }
}
