/* ==========================================================================
   NMW ONE DESIGN SYSTEM — CORE DESIGN TOKENS
   Inspired by Apple, Stripe, Linear, Notion, and Google Workspace
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
  /* Color Palette — Light Mode */
  --bg-app: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #F1F5F9;
  --bg-surface-active: #E2E8F0;
  --bg-glass: rgba(255, 255, 255, 0.78);
  --bg-glass-heavy: rgba(255, 255, 255, 0.92);

  /* Primary Brand Tokens */
  --primary-50: #F8FAFC;
  --primary-100: #F1F5F9;
  --primary-500: #334155;
  --primary-800: #1E293B;
  --primary-900: #0F172A;
  --primary-gradient: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);

  /* Accent Tokens */
  --accent-color: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: rgba(37, 99, 235, 0.08);
  --accent-glow: rgba(37, 99, 235, 0.25);

  /* Functional Status Colors */
  --color-success: #10B981;
  --color-success-bg: rgba(16, 185, 129, 0.1);
  --color-warning: #F59E0B;
  --color-warning-bg: rgba(245, 158, 11, 0.1);
  --color-danger: #EF4444;
  --color-danger-bg: rgba(239, 68, 68, 0.1);
  --color-info: #0EA5E9;
  --color-info-bg: rgba(14, 165, 233, 0.1);

  /* Text & Border Colors */
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --text-inverse: #FFFFFF;

  --border-subtle: #F1F5F9;
  --border-neutral: #E2E8F0;
  --border-strong: #CBD5E1;
  --border-focus: #2563EB;

  /* Typography */
  --font-family-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Outfit', 'Inter', sans-serif;

  --fs-micro: 0.75rem;    /* 12px */
  --fs-label: 0.8125rem;  /* 13px */
  --fs-body: 0.9375rem;   /* 15px */
  --fs-h3: 1.125rem;      /* 18px */
  --fs-h2: 1.375rem;      /* 22px */
  --fs-h1: 1.75rem;       /* 28px */
  --fs-display: 2.25rem;  /* 36px */

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.06);

  /* Animation Timings */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;

  /* Touch & Shell Dimensions */
  --top-nav-height: 64px;
  --bottom-nav-height: 64px;
  --sidebar-width: 260px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-app: #0B0F19;
  --bg-surface: #111827;
  --bg-surface-hover: #1F2937;
  --bg-surface-active: #374151;
  --bg-glass: rgba(17, 24, 39, 0.78);
  --bg-glass-heavy: rgba(17, 24, 39, 0.92);

  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --text-subtle: #6B7280;

  --border-subtle: #1F2937;
  --border-neutral: #374151;
  --border-strong: #4B5563;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* CSS Reset & Global Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-family-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
}

/* Material Symbols Icon Sizing Helper */
.material-symbols-outlined {
  font-size: 20px;
  vertical-align: middle;
  user-select: none;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-color); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
