/* ==========================================================================
   DESIGN SYSTEM - DJALALS NÄHRSTOFFE APP (2026 MOBILE EDITION)
   Standard: Modern Light Mode (Sleek, Clean, Scandinavian Health Tech)
   ========================================================================== */

:root {
  /* Brand Core Colors */
  --primary: #059669;           /* Emerald 600 */
  --primary-hover: #047857;     /* Emerald 700 */
  --primary-light: #ecfdf5;     /* Emerald 50 */
  --primary-border: #a7f3d0;    /* Emerald 200 */
  --primary-glow: rgba(5, 150, 105, 0.18);

  --accent-amber: #d97706;      /* Amber 600 */
  --accent-amber-light: #fffbeb;/* Amber 50 */
  --accent-amber-border: #fde68a;
  
  --accent-blue: #2563eb;       /* Blue 600 */
  --accent-blue-light: #eff6ff; /* Blue 50 */
  --accent-blue-border: #bfdbfe;

  --accent-purple: #7c3aed;     /* Purple 600 */
  --accent-purple-light: #f5f3ff;
  --accent-purple-border: #ddd6fe;

  /* Standard Theme: LIGHT MODE (Default) */
  --bg-app: #f8fafc;            /* Crisp Slate 50 */
  --bg-surface: #ffffff;        /* Pure White Card */
  --bg-surface-raised: #ffffff;
  --bg-surface-subtle: #f1f5f9; /* Slate 100 */
  --bg-input: #f8fafc;
  --border-color: #e2e8f0;       /* Slate 200 */
  --border-subtle: #f1f5f9;     /* Slate 100 */
  --border-focus: #059669;

  /* Typography Colors */
  --text-main: #0f172a;         /* Slate 900 */
  --text-secondary: #475569;    /* Slate 600 */
  --text-muted: #64748b;        /* Slate 500 */
  --text-dimmed: #94a3b8;       /* Slate 400 */
  --text-inverse: #ffffff;

  /* Status Tokens */
  --status-optimal: #059669;
  --status-optimal-bg: #d1fae5;
  --status-moderate: #d97706;
  --status-moderate-bg: #fef3c7;
  --status-warning: #dc2626;
  --status-warning-bg: #fee2e2;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 18px -3px rgba(0, 0, 0, 0.09), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-bottom-nav: 0 -4px 16px rgba(15, 23, 42, 0.06);

  /* Layout & Sizing */
  --header-collapsed-height: 54px;
  --bottom-nav-height: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --max-content-width: 900px;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 18px;
  --border-radius-xl: 24px;
  --border-radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Optional Dark Mode (Toggleable, but NOT standard) */
[data-theme="dark"] {
  --bg-app: #090d16;
  --bg-surface: #111827;
  --bg-surface-raised: #1f2937;
  --bg-surface-subtle: #1a2234;
  --bg-input: #151d2e;
  --border-color: #243046;
  --border-subtle: #1a2436;
  --border-focus: #10b981;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dimmed: #64748b;
  --text-inverse: #090d16;

  --primary-light: rgba(16, 185, 129, 0.14);
  --primary-border: rgba(16, 185, 129, 0.3);
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 4px -1px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.7);
  --shadow-bottom-nav: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background-color: var(--bg-app);
  color: var(--text-main);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 24px);
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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