/* ═══════════════════════════════════════════════════════════════════
   LOTUS Webportal — Design System
   Version: 1.0 (Entwurf, 2026-04-21)
   Referenz: portal_redesing_reference/portal_redesign.html
   Zweck:    Zentrale Stylesheet-Datei für alle 58 Portal-Seiten.
             Wird per <link rel="stylesheet" href="../_assets/design-system.css">
             in jedem Mockup eingebunden.
   ═══════════════════════════════════════════════════════════════════ */

/* ───────────────────────── 1 · TOKENS ─────────────────────────── */

:root {
  /* Primärfarben — Navy */
  --navy:           #1f3a5f;
  --navy-dark:      #152a47;
  --navy-soft:      #2d4d7a;
  --navy-tint:      #eef2f8;

  /* Akzent — Blush (Lotus) */
  --blush:          #eab8c2;
  --blush-soft:     #f5d5dc;
  --blush-deep:     #d48896;
  --blush-deeper:   #b86b79;
  --peach:          #f0d4cf;

  /* Neutrale Basis */
  --cream:          #faf6f1;
  --cream-warm:     #f4ece4;
  --paper:          #f8f1e9;

  --ink:            #1a2540;
  --ink-soft:       #5a6a85;
  --ink-muted:      #8b95a8;
  --line:           #e6dcd4;
  --line-soft:      #f0e8df;

  /* Status */
  --ok:             #4a7c5e;
  --ok-bg:          #f0f6f2;
  --warn:           #d4a628;
  --warn-bg:        #fef7e4;
  --error:          #b3344a;
  --error-bg:       #fdecef;
  --info-bg:        var(--navy-tint);

  /* Schicht-Farben (funktional, brand-kalibriert) */
  --shift-hol24:    #f5c847;   --shift-hol24-ink:#7a5a10;
  --shift-rufho:    #e88b5c;   --shift-rufho-ink:#7a3a15;
  --shift-inscd:    #a8b3c4;   --shift-inscd-ink:#3a4558;
  --shift-inscp:    #7a859a;   --shift-inscp-ink:#fff;
  --shift-u:        #8fbba8;   --shift-u-ink:    #2e4a3e;
  --shift-au:       #c96a7a;   --shift-au-ink:   #fff;
  --shift-changed:  #e88b5c;

  /* Schatten */
  --shadow-sm: 0 1px 2px rgba(31, 58, 95, 0.04), 0 2px 6px rgba(31, 58, 95, 0.04);
  --shadow-md: 0 2px 4px rgba(31, 58, 95, 0.04), 0 10px 24px rgba(31, 58, 95, 0.06);
  --shadow-lg: 0 4px 12px rgba(31, 58, 95, 0.06), 0 20px 40px rgba(31, 58, 95, 0.08);

  /* Safe-Area */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:  ui-monospace, 'SF Mono', 'Menlo', 'Cascadia Code', 'Consolas', monospace;

  /* Schriftgroesse fuer Eingabefelder (input/select/textarea).
     iOS Safari zoomt beim Antippen automatisch hinein, sobald ein
     fokussierbares Eingabefeld unter 16px liegt — die Seite verrutscht und
     laesst sich danach nicht mehr sauber bedienen. 16px ist die Untergrenze,
     ab der das nicht mehr passiert; darunter darf kein Eingabefeld liegen.
     Wird portalweit in allen Seiten-Stylesheets als
     var(--fs-control, 16px) referenziert — der Fallback greift, falls eine
     Seite design-system.css einmal nicht laedt. */
  --fs-control: 16px;
}

/* ───────────────────────── 2 · RESET ──────────────────────────── */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(900px 500px at 90% 0%, rgba(240, 212, 207, 0.35), transparent 55%),
    radial-gradient(800px 600px at 0% 100%, rgba(234, 184, 194, 0.22), transparent 55%),
    var(--cream);
  min-height: 100dvh;
}

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

/* Form-Control-Reset: native Inputs/Selects/Textareas/Buttons erben sonst nicht die Body-Font.
   Ohne diesen Reset rendert der Browser sie in seiner UA-System-UI-Font (Times/SF Pro/Segoe UI),
   was zu vermeintlich „4 verschiedenen Schriftarten" auf einer Seite führt. */
button, input, select, textarea, optgroup {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { color: inherit; }

/* Ohne eigene Regel erben Eingabefelder ueber `font-size: inherit` die 15px
   von html/body — und liegen damit unter der 16px-Grenze, ab der iOS Safari
   beim Antippen hineinzoomt. Das betrifft jedes Feld, fuer das keine
   Seiten-Regel eine Groesse setzt, also portalweit. Buttons und optgroup
   bleiben bewusst bei `inherit`: die loesen keinen Zoom aus. */
input, select, textarea {
  font-size: var(--fs-control, 16px);
}

/* `kbd` und `code` bewusst monospace, aber konsistent über alle OS via Variable. */
kbd, code, pre, samp {
  font-family: var(--font-mono);
}

a { color: var(--navy); }

/* ─────────────────── 3 · APP-SHELL: HEADER ────────────────────── */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 241, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  padding-top: var(--safe-top);
}

.header-row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 28px; height: auto; }

.brand-text { display: flex; flex-direction: column; line-height: 1; }

.brand-wordmark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.22em;
  color: var(--navy);
  padding-right: 0.22em;
}

.brand-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--navy-soft);
  margin-top: 3px;
  letter-spacing: 0.04em;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.user-chip:hover { box-shadow: var(--shadow-md); }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blush) 0%, var(--blush-deep) 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.avatar--admin { background: linear-gradient(135deg, var(--navy-soft) 0%, var(--navy) 100%); }
.avatar--customer { background: linear-gradient(135deg, #cde0d2, #8fbba8); color: #2e4a3e; }

.user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
}
/* Sidebar-chip user-name inherits color from surrounding chip
   (dark background needs light text) */
.app-sidebar__user .user-name {
  color: inherit;
  font-size: inherit;
}
.user-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ─────────────────── 4 · APP-SHELL: NAVIGATION ────────────────── */

.app-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.app-nav::-webkit-scrollbar { display: none; }

.nav-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-tab svg { width: 16px; height: 16px; }
.nav-tab:hover { color: var(--navy); background: rgba(255, 255, 255, 0.6); }

.nav-tab.active {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(31, 58, 95, 0.25);
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 0;
  color: var(--blush-deep);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.logout-btn:hover { background: var(--error-bg); color: var(--error); }
.logout-btn svg { width: 15px; height: 15px; }

/* ─────────────────── 5 · APP-SHELL: MAIN/FOOTER ───────────────── */

.app-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 32px calc(48px + var(--safe-bottom));
}

.app-footer {
  margin-top: 56px;
  padding: 32px 32px calc(32px + var(--safe-bottom));
  background: var(--navy);
  color: #fff;
}

.footer-row {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 500;
}
.footer-links a:hover { color: #fff; }

.footer-meta {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.08em;
  text-align: center;
}

/* ─────────────────── 6 · TYPOGRAFIE ───────────────────────────── */

.page-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.welcome-hero {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.welcome-hero em { font-style: italic; color: var(--blush-deep); font-weight: 500; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blush-deep);
  margin-bottom: 14px;
}

/* ─────────────────── 7 · CARDS ────────────────────────────────── */

.card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
}

.card--feature {
  background:
    radial-gradient(800px 300px at 90% 10%, rgba(234, 184, 194, 0.25), transparent 60%),
    #fff;
  padding: 40px 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.card--compact { padding: 20px; }

.card-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.card-title--sm {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title--sm svg { width: 20px; height: 20px; color: var(--blush-deep); }

.card-eyebrow {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blush-deep);
  margin-bottom: 10px;
}

.card-muted-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ─────────────────── 8 · GRIDS / LAYOUT ───────────────────────── */

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row   { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

/* ─────────────────── 9 · STAT-CARDS ───────────────────────────── */

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  padding: 24px;
  overflow: hidden;
}

.stat-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.stat-icon svg { width: 22px; height: 22px; }

.stat-icon--amber { background: #fef3c7; color: #d97706; }
.stat-icon--rose  { background: var(--blush-soft); color: var(--blush-deep); }
.stat-icon--sage  { background: #e4efe8; color: var(--ok); }
.stat-icon--navy  { background: var(--navy-tint); color: var(--navy); }

.stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.01em;
}

.stat-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* ─────────────────── 10 · QUICK-ACCESS-CARDS ──────────────────── */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  cursor: pointer;
}
.quick-card:hover {
  border-color: var(--blush);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.quick-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--navy-tint);
  color: var(--navy);
  border-radius: 12px;
  flex-shrink: 0;
}
.quick-icon svg { width: 22px; height: 22px; }

.quick-label { font-weight: 700; color: var(--navy); font-size: 15px; }
.quick-desc  { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.4; }

/* ─────────────────── 11 · INFO-BOX / ALERTS ───────────────────── */

.info-box {
  padding: 20px 22px;
  background: var(--cream-warm);
  border-radius: 14px;
  border-left: 3px solid var(--blush-deep);
  position: relative;
}
.info-box + .info-box { margin-top: 12px; }
.info-box--green { background: var(--ok-bg); border-left-color: var(--ok); }
.info-box--warn  { background: var(--warn-bg); border-left-color: var(--warn); }
.info-box--info  { background: var(--info-bg); border-left-color: var(--navy); }
.info-box--error { background: var(--error-bg); border-left-color: var(--error); }

.info-box-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.info-box-title { font-weight: 700; font-size: 14.5px; color: var(--navy); }
.info-box-body  { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.info-box-body a { color: var(--navy); word-break: break-all; }

.info-box-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-muted);
}

.alert {
  display: none;
  padding: 12px 14px;
  background: var(--error-bg);
  border: 1px solid #f3c2cb;
  border-left: 3px solid var(--blush-deep);
  border-radius: 8px;
  font-size: 13.5px;
  color: #7a2c3a;
  margin-bottom: 20px;
}
.alert.show { display: block; }

.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--warn-bg);
  border: 1px solid #f0d9a0;
  border-left: 3px solid var(--warn);
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.alert-banner-text { font-size: 14px; color: #6e4e00; font-weight: 500; }
.alert-banner-actions { display: flex; gap: 8px; }

/* ─────────────────── 12 · PILLS / BADGES ──────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--blush-deep);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
}
.pill--green   { background: var(--ok); }
.pill--warn    { background: var(--warn); color: #5a4308; }
.pill--navy    { background: var(--navy); }
.pill--outline { background: transparent; color: var(--navy); border: 1px solid var(--line); }

/* ─────────────────── 13 · BUTTONS ─────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  min-height: 40px;
  touch-action: manipulation;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }

.btn--primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(31, 58, 95, 0.2);
}
.btn--primary:hover {
  background: var(--navy-dark);
  box-shadow: 0 4px 14px rgba(31, 58, 95, 0.3);
  transform: translateY(-1px);
}

.btn--accent {
  background: var(--blush-deep);
  color: #fff;
  box-shadow: 0 2px 8px rgba(212, 136, 150, 0.3);
}
.btn--accent:hover { background: var(--blush-deeper); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn--ghost:hover { background: #fff; border-color: var(--navy); }

.btn--danger {
  background: var(--error);
  color: #fff;
}
.btn--danger:hover { background: #8a263a; }

.btn--sm { padding: 7px 14px; font-size: 12px; min-height: 32px; }
.btn--xs {
  padding: 4px 10px;
  font-size: 11px;
  min-height: 26px;
  font-weight: 600;
}

.btn--block { width: 100%; }

/* Full-width Submit (für Auth-Forms) */
.submit {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--navy);
  border: 0;
  border-radius: 999px;
  padding: 16px 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(31, 58, 95, 0.22);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.submit:hover {
  background: var(--navy-dark);
  box-shadow: 0 6px 20px rgba(31, 58, 95, 0.32);
  transform: translateY(-1px);
}
.submit:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(31, 58, 95, 0.2); }
.submit svg { width: 18px; height: 18px; transition: transform 0.2s; }
.submit:hover svg { transform: translateX(3px); }

/* ─────────────────── 14 · FORMULARE ───────────────────────────── */

.field { margin-bottom: 18px; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.field-label .required { color: var(--blush-deep); }

.field-hint {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.field-error {
  display: none;
  font-size: 12.5px;
  color: var(--error);
  margin-top: 6px;
}
.field--invalid .field-error { display: block; }
.field--invalid .field-input { border-color: var(--error); }

.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--ink-soft);
  pointer-events: none;
  transition: color 0.2s;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--fs-control, 16px);
  color: var(--ink);
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-wrap .field-input { padding-left: 46px; }

.field-input::placeholder,
.field-textarea::placeholder { color: #a8a0a0; }

.field-input:hover,
.field-select:hover,
.field-textarea:hover { border-color: #d9cdc4; }

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(31, 58, 95, 0.10);
}

.field-wrap:focus-within .field-icon { color: var(--navy); }

.field-textarea { min-height: 120px; resize: vertical; }

.field-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(-45deg, transparent 50%, var(--ink-soft) 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 13px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.password-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 4px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: color 0.2s, background 0.2s;
}
.password-toggle:hover { color: var(--navy); background: var(--cream-warm); }
.password-toggle svg { width: 18px; height: 18px; }

/* Checkbox & Radio */
.checkbox,
.radio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--ink-soft);
}

.checkbox input,
.radio input { position: absolute; opacity: 0; pointer-events: none; }

.checkbox-mark,
.radio-mark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.checkbox-mark { border-radius: 5px; }
.radio-mark { border-radius: 50%; }

.checkbox-mark svg {
  width: 12px;
  height: 12px;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s;
}
.checkbox input:checked + .checkbox-mark {
  background: var(--navy);
  border-color: var(--navy);
}
.checkbox input:checked + .checkbox-mark svg { opacity: 1; transform: scale(1); }

.radio-mark::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy);
  opacity: 0;
  transform: scale(0.3);
  transition: all 0.15s;
}
.radio input:checked + .radio-mark { border-color: var(--navy); }
.radio input:checked + .radio-mark::after { opacity: 1; transform: scale(1); }

.checkbox input:focus-visible + .checkbox-mark,
.radio input:focus-visible + .radio-mark {
  box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.22);
}

/* Form-Gruppen-Layout */
.form-group { display: grid; gap: 18px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

/* ─────────────────── 15 · LINKS ───────────────────────────────── */

.link {
  font-size: 14px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.link:hover { color: var(--blush-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ─────────────────── 16 · SHIFT-TAGS ──────────────────────────── */

.shift {
  display: inline-flex;
  flex-direction: column;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  min-width: 58px;
}
.shift-code { font-size: 12px; font-weight: 700; }
.shift-name { font-size: 10px; font-weight: 500; opacity: 0.85; margin-top: 2px; }
.shift-time { font-size: 10px; font-weight: 500; opacity: 0.8; margin-top: 2px; letter-spacing: 0.02em; }

.shift--hol24 { background: var(--shift-hol24); color: var(--shift-hol24-ink); }
.shift--rufho { background: var(--shift-rufho); color: var(--shift-rufho-ink); }
.shift--inscd { background: var(--shift-inscd); color: var(--shift-inscd-ink); }
.shift--inscp { background: var(--shift-inscp); color: var(--shift-inscp-ink); }
.shift--u     { background: var(--shift-u);     color: var(--shift-u-ink); }
.shift--au    { background: var(--shift-au);    color: var(--shift-au-ink); }
.shift--changed { box-shadow: inset 0 0 0 2px var(--shift-changed); }

/* ─────────────────── 17 · KALENDER ────────────────────────────── */

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.calendar-nav { display: flex; align-items: center; gap: 8px; }

.calendar-month {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.01em;
  min-width: 180px;
  text-align: center;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  margin-bottom: 20px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 2px 0;
}

.legend-swatch { width: 14px; height: 14px; border-radius: 4px; }

.calendar {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 4px 10px 12px;
}

.day-cell {
  min-height: 96px;
  padding: 10px;
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.day-cell--empty { background: transparent; border: 1px dashed var(--line-soft); opacity: 0.4; }
.day-cell--weekend { background: var(--peach); opacity: 0.35; }
.day-cell--highlight { box-shadow: inset 0 0 0 2px var(--blush-deep); background: #fff9fa; }

.day-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.day-number-dow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.day-label {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--blush-deep);
  color: #fff;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.day-meta {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.day-cell .shift { width: 100%; min-width: 0; }

/* Summary-Row (Navy-Gradient) */
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  border-radius: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.summary-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
}

.summary-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ─────────────────── 18 · TAB-SWITCHER ────────────────────────── */

.tab-switcher {
  display: inline-flex;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  margin-bottom: 24px;
}

.sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.sub-tab svg { width: 15px; height: 15px; }
.sub-tab.active { background: var(--navy); color: #fff; }

.view-toggle {
  display: inline-flex;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.view-toggle button {
  padding: 6px 14px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
}
.view-toggle button.active { background: var(--navy); color: #fff; }

/* ─────────────────── 19 · TEAM-TABELLE ────────────────────────── */

.team-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.customer-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.customer-select label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.team-table-wrap {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.team-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.team-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 12px;
}

.team-table th, .team-table td {
  padding: 6px 4px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
  vertical-align: middle;
}

.team-table thead th {
  background: var(--cream-warm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 10px 4px;
  border-bottom: 2px solid var(--line);
}

.team-table thead th.day-weekend { background: var(--peach); opacity: 0.5; }

.team-table thead th.day-date {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0;
  text-transform: none;
  padding-top: 2px;
}

.team-table tbody td.emp-cell {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  color: var(--navy);
  font-size: 13px;
  background: var(--cream);
  position: sticky;
  left: 0;
  z-index: 2;
  white-space: nowrap;
  border-right: 2px solid var(--line);
}

.emp-chip { display: inline-flex; align-items: center; gap: 8px; }

.emp-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blush-soft), var(--blush));
  color: var(--navy);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.emp-avatar--a { background: linear-gradient(135deg, #cde0d2, #8fbba8); color: #2e4a3e; }
.emp-avatar--b { background: linear-gradient(135deg, #f5d5dc, #d48896); color: #7a2c49; }
.emp-avatar--c { background: linear-gradient(135deg, #f0e2d1, #d9b089); color: #5a3e1e; }
.emp-avatar--d { background: linear-gradient(135deg, #d7d9e8, #a8b3c4); color: #3a4558; }

.team-table tbody td {
  background: #fff;
  min-width: 54px;
  height: 48px;
  padding: 4px;
}
.team-table tbody td.weekend { background: rgba(240, 212, 207, 0.35); }
.team-table tbody td .shift {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  font-size: 10px;
}

.team-empty-cell {
  background: var(--line-soft) !important;
  border-radius: 4px;
  margin: 2px;
  opacity: 0.35;
}

/* ─────────────────── 20 · DATEN-LISTEN-CARDS ──────────────────── */

.swap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.swap-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s;
}
.swap-card:hover {
  border-color: var(--blush);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.swap-date {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.swap-date-dow {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blush-deep);
  margin-bottom: 2px;
}

.swap-time {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.swap-card .shift { align-self: flex-start; padding: 8px 12px; }

/* ─────────────────── 21 · MODAL ───────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 37, 64, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.show { display: flex; }

.modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.modal-close {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-muted);
  padding: 4px;
  border-radius: 8px;
}
.modal-close:hover { background: var(--cream-warm); color: var(--navy); }
.modal-close svg { width: 22px; height: 22px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

/* ─────────────────── 22 · LOADING / SKELETON ──────────────────── */

.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--line);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--line-soft) 0%, var(--cream-warm) 50%, var(--line-soft) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─────────────────── 23 · VIEW / ANIMATIONS ───────────────────── */

.view { display: none; animation: fadeIn 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.12s; }
.animate-in:nth-child(3) { animation-delay: 0.19s; }
.animate-in:nth-child(4) { animation-delay: 0.26s; }
.animate-in:nth-child(5) { animation-delay: 0.33s; }
.animate-in:nth-child(6) { animation-delay: 0.40s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────── 24 · UTILITIES ───────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--ink-soft); }
.text-soft   { color: var(--ink-muted); }

/* ─────────────────── 25 · RESPONSIVE ──────────────────────────── */

@media (max-width: 960px) {
  .header-row { padding: 14px 20px; }
  .app-nav    { padding: 0 20px 14px; }
  .app-main   { padding: 24px 20px calc(36px + var(--safe-bottom)); }

  .brand-tagline { display: none; }

  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .swap-grid  { grid-template-columns: repeat(2, 1fr); }

  .form-row { grid-template-columns: 1fr; }

  .page-title    { font-size: 30px; }
  .welcome-hero  { font-size: 28px; }
  .card-title    { font-size: 22px; }
}

@media (max-width: 640px) {
  .grid--3 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr; }
  .swap-grid { grid-template-columns: 1fr; }

  .card { padding: 20px; }
  .card--feature { padding: 28px 22px; }

  /* Legacy mobile rule: hides user-name in old header pattern.
     Sidebar-chip .app-sidebar__user .user-name is NOT affected,
     stays visible on mobile. */
  .user-info .user-name { display: none; }

  .calendar-month { font-size: 22px; min-width: 140px; }

  /* Kalender wird auf Phone zur Liste */
  .calendar-grid { grid-template-columns: 1fr; }
  .day-head { display: none; }
  .day-cell { min-height: auto; padding: 14px 16px; }
  .day-cell--empty { display: none; }
  .day-cell--weekend { opacity: 0.6; }

  .app-footer { padding: 24px 20px calc(24px + var(--safe-bottom)); }
  .footer-links { gap: 16px; font-size: 12.5px; }

  .modal-card { padding: 24px; border-radius: 16px; }
}

@media (max-width: 480px) {
  .brand-mark { width: 36px; height: 36px; }
  .brand-mark svg { width: 24px; }
  .brand-wordmark { font-size: 18px; }

  .page-title    { font-size: 26px; }
  .welcome-hero  { font-size: 24px; }
  .stat-value    { font-size: 28px; }

  .nav-tab { padding: 8px 12px; font-size: 12.5px; }
  .nav-tab span { display: none; }
  .nav-tab svg { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─────────────────── 26 · PRINT (für PDF-Export) ──────────────── */

@media print {
  body { background: #fff; }
  .app-header, .app-footer, .nav-tabs, .logout-btn, .alert-banner-actions { display: none; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  .summary-row { background: #fff !important; color: var(--navy) !important; border: 1px solid #ddd; }
}

/* ─────────────── BRAND LOGO ─────────────── */
.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.app-sidebar__brand .brand-logo { width: 40px; height: 40px; }
.au-brand .brand-logo,
.brand .brand-logo { width: 38px; height: 38px; }
.brand-mini .brand-logo { width: 30px; height: 30px; }

/* ===========================================================
   27 · FORM CONTROLS — Alerts, Toggles
   Used across: mein_bereich, admin_settings, kunde_*, etc.
   =========================================================== */

/* ─── Alert Modifiers (extend .alert base from Section 11) ─── */

.alert--success {
  background: var(--ok-bg);
  border: 1px solid #c3dfc9;
  border-left: 3px solid var(--ok);
  color: #2e5a3e;
}

.alert--error {
  background: var(--error-bg);
  border: 1px solid #f3c2cb;
  border-left: 3px solid var(--error);
  color: #7a2c3a;
}

.alert--info {
  background: var(--info-bg);
  border: 1px solid #c8d6ea;
  border-left: 3px solid var(--navy);
  color: var(--navy);
}

/* Flex layout for modifier alerts (overrides .alert.show { display: block }) */
.alert--success.show,
.alert--error.show,
.alert--info.show {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── Toggle Switch ─── */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-switch__track {
  position: absolute;
  inset: 0;
  background: var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s;
}

.toggle-switch__track::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.25s;
}

.toggle-switch input:checked + .toggle-switch__track {
  background: var(--navy);
}

.toggle-switch input:checked + .toggle-switch__track::after {
  transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-switch__track {
  box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.15);
}

/* ─────────────────── 28 · LOADING OVERLAY ────────────────────── */

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(250, 246, 241, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.loading-overlay--fullscreen { position: fixed; z-index: 90; }
.loading-overlay.active { display: flex; }

/* ─────────────────── 29 · COLLAPSIBLE SECTIONS ───────────────── */

.collapsible {}

.collapsible__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  border-radius: 12px;
  transition: background 0.15s;
}
.collapsible__header:hover { background: var(--cream-warm); }

.collapsible__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.collapsible__icon {
  color: var(--ink-muted);
  font-size: 12px;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.collapsible.collapsed .collapsible__icon { transform: rotate(-90deg); }

.collapsible__content {
  padding: 0 18px 14px;
}
.collapsible.collapsed .collapsible__content { display: none; }
