/* SiteLedgers - Main Stylesheet
   Design tokens, reset, and base typography.
   Brand: Charcoal + Lime Green, Plus Jakarta Sans / Space Mono */

/* ─── CSS Custom Properties (Design Tokens) ────────────── */

:root {
  /* Brand colours */
  --color-primary: #B7F34D;
  --color-primary-dim: #95c93e;
  --color-primary-dark: #7da832;
  --color-charcoal: #121826;
  --color-charcoal-light: #1a2235;
  --color-graphite: #2B3340;

  /* Neutrals */
  --color-white: #ffffff;
  --color-off-white: #F6F7FB;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6B7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;

  /* Status colours (matching prototype) */
  --color-reported: #EF4444;
  --color-assigned: #F59E0B;
  --color-in-progress: #3B82F6;
  --color-completed: #22C55E;
  --color-verified: #B7F34D;
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-info: #3B82F6;

  /* Priority colours */
  --color-critical: #EF4444;
  --color-high: #EF4444;
  --color-medium: #F59E0B;
  --color-low: #6B7280;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --border-color: #E2E8F0;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(18, 24, 38, 0.05);
  --shadow-md: 0 4px 12px rgba(18, 24, 38, 0.08);
  --shadow-lg: 0 12px 40px rgba(18, 24, 38, 0.12);

  /* Layout */
  --navbar-height: 60px;
  --content-max-width: 1200px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}

/* ─── Reset ────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-normal);
  color: var(--color-graphite);
  background-color: var(--color-off-white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary-dim);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
}

a:hover {
  color: var(--color-primary);
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ─── Base Typography ──────────────────────────────────── */

h1, h2, h3, h4 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-charcoal);
  letter-spacing: -0.5px;
}

h1 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-extrabold); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

small { font-size: var(--font-size-sm); }

code, .mono {
  font-family: var(--font-mono);
}

/* ─── App Loader ───────────────────────────────────────── */

.app-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-charcoal);
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--font-size-lg);
}

.app-loader::before {
  content: 'SiteLedgers';
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
