/* ==========================================================================
   SPACE THEME for stg.michaelhoffmann.me
   SpaceX / NASA inspired theme matching logo colors:
   - Primary Red: #b4353d
   - Teal: #34615c  
   - Near Black: #060c0b
   - White: #ffffff
   ========================================================================== */

/* ---- CSS Variables ---- */
:root {
  /* Core Logo Colors */
  --space-red: #b4353d;
  --space-red-bright: #d44852;
  --space-red-dark: #8a282f;
  --space-red-glow: rgba(180, 53, 61, 0.4);
  --space-teal: #34615c;
  --space-teal-light: #4a8a82;
  --space-teal-glow: rgba(52, 97, 92, 0.35);
  --space-black: #060c0b;
  --space-black-light: #0f1816;
  --space-black-alt: #141e1c;
  --space-white: #ffffff;
  --space-white-soft: #e8edec;
  --space-white-muted: #a8b5b2;

  /* Dark Theme */
  --bg-dark: #060c0b;
  --bg-dark-alt: #0a1210;
  --bg-dark-elevated: #111a18;
  --surface-dark: rgba(15, 24, 22, 0.88);
  --surface-dark-strong: rgba(20, 30, 28, 0.96);
  --border-dark: rgba(180, 53, 61, 0.12);
  --border-dark-strong: rgba(52, 97, 92, 0.25);
  --text-dark: #e8edec;
  --text-dark-soft: #b8c5c2;
  --text-dark-muted: #7a8a86;
  --accent-dark: var(--space-red);
  --accent-dark-soft: var(--space-teal);
  --shadow-dark: 0 24px 48px rgba(0, 0, 0, 0.5);

  /* Light Theme */
  --bg-light: #f0f3f2;
  --bg-light-alt: #e4ebe9;
  --bg-light-elevated: #ffffff;
  --surface-light: rgba(255, 255, 255, 0.95);
  --surface-light-strong: #ffffff;
  --border-light: rgba(52, 97, 92, 0.15);
  --border-light-strong: rgba(180, 53, 61, 0.2);
  --text-light: #0f1816;
  --text-light-soft: #2a3835;
  --text-light-muted: #5a6e6a;
  --accent-light: var(--space-red);
  --accent-light-soft: var(--space-teal);
  --shadow-light: 0 12px 32px rgba(15, 24, 22, 0.08);
}

/* ---- Override Base Font ---- */
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif !important;
}

/* ---- Base Styles ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 68px;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  transition: background 0.5s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* ---- Override Base Body (higher specificity + !important to beat styles.css) ---- */
html body {
  background: 
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.8) 0.5px, transparent 1px),
    radial-gradient(circle at 25% 45%, rgba(255,255,255,0.5) 0.3px, transparent 0.8px),
    radial-gradient(circle at 40% 10%, rgba(255,255,255,0.6) 0.4px, transparent 1px),
    radial-gradient(circle at 55% 65%, rgba(255,255,255,0.4) 0.3px, transparent 0.7px),
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.7) 0.5px, transparent 1.2px),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,0.5) 0.3px, transparent 0.8px),
    radial-gradient(circle at 95% 15%, rgba(255,255,255,0.6) 0.4px, transparent 1px),
    radial-gradient(circle at 15% 85%, rgba(255,255,255,0.4) 0.3px, transparent 0.7px),
    radial-gradient(circle at 60% 90%, rgba(255,255,255,0.5) 0.4px, transparent 1px),
    linear-gradient(180deg, #060c0b 0%, #0a1512 30%, #0f1e1a 60%, #060c0b 100%) !important;
  background-size: 100% 100% !important;
  background-attachment: fixed !important;
  color: var(--text-dark);
}

body[data-theme="light"] {
  background: linear-gradient(135deg, #f0f3f2 0%, #e4ebe9 40%, #dce5e2 100%) !important;
  color: var(--text-light);
}

/* ---- Typography ---- */
h1, .header-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(90deg, var(--space-red), var(--space-teal-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body[data-theme="dark"] h1,
body[data-theme="dark"] .header-title {
  background: linear-gradient(90deg, var(--space-red-bright), var(--space-teal-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle, .header-subtitle {
  font-weight: 400;
  letter-spacing: 0.02em;
}

body[data-theme="dark"] .subtitle,
body[data-theme="dark"] .header-subtitle {
  color: var(--text-dark-muted);
}

body[data-theme="light"] .subtitle,
body[data-theme="light"] .header-subtitle {
  color: var(--text-light-muted);
}

/* ---- Cards & Surfaces ---- */
body[data-theme="dark"] .card,
body[data-theme="dark"] .agent-card,
body[data-theme="dark"] .agent-card-modern,
body[data-theme="dark"] .status-card,
body[data-theme="dark"] .hierarchy-level,
body[data-theme="dark"] .task-container,
body[data-theme="dark"] .task-container-modern,
body[data-theme="dark"] .delegation-flow-card,
body[data-theme="dark"] .focus-cockpit-card,
body[data-theme="dark"] .focus-card,
body[data-theme="dark"] .life-card,
body[data-theme="dark"] .library-hours-status,
body[data-theme="dark"] .library-hours-row,
body[data-theme="dark"] .quick-action-btn,
body[data-theme="dark"] .settings-dropdown,
body[data-theme="dark"] .settings-container,
body[data-theme="dark"] .calendar-day,
body[data-theme="dark"] .calendar-day.today,
body[data-theme="dark"] .calendar-day.current-workout,
body[data-theme="dark"] .workout-card,
body[data-theme="dark"] .calisthenics-section,
body[data-theme="dark"] .task-details-content,
body[data-theme="dark"] .focus-settings-row input,
body[data-theme="dark"] .focus-priority-input,
body[data-theme="dark"] .focus-btn,
body[data-theme="dark"] .focus-metric,
body[data-theme="dark"] .news-card,
body[data-theme="dark"] .schedule-card,
body[data-theme="dark"] .study-card,
body[data-theme="dark"] .model-badge-card,
body[data-theme="dark"] .nav-container,
body[data-theme="dark"] .dashboard-header {
  background: linear-gradient(180deg, rgba(15, 24, 22, 0.92) 0%, rgba(10, 18, 16, 0.96) 100%);
  border: 1px solid var(--border-dark);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(180, 53, 61, 0.06);
  backdrop-filter: blur(20px);
  border-radius: 16px;
}

body[data-theme="dark"] .card:hover,
body[data-theme="dark"] .agent-card:hover,
body[data-theme="dark"] .agent-card-modern:hover,
body[data-theme="dark"] .status-card:hover,
body[data-theme="dark"] .workout-card:hover,
body[data-theme="dark"] .quick-action-btn:hover,
body[data-theme="dark"] .calendar-day:hover,
body[data-theme="dark"] .news-card:hover,
body[data-theme="dark"] .study-card:hover {
  border-color: rgba(180, 53, 61, 0.3);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(180, 53, 61, 0.1),
    0 0 30px rgba(180, 53, 61, 0.08);
}

body[data-theme="dark"] .nav-container {
  border-radius: 0 24px 24px 0;
  box-shadow: 
    inset -1px 0 0 rgba(255, 255, 255, 0.03),
    0 0 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(180, 53, 61, 0.05);
}

body[data-theme="light"] .card,
body[data-theme="light"] .agent-card,
body[data-theme="light"] .agent-card-modern,
body[data-theme="light"] .status-card,
body[data-theme="light"] .hierarchy-level,
body[data-theme="light"] .task-container,
body[data-theme="light"] .task-container-modern,
body[data-theme="light"] .delegation-flow-card,
body[data-theme="light"] .focus-cockpit-card,
body[data-theme="light"] .focus-card,
body[data-theme="light"] .life-card,
body[data-theme="light"] .library-hours-status,
body[data-theme="light"] .library-hours-row,
body[data-theme="light"] .quick-action-btn,
body[data-theme="light"] .settings-dropdown,
body[data-theme="light"] .settings-container,
body[data-theme="light"] .calendar-day,
body[data-theme="light"] .calendar-day.today,
body[data-theme="light"] .calendar-day.current-workout,
body[data-theme="light"] .workout-card,
body[data-theme="light"] .calisthenics-section,
body[data-theme="light"] .task-details-content,
body[data-theme="light"] .focus-settings-row input,
body[data-theme="light"] .focus-priority-input,
body[data-theme="light"] .focus-btn,
body[data-theme="light"] .focus-metric,
body[data-theme="light"] .news-card,
body[data-theme="light"] .schedule-card,
body[data-theme="light"] .study-card,
body[data-theme="light"] .model-badge-card,
body[data-theme="light"] .nav-container,
body[data-theme="light"] .dashboard-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 252, 251, 0.95) 100%);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-light);
  border-radius: 16px;
}

body[data-theme="light"] .card:hover,
body[data-theme="light"] .agent-card:hover,
body[data-theme="light"] .agent-card-modern:hover,
body[data-theme="light"] .status-card:hover,
body[data-theme="light"] .workout-card:hover,
body[data-theme="light"] .quick-action-btn:hover,
body[data-theme="light"] .calendar-day:hover,
body[data-theme="light"] .news-card:hover,
body[data-theme="light"] .study-card:hover {
  border-color: rgba(180, 53, 61, 0.25);
  box-shadow: 0 16px 36px rgba(15, 24, 22, 0.12);
}

body[data-theme="light"] .nav-container {
  border-radius: 0 24px 24px 0;
  box-shadow: 4px 0 24px rgba(15, 24, 22, 0.06);
}

/* ---- Navigation ---- */
body[data-theme="dark"] .nav-container .nav-tab {
  color: var(--text-dark-muted);
  background: transparent;
  border: none;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

body[data-theme="dark"] .nav-container .nav-tab::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--space-red);
  border-radius: 0 4px 4px 0;
  transition: height 0.3s ease;
}

body[data-theme="dark"] .nav-container .nav-tab:hover,
body[data-theme="dark"] .nav-container .nav-tab:focus-visible {
  color: var(--text-dark-soft);
  background: rgba(180, 53, 61, 0.08);
}

body[data-theme="dark"] .nav-container .nav-tab.active {
  color: var(--text-dark);
  background: linear-gradient(90deg, rgba(180, 53, 61, 0.15) 0%, rgba(52, 97, 92, 0.08) 100%);
}

body[data-theme="dark"] .nav-container .nav-tab.active::before {
  height: 60%;
}

body[data-theme="light"] .nav-container .nav-tab {
  color: var(--text-light-muted);
  background: transparent;
  border: none;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

body[data-theme="light"] .nav-container .nav-tab::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--space-red);
  border-radius: 0 4px 4px 0;
  transition: height 0.3s ease;
}

body[data-theme="light"] .nav-container .nav-tab:hover,
body[data-theme="light"] .nav-container .nav-tab:focus-visible {
  color: var(--text-light-soft);
  background: rgba(180, 53, 61, 0.06);
}

body[data-theme="light"] .nav-container .nav-tab.active {
  color: var(--text-light);
  background: linear-gradient(90deg, rgba(180, 53, 61, 0.1) 0%, rgba(52, 97, 92, 0.05) 100%);
}

body[data-theme="light"] .nav-container .nav-tab.active::before {
  height: 60%;
}

/* ---- Logo in Sidebar ---- */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 8px;
}

.sidebar-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(180, 53, 61, 0.3));
}

.sidebar-logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  line-height: 1.3;
}

body[data-theme="light"] .sidebar-logo-text {
  color: var(--text-light);
}

.sidebar-logo-sub {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--space-red);
}

.collapsed .sidebar-logo-text,
.collapsed .sidebar-logo-sub {
  display: none;
}

.collapsed .sidebar-logo img {
  width: 36px;
  height: 36px;
}

/* ---- Agent Cards ---- */
body[data-theme="dark"] .agent-name {
  color: var(--text-dark);
  font-weight: 700;
}

body[data-theme="dark"] .agent-role {
  color: var(--space-red-bright);
  font-weight: 600;
  letter-spacing: 0.02em;
}

body[data-theme="dark"] .status-text {
  color: var(--text-dark-soft);
  font-weight: 500;
}

body[data-theme="dark"] .status-text.status-idle {
  color: var(--text-dark-muted);
}

body[data-theme="dark"] .click-hint {
  color: var(--text-dark-muted);
}

body[data-theme="dark"] .task-container {
  background: rgba(180, 53, 61, 0.06);
  border: 1px solid rgba(180, 53, 61, 0.1);
}

body[data-theme="dark"] .task-label {
  color: var(--space-red-bright);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

body[data-theme="dark"] .task-text {
  color: var(--text-dark-soft);
}

body[data-theme="dark"] .task-text.idle {
  color: var(--text-dark-muted);
}

body[data-theme="dark"] .level-label {
  color: var(--text-dark-muted);
  background: rgba(52, 97, 92, 0.15);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

body[data-theme="light"] .agent-name {
  color: var(--text-light);
  font-weight: 700;
}

body[data-theme="light"] .agent-role {
  color: var(--space-red);
  font-weight: 600;
}

body[data-theme="light"] .status-text {
  color: var(--text-light-soft);
}

body[data-theme="light"] .status-text.status-idle {
  color: var(--text-light-muted);
}

body[data-theme="light"] .task-container {
  background: rgba(180, 53, 61, 0.04);
  border: 1px solid rgba(180, 53, 61, 0.08);
}

body[data-theme="light"] .task-label {
  color: var(--space-red);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

body[data-theme="light"] .task-text {
  color: var(--text-light-soft);
}

/* ---- Buttons ---- */
button, .btn, .action-btn, .quick-action-btn {
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}

body[data-theme="dark"] .quick-action-btn {
  background: linear-gradient(180deg, rgba(180, 53, 61, 0.12) 0%, rgba(180, 53, 61, 0.06) 100%);
  border: 1px solid rgba(180, 53, 61, 0.2);
  color: var(--space-red-bright);
}

body[data-theme="dark"] .quick-action-btn:hover {
  background: linear-gradient(180deg, rgba(180, 53, 61, 0.2) 0%, rgba(180, 53, 61, 0.1) 100%);
  border-color: rgba(180, 53, 61, 0.35);
  box-shadow: 0 4px 16px rgba(180, 53, 61, 0.15);
}

body[data-theme="light"] .quick-action-btn {
  background: linear-gradient(180deg, rgba(180, 53, 61, 0.08) 0%, rgba(180, 53, 61, 0.04) 100%);
  border: 1px solid rgba(180, 53, 61, 0.15);
  color: var(--space-red);
}

body[data-theme="light"] .quick-action-btn:hover {
  background: linear-gradient(180deg, rgba(180, 53, 61, 0.12) 0%, rgba(180, 53, 61, 0.06) 100%);
  border-color: rgba(180, 53, 61, 0.25);
}

/* ---- Settings Dropdown ---- */
body[data-theme="dark"] .settings-dropdown {
  background: var(--surface-dark-strong);
  border: 1px solid var(--border-dark-strong);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
}

body[data-theme="dark"] .settings-dropdown button {
  color: var(--text-dark-soft);
}

body[data-theme="dark"] .settings-dropdown button:hover {
  background: rgba(180, 53, 61, 0.08);
  color: var(--text-dark);
}

body[data-theme="light"] .settings-dropdown {
  background: var(--surface-light-strong);
  border: 1px solid var(--border-light-strong);
  box-shadow: var(--shadow-light);
  border-radius: 16px;
}

/* ---- Footer ---- */
body[data-theme="dark"] footer {
  color: var(--text-dark-muted);
}

body[data-theme="dark"] footer a {
  color: var(--space-teal-light);
}

body[data-theme="dark"] footer a:hover {
  color: var(--space-red-bright);
}

body[data-theme="light"] footer {
  color: var(--text-light-muted);
}

body[data-theme="light"] footer a {
  color: var(--space-teal);
}

body[data-theme="light"] footer a:hover {
  color: var(--space-red);
}

/* ---- Modals ---- */
body[data-theme="dark"] .modal-overlay {
  background: rgba(6, 12, 11, 0.7);
  backdrop-filter: blur(12px);
}

body[data-theme="dark"] .modal-content {
  background: linear-gradient(180deg, var(--surface-dark-strong) 0%, var(--surface-dark) 100%);
  border: 1px solid var(--border-dark-strong);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
  border-radius: 20px;
}

body[data-theme="light"] .modal-overlay {
  background: rgba(15, 24, 22, 0.4);
  backdrop-filter: blur(12px);
}

body[data-theme="light"] .modal-content {
  background: var(--surface-light-strong);
  border: 1px solid var(--border-light-strong);
  box-shadow: var(--shadow-light);
  border-radius: 20px;
}

/* ---- Inputs ---- */
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  background: rgba(15, 24, 22, 0.8);
  border: 1px solid var(--border-dark);
  color: var(--text-dark);
  border-radius: 12px;
}

body[data-theme="dark"] input:focus,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] textarea:focus {
  border-color: var(--space-red);
  box-shadow: 0 0 0 3px rgba(180, 53, 61, 0.15);
  outline: none;
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-light);
  color: var(--text-light);
  border-radius: 12px;
}

body[data-theme="light"] input:focus,
body[data-theme="light"] select:focus,
body[data-theme="light"] textarea:focus {
  border-color: var(--space-red);
  box-shadow: 0 0 0 3px rgba(180, 53, 61, 0.1);
  outline: none;
}

/* ---- Scrollbar ---- */
body[data-theme="dark"] ::-webkit-scrollbar {
  width: 6px;
}

body[data-theme="dark"] ::-webkit-scrollbar-track {
  background: rgba(15, 24, 22, 0.5);
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(180, 53, 61, 0.3);
  border-radius: 3px;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 53, 61, 0.5);
}

/* ---- Animations ---- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(180, 53, 61, 0.2); }
  50% { box-shadow: 0 0 30px rgba(180, 53, 61, 0.3); }
}

@keyframes orbit {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---- Special Effects ---- */
.glass-effect {
  background: rgba(15, 24, 22, 0.6);
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glow-red {
  box-shadow: 0 0 20px rgba(180, 53, 61, 0.3);
}

.glow-teal {
  box-shadow: 0 0 20px rgba(52, 97, 92, 0.3);
}

/* ---- Health/Status Indicators ---- */
body[data-theme="dark"] .health-good {
  color: #4ade80;
}

body[data-theme="dark"] .health-warn {
  color: #fbbf24;
}

body[data-theme="dark"] .health-error {
  color: var(--space-red-bright);
}

/* ---- Quick Jump Buttons ---- */
body[data-theme="dark"] .quick-jump-btn {
  border: 1px solid rgba(180, 53, 61, 0.2);
  background: linear-gradient(180deg, rgba(180, 53, 61, 0.1) 0%, rgba(180, 53, 61, 0.05) 100%);
  color: var(--space-red-bright);
  border-radius: 999px;
}

body[data-theme="dark"] .quick-jump-btn:hover {
  border-color: rgba(180, 53, 61, 0.4);
  background: rgba(180, 53, 61, 0.15);
  box-shadow: 0 4px 16px rgba(180, 53, 61, 0.15);
}

body[data-theme="light"] .quick-jump-btn {
  border: 1px solid rgba(180, 53, 61, 0.15);
  background: linear-gradient(180deg, rgba(180, 53, 61, 0.06) 0%, rgba(180, 53, 61, 0.03) 100%);
  color: var(--space-red);
  border-radius: 999px;
}

body[data-theme="light"] .quick-jump-btn:hover {
  border-color: rgba(180, 53, 61, 0.3);
  background: rgba(180, 53, 61, 0.1);
}

/* ---- Back to Top ---- */
body[data-theme="dark"] .back-to-top-btn {
  border: 1px solid rgba(180, 53, 61, 0.25);
  background: linear-gradient(180deg, rgba(180, 53, 61, 0.15) 0%, rgba(180, 53, 61, 0.08) 100%);
  color: var(--space-red-bright);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .back-to-top-btn:hover {
  border-color: rgba(180, 53, 61, 0.4);
  background: rgba(180, 53, 61, 0.2);
  box-shadow: 0 8px 24px rgba(180, 53, 61, 0.2);
}

body[data-theme="light"] .back-to-top-btn {
  border: 1px solid rgba(180, 53, 61, 0.15);
  background: linear-gradient(180deg, rgba(180, 53, 61, 0.1) 0%, rgba(180, 53, 61, 0.05) 100%);
  color: var(--space-red);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(15, 24, 22, 0.08);
}

/* ---- Life Cards ---- */
body[data-theme="dark"] .life-card {
  background: linear-gradient(180deg, rgba(15, 24, 22, 0.9) 0%, rgba(10, 18, 16, 0.95) 100%);
  border: 1px solid rgba(52, 97, 92, 0.15);
}

body[data-theme="dark"] .life-card h3 {
  color: var(--text-dark);
}

body[data-theme="dark"] .life-card p,
body[data-theme="dark"] .life-card small {
  color: var(--text-dark-soft);
}

body[data-theme="dark"] .life-list {
  color: var(--text-dark-soft);
}

body[data-theme="light"] .life-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 252, 251, 0.95) 100%);
  border: 1px solid var(--border-light);
}

/* ---- Calendar ---- */
body[data-theme="dark"] .calendar-day.today {
  border-color: var(--space-red);
  box-shadow: 0 0 20px rgba(180, 53, 61, 0.15);
}

body[data-theme="dark"] .calendar-day.current-workout {
  border-color: var(--space-teal);
  box-shadow: 0 0 20px rgba(52, 97, 92, 0.15);
}

body[data-theme="light"] .calendar-day.today {
  border-color: var(--space-red);
}

body[data-theme="light"] .calendar-day.current-workout {
  border-color: var(--space-teal);
}

/* ---- Focus Cockpit ---- */
body[data-theme="dark"] .focus-cockpit-card {
  background: linear-gradient(180deg, rgba(15, 24, 22, 0.95) 0%, rgba(10, 18, 16, 0.98) 100%);
  border: 1px solid rgba(180, 53, 61, 0.15);
}

body[data-theme="dark"] .focus-home-card {
  border-color: rgba(180, 53, 61, 0.2);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .focus-btn {
  background: linear-gradient(180deg, rgba(180, 53, 61, 0.15) 0%, rgba(180, 53, 61, 0.08) 100%);
  border: 1px solid rgba(180, 53, 61, 0.2);
  color: var(--space-red-bright);
}

body[data-theme="dark"] .focus-btn:hover {
  background: rgba(180, 53, 61, 0.2);
  border-color: rgba(180, 53, 61, 0.35);
  box-shadow: 0 4px 16px rgba(180, 53, 61, 0.15);
}

body[data-theme="dark"] .focus-priority-input:focus {
  border-color: var(--space-red);
  box-shadow: 0 0 0 3px rgba(180, 53, 61, 0.15);
}

body[data-theme="light"] .focus-cockpit-card {
  background: var(--surface-light-strong);
  border: 1px solid var(--border-light);
}

body[data-theme="light"] .focus-home-card {
  border-color: rgba(180, 53, 61, 0.15);
  box-shadow: var(--shadow-light);
}

/* ---- Mobile Menu ---- */
body[data-theme="dark"] .mobile-menu-overlay {
  background: rgba(6, 12, 11, 0.85);
  backdrop-filter: blur(16px);
}

body[data-theme="dark"] .mobile-nav-sheet {
  background: linear-gradient(180deg, var(--surface-dark-strong) 0%, var(--bg-dark-alt) 100%);
  border-top: 1px solid var(--border-dark-strong);
  border-radius: 24px 24px 0 0;
}

body[data-theme="light"] .mobile-menu-overlay {
  background: rgba(15, 24, 22, 0.4);
  backdrop-filter: blur(16px);
}

body[data-theme="light"] .mobile-nav-sheet {
  background: var(--surface-light-strong);
  border-top: 1px solid var(--border-light);
  border-radius: 24px 24px 0 0;
}

/* ---- Agent Modal ---- */
body[data-theme="dark"] .agent-modal-panel {
  background: linear-gradient(180deg, var(--surface-dark-strong) 0%, var(--bg-dark) 100%);
  border-left: 1px solid var(--border-dark-strong);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}

body[data-theme="dark"] .agent-modal-header {
  border-bottom: 1px solid var(--border-dark);
}

body[data-theme="dark"] .agent-modal-close {
  color: var(--text-dark-muted);
}

body[data-theme="dark"] .agent-modal-close:hover {
  color: var(--space-red-bright);
  background: rgba(180, 53, 61, 0.1);
}

body[data-theme="light"] .agent-modal-panel {
  background: var(--surface-light-strong);
  border-left: 1px solid var(--border-light);
  box-shadow: -20px 0 60px rgba(15, 24, 22, 0.1);
}

/* ---- Staging Badge ---- */
.staging-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(90deg, rgba(180, 53, 61, 0.15), rgba(52, 97, 92, 0.15));
  border: 1px solid rgba(180, 53, 61, 0.2);
  color: var(--space-red-bright);
}

.staging-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--space-red);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  body {
    --sidebar-width: 0px;
    padding-left: 1rem;
  }
  
  h1, .header-title {
    font-size: 1.5rem;
  }
}

/* ---- Loading Animation ---- */
.loading-ring {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(180, 53, 61, 0.2);
  border-top-color: var(--space-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---- Orbit Decoration ---- */
.orbit-ring {
  position: absolute;
  border: 1px solid rgba(180, 53, 61, 0.1);
  border-radius: 50%;
  animation: orbit 20s linear infinite;
}

.orbit-ring::before {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--space-red);
  border-radius: 50%;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(180, 53, 61, 0.5);
}

/* ---- Status Dots ---- */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.active {
  background: var(--space-red);
  box-shadow: 0 0 8px rgba(180, 53, 61, 0.5);
}

.status-dot.idle {
  background: var(--space-teal);
  box-shadow: 0 0 8px rgba(52, 97, 92, 0.4);
}

.status-dot.offline {
  background: var(--text-dark-muted);
}
