/* ==========================================================================
   DLRG Design Tokens – gemeinsame Basis für alle DLRG-Apps
   Hinweis: Farbwerte sind Näherungen an das DLRG-Rot/-Gelb. Bitte einmalig
   mit dem offiziellen Corporate-Design-Handbuch abgleichen und hier anpassen –
   alle Apps ziehen die Änderung automatisch mit.
   ========================================================================== */

:root {
  /* Marke */
  /* Werte übernommen aus den bestehenden Apps (Equipment, Fahrtenbuch, Kostenordnung, Protokoll) */
  --dlrg-red:         #E30613;
  --dlrg-red-dark:    #B80510;
  --dlrg-red-light:   #FDECEE;
  --dlrg-yellow:      #F7D417;
  --dlrg-yellow-dark: #C9A800;
  --dlrg-yellow-light:#FEF8D2;

  /* Neutrale Farben */
  --gray-900: #293746;
  --gray-700: #374151;
  --gray-500: #5B6877;
  --gray-300: #D3D8DF;
  --gray-200: #DCE2EA;
  --gray-100: #EEF1F5;
  --gray-50:  #F4F6F9;
  --white:    #FFFFFF;

  /* Status */
  --success: #2E7D32;  --success-bg: #E6F4EA;
  --warning: #8A6100;  --warning-bg: #FFF6BF;
  --danger:  #C62828;  --danger-bg:  #FDE8EA;
  --info:    #1F5F99;  --info-bg:    #E5F0FB;

  /* Semantische Rollen (in Apps diese verwenden, nicht die Rohfarben) */
  --color-primary:        var(--dlrg-red);
  --color-primary-hover:  var(--dlrg-red-dark);
  --color-on-primary:     var(--white);
  --color-accent:         var(--dlrg-yellow);
  --color-on-accent:      var(--gray-900);
  --color-bg:             var(--gray-50);
  --color-surface:        var(--white);
  --color-text:           var(--gray-900);
  --color-text-muted:     var(--gray-500);
  --color-border:         var(--gray-200);
  --color-border-strong:  var(--gray-300);
  --color-focus:          #1F5F99;

  /* Namen aus dem DLRG-Designsystem (DLRG.md) */
  --dlrg-text:       var(--gray-900);
  --dlrg-text-muted: var(--gray-500);
  --dlrg-bg:         var(--gray-50);
  --dlrg-card:       var(--white);
  --dlrg-border:     var(--gray-300);
  --color-sidebar:   var(--white);
  --color-divider:   var(--gray-200);
  --color-table-head:#EEF1F5;
  --dlrg-success:    var(--success);
  --dlrg-warning:    var(--dlrg-yellow);
  --dlrg-error:      var(--danger);
  --dlrg-info:       var(--info);
  --header-line:     3px;
  --sidebar-width:   260px;

  /* Typografie */
  --font-sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --text-xs: .75rem;  --text-sm: .875rem; --text-md: 1rem;
  --text-lg: 1.25rem; --text-xl: 1.5rem;  --text-2xl: 2rem;
  --weight-regular: 400; --weight-medium: 600; --weight-bold: 700;
  --leading: 1.5;

  /* Abstände (4px-Raster) */
  --space-1: .25rem; --space-2: .5rem;  --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem;   --space-7: 3rem;

  /* Form */
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
  --shadow-2: 0 4px 12px rgba(0,0,0,.12);

  /* Layout */
  --header-height: 64px;
  --touch-min: 44px;           /* Mindestgröße für Touch-Ziele */
  --content-max: 1400px;
}

/* Dunkles Theme: automatisch oder per <html data-theme="dark"> */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #121417; --color-surface: #1C2025;
    --color-text: #EDEFF1; --color-text-muted: #9AA1AA;
    --color-border: #2E343B; --color-border-strong: #444C55;
    --color-primary: #FF4D58; --color-primary-hover: #FF7079;
    --color-on-primary: #1A1D21; --color-focus: #6FB1F5;
    --success-bg: #12301B; --warning-bg: #3A2F00; --danger-bg: #3A1216; --info-bg: #11283F;
    --success: #6BD58A; --warning: #FFD500; --danger: #FF8089; --info: #7DB9F5;
    --dlrg-red-light: #3A1216; --dlrg-yellow-light: #3A2F00;
  }
}
:root[data-theme="dark"] {
  --color-bg: #121417; --color-surface: #1C2025;
  --color-text: #EDEFF1; --color-text-muted: #9AA1AA;
  --color-border: #2E343B; --color-border-strong: #444C55;
  --color-primary: #FF4D58; --color-primary-hover: #FF7079;
  --color-on-primary: #1A1D21; --color-focus: #6FB1F5;
  --success-bg: #12301B; --warning-bg: #3A2F00; --danger-bg: #3A1216; --info-bg: #11283F;
  --success: #6BD58A; --warning: #FFD500; --danger: #FF8089; --info: #7DB9F5;
  --dlrg-red-light: #3A1216; --dlrg-yellow-light: #3A2F00;
}
