  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html, body {
    background: var(--bg);
    color: var(--text);
    color-scheme: light;
    min-height: 100vh;
  }
  :root {
    --bg:             #f1f3f7;
    --surface:        #ffffff;
    --surface-alt:    #f7f8fa;
    --surface-raised: #ffffff;
    --surface-soft:   #f8f9fb;
    --surface-2:      #f1f5f9;
    --text:           #0f172a;
    --text-secondary: #64748b;
    --text-muted:     #94a3b8;
    --border:         rgba(0,0,0,0.07);
    --border-mid:     rgba(0,0,0,0.12);
    --border-strong:  rgba(0,0,0,0.13);

    --brand:          #2563eb;
    --brand-dark:     #1d4ed8;
    --brand-light:    #dbeafe;
    --brand-soft:     #eff6ff;

    --warn:           #b45309;
    --warn-soft:      #fef3c7;
    --warn-border:    #fde68a;

    --danger:         #dc2626;
    --danger-soft:    rgba(239, 68, 68, 0.08);
    --danger-border:  rgba(239, 68, 68, 0.25);

    --success:        #15803d;
    --success-soft:   #dcfce7;
    --success-border: #86efac;

    --green:          var(--success);
    --green-bg:       var(--success-soft);
    --green-border:   var(--success-border);
    --red:            var(--danger);
    --red-bg:         var(--danger-soft);
    --red-border:     var(--danger-border);
    --amber:          var(--warn);
    --amber-bg:       var(--warn-soft);
    --amber-border:   var(--warn-border);
    --blue:           var(--brand);
    --blue-bg:        var(--brand-soft);
    --blue-border:    var(--brand-light);

    /* Sidebar dark shell */
    --sidebar-bg:     #0f172a;
    --sidebar-text:   rgba(255,255,255,0.55);
    --sidebar-active: #ffffff;
    --sidebar-hover:  rgba(255,255,255,0.07);
    --sidebar-active-bg: rgba(255,255,255,0.10);
    --sidebar-border: rgba(255,255,255,0.08);
    --sidebar-w:      240px;

    --topbar-h:       60px;
    --radius:         10px;
    --radius-lg:      14px;
    --shadow-sm:      0 1px 4px rgba(15,23,42,0.07);
    --shadow:         0 4px 16px rgba(15,23,42,0.10);
    --shadow-lg:      0 16px 48px rgba(15,23,42,0.15);

    /* 8px Grid System — Spacing Scale */
    --space-0-5: 4px;   /* 0.5 × 8px */
    --space-1:   8px;   /* 1 × 8px */
    --space-1-5: 12px;  /* 1.5 × 8px */
    --space-2:   16px;  /* 2 × 8px */
    --space-3:   24px;  /* 3 × 8px */
    --space-4:   32px;  /* 4 × 8px */
    --space-5:   40px;  /* 5 × 8px */
    --space-6:   48px;  /* 6 × 8px */
  }

  /* ── DARK MODE ── */
  [data-theme="dark"] {
    --bg:             #0f172a;
    --surface:        #1e293b;
    --surface-alt:    #0f172a;
    --surface-raised: #273244;
    --surface-soft:   #334155;
    --surface-2:      #273244;
    --text:           #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;
    --border:         rgba(255,255,255,0.08);
    --border-mid:     rgba(255,255,255,0.12);
    --border-strong:  rgba(255,255,255,0.18);

    --brand-light:    #1e3a8a;
    --brand-soft:     #172554;

    --warn:           #fb923c;
    --warn-soft:      rgba(249,115,22,0.15);
    --warn-border:    rgba(249,115,22,0.35);

    --danger-soft:    rgba(239, 68, 68, 0.15);
    --danger-border:  rgba(239, 68, 68, 0.35);

    --success:        #4ade80;
    --success-soft:   rgba(74,222,128,0.12);
    --success-border: rgba(74,222,128,0.3);

    --green:          #4ade80;
    --green-bg:       rgba(74,222,128,0.1);
    --green-border:   rgba(74,222,128,0.25);
    --red:            #f87171;
    --red-bg:         rgba(248,113,113,0.1);
    --red-border:     rgba(248,113,113,0.25);
    --amber:          #fb923c;
    --amber-bg:       rgba(251,146,60,0.1);
    --amber-border:   rgba(251,146,60,0.25);
    --blue:           #60a5fa;
    --blue-bg:        rgba(96,165,250,0.1);
    --blue-border:    rgba(96,165,250,0.25);

    --shadow-sm:      0 1px 4px rgba(0,0,0,0.3);
    --shadow:         0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:      0 16px 48px rgba(0,0,0,0.5);
  }

  /* Dark mode specific overrides */
  html[data-theme="dark"],
  [data-theme="dark"] body {
    background: #0f172a;
    color: var(--text);
    color-scheme: dark;
  }

  [data-theme="dark"] [style*="background:white"],
  [data-theme="dark"] [style*="background: white"],
  [data-theme="dark"] [style*="background:#fff"],
  [data-theme="dark"] [style*="background: #fff"],
  [data-theme="dark"] [style*="background:#ffffff"],
  [data-theme="dark"] [style*="background: #ffffff"] {
    background: var(--surface) !important;
    color: var(--text);
  }

  [data-theme="dark"] [style*="background:#f8fafc"],
  [data-theme="dark"] [style*="background: #f8fafc"],
  [data-theme="dark"] [style*="background:#f1f5f9"],
  [data-theme="dark"] [style*="background: #f1f5f9"],
  [data-theme="dark"] [style*="background:#fafafa"],
  [data-theme="dark"] [style*="background: #fafafa"] {
    background: var(--surface-alt) !important;
  }

  [data-theme="dark"] .kcal-wrap {
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  /* ── Dark Mode: Klar geführte Hierarchie ── */

  /* Badges: kein weißer Hintergrund im Dark Mode */
  [data-theme="dark"] .badge-warn {
    background: rgba(249,115,22,0.15);
    color:      #fdba74;
    border:     1px solid rgba(249,115,22,0.35);
  }
  [data-theme="dark"] .badge-success {
    background: rgba(74,222,128,0.12);
    color:      #86efac;
    border:     1px solid rgba(74,222,128,0.25);
  }
  [data-theme="dark"] .badge-danger {
    background: rgba(239,68,68,0.15);
    color:      #fca5a5;
    border:     1px solid rgba(239,68,68,0.3);
  }
  [data-theme="dark"] .badge-info {
    background: rgba(96,165,250,0.18);
    color: #bfdbfe;
    border-color: rgba(96,165,250,0.35);
  }
  [data-theme="dark"] .badge-neutral {
    background: rgba(255,255,255,0.06);
    color:      #94a3b8;
    border:     1px solid rgba(255,255,255,0.1);
  }
  [data-theme="dark"] .badge-blocked {
    background: rgba(100,116,139,0.2);
    color:      #94a3b8;
    border:     1px solid rgba(100,116,139,0.3);
  }

  /* Step-Cards: leicht heller als Page-BG, klar sichtbar */
  [data-theme="dark"] .workflow-step {
    background: #1e293b !important;
    border-color: #334155 !important;
  }

  /* Aktiver Schritt: Starker Amber-Glow — Blick hängt sofort dort */
  [data-theme="dark"] .workflow-step.step-active {
    background:   #1e293b !important;
    border-color: rgba(249,115,22,0.65) !important;
    box-shadow:   0 0 0 1px rgba(249,115,22,0.4), 0 8px 25px rgba(0,0,0,0.35) !important;
  }
  [data-theme="dark"] .workflow-step.step-active .step-number.active {
    background:   #f97316;
    border-color: #f97316;
    box-shadow:   0 0 0 4px rgba(249,115,22,0.25), 0 0 12px rgba(249,115,22,0.4);
  }
  [data-theme="dark"] .workflow-step.step-active .step-title h3 {
    color: #fdba74;
  }

  /* Abgeschlossene Steps: deutlich zurücktreten */
  [data-theme="dark"] .workflow-step.step-done {
    opacity: 0.6;
    background: rgba(15,23,42,0.6) !important;
  }
  [data-theme="dark"] .workflow-step.step-done:hover {
    opacity: 0.85;
  }

  /* Muted Text: heller als Standard damit lesbar */
  [data-theme="dark"] .step-hint,
  [data-theme="dark"] .item-sub,
  [data-theme="dark"] .list-item-sub {
    color: #cbd5e1 !important;
  }

  /* Topbar im Dark Mode */
  [data-theme="dark"] .topbar {
    background: #111827;
    border-bottom-color: #1e293b;
  }

  /* Input/Textarea/Select im Dark Mode */
  [data-theme="dark"] input,
  [data-theme="dark"] textarea,
  [data-theme="dark"] select {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
  }
  [data-theme="dark"] input::placeholder,
  [data-theme="dark"] textarea::placeholder,
  [data-theme="dark"] select option:first-child {
    color: #64748b;
  }

  /* Cards und Panels */
  [data-theme="dark"] .card,
  [data-theme="dark"] .stat-card,
  [data-theme="dark"] [style*="background:var(--surface)"],
  [data-theme="dark"] .support-card {
    background: #1e293b;
    border-color: #334155;
  }

  /* Workflow-Progress-Bar: verstecken wenn leer */
  .workflow-progress:empty { display: none; }

  /* Workflow-Progress-Bar im Dark Mode */
  [data-theme="dark"] .workflow-progress {
    background: #111827;
    border-color: #1e293b;
  }

  /* Step-Nummern: besserer Kontrast im Dark Mode */
  [data-theme="dark"] .step-number {
    background: rgba(255,255,255,0.08);
    color: #94a3b8;
    border-color: rgba(255,255,255,0.15);
  }

  /* Kalender im Dark Mode */
  [data-theme="dark"] .kcal-footer {
    background: #111827;
    border-top-color: #1e293b;
  }

  /* Info-Banner Dark */
  [data-theme="dark"] .info-banner.warn {
    background: rgba(249,115,22,0.08);
    border-color: rgba(249,115,22,0.25);
    border-left-color: rgba(249,115,22,0.7);
    color: #fdba74;
  }
  [data-theme="dark"] .info-banner.info {
    background: rgba(37,99,235,0.08);
    border-color: rgba(37,99,235,0.2);
    border-left-color: rgba(37,99,235,0.7);
    color: #93c5fd;
  }
  [data-theme="dark"] .info-banner.success {
    background: rgba(74,222,128,0.08);
    border-color: rgba(74,222,128,0.2);
    border-left-color: rgba(74,222,128,0.6);
    color: #86efac;
  }

  html, body { height: 100%; }
  body {
    font: 14px/1.5 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  button, input, textarea, select { font: inherit; }
  a { color: inherit; text-decoration: none; }

  /* Subtle scrollbar */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

  /* ── SIDEBAR ── */
  .sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--sidebar-border);
    overflow-y: auto;
    overflow-x: hidden;
    /* Kompensation für fixed Footer */
    padding-bottom: 60px;
  }
  .sidebar-brand {
    padding: 20px 18px 12px;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 6px;
  }
  .sidebar-brand small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    margin-top: 3px;
    letter-spacing: 0;
  }
  .sidebar-section {
    padding: 14px 18px 4px;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.4);
    opacity: 0.4;
  }
  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    margin: 1px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--sidebar-text);
    transition: background 0.14s, color 0.14s;
    user-select: none;
    border: none;
    background: none;
    width: calc(100% - 16px);
    text-align: left;
    position: relative;
  }
  .nav-item:hover { background: var(--sidebar-hover); color: rgba(255,255,255,0.85); }
  .nav-item.active { background: var(--sidebar-active-bg); color: var(--sidebar-active); font-weight: 600; }
  .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: var(--brand);
  }
  .nav-item .nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; opacity: 0.7; }
  .nav-item.active .nav-icon { opacity: 1; }
  .nav-item .nav-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
  }

  /* ── KASSENSTAND WIDGET (sidebar) ── */
  .sidebar-balance {
    margin: 12px 12px 8px;
    padding: 16px 18px;
    border-radius: 12px;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
  }
  .sidebar-balance::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
  }
  .sidebar-balance-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #60a5fa;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .sidebar-balance-label::before {
    content: '●';
    font-size: 6px;
    color: #3b82f6;
  }
  .sidebar-balance-value {
    font-size: 28px;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  }
  .sidebar-balance-value.negative { color: #fca5a5; text-shadow: 0 2px 4px rgba(248, 113, 113, 0.2); }
  .sidebar-balance-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 6px;
  }
  .sidebar-balance-value-sm {
    font-size: 16px;
    font-weight: 700;
    color: #86efac;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-top: 4px;
  }
  .sidebar-balance-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    font-weight: 500;
  }
  .sidebar-balance-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    margin: 12px 0 10px;
  }

  .sidebar-footer {
    margin-top: auto;
    padding: 16px 12px 20px 12px;
    border-top: 1px solid var(--sidebar-border);
    background: var(--sidebar-bg);
  }
  .sidebar-user {
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
  }
  .sidebar-user:hover { background: var(--sidebar-hover); }
  .sidebar-user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }
  .sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
  }
  .sidebar-user-name { font-weight: 600; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
  .sidebar-user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 42px;
  }
  .sidebar-user-role { color: rgba(255,255,255,0.55); font-size: 11px; }
  .sidebar-user-tenant { color: rgba(255,255,255,0.35); font-size: 10px; }

  /* ── MAIN AREA ── */
  .main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f1f3f7;
    /* Kompensation für fixed Footer */
    padding-bottom: 50px;
    overflow: hidden;
    min-width: 0;
  }

  /* ── TOPBAR ── */
  .topbar {
    height: var(--topbar-h);
    padding: 0 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .topbar-left { display: flex; align-items: center; gap: 12px; }
  .topbar-identity { display: flex; flex-direction: column; gap: 1px; }
  .topbar-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.07em; opacity: 0.7; }
  .topbar-title { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.03em; line-height: 1.2; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif; }
  .topbar-right { display: flex; align-items: center; gap: 8px; }
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    padding: 0 9px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
  }
  .badge-success { background: var(--success-soft); color: var(--success);    border: 1px solid var(--success-border); }
  .badge-warn    { background: var(--warn-soft);    color: var(--warn);       border: 1px solid var(--warn-border); }
  .badge-danger  { background: var(--danger-soft);  color: var(--danger);     border: 1px solid var(--danger-border); }
  .badge-info    { background: var(--brand-soft);   color: var(--brand-dark); border: 1px solid var(--brand-light); }
  .badge-neutral { background: var(--bg);           color: var(--text-secondary); border: 1px solid var(--border); }
  .badge-blocked { background: var(--bg);           color: var(--text-secondary); border: 1px solid var(--border); }

  /* ── ICON BUTTONS ── */
  .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background 0.14s, border-color 0.14s, color 0.14s, box-shadow 0.14s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  }
  .icon-btn:hover { background: var(--bg); color: var(--text); border-color: var(--border-strong); box-shadow: 0 2px 6px rgba(0,0,0,0.07); }

  /* ── PAGE CONTENT ── */
  .page-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px 80px 32px; /* Extra padding-bottom für Footer */
    background: #f1f3f7;
  }
  .content-inner {
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
  }
  .page-section { display: none; }
  .page-section.active { display: block; }

  /* ── CARDS ── */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
    margin-bottom: 16px;
    transition: box-shadow 0.2s ease;
  }
  .card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 8px 24px rgba(0,0,0,0.06);
  }
  .card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .card-header h3 { font-size: 14px; font-weight: 700; }
  .card-body { padding: 20px; }

  /* ── DASHBOARD STATS ── */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
  }
  .stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
    padding: 16px;
    transition: box-shadow 0.18s;
  }
  .stat-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
  .stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
  .stat-value { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif; }
  .stat-value.danger { color: var(--danger); }
  .stat-value.success { color: var(--success); }
  .stat-value.brand { color: var(--brand); }

  /* ── BUTTONS ── */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 17px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.14s, border-color 0.14s, box-shadow 0.14s, transform 0.08s;
    white-space: nowrap;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
  .btn:hover:not(:disabled) { 
    border-color: var(--border-strong); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: var(--surface-soft);
  }
  .btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .btn-primary { background: var(--brand); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(37,99,235,0.18), 0 2px 8px rgba(37,99,235,0.14); }
  .btn-primary:hover:not(:disabled) { background: var(--brand-dark); box-shadow: 0 2px 10px rgba(37,99,235,0.28); }
  .btn:active:not(:disabled) { transform: scale(0.97); filter: brightness(0.96); }
  .btn-secondary { background: var(--bg); }
  .btn-soft { background: var(--brand-soft); border-color: var(--brand-light); color: var(--brand-dark); }
  .btn-today { 
    background: var(--brand-soft); 
    border-color: var(--brand); 
    border-width: 2px;
    color: var(--brand-dark); 
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
    transition: all 0.2s ease;
  }
  .btn-today:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
  }
  .btn-danger-soft { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
  .btn-linkish { background: transparent; border-color: transparent; color: var(--brand); padding: 8px 8px; }
  .btn-linkish:hover { background: var(--brand-soft); }
  .btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
  .btn-block { width: 100%; }

  /* ── FORM ELEMENTS ── */
  .form-group { margin-bottom: 14px; }
  .form-group label { display: block; font-size: 11px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 5px; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

  input[type="date"],
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  textarea,
  select {
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    outline: none;
    font-size: 13px;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  input:focus, textarea:focus, select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  }
  textarea { min-height: 80px; resize: vertical; }

  /* ── PILL NAV (Day Selector) ── */
  .pill-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
  .pill-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-secondary);
  }
  .pill-btn:hover { border-color: var(--border-strong); }
  .pill-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
  .pill-btn.done { background: var(--surface); color: var(--success); border-color: var(--success-border); font-weight: 700; }
  .pill-btn.warn { background: var(--surface); color: var(--warn);    border-color: var(--warn-border);    font-weight: 700; }

  /* ── SECTION GRID ── */
  .section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .subcard {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
  }
  .subcard h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }

  /* ── ITEMS LIST ── */
  .item-list { display: grid; gap: 8px; }
  .list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 13px;
  }
  .list-item-info { flex: 1; min-width: 0; }
  .list-item-info strong { display: block; font-size: 13px; }
  .list-item-info small { color: var(--text-secondary); font-size: 11px; }
  .list-item-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
  .list-item-saved { background: var(--success-soft); border-left: 3px solid var(--success); }

  /* ── Z-BON UPLOAD CARD ── */
  .zbon-upload-card {
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface-soft) 100%);
    border: 2px dashed var(--border-strong);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
  }
  .zbon-upload-card:hover { border-color: var(--brand); }
  .zbon-upload-done {
    border-style: solid;
    border-color: var(--success);
    background: var(--success-soft);
  }
  .zbon-upload-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--brand-soft);
    border: 1px solid var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--brand);
  }
  .zbon-upload-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
  }
  .zbon-upload-hint {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 14px;
  }
  .zbon-ki-hint {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 8px;
  }
  .zbon-warn {
    font-size: 10px;
    color: var(--warn);
    margin-top: 8px;
    padding: 4px 10px;
    background: var(--warn-soft);
    border-radius: 12px;
    display: inline-block;
  }

  /* ── VENDOR AUTOCOMPLETE ── */
  .vendor-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    margin-top: -2px;
  }
  .vendor-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  .vendor-suggestion-item:last-child { border-bottom: 0; }
  .vendor-suggestion-item:hover { background: var(--surface-soft); }

  .empty-state {
    padding: 32px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text-secondary);
    text-align: center;
    font-size: 13px;
    box-shadow: var(--shadow-sm);
  }
  .empty-state-compact {
    padding: 24px 20px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .empty-state-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
  }
  .empty-state-title {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.35;
    font-weight: 650;
  }
  .empty-state-text {
    max-width: 360px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
  }

  /* ── TOGGLE SWITCH ── */
  .toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .toggle-row:last-child { border-bottom: 0; }
  .toggle-label { font-size: 13px; font-weight: 600; }
  .toggle-label small { display: block; font-weight: 400; color: var(--text-secondary); font-size: 11px; }
  .toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 12px;
    background: #d1d5db;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
  }
  .toggle-switch::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: 0.2s;
  }
  .toggle-switch.active { background: var(--brand); }
  .toggle-switch.active::after { transform: translateX(18px); }

  /* ── SUBMIT BAR ── */
  .submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius);
    background: var(--brand-soft);
    border: 1px solid var(--brand-light);
  }
  .submit-bar-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
  .submit-bar-info p { font-size: 12px; color: var(--text-secondary); }

  /* ── TOAST ── */
  .toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9000;
    min-width: 260px;
    max-width: 420px;
    padding: 12px 18px;
    border-radius: 12px;
    background: #0d1117;
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
    border-left: 3px solid var(--brand);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .toast.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .toast.toast-success { border-left-color: var(--success); }
  .toast.toast-error   { border-left-color: var(--danger); }

  @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

  /* ── MODAL / OVERLAY ── */
  .modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .modal-overlay.show { display: flex; }
  .modal {
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  }
  .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .modal-header h3 { font-size: 16px; font-weight: 700; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

  /* ── AUTH OVERLAY ── */
  .auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: none;
    align-items: center;
    justify-content: center;
    background: #050c18;
    backdrop-filter: blur(12px);
  }
  .auth-overlay.show { display: flex; }
  body:has(.auth-overlay.show) .sidebar,
  body:has(.auth-overlay.show) .main-area { visibility: hidden; pointer-events: none; }
  body:has(.auth-overlay.show) .auth-overlay { visibility: visible; pointer-events: auto; }
  body.kb-welcoming .sidebar,
  body.kb-welcoming .main-area { visibility: hidden; pointer-events: none; }
  .auth-sheet {
    width: min(880px, 100%);
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.25);
  }
  .auth-layout { display: grid; grid-template-columns: 1fr 1fr; }
  .auth-side {
    padding: 32px;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    border-right: 1px solid #1e293b;
  }
  .auth-side-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #60a5fa; margin-bottom: 12px; }
  .auth-side h2 { font-size: 26px; line-height: 1.15; margin-bottom: 10px; color: #f1f5f9; }
  .auth-side p { color: #94a3b8; font-size: 13px; line-height: 1.6; }
  .auth-points { display: grid; gap: 8px; margin-top: 18px; }
  .auth-point { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); font-size: 13px; }
  .auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 32px; }
  .auth-form { width: min(340px, 100%); }
  .auth-form h3 { font-size: 22px; margin-bottom: 6px; }
  .auth-sub { color: var(--text-secondary); margin-bottom: 16px; font-size: 13px; }
  .auth-grid { display: grid; gap: 10px; }
  .auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  @keyframes auth-error-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
  .auth-error {
    margin-bottom: 12px;
    padding: 10px 12px 10px 36px;
    border-radius: 8px;
    border: 1px solid rgba(239,68,68,0.2);
    background: rgba(239,68,68,0.07);
    color: #f87171;
    font-size: 12.5px;
    line-height: 1.5;
    font-weight: 500;
    position: relative;
    animation: auth-error-in 0.25s ease both;
  }
  .auth-error::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f87171' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") no-repeat center / contain;
  }
  @keyframes auth-notice-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .auth-notice {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.25);
    border-left: 3px solid #fbbf24;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 500;
    animation: auth-notice-in 0.35s ease both;
    transition: opacity 0.5s ease, transform 0.5s ease, max-height 0.5s ease, margin 0.5s ease, padding 0.5s ease;
  }
  .auth-notice-fade {
    opacity: 0;
    transform: translateY(-4px);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  .auth-foot { margin-top: 10px; color: var(--text-secondary); font-size: 11px; }
  .auth-link { color: var(--brand); cursor: pointer; font-weight: 600; }
  .auth-link:hover { text-decoration: underline; }
  .pw-field            { position: relative; }
  .pw-field input      { width: 100%; padding-right: 38px; box-sizing: border-box; }
  .pw-toggle           { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 2px; color: var(--text-secondary); line-height: 1; }
  .pw-toggle:hover     { color: var(--text); }

  /* ── TUTORIAL OVERLAY ── */
  .tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: none;
    align-items: center;
    justify-content: center;
    background: #050c18;
    backdrop-filter: blur(12px);
  }
  .tutorial-overlay.show { display: flex; }
  .tutorial-card {
    width: min(620px, 100%);
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
  }
  .tutorial-progress { height: 4px; background: var(--bg); }
  .tutorial-progress-bar { height: 100%; background: var(--brand); transition: width 0.3s; }
  .tutorial-body { padding: 32px; text-align: center; }
  .tutorial-icon { font-size: 48px; margin-bottom: 16px; }
  .tutorial-body h2 { font-size: 22px; margin-bottom: 8px; }
  .tutorial-body p { color: var(--text-secondary); font-size: 14px; max-width: 440px; margin: 0 auto 24px; line-height: 1.6; }
  .tutorial-footer {
    padding: 16px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .tutorial-dots { display: flex; gap: 6px; }
  .tutorial-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--border); transition: all 0.2s; }
  .tutorial-dot.active { background: var(--brand); width: 20px; }

  /* ── Dark Mode: Page-Content + Disclaimer + Tags ── */
  [data-theme="dark"] .page-content {
    background: #0f172a;
  }
  [data-theme="dark"] .main-area {
    background: #0f172a;
  }
  [data-theme="dark"] .disclaimer {
    background: #0a1120;
    border-top-color: #1e293b;
    color: #475569;
  }
  [data-theme="dark"] .step-tag-required {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
    border-color: rgba(239,68,68,0.3);
  }
  [data-theme="dark"] .step-tag-optional {
    background: rgba(148,163,184,0.1);
    color: #94a3b8;
    border-color: rgba(148,163,184,0.2);
  }
  /* Kalender-Status-Zellen im Dark Mode */
  [data-theme="dark"] .kcal-cell.status-incomplete {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.25);
  }
  [data-theme="dark"] .kcal-cell.status-open {
    background: rgba(249,115,22,0.12);
    border-color: rgba(249,115,22,0.3);
  }
  [data-theme="dark"] .kcal-cell.status-zbon {
    background: rgba(37,99,235,0.12);
    border-color: rgba(37,99,235,0.3);
  }
  [data-theme="dark"] .kcal-cell.status-done {
    background: rgba(74,222,128,0.08);
    border-color: rgba(74,222,128,0.2);
  }
  [data-theme="dark"] .kcal-cell.status-closed {
    background: rgba(148,163,184,0.06);
    border-color: rgba(148,163,184,0.15);
  }
  /* Submit-Bar im Dark Mode */
  [data-theme="dark"] .submit-bar {
    background: #111827;
    border-color: #1e293b;
  }
  /* Toggle-Switch Dark Mode */
  [data-theme="dark"] .toggle-switch {
    background: #334155;
  }
  [data-theme="dark"] .toggle-switch.active {
    background: var(--brand);
  }

  /* ── DISCLAIMER ── */
  .disclaimer {
    padding: 12px 20px;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--surface-soft);
  }

  /* ── OFFLINE INDICATOR ── */
  .offline-bar {
    display: none;
    padding: 6px 16px;
    background: var(--warn);
    border-bottom: 1px solid var(--warn);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
  }
  .offline-bar.show { display: block; }

  /* ── HAMBURGER BUTTON (nur Mobile sichtbar) ── */
  .sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    transition: background 0.15s;
  }
  .sidebar-toggle:hover { background: var(--bg); }
  .sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.2s;
  }

  /* ── SIDEBAR OVERLAY (Mobile) ── */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
  }
  .sidebar-overlay.show { display: block; }

  /* ── RESPONSIVE ── */
  @media (max-width: 900px) {
    .sidebar {
      position: fixed;
      left: 0; top: 0; bottom: 0;
      z-index: 3100;
      transform: translateX(-100%);
      transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
      box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: flex; }
    .topbar-support-btn { display: flex; }
    .section-grid, .form-row, .auth-grid-2 { grid-template-columns: 1fr; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-side { border-right: 0; border-bottom: 1px solid #1e293b; padding: 24px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    body { flex-direction: column; overflow: auto; }
    .main-area { width: 100%; min-height: 0; }
    .topbar { padding: 0 14px; height: 52px; }
    .topbar-title { font-size: 14px; }
    .page-content { padding: 12px 12px 70px 12px; overflow-y: auto; }
    .content-inner { max-width: 100%; }
    .day-picker-bar { margin-bottom: 12px; }
    .kcal-grid { padding: 6px 8px 8px; gap: 1px; }
    .kcal-cell { min-height: 36px; padding: 3px 1px; }
    .kcal-num { font-size: 12px; width: 24px; height: 24px; }
    .kcal-footer { padding: 8px 12px; }
    .kcal-legend { padding: 4px 12px 8px; gap: 10px; }
    .wp-label { display: none; }
    .wp-line { min-width: 8px; }
    .wp-dot { width: 32px; height: 32px; font-size: 13px; }
    .workflow-progress { padding: 12px 16px; }
    .step-hint { display: none; }
    .step-header { padding: 16px 14px; gap: 10px; min-height: 56px; }
    .step-body.open { padding: 0 14px 16px; }
    .step-number { width: 34px; height: 34px; font-size: 14px; }
    .btn { min-height: 40px; }
    .btn-sm { min-height: 34px; }
    .list-item { padding: 12px 14px; }
    .card-header { padding: 14px 16px; }
    .card-body { padding: 14px 16px; }
    .submit-bar { flex-direction: column; gap: 12px; }
    .submit-bar .btn { width: 100%; }
    .stats-grid .stat-value { font-size: 20px; }
  }
  @media (min-width: 901px) {
    .topbar-support-btn { display: none; }
    .sidebar-toggle { display: none; }
    .sidebar-overlay { display: none !important; }
  }
  /* Tablet (iPad landscape ~1024px) */
  @media (min-width: 768px) and (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .section-grid { grid-template-columns: 1fr 1fr; }
    .page-content { padding: 20px; }
    .content-inner { max-width: 700px; }
  }

  /* status-chip compat (for pill buttons) */
  .status-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  .status-chip.success { background: var(--success-soft); color: var(--success);    border: 1px solid var(--success-border); }
  .status-chip.warn    { background: var(--warn-soft);    color: var(--warn);       border: 1px solid var(--warn-border); }
  .status-chip.info    { background: var(--brand-soft);  color: var(--brand-dark); border: 1px solid var(--brand-light); }
  .status-chip.danger  { background: var(--danger-soft); color: var(--danger);     border: 1px solid var(--danger-border); }

  /* ── CUSTOM KALENDER-PICKER ── */
  .day-picker-bar {
    margin-bottom: 16px;
  }
  .kcal-wrap {
    background: var(--surface);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .kcal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 16px;
    border-bottom: none;
  }
  .kcal-month-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
  }
  .kcal-nav {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 10px 4px;
    transition: background 0.15s, color 0.15s;
  }
  .kcal-nav:hover:not(:disabled) { background: var(--surface-2, #f1f5f9); color: var(--brand); }
  .kcal-nav:disabled { opacity: 0.25; cursor: default; }
  .kcal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 12px 20px 16px;
  }
  .kcal-wd {
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .kcal-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 2px;
    border-radius: var(--radius);
    cursor: pointer;
    min-height: 42px;
    transition: background 0.12s;
    position: relative;
  }
  .kcal-cell:hover:not(.empty):not(.before-start) { 
    background: var(--surface-2, #e5e7eb); 
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.15s ease;
  }
  .kcal-cell.empty { cursor: default; }
  .kcal-cell.before-start { opacity: 0.3; cursor: default; pointer-events: none; }
  .kcal-cell.future { opacity: 0.5; }
  .kcal-cell.today .kcal-num {
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
    transform: scale(1.1);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .kcal-cell.selected { background: var(--brand-light, #eff6ff); }
  .kcal-cell.selected .kcal-num { color: var(--brand); font-weight: 800; }
  .kcal-cell.today.selected .kcal-num { background: var(--brand); color: #fff; }
  .kcal-num {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    line-height: 1;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .kcal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
    /* Spring Physics Micro-Interaction */
    animation: dotPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
  }
  
  /* Spring-Physics Pop-Animation für "Juicy" Feedback */
  @keyframes dotPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); opacity: 1; }
  }
  
  /* Softer bounce für wiederholte Erscheinungen */
  @keyframes dotPopSubtle {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
  }
  
  .kcal-dot.dot-done { background: var(--success); }
  .kcal-dot.dot-ok   { background: var(--brand); }
  .kcal-dot.dot-warn { background: var(--warn); }
  
  /* Optimistic UI: Pending state mit Pulse */
  .kcal-dot.dot-pending {
    background: var(--brand);
    opacity: 0.6;
    animation: dotPulse 1.5s ease-in-out infinite;
  }
  
  @keyframes dotPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
  }

  /* ── ENHANCED CALENDAR STATUS SYSTEM (GoBD-Compliant) ── */
  
  /* Status: Unvollständig (vergangene Tage ohne Z-Bon) */
  .kcal-cell.status-incomplete {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
  }
  .kcal-cell.status-incomplete .kcal-num {
    color: #dc2626;
    font-weight: 700;
  }
  
  /* Status: Offen (aktueller Tag, wartet auf Eingabe) */
  .kcal-cell.status-open {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
  }
  .kcal-cell.status-open .kcal-num {
    color: #b45309;
    font-weight: 600;
  }
  
  /* Status: Z-Bon vorhanden (aber nicht abgeschlossen) */
  .kcal-cell.status-zbon {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
  }
  .kcal-cell.status-zbon .kcal-num {
    color: #1d4ed8;
    font-weight: 600;
  }
  
  /* Status: Abgeschlossen / Festschrieben */
  .kcal-cell.status-done {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
  }
  .kcal-cell.status-done .kcal-num {
    color: #15803d;
    font-weight: 600;
  }
  
  /* Status: Geschlossen / Urlaub (begründet) */
  .kcal-cell.status-closed {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    opacity: 0.85;
  }
  .kcal-cell.status-closed .kcal-num {
    color: #475569;
  }
  
  /* Status: Zukunft (ausgegraut) */
  .kcal-cell.future {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    opacity: 0.5;
    cursor: not-allowed;
  }
  .kcal-cell.future .kcal-num {
    color: #94a3b8;
  }
  
  /* Icons und Badges */
  .kcal-icon {
    font-size: 11px;
    margin-top: 1px;
    line-height: 1;
  }
  
  .kcal-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--surface);
  }
  
  .kcal-badge.done { background: #22c55e; }
  .kcal-badge.zbon { background: #3b82f6; }
  .kcal-badge.closed { background: #64748b; }
  .kcal-badge.incomplete { background: #ef4444; }
  .kcal-badge.open { background: #f59e0b; }
  
  /* Hover-Effekte */
  .kcal-cell.status-incomplete:hover { background: #fef2f2; }
  .kcal-cell.status-open:hover { background: #fffbeb; }
  .kcal-cell.status-zbon:hover { background: #eff6ff; }
  .kcal-cell.status-done:hover { background: #f0fdf4; }
  [data-theme="dark"] .kcal-cell.status-incomplete:hover { background: rgba(239,68,68,0.16); }
  [data-theme="dark"] .kcal-cell.status-open:hover { background: rgba(249,115,22,0.16); }
  [data-theme="dark"] .kcal-cell.status-zbon:hover { background: rgba(96,165,250,0.16); }
  [data-theme="dark"] .kcal-cell.status-done:hover { background: rgba(74,222,128,0.12); }
  .kcal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    background: var(--surface-2, #f8fafc);
    flex-wrap: wrap;
  }
  .kcal-legend {
    display: flex;
    gap: 14px;
    padding: 6px 16px 10px;
    font-size: 10px;
    color: var(--text-muted);
  }
  .kcal-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  /* ── VIEW-ONLY BANNER (Archiv-Ansicht) ── */
  .view-only-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 12px;
  }

  /* ── WORKFLOW PROGRESS BAR ── */
  .workflow-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
    padding: 16px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }
  .wp-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
  }
  .wp-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    transition: all 0.2s;
  }
  .wp-dot.done { background: var(--success); border-color: var(--success); color: #fff; }
  .wp-dot.active { background: var(--brand); border-color: var(--brand); color: #fff; }
  .wp-dot.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
  .wp-dot.info { background: var(--surface-2, #f1f5f9); border-color: var(--border); color: var(--text-muted); }
  .wp-label.info { color: var(--text-muted); }
  .wp-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .wp-label.done { color: var(--success); }
  .wp-label.active { color: var(--brand); font-weight: 700; }
  .wp-line {
    flex: 1 1 auto;
    min-width: 16px;
    max-width: 40px;
    height: 2px;
    background: var(--border);
    margin: 0 4px;
  }
  .wp-line.done { background: var(--success); }

  /* ── WORKFLOW STEP (Accordion) ── FLAT APPLE STYLE ── */
  .workflow-step {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    margin-bottom: 0;
    overflow: hidden;
    transition: background 0.15s;
  }
  .workflow-step.step-active {
    background: rgba(37, 99, 235, 0.03);
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
  }
  .workflow-step.step-done {
    opacity: 0.75;
  }
  .workflow-step.step-done:hover { opacity: 1; }
  .step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    min-height: 68px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
  }
  .step-header:hover { background: var(--surface-soft); }
  .step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--bg);
    color: var(--text-muted);
    border: 2px solid var(--border-strong);
    transition: all 0.2s;
  }
  .step-number.done { background: var(--success); border-color: var(--success); color: #fff; }
  .step-number.active { background: var(--brand); border-color: var(--brand); color: #fff; }
  .step-number.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
  .step-title { flex: 1; min-width: 0; }
  .step-title h3 { font-size: 14px; font-weight: 600; margin-bottom: 1px; color: var(--text); }
  .workflow-step.step-done .step-title h3 { color: var(--text-secondary); font-weight: 500; }
  .step-hint { font-size: 11px; color: var(--text-muted); }
  .step-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }
  .step-tag-mandatory {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
  }
  .step-tag-optional {
    background: rgba(100, 116, 139, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.15);
    opacity: 0.7;
    font-size: 8px;
  }
  .workflow-step.step-done .step-tag { opacity: 0.6; }
  .step-chevron {
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
  }
  .step-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 22px;
  }
  .step-body.open {
    max-height: 2000px;
    padding: 0 22px 24px;
  }

  /* ── INFO BANNER ── */
  .info-banner {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
  }
  .info-banner.warn    { background: var(--bg); border: 1px solid var(--warn-border);    border-left: 3px solid var(--warn);    color: var(--text); }
  .info-banner.info    { background: var(--bg); border: 1px solid var(--brand-light);    border-left: 3px solid var(--brand);   color: var(--text); }
  .info-banner.success { background: var(--bg); border: 1px solid var(--success-border); border-left: 3px solid var(--success); color: var(--text); }

  /* ── SMART ALERT — Unvollständige Tage Hinweis ── */
  .smart-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .smart-alert:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
  }
  .smart-alert-icon {
    font-size: 18px;
    flex-shrink: 0;
    opacity: 0.8;
  }
  .smart-alert-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .smart-alert-text strong {
    font-weight: 600;
    font-size: 13px;
    color: var(--danger);
  }
  .smart-alert-text span {
    font-size: 12px;
    color: var(--danger);
    opacity: 0.8;
  }

  /* ── FUTURE BANNER — Calm blocking für zukünftige Tage ── */
  .future-warning-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
  }
  .future-warning-icon {
    font-size: 20px;
    flex-shrink: 0;
  }
  .future-warning-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
  }
  .future-warning-text strong {
    font-weight: 600;
    font-size: 13px;
    display: block;
    margin-bottom: 3px;
    color: var(--text);
  }
  .future-warning-text em {
    font-style: normal;
    font-weight: 500;
    background: var(--surface);
    padding: 1px 4px;
    border-radius: 4px;
    border: 1px solid var(--border);
  }

  /* ── SUPPORT GRID ── */
  .support-grid { display: flex; flex-direction: column; gap: 10px; }
  .support-card-link { display: block; text-decoration: none; color: inherit; }
  .support-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all 0.15s;
  }
  .support-card:hover { box-shadow: var(--shadow-sm); border-color: var(--brand-light); }
  .support-icon { font-size: 22px; flex-shrink: 0; width: 36px; text-align: center; }
  .support-info { flex: 1; min-width: 0; }
  .support-info strong { display: block; font-size: 13px; font-weight: 600; }
  .support-info span { font-size: 12px; color: var(--text-secondary); }

  /* ── UX FIXES (2026-04) ── */

  /* Pflicht-Tag für Step 1 — rot/deutlich */
  .step-tag-required {
    background: rgba(220, 38, 38, 0.10);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.25);
  }

  /* Step 1 (Pflicht) hebt sich ab wenn noch offen */
  .workflow-step:first-of-type .step-number:not(.done):not(.active) {
    border-color: var(--warn-border);
    color: var(--warn);
  }

  /* Step-Done: weniger Ausblenden — noch lesbar */
  .workflow-step.step-done { opacity: 0.85; }

  /* Step-Title: etwas mehr Gewicht */
  .step-title h3 { font-size: 14px; font-weight: 700; }

  /* Logout-Button: sichtbar wenn angemeldet, klar als Logout erkennbar */
  .btn-logout-visible {
    color: var(--text-secondary);
  }
  .btn-logout-visible:hover {
    color: var(--danger);
    border-color: var(--danger-border);
    background: rgba(220,38,38,0.06);
  }

  /* Workflow-Step erste Ebene: weiße Karte statt transparent */
  .workflow-step {
    background: var(--surface);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    margin-bottom: 8px !important;
  }
  .workflow-step.step-active {
    border-color: rgba(37, 99, 235, 0.3) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.06);
  }

  /* Step-Body padding konsistenter */
  .step-body.open { padding: 0 24px 24px; }

  /* Topbar-Status Badge: größer / sichtbarer */
  #topbar-status-badge {
    font-size: 12px;
    height: 24px;
    padding: 0 12px;
    font-weight: 600;
  }

  /* Info-Banner: grüne Variante für Read-only-Hinweise */
  .info-banner.success {
    background: var(--success-soft);
    border: 1px solid var(--success-border);
    border-left: 3px solid var(--success);
    color: var(--success);
  }

  /* Plattform-Upload-Bereich: subtle Trennlinie */
  #documents-content > div:last-child {
    border-top: 1px solid var(--border);
  }

  /* ── WELCOME SCREEN (Jarvis-Style) ── */
  @keyframes kbWelcomeIn  { from { opacity: 0; } to { opacity: 1; } }
  @keyframes kbWelcomeOut { from { opacity: 1; } to { opacity: 0; } }
  @keyframes kbBarFill    { from { width: 0; } to { width: 100%; } }
  #kb-welcome {
    position: fixed; inset: 0; z-index: 9000;
    background: #050c18;
    display: flex; align-items: center; justify-content: center;
    animation: kbWelcomeIn 0.4s ease forwards;
  }
  #kb-welcome.kb-welcome-out { animation: kbWelcomeOut 0.6s ease forwards; }
  .kb-welcome-inner { text-align: center; max-width: 520px; padding: 0 32px; }
  .kb-welcome-status {
    font-size: 10px; font-weight: 700; letter-spacing: 0.25em;
    color: #3b82f6; text-transform: uppercase; margin-bottom: 28px; opacity: 0.8;
  }
  .kb-welcome-name {
    font-size: 36px; font-weight: 800; color: #f1f5f9;
    letter-spacing: -0.03em; line-height: 1.1; min-height: 44px;
  }
  .kb-welcome-sub {
    font-size: 13px; color: #64748b; margin-top: 12px;
    letter-spacing: 0.04em; min-height: 20px;
    font-family: 'SF Mono', 'Fira Code', monospace;
  }
  .kb-welcome-bar { margin-top: 32px; height: 2px; background: #0f172a; border-radius: 2px; overflow: hidden; }
  .kb-welcome-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1d4ed8, #60a5fa);
    width: 0;
    animation: kbBarFill 3.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
  }

  /* ── Mandantenportal Polish: Admin-Darkmode, klare Zustände, Apple/Cluely-Ruhe ── */
  [data-theme="dark"] {
    --bg:             #0f172a;
    --surface:        #1f2937;
    --surface-alt:    #111827;
    --surface-raised: #243044;
    --surface-soft:   #2b374a;
    --surface-2:      #162033;
    --text:           #f8fafc;
    --text-secondary: #a8b3c4;
    --text-muted:     #64748b;
    --border:         rgba(148, 163, 184, 0.16);
    --border-mid:     rgba(148, 163, 184, 0.22);
    --border-strong:  rgba(148, 163, 184, 0.30);
    --sidebar-bg:     #0b1019;
    --sidebar-hover:  rgba(148, 163, 184, 0.10);
    --sidebar-active-bg: rgba(96, 165, 250, 0.14);
    --sidebar-border: rgba(148, 163, 184, 0.14);
  }

  [data-theme="dark"] body,
  [data-theme="dark"] .main-area,
  [data-theme="dark"] .page-content {
    background: #0f172a;
  }

  [data-theme="dark"] .sidebar {
    background: #0b1019;
    border-right-color: rgba(148, 163, 184, 0.14);
  }

  .sidebar-brand {
    padding: 22px 18px 18px;
  }

  .nav-item {
    min-height: 42px;
    gap: 12px;
  }

  .nav-item .nav-icon {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    opacity: 0.72;
  }

  .nav-item .nav-icon svg {
    width: 18px;
    height: 18px;
    display: block;
  }

  .nav-item.active .nav-icon,
  .nav-item:hover .nav-icon {
    opacity: 1;
  }

  .topbar {
    min-height: 72px;
    height: auto;
    padding: 12px 32px;
    gap: 18px;
  }

  .topbar-left {
    gap: 16px;
    min-width: 0;
  }

  .topbar-identity {
    gap: 2px;
    min-width: 0;
  }

  .topbar-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    text-transform: uppercase;
  }

  .topbar-title {
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.025em;
  }

  .topbar-date {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-secondary);
  }

  #topbar-status-badge {
    margin-left: 2px;
    align-self: center;
  }

  [data-theme="dark"] .topbar {
    background: #111827;
    border-bottom-color: rgba(148, 163, 184, 0.14);
  }

  .icon-btn svg {
    width: 17px;
    height: 17px;
    display: block;
  }

  .icon-btn-ai {
    color: var(--brand);
  }

  .icon-btn-ai:hover {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.22);
  }

  [data-theme="dark"] .icon-btn {
    background: #1f2937;
    border-color: rgba(148, 163, 184, 0.16);
    color: #a8b3c4;
  }

  [data-theme="dark"] .icon-btn:hover {
    background: #2b374a;
    border-color: rgba(148, 163, 184, 0.30);
    color: #f8fafc;
  }

  [data-theme="dark"] .icon-btn-ai {
    color: #bfdbfe;
  }

  [data-theme="dark"] .icon-btn-ai:hover {
    color: #ffffff;
    background: #2563eb;
    border-color: #3b82f6;
  }

  .content-inner {
    max-width: 980px;
  }

  .workflow-progress {
    border-radius: 12px;
  }

  .workflow-step {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    overflow: hidden;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
  }

  .workflow-step:hover {
    background: var(--surface-soft) !important;
    border-color: var(--border-strong) !important;
    box-shadow: var(--shadow-sm);
  }

  .step-header,
  .step-header:hover,
  .workflow-step:hover .step-header {
    background: transparent !important;
  }

  .step-header {
    min-height: 76px;
    padding: 22px 24px;
  }

  .step-title h3 {
    font-size: 15px;
    letter-spacing: -0.015em;
  }

  .step-hint {
    font-size: 12px;
    line-height: 1.35;
  }

  .step-body {
    background: transparent;
  }

  .step-body.open {
    padding: 0 24px 24px;
  }

  [data-theme="dark"] .workflow-step {
    background: #1f2937 !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.02);
  }

  [data-theme="dark"] .workflow-step:hover {
    background: #2b374a !important;
    border-color: rgba(148, 163, 184, 0.30) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  }

  [data-theme="dark"] .workflow-step.step-active {
    background: #1f2937 !important;
    border-color: rgba(251, 146, 60, 0.46) !important;
    box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.18), 0 14px 34px rgba(0,0,0,0.20) !important;
  }

  [data-theme="dark"] .workflow-step.step-active:hover {
    background: #334155 !important;
    border-color: rgba(251, 146, 60, 0.58) !important;
  }

  [data-theme="dark"] .workflow-step.step-done {
    opacity: 0.72;
    background: rgba(15, 23, 42, 0.72) !important;
  }

  [data-theme="dark"] .workflow-step.step-done:hover {
    opacity: 1;
    background: #1f2937 !important;
  }

  [data-theme="dark"] .step-number {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.28);
    color: #94a3b8;
  }

  [data-theme="dark"] .step-number.active {
    background: #f97316;
    border-color: #fb923c;
    color: #fff;
  }

  [data-theme="dark"] .step-title h3 {
    color: #f8fafc;
  }

  [data-theme="dark"] .workflow-step.step-active .step-title h3 {
    color: #f8fafc;
  }

  [data-theme="dark"] .step-hint {
    color: #a8b3c4 !important;
  }

  [data-theme="dark"] .workflow-progress,
  [data-theme="dark"] .support-card,
  [data-theme="dark"] .view-only-banner {
    background: #1f2937;
    border-color: rgba(148, 163, 184, 0.16);
  }

  [data-theme="dark"] .disclaimer {
    background: #0b1019;
    border-top-color: rgba(148, 163, 184, 0.14);
    color: #64748b;
  }

  @media (max-width: 900px) {
    .topbar {
      min-height: 64px;
      padding: 10px 14px;
    }
    .topbar-date {
      font-size: 12px;
    }
    #topbar-status-badge {
      display: none;
    }
    .step-header {
      min-height: 64px;
      padding: 18px 14px;
    }
  }
