/* =============================================================================
   base.css — Design tokens, reset, theme variables
   Edit the CSS variables below to rebrand the app.
   ============================================================================= */

:root {
  /* ---- Surfaces ---- */
  --surface-page:    #f8fafc;
  --surface-card:    #ffffff;
  --surface-subtle:  #f1f5f9;
  --surface-hover:   #e2e8f0;
  --surface-overlay: rgba(15, 23, 42, 0.5);

  /* ---- Text ---- */
  --text-primary:    #0f172a;
  --text-secondary:  #475569;
  --text-muted:      #94a3b8;
  --text-inverse:    #ffffff;

  /* ---- Borders ---- */
  --border-subtle:   #e2e8f0;
  --border-default:  #cbd5e1;
  --border-strong:   #94a3b8;

  /* ---- Accent (change these 4 to rebrand) ---- */
  --accent:          #2563eb;
  --accent-hover:    #1d4ed8;
  --accent-subtle:   #dbeafe;
  --accent-text:     #ffffff;

  /* ---- Semantic colors ---- */
  --success:         #16a34a;
  --success-subtle:  #dcfce7;
  --warning:         #d97706;
  --warning-subtle:  #fef3c7;
  --danger:          #dc2626;
  --danger-subtle:   #fee2e2;
  --today-line:      #ef4444;

  /* ---- Gantt phase palette (auto-assigned; customize per-phase later) ---- */
  --phase-1: #2563eb;  /* blue */
  --phase-2: #0891b2;  /* teal */
  --phase-3: #d97706;  /* amber */
  --phase-4: #db2777;  /* rose */
  --phase-5: #7c3aed;  /* violet */
  --phase-6: #059669;  /* emerald */
  --phase-7: #64748b;  /* slate (fallback) */

  /* ---- Shape & motion ---- */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow:    0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --transition: 150ms ease;

  /* ---- Typography ---- */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Roboto Mono', monospace;

  /* ---- Gantt-specific sizing ---- */
  --gantt-bar-row-h: 28px;
  --gantt-pad-row-h: 6px;
  --gantt-col-w:     36px;  /* width of one week/month cell */
  --gantt-table-w:   520px;
}

[data-theme="dark"] {
  --surface-page:    #0f172a;
  --surface-card:    #1e293b;
  --surface-subtle:  #334155;
  --surface-hover:   #475569;
  --surface-overlay: rgba(0, 0, 0, 0.7);

  --text-primary:    #f1f5f9;
  --text-secondary:  #cbd5e1;
  --text-muted:      #64748b;
  --text-inverse:    #0f172a;

  --border-subtle:   #334155;
  --border-default:  #475569;
  --border-strong:   #64748b;

  --accent:          #3b82f6;
  --accent-hover:    #60a5fa;
  --accent-subtle:   #1e3a8a;

  --success:         #22c55e;
  --success-subtle:  #14532d;
  --warning:         #f59e0b;
  --warning-subtle:  #78350f;
  --danger:          #ef4444;
  --danger-subtle:   #7f1d1d;
  --today-line:      #f87171;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow:    0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ============================================================================
   Reset & base
   ============================================================================ */

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em 0;
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em 0; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Utility */
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
