/* ==========================================================================
   DailyPilot — Pure White Glowing Color Theme
   Ultra-modern, luminous, crisp aesthetic with ambient lighting
   ========================================================================== */

:root {
  --bg-pure:        #ffffff;
  --bg-surface:     #ffffff;
  --bg-subtle:      #f8fafc;
  --bg-hover:       #f1f5f9;
  --border-light:   #e2e8f0;
  --border-focus:   #cbd5e1;

  /* Glowing Accent Colors */
  --glow-indigo:    #6366f1;
  --glow-indigo-bg: #eef2ff;
  --glow-cyan:      #06b6d4;
  --glow-cyan-bg:   #ecfeff;
  --glow-emerald:   #10b981;
  --glow-emerald-bg:#ecfdf5;
  --glow-amber:     #f59e0b;
  --glow-amber-bg:  #fffbeb;
  --glow-rose:      #f43f5e;
  --glow-rose-bg:   #fff1f2;
  --glow-violet:    #8b5cf6;

  /* Typography */
  --text-main:      #0f172a;
  --text-muted:     #475569;
  --text-dim:       #64748b;
  --text-subtle:    #94a3b8;

  /* Geometry & Shadows */
  --radius-lg:      16px;
  --radius-md:      10px;
  --radius-sm:      6px;
  --radius-full:    9999px;
  
  --shadow-card:    0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --shadow-hover:   0 16px 36px -6px rgba(0, 0, 0, 0.07), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
  --font-sans:      'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-pure);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Ambient Glowing Aurora Background ── */
.aurora-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, rgba(238, 242, 255, 0) 70%);
  top: -120px;
  left: -100px;
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.22) 0%, rgba(236, 254, 255, 0) 70%);
  top: 15%;
  right: -80px;
  animation-duration: 22s;
}

/* ── Strict Authentication Gate ── */
.auth-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-gate-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Instant session suppression on refresh */
html.session-authenticated #authGateOverlay {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Auth Error Banner */
.auth-error-banner {
  padding: 10px 14px;
  background: var(--glow-rose-bg);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-sm);
  color: #be123c;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: authShake 0.3s ease-in-out;
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Google Sign-in Button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 18px;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-google:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(66, 133, 244, 0.15);
  transform: translateY(-1px);
}

.google-icon {
  flex-shrink: 0;
}

/* Unlimited Plan Tag */
.plan-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--glow-indigo-bg);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-full);
  color: var(--glow-indigo);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 10px;
}

.unlimited-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: linear-gradient(135deg, #eef2ff, #f0fdf4);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: #4338ca;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.auth-gate-card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 24px 60px -12px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.1);
  position: relative;
  animation: authCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardIn {
  from { transform: translateY(16px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.auth-gate-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-gate-brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.25);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.auth-gate-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 6px;
}

.auth-gate-subtitle {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.auth-gate-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.auth-gate-footer-note {
  margin-top: 20px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-subtle);
  line-height: 1.4;
}

.auth-gate-footer-note code {
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--glow-indigo);
  font-family: var(--font-mono);
}


/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.02);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

.brand-icon {
  font-size: 1.4rem;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.glow-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--glow-indigo);
  box-shadow: 0 0 10px var(--glow-indigo);
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* Agent Heartbeat Badge */
.agent-heartbeat-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 16px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-full);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.pulse-ring {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--glow-emerald);
  box-shadow: 0 0 12px var(--glow-emerald);
  transition: all 0.3s ease;
}

.pulse-ring.running {
  background: var(--glow-amber);
  box-shadow: 0 0 14px var(--glow-amber);
  animation: pulseLight 1s infinite;
}

@keyframes pulseLight {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.heartbeat-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.firebase-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.firebase-user-pill:hover {
  border-color: #f97316;
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.25);
}

.cloud-sync-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glow-emerald);
  box-shadow: 0 0 8px var(--glow-emerald);
}

/* ── Buttons with Glowing Effects ── */
.btn {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-glowing-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 0 22px rgba(99, 102, 241, 0.38), 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-glowing-primary:hover {
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.55), 0 6px 16px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.btn-glowing-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-primary-glow {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.25);
}

.btn-primary-glow:hover {
  background: #4f46e5;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.btn-glowing-mint {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
}

.btn-glowing-mint:hover {
  box-shadow: 0 0 26px rgba(16, 185, 129, 0.5);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.btn-outline:hover {
  color: var(--text-main);
  border-color: var(--glow-indigo);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.15);
}

.btn-danger-outline {
  background: #ffffff;
  color: var(--glow-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger-outline:hover {
  background: var(--glow-rose-bg);
  border-color: var(--glow-rose);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.2);
}

.btn-xs {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

/* ── Main Layout ── */
.main-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 60px;
  position: relative;
  z-index: 1;
}

/* Active Running Banner */
.active-run-banner {
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.18);
  font-size: 0.85rem;
  color: #4338ca;
  animation: glowBanner 2s ease-in-out infinite alternate;
}

@keyframes glowBanner {
  0% { box-shadow: 0 0 16px rgba(99, 102, 241, 0.15); }
  100% { box-shadow: 0 0 32px rgba(99, 102, 241, 0.3); }
}

.runner-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Hero KPI Metrics ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  transition: all 0.25s ease;
}

.card-glow-indigo:hover {
  box-shadow: 0 12px 30px -4px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.25);
  transform: translateY(-2px);
}
.card-glow-indigo:hover::before { background: var(--glow-indigo); }

.card-glow-amber:hover {
  box-shadow: 0 12px 30px -4px rgba(245, 158, 11, 0.15), 0 0 0 1px rgba(245, 158, 11, 0.25);
  transform: translateY(-2px);
}
.card-glow-amber:hover::before { background: var(--glow-amber); }

.card-glow-rose:hover {
  box-shadow: 0 12px 30px -4px rgba(244, 63, 94, 0.15), 0 0 0 1px rgba(244, 63, 94, 0.25);
  transform: translateY(-2px);
}
.card-glow-rose:hover::before { background: var(--glow-rose); }

.card-glow-emerald:hover {
  box-shadow: 0 12px 30px -4px rgba(16, 185, 129, 0.15), 0 0 0 1px rgba(16, 185, 129, 0.25);
  transform: translateY(-2px);
}
.card-glow-emerald:hover::before { background: var(--glow-emerald); }

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.kpi-icon {
  font-size: 1.1rem;
}

.kpi-value {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 6px;
}

.kpi-footer {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-subtle);
}

.text-rose { color: var(--glow-rose) !important; }
.text-emerald { color: var(--glow-emerald) !important; }

/* ── Workspace 2-Column Grid ── */
.workspace-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.layout-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Luminous Pure White Cards ── */
.luminous-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.luminous-card:hover {
  box-shadow: var(--shadow-hover);
}

.card-top-bar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-heading-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-heading {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.card-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clean-select {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
}

.clean-select:focus {
  border-color: var(--glow-indigo);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* Scrollable Container */
.scrollable-pane {
  max-height: 440px;
  overflow-y: auto;
  padding: 8px 12px;
}

.scrollable-pane::-webkit-scrollbar {
  width: 5px;
}
.scrollable-pane::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* ── Luminous Badges with Glow ── */
.luminous-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-indigo {
  background: var(--glow-indigo-bg);
  color: var(--glow-indigo);
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

.badge-rose {
  background: var(--glow-rose-bg);
  color: var(--glow-rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.2);
}

.badge-amber {
  background: var(--glow-amber-bg);
  color: var(--glow-amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.badge-emerald {
  background: var(--glow-emerald-bg);
  color: var(--glow-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.badge-cyan {
  background: var(--glow-cyan-bg);
  color: var(--glow-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

/* ── Item Rows ── */
.interactive-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 6px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: #ffffff;
  transition: all 0.2s ease;
}

.interactive-item:hover {
  background: var(--bg-subtle);
  border-color: var(--border-light);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.item-icon-bubble {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.item-main {
  flex: 1;
  min-width: 0;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-sub-meta {
  font-size: 0.74rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-actions-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.action-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: all 0.15s ease;
}

.action-icon-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.action-icon-btn.delete:hover {
  background: var(--glow-rose-bg);
  color: var(--glow-rose);
}

/* ── Briefing Markdown Rendering ── */
.briefing-render-box {
  padding: 18px 22px;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.briefing-render-box h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.briefing-render-box h2 {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 18px 0 8px;
}

.briefing-render-box table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  background: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.briefing-render-box th,
.briefing-render-box td {
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  text-align: left;
}

.briefing-render-box th {
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-main);
}

.briefing-render-box hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 14px 0;
}

.briefing-render-box ul {
  padding-left: 18px;
  margin: 8px 0;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.empty-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

/* ── Quick Management Bar ── */
.quick-management-bar {
  margin-top: 24px;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Modals ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px -8px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 480px;
  padding: 24px;
  position: relative;
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
}

.modal-close-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.form-row {
  margin-bottom: 14px;
}

.form-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--glow-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Auth Modal specifics */
.user-card-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
}

.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
}

.user-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.user-card-uid {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.cloud-sync-info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--glow-emerald-bg);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: #065f46;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 18px 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-subtle);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.auth-divider span {
  padding: 0 10px;
}

/* Schedule Modal specifics */
.status-box {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.stat-meta {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stat-status-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--glow-indigo);
  margin-top: 2px;
}

.schedule-toggle-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.schedule-toggle-row .btn {
  flex: 1;
}

/* Utility text */
.text-dim { color: var(--text-dim); }
.text-xs { font-size: 0.75rem; }
.mb-3 { margin-bottom: 12px; }
.mt-3 { margin-top: 12px; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .header-container {
    padding: 0 16px;
  }
  .main-wrapper {
    padding: 16px;
  }
}

@media (max-width: 500px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}
