/* ===== Design Tokens ===== */
:root {
  --bg: #10141a;
  --bg-elevated: #161b22;
  --surface: #1a212b;
  --surface-2: #212a35;
  --border: #2a3341;
  --border-light: #364152;

  --text: #eef2f6;
  --text-muted: #8b96a5;
  --text-faint: #5a6472;

  --accent: #14e0cf;
  --accent-dim: #0f8f85;
  --accent-glow: rgba(20, 224, 207, 0.18);
  --accent-text: #0a1512;

  --warn: #ffb020;
  --warn-glow: rgba(255, 176, 32, 0.15);
  --danger: #ff5d73;
  --danger-glow: rgba(255, 93, 115, 0.15);
  --success: #4ade80;
  --success-glow: rgba(74, 222, 128, 0.15);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}
body {
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(20,224,207,0.06), transparent),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(255,176,32,0.04), transparent);
  background-attachment: fixed;
}
a { color: inherit; }
button { font-family: inherit; }
::selection { background: var(--accent-glow); color: var(--text); }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ===== Login ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: -60%; left: -60%;
  width: 60%; height: 220%;
  background: linear-gradient(120deg, transparent, rgba(20,224,207,0.10), transparent);
  transform: rotate(20deg);
  animation: polish-sweep 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes polish-sweep {
  0% { left: -60%; }
  50% { left: 130%; }
  100% { left: 130%; }
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.login-logo-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  color: var(--accent-text);
  flex-shrink: 0;
}
.login-logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.login-wordmark { height: 46px; width: auto; display: block; margin: 0 auto 28px; }
.login-logo-text .eyebrow { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.login-logo-text .title { font-size: 17px; font-weight: 600; }

.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .sub { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: var(--font-body);
  transition: border-color 0.15s;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

.error-box {
  background: var(--danger-glow);
  border: 1px solid rgba(255,93,115,0.35);
  color: #ffb3bf;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.1s, filter 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: var(--accent-text);
  position: relative;
  overflow: hidden;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger-glow); color: #ffb3bf; border: 1px solid rgba(255,93,115,0.35); }
.btn-danger:hover { background: rgba(255,93,115,0.25); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }

/* ===== App Shell ===== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 6px 8px 24px; }
.sidebar-logo .mark {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo .mark img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-logo .title { font-size: 14.5px; font-weight: 600; }
.sidebar-logo .eyebrow { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.nav-group { margin-bottom: 18px; }
.nav-group-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 0 10px;
  margin-bottom: 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  margin-bottom: 2px;
}
.nav-item .icon { width: 18px; text-align: center; flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-glow); color: var(--accent); }
.nav-item.active .icon { opacity: 1; }
.nav-badge {
  margin-left: auto; background: var(--warn); color: #1a1204;
  font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 100px;
  font-family: var(--font-mono);
}

.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; color: var(--text);
  flex-shrink: 0;
}
.user-chip .name { font-size: 13.5px; font-weight: 600; }
.user-chip .role { font-size: 11.5px; color: var(--text-muted); }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
}
.topbar h1 { font-size: 18px; }
.topbar .meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.content { padding: 28px; max-width: 1280px; width: 100%; }

/* ===== Cards / Stat grid ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-card .label { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }
.stat-card .value { font-family: var(--font-display); font-size: 28px; font-weight: 600; }
.stat-card .value.accent { color: var(--accent); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-header h2 { font-size: 16px; }
.card-header .sub { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
.mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 32px; margin-bottom: 10px; opacity: 0.6; }
.empty-state .title { color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-geplant { background: rgba(139,150,165,0.15); color: #b7c0cc; }
.badge-in_arbeit { background: var(--warn-glow); color: var(--warn); }
.badge-abgeschlossen { background: var(--success-glow); color: var(--success); }
.badge-storniert { background: var(--danger-glow); color: #ffb3bf; }
.badge-admin { background: var(--accent-glow); color: var(--accent); }
.badge-mitarbeiter { background: rgba(139,150,165,0.15); color: #b7c0cc; }

/* ===== Buttons row / toolbar ===== */
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--border); padding: 4px; border-radius: var(--radius-sm); }
.filter-tab {
  padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: all 0.12s;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active { background: var(--accent); color: var(--accent-text); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8,10,14,0.65);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; z-index: 100;
  animation: fade-in 0.15s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  animation: modal-in 0.18s cubic-bezier(.2,.9,.3,1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 17px; }
.modal-close { cursor: pointer; color: var(--text-muted); font-size: 20px; line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 22px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ===== Auftrag Detail ===== */
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.info-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--text-muted); }
.info-row .v { font-weight: 500; text-align: right; }

.status-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.checklist-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 4px; border-bottom: 1px solid var(--border);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-check {
  width: 21px; height: 21px; border-radius: 6px; border: 1.5px solid var(--border-light);
  flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.12s; margin-top: 1px; background: var(--bg-elevated);
}
.checklist-check.checked { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.checklist-text { font-size: 14px; flex: 1; }
.checklist-text.done { color: var(--text-muted); text-decoration: line-through; }
.checklist-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }
.pflicht-tag { font-size: 10.5px; color: var(--warn); font-weight: 600; margin-left: 6px; }
.progress-bar { height: 6px; background: var(--bg-elevated); border-radius: 4px; overflow: hidden; margin: 12px 0 4px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); border-radius: 4px; transition: width 0.25s; }

.history-item { display: flex; gap: 12px; padding: 9px 0; font-size: 13px; }
.history-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex-shrink: 0; }
.history-item .t { color: var(--text-faint); font-size: 11.5px; font-family: var(--font-mono); }

/* ===== Checklisten Editor (Admin) ===== */
.punkt-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.punkt-row input[type=text] { flex: 1; }
.punkt-row .pflicht-toggle { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.icon-btn {
  width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--border-light);
  background: var(--surface-2); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px;
}
.icon-btn:hover { color: var(--text); background: var(--border); }

/* ===== Vorlage Cards ===== */
.vorlage-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; background: var(--bg-elevated); }
.vorlage-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.vorlage-card-head .name { font-weight: 600; font-size: 14.5px; }
.vorlage-card-head .leistung { font-size: 12px; color: var(--text-muted); }
.vorlage-punkt-list { font-size: 13px; color: var(--text-muted); }
.vorlage-punkt-list li { margin-bottom: 4px; }

/* ===== Toast ===== */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface-2); border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 13.5px; box-shadow: var(--shadow);
  animation: toast-in 0.2s ease;
  min-width: 240px;
}
.toast.success { border-color: rgba(74,222,128,0.35); }
.toast.error { border-color: rgba(255,93,115,0.35); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ===== Misc ===== */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.mb-0 { margin-bottom: 0 !important; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}

/* ===== Checklisten-Fokus-Modus (Vollbild, Schritt-für-Schritt) ===== */
.focus-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(20,224,207,0.08), transparent),
    radial-gradient(ellipse 700px 500px at 100% 100%, rgba(255,176,32,0.05), transparent);
  display: flex; flex-direction: column;
  animation: fade-in 0.18s ease;
}
.focus-header {
  padding: 20px 28px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.focus-header .info .titel { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.focus-header .info .sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.focus-close {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-light);
  background: var(--surface); color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; flex-shrink: 0;
}
.focus-close:hover { color: var(--text); background: var(--surface-2); }

.focus-progress-track { height: 4px; background: var(--bg-elevated); flex-shrink: 0; }
.focus-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); transition: width 0.3s ease; }

.focus-step-count {
  text-align: center; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint);
  padding: 14px 0 0;
  flex-shrink: 0;
}

.focus-body {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px; text-align: center;
  gap: 28px;
}
.focus-pflicht-badge {
  font-size: 11.5px; font-weight: 700; color: var(--warn); letter-spacing: 0.08em;
  text-transform: uppercase;
}
.focus-item-text {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(22px, 4.5vw, 40px);
  max-width: 780px; line-height: 1.25;
}
.focus-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
.focus-btn-done {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: var(--accent-text);
  border: none; border-radius: var(--radius);
  padding: 20px 52px; font-size: 18px; font-weight: 700; font-family: var(--font-body);
  cursor: pointer; transition: transform 0.1s, filter 0.15s;
  position: relative; overflow: hidden;
}
.focus-btn-done:hover { filter: brightness(1.08); }
.focus-btn-done:active { transform: scale(0.98); }
.focus-btn-back {
  background: var(--surface); border: 1px solid var(--border-light); color: var(--text-muted);
  border-radius: var(--radius); padding: 20px 24px; font-size: 15px; cursor: pointer;
}
.focus-btn-back:hover { color: var(--text); background: var(--surface-2); }
.focus-btn-back:disabled { opacity: 0.3; cursor: not-allowed; }

.focus-dots { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; max-width: 500px; }
.focus-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-light); transition: background 0.15s; }
.focus-dot.done { background: var(--success); }
.focus-dot.current { background: var(--accent); width: 22px; border-radius: 5px; }

.focus-complete-icon {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--success-glow); color: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.focus-complete-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.focus-complete-sub { color: var(--text-muted); font-size: 14.5px; max-width: 420px; }

/* ===== Kunde-Suche mit Live-Vorschlägen ===== */
.suche-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface-2); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  max-height: 240px; overflow-y: auto; z-index: 50;
}
.suche-dropdown-item { padding: 10px 13px; font-size: 14px; cursor: pointer; }
.suche-dropdown-item:hover, .suche-dropdown-item.highlighted { background: var(--accent-glow); color: var(--accent); }
.suche-dropdown-empty { padding: 12px 13px; font-size: 13px; color: var(--text-faint); }
.kunde-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--accent-glow); border: 1px solid rgba(20,224,207,0.3);
  border-radius: var(--radius-sm); padding: 10px 13px; font-size: 14px; font-weight: 600;
}
.kunde-chip .aendern { font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; text-decoration: underline; }
.kunde-chip .aendern:hover { color: var(--text); }

/* ===== Firmenkalender (Monatsraster, Apple-Kalender-Stil) ===== */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-nav-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border-light);
  background: var(--surface); color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px;
}
.cal-nav-btn:hover { color: var(--text); background: var(--surface-2); }
.cal-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; min-width: 210px; text-align: center; }

.cal-grid {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--border);
}
.cal-weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-weekday {
  text-align: center; padding: 10px 4px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint);
  background: var(--surface);
}
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day {
  background: var(--bg-elevated); min-height: 118px; padding: 6px 5px;
  display: flex; flex-direction: column; gap: 3px;
  border-top: 1px solid var(--border);
}
.cal-day.ausserhalb { background: var(--surface); opacity: 0.45; }
.cal-day-nr {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-family: var(--font-mono); color: var(--text-muted);
  flex-shrink: 0; margin-bottom: 2px;
}
.cal-day-nr.heute { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.cal-lane-slot { height: 19px; }
.cal-segment {
  height: 19px; font-size: 11px; font-weight: 600; display: flex; align-items: center;
  padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; background: var(--surface-2); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light);
  margin: 0 -5px;
}
.cal-segment.start { margin-left: 0; border-left: 1px solid var(--border-light); border-radius: 5px 0 0 5px; padding-left: 7px; }
.cal-segment.ende { margin-right: 0; border-right: 1px solid var(--border-light); border-radius: 0 5px 5px 0; }
.cal-segment.start.ende { margin: 0; border-radius: 5px; }
.cal-segment.status-geplant { border-left: 3px solid var(--accent); }
.cal-segment.status-geplant.start { border-left: 3px solid var(--accent); }
.cal-segment.status-in_arbeit { background: var(--warn-glow); }
.cal-segment.status-in_arbeit.start { border-left: 3px solid var(--warn); }
.cal-segment.status-abgeschlossen { background: var(--success-glow); }
.cal-segment.status-abgeschlossen.start { border-left: 3px solid var(--success); }
.cal-overflow { font-size: 10.5px; color: var(--text-faint); padding: 0 6px; cursor: pointer; }
.cal-overflow:hover { color: var(--accent); }
