:root {
  --bg: #020304;
  --bg-elevated: #05080d;
  --surface: #0a0e14;
  --surface-2: #111722;
  --surface-3: #182130;
  --text: #fcfdff;
  --text-muted: #97a2b3;
  --muted: var(--text-muted);
  --border: #202836;
  --border-strong: #2b3749;
  --accent: #00b4ff;
  --accent-2: #2563eb;
  --accent-soft: rgba(0, 180, 255, 0.14);
  --accent-gradient: linear-gradient(135deg, #00b4ff 0%, #2563eb 100%);
  --accent-gradient-soft: linear-gradient(135deg, rgba(0, 180, 255, 0.14) 0%, rgba(37, 99, 235, 0.14) 100%);
  --danger: #ff6c8e;
  --danger-soft: rgba(255, 108, 142, 0.15);
  --warning: #ffbf62;
  --warning-soft: rgba(255, 191, 98, 0.14);
  --success: #4fdb9b;
  --success-soft: rgba(79, 219, 155, 0.14);
  --shadow-sm: 0 16px 34px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 28px 80px rgba(0, 0, 0, 0.44);
  --shadow-focus: 0 0 0 3px rgba(0, 180, 255, 0.22);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --content-max: 1260px;
}

body {
  background:
    radial-gradient(circle at 14% 12%, rgba(20, 47, 88, 0.18), transparent 26%),
    radial-gradient(circle at 86% 0%, rgba(0, 180, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #010204 0%, #04070c 26%, #020408 100%);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', sans-serif;
}

body::before {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(149, 165, 187, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(149, 165, 187, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(820px 320px at 50% -5%, rgba(0, 180, 255, 0.08), transparent 48%),
    radial-gradient(760px 300px at 100% 76%, rgba(37, 99, 235, 0.06), transparent 44%);
  opacity: 0.88;
}

.top-nav {
  background: rgba(5, 8, 13, 0.88);
  border-bottom: 1px solid rgba(32, 40, 54, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.top-nav::after {
  background: linear-gradient(90deg, transparent, rgba(0, 180, 255, 0.24), transparent);
}

.brand {
  gap: 0.9rem;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: contain;
}

.brand-text {
  gap: 0.22rem;
}

.brand-wordmark {
  display: block;
  width: auto;
  height: 31px;
  object-fit: contain;
}

.brand-text strong {
  font-size: 0;
  line-height: 0;
}

.brand-text small {
  color: var(--text-muted);
  font-size: 0.74rem;
  letter-spacing: 0.015em;
}

.desktop-nav {
  background: rgba(10, 14, 21, 0.84);
  border-color: rgba(30, 40, 54, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 28px rgba(0, 0, 0, 0.22);
}

.nav-tab,
.mobile-tab {
  color: color-mix(in srgb, var(--text) 72%, var(--text-muted));
}

.nav-tab:hover,
.mobile-tab:hover {
  color: var(--text);
}

.nav-tab.active,
.mobile-tab.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--accent-gradient-soft);
  color: var(--text);
  box-shadow:
    inset 0 0 0 1px rgba(0, 180, 255, 0.22),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.global-sync-status {
  background: rgba(10, 14, 21, 0.8);
  border-color: rgba(41, 52, 69, 0.96);
  color: var(--text-muted);
}

.global-sync-status.success {
  color: var(--success);
  background: linear-gradient(180deg, rgba(79, 219, 155, 0.1), rgba(10, 14, 21, 0.88));
}

.global-sync-status.warning {
  color: var(--warning);
  background: linear-gradient(180deg, rgba(255, 191, 98, 0.1), rgba(10, 14, 21, 0.88));
}

.global-sync-status.info {
  color: color-mix(in srgb, var(--accent) 68%, white 22%);
  background: linear-gradient(180deg, rgba(0, 180, 255, 0.1), rgba(10, 14, 21, 0.88));
}

.mobile-tabbar {
  background: rgba(8, 11, 17, 0.92);
  border-top-color: rgba(32, 40, 54, 0.9);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px);
}

.app-footer {
  padding-bottom: 1.2rem;
}

.app-footer-inner {
  border-top-color: rgba(32, 40, 54, 0.82);
}

.app-footer-copy,
.app-footer-links a {
  color: var(--text-muted);
}

.app-footer-links a:hover {
  color: var(--text);
}

.app-footer-copy {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  width: 118px;
  background: url('../brand/athleteos-wordmark-transparent.png') left center / contain no-repeat;
  font-size: 0;
  color: transparent;
}

.page-header {
  border-bottom-color: rgba(32, 40, 54, 0.6);
}

.page-header h1,
.mobile-page-header .mobile-page-heading h1,
.dashboard-page-header h1,
.log-page-header h1,
.settings-page-header h1 {
  letter-spacing: -0.06em;
}

.page-header p,
.mobile-page-header .mobile-page-meta {
  color: var(--text-muted);
}

.eyebrow {
  color: color-mix(in srgb, var(--text-muted) 84%, white 8%);
  letter-spacing: 0.18em;
}

.card,
.empty-state,
.loading-state,
.error-state,
.dashboard-secondary-disclosure {
  border-radius: var(--radius-xl);
}

.card {
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(12, 17, 25, 0.98), rgba(7, 10, 16, 0.99));
  border-color: rgba(32, 40, 54, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.024),
    0 18px 42px rgba(0, 0, 0, 0.26);
}

.card.soft {
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.05), transparent 24%),
    linear-gradient(180deg, rgba(14, 20, 31, 0.98), rgba(9, 13, 21, 0.99));
}

.card::before {
  background: linear-gradient(90deg, transparent, rgba(0, 180, 255, 0.18), transparent);
}

.metric-card,
.dashboard-compact-empty,
.dashboard-secondary-grid > .card,
.dashboard-secondary-grid > .empty-state {
  border-radius: 20px;
}

.status-chip,
.trend-chip {
  border-color: color-mix(in srgb, currentColor 20%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.status-chip.success {
  background: var(--success-soft);
}

.status-chip.warning {
  background: var(--warning-soft);
}

.status-chip.error {
  background: var(--danger-soft);
}

.btn {
  min-height: 44px;
  padding: 0.72rem 1.02rem;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn.primary,
.assistant-send-btn,
.assistant-primary-cta,
.ask-athleteos-btn,
[data-action='open-assistant'].btn.primary {
  background: var(--accent-gradient);
  color: #f7fbff;
  border: 1px solid rgba(0, 180, 255, 0.42);
  box-shadow:
    0 14px 30px rgba(0, 91, 168, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn.primary:hover,
.assistant-send-btn:hover,
.assistant-primary-cta:hover,
.ask-athleteos-btn:hover,
[data-action='open-assistant'].btn.primary:hover {
  box-shadow:
    0 18px 34px rgba(0, 91, 168, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn.secondary,
.btn.ghost {
  background: rgba(12, 17, 25, 0.92);
  border: 1px solid rgba(35, 45, 60, 0.98);
  color: var(--text);
}

.btn.secondary:hover,
.btn.ghost:hover {
  border-color: rgba(0, 180, 255, 0.24);
  background: rgba(15, 20, 29, 0.96);
}

input,
select,
textarea {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(13, 18, 27, 0.98), rgba(9, 13, 21, 0.99));
  border: 1px solid rgba(32, 40, 54, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  color: var(--text);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(0, 180, 255, 0.18);
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--text-muted) 88%, transparent);
}

select option {
  color: #eef3ff;
  background: #0d141f;
}

.ring-card {
  background:
    radial-gradient(circle at 50% 18%, rgba(0, 180, 255, 0.07), transparent 28%),
    linear-gradient(180deg, rgba(12, 17, 27, 0.98), rgba(8, 12, 19, 0.99));
}

.ring-card-label {
  color: color-mix(in srgb, var(--text-muted) 82%, white 10%);
}

.ring-card-footer span {
  color: color-mix(in srgb, var(--text) 70%, var(--text-muted));
}

.desktop-dashboard-shell .daily-outlook-row,
.mobile-dashboard-shell .daily-outlook-row {
  background:
    linear-gradient(180deg, rgba(15, 22, 33, 0.94), rgba(10, 15, 24, 0.98));
  border-color: rgba(32, 40, 54, 0.88);
}

.dashboard-shell .dashboard-priority-card,
.desktop-dashboard-primary-stage > .card,
.desktop-dashboard-primary-columns > .card,
.desktop-dashboard-support-main > .card,
.desktop-dashboard-support-compact-grid > .card,
.desktop-dashboard-rail > .card {
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.07), transparent 24%),
    linear-gradient(180deg, rgba(13, 19, 28, 0.98), rgba(7, 10, 17, 0.99));
}

.auth-modern-card,
.onboarding-card,
.assistant-empty-stage,
.assistant-composer,
.settings-hub-item,
.settings-hero,
.settings-completion-bar,
.settings-profile-overview,
.settings-panel-card,
.sync-diag-card {
  border-color: rgba(32, 40, 54, 0.95);
}

.auth-brand-lockup,
.onboarding-brand-lockup,
.loading-brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.62rem 0.84rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    rgba(9, 13, 20, 0.92);
  border: 1px solid rgba(32, 40, 54, 0.96);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.auth-brand-lockup img,
.onboarding-brand-lockup img,
.loading-brand-lockup img {
  display: block;
  width: auto;
  height: 34px;
  max-width: 100%;
}

.auth-brand-lockup img {
  height: 26px;
  width: 138px;
  object-fit: contain;
}

.auth-modern-title-row h1,
.onboarding-head h1 {
  letter-spacing: -0.075em;
}

.auth-modern-mode-tag {
  background: rgba(14, 20, 30, 0.9);
  border-color: rgba(32, 40, 54, 0.92);
  color: color-mix(in srgb, var(--accent) 62%, white 22%);
}

.assistant-fab {
  border-color: rgba(32, 40, 54, 0.98);
  background:
    radial-gradient(circle at 24% 22%, rgba(0, 180, 255, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(8, 13, 20, 0.96), rgba(11, 17, 27, 0.98) 52%, rgba(16, 24, 36, 0.98));
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 24px rgba(0, 180, 255, 0.07);
}

.assistant-fab-icon,
.assistant-modal-mark,
.assistant-composer-mark {
  border-color: rgba(0, 180, 255, 0.22);
  background:
    radial-gradient(circle at 26% 22%, rgba(0, 180, 255, 0.16), transparent 40%),
    linear-gradient(145deg, rgba(9, 14, 22, 0.98), rgba(12, 18, 28, 0.98));
}

.assistant-brand-mark {
  width: 1.36rem;
  height: auto;
  object-fit: contain;
  filter: none;
}

.assistant-fab-icon svg,
.assistant-modal-mark svg,
.assistant-composer-mark svg,
.assistant-thread-avatar svg {
  width: 1.18rem;
  height: 1.18rem;
  stroke-width: 2;
}

.modal.assistant-modal {
  border-color: rgba(32, 40, 54, 0.96);
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 180, 255, 0.08), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(9, 13, 21, 0.99), rgba(6, 9, 15, 0.995));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.assistant-modal-title h3,
.assistant-fab-copy strong {
  letter-spacing: -0.035em;
}

.assistant-empty-state,
.assistant-empty-stage {
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 180, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(10, 15, 24, 0.98), rgba(7, 10, 17, 0.99));
}

.assistant-empty-signal,
.assistant-context-tile {
  background:
    linear-gradient(180deg, rgba(15, 21, 31, 0.98), rgba(10, 14, 22, 0.99));
  border-color: rgba(32, 40, 54, 0.94);
}

.assistant-chip-section.starter-state .assistant-chip {
  background: rgba(11, 16, 24, 0.96);
  border-color: rgba(0, 180, 255, 0.18);
  box-shadow: none;
}

.assistant-composer {
  background:
    linear-gradient(90deg, rgba(16, 24, 37, 0.46), rgba(7, 13, 22, 0.9) 36%, rgba(5, 9, 16, 0.98)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.assistant-composer-hint,
.assistant-modal-title p,
.assistant-fab-copy small {
  color: var(--text-muted);
}

.settings-hub-item,
.settings-profile-overview,
.settings-completion-bar,
.settings-hero,
.settings-panel-card,
.sync-diag-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.05), transparent 24%),
    linear-gradient(180deg, rgba(13, 19, 29, 0.98), rgba(8, 12, 19, 0.99));
}

.settings-hub-icon {
  background:
    radial-gradient(circle at 30% 25%, rgba(0, 180, 255, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(9, 15, 23, 0.98), rgba(10, 17, 27, 0.98));
  color: color-mix(in srgb, var(--accent) 76%, white 20%);
}

.empty-state,
.loading-state,
.error-state {
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 180, 255, 0.05), transparent 32%),
    linear-gradient(180deg, rgba(10, 15, 23, 0.98), rgba(7, 10, 17, 0.99));
  border: 1px dashed rgba(41, 52, 69, 0.96);
}

.error-state .btn.secondary {
  background: rgba(11, 16, 24, 0.94);
}

.view-section.coach-desktop-shell .card,
.view-section.coach-desktop-shell .coach-note,
.view-section.coach-desktop-shell .empty-state {
  border-color: rgba(32, 40, 54, 0.95);
}

.view-section.coach-desktop-shell .card {
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(12, 18, 28, 0.98), rgba(7, 11, 18, 0.99));
}

.view-section.coach-desktop-shell .coach-note {
  background:
    linear-gradient(180deg, rgba(14, 20, 30, 0.96), rgba(9, 14, 22, 0.98));
}

.view-section.coach-desktop-shell .coach-note.warning {
  background:
    linear-gradient(180deg, rgba(50, 35, 12, 0.68), rgba(22, 17, 10, 0.9));
}

.view-section.coach-desktop-shell .coach-note.success {
  background:
    linear-gradient(180deg, rgba(13, 46, 34, 0.64), rgba(9, 19, 15, 0.9));
}

.loading-brand-lockup {
  margin-bottom: 0.9rem;
}

body.auth-mode .top-nav,
body.auth-mode .app-footer,
body.onboarding-mode .top-nav {
  background: transparent;
}

@media (max-width: 900px) {
  .brand-text small {
    display: none;
  }

  .brand-wordmark {
    height: 24px;
  }

  .auth-brand-lockup img,
  .onboarding-brand-lockup img,
  .loading-brand-lockup img {
    height: 28px;
  }
}

/* Final light-mode pass. This file loads last, so these rules override the
   dark-only brand treatments above without weakening the primary dark theme. */
body[data-theme='light'] {
  background:
    radial-gradient(circle at 16% 8%, rgba(12, 96, 248, 0.11), transparent 32%),
    radial-gradient(circle at 86% 4%, rgba(0, 188, 214, 0.12), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #edf3ff 52%, #e8effb 100%);
  color: var(--text);
}

body[data-theme='light']::before {
  background-image:
    linear-gradient(rgba(39, 67, 113, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 67, 113, 0.055) 1px, transparent 1px);
  opacity: 0.62;
}

body[data-theme='light'] .top-nav,
body[data-theme='light'] .mobile-nav,
body[data-theme='light'] .app-footer {
  background: rgba(255, 255, 255, 0.88);
  border-color: #d8e2f2;
  box-shadow: 0 10px 30px rgba(22, 35, 64, 0.08);
}

body[data-theme='light'].auth-mode .top-nav,
body[data-theme='light'].auth-mode .app-footer,
body[data-theme='light'].onboarding-mode .top-nav {
  background: transparent;
  box-shadow: none;
}

body[data-theme='light'] .desktop-nav,
body[data-theme='light'] .mobile-nav-inner {
  background: #f3f7ff;
  border-color: #d8e2f2;
  box-shadow: 0 10px 22px rgba(22, 35, 64, 0.06);
}

body[data-theme='light'] .card,
body[data-theme='light'] .card.soft,
body[data-theme='light'] .auth-card,
body[data-theme='light'] .onboarding-card,
body[data-theme='light'] .loading-state,
body[data-theme='light'] .empty-state,
body[data-theme='light'] .error-state,
body[data-theme='light'] .settings-hub-item,
body[data-theme='light'] .settings-profile-overview,
body[data-theme='light'] .settings-completion-bar,
body[data-theme='light'] .settings-hero,
body[data-theme='light'] .settings-panel-card,
body[data-theme='light'] .settings-module,
body[data-theme='light'] .settings-integration-catalog,
body[data-theme='light'] .settings-fusion-panel,
body[data-theme='light'] .sync-diag-card,
body[data-theme='light'] .log-mode-card,
body[data-theme='light'] .analytics-card,
body[data-theme='light'] .analytics-filters-card,
body[data-theme='light'] .weekly-review-card,
body[data-theme='light'] .today-plan-card,
body[data-theme='light'] .view-section.coach-desktop-shell .card,
body[data-theme='light'] .view-section.coach-desktop-shell .coach-note,
body[data-theme='light'] .view-section.coach-desktop-shell .empty-state {
  background:
    radial-gradient(circle at 100% 0%, rgba(12, 96, 248, 0.055), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.94));
  border-color: #d7e1f1;
  color: var(--text);
  box-shadow: 0 14px 34px rgba(22, 35, 64, 0.08);
}

body[data-theme='light'] .settings-row,
body[data-theme='light'] .settings-catalog-item,
body[data-theme='light'] .settings-fusion-rule,
body[data-theme='light'] .settings-fusion-source-card,
body[data-theme='light'] .detail-item,
body[data-theme='light'] .metric-card,
body[data-theme='light'] .stat-card,
body[data-theme='light'] .mobile-summary-item,
body[data-theme='light'] .analytics-panel-metric,
body[data-theme='light'] .analytics-sleep-entry,
body[data-theme='light'] .calendar-cell,
body[data-theme='light'] .assistant-card,
body[data-theme='light'] .assistant-review-col,
body[data-theme='light'] .assistant-why-item,
body[data-theme='light'] .assistant-empty-signal,
body[data-theme='light'] .assistant-context-tile {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 255, 0.9));
  border-color: #d9e3f2;
  color: var(--text);
  box-shadow: none;
}

body[data-theme='light'] input,
body[data-theme='light'] select,
body[data-theme='light'] textarea {
  background: #ffffff;
  border-color: #cfdbee;
  color: #10172b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body[data-theme='light'] input::placeholder,
body[data-theme='light'] textarea::placeholder {
  color: #8794ab;
}

body[data-theme='light'] .btn.secondary,
body[data-theme='light'] .btn.ghost,
body[data-theme='light'] .auth-modern-secondary-actions .btn.secondary,
body[data-theme='light'] .auth-modern-secondary-actions .btn.ghost,
body[data-theme='light'] .pill-btn,
body[data-theme='light'] .icon-btn.subtle,
body[data-theme='light'] .status-chip.neutral,
body[data-theme='light'] .assistant-source,
body[data-theme='light'] .assistant-source.subtle,
body[data-theme='light'] .error-state .btn.secondary {
  background: #ffffff;
  border-color: #d4dfef;
  color: #25314a;
  box-shadow: none;
}

body[data-theme='light'] .btn.primary {
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(12, 96, 248, 0.2);
}

body[data-theme='light'] .auth-modern-mode-tag {
  background: #eef4ff;
  border-color: #d6e2f4;
  color: #0c60f8;
}

body[data-theme='light'] .auth-legal-links a,
body[data-theme='light'] .auth-legal-consent a,
body[data-theme='light'] .app-footer-links a {
  color: #275dbe;
}

body[data-theme='light'] .brand-logo-image {
  content: url('../brand/athleteos-app-icon-light.png');
}

body[data-theme='light'] .brand-wordmark {
  content: url('../brand/athleteos-wordmark-light-transparent.png');
}

body[data-theme='light'] .app-footer-copy {
  width: 118px;
  background: url('../brand/athleteos-wordmark-light-transparent.png') left center / contain no-repeat;
  font-size: 0;
  color: transparent;
}

body[data-theme='light'] .brand-mark,
body[data-theme='light'] .ao-mark,
body[data-theme='light'] .assistant-avatar,
body[data-theme='light'] .settings-hub-icon,
body[data-theme='light'] .settings-fusion-icon,
body[data-theme='light'] .settings-catalog-logo,
body[data-theme='light'] .settings-fusion-source-logo,
body[data-theme='light'] .assistant-fab-icon,
body[data-theme='light'] .assistant-modal-mark,
body[data-theme='light'] .assistant-composer-mark {
  background:
    radial-gradient(circle at 50% 35%, rgba(12, 96, 248, 0.12), transparent 62%),
    #ffffff;
  border-color: #d5e0f1;
  color: #0c60f8;
  box-shadow: 0 8px 20px rgba(22, 35, 64, 0.07);
}

body[data-theme='light'] .modal.assistant-modal,
body[data-theme='light'] .assistant-modal,
body[data-theme='light'] .assistant-shell,
body[data-theme='light'] .assistant-shell-inner,
body[data-theme='light'] .assistant-empty-state,
body[data-theme='light'] .assistant-empty-stage,
body[data-theme='light'] .assistant-welcome-panel,
body[data-theme='light'] .assistant-open-state,
body[data-theme='light'] .assistant-chat-state {
  background:
    radial-gradient(circle at 90% 0%, rgba(12, 96, 248, 0.075), transparent 34%),
    linear-gradient(180deg, #ffffff, #f3f7ff);
  border-color: #d6e1f1;
  color: #10172b;
  box-shadow: 0 18px 48px rgba(22, 35, 64, 0.12);
}

body[data-theme='light'] .assistant-message.user .assistant-bubble {
  background: linear-gradient(145deg, rgba(12, 96, 248, 0.12), rgba(0, 188, 214, 0.08), #f7faff);
  border-color: rgba(12, 96, 248, 0.24);
}

body[data-theme='light'] .assistant-message.assistant .assistant-bubble,
body[data-theme='light'] .assistant-composer,
body[data-theme='light'] .assistant-thread-wrap {
  background: linear-gradient(180deg, #ffffff, #f5f8ff);
  border-color: #d7e0f0;
  box-shadow: 0 12px 24px rgba(16, 23, 43, 0.06);
}

body[data-theme='light'] .assistant-fab {
  background:
    radial-gradient(circle at 78% 80%, rgba(122, 128, 255, 0.14), transparent 34%),
    radial-gradient(circle at 24% 22%, rgba(104, 181, 255, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 244, 252, 0.98));
  border-color: #d5e0f1;
  color: #13253f;
  box-shadow: 0 18px 36px rgba(22, 35, 64, 0.12);
}

body[data-theme='light'] .global-sync-status {
  background: #ffffff;
  border-color: #d7e1f1;
  color: #52627b;
  box-shadow: 0 8px 18px rgba(22, 35, 64, 0.06);
}

body[data-theme='light'] .global-sync-status.success {
  background: linear-gradient(180deg, #f5fff9, #ffffff);
  border-color: rgba(38, 168, 109, 0.28);
  color: #16875a;
}

body[data-theme='light'] .global-sync-status.warning {
  background: linear-gradient(180deg, #fff9ee, #ffffff);
  border-color: rgba(199, 123, 22, 0.28);
  color: #9a5b0a;
}

body[data-theme='light'] .global-sync-status.info {
  background: linear-gradient(180deg, #f1f8ff, #ffffff);
  border-color: rgba(12, 96, 248, 0.24);
  color: #0c60f8;
}

.desktop-dashboard-shell .daily-outlook-row,
.mobile-dashboard-shell .daily-outlook-row,
.daily-outlook-row {
  border-radius: 18px;
  padding: 0.72rem 0.82rem;
  gap: 0.68rem;
  background:
    linear-gradient(90deg, rgba(0, 180, 255, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(11, 16, 25, 0.96), rgba(7, 10, 16, 0.98));
  border-color: rgba(38, 51, 70, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 10px 26px rgba(0, 0, 0, 0.12);
}

.daily-outlook-row:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 180, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 14px 30px rgba(0, 0, 0, 0.16);
}

.desktop-dashboard-shell .daily-outlook-icon,
.mobile-dashboard-shell .daily-outlook-icon,
.daily-outlook-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 30%, rgba(75, 233, 255, 0.2), transparent 62%),
    rgba(8, 14, 24, 0.96);
  border: 1px solid rgba(0, 180, 255, 0.18);
  color: var(--accent);
  box-shadow: none;
}

.daily-outlook-copy {
  gap: 0.14rem;
}

.daily-outlook-label-row {
  gap: 0.42rem;
}

.daily-outlook-label {
  color: color-mix(in srgb, var(--text-muted) 82%, var(--text));
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.daily-outlook-inline-chip {
  min-height: 1.18rem;
  padding: 0.08rem 0.42rem;
  font-size: 0.63rem;
  border-radius: 999px;
}

.desktop-dashboard-shell .daily-outlook-copy strong,
.mobile-dashboard-shell .daily-outlook-copy strong,
.daily-outlook-copy strong {
  max-width: 62ch;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 0.95rem;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.desktop-dashboard-shell .daily-outlook-copy small,
.daily-outlook-copy small {
  max-width: 56ch;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 0.76rem;
  line-height: 1.3;
}

.daily-outlook-side {
  gap: 0.38rem;
}

.desktop-dashboard-shell .daily-outlook-link,
.daily-outlook-link {
  display: inline-flex;
  color: color-mix(in srgb, var(--accent) 76%, white 14%);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
}

.daily-outlook-arrow,
.desktop-dashboard-shell .daily-outlook-arrow.minimal {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(0, 180, 255, 0.2);
  background: rgba(0, 180, 255, 0.08);
  color: color-mix(in srgb, var(--accent) 80%, white 12%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-dashboard-shell .daily-outlook-row.mobile {
  padding: 0.62rem 0.68rem;
  border-radius: 16px;
  gap: 0.54rem;
}

.mobile-dashboard-shell .daily-outlook-row.mobile .daily-outlook-copy {
  gap: 0.1rem;
}

.mobile-dashboard-shell .daily-outlook-row.mobile .daily-outlook-copy strong {
  font-size: 0.82rem;
  line-height: 1.12;
  -webkit-line-clamp: 1;
}

.mobile-dashboard-shell .daily-outlook-row.mobile .daily-outlook-label {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.mobile-dashboard-shell .daily-outlook-row.mobile .daily-outlook-inline-chip {
  padding: 0.06rem 0.36rem;
  font-size: 0.56rem;
}

.mobile-dashboard-shell .daily-outlook-row.mobile .daily-outlook-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

.mobile-dashboard-shell .daily-outlook-row.mobile .daily-outlook-side {
  gap: 0;
}

body[data-theme='light'] .desktop-dashboard-shell .daily-outlook-row,
body[data-theme='light'] .mobile-dashboard-shell .daily-outlook-row,
body[data-theme='light'] .daily-outlook-row {
  background:
    linear-gradient(90deg, rgba(12, 96, 248, 0.045), transparent 46%),
    linear-gradient(180deg, #ffffff, #f7faff);
  border-color: #dce5f3;
  box-shadow: 0 8px 18px rgba(22, 35, 64, 0.055);
}

body[data-theme='light'] .daily-outlook-icon {
  background:
    linear-gradient(180deg, #ffffff, #f2f7ff);
  border-color: rgba(12, 96, 248, 0.15);
  color: #0c60f8;
}

body[data-theme='light'] .daily-outlook-inline-chip {
  background: #f7faff;
  border-color: #d9e4f3;
  color: #51617c;
}

body[data-theme='light'] .daily-outlook-link,
body[data-theme='light'] .daily-outlook-arrow {
  color: #0c60f8;
}

body[data-theme='light'] .daily-outlook-arrow {
  background: rgba(12, 96, 248, 0.08);
  border-color: rgba(12, 96, 248, 0.16);
}

body[data-theme='light'] .polished-orb-card {
  background:
    radial-gradient(circle at 50% 16%, rgba(12, 96, 248, 0.045), transparent 32%),
    linear-gradient(180deg, #ffffff, #f6f9ff);
}

body[data-theme='light'] .metric-orb-polished {
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.95), rgba(238, 244, 255, 0.9) 34%, rgba(219, 228, 243, 0.92) 72%);
  border-color: rgba(133, 153, 186, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 18px 34px rgba(22, 35, 64, 0.09);
}

body[data-theme='light'] .metric-orb-polished.sleep::before {
  background: radial-gradient(circle, rgba(117, 101, 255, 0.42), rgba(117, 101, 255, 0.08) 62%, transparent 76%);
  box-shadow: inset 0 0 34px rgba(117, 101, 255, 0.16);
}

body[data-theme='light'] .metric-orb-polished.recovery::before {
  background: radial-gradient(circle, rgba(25, 168, 130, 0.36), rgba(25, 168, 130, 0.08) 62%, transparent 76%);
  box-shadow: inset 0 0 34px rgba(25, 168, 130, 0.13);
}

body[data-theme='light'] .metric-orb-polished.warning::before {
  background: radial-gradient(circle, rgba(224, 145, 42, 0.36), rgba(224, 145, 42, 0.08) 62%, transparent 76%);
  box-shadow: inset 0 0 34px rgba(224, 145, 42, 0.13);
}

body[data-theme='light'] .metric-orb-polished.danger::before {
  background: radial-gradient(circle, rgba(219, 72, 103, 0.34), rgba(219, 72, 103, 0.08) 62%, transparent 76%);
  box-shadow: inset 0 0 34px rgba(219, 72, 103, 0.13);
}

body[data-theme='light'] .metric-orb-polished.strain::before {
  background: radial-gradient(circle, rgba(12, 96, 248, 0.34), rgba(12, 96, 248, 0.08) 62%, transparent 76%);
  box-shadow: inset 0 0 34px rgba(12, 96, 248, 0.13);
}

.review-toolbar-card {
  position: relative;
  z-index: 40;
  padding: 1rem;
  overflow: visible;
  isolation: isolate;
}

.view-section:has(.weekly-export-menu[open]) {
  position: relative;
  z-index: 30;
  overflow: visible;
}

.review-toolbar-card:has(.weekly-export-menu[open]) {
  z-index: 1000;
}

.view-section:has(.weekly-export-menu[open]) .review-toolbar-card {
  z-index: 1000;
}

.view-section:has(.weekly-export-menu[open]) .grid.metric-rings,
.view-section:has(.weekly-export-menu[open]) .review-body-grid,
.view-section:has(.weekly-export-menu[open]) .mobile-disclosure {
  position: relative;
  z-index: 1;
}

.review-toolbar-grid {
  align-items: stretch;
}

.review-toolbar-group {
  padding: 0.9rem;
  border: 1px solid rgba(35, 45, 60, 0.74);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.055), transparent 34%),
    rgba(9, 14, 22, 0.64);
}

.weekly-export-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.weekly-export-menu {
  position: relative;
  z-index: 40;
}

.weekly-export-menu[open] {
  z-index: 1010;
}

.weekly-export-trigger {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.weekly-export-trigger::-webkit-details-marker {
  display: none;
}

.weekly-export-trigger::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.72;
}

.weekly-export-menu[open] .weekly-export-trigger::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.weekly-export-options {
  position: absolute;
  z-index: 1020;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 245px;
  padding: 0.45rem;
  border: 1px solid rgba(35, 45, 60, 0.95);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(12, 17, 25, 0.98), rgba(6, 9, 14, 0.99));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.weekly-export-option {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.72rem 0.8rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  display: grid;
  gap: 0.18rem;
  cursor: pointer;
}

.weekly-export-option:hover,
.weekly-export-option:focus-visible {
  background: rgba(0, 180, 255, 0.09);
  outline: none;
}

.weekly-export-option strong {
  font-size: 0.92rem;
}

.weekly-export-option span {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.weekly-review-empty-actions {
  display: flex;
  flex-wrap: wrap;
}

.ai-review-card {
  gap: 0.9rem;
}

.ai-review-hero {
  grid-template-columns: minmax(0, 1.05fr) minmax(250px, 0.9fr);
}

.ai-review-hero-copy {
  min-height: 100%;
  padding: 1rem;
  border: 1px solid rgba(35, 45, 60, 0.74);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 180, 255, 0.08), transparent 34%),
    rgba(8, 13, 21, 0.58);
}

.ai-review-hero-copy h4 {
  font-size: clamp(1.2rem, 1.9vw, 1.65rem);
  line-height: 1.05;
}

.ai-review-signal {
  background: rgba(8, 13, 21, 0.58);
  border-color: rgba(35, 45, 60, 0.74);
}

.ai-review-column,
.ai-review-actions {
  background: rgba(8, 13, 21, 0.58);
  border-color: rgba(35, 45, 60, 0.74);
}

body[data-theme='light'] .review-toolbar-group,
body[data-theme='light'] .ai-review-hero-copy,
body[data-theme='light'] .ai-review-signal,
body[data-theme='light'] .ai-review-column,
body[data-theme='light'] .ai-review-actions {
  background:
    radial-gradient(circle at 100% 0%, rgba(12, 96, 248, 0.045), transparent 34%),
    rgba(255, 255, 255, 0.74);
  border-color: #d8e2f2;
}

body[data-theme='light'] .weekly-export-options {
  background:
    radial-gradient(circle at 100% 0%, rgba(12, 96, 248, 0.07), transparent 34%),
    linear-gradient(180deg, #ffffff, #f4f8ff);
  border-color: #d6e1f1;
  box-shadow: 0 24px 52px rgba(22, 35, 64, 0.16);
}

body[data-theme='light'] .weekly-export-option {
  color: #10172b;
}

body[data-theme='light'] .weekly-export-option:hover,
body[data-theme='light'] .weekly-export-option:focus-visible {
  background: rgba(12, 96, 248, 0.075);
}

@media (max-width: 760px) {
  .weekly-export-actions,
  .weekly-review-empty-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .weekly-export-menu,
  .weekly-export-actions .btn {
    width: 100%;
  }

  .weekly-export-trigger {
    justify-content: center;
  }

  .weekly-export-options {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 0.5rem;
  }

  .mobile-weekly-review-shell .mobile-weekly-export-actions {
    display: block;
  }

  .ai-review-hero {
    grid-template-columns: 1fr;
  }
}

.weekly-report-shell {
  display: grid;
  gap: 0.8rem;
}

body:has(.weekly-report-shell) .assistant-fab {
  display: none;
}

.weekly-report-control-card,
.weekly-brief-card,
.weekly-empty-report,
.weekly-story-card,
.weekly-plan-card,
.weekly-daily-detail,
.weekly-snapshot-card,
.weekly-decision-card {
  border: 1px solid rgba(35, 45, 60, 0.78);
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.045), transparent 32%),
    linear-gradient(180deg, rgba(13, 20, 33, 0.88), rgba(7, 11, 18, 0.94));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.14);
}

.weekly-report-control-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  z-index: 70;
  overflow: visible;
}

.weekly-report-nav,
.weekly-report-export {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.weekly-report-snapshot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.weekly-snapshot-card {
  min-height: 92px;
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  display: grid;
  align-content: center;
  gap: 0.28rem;
  box-shadow: none;
}

.weekly-snapshot-card span,
.weekly-next-move span,
.weekly-decision-card span,
.weekly-open-plans > span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.weekly-snapshot-card strong {
  color: var(--text);
  font-size: clamp(1.15rem, 1.55vw, 1.55rem);
  letter-spacing: -0.04em;
}

.weekly-snapshot-card small {
  color: var(--text-muted);
  line-height: 1.35;
}

.weekly-snapshot-card.success {
  border-color: rgba(55, 215, 175, 0.26);
}

.weekly-snapshot-card.warning,
.weekly-snapshot-card.caution {
  border-color: rgba(255, 183, 77, 0.3);
}

.weekly-brief-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(245px, 0.55fr);
  gap: 1rem;
  padding: clamp(0.95rem, 1.55vw, 1.25rem);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(0, 180, 255, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(12, 19, 31, 0.94), rgba(7, 11, 18, 0.96));
}

.weekly-brief-card::before {
  content: "";
  position: absolute;
  inset: 1rem auto 1rem 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #00b4ff, #2563eb);
  opacity: 0.82;
}

.weekly-brief-main h2 {
  max-width: 700px;
  margin: 0.2rem 0 0;
  color: var(--text);
  font-size: clamp(1.35rem, 1.82vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.048em;
}

.weekly-brief-main p:not(.eyebrow) {
  max-width: 720px;
  margin: 0.55rem 0 0;
  color: color-mix(in srgb, var(--text) 78%, var(--text-muted));
  font-size: 0.95rem;
  line-height: 1.5;
}

.weekly-brief-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.weekly-brief-tags span {
  padding: 0.3rem 0.52rem;
  border: 1px solid rgba(125, 160, 225, 0.17);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 780;
}

.weekly-next-move {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(0, 180, 255, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.1), transparent 42%),
    rgba(8, 14, 24, 0.76);
}

.weekly-next-move strong {
  color: var(--text);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.weekly-empty-report {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.1rem, 2.1vw, 1.55rem);
  border-radius: 26px;
}

.weekly-empty-report h2 {
  margin: 0.15rem 0 0;
  color: var(--text);
  font-size: clamp(1.4rem, 2.6vw, 2.25rem);
  letter-spacing: -0.055em;
}

.weekly-empty-report p:not(.eyebrow) {
  max-width: 680px;
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  line-height: 1.48;
}

.weekly-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.weekly-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1rem;
}

.weekly-story-card,
.weekly-plan-card,
.weekly-daily-detail {
  padding: 0.9rem;
  border-radius: 20px;
  box-shadow: none;
}

.weekly-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.weekly-card-head h3 {
  margin: 0.2rem 0 0;
  color: var(--text);
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  letter-spacing: -0.035em;
}

.weekly-load-chart {
  height: 210px;
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 0.55rem;
  padding: 1rem 0.8rem 0.75rem;
  border: 1px solid rgba(125, 160, 225, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(rgba(125, 160, 225, 0.08) 1px, transparent 1px) 0 28% / 100% 33%,
    radial-gradient(circle at 70% 20%, rgba(0, 180, 255, 0.08), transparent 38%),
    rgba(5, 9, 16, 0.46);
}

.weekly-load-day {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-items: end;
  gap: 0.35rem;
}

.weekly-load-day i {
  display: block;
  width: min(42px, 52%);
  border-radius: 14px 14px 5px 5px;
  background: linear-gradient(180deg, #51d7ff, #2563eb);
  box-shadow: 0 0 28px rgba(0, 180, 255, 0.2);
}

.weekly-load-chart.is-empty .weekly-load-day i {
  background: rgba(125, 160, 225, 0.16);
  box-shadow: none;
}

.weekly-load-value {
  min-height: 1rem;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
}

.weekly-load-day strong {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.weekly-mix-list,
.weekly-plan-list,
.weekly-daily-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.weekly-plan-card .weekly-plan-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.weekly-mix-row {
  display: grid;
  grid-template-columns: minmax(95px, 0.6fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.weekly-mix-row strong,
.weekly-plan-row strong,
.weekly-daily-row strong {
  color: var(--text);
}

.weekly-mix-row span,
.weekly-plan-row span,
.weekly-daily-row span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.weekly-mix-track {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(125, 160, 225, 0.12);
}

.weekly-mix-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00b4ff, #2563eb);
}

.weekly-decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.weekly-decision-card {
  padding: 1rem;
  border-radius: 24px;
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 0.45rem;
}

.weekly-decision-card.keep {
  border-left: 3px solid rgba(55, 215, 175, 0.9);
}

.weekly-decision-card.watch {
  border-left: 3px solid rgba(255, 183, 77, 0.9);
}

.weekly-decision-card.adjust {
  border-left: 3px solid rgba(0, 180, 255, 0.9);
}

.weekly-decision-card strong {
  color: var(--text);
  font-size: clamp(1.02rem, 1.4vw, 1.25rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.weekly-decision-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.42;
}

.weekly-plan-row,
.weekly-daily-row {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 0.42rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(125, 160, 225, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.weekly-daily-row {
  grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr);
}

.weekly-plan-row span {
  align-self: center;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.weekly-plan-row strong {
  line-height: 1.32;
  font-size: 0.92rem;
}

.weekly-plan-row.keep {
  border-color: rgba(0, 180, 255, 0.22);
  background: rgba(0, 180, 255, 0.055);
}

.weekly-plan-row.watch,
.weekly-plan-row.adjust {
  background: rgba(255, 255, 255, 0.03);
}

.weekly-open-plans {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.95rem;
}

.weekly-plan-pill {
  border: 1px solid rgba(0, 180, 255, 0.28);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  background: rgba(0, 180, 255, 0.08);
  color: var(--text);
  font-weight: 780;
  cursor: pointer;
}

.weekly-daily-detail {
  overflow: hidden;
}

.weekly-daily-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.weekly-daily-detail summary::after {
  content: "\25BE";
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 1px solid rgba(125, 160, 225, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.weekly-daily-detail[open] summary::after {
  transform: rotate(180deg);
  border-color: rgba(0, 180, 255, 0.35);
  background: rgba(0, 180, 255, 0.09);
}

.weekly-daily-detail summary::-webkit-details-marker {
  display: none;
}

.weekly-daily-detail summary span {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 840;
}

.weekly-daily-detail summary small {
  color: var(--text-muted);
}

.weekly-daily-row.has-load {
  border-color: rgba(0, 180, 255, 0.25);
  background: rgba(0, 180, 255, 0.055);
}

body[data-theme='light'] .weekly-report-control-card,
body[data-theme='light'] .weekly-brief-card,
body[data-theme='light'] .weekly-empty-report,
body[data-theme='light'] .weekly-story-card,
body[data-theme='light'] .weekly-plan-card,
body[data-theme='light'] .weekly-daily-detail,
body[data-theme='light'] .weekly-snapshot-card,
body[data-theme='light'] .weekly-decision-card {
  border-color: #cbd9ec;
  background:
    radial-gradient(circle at 100% 0%, rgba(12, 96, 248, 0.055), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 255, 0.96));
  box-shadow: 0 18px 46px rgba(21, 35, 66, 0.08);
}

body[data-theme='light'] .weekly-brief-card {
  background:
    linear-gradient(135deg, rgba(12, 96, 248, 0.055), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.98));
}

body[data-theme='light'] .weekly-report-control-card {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

body[data-theme='light'] .weekly-next-move,
body[data-theme='light'] .weekly-load-chart {
  background:
    radial-gradient(circle at 100% 0%, rgba(12, 96, 248, 0.07), transparent 36%),
    rgba(255, 255, 255, 0.68);
  border-color: #cbd9ec;
}

body[data-theme='light'] .weekly-brief-tags span,
body[data-theme='light'] .weekly-plan-row,
body[data-theme='light'] .weekly-daily-row {
  background: rgba(255, 255, 255, 0.78);
  border-color: #d8e2f2;
}

body[data-theme='light'] .weekly-plan-row.keep {
  border-color: #b7d8f5;
  background: rgba(230, 244, 255, 0.8);
}

@media (max-width: 980px) {
  .weekly-report-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekly-brief-card,
  .weekly-story-grid,
  .weekly-decision-grid,
  .weekly-plan-card .weekly-plan-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .weekly-report-shell {
    gap: 0.85rem;
    padding-bottom: 8rem;
  }

  .weekly-report-shell .mobile-page-header {
    align-items: flex-start;
    padding-bottom: 0.82rem;
    margin-bottom: 0;
  }

  .weekly-report-shell .mobile-page-heading,
  .weekly-report-shell .mobile-page-heading h1,
  .weekly-report-shell .mobile-page-meta {
    justify-content: flex-start;
    text-align: left;
  }

  .weekly-report-shell .mobile-page-header .mobile-page-heading h1 {
    font-size: clamp(1.55rem, 8vw, 2rem);
    line-height: 0.98;
  }

  .weekly-report-shell .mobile-page-header .mobile-page-meta {
    font-size: 0.82rem;
  }

  .weekly-report-control-card,
  .weekly-empty-report {
    align-items: stretch;
    flex-direction: column;
    gap: 0.8rem;
  }

  .weekly-report-control-card {
    padding: 0.72rem;
    border-radius: 22px;
  }

  .weekly-report-nav,
  .weekly-report-export {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .weekly-report-export {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekly-report-control-card .btn {
    min-height: 2.72rem;
    padding: 0.6rem 0.55rem;
    border-radius: 16px;
    font-size: 0.78rem;
  }

  .weekly-report-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .weekly-snapshot-card {
    min-height: 96px;
    padding: 0.75rem;
    border-radius: 18px;
  }

  .weekly-snapshot-card strong {
    font-size: 1.25rem;
  }

  .weekly-brief-main h2 {
    font-size: clamp(1.85rem, 9vw, 2.8rem);
  }

  .weekly-empty-report {
    padding: 1rem;
  }

  .weekly-empty-report h2 {
    font-size: clamp(1.45rem, 7.2vw, 2.15rem);
  }

  .weekly-empty-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .weekly-report-shell-empty .weekly-plan-card {
    display: none;
  }

  .weekly-mix-row,
  .weekly-plan-row,
  .weekly-daily-row {
    grid-template-columns: 1fr;
  }
}

/* Dashboard metric rings: ported from the landing page reference. */
.dashboard-ring-card.ring-card {
  min-height: 232px;
  display: grid;
  justify-items: center;
  align-content: space-between;
  gap: 0.7rem;
  padding: 1rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 34%, rgba(105, 174, 254, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(17, 26, 43, 0.95), rgba(9, 15, 27, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  text-align: center;
}

.dashboard-ring-card .ring-card-label {
  min-height: 1rem;
  margin: 0;
  color: #9badc8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.dashboard-ring-visual {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
}

.dashboard-real-orb {
  --orb-stop: 56%;
  --orb-end: 72%;
  --orb-color: #69aefe;
  --orb-glow: rgba(105, 174, 254, 0.24);
  --orb-core-glow: rgba(105, 174, 254, 0.12);
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.dashboard-real-orb.sleep {
  --orb-color: #8f7cff;
  --orb-glow: rgba(143, 124, 255, 0.24);
  --orb-core-glow: rgba(143, 124, 255, 0.14);
}

.dashboard-real-orb.recovery {
  --orb-color: #4fdb9b;
  --orb-glow: rgba(79, 219, 155, 0.24);
  --orb-core-glow: rgba(79, 219, 155, 0.14);
}

.dashboard-real-orb.warning {
  --orb-color: #f2b85f;
  --orb-glow: rgba(242, 184, 95, 0.24);
  --orb-core-glow: rgba(242, 184, 95, 0.13);
}

.dashboard-real-orb.danger {
  --orb-color: #ff6b89;
  --orb-glow: rgba(255, 107, 137, 0.24);
  --orb-core-glow: rgba(255, 107, 137, 0.13);
}

.dashboard-real-orb.strain {
  --orb-color: #69aefe;
  --orb-glow: rgba(105, 174, 254, 0.24);
  --orb-core-glow: rgba(105, 174, 254, 0.12);
}

.dashboard-real-orb.neutral {
  --orb-color: #8da0bd;
  --orb-glow: rgba(141, 160, 189, 0.18);
  --orb-core-glow: rgba(141, 160, 189, 0.1);
}

.dashboard-real-orb .orb-ring-base,
.dashboard-real-orb .orb-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  -webkit-mask: radial-gradient(circle, transparent 61%, #000 62.5%);
  mask: radial-gradient(circle, transparent 61%, #000 62.5%);
}

.dashboard-real-orb .orb-ring-base {
  background: conic-gradient(from 220deg, rgba(40, 56, 83, 0.96), rgba(28, 42, 65, 0.92));
}

.dashboard-real-orb .orb-ring {
  background: conic-gradient(
    from 220deg,
    var(--orb-color) 0 var(--orb-stop),
    color-mix(in srgb, var(--orb-color) 78%, #ffffff 8%) var(--orb-stop) var(--orb-end),
    transparent var(--orb-end) 100%
  );
  filter:
    drop-shadow(0 0 8px color-mix(in srgb, var(--orb-glow) 80%, transparent))
    drop-shadow(0 0 18px color-mix(in srgb, var(--orb-glow) 54%, transparent));
  animation: ring-pop 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dashboard-real-orb .orb-core {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.012) 28%, rgba(8, 14, 24, 0.98) 68%),
    linear-gradient(180deg, #111d31, #0a1321);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -8px 16px rgba(0, 0, 0, 0.28);
}

.dashboard-real-orb .orb-core::before {
  content: '';
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  background: radial-gradient(circle, color-mix(in srgb, var(--orb-core-glow) 100%, transparent), transparent 72%);
  opacity: 0.7;
}

.dashboard-real-orb .orb-core strong {
  position: relative;
  z-index: 1;
  color: #f5f8ff;
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums lining-nums;
}

.dashboard-ring-card .ring-card-footer {
  min-height: 1.1rem;
  display: grid;
  place-items: center;
}

.dashboard-ring-card .ring-card-footer span {
  color: #b7c4d8;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.dashboard-ring-button {
  width: 100%;
  appearance: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transform: translateY(0);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.dashboard-ring-button:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 180, 255, 0.36);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 180, 255, 0.08);
}

.dashboard-ring-button:focus-visible {
  outline: 2px solid rgba(0, 180, 255, 0.86);
  outline-offset: 4px;
}

.dashboard-ring-card .ring-card-footer small {
  color: rgba(0, 180, 255, 0.92);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-detail-shell {
  display: grid;
  gap: 1rem;
  max-width: var(--content-max);
  margin: 0 auto;
}

.dashboard-detail-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 1.05rem;
  min-height: clamp(282px, 27vw, 326px);
  padding: clamp(1rem, 2vw, 1.45rem);
  border: 1px solid rgba(42, 61, 90, 0.94);
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 12%, rgba(0, 180, 255, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(15, 25, 43, 0.97), rgba(6, 10, 18, 0.99));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.dashboard-detail-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 180, 255, 0.42), rgba(79, 219, 155, 0.38), transparent);
  opacity: 0.74;
}

.dashboard-detail-hero.sleep::after {
  background: linear-gradient(90deg, transparent, rgba(143, 124, 255, 0.7), rgba(0, 180, 255, 0.42), transparent);
}

.dashboard-detail-hero.recovery::after {
  background: linear-gradient(90deg, transparent, rgba(79, 219, 155, 0.78), rgba(0, 180, 255, 0.38), transparent);
}

.dashboard-detail-hero.strain::after {
  background: linear-gradient(90deg, transparent, rgba(105, 174, 254, 0.76), rgba(0, 180, 255, 0.46), transparent);
}

.dashboard-detail-hero-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}

.dashboard-detail-hero-top .btn {
  width: fit-content;
  min-width: 0;
  justify-self: start;
  padding-inline: 0.95rem;
}

.dashboard-detail-hero-top .status-chip {
  justify-self: end;
}

.dashboard-detail-hero-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(178px, 238px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 3.8vw, 2.4rem);
}

.dashboard-detail-orb {
  display: grid;
  place-items: center;
}

.dashboard-detail-orb .dashboard-real-orb {
  width: clamp(170px, 17vw, 212px);
  height: clamp(170px, 17vw, 212px);
}

.dashboard-detail-orb .dashboard-real-orb .orb-core {
  width: 72%;
  height: 72%;
}

.dashboard-detail-orb .dashboard-real-orb .orb-core strong {
  font-size: clamp(2rem, 4.3vw, 3.8rem);
}

.dashboard-detail-hero-copy {
  display: grid;
  gap: 0.72rem;
  align-content: center;
}

.dashboard-detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.dashboard-detail-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.22rem 0.52rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #96a5bb;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-detail-hero-copy h1 {
  max-width: 18ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2.45rem, 4.7vw, 4.55rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.dashboard-detail-hero-copy p {
  max-width: 62ch;
  margin: 0;
  color: #b6c3d5;
  font-size: clamp(0.98rem, 1.3vw, 1.12rem);
  line-height: 1.55;
}

.dashboard-hero-assistant-btn {
  gap: 0.48rem;
}

.dashboard-hero-assistant-btn > span {
  width: 1.05rem;
  height: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-hero-assistant-btn svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}

.dashboard-detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-detail-stat {
  min-height: 106px;
  display: grid;
  align-content: center;
  gap: 0.2rem;
  border-color: rgba(38, 55, 80, 0.92);
  background:
    linear-gradient(180deg, rgba(18, 27, 44, 0.92), rgba(10, 15, 25, 0.94));
}

.dashboard-detail-stat strong {
  color: #9badc8;
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-detail-stat span {
  color: #f7fbff;
  font-size: clamp(1.25rem, 2.2vw, 1.85rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-detail-stat small {
  color: #8f9cb0;
  font-size: 0.78rem;
}

.dashboard-detail-breakdown-card,
.dashboard-detail-trend-card {
  border-color: rgba(38, 55, 80, 0.92);
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 38, 0.95), rgba(8, 12, 21, 0.95));
}

.dashboard-detail-contributor-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.dashboard-detail-contributor {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 0.3rem;
  padding: 0.85rem;
  border: 1px solid rgba(38, 55, 80, 0.9);
  border-radius: 18px;
  background: rgba(9, 14, 24, 0.76);
}

.dashboard-detail-contributor span {
  color: #9badc8;
  font-size: 0.76rem;
  font-weight: 800;
}

.dashboard-detail-contributor strong {
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
}

.dashboard-detail-contributor.up {
  border-color: rgba(79, 219, 155, 0.36);
  background: rgba(79, 219, 155, 0.08);
}

.dashboard-detail-contributor.down {
  border-color: rgba(255, 108, 142, 0.34);
  background: rgba(255, 108, 142, 0.08);
}

.dashboard-stage-row {
  display: flex;
  min-height: 28px;
  overflow: hidden;
  margin-top: 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.dashboard-stage-row span {
  display: grid;
  min-width: 4rem;
  place-items: center;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 850;
}

.dashboard-stage-row .sleep {
  background: rgba(105, 174, 254, 0.54);
}

.dashboard-stage-row .deep {
  background: rgba(238, 127, 255, 0.72);
}

.dashboard-stage-row .rem {
  background: rgba(165, 92, 255, 0.74);
}

.dashboard-stage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.dashboard-stage-key {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 0.42rem;
  padding: 0.5rem 0.62rem;
  border: 1px solid rgba(38, 55, 80, 0.86);
  border-radius: 999px;
  background: rgba(7, 12, 21, 0.72);
  color: #dce7f6;
  font-size: 0.78rem;
}

.dashboard-stage-key span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
}

.dashboard-stage-key strong {
  font-weight: 850;
}

.dashboard-stage-key em {
  color: #9badc8;
  font-style: normal;
  font-weight: 750;
}

.dashboard-stage-key.sleep span {
  background: #69aefe;
}

.dashboard-stage-key.deep span {
  background: #ee7fff;
}

.dashboard-stage-key.rem span {
  background: #a55cff;
}

.dashboard-detail-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.dashboard-detail-trend-card {
  display: grid;
  gap: 0.75rem;
  min-height: 352px;
}

.dashboard-detail-trend-card .toolbar {
  align-items: start;
}

.dashboard-detail-trend-card h3 {
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
}

.dashboard-detail-trend-card p {
  min-height: 2.4em;
  margin: 0;
  color: #98a7bc;
  font-size: 0.84rem;
  line-height: 1.4;
}

.dashboard-detail-empty {
  min-height: 172px;
  display: grid;
  place-items: center;
  color: #8796ac;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
}

.dashboard-detail-bars {
  min-height: 174px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 0.45rem;
  padding-top: 0.8rem;
}

.dashboard-detail-bar-col {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: end;
  gap: 0.36rem;
  min-width: 0;
}

.dashboard-detail-bar-value {
  color: #dce7f6;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}

.dashboard-detail-bar-track {
  height: 138px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.dashboard-detail-bar-track span {
  width: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(180deg, #55d8ff, #2563eb);
}

.dashboard-detail-trend-card.sleep .dashboard-detail-bar-track span {
  background: linear-gradient(180deg, #a694ff, #765cff);
}

.dashboard-detail-trend-card.recovery .dashboard-detail-bar-track span {
  background: linear-gradient(180deg, #59eba7, #16b981);
}

.dashboard-detail-trend-card.strain .dashboard-detail-bar-track span {
  background: linear-gradient(180deg, #69aefe, #1386e8);
}

.dashboard-detail-bar-col.latest .dashboard-detail-bar-track {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.dashboard-detail-bar-col small {
  display: grid;
  gap: 0.1rem;
  color: #8f9cb0;
  font-size: 0.65rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.dashboard-detail-bar-col small b {
  color: #c8d4e5;
  font-size: 0.72rem;
}

.dashboard-detail-sparkline {
  display: grid;
  gap: 0.45rem;
}

.dashboard-detail-sparkline svg {
  width: 100%;
  min-height: 176px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    rgba(4, 8, 14, 0.42);
}

.dashboard-detail-sparkline line {
  stroke: rgba(151, 162, 179, 0.16);
  stroke-width: 1;
}

.dashboard-detail-sparkline path {
  fill: none;
  stroke: #55d8ff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-detail-sparkline circle {
  fill: #08101d;
  stroke: #55d8ff;
  stroke-width: 5;
}

.dashboard-detail-spark-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  color: #96a5bb;
  font-size: 0.76rem;
  font-weight: 800;
}

.dashboard-detail-spark-labels strong {
  color: #eff6ff;
  font-size: 1rem;
}

.dashboard-detail-spark-labels span:last-child {
  text-align: right;
}

body[data-theme='light'] .dashboard-detail-hero,
body[data-theme='light'] .dashboard-detail-breakdown-card,
body[data-theme='light'] .dashboard-detail-trend-card,
body[data-theme='light'] .dashboard-detail-stat {
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.07), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 255, 0.94));
  border-color: rgba(173, 191, 216, 0.72);
  box-shadow: 0 18px 40px rgba(27, 48, 78, 0.1);
}

body[data-theme='light'] .dashboard-detail-hero-copy h1,
body[data-theme='light'] .dashboard-detail-stat span,
body[data-theme='light'] .dashboard-detail-contributor strong {
  color: #07111f;
}

body[data-theme='light'] .dashboard-detail-hero-copy p,
body[data-theme='light'] .dashboard-detail-trend-card p,
body[data-theme='light'] .dashboard-detail-contributor span,
body[data-theme='light'] .dashboard-detail-stat strong,
body[data-theme='light'] .dashboard-detail-stat small {
  color: #516178;
}

body[data-theme='light'] .dashboard-detail-contributor {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(186, 201, 222, 0.74);
}

body[data-theme='light'] .dashboard-detail-sparkline svg,
body[data-theme='light'] .dashboard-detail-bar-track {
  background: rgba(222, 233, 248, 0.72);
}

body[data-theme='light'] .dashboard-detail-spark-labels strong {
  color: #07111f;
}

@keyframes ring-pop {
  from {
    opacity: 0.5;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

body[data-theme='light'] .dashboard-ring-card.ring-card {
  background:
    radial-gradient(circle at 50% 34%, rgba(105, 174, 254, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(17, 26, 43, 0.95), rgba(9, 15, 27, 0.95));
  border-color: rgba(15, 29, 54, 0.16);
  box-shadow: 0 16px 34px rgba(20, 36, 64, 0.12);
}

@media (max-width: 760px) {
  .dashboard-ring-card.ring-card {
    min-height: 174px;
    gap: 0.52rem;
    padding: 0.72rem 0.5rem;
    border-radius: 18px;
  }

  .dashboard-ring-card .ring-card-label {
    font-size: 0.66rem;
  }

  .dashboard-ring-visual,
  .dashboard-real-orb {
    width: 92px;
    height: 92px;
  }

  .dashboard-real-orb .orb-core {
    width: 68px;
    height: 68px;
  }

  .dashboard-real-orb .orb-core::before {
    inset: 8px;
  }

  .dashboard-real-orb .orb-core strong {
    font-size: 1.35rem;
  }

  .dashboard-ring-card .ring-card-footer {
    max-width: 8rem;
  }

  .dashboard-ring-card .ring-card-footer span {
    font-size: 0.66rem;
  }

  .dashboard-ring-card .ring-card-footer small {
    display: none;
  }

  .dashboard-detail-hero-top {
    grid-template-columns: 1fr auto;
  }

  .dashboard-detail-hero-body {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .dashboard-detail-title-row {
    justify-content: center;
  }

  .dashboard-detail-hero-copy h1,
  .dashboard-detail-hero-copy p {
    margin-inline: auto;
  }

  .dashboard-detail-hero-copy .actions {
    justify-content: center;
  }

  .dashboard-detail-stat-grid,
  .dashboard-detail-contributor-list,
  .dashboard-detail-trend-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-detail-trend-card {
    min-height: 0;
  }
}

/* Dashboard performance console */
.desktop-dashboard-shell {
  display: grid;
  gap: 1rem;
}

.dashboard-performance-console {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.86rem;
  padding: 1.18rem;
  border: 1px solid rgba(57, 75, 105, 0.58);
  border-radius: 34px;
  background:
    radial-gradient(circle at 86% 12%, rgba(0, 180, 255, 0.13), transparent 26%),
    radial-gradient(circle at 14% 6%, rgba(37, 99, 235, 0.11), transparent 24%),
    linear-gradient(180deg, rgba(12, 20, 35, 0.98), rgba(4, 8, 15, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 28px 80px rgba(0, 0, 0, 0.26);
}

.dashboard-performance-console::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.26;
}

.dashboard-performance-console > * {
  position: relative;
  z-index: 1;
}

.dashboard-console-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.42rem 0.56rem 0.18rem;
}

.dashboard-console-title {
  display: grid;
  gap: 0.14rem;
}

.dashboard-console-title .eyebrow {
  color: #45d9ff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.dashboard-console-title h1 {
  margin: 0;
  color: #f7fbff;
  font-size: clamp(1.55rem, 2.7vw, 2.35rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.dashboard-console-title p {
  margin: 0;
  color: #9fb0ca;
  font-size: 0.84rem;
}

.dashboard-console-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.56rem;
}

.dashboard-console-actions .status-chip {
  min-height: 2.18rem;
  padding-inline: 0.88rem;
  border-radius: 999px;
  background: rgba(4, 150, 190, 0.13);
  border-color: rgba(0, 180, 255, 0.34);
  color: #5be3ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dashboard-console-actions .btn {
  min-height: 2.4rem;
  border-radius: 14px;
}

.dashboard-console-rings.grid.metric-rings {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.82rem;
  margin: 0;
}

.dashboard-performance-console .dashboard-ring-card.ring-card {
  min-height: 232px;
  padding: 1.02rem 1rem 0.92rem;
  border-radius: 25px;
  background:
    radial-gradient(circle at 50% 28%, rgba(105, 174, 254, 0.09), transparent 52%),
    linear-gradient(180deg, rgba(17, 26, 43, 0.94), rgba(8, 13, 24, 0.98));
  border-color: rgba(85, 104, 137, 0.28);
}

.dashboard-performance-console .dashboard-ring-visual,
.dashboard-performance-console .dashboard-real-orb {
  width: 148px;
  height: 148px;
}

.dashboard-performance-console .dashboard-real-orb .orb-core {
  width: 108px;
  height: 108px;
}

.dashboard-performance-console .dashboard-real-orb .orb-core strong {
  font-size: 2rem;
}

.dashboard-performance-console .daily-outlook-row {
  margin: 0;
  min-height: 4rem;
  border-radius: 22px;
  padding: 0.76rem 0.92rem;
  background:
    radial-gradient(circle at 94% 10%, rgba(0, 180, 255, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(5, 42, 63, 0.74), rgba(4, 24, 39, 0.86));
  border: 1px solid rgba(0, 180, 255, 0.34);
}

.dashboard-performance-console .daily-outlook-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 30%, rgba(75, 233, 255, 0.24), transparent 62%),
    rgba(10, 24, 38, 0.98);
}

.dashboard-performance-console .daily-outlook-copy strong {
  max-width: 76ch;
  font-size: 1.02rem;
  letter-spacing: -0.035em;
}

.dashboard-console-lower {
  display: grid;
  gap: 0.82rem;
}

.dashboard-console-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 0.82rem;
}

.dashboard-console-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: 0.82rem;
}

.dashboard-console-lower .card,
.dashboard-console-load-card > .card,
.dashboard-console-detail-grid .card,
.desktop-dashboard-support-main > .card {
  border-radius: 22px;
  border-color: rgba(72, 91, 124, 0.35);
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, 0.075), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 39, 0.95), rgba(8, 13, 23, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.dashboard-console-lower .dashboard-priority-card {
  min-height: 128px;
}

.dashboard-console-lower .dashboard-priority-card .toolbar h3,
.dashboard-console-load-card .toolbar h3 {
  font-size: 1.05rem;
  letter-spacing: -0.04em;
}

.dashboard-console-lower .dashboard-priority-card .card-copy {
  color: #b6c6dd;
  font-size: 0.92rem;
}

.dashboard-console-load-card .bar-chart {
  align-items: end;
  min-height: 88px;
  margin-top: 0.5rem;
}

.dashboard-console-load-card .bar {
  border-radius: 999px 999px 6px 6px;
  background:
    linear-gradient(180deg, #4bd0ff 0%, #2563eb 100%);
  box-shadow: 0 0 18px rgba(0, 180, 255, 0.18);
}

.dashboard-secondary-disclosure {
  border-radius: 24px;
}

body[data-theme='light'] .dashboard-performance-console {
  background:
    radial-gradient(circle at 86% 12%, rgba(12, 96, 248, 0.11), transparent 26%),
    linear-gradient(180deg, #f8fbff, #edf4ff);
  border-color: rgba(15, 29, 54, 0.14);
  box-shadow: 0 24px 60px rgba(20, 36, 64, 0.14);
}

body[data-theme='light'] .dashboard-console-title h1 {
  color: #0b1220;
}

body[data-theme='light'] .dashboard-console-title p {
  color: #607089;
}

body[data-theme='light'] .dashboard-performance-console .daily-outlook-row,
body[data-theme='light'] .dashboard-console-lower .card,
body[data-theme='light'] .dashboard-console-load-card > .card,
body[data-theme='light'] .dashboard-console-detail-grid .card,
body[data-theme='light'] .desktop-dashboard-support-main > .card {
  background:
    radial-gradient(circle at 100% 0%, rgba(12, 96, 248, 0.06), transparent 30%),
    linear-gradient(180deg, #ffffff, #f5f8ff);
  border-color: rgba(15, 29, 54, 0.13);
}

@media (max-width: 1040px) {
  .dashboard-console-header,
  .dashboard-console-actions {
    align-items: flex-start;
  }

  .dashboard-console-lower-grid,
  .dashboard-console-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .dashboard-performance-console {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .dashboard-performance-console::before {
    display: none;
  }
}

/* Light-mode hardening: keep the full app coherent instead of leaving dark glass leftovers. */
body[data-theme='light'] {
  --bg: #edf3ff;
  --bg-elevated: #ffffff;
  --surface: #f7faff;
  --surface-2: #eef4ff;
  --surface-3: #e5edfb;
  --text: #111827;
  --text-muted: #5d6a82;
  --muted: var(--text-muted);
  --border: #d6dfef;
  --border-strong: #c4d0e5;
  --accent: #0c60f8;
  --accent-2: #00a7de;
  --accent-soft: rgba(12, 96, 248, 0.1);
  --success: #16875a;
  --success-soft: rgba(22, 135, 90, 0.11);
  --warning: #9a5b0a;
  --warning-soft: rgba(154, 91, 10, 0.12);
  --danger: #b72f4d;
  --danger-soft: rgba(183, 47, 77, 0.12);
  --shadow-sm: 0 10px 24px rgba(20, 35, 64, 0.08);
  --shadow-md: 0 18px 46px rgba(20, 35, 64, 0.12);
  --shadow-focus: 0 0 0 3px rgba(12, 96, 248, 0.18);
  background:
    radial-gradient(680px 340px at 8% -4%, rgba(12, 96, 248, 0.11), transparent 58%),
    radial-gradient(760px 360px at 96% 0%, rgba(0, 188, 214, 0.11), transparent 58%),
    linear-gradient(180deg, #fbfdff 0%, #f2f6ff 48%, #eaf0fb 100%);
  color: var(--text);
}

body[data-theme='light']::before {
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(36, 59, 99, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 59, 99, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
}

body[data-theme='light']::after {
  background:
    radial-gradient(900px 360px at 50% -12%, rgba(12, 96, 248, 0.06), transparent 56%),
    radial-gradient(720px 260px at 100% 76%, rgba(0, 188, 214, 0.045), transparent 52%);
  opacity: 0.72;
}

body[data-theme='light'] .top-nav,
body[data-theme='light'] .mobile-tabbar,
body[data-theme='light'] .app-footer {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(199, 211, 231, 0.88);
  box-shadow: 0 14px 36px rgba(28, 44, 76, 0.08);
  backdrop-filter: blur(18px);
}

body[data-theme='light'] .top-nav::after {
  background: linear-gradient(90deg, transparent, rgba(12, 96, 248, 0.12), transparent);
}

body[data-theme='light'] .app-footer-inner {
  border-top-color: rgba(185, 200, 224, 0.46);
}

body[data-theme='light'] .desktop-nav,
body[data-theme='light'] .mobile-tabbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 245, 255, 0.88));
  border-color: rgba(198, 210, 231, 0.9);
}

body[data-theme='light'] .nav-tab,
body[data-theme='light'] .mobile-tab {
  color: #52627b;
}

body[data-theme='light'] .nav-tab:hover,
body[data-theme='light'] .mobile-tab:hover {
  color: #132033;
}

body[data-theme='light'] .nav-tab.active,
body[data-theme='light'] .mobile-tab.active {
  background:
    linear-gradient(180deg, rgba(12, 96, 248, 0.12), rgba(0, 188, 214, 0.055)),
    #ffffff;
  color: #0c2447;
  box-shadow:
    inset 0 0 0 1px rgba(12, 96, 248, 0.14),
    0 8px 18px rgba(12, 96, 248, 0.08);
}

body[data-theme='light'] .brand-mark {
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-theme='light'] .brand-logo {
  filter: drop-shadow(0 8px 14px rgba(20, 35, 64, 0.1));
}

body[data-theme='light'] .brand-wordmark {
  content: url('../brand/athleteos-wordmark-light-transparent.png');
  height: 31px;
}

body[data-theme='light'] .app-footer-copy {
  width: 118px;
  background-image: url('../brand/athleteos-wordmark-light-transparent.png');
}

body[data-theme='light'] .page-header {
  border-bottom-color: rgba(185, 200, 224, 0.5);
}

body[data-theme='light'] .brand-text small,
body[data-theme='light'] .app-footer-copy,
body[data-theme='light'] .page-header p,
body[data-theme='light'] .muted,
body[data-theme='light'] small,
body[data-theme='light'] .context-note {
  color: var(--text-muted);
}

body[data-theme='light'] .global-sync-status,
body[data-theme='light'] .status-chip,
body[data-theme='light'] .trend-chip,
body[data-theme='light'] .pill-btn,
body[data-theme='light'] .tag,
body[data-theme='light'] .mini-chip {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(196, 208, 229, 0.9);
  color: #43516a;
  box-shadow: 0 6px 16px rgba(20, 35, 64, 0.055);
}

body[data-theme='light'] .status-chip.success,
body[data-theme='light'] .global-sync-status.success,
body[data-theme='light'] .trend-chip.up {
  background: linear-gradient(180deg, #f1fff7, #ffffff);
  border-color: rgba(22, 135, 90, 0.24);
  color: #13764f;
}

body[data-theme='light'] .status-chip.warning,
body[data-theme='light'] .global-sync-status.warning {
  background: linear-gradient(180deg, #fff8ec, #ffffff);
  border-color: rgba(154, 91, 10, 0.24);
  color: #855008;
}

body[data-theme='light'] .status-chip.error,
body[data-theme='light'] .global-sync-status.error,
body[data-theme='light'] .trend-chip.down {
  background: linear-gradient(180deg, #fff2f5, #ffffff);
  border-color: rgba(183, 47, 77, 0.22);
  color: #9f2942;
}

body[data-theme='light'] .card,
body[data-theme='light'] .card.soft,
body[data-theme='light'] .empty-state,
body[data-theme='light'] .loading-state,
body[data-theme='light'] .error-state,
body[data-theme='light'] .dashboard-start-panel,
body[data-theme='light'] .today-plan-card,
body[data-theme='light'] .calendar-panel,
body[data-theme='light'] .table-panel,
body[data-theme='light'] .list-panel,
body[data-theme='light'] .analytics-primary-card,
body[data-theme='light'] .analytics-support-card,
body[data-theme='light'] .analytics-page-note-card,
body[data-theme='light'] .analytics-cardio-panel,
body[data-theme='light'] .analytics-full-chart-card,
body[data-theme='light'] .analytics-cardio-summary,
body[data-theme='light'] .analytics-filters-card,
body[data-theme='light'] .review-toolbar-card,
body[data-theme='light'] .ai-review-card,
body[data-theme='light'] .settings-hub-card,
body[data-theme='light'] .settings-panel-card,
body[data-theme='light'] .settings-module,
body[data-theme='light'] .settings-hero,
body[data-theme='light'] .settings-integration-catalog,
body[data-theme='light'] .settings-fusion-panel,
body[data-theme='light'] .settings-sync-summary-panel,
body[data-theme='light'] .sync-diag-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(12, 96, 248, 0.055), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.96));
  border-color: rgba(206, 217, 235, 0.95);
  color: var(--text);
  box-shadow: 0 14px 34px rgba(20, 35, 64, 0.075);
}

body[data-theme='light'] .settings-row,
body[data-theme='light'] .settings-catalog-item,
body[data-theme='light'] .settings-provider-card,
body[data-theme='light'] .settings-fusion-rule,
body[data-theme='light'] .settings-fusion-source-card,
body[data-theme='light'] .settings-sync-card,
body[data-theme='light'] .detail-item,
body[data-theme='light'] .stat-card,
body[data-theme='light'] .analytics-panel-metric,
body[data-theme='light'] .analytics-sleep-entry,
body[data-theme='light'] .assistant-card,
body[data-theme='light'] .assistant-review-col,
body[data-theme='light'] .assistant-why-item,
body[data-theme='light'] .assistant-empty-signal,
body[data-theme='light'] .assistant-context-tile,
body[data-theme='light'] .review-toolbar-group,
body[data-theme='light'] .ai-review-hero-copy,
body[data-theme='light'] .ai-review-signal,
body[data-theme='light'] .ai-review-column,
body[data-theme='light'] .ai-review-actions,
body[data-theme='light'] .coach-note {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 255, 0.9));
  border-color: rgba(211, 222, 239, 0.95);
  color: var(--text);
  box-shadow: none;
}

body[data-theme='light'] .card::before,
body[data-theme='light'] .analytics-primary-card::before,
body[data-theme='light'] .analytics-support-card::before,
body[data-theme='light'] .analytics-page-note-card::before,
body[data-theme='light'] .analytics-cardio-panel::before,
body[data-theme='light'] .analytics-full-chart-card::before {
  opacity: 0.34;
}

body[data-theme='light'] .btn.secondary,
body[data-theme='light'] .btn.ghost,
body[data-theme='light'] .icon-btn.subtle,
body[data-theme='light'] .assistant-icon-btn,
body[data-theme='light'] .assistant-inline-tool {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(198, 210, 231, 0.92);
  color: #27344c;
  box-shadow: none;
}

body[data-theme='light'] .btn.secondary:hover,
body[data-theme='light'] .btn.ghost:hover,
body[data-theme='light'] .icon-btn.subtle:hover {
  background: #ffffff;
  border-color: rgba(12, 96, 248, 0.24);
  color: #0c2447;
}

body[data-theme='light'] input,
body[data-theme='light'] select,
body[data-theme='light'] textarea {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-color: rgba(196, 208, 229, 0.98);
  color: #111827;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 10px rgba(20, 35, 64, 0.035);
}

body[data-theme='light'] select option {
  background: #ffffff;
  color: #111827;
}

body[data-theme='light'] input:focus-visible,
body[data-theme='light'] select:focus-visible,
body[data-theme='light'] textarea:focus-visible {
  border-color: rgba(12, 96, 248, 0.44);
  box-shadow: var(--shadow-focus);
}

body[data-theme='light'] .dashboard-performance-console {
  background:
    radial-gradient(760px 320px at 88% 2%, rgba(12, 96, 248, 0.1), transparent 58%),
    radial-gradient(520px 260px at 10% 0%, rgba(0, 188, 214, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 245, 255, 0.96));
  border-color: rgba(196, 208, 229, 0.94);
  box-shadow: 0 22px 58px rgba(20, 35, 64, 0.12);
}

body[data-theme='light'] .dashboard-performance-console::before {
  opacity: 0.18;
}

body[data-theme='light'] .dashboard-console-title .eyebrow {
  color: #0c60f8;
}

body[data-theme='light'] .dashboard-ring-card.ring-card,
body[data-theme='light'] .dashboard-performance-console .dashboard-ring-card.ring-card {
  background:
    radial-gradient(circle at 50% 28%, rgba(12, 96, 248, 0.055), transparent 52%),
    linear-gradient(180deg, #ffffff, #f5f8ff);
  border-color: rgba(196, 208, 229, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 14px 28px rgba(20, 35, 64, 0.08);
}

body[data-theme='light'] .dashboard-ring-card .ring-card-label {
  color: #697892;
}

body[data-theme='light'] .dashboard-real-orb .orb-ring-base {
  background: conic-gradient(from 220deg, rgba(201, 212, 232, 0.98), rgba(226, 233, 245, 0.94));
}

body[data-theme='light'] .dashboard-real-orb .orb-core {
  background:
    radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.86) 34%, rgba(223, 232, 247, 0.9) 72%),
    linear-gradient(180deg, #f9fbff, #e9f0fb);
  border-color: rgba(161, 177, 207, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -8px 16px rgba(102, 121, 154, 0.08);
}

body[data-theme='light'] .dashboard-real-orb .orb-core strong {
  color: #16233a;
}

body[data-theme='light'] .dashboard-ring-card .ring-card-footer span {
  color: #52627b;
}

body[data-theme='light'] .dashboard-performance-console .daily-outlook-row,
body[data-theme='light'] .daily-outlook-row {
  background:
    radial-gradient(circle at 96% 12%, rgba(12, 96, 248, 0.09), transparent 32%),
    linear-gradient(180deg, #ffffff, #f4f8ff);
  border-color: rgba(12, 96, 248, 0.18);
  color: var(--text);
}

body[data-theme='light'] .daily-outlook-copy strong {
  color: #111827;
}

body[data-theme='light'] .daily-outlook-icon,
body[data-theme='light'] .settings-hub-icon,
body[data-theme='light'] .settings-fusion-icon,
body[data-theme='light'] .assistant-avatar,
body[data-theme='light'] .assistant-fab-icon,
body[data-theme='light'] .assistant-modal-mark,
body[data-theme='light'] .assistant-composer-mark {
  background:
    radial-gradient(circle at 50% 34%, rgba(12, 96, 248, 0.12), transparent 62%),
    linear-gradient(180deg, #ffffff, #eef4ff);
  border-color: rgba(196, 208, 229, 0.95);
  color: #0c60f8;
  box-shadow: 0 8px 18px rgba(20, 35, 64, 0.07);
}

body[data-theme='light'] .bar,
body[data-theme='light'] .weekly-bars .bar {
  background: linear-gradient(180deg, #46cfff, #2563eb);
  box-shadow: 0 8px 18px rgba(12, 96, 248, 0.12);
}

body[data-theme='light'] .bar-label,
body[data-theme='light'] .bar-value,
body[data-theme='light'] .weekly-bars .bar-label,
body[data-theme='light'] .weekly-bars .bar-value {
  color: #5d6a82;
}

body[data-theme='light'] .chart-grid-line,
body[data-theme='light'] .analytics-chart-grid-line {
  border-color: rgba(88, 105, 135, 0.14);
}

body[data-theme='light'] .analytics-cardio-window-pills,
body[data-theme='light'] .analytics-shell .analytics-cardio-window-pills,
body[data-theme='light'] .analytics-shell .analytics-training-controls .filters.time-range-pills,
body[data-theme='light'] .analytics-shell .analytics-training-controls .chart-style-pills {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(186, 202, 227, 0.78);
  box-shadow: 0 8px 20px rgba(20, 35, 64, 0.06);
}

body[data-theme='light'] .cardio-legend-item {
  color: #52627b;
}

body[data-theme='light'] .cardio-legend-swatch {
  background: rgba(106, 126, 153, 0.14);
  border-color: rgba(106, 126, 153, 0.28);
}

body[data-theme='light'] .cardio-typical-band {
  fill: rgba(106, 126, 153, 0.12);
}

body[data-theme='light'] .cardio-grid-line {
  stroke: rgba(89, 108, 139, 0.16);
}

body[data-theme='light'] .cardio-grid-label,
body[data-theme='light'] .cardio-axis-label,
body[data-theme='light'] .cardio-month-axis,
body[data-theme='light'] .recovery-axis-day,
body[data-theme='light'] .recovery-axis-date,
body[data-theme='light'] .sleep-grid-label {
  fill: #65738c;
}

body[data-theme='light'] .cardio-average-guide {
  stroke: rgba(82, 107, 143, 0.68);
  stroke-width: 3;
}

body[data-theme='light'] .cardio-average-pill {
  fill: rgba(255, 255, 255, 0.98);
  filter: drop-shadow(0 8px 18px rgba(20, 35, 64, 0.12));
}

body[data-theme='light'] .cardio-average-pill-text {
  fill: #111827;
}

body[data-theme='light'] .recovery-grid-label.success {
  fill: #16875a;
}

body[data-theme='light'] .recovery-grid-label.warning {
  fill: #a56b13;
}

body[data-theme='light'] .recovery-grid-label.danger {
  fill: #b72f4d;
}

body[data-theme='light'] .recovery-bar.success,
body[data-theme='light'] .recovery-bar-value.success {
  fill: #32b981;
  color: #16875a;
}

body[data-theme='light'] .recovery-bar.warning,
body[data-theme='light'] .recovery-bar-value.warning {
  fill: #e4b333;
  color: #9a5b0a;
}

body[data-theme='light'] .recovery-bar.danger,
body[data-theme='light'] .recovery-bar-value.danger {
  fill: #e14d64;
  color: #b72f4d;
}

body[data-theme='light'] .modal.assistant-modal,
body[data-theme='light'] .assistant-shell,
body[data-theme='light'] .assistant-shell-inner,
body[data-theme='light'] .assistant-open-state,
body[data-theme='light'] .assistant-chat-state,
body[data-theme='light'] .assistant-composer,
body[data-theme='light'] .assistant-thread-wrap {
  background:
    radial-gradient(circle at 92% 0%, rgba(12, 96, 248, 0.07), transparent 34%),
    linear-gradient(180deg, #ffffff, #f4f8ff);
  border-color: rgba(206, 217, 235, 0.98);
  color: var(--text);
}

body[data-theme='light'] .assistant-message.user .assistant-bubble {
  background: linear-gradient(145deg, rgba(12, 96, 248, 0.16), rgba(0, 188, 214, 0.08), #ffffff);
  color: #10213a;
}

body[data-theme='light'] .assistant-message.assistant .assistant-bubble,
body[data-theme='light'] .assistant-message.assistant.plain .assistant-bubble {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(206, 217, 235, 0.96);
  color: #111827;
}

body[data-theme='light'] .calendar-cell.today,
body[data-theme='light'] .calendar-cell.selected {
  border-color: rgba(12, 96, 248, 0.34);
  background:
    radial-gradient(circle at 100% 0%, rgba(12, 96, 248, 0.09), transparent 32%),
    #ffffff;
}

body[data-theme='light'] .toast {
  background: #ffffff;
  border-color: rgba(196, 208, 229, 0.95);
  color: var(--text);
  box-shadow: 0 18px 46px rgba(20, 35, 64, 0.14);
}

/* App-wide light-mode polish pass: preserve dark-mode hierarchy without washed out charts. */
body[data-theme='light'] .top-nav,
body[data-theme='light'] .app-footer {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
  border-color: rgba(184, 200, 224, 0.78);
}

body[data-theme='light'] .app-footer-inner {
  border-top-color: rgba(184, 200, 224, 0.72);
}

body[data-theme='light'] .view-section {
  color: #0f172a;
}

body[data-theme='light'] .cardio-average-guide,
body[data-theme='light'] .analytics-shell .cardio-average-guide {
  stroke: rgba(56, 76, 111, 0.82);
  stroke-width: 3.2;
}

body[data-theme='light'] .cardio-average-pill,
body[data-theme='light'] .analytics-shell .cardio-average-pill {
  fill: rgba(255, 255, 255, 0.99);
  filter: drop-shadow(0 12px 22px rgba(31, 45, 74, 0.16));
}

body[data-theme='light'] .cardio-last-value,
body[data-theme='light'] .analytics-shell .cardio-last-value {
  fill: #102033;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 5px;
  paint-order: stroke;
}

body[data-theme='light'] .cardio-trend-chip.up,
body[data-theme='light'] .cardio-trend-chip.success,
body[data-theme='light'] .trend-chip.up {
  background: rgba(11, 143, 105, 0.12);
  border-color: rgba(11, 143, 105, 0.28);
  color: #047857;
}

body[data-theme='light'] .analytics-command-tab,
body[data-theme='light'] .nav-tab,
body[data-theme='light'] .mobile-tab {
  color: #43506a;
}

body[data-theme='light'] .analytics-command-tab.active,
body[data-theme='light'] .nav-tab.active,
body[data-theme='light'] .mobile-tab.active {
  color: #0f223f;
}

body[data-theme='light'] .global-sync-status,
body[data-theme='light'] .global-sync-status.warning {
  background: rgba(180, 111, 14, 0.08);
  border-color: rgba(180, 111, 14, 0.3);
  color: #9a5b0a;
}

body[data-theme='light'] .dashboard-console-lower .card .card-copy,
body[data-theme='light'] .dashboard-console-lower .card p,
body[data-theme='light'] .dashboard-console-load-card .card-copy,
body[data-theme='light'] .dashboard-console-detail-grid .card p,
body[data-theme='light'] .today-plan-card p,
body[data-theme='light'] .today-plan-card small {
  color: #52627b;
}

body[data-theme='light'] .dashboard-console-lower .detail-item small,
body[data-theme='light'] .dashboard-console-lower .training-note small,
body[data-theme='light'] .dashboard-console-load-card .bar-label,
body[data-theme='light'] .dashboard-console-load-card .bar-value {
  color: #60708a;
}

/* Weekly Review export menu must sit above review cards and be opaque in light mode. */
.view-section:has(.weekly-export-menu[open]),
.review-toolbar-card:has(.weekly-export-menu[open]),
.weekly-export-menu[open] {
  isolation: isolate;
  overflow: visible;
  z-index: 214748300;
}

.weekly-export-menu[open] .weekly-export-options {
  z-index: 214748301;
}

.weekly-export-options {
  backdrop-filter: none;
}

body[data-theme='light'] .weekly-export-options {
  background: #ffffff;
  border-color: rgba(190, 204, 226, 0.98);
  box-shadow: 0 28px 70px rgba(22, 35, 64, 0.22);
}

/* Ask AthleteOS: light chrome with a dark flagship conversation surface must keep dark text tokens out. */
body[data-theme='light'] .assistant-open-stage,
body[data-theme='light'] .assistant-chat-state {
  color: #f8fbff;
}

body[data-theme='light'] .assistant-open-hero h4,
body[data-theme='light'] .assistant-starter-copy strong,
body[data-theme='light'] .assistant-open-stage .assistant-open-footnote {
  color: #f8fbff;
}

body[data-theme='light'] .assistant-open-hero p,
body[data-theme='light'] .assistant-starter-copy small {
  color: rgba(203, 215, 234, 0.82);
}

body[data-theme='light'] .assistant-starter-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    linear-gradient(180deg, rgba(13, 19, 29, 0.98), rgba(9, 13, 21, 0.98));
  border-color: rgba(120, 147, 190, 0.28);
  color: #f8fbff;
}

body[data-theme='light'] .assistant-starter-icon,
body[data-theme='light'] .assistant-composer-mark,
body[data-theme='light'] .assistant-thread-avatar {
  background:
    radial-gradient(circle at 28% 22%, rgba(0, 180, 255, 0.16), transparent 40%),
    linear-gradient(145deg, rgba(10, 15, 24, 0.98), rgba(8, 13, 22, 0.98));
  border-color: rgba(120, 147, 190, 0.28);
  color: #f8fbff;
}

/* Most app renders are data refreshes or input updates. Do not replay page-enter motion for them. */
.main-content[data-render-motion='quiet'] .view-section,
.main-content[data-render-motion='quiet'] .view-section > * {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
