:root {
  --v3-color-ace-blue: #00a1ee;
  --v3-color-page: #f3f6f8;
  --v3-color-surface: #ffffff;
  --v3-color-surface-soft: #eef8fd;
  --v3-color-surface-warm: #fbfdfe;
  --v3-color-text: #122033;
  --v3-color-text-strong: #071728;
  --v3-color-muted: #637083;
  --v3-color-border: #dce5ec;
  --v3-color-border-strong: #9bdcf8;
  --v3-color-accent-soft: #dff5fe;
  --v3-color-success: #16745f;
  --v3-color-warning: #996b13;
  --v3-color-danger: #b3313b;
  --v3-color-shadow: rgba(18, 32, 51, 0.08);
  --v3-color-shadow-strong: rgba(18, 32, 51, 0.12);

  /* Semantic theme aliases for future light/dark migration. */
  --v3-theme-bg: var(--v3-color-page);
  --v3-theme-bg-start: #fbfcfd;
  --v3-theme-bg-radial-accent: rgba(0, 161, 238, 0.12);
  --v3-theme-bg-end: #edf3f7;
  --v3-theme-surface: var(--v3-color-surface);
  --v3-theme-surface-elevated: var(--v3-color-surface);
  --v3-theme-surface-muted: #f7fafc;
  --v3-theme-surface-soft: var(--v3-color-surface-soft);
  --v3-theme-surface-warm: var(--v3-color-surface-warm);
  --v3-theme-shared-surface-soft: #f8fbfd;
  --v3-theme-cover-placeholder-bg: #f8fcfe;
  --v3-theme-active-state-bg: #f8fafc;
  --v3-theme-gradient-recent-start: rgba(255, 255, 255, 0.97);
  --v3-theme-gradient-recent-end: rgba(248, 251, 253, 0.94);
  --v3-theme-gradient-upload-start: rgba(255, 255, 255, 0.98);
  --v3-theme-gradient-upload-end: rgba(244, 248, 251, 0.96);
  --v3-theme-border: var(--v3-color-border);
  --v3-theme-border-strong: var(--v3-color-border-strong);
  --v3-theme-divider: rgba(127, 148, 166, 0.26);
  --v3-theme-border-alpha-strong: rgba(127, 148, 166, 0.32);
  --v3-theme-border-alpha-muted: rgba(127, 148, 166, 0.24);
  --v3-theme-border-alpha-medium: rgba(127, 148, 166, 0.22);
  --v3-theme-border-alpha: rgba(127, 148, 166, 0.18);
  --v3-theme-border-alpha-soft: rgba(127, 148, 166, 0.14);
  --v3-theme-border-alpha-subtle: rgba(127, 148, 166, 0.12);
  --v3-theme-divider-alpha: rgba(127, 148, 166, 0.2);
  --v3-theme-text: var(--v3-color-text);
  --v3-theme-text-strong: var(--v3-color-text-strong);
  --v3-theme-text-muted: var(--v3-color-muted);
  --v3-theme-focus: rgba(0, 161, 238, 0.34);
  --v3-theme-focus-active-border: rgba(0, 117, 173, 0.26);
  --v3-theme-focus-active-shadow: rgba(0, 117, 173, 0.12);
  --v3-theme-overlay: rgba(8, 17, 28, 0.82);
  --v3-theme-shadow: var(--v3-color-shadow);
  --v3-theme-shadow-strong: var(--v3-color-shadow-strong);
  --v3-theme-card-shadow-color: rgba(18, 32, 51, 0.045);
  --v3-theme-panel-shadow-color: rgba(8, 17, 28, 0.2);
  --v3-theme-shadow-recent-reduced: rgba(18, 32, 51, 0.05);
  --v3-theme-shadow-active-accent: rgba(0, 117, 173, 0.05);

  --v3-theme-control-bg: #ffffff;
  --v3-theme-control-bg-muted: #eef3f7;
  --v3-theme-control-border: var(--v3-color-border);
  --v3-theme-control-border-strong: var(--v3-color-border-strong);
  --v3-theme-control-text: var(--v3-color-text);
  --v3-theme-control-text-strong: var(--v3-color-text-strong);
  --v3-theme-control-disabled-opacity: 0.58;
  --v3-theme-count-pill-text: #075f87;
  --v3-theme-top-control-border: #dddddd;
  --v3-theme-top-control-bg: #ffffff;
  --v3-theme-top-control-icon: #374151;
  --v3-theme-auth-invalid-border: rgba(179, 49, 59, 0.7);
  --v3-theme-auth-submit-bg: #960000;
  --v3-theme-auth-submit-text: #ffffff;
  --v3-theme-auth-submit-disabled-bg: #c5cbd3;

  --v3-theme-status-ok-bg: #eaf7ef;
  --v3-theme-status-ok-text: #27633d;
  --v3-theme-status-ok-border: #bbf7d0;
  --v3-theme-status-warn-bg: #fff4df;
  --v3-theme-status-warn-text: #7a4d00;
  --v3-theme-status-warn-border: #fcd34d;
  --v3-theme-status-danger-bg: #feecea;
  --v3-theme-status-danger-text: #9f2f24;
  --v3-theme-status-danger-border: #fecaca;
  --v3-theme-status-info-bg: #e9f2ff;
  --v3-theme-status-info-text: #225f99;
  --v3-theme-status-info-border: #bfdbfe;
  --v3-theme-status-muted-bg: #f0f3f6;
  --v3-theme-status-muted-text: var(--v3-color-muted);
  --v3-theme-status-muted-border: var(--v3-color-border);

  --v3-theme-handoff-ok-bg: #f4fbf6;
  --v3-theme-handoff-ok-border: rgba(47, 158, 68, 0.22);
  --v3-theme-handoff-info-bg: #f4f8ff;
  --v3-theme-handoff-info-border: rgba(59, 130, 246, 0.22);
  --v3-theme-handoff-warn-bg: #fffaf0;
  --v3-theme-handoff-warn-border: rgba(217, 119, 6, 0.24);
  --v3-theme-handoff-danger-bg: #fff5f5;
  --v3-theme-handoff-danger-border: rgba(220, 38, 38, 0.24);

  --v3-theme-delivery-email-badge-border: rgba(217, 119, 6, 0.28);
  --v3-theme-delivery-email-badge-text: #8a5a11;
  --v3-theme-delivery-email-send-surface: #fffefe;
  --v3-theme-delivery-email-send-border: rgba(150, 0, 0, 0.24);
  --v3-theme-delivery-email-focus-border: rgba(150, 0, 0, 0.45);
  --v3-theme-delivery-email-focus-shadow: rgba(150, 0, 0, 0.12);
  --v3-theme-delivery-email-invalid-border: rgba(179, 49, 59, 0.72);
  --v3-theme-delivery-email-send-border-strong: rgba(150, 0, 0, 0.28);
  --v3-theme-delivery-email-disabled-border: rgba(127, 148, 166, 0.24);
  --v3-theme-delivery-email-disabled-bg: #eef2f6;
  --v3-theme-delivery-feedback-ok-text: #0f7a3a;
  --v3-theme-delivery-feedback-warn-text: #8a5a11;
  --v3-theme-delivery-feedback-error-text: #a4262c;

  --v3-theme-upload-error-text: #9f1239;
  --v3-theme-upload-warn-text: #92400e;

  --v3-theme-action-ok-bg: #f1faf4;
  --v3-theme-action-ok-border: #2f8f52;
  --v3-theme-action-info-bg: #f2f7ff;
  --v3-theme-action-info-border: #225f99;
  --v3-theme-action-warn-bg: #fff8ed;
  --v3-theme-action-warn-border: #b45309;
  --v3-theme-action-danger-bg: #fff5f4;
  --v3-theme-action-danger-border: #b42318;
  --v3-theme-action-record-bg: #960000;
  --v3-theme-action-record-text: #ffffff;
  --v3-theme-action-photo-bg: #ffffff;
  --v3-theme-action-photo-text: #111111;
  --v3-theme-action-photo-border: #111111;
  --v3-theme-action-button-bg: #f8fbfd;
  --v3-theme-action-button-shadow: rgba(0, 0, 0, 0.18);
  --v3-theme-action-button-record-bg: #960000;
  --v3-theme-action-button-record-text: #ffffff;
  --v3-theme-action-button-photo-text: #111111;
  --v3-theme-active-primary-border: rgba(34, 95, 153, 0.42);
  --v3-theme-active-primary-bg: rgba(248, 250, 252, 0.95);
  --v3-theme-detail-row-bg: rgba(255, 255, 255, 0.7);

  --v3-theme-media-ok: #2f9e44;
  --v3-theme-media-muted: #94a3b8;
  --v3-theme-media-warn: #d97706;
  --v3-theme-media-danger: #dc2626;
  --v3-theme-media-caption-bg: #f4f8fb;
  --v3-theme-media-thumb-photo-bg-start: #eff6ff;
  --v3-theme-media-thumb-photo-bg-end: #ffffff;
  --v3-theme-media-thumb-photo-accent: #1d4ed8;
  --v3-theme-media-thumb-video-bg-start: #fff7ed;
  --v3-theme-media-thumb-video-bg-end: #ffffff;
  --v3-theme-media-thumb-video-accent: #c2410c;
  --v3-theme-preview-overlay: var(--v3-theme-overlay);
  --v3-theme-preview-panel: var(--v3-color-surface);
  --v3-theme-preview-content-bg: #08111c;
  --v3-theme-preview-panel-border: rgba(255, 255, 255, 0.22);
  --v3-theme-preview-shadow: rgba(0, 0, 0, 0.28);

  --v3-radius-card: 18px;
  --v3-radius-control: 14px;
  --v3-radius-small: 12px;
  --v3-radius-pill: 999px;

  --v3-space-1: 0.35rem;
  --v3-space-2: 0.6rem;
  --v3-space-3: 0.9rem;
  --v3-space-4: 1.25rem;
  --v3-space-5: 1.75rem;
  --v3-space-6: 2.5rem;

  --v3-font-family: "Aptos", "Segoe UI", sans-serif;
  --v3-shadow-card: 0 14px 34px var(--v3-color-shadow);
  --v3-shadow-lift: 0 18px 46px var(--v3-color-shadow-strong);
}

:root[data-v3-theme="dark"] {
  --v3-color-ace-blue: #38bdf8;
  --v3-color-page: #0b1220;
  --v3-color-surface: #121b2a;
  --v3-color-surface-soft: #132338;
  --v3-color-surface-warm: #111827;
  --v3-color-text: #e5edf7;
  --v3-color-text-strong: #f8fafc;
  --v3-color-muted: #a8b5c7;
  --v3-color-border: rgba(148, 163, 184, 0.32);
  --v3-color-border-strong: #38bdf8;
  --v3-color-accent-soft: rgba(56, 189, 248, 0.16);
  --v3-color-success: #86efac;
  --v3-color-warning: #fbbf24;
  --v3-color-danger: #fca5a5;
  --v3-color-shadow: rgba(0, 0, 0, 0.32);
  --v3-color-shadow-strong: rgba(0, 0, 0, 0.48);

  --v3-theme-bg: #0b1220;
  --v3-theme-bg-start: #0b1220;
  --v3-theme-bg-radial-accent: rgba(56, 189, 248, 0.12);
  --v3-theme-bg-end: #111827;
  --v3-theme-surface: #121b2a;
  --v3-theme-surface-elevated: #172033;
  --v3-theme-surface-muted: #1f2937;
  --v3-theme-surface-soft: #132338;
  --v3-theme-surface-warm: #111827;
  --v3-theme-shared-surface-soft: #162235;
  --v3-theme-cover-placeholder-bg: #132338;
  --v3-theme-active-state-bg: #172033;
  --v3-theme-gradient-recent-start: rgba(18, 27, 42, 0.98);
  --v3-theme-gradient-recent-end: rgba(15, 23, 42, 0.96);
  --v3-theme-gradient-upload-start: rgba(18, 27, 42, 0.98);
  --v3-theme-gradient-upload-end: rgba(17, 24, 39, 0.96);
  --v3-theme-border: rgba(148, 163, 184, 0.32);
  --v3-theme-border-strong: #5fbfe8;
  --v3-theme-divider: rgba(148, 163, 184, 0.3);
  --v3-theme-border-alpha-strong: rgba(148, 163, 184, 0.44);
  --v3-theme-border-alpha-muted: rgba(148, 163, 184, 0.34);
  --v3-theme-border-alpha-medium: rgba(148, 163, 184, 0.3);
  --v3-theme-border-alpha: rgba(148, 163, 184, 0.24);
  --v3-theme-border-alpha-soft: rgba(148, 163, 184, 0.18);
  --v3-theme-border-alpha-subtle: rgba(148, 163, 184, 0.14);
  --v3-theme-divider-alpha: rgba(148, 163, 184, 0.24);
  --v3-theme-text: #e5edf7;
  --v3-theme-text-strong: #f8fafc;
  --v3-theme-text-muted: #a8b5c7;
  --v3-theme-focus: rgba(56, 189, 248, 0.48);
  --v3-theme-focus-active-border: rgba(56, 189, 248, 0.38);
  --v3-theme-focus-active-shadow: rgba(56, 189, 248, 0.1);
  --v3-theme-overlay: rgba(3, 7, 18, 0.84);
  --v3-theme-shadow: rgba(0, 0, 0, 0.32);
  --v3-theme-shadow-strong: rgba(0, 0, 0, 0.48);
  --v3-theme-card-shadow-color: rgba(0, 0, 0, 0.28);
  --v3-theme-panel-shadow-color: rgba(0, 0, 0, 0.62);
  --v3-theme-shadow-recent-reduced: rgba(0, 0, 0, 0.24);
  --v3-theme-shadow-active-accent: rgba(56, 189, 248, 0.1);

  --v3-theme-control-bg: #111827;
  --v3-theme-control-bg-muted: #1f2937;
  --v3-theme-control-border: rgba(148, 163, 184, 0.32);
  --v3-theme-control-border-strong: #38bdf8;
  --v3-theme-control-text: #e5edf7;
  --v3-theme-control-text-strong: #f8fafc;
  --v3-theme-control-disabled-opacity: 0.54;
  --v3-theme-count-pill-text: #7dd3fc;
  --v3-theme-top-control-border: rgba(148, 163, 184, 0.36);
  --v3-theme-top-control-bg: #111827;
  --v3-theme-top-control-icon: #e5edf7;
  --v3-theme-auth-invalid-border: rgba(248, 113, 113, 0.78);
  --v3-theme-auth-submit-bg: #7f1d1d;
  --v3-theme-auth-submit-text: #f8fafc;
  --v3-theme-auth-submit-disabled-bg: #475569;

  --v3-theme-status-ok-bg: rgba(34, 197, 94, 0.16);
  --v3-theme-status-ok-text: #86efac;
  --v3-theme-status-ok-border: rgba(34, 197, 94, 0.45);
  --v3-theme-status-warn-bg: rgba(245, 158, 11, 0.18);
  --v3-theme-status-warn-text: #fcd34d;
  --v3-theme-status-warn-border: rgba(245, 158, 11, 0.48);
  --v3-theme-status-danger-bg: rgba(248, 113, 113, 0.16);
  --v3-theme-status-danger-text: #fca5a5;
  --v3-theme-status-danger-border: rgba(248, 113, 113, 0.5);
  --v3-theme-status-info-bg: rgba(56, 189, 248, 0.16);
  --v3-theme-status-info-text: #7dd3fc;
  --v3-theme-status-info-border: rgba(56, 189, 248, 0.45);
  --v3-theme-status-muted-bg: rgba(148, 163, 184, 0.14);
  --v3-theme-status-muted-text: #cbd5e1;
  --v3-theme-status-muted-border: rgba(148, 163, 184, 0.32);

  --v3-theme-handoff-ok-bg: rgba(34, 197, 94, 0.14);
  --v3-theme-handoff-ok-border: rgba(34, 197, 94, 0.38);
  --v3-theme-handoff-info-bg: rgba(56, 189, 248, 0.14);
  --v3-theme-handoff-info-border: rgba(56, 189, 248, 0.38);
  --v3-theme-handoff-warn-bg: rgba(245, 158, 11, 0.16);
  --v3-theme-handoff-warn-border: rgba(245, 158, 11, 0.42);
  --v3-theme-handoff-danger-bg: rgba(248, 113, 113, 0.14);
  --v3-theme-handoff-danger-border: rgba(248, 113, 113, 0.42);

  --v3-theme-delivery-email-badge-border: rgba(245, 158, 11, 0.42);
  --v3-theme-delivery-email-badge-text: #fcd34d;
  --v3-theme-delivery-email-send-surface: #172033;
  --v3-theme-delivery-email-send-border: rgba(127, 29, 29, 0.58);
  --v3-theme-delivery-email-focus-border: rgba(56, 189, 248, 0.52);
  --v3-theme-delivery-email-focus-shadow: rgba(56, 189, 248, 0.16);
  --v3-theme-delivery-email-invalid-border: rgba(248, 113, 113, 0.78);
  --v3-theme-delivery-email-send-border-strong: rgba(127, 29, 29, 0.68);
  --v3-theme-delivery-email-disabled-border: rgba(148, 163, 184, 0.26);
  --v3-theme-delivery-email-disabled-bg: #1f2937;
  --v3-theme-delivery-feedback-ok-text: #86efac;
  --v3-theme-delivery-feedback-warn-text: #fcd34d;
  --v3-theme-delivery-feedback-error-text: #fca5a5;

  --v3-theme-upload-error-text: #fda4af;
  --v3-theme-upload-warn-text: #fcd34d;

  --v3-theme-action-ok-bg: rgba(34, 197, 94, 0.14);
  --v3-theme-action-ok-border: #4ade80;
  --v3-theme-action-info-bg: rgba(56, 189, 248, 0.1);
  --v3-theme-action-info-border: #67c7ee;
  --v3-theme-action-warn-bg: rgba(245, 158, 11, 0.16);
  --v3-theme-action-warn-border: #fbbf24;
  --v3-theme-action-danger-bg: rgba(248, 113, 113, 0.14);
  --v3-theme-action-danger-border: #fca5a5;
  --v3-theme-action-record-bg: #7f1d1d;
  --v3-theme-action-record-text: #f8fafc;
  --v3-theme-action-photo-bg: #172033;
  --v3-theme-action-photo-text: #e5edf7;
  --v3-theme-action-photo-border: #cbd5e1;
  --v3-theme-action-button-bg: #162235;
  --v3-theme-action-button-shadow: rgba(0, 0, 0, 0.38);
  --v3-theme-action-button-record-bg: #7f1d1d;
  --v3-theme-action-button-record-text: #f8fafc;
  --v3-theme-action-button-photo-text: #e5edf7;
  --v3-theme-active-primary-border: rgba(56, 189, 248, 0.48);
  --v3-theme-active-primary-bg: rgba(23, 32, 51, 0.94);
  --v3-theme-detail-row-bg: rgba(15, 23, 42, 0.7);

  --v3-theme-media-ok: #4ade80;
  --v3-theme-media-muted: #94a3b8;
  --v3-theme-media-warn: #f59e0b;
  --v3-theme-media-danger: #f87171;
  --v3-theme-media-caption-bg: #162235;
  --v3-theme-media-thumb-photo-bg-start: #10233a;
  --v3-theme-media-thumb-photo-bg-end: #172033;
  --v3-theme-media-thumb-photo-accent: #93c5fd;
  --v3-theme-media-thumb-video-bg-start: #2a1a10;
  --v3-theme-media-thumb-video-bg-end: #172033;
  --v3-theme-media-thumb-video-accent: #fdba74;
  --v3-theme-preview-overlay: rgba(3, 7, 18, 0.86);
  --v3-theme-preview-panel: #121b2a;
  --v3-theme-preview-content-bg: #030712;
  --v3-theme-preview-panel-border: rgba(226, 232, 240, 0.22);
  --v3-theme-preview-shadow: rgba(0, 0, 0, 0.52);
}
