/* shared.css: Core styles shared between public marketing pages and the protected dashboard */
:root {
  /* ── Dark theme (default) ────────────────────────────────────────────── */
  --color-bg-primary: #0f1419;
  --color-bg-secondary: #1a1f2e;
  --color-bg-tertiary: #242938;
  --color-border: #2d3748;
  --color-border-light: #3d4556;
  --color-text-primary: #ffffff;
  --color-text-secondary: #a0aec0;
  --color-text-muted: #718096;
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-success: #10b981;
  --color-success-bg: rgba(52,211,153,0.14);
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-danger-bg: rgba(248,113,113,0.14);

  /* Adaptive text opacity scale (use instead of rgba(255,255,255,N)) */
  --color-text-hi:   rgba(255,255,255,0.92);
  --color-text-med:  rgba(255,255,255,0.65);
  --color-text-lo:   rgba(255,255,255,0.38);
  --color-text-xlo:  rgba(255,255,255,0.18);

  /* Adaptive surface tints (use instead of rgba(255,255,255,0.0N) backgrounds) */
  --color-surface-hover:  rgba(255,255,255,0.06);
  --color-surface-tint:   rgba(255,255,255,0.03);
  --color-surface-subtle: rgba(255,255,255,0.08);

  /* Modals / overlays */
  --color-modal-bg:      #1e2230;
  --color-modal-border:  rgba(255,255,255,0.12);
  --color-backdrop:      rgba(0,0,0,0.6);

  /* component-level vars */
  --color-row-active-bg:    rgba(96,165,250,0.12);
  --color-row-active-border: rgba(96,165,250,0.45);
  --color-row-hover-bg:     rgba(96,165,250,0.06);
  --color-logo-text: #ffffff;
  --color-btn-ghost-bg: transparent;
  --color-btn-ghost-bg-hover: #303745;
  --color-btn-ghost-border: #3d4556;
  --color-btn-ghost-border-hover: #4a5568;
  --color-btn-ghost-text: #a0aec0;
  --color-btn-ghost-text-hover: #ffffff;
  --color-btn-action-bg: #303745;
  --color-btn-action-border: #232931;
  --color-btn-action-bg-hover: #1f2430;
  --color-input-bg: #242938;
  --color-input-border: #3d4556;
  --color-input-text: #ffffff;
  --color-card-bg: #1a1f2e;
  --color-card-border: #2d3748;
  --color-overlay-bg: rgba(0, 0, 0, 0.7);

  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Light theme ─────────────────────────────────────────────────────── */
:root[data-theme="light"] {
  /* Page canvas is a soft grey so white cards (--color-surface-tint / --color-card-bg below) stand out —
     mirrors the dark theme, where cards sit lighter than the page background. */
  --color-bg-primary: #f1f3f4;
  --color-bg-secondary: #f8f9fa;
  --color-bg-tertiary: #e8eaed;
  --color-border: #dadce0;
  --color-border-light: #e8eaed;
  --color-text-primary: #202124;
  --color-text-secondary: #5f6368;
  --color-text-muted: #9aa0a6;
  --color-accent: #1a73e8;
  --color-accent-hover: #1557b0;
  --color-success: #137333;
  --color-success-bg: rgba(19,115,51,0.1);
  --color-warning: #b06000;
  --color-danger: #c5221f;
  --color-danger-bg: rgba(197,34,31,0.1);

  /* Solid text scale — no opacity, high contrast on white */
  --color-text-hi:   #202124;
  --color-text-med:  #5f6368;
  --color-text-lo:   #9aa0a6;
  --color-text-xlo:  #bdc1c6;

  /* Adaptive surface tints. surface-tint is the card/panel surface → white so cards pop on the grey page;
     hover/subtle stay grey so fills remain visible on top of white cards. */
  --color-surface-hover:  #eceef1;
  --color-surface-tint:   #ffffff;
  --color-surface-subtle: #e8eaed;

  /* Row active/selected states (replaces blue rgba on white bg) */
  --color-row-active-bg:    #e8f0fe;
  --color-row-active-border: #4285f4;
  --color-row-hover-bg:     #f1f3f4;

  /* Modals / overlays */
  --color-modal-bg:     #ffffff;
  --color-modal-border: #dadce0;
  --color-backdrop:     rgba(0,0,0,0.45);

  --color-logo-text: #202124;
  --color-btn-ghost-bg: transparent;
  --color-btn-ghost-bg-hover: #f1f3f4;
  --color-btn-ghost-border: #dadce0;
  --color-btn-ghost-border-hover: #9aa0a6;
  --color-btn-ghost-text: #5f6368;
  --color-btn-ghost-text-hover: #202124;
  --color-btn-action-bg: #f1f3f4;
  --color-btn-action-border: #dadce0;
  --color-btn-action-bg-hover: #e8eaed;
  --color-input-bg: #ffffff;
  --color-input-border: #dadce0;
  --color-input-text: #202124;
  --color-card-bg: #ffffff;
  --color-card-border: #e8eaed;
  --color-overlay-bg: rgba(0, 0, 0, 0.4);
}

html, body {
  font-family: inherit;
  line-height: inherit;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
}

#app {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent-hover);
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}