/* My Smart Rental – design tokens (SHSS UI). Every colour, radius, shadow and font lives here; components only use the tokens.
   Brand colours come from branding.json via /brand.css (loaded after this file) – change the brand there, not here.
   Brand kit "Route Key" (assets/brand/route-key-kit): indigo brand, cyan key-bow accent, ink text on cool slate; light first, dark (data-mode="dark") derived and contrast-checked. */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'Inter', system-ui, sans-serif;
  --fs-xs: 12px; --fs-sm: 13px; --fs: 14px; --fs-md: 15px; --fs-lg: 18px; --fs-xl: 23px; --fs-2xl: 30px;

  /* brand kit "Route Key" (fallbacks – /brand.css from branding.json wins). Cyan --accent only on dark/indigo surfaces and for the key bow;
     cyan text on light: --accent-text (accent-700, 4.5:1) or --accent-600 for icons / large text (3:1). */
  --brand: #4F46E5; --brand-600: #4338CA; --brand-700: #3730A3; --brand-400: #6366F1;
  --accent: #22D3EE; --accent-600: #0891B2; --accent-700: #0E7490; --ink: #0F172A;
  --logo-gradient: linear-gradient(135deg, #6366F1 0%, #3730A3 100%);
  --brand-50: color-mix(in srgb, var(--brand) 8%, #fff); --brand-100: color-mix(in srgb, var(--brand) 16%, #fff);
  --accent-50: color-mix(in srgb, var(--accent) 12%, #fff); --accent-text: var(--accent-700);
  --accent-fill: var(--accent-700); --accent-fill-hover: color-mix(in srgb, var(--accent-700) 85%, #000); --on-accent: #ffffff;   /* filled cyan on light = cyan-700 (bright cyan only on dark) */
  --primary: var(--brand); --primary-hover: var(--brand-600); --primary-soft: var(--brand-50); --on-primary: #ffffff;
  /* UI fills that carry white text (hero KPI, progress, step numbers): brand → deep indigo (white text ≥ 6:1); the logo tile itself uses --logo-gradient */
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);

  --bg: #F5F6FA; --surface: #ffffff; --surface-2: #F8F9FC; --surface-3: #EEF0F6; --overlay: rgba(15, 23, 42, .45);
  --border: #E4E7EF; --border-strong: #CFD4E2; --focus: var(--brand-400); --hover: var(--surface-3);
  --text: var(--ink); --text-2: #334155; --text-3: #56657C;   /* kit text-3 #64748B darkened: 4.5:1 also on bg + surface-3 */
  --text-4: #94A3B8; --text-inv: #ffffff;
  /* app bar: light surface in the light theme (logo ink version, brandLogo tone 'auto'), deep surface in dark; text ≥ 4.5:1, icons ≥ 3:1 in both */
  --appbar: var(--surface); --appbar-line: var(--border); --appbar-text: var(--text-2); --appbar-muted: var(--text-3); --appbar-strong: var(--text);
  --appbar-hover: var(--surface-3); --appbar-field: var(--surface-2); --appbar-field-hover: var(--surface); --appbar-field-line: var(--border-strong);
  --appbar-plan-bg: var(--surface-3); --appbar-plan-fg: var(--text-2); --appbar-trial-bg: var(--accent-50); --appbar-trial-fg: var(--accent-text);
  --appbar-dot: var(--accent-600); --appbar-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --appbar-avatar-bg: var(--brand-100); --appbar-avatar-fg: var(--brand-700);
  /* tooltip, scrollbars */
  --tip-bg: var(--ink); --tip-fg: #ffffff; --scroll-thumb: color-mix(in srgb, var(--text-4) 55%, transparent);
  --ok-dot: #16a34a; --pop-shadow: 0 12px 32px rgba(15, 23, 42, .16);
  --viewas-bg: var(--brand-700); --viewas-fg: #ffffff;   /* "Ansicht als Rolle" banner (white text ≥ 7:1) */

  --success: #047857; --success-bg: #e7f7f0; --warning: #b45309; --warning-bg: #fef4e2; --danger: #dc2626; --danger-bg: #fdecec; --info: #2563eb; --info-bg: #eaf1fe; --neutral-bg: #EEF0F6;
  /* rental states (calendar bars, pills) – as in the brand kit */
  --st-request: #A855F7; --st-reserved: #F59E0B; --st-confirmed: #4F46E5; --st-active: #059669; --st-returned: #0891B2; --st-closed: #64748B; --st-cancelled: #94a3b8; --st-overdue: #DC2626;
  --st-maintenance: #78716C; --st-block: #475569; --st-ical: #db2777;
  /* chart series: brand first, cyan-600 second (3:1 on white) */
  --c-1: var(--brand); --c-2: var(--accent-600); --c-3: #f59e0b; --c-4: #10b981; --c-5: #ec4899; --c-6: #8b5cf6; --c-other: #94a3b8; --c-prev: #cbd5e1;

  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05); --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06); --shadow-lg: 0 16px 48px rgba(15, 23, 42, .18);
  --sidebar-w: 256px; --topbar-h: 60px; --gap: 16px;
  /* form controls: one height / radius / border / ring for input, select, button and segmented control in the same row */
  --input-h: 42px; --control-h-sm: 34px; --radius-control: 8px;
  --input-bg: var(--surface); --input-border: var(--border-strong); --input-border-hover: color-mix(in srgb, var(--border-strong) 55%, var(--text-3));
  --input-disabled-bg: var(--surface-3); --input-readonly-bg: var(--surface-2); --placeholder: var(--text-3);
  --ring: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); --ring-danger: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent);
  /* motion (public/js/motion.js, public/css/motion.css): durations + easings. Spring curves as CSS linear() (gentle = stiffness 170 / damping 26,
     snappy = 520 / 34, a little overshoot), cubic-bezier fallbacks for browsers without linear(). Only transform / opacity are animated. */
  --dur-1: 120ms; --dur-2: 180ms; --dur-3: 240ms; --dur-4: 420ms; --dur-count: 720ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-gentle: cubic-bezier(.22, 1, .36, 1); --ease-snappy: cubic-bezier(.34, 1.3, .64, 1);
  --m-rise: 6px; --m-press: .985; --m-lift: -2px;
  color-scheme: light;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --ease-gentle: linear(0, 0.0418, 0.1295, 0.2412, 0.3559, 0.4595, 0.5565, 0.6404, 0.7085, 0.7677, 0.816, 0.8537, 0.8854, 0.9105, 0.9304, 0.9455, 0.9579, 0.9675, 0.9748, 0.9806, 0.9852, 0.9885, 0.9912, 0.9933, 0.9948, 0.9961, 0.997, 0.9977, 1);
    --ease-snappy: linear(0, 0.0469, 0.1446, 0.2781, 0.4191, 0.5534, 0.6646, 0.7661, 0.8477, 0.9065, 0.9535, 0.9863, 1.0076, 1.0195, 1.0259, 1.0278, 1.0268, 1.024, 1.0204, 1.0165, 1.013, 1.0096, 1.0067, 1.0045, 1.0027, 1.0014, 1.0004, 0.9999, 1);
  }
}
/* motion level (user menu: Voll / Reduziert / Aus; OS "reduce motion" = Aus): reduced keeps fades but no movement */
[data-motion="reduced"] { --m-rise: 0px; --m-press: 1; --m-lift: 0px; --dur-3: 160ms; --dur-4: 200ms; }
[data-motion="off"] { --m-rise: 0px; --m-press: 1; --m-lift: 0px; }
/* dark: deep ink/indigo surfaces; brand lightened for links, buttons and the selected item (dark text on it); cyan accent readable as is */
[data-mode="dark"] {
  --brand-50: color-mix(in srgb, var(--brand-400) 18%, #0B1020); --brand-100: color-mix(in srgb, var(--brand-400) 30%, #0B1020);
  --primary: color-mix(in srgb, var(--brand-400) 70%, #fff); --primary-hover: color-mix(in srgb, var(--brand-400) 55%, #fff); --primary-soft: color-mix(in srgb, var(--brand-400) 20%, transparent); --on-primary: #0B1020;
  --accent-50: color-mix(in srgb, var(--accent) 14%, transparent); --accent-text: var(--accent);
  --accent-fill: var(--accent); --accent-fill-hover: color-mix(in srgb, var(--accent) 80%, #fff); --on-accent: var(--ink);
  --bg: #0B1020; --surface: #121829; --surface-2: #161D31; --surface-3: #1D2540; --overlay: rgba(0, 0, 0, .6);
  --border: #232C47; --border-strong: #3A4670; --focus: #A5B4FC; --hover: var(--surface-3);
  --text: #E8EBF5; --text-2: #B8C0D9; --text-3: #8F98B5; --text-4: #646E8F;
  --appbar: #0E1424; --appbar-line: var(--border); --appbar-text: #B8C0D9; --appbar-muted: #8F98B5; --appbar-strong: #ffffff;
  --appbar-hover: rgba(255, 255, 255, .07); --appbar-field: rgba(255, 255, 255, .05); --appbar-field-hover: rgba(255, 255, 255, .08); --appbar-field-line: rgba(255, 255, 255, .12);
  --appbar-plan-bg: var(--surface-3); --appbar-plan-fg: #B8C0D9; --appbar-trial-bg: color-mix(in srgb, var(--accent) 22%, transparent); --appbar-trial-fg: #ffffff;
  --appbar-dot: var(--accent); --appbar-shadow: none;
  --appbar-avatar-bg: color-mix(in srgb, var(--accent) 22%, #fff); --appbar-avatar-fg: var(--ink);
  --tip-bg: #E8EBF5; --tip-fg: #0B1020; --scroll-thumb: rgba(255, 255, 255, .16);
  --pop-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  --viewas-bg: color-mix(in srgb, var(--brand-400) 42%, #0B1020); --viewas-fg: #ffffff;
  --success: #34d399; --success-bg: rgba(52, 211, 153, .12); --warning: #fbbf24; --warning-bg: rgba(251, 191, 36, .13); --danger: #f87171; --danger-bg: rgba(248, 113, 113, .13); --info: #93b4ff; --info-bg: rgba(147, 180, 255, .13); --neutral-bg: #1D2540;
  --st-closed: #8F98B5; --st-cancelled: #475569; --c-1: var(--primary); --c-2: var(--accent); --c-prev: #334155;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
  /* inputs sit slightly darker than the card they are on (inset look), native pickers/popups follow color-scheme */
  --input-bg: color-mix(in srgb, var(--bg) 55%, var(--surface)); --input-disabled-bg: var(--surface-3); --input-readonly-bg: color-mix(in srgb, var(--surface-3) 50%, var(--surface));
  --ring: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); --ring-danger: 0 0 0 3px color-mix(in srgb, var(--danger) 30%, transparent);
  color-scheme: dark;
}
[data-density="compact"] { --input-h: 36px; --control-h-sm: 32px; --gap: 12px; }
/* phones: 16px text in fields (no iOS zoom on focus) and touch targets of at least 40px */
@media (max-width: 720px) { :root, [data-density="compact"] { --input-h: 44px; --control-h-sm: 40px; } }
