/* Design-Tokens + Reset + gemeinsame Komponenten.
 * Charcoal + Steel-Blau-Akzent. Wenn ein offizielles LagerRent-Logo + Palette
 * verfuegbar sind, hier die Brand-Variablen tauschen.
 */

:root {
  /* Surfaces */
  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Text */
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  /* Status */
  --pos: #059669;
  --pos-bg: #ecfdf5;
  --neg: #dc2626;
  --neg-bg: #fef2f2;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --info: #2563eb;
  --info-bg: #eff6ff;

  /* Brand */
  --brand: #0f172a;       /* Charcoal */
  --brand-2: #1e40af;     /* Steel-blue */
  --brand-soft: #dbeafe;

  /* Standort-Farben (stabil, in dieser Reihenfolge fuer L1..L13) */
  --loc-1: #2563eb;
  --loc-2: #059669;
  --loc-3: #d97706;
  --loc-4: #db2777;
  --loc-5: #7c3aed;
  --loc-6: #0891b2;
  --loc-7: #ca8a04;
  --loc-8: #65a30d;
  --loc-9: #be123c;
  --loc-10: #4338ca;
  --loc-11: #0d9488;
  --loc-12: #c2410c;
  --loc-13: #9333ea;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  /* Schatten */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
.num { font-variant-numeric: tabular-nums; }

/* ---------- Brand-Wordmark ---------- */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--brand);
  text-decoration: none;
}
.brand__accent { color: var(--brand-2); }
.brand--lg { font-size: 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn--primary:hover { background: #1e293b; border-color: #1e293b; }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }

/* ---------- App-Header (auf BWA/Standort/Auswertungen-Seiten) ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: var(--sp-4) var(--sp-6);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.app-nav {
  display: flex;
  gap: var(--sp-1);
}
.app-nav a {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.app-nav a:hover { color: var(--text); background: var(--surface-2); }
.app-nav a.is-active { color: var(--text); background: var(--surface-2); }

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 13px;
  color: var(--text-muted);
}
.user-menu strong { color: var(--text); font-weight: 600; }

/* ---------- Form-Elemente ---------- */
.input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.input:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, .12);
}
.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: var(--sp-2);
}

/* ---------- Banner / Alerts ---------- */
.alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  font-size: 13px;
  border: 1px solid transparent;
}
.alert--error { background: var(--neg-bg); color: var(--neg); border-color: #fecaca; }
.alert--info  { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.alert--ok    { background: var(--pos-bg); color: var(--pos); border-color: #a7f3d0; }

/* ---------- Hidden ---------- */
[hidden] { display: none !important; }
