/* =============================================================================
   Centre 3.0 – main.css
   ============================================================================= */
/* ─────────────────────────────────────────────────────────────────────────────
   1. DESIGN-TOKENS (CSS Custom Properties)
   Alle Farben, Abstände und Typografie-Werte zentral hier definieren.
   Im Dark-Mode werden die Variablen auf body.dark-mode überschrieben.
───────────────────────────────────────────────────────────────────────────── */
:root {
  /* Markenfarbe / Akzent */
  --accent: #5D5FEF;
  --accent-hover: #4a4cd8;
  --accent-rgb: 93, 95, 239;
  --accent-10: rgba(93, 95, 239, 0.10);
  --accent-08: rgba(93, 95, 239, 0.08);
  --accent-dark: #818cf8;
  /* Textfarben */
  --text-primary: #151D48;
  --text-secondary: #737791;
  --text-muted: #a0a3b5;
  --text-faint: #b0b3c5;
  --text-faintest: #c0c3d4;
  /* Hintergründe */
  --bg-app: #fff;
  --bg-main: #F2F5F8;
  --bg-card: #fff;
  --bg-input: #F2F5F8;
  --bg-hover: #fafbff;
  --bg-row-hover: #f5f6ff;
  /* Rahmen / Trennlinien */
  --border-light: #f0f2f8;
  --border-mid: #e4e6f0;
  --border-strong: #d0d3e8;
  /* Statusfarben */
  --color-danger: #F64E60;
  --color-danger-10: rgba(246, 78, 96, 0.10);
  --color-warn: #E09700;
  --color-warn-12: rgba(255, 168, 0, 0.12);
  --color-success: #2E9E47;
  --color-success-12: rgba(80, 196, 100, 0.12);
  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed-w: 72px;
  --sidebar-bg: #fff;
  /* Topline */
  --topline-height: 88px;
  --topline-bg: #fff;
  /* Abstände & Radien */
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-btn: 10px;
  --radius-badge: 8px;
  --gap-view: 20px;
  /* Typografie */
  --font: 'Poppins', sans-serif;
  /* Schatten */
  --shadow-menu: 0 8px 32px rgba(55, 69, 87, 0.15);
  --shadow-modal: 0 24px 80px rgba(21, 29, 72, 0.22);
}

/* Legacy component tokens resolve to the central Centre Design System. */
:root{--accent:var(--ds-primary);--accent-hover:var(--ds-primary-hover);--accent-10:var(--ds-primary-soft);--text-primary:var(--ds-text);--text-secondary:var(--ds-text-secondary);--text-muted:var(--ds-text-muted);--bg-app:var(--ds-surface);--bg-main:var(--ds-canvas);--bg-card:var(--ds-surface);--bg-input:var(--ds-surface-subtle);--border-light:var(--ds-border-subtle);--border-mid:var(--ds-border);--radius-card:var(--ds-radius-xl);--radius-input:var(--ds-radius-lg);--radius-btn:var(--ds-radius-md);--font:var(--ds-font);--shadow-modal:var(--ds-shadow-modal)}

/* ─── Dark-Mode Token-Überschreibungen ─────────────────────────────────────── */
body.dark-mode {
  --accent: #5D5FEF;
  --accent-hover: #6769f5;
  --accent-dark: #818cf8;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-faint: #6b7280;
  --text-faintest: #4b5563;
  --bg-app: #111827;
  --bg-main: #111827;
  --bg-card: #1f2937;
  --bg-input: #374151;
  --bg-hover: #1a2234;
  --bg-row-hover: #2d3748;
  --border-light: #374151;
  --border-mid: #374151;
  --border-strong: #4b5563;
  --sidebar-bg: #1f2937;
  --topline-bg: #1f2937;
  --shadow-menu: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.7);
}

/* ─────────────────────────────────────────────────────────────────────────────
   2. RESET & GRUNDREGELN
───────────────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  padding: 0;
  margin: 0;
  font-family: var(--font);
  background: var(--bg-app);
  color: var(--text-primary);
}

/* Dunkle Grundfarben */
body.dark-mode p {
  color: #d1d5db;
}

body.dark-mode strong {
  color: #f9fafb;
}

/* ─────────────────────────────────────────────────────────────────────────────
   3. APP-LAYOUT
───────────────────────────────────────────────────────────────────────────── */
.app {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────────────────────
   4. SIDEBAR
───────────────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--sidebar-bg);
  /* Animierte Breite für Desktop-Collapse */
  transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1),
    min-width 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .sidebar {
  border-right: 1px solid var(--border-light);
}

/* ── Brand ── */
.sidebar .brand {
  flex-shrink: 0;
  height: var(--topline-height);
  padding: 0 36px;
  display: flex;
  align-items: center;
}

.sidebar .brand a {
  display: inline-flex;
  align-items: center;
}

.sidebar .brand a img {
  height: 30px;
  width: auto;
}

/* ── Navigation ── */
.sidebar nav {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0 20px;
  scrollbar-width: thin;
  scrollbar-color: #e8eaf0 transparent;
}

.sidebar nav::-webkit-scrollbar {
  width: 3px;
}

.sidebar nav::-webkit-scrollbar-thumb {
  background: #e8eaf0;
  border-radius: 3px;
}

.sidebar nav ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar nav ul li {
  width: 100%;
}

/* Reihenfolge der Hauptnavigation; Verwaltung klar davon getrennt. */
.sidebar nav ul li{order:initial!important}
.sidebar nav ul li:nth-child(11){border-top:0;margin-top:0;padding-top:0}
.sidebar nav ul li.admin-divider{position:relative;border-top:1px solid var(--border-light);margin-top:24px;padding-top:16px}.sidebar nav ul li.admin-divider::before{content:"Admin";position:absolute;top:-10px;left:12px;padding:0 6px;background:var(--sidebar-bg);color:var(--text-muted);font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}.nav-unread{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:6px;padding:0 5px;border-radius:999px;background:var(--color-danger);color:#fff;font-size:10px;font-weight:700;vertical-align:middle}.nav-link.selected .nav-unread,.nav-link:hover .nav-unread{background:#fff;color:var(--accent)}
.sidebar nav ul li:nth-child(1){order:1}.sidebar nav ul li:nth-child(4){order:2}.sidebar nav ul li:nth-child(5){order:3}.sidebar nav ul li:nth-child(2){order:4}.sidebar nav ul li:nth-child(3){order:5}.sidebar nav ul li.projects-nav-item{order:6}.sidebar nav ul li:nth-child(6){order:7}.sidebar nav ul li:nth-child(7){order:8}.sidebar nav ul li:nth-child(8){order:9}.sidebar nav ul li:nth-child(9){order:10}.sidebar nav ul li.admin-nav-item{order:20}.sidebar nav ul li.admin-nav-item:first-of-type{border-top:1px solid var(--border-light);margin-top:12px;padding-top:12px}

.sidebar nav ul li a {
  display: flex;
  padding: 14px 18px;
  align-items: center;
  gap: 14px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  border-radius: 14px;
  text-decoration: none;
  transition: background 250ms ease, color 250ms ease;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar nav ul li a .icon {
  width: 24px;
  flex-shrink: 0;
  aspect-ratio: 1;
  background-color: var(--text-secondary);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  transition: background-color 250ms ease;
}

.sidebar nav ul li a.selected,
.sidebar nav ul li a:hover {
  background: var(--accent);
  color: #fff;
}

.sidebar nav ul li a.selected .icon,
.sidebar nav ul li a:hover .icon {
  background-color: #fff;
}

/* ── Centre Wordmark (unten) ── */
.sidebar .logo {
  flex-shrink: 0;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar .logo a {
  display: inline-flex;
  align-items: center;
}

.sidebar .logo a img {
  height: 20px;
  width: auto;
  opacity: 0.5;
  transition: opacity 200ms;
}

.sidebar .logo a:hover img {
  opacity: 0.9;
}

/* Brand-Wordmark */
.brand-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.3px;
  transition: color 200ms;
}

.brand-title:hover {
  color: var(--accent);
}

.brand-img {
  height: 28px;
  width: auto;
  flex-shrink: 0;
}

.centre-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-decoration: none;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transition: color 200ms;
}

.centre-wordmark:hover {
  color: var(--accent);
}

.centre-wordmark:hover .centre-wordmark-img {
  opacity: 0.85;
}

.centre-wordmark-img {
  height: 18px;
  width: auto;
  opacity: 0.45;
  transition: opacity 200ms;
}

body.dark-mode .brand-title {
  color: #f9fafb;
}

body.dark-mode .brand-title:hover {
  color: var(--accent-dark);
}

body.dark-mode .centre-wordmark {
  color: #6b7280;
}

body.dark-mode .centre-wordmark:hover {
  color: var(--accent-dark);
}

body.dark-mode .centre-wordmark-img {
  filter: brightness(0) invert(1);
  opacity: 0.3;
}

body.dark-mode .centre-wordmark:hover .centre-wordmark-img {
  opacity: 0.7;
}

/* ─── Admin: Arbeitszeiten & Personalakte ───────────────────────────────── */
.admin-nav-item em{font-style:normal;font-size:10px;padding:2px 5px;margin-left:5px;border-radius:5px;background:var(--accent-10);color:var(--accent);font-weight:700}.nav-link.selected em,.nav-link:hover em{background:rgba(255,255,255,.2);color:#fff}.admin-view{max-width:1400px}.admin-head{display:flex;justify-content:space-between;gap:18px;margin:2px 0 18px}.admin-head h2{font-size:20px;margin:7px 0 3px}.admin-head p{margin:0;color:var(--text-secondary);font-size:13px}.admin-only{display:inline-flex;background:var(--accent-10);color:var(--accent);border-radius:6px;padding:3px 7px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.admin-filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.admin-filters select,.admin-filters input{height:40px;min-width:180px;border:1px solid var(--border-mid);border-radius:10px;background:var(--bg-card);color:var(--text-primary);padding:0 12px;font-family:inherit}.admin-filters input{flex:1}.admin-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:16px}.admin-kpi{border:1px solid var(--border-light);background:var(--bg-card);padding:14px;border-radius:12px}.admin-kpi span{display:block;color:var(--text-secondary);font-size:11px}.admin-kpi strong{display:block;font-size:20px;margin-top:4px}.admin-warning,.admin-privacy{border:1px solid #f4d58a;background:#fff7df;color:#825c0b;border-radius:10px;padding:12px 14px;font-size:12px;margin-bottom:16px}.admin-privacy{border-color:#cbd8ff;background:#eef4ff;color:#385797}.admin-table-card{padding:0;overflow:hidden}.admin-table-wrap{overflow:auto}.admin-table{width:100%;min-width:860px;border-collapse:collapse;font-size:12px}.admin-table th{text-align:left;padding:12px 16px;background:var(--bg-input);color:var(--text-secondary);font-size:10px;text-transform:uppercase;letter-spacing:.04em}.admin-table td{padding:13px 16px;border-top:1px solid var(--border-light)}.admin-person{font-weight:600}.admin-sub{font-size:11px;color:var(--text-secondary)}.admin-tag{display:inline-flex;border-radius:6px;padding:4px 7px;font-size:11px;font-weight:600}.admin-tag.ok{background:var(--color-success-12);color:var(--color-success)}.admin-tag.warn{background:var(--color-warn-12);color:var(--color-warn)}.admin-tag.bad{background:var(--color-danger-10);color:var(--color-danger)}.admin-day{display:inline-block;background:var(--color-warn-12);color:var(--color-warn);border-radius:5px;padding:3px 5px;margin:1px;font-size:10px}.admin-action{border:1px solid var(--border-mid);border-radius:7px;background:var(--bg-card);color:var(--accent);padding:6px 8px;font:inherit;font-size:11px}.admin-record-summary{display:flex;gap:20px;align-items:center}.admin-record-summary h3{margin:0;font-size:18px}.admin-record-summary p{margin:3px 0;color:var(--text-secondary);font-size:12px}.admin-record-metrics{display:flex;gap:10px;margin-left:auto}.admin-record-metrics div{background:var(--bg-input);padding:9px 12px;border-radius:9px;font-size:11px}.admin-record-metrics strong{display:block;font-size:14px}.admin-tabs{display:flex;overflow:auto;border-bottom:1px solid var(--border-mid);gap:4px;margin-top:20px}.admin-tabs button{background:transparent;color:var(--text-secondary);border:0;border-bottom:2px solid transparent;border-radius:0;padding:11px 12px;font-size:12px}.admin-tabs button.active{color:var(--accent);border-color:var(--accent)}.admin-doc{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--border-light)}.admin-doc:first-child{border-top:0}.admin-doc-icon{background:var(--color-danger-10);color:var(--color-danger);border-radius:8px;padding:8px;font-weight:700;font-size:10px}.admin-doc div{flex:1}.admin-doc strong{font-size:12px}.admin-doc span{display:block;font-size:11px;color:var(--text-secondary)}
@media(max-width:768px){.admin-head h2{font-size:17px}.admin-filters>*{width:100%;min-width:0!important}.admin-kpis{grid-template-columns:repeat(2,1fr)}.admin-kpis .admin-kpi:last-child{grid-column:1/-1}.admin-record-summary{align-items:flex-start;flex-direction:column}.admin-record-metrics{margin:0;display:grid;grid-template-columns:repeat(2,1fr);width:100%}}

/* Admin views deliberately reuse the established card, table and filter language. */
.admin-view .admin-head{margin:0 0 20px}.admin-view .admin-head h2{font-size:18px;font-weight:600}.admin-view .admin-filters{min-height:40px;align-items:center;margin:0 0 20px}.admin-view .admin-filters select,.admin-view .admin-filters input{height:38px;min-width:160px;background:var(--bg-input);border:2px solid transparent;border-radius:var(--radius-input);font-family:var(--font);font-size:13px;color:var(--text-primary);outline:none;transition:border-color 200ms,background 200ms}.admin-view .admin-filters select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23a0a3b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:16px;padding:0 36px 0 14px}.admin-view .admin-filters input{padding:0 14px}.admin-view .admin-filters select:focus,.admin-view .admin-filters input:focus{background:var(--bg-card);border-color:var(--accent)}.admin-view .admin-table-card{padding:20px 0 0;border-radius:var(--radius-card)}.admin-view .admin-table-card .card-header{padding:0 24px 12px}.admin-view .admin-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.admin-view .admin-table{min-width:760px;margin-top:0;border-collapse:collapse;font-size:inherit}.admin-view .admin-table thead tr{border-bottom:1px solid var(--border-light)}.admin-view .admin-table th{padding:10px 24px;background:transparent;color:var(--text-muted);font-size:12px;font-weight:500;text-transform:none;letter-spacing:0}.admin-view .admin-table td{padding:15px 24px;font-size:14px;border-top:0}.admin-view .admin-table tbody tr{border-bottom:1px solid #f7f8fc;transition:background 150ms}.admin-view .admin-table tbody tr:hover{background:var(--bg-row-hover)}.admin-view .admin-tag{border-radius:var(--radius-badge);padding:5px 8px;font-size:11px;font-weight:600}.admin-view .admin-action{height:30px;padding:0 10px;border:0;border-radius:var(--radius-btn);background:var(--accent-10);color:var(--accent);font-family:var(--font);font-size:12px;font-weight:600}.admin-view .admin-action:hover{background:var(--accent);color:#fff}.admin-view .admin-kpis{gap:var(--gap-view)}.admin-view .admin-kpi{border:0;border-radius:var(--radius-card);box-shadow:0 2px 8px rgba(0,0,0,.035);padding:16px 18px}.admin-view .admin-kpi span{font-size:12px}.admin-view .admin-kpi strong{font-size:18px}.admin-view .admin-tabs{margin-top:20px;padding:0 12px;border:0;border-radius:var(--radius-card) var(--radius-card) 0 0;background:var(--bg-card)}.admin-view .admin-tabs button{font-family:var(--font);font-size:13px;font-weight:500}.admin-view .admin-record-summary{padding:20px}.admin-view .admin-record-summary h3{font-size:16px}.admin-view .admin-record-metrics div{background:var(--bg-main);border-radius:10px;padding:10px 14px}.admin-view .admin-privacy,.admin-view .admin-warning{border:0;border-radius:var(--radius-card);padding:14px 18px;font-size:13px}.admin-view .admin-doc{padding:15px 0}.admin-view .admin-doc strong{font-size:14px}
body.dark-mode .admin-view .admin-filters select,body.dark-mode .admin-view .admin-filters input{background-color:var(--border-light);border-color:var(--border-strong);color:#e5e7eb}body.dark-mode .admin-view .admin-filters select:focus,body.dark-mode .admin-view .admin-filters input:focus{background:#1f2937;border-color:var(--accent)}body.dark-mode .admin-view .admin-table tbody tr{border-color:var(--border-light)}body.dark-mode .admin-view .admin-table tbody tr:hover{background:#2d3748}body.dark-mode .admin-view .admin-table-card{background:var(--bg-card)}

/* The personnel selector shares the header action component without select chrome. */
.header-actions input.zt-user-select{appearance:none;background-image:none;padding:0 14px;cursor:text}.admin-view .admin-record-summary{display:block}.admin-view .admin-record-summary>#admin-record-summary{display:flex;gap:20px;align-items:center;padding:8px 4px 2px}.admin-view .admin-table-card>.admin-kpis{padding:0 24px}.admin-view .admin-table-card>.admin-warning{margin:0 24px 16px}
#admin-time-apply{display:none}
.admin-view .card-header .card-title{display:none}.admin-view .card-header{justify-content:flex-end}.admin-record-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.admin-employee-card{padding:20px;cursor:pointer}.admin-employee-card:hover{background:var(--bg-hover)}.admin-employee-card h3{margin:0 0 4px;font-size:16px}.admin-employee-card p{margin:0;color:var(--text-secondary);font-size:13px}.admin-employee-card span{display:inline-block;margin-top:14px;color:var(--accent);font-size:12px;font-weight:600}
@media(max-width:768px){.admin-view .admin-record-summary>#admin-record-summary{align-items:flex-start;flex-direction:column}.header-actions input.zt-user-select{width:100%}}
@media(max-width:900px){.admin-record-list{grid-template-columns:1fr}}
.admin-employee-card{border:1px solid var(--border-light);border-radius:var(--radius-card)}.admin-employee-metrics{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:16px 0}.admin-employee-metrics span,.admin-detail-grid div{background:var(--bg-main);border-radius:9px;padding:9px;font-size:11px;color:var(--text-secondary)}.admin-employee-metrics strong,.admin-detail-grid strong{display:block;color:var(--text-primary);font-size:13px;margin-top:2px}.admin-employee-card>b{color:var(--accent);font-size:12px}.admin-back{margin:0 0 14px}.admin-detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.admin-view .admin-record-summary .card-header{display:none}#view-admin-personalakte .card .card-title{display:flex}.admin-view:not(#view-admin-personalakte) .card .card-title{display:none!important}#view-admin-personalakte .admin-record-list .card-title{display:none}@media(max-width:768px){.admin-detail-grid{grid-template-columns:1fr}}
#view-admin-personalakte .card{padding:0;overflow:hidden}#view-admin-personalakte .card-header{padding:20px 24px}#view-admin-personalakte .table-scroll-wrap{width:100%}#view-admin-personalakte .table-scroll-wrap .data-table{width:100%;margin-top:0}
.admin-view .data-table th:last-child,.admin-view .data-table td:last-child{text-align:right;white-space:nowrap}
.admin-view{width:100%;max-width:none}.admin-view>.card,.admin-view>.ap-kpi-row{width:100%}.admin-view .card{width:100%}
#view-admin-urlaub #admin-leave-kpis{display:none}
.project-management-view{height:100%;min-height:0}.project-management-frame{display:block;width:100%;height:100%;min-height:calc(100vh - var(--topline-height) - 40px);border:0;border-radius:var(--radius-card);background:#0f0f0f}
.chat-view{height:100%;min-height:0}.chat-layout{height:100%;min-height:620px;display:grid;grid-template-columns:320px minmax(0,1fr);gap:20px}.chat-list-card,.chat-conversation{margin:0;overflow:hidden}.chat-list-card{padding:0}.chat-list-card .card-header{padding:20px 20px 12px}.chat-list{border-top:1px solid var(--border-light)}.chat-list-item{width:100%;display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;padding:14px 16px;border:0;border-bottom:1px solid var(--border-light);border-radius:0;background:var(--bg-card);color:var(--text-primary);text-align:left;font-family:var(--font)}.chat-list-item:hover,.chat-list-item.active{background:var(--accent-08)}.chat-avatar{width:38px;height:38px;display:inline-grid;place-items:center;flex:0 0 auto;border-radius:50%;background:var(--accent-10);color:var(--accent);font-size:11px;font-weight:700}.chat-list-copy{min-width:0;display:grid;gap:2px}.chat-list-copy b{font-size:13px;font-weight:600}.chat-list-copy small{overflow:hidden;color:var(--text-secondary);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.chat-meta{align-self:start;color:var(--text-muted);font-size:10px;text-align:right}.chat-meta i{display:grid;place-items:center;width:17px;height:17px;margin:4px 0 0 auto;border-radius:50%;background:var(--accent);color:#fff;font-size:10px;font-style:normal}.chat-conversation{display:flex;flex-direction:column;padding:0}.chat-conversation .card-header{padding:16px 24px;border-bottom:1px solid var(--border-light)}.chat-conversation .card-title{gap:10px}.chat-conversation h2{margin:0;font-size:14px}.chat-presence{color:var(--color-success);font-size:11px}.chat-messages{display:flex;flex:1;flex-direction:column;gap:12px;overflow:auto;padding:24px}.chat-date{align-self:center;color:var(--text-muted);font-size:11px}.chat-bubble{max-width:min(72%,520px);padding:10px 12px;border-radius:12px;font-size:13px;line-height:1.45}.chat-bubble span{display:block;margin-top:4px;color:var(--text-muted);font-size:10px;text-align:right}.chat-bubble.incoming{align-self:flex-start;background:var(--bg-input);border-bottom-left-radius:3px}.chat-bubble.outgoing{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:3px}.chat-bubble.outgoing span{color:rgba(255,255,255,.72)}.chat-compose{display:flex;gap:10px;padding:16px 24px;border-top:1px solid var(--border-light)}.chat-compose input{min-width:0;flex:1;height:42px;padding:0 14px;border:2px solid transparent;border-radius:var(--radius-input);outline:0;background:var(--bg-input);font-family:var(--font);color:var(--text-primary)}.chat-compose input:focus{border-color:var(--accent);background:var(--bg-card)}@media(max-width:768px){.chat-layout{min-height:calc(100vh - 150px);grid-template-columns:1fr}.chat-list-card{display:none}.chat-messages{padding:16px}.chat-compose{padding:12px 16px}.chat-conversation .card-header{padding:14px 16px}}
.chat-avatar.group{border-radius:10px}.chat-attach{display:grid;place-items:center;width:42px;height:42px;border-radius:var(--radius-input);background:var(--bg-input);color:var(--accent);font-size:22px;cursor:pointer}.chat-image{display:block;max-width:260px;max-height:180px;border-radius:8px}.chat-file{display:inline-block!important;padding:8px 10px!important;border-radius:8px;background:rgba(255,255,255,.17);color:inherit!important;font-size:12px!important;text-align:left!important}
.chat-conversation .card-title{align-items:center}.chat-conversation .card-title>div{display:grid;gap:0}.chat-conversation .chat-presence{display:none}.chat-conversation .chat-avatar{position:relative}.chat-conversation .chat-avatar::after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border:2px solid var(--bg-card);border-radius:50%;background:#a0a3b5}.chat-conversation .chat-avatar.online::after{background:var(--color-success)}.chat-conversation .chat-avatar.away::after{background:var(--color-warn)}.chat-conversation .chat-avatar.busy::after{background:var(--color-danger)}.chat-conversation .chat-avatar.offline::after{background:var(--text-muted)}

/* ── Desktop Collapse-Button ── */
.sidebar-collapse-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 18px;
  flex-shrink: 0;
  background: none;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 200ms, color 200ms, border-color 200ms;
}

.sidebar-collapse-btn:hover {
  background: var(--bg-main);
  color: var(--accent);
  border-color: #d6d8f0;
}

body.dark-mode .sidebar-collapse-btn {
  border-color: #2a3060;
  color: #7a83b8;
}

body.dark-mode .sidebar-collapse-btn:hover {
  background: #1e2443;
  color: #8b8ff0;
  border-color: #3d4480;
}

.collapse-icon-closed {
  display: none;
}

/* ── Collapsed State (Desktop) ── */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-w);
  min-width: var(--sidebar-collapsed-w);
}

.sidebar.collapsed .brand {
  padding: 0;
  justify-content: center;
}

.sidebar.collapsed .brand-title span {
  display: none;
}

.sidebar.collapsed nav {
  padding: 0 10px;
}

.sidebar.collapsed nav ul li a {
  padding: 14px 0;
  justify-content: center;
  gap: 0;
  border-radius: 12px;
  position: relative;
}

.sidebar.collapsed nav ul li a span {
  display: none;
}

/* Tooltip bei eingeklappter Sidebar */
.sidebar.collapsed nav ul li a::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease;
  z-index: 500;
}

body.dark-mode .sidebar.collapsed nav ul li a::after {
  background: #e0e4f8;
  color: var(--text-primary);
}

.sidebar.collapsed nav ul li a:hover::after {
  opacity: 1;
}

.sidebar.collapsed .logo {
  justify-content: center;
}

.sidebar.collapsed .centre-wordmark span {
  display: none;
}

.sidebar.collapsed .centre-wordmark {
  gap: 0;
}

.sidebar.collapsed .collapse-icon-open {
  display: none;
}

.sidebar.collapsed .collapse-icon-closed {
  display: block;
}

.sidebar.collapsed .sidebar-mobile-only {
  display: none;
}

/* ── Sidebar Overlay (Mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 199;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 300ms;
}

.sidebar-overlay.active {
  display: block;
}

/* ── Mobile-Only Sidebar-Einträge ── */
.sidebar-mobile-only {
  display: none;
}

.sidebar-mobile-user {
  display: none;
  flex-shrink: 0;
  padding: 0 20px 20px;
}

.sidebar-mobile-user-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-main);
  border-radius: 14px;
}

body.dark-mode .sidebar-mobile-user-inner {
  background: #374151;
}

.sidebar-mobile-thumb {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: url('../assets/images/thumb.png') center / cover;
}

.sidebar-mobile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-mobile-info strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-mobile-info span {
  font-size: 12px;
  color: var(--text-secondary);
}

body.dark-mode .sidebar-mobile-info strong {
  color: #f9fafb;
}

body.dark-mode .sidebar-mobile-info span {
  color: var(--text-secondary);
}

/* ─────────────────────────────────────────────────────────────────────────────
   5. MAIN CONTENT & TOPLINE
───────────────────────────────────────────────────────────────────────────── */
.main-content {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dark-mode .main-content {
  background: var(--bg-app);
}

.topline {
  flex-shrink: 0;
  height: var(--topline-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  background: var(--topline-bg);
}

body.dark-mode .topline {
  border-bottom: 1px solid var(--border-light);
}

.topline h1 {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}

/* Suchfeld */
.topline .search {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.topline .search .search-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
  z-index: 1;
}

.topline .search input {
  width: 100%;
  height: 50px;
  padding: 0 52px 0 48px;
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  outline: none;
  transition: border-color 250ms, background 250ms;
}

.topline .search input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
}

.topline .search input::placeholder {
  color: var(--text-faint);
}

body.dark-mode .topline .search input {
  background: #374151;
  color: #e5e7eb;
  border-color: transparent;
}

body.dark-mode .topline .search input::placeholder {
  color: var(--text-muted);
}

body.dark-mode .topline .search input:focus {
  border-color: var(--accent);
  background: #1f2937;
}

body.dark-mode .topline .search .search-icon {
  color: var(--text-muted);
}

.topline .user {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   6. BENACHRICHTIGUNGSGLOCKE
───────────────────────────────────────────────────────────────────────────── */
.notification-wrap {
  position: relative;
}

.topline .user .notification {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 168, 0, 0.10) url('../assets/icons/solar_bell-line-duotone.svg') center / 22px no-repeat;
  position: relative;
  cursor: pointer;
  transition: background-color 200ms;
}

.topline .user .notification:hover {
  background-color: rgba(255, 168, 0, 0.18);
}

body.dark-mode .topline .user .notification {
  background-color: rgba(255, 168, 0, 0.15);
}

.topline .user .notification .badge {
  width: 9px;
  height: 9px;
  top: 7px;
  right: 7px;
  position: absolute;
  border-radius: 50%;
  background: var(--color-danger);
  border: 2px solid var(--bg-card);
}

body.dark-mode .topline .user .notification .badge {
  border-color: #1f2937;
}

/* ── Benachrichtigungs-Panel ── */
.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  background: var(--bg-card);
  border-radius: 18px;
  box-shadow: var(--shadow-menu);
  z-index: 600;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.notif-panel.open {
  display: flex;
}

body.dark-mode .notif-panel {
  background: #1f2937;
  box-shadow: var(--shadow-menu);
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-light);
}

.notif-panel-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

body.dark-mode .notif-panel-header h3 {
  color: #f9fafb;
}

body.dark-mode .notif-panel-header {
  border-bottom-color: var(--border-light);
}

.notif-mark-all {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: opacity 200ms;
  font-family: var(--font);
}

.notif-mark-all:hover {
  opacity: 0.7;
}

body.dark-mode .notif-mark-all {
  color: var(--accent-dark);
}

.notif-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  padding: 0 20px;
}

body.dark-mode .notif-tabs {
  border-bottom-color: var(--border-light);
}

.notif-tab {
  padding: 10px 14px 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 200ms, border-color 200ms;
  font-family: var(--font);
}

.notif-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

body.dark-mode .notif-tab {
  color: var(--text-muted);
}

body.dark-mode .notif-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.notif-list {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e8eaf0 transparent;
  padding: 8px 0;
}

.notif-list::-webkit-scrollbar {
  width: 3px;
}

.notif-list::-webkit-scrollbar-thumb {
  background: #e8eaf0;
  border-radius: 3px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 150ms;
  position: relative;
}

.notif-item:hover {
  background: var(--bg-hover);
}

.notif-item.unread {
  background: rgba(93, 95, 239, 0.03);
}

body.dark-mode .notif-item.unread {
  background: #1a2234;
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.notif-icon-wrap {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-icon-wrap.type-overdue {
  background: var(--color-danger-10);
}

.notif-icon-wrap.type-warning {
  background: var(--color-warn-12);
}

.notif-icon-wrap.type-info {
  background: var(--accent-10);
}

.notif-icon-wrap.type-success {
  background: var(--color-success-12);
}

.notif-icon-wrap .ni {
  width: 20px;
  height: 20px;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.notif-icon-wrap.type-overdue .ni {
  background-color: var(--color-danger);
}

.notif-icon-wrap.type-warning .ni {
  background-color: var(--color-warn);
}

.notif-icon-wrap.type-info .ni {
  background-color: var(--accent);
}

.notif-icon-wrap.type-success .ni {
  background-color: var(--color-success);
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-body strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.notif-body p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notif-time {
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
  padding-top: 2px;
  flex-shrink: 0;
}

.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}

body.dark-mode .notif-body strong {
  color: #f9fafb;
}

body.dark-mode .notif-body p {
  color: var(--text-secondary);
}

body.dark-mode .notif-time {
  color: var(--text-muted);
}

.notif-panel-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

body.dark-mode .notif-panel-footer {
  border-top-color: var(--border-light);
}

.notif-panel-footer a {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 200ms;
}

.notif-panel-footer a:hover {
  opacity: 0.7;
}

body.dark-mode .notif-panel-footer a {
  color: var(--accent-dark);
}

/* ─────────────────────────────────────────────────────────────────────────────
   7. PROFIL-DROPDOWN
───────────────────────────────────────────────────────────────────────────── */
.topline .user .profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 12px 6px 6px;
  border-radius: 14px;
  transition: background 200ms;
}

.topline .user .profile:hover {
  background: var(--bg-main);
}

body.dark-mode .topline .user .profile:hover {
  background: #374151;
}

.topline .user .profile .thumb {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  background: url('../assets/images/thumb.png') center / cover;
}

.topline .user .profile .title {
  display: flex;
  flex-direction: column;
}

.topline .user .profile .title h5 {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
}

.topline .user .profile .title em {
  color: var(--text-secondary);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  white-space: nowrap;
}

body.dark-mode .topline .user .profile .title h5 {
  color: #f9fafb;
}

body.dark-mode .topline .user .profile .title em {
  color: var(--text-secondary);
}

.topline .user .profile .chevron {
  flex-shrink: 0;
  transition: transform 250ms ease;
}

body.dark-mode .topline .user .profile .chevron path {
  fill: var(--text-secondary);
}

/* Dropdown-Menü */
.topline .user .profile ul.meta {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  list-style: none;
  padding: 8px;
  margin: 0;
  min-width: 190px;
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: var(--shadow-menu);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 600;
  pointer-events: none;
}

.topline .user .profile ul.meta.open {
  display: flex;
  pointer-events: all;
}

body.dark-mode .profile .meta,
body.dark-mode #profile-menu {
  background: #1f2937;
  border-color: var(--border-light);
  box-shadow: var(--shadow-menu);
}

.topline .user .profile ul.meta li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13.5px;
  text-decoration: none;
  transition: background 200ms, color 200ms;
  white-space: nowrap;
}

.topline .user .profile ul.meta li a .menu-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-color: var(--text-muted);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  transition: background-color 200ms;
}

.topline .user .profile ul.meta li a:hover {
  background: var(--bg-main);
  color: var(--text-primary);
}

.topline .user .profile ul.meta li a:hover .menu-icon {
  background-color: var(--accent);
}

.topline .user .profile ul.meta li a.logout {
  color: var(--color-danger);
}

.topline .user .profile ul.meta li a.logout .menu-icon {
  background-color: var(--color-danger);
  opacity: 0.7;
}

.topline .user .profile ul.meta li a.logout:hover {
  background: rgba(246, 78, 96, 0.08);
}

.topline .user .profile ul.meta li a.problem-melden {
  color: var(--color-warn);
}

.topline .user .profile ul.meta li a.problem-melden .menu-icon {
  background-color: var(--color-warn);
  opacity: 0.8;
}

.topline .user .profile ul.meta li a.problem-melden:hover {
  background: var(--color-warn-12);
}

/* Problem melden hint text */
.problem-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.topline .user .profile ul.meta li.divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

body.dark-mode .profile .meta li a,
body.dark-mode #profile-menu li a {
  color: #d1d5db;
}

body.dark-mode .profile .meta li a:hover,
body.dark-mode #profile-menu li a:hover {
  background: #374151;
  color: #f9fafb;
}

body.dark-mode .profile .meta li.divider,
body.dark-mode #profile-menu li.divider {
  background: var(--border-light);
}

body.dark-mode .menu-icon {
  background-color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   8. VIEWS & CARDS
───────────────────────────────────────────────────────────────────────────── */
main {
  flex: 1 1 0;
  min-height: 0;
  border-radius: 20px 20px 0 0;
  background: var(--bg-main);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-view);
}

body.dark-mode main#main-area {
  background: var(--bg-app);
}

.view {
  display: none;
  flex-direction: column;
  gap: var(--gap-view);
}

.view.active {
  display: flex;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  overflow: hidden;
}

body.dark-mode .card {
  background: #1f2937;
  border: 1px solid var(--border-light);
  box-shadow: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

body.dark-mode .card-header {
  border-bottom-color: var(--border-light);
}

.card-header.collapsible {
  cursor: pointer;
  user-select: none;
  transition: opacity 150ms;
}

.card-header.collapsible:hover {
  opacity: 0.82;
}

.card-header.collapsible.collapsed {
  padding-bottom: 20px;
}

.card-header.collapsed .collapse-chevron {
  transform: rotate(-90deg);
}

.collapse-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-color: var(--text-faintest);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  transition: transform 300ms ease;
  margin-left: 12px;
}

.card-collapsible-body {
  overflow: hidden;
  transition: max-height 350ms ease, opacity 300ms ease;
}

.card-collapsible-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
}

body.dark-mode .card-collapsible-body {
  background: transparent;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.card-title h2 {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

body.dark-mode .card-title h2 {
  color: #f9fafb;
}

.card-icon {
  width: 22px;
  height: 22px;
  background-color: var(--accent);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  flex-shrink: 0;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   9. BUTTONS
───────────────────────────────────────────────────────────────────────────── */
/* Primär (helle Fläche) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--accent-08);
  color: var(--accent);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 200ms;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary:hover {
  background: rgba(var(--accent-rgb), 0.15);
}

body.dark-mode .btn-primary {
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--accent-dark);
}

body.dark-mode .btn-primary:hover {
  background: rgba(var(--accent-rgb), 0.28);
}

/* Rahmen-Button */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 200ms;
  white-space: nowrap;
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

body.dark-mode .btn-outline {
  color: var(--text-secondary);
  border-color: var(--border-light);
  background: transparent;
}

body.dark-mode .btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-outline .btn-icon {
  width: 16px;
  height: 16px;
  background-color: var(--text-secondary);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  transition: background-color 200ms;
}

.btn-outline:hover .btn-icon {
  background-color: var(--accent);
}

/* Submit-Button */
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 200ms, box-shadow 200ms;
}

.btn-submit:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.30);
}

/* Abbrechen-Button */
.btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--bg-main);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 200ms;
}

.btn-cancel:hover {
  background: var(--border-mid);
}

body.dark-mode .btn-cancel {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-light);
}

/* Zurück-Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  transition: color 200ms;
}

.back-link:hover {
  color: var(--accent);
}

body.dark-mode .back-link {
  color: var(--text-secondary);
}

body.dark-mode .back-link:hover {
  color: var(--accent-dark);
}

/* ── Topbar der Geschäftspartner-Detailansicht ──────────────────────────────
   Enthält den zurück-Link links und den Merken-Button rechts.
───────────────────────────────────────────────────────────────────────────── */
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Merken-Button ──────────────────────────────────────────────────────────
   Bookmarkt einen Kunden und fügt ihn zur "Gemerkte Kunden"-Liste hinzu.
   Normalzustand: Rahmen-Button (leer).
   Aktiv-Zustand (.active): Akzentfarbe + ausgefülltes Lesezeichen-Icon.
   JS setzt die Klasse .active und ändert den Button-Text.
───────────────────────────────────────────────────────────────────────────── */
.btn-merken {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: border-color 200ms, color 200ms, background 200ms;
  white-space: nowrap;
}

/* Hover: leicht einfärben */
.btn-merken:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Icon: Lesezeichen-SVG */
.btn-merken .btn-merken-icon {
  transition: fill 200ms;
  fill: none;
  stroke: currentColor;
  flex-shrink: 0;
}

/* Aktiver Zustand: Button ist gesetzt */
.btn-merken.active {
  background: var(--accent-08);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-merken.active .btn-merken-icon {
  fill: var(--accent);
  /* Lesezeichen ausgefüllt = gemerkt */
}

/* Dark Mode */
body.dark-mode .btn-merken {
  color: var(--text-secondary);
  border-color: var(--border-light);
}

body.dark-mode .btn-merken:hover {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

body.dark-mode .btn-merken.active {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

body.dark-mode .btn-merken.active .btn-merken-icon {
  fill: var(--accent-dark);
}

/* ─────────────────────────────────────────────────────────────────────────────
   10. TABELLEN
───────────────────────────────────────────────────────────────────────────── */
.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.table-scroll-wrap .data-table {
  margin-top: 0;
  min-width: 600px;
}

.table-scroll-wrap::-webkit-scrollbar {
  height: 4px;
}

.table-scroll-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.table-scroll-wrap::-webkit-scrollbar-thumb {
  background: #e0e3f0;
  border-radius: 4px;
}

.table-scroll-wrap::-webkit-scrollbar-thumb:hover {
  background: #c0c4d8;
}

body.dark-mode .table-scroll-wrap::-webkit-scrollbar-thumb {
  background: var(--border-light);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

body.dark-mode .data-table {
  background: transparent;
}

.data-table thead tr {
  border-bottom: 1px solid var(--border-light);
}

body.dark-mode .data-table thead tr {
  border-color: var(--border-light);
}

.data-table thead th {
  padding: 10px 24px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  user-select: none;
}

body.dark-mode .data-table thead th {
  color: var(--text-muted);
}

.data-table thead th.sortable-th {
  cursor: pointer;
  transition: color 150ms;
}

.data-table thead th.sortable-th:hover,
.data-table thead th.sort-asc,
.data-table thead th.sort-desc {
  color: var(--accent);
}

.sort-icon {
  margin-left: 4px;
  opacity: 0.5;
  font-size: 11px;
}

th.sort-asc .sort-icon,
th.sort-desc .sort-icon {
  opacity: 1;
}

.data-table tbody tr {
  border-bottom: 1px solid #f7f8fc;
  transition: background 150ms;
}

body.dark-mode .data-table tbody tr {
  border-color: var(--border-light);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

body.dark-mode .data-table tbody tr:hover {
  background: var(--border-light);
}

.data-table tbody tr.gp-row,
.data-table tbody tr.vorgang-row,
.data-table tbody tr.ticket-row {
  cursor: pointer;
}

.data-table tbody tr.gp-row:hover,
.data-table tbody tr.vorgang-row:hover,
.data-table tbody tr.ticket-row:hover {
  background: var(--bg-row-hover);
}

body.dark-mode .data-table tbody tr.gp-row:hover,
body.dark-mode .data-table tbody tr.vorgang-row:hover,
body.dark-mode .data-table tbody tr.ticket-row:hover {
  background: #2d3748;
}

.data-table tbody td {
  padding: 15px 24px;
  font-size: 14px;
  vertical-align: middle;
}

body.dark-mode .data-table tbody td {
  color: #d1d5db;
}

body.dark-mode .data-table tbody td .text-primary {
  color: #f9fafb;
}

body.dark-mode .data-table tbody td .text-muted {
  color: var(--text-secondary);
}

/* Kopieren-Icon */
.copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-main);
  cursor: pointer;
  border: none;
  transition: background 200ms;
}

.copy-icon:hover {
  background: var(--border-mid);
}

.copy-icon svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

body.dark-mode .copy-icon {
  background: var(--border-light);
}

body.dark-mode .copy-icon:hover {
  background: #4b5563;
}

body.dark-mode .copy-icon svg {
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   11. BADGES & TAGS
───────────────────────────────────────────────────────────────────────────── */
.text-primary {
  color: var(--text-primary);
  font-weight: 500;
}

.text-muted {
  color: var(--text-secondary);
  font-weight: 400;
}

.id-col {
  font-size: 13px;
  color: var(--text-muted);
  width: 64px;
}

body.dark-mode .text-primary {
  color: #f9fafb;
}

body.dark-mode .id-col {
  color: var(--text-muted);
}

.badge-date {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-badge);
  font-size: 12.5px;
  font-weight: 500;
}

.badge-date.overdue {
  background: var(--color-warn-12);
  color: var(--color-warn);
}

.badge-date.danger {
  background: var(--color-danger-10);
  color: var(--color-danger);
}

.badge-date.normal {
  background: var(--bg-main);
  color: var(--text-secondary);
}

body.dark-mode .badge-date.normal {
  background: var(--border-light);
  color: var(--text-secondary);
}

.badge-priority {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-badge);
  font-size: 12px;
  font-weight: 500;
}

.badge-priority.high {
  background: var(--color-danger-10);
  color: var(--color-danger);
}

.badge-priority.medium {
  background: var(--color-warn-12);
  color: var(--color-warn);
}

.badge-priority.low {
  background: var(--color-success-12);
  color: var(--color-success);
}

.badge-status {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-badge);
  font-size: 12px;
  font-weight: 500;
}

.badge-status.inprogress {
  background: var(--color-warn-12);
  color: var(--color-warn);
}

.badge-status.done {
  background: var(--color-success-12);
  color: var(--color-success);
}

.badge-status.review {
  background: var(--accent-10);
  color: var(--accent);
}

.badge-status.wiedervorlage {
  background: var(--color-warn-12);
  color: var(--color-warn);
}

.badge-status.open {
  background: var(--accent-10);
  color: var(--accent);
}

.badge-status.closed {
  background: var(--bg-main);
  color: var(--text-secondary);
}

body.dark-mode .badge-status,
body.dark-mode .badge-priority {
  opacity: 0.9;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-main);
  margin-left: 4px;
}

body.dark-mode .tag {
  background: var(--border-light);
  color: var(--text-secondary);
}

.row-icon {
  width: 20px;
  height: 20px;
  background-color: var(--text-faintest);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  display: inline-block;
}

body.dark-mode .row-icon {
  background-color: var(--text-muted);
}

.assigned-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assigned-user .av {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: url('../assets/images/thumb.png') center / cover;
  flex-shrink: 0;
}

.assigned-user .av-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.assigned-user span {
  font-size: 13.5px;
  color: var(--text-primary);
  font-weight: 500;
}

body.dark-mode .assigned-user span {
  color: #e5e7eb;
}

/* ─────────────────────────────────────────────────────────────────────────────
   12. DETAILANSICHT / FORMULARFELDER
───────────────────────────────────────────────────────────────────────────── */
.detail-section {
  padding: 20px 24px 24px;
}

body.dark-mode .detail-section {
  border-top-color: var(--border-light);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field.span-2 {
  grid-column: span 2;
}

.field.span-4 {
  grid-column: span 4;
}

.field label {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
}

body.dark-mode .field label {
  color: var(--text-muted);
}

.field .field-value {
  background: var(--bg-main);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field .field-value.multiline {
  align-items: flex-start;
  line-height: 1.55;
  padding-top: 12px;
  padding-bottom: 12px;
}

.field .field-value.status-value {
  font-weight: 500;
}

body.dark-mode .field .field-value {
  background: var(--border-light);
  color: #e5e7eb;
}

body.dark-mode .field-value {
  color: #d1d5db;
}

/* Bearbeitbares Eingabefeld (Edit-Mode) */
.field .field-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  outline: none;
  display: none;
  transition: border-color 200ms;
}

.field .field-input.textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 14px;
  resize: vertical;
  line-height: 1.5;
  display: none;
}

.field .field-input:focus {
  border-color: var(--accent-hover);
}

body.dark-mode .field-input {
  background: var(--border-light);
  color: #e5e7eb;
  border-color: var(--accent);
}

body.dark-mode .field-input:focus {
  background: #1f2937;
  border-color: var(--accent-dark);
}

/* Edit-Mode: Felder umschalten */
.card.edit-mode .field-value {
  display: none !important;
}

.card.edit-mode .field .field-input {
  display: block;
}

.card.edit-mode .field .field-input.textarea {
  display: block;
}

.card-header-actions .btn-save {
  display: none;
}

.card.edit-mode .btn-save {
  display: inline-flex;
}

.card.edit-mode .btn-edit {
  display: none;
}

.section-divider {
  margin: 8px 0 0;
  padding: 16px 24px 0;
  border-top: 1px solid var(--border-light);
}

.section-divider h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

body.dark-mode .section-divider {
  border-top-color: var(--border-light);
}

body.dark-mode .section-divider h3 {
  color: #f9fafb;
}

body.dark-mode .detail-section h3 {
  color: var(--text-secondary);
}

/* ─────────────────────────────────────────────────────────────────────────────
   13. MODAL
───────────────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 29, 72, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

body.dark-mode .modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}

.modal {
  background: var(--bg-card);
  border-radius: 20px;
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  transform: translateY(12px) scale(0.98);
  transition: transform 220ms ease;
  overflow: hidden;
}

body.dark-mode .modal {
  background: #1f2937;
  border-color: var(--border-light);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

body.dark-mode .modal-header {
  border-bottom-color: var(--border-light);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 .modal-icon {
  width: 22px;
  height: 22px;
  background-color: var(--accent);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  flex-shrink: 0;
}

body.dark-mode .modal-header h3 {
  color: #f9fafb;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-main);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 200ms, color 200ms;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--border-mid);
  color: var(--text-primary);
}

body.dark-mode .modal-close {
  color: var(--text-secondary);
}

body.dark-mode .modal-close:hover {
  background: var(--border-light);
  color: #f9fafb;
}

.modal-body {
  padding: 22px 26px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 26px 22px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

body.dark-mode .modal-footer {
  border-top-color: var(--border-light);
}

/* Modal-Formularfelder */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

body.dark-mode .form-field label {
  color: var(--text-secondary);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: var(--radius-input);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-primary);
  outline: none;
  transition: border-color 200ms, background 200ms;
  appearance: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  background: var(--bg-card);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-faint);
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23a0a3b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  background-color: var(--bg-input);
  cursor: pointer;
}

.form-field textarea {
  height: auto;
  min-height: 90px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

body.dark-mode .form-field input,
body.dark-mode .form-field select,
body.dark-mode .form-field textarea {
  background: var(--border-light);
  border-color: var(--border-strong);
  color: #e5e7eb;
}

body.dark-mode .form-field input:focus,
body.dark-mode .form-field select:focus,
body.dark-mode .form-field textarea:focus {
  border-color: var(--accent);
  background: #1f2937;
}

body.dark-mode .form-field input::placeholder,
body.dark-mode .form-field textarea::placeholder {
  color: var(--text-muted);
}

body.dark-mode .form-field select {
  background-color: var(--border-light);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   14. KANBAN
───────────────────────────────────────────────────────────────────────────── */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
}

.kanban-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

body.dark-mode .kanban-col-header {
  color: #e5e7eb;
}

.kanban-col-header .avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.kanban-col-header .avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kanban-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 80px;
  padding: 4px;
  border-radius: 14px;
  transition: background 200ms;
}

.kanban-list.drag-over {
  background: rgba(var(--accent-rgb), 0.05);
}

body.dark-mode .kanban-list {
  background: transparent;
}

.task-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 200ms, transform 200ms, opacity 200ms;
  position: relative;
  cursor: grab;
}

.task-card:hover {
  box-shadow: 0 4px 20px rgba(55, 69, 87, 0.10);
}

.task-card.dragging {
  cursor: grabbing;
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(55, 69, 87, 0.18);
}

body.dark-mode .task-card {
  background: #1f2937;
  border-color: var(--border-light);
  box-shadow: none;
}

.drag-handle {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--text-faintest);
  cursor: grab;
  opacity: 0;
  transition: opacity 200ms;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.task-card:hover .drag-handle {
  opacity: 1;
}

.task-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-date {
  font-size: 11.5px;
  color: var(--text-muted);
}

.task-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.task-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

body.dark-mode .task-title {
  color: #e5e7eb;
}

body.dark-mode .task-body {
  color: var(--text-secondary);
}

body.dark-mode .task-date {
  color: var(--text-muted);
}

.task-ref {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--bg-main);
  padding-top: 12px;
}

.task-ref strong {
  color: var(--text-primary);
}

body.dark-mode .task-ref {
  border-top-color: var(--border-light);
  color: var(--text-muted);
}

body.dark-mode .task-ref strong {
  color: #d1d5db;
}

.drag-placeholder {
  border: 2px dashed rgba(var(--accent-rgb), 0.35);
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.04);
  min-height: 60px;
}

.placeholder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 240px;
  color: var(--text-muted);
  font-size: 14px;
}

.placeholder-card p {
  margin: 0;
}

.placeholder-icon {
  width: 48px;
  height: 48px;
  background-color: var(--text-faintest);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

/* ─────────────────────────────────────────────────────────────────────────────
   15. ZEITERFASSUNG
───────────────────────────────────────────────────────────────────────────── */
.zt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.zt-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 6px 10px;
}

body.dark-mode .zt-nav {
  background: #1f2937;
  border: 1px solid var(--border-light);
}

.zt-nav-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-main);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 200ms, color 200ms;
  flex-shrink: 0;
}

.zt-nav-btn:hover {
  background: var(--accent);
  color: #fff;
}

body.dark-mode .zt-nav-btn {
  background: var(--border-light);
  color: var(--text-secondary);
}

body.dark-mode .zt-nav-btn:hover {
  background: var(--accent);
  color: #fff;
}

.zt-month-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 130px;
  text-align: center;
}

body.dark-mode .zt-month-label {
  color: #f9fafb;
}

.zt-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zt-user-select {
  height: 42px;
  padding: 0 36px 0 14px;
  background: var(--bg-card);
  border: 2px solid var(--border-mid);
  border-radius: var(--radius-input);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23a0a3b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  background-color: var(--bg-card);
  transition: border-color 200ms;
}

.zt-user-select:focus {
  border-color: var(--accent);
}

body.dark-mode .zt-user-select {
  background-color: var(--border-light);
  border-color: var(--border-strong);
  color: #e5e7eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Zusammenfassungs-Karten */
.zt-summary-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.zt-summary-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.dark-mode .zt-summary-card {
  background: #1a2234;
  border-color: var(--border-light);
}

.zt-sum-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.zt-sum-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}

.zt-sum-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.zt-sum-ist .zt-sum-value {
  color: var(--color-success);
}

.zt-sum-urlaub .zt-sum-value {
  color: var(--accent);
}

.zt-sum-krank .zt-sum-value {
  color: var(--color-warn);
}

body.dark-mode .zt-sum-value {
  color: #f9fafb;
}

/* Kalender-Grid */
.zt-calendar {
  display: flex;
  flex-direction: column;
}

.zt-cal-header,
.zt-cal-row {
  display: grid;
  grid-template-columns: 48px 110px 90px 90px 70px 1fr 36px;
  gap: 0;
  padding: 0 24px;
}

.zt-cal-header {
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-light);
}

.zt-cal-header span {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

body.dark-mode .zt-cal-header {
  background: transparent;
  border-bottom-color: var(--border-light);
}

body.dark-mode .zt-cal-header span {
  color: var(--text-muted);
}

.zt-cal-row {
  align-items: center;
  min-height: 50px;
  border-bottom: 1px solid #f7f8fc;
  transition: background 150ms;
  cursor: pointer;
}

.zt-cal-row:last-child {
  border-bottom: none;
}

.zt-cal-row:hover {
  background: var(--bg-hover);
}

.zt-cal-row.weekend {
  background: #fafbff;
  opacity: 0.6;
  cursor: default;
}

.zt-cal-row.weekend:hover {
  background: #fafbff;
}

.zt-cal-row.today {
  background: rgba(var(--accent-rgb), 0.04);
}

.zt-cal-row.today:hover {
  background: rgba(var(--accent-rgb), 0.07);
}

body.dark-mode .zt-cal-row {
  border-bottom-color: var(--border-light);
}

body.dark-mode .zt-cal-row:hover:not(.weekend) {
  background: #1a2234;
}

body.dark-mode .zt-cal-row.weekend {
  background: #16202d;
  opacity: 0.7;
}

body.dark-mode .zt-cal-row.today {
  background: #1e2750 !important;
}

.zt-day-num {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.zt-day-name {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
}

.zt-cal-row.today .zt-day-num {
  color: var(--accent);
}

body.dark-mode .zt-day-num {
  color: #f9fafb;
}

body.dark-mode .zt-day-name {
  color: var(--text-secondary);
}

body.dark-mode .zt-cal-row.today .zt-day-num {
  color: var(--accent-dark);
}

.zt-time {
  font-size: 13.5px;
  color: var(--text-primary);
  font-weight: 400;
}

.zt-time.muted {
  color: var(--text-faintest);
}

.zt-netto {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.zt-netto.muted {
  color: var(--text-faintest);
  font-weight: 400;
}

body.dark-mode .zt-time {
  color: #e5e7eb;
}

body.dark-mode .zt-time.muted,
body.dark-mode .zt-netto.muted {
  color: #4b5563;
}

body.dark-mode .zt-netto {
  color: #d1d5db;
}

.zt-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-badge);
  font-size: 12px;
  font-weight: 500;
}

.zt-type-arbeit {
  background: var(--color-success-12);
  color: var(--color-success);
}

.zt-type-urlaub {
  background: var(--accent-10);
  color: var(--accent);
}

.zt-type-krank {
  background: var(--color-warn-12);
  color: var(--color-warn);
}

.zt-type-feiertag {
  background: var(--bg-main);
  color: var(--text-secondary);
}

.zt-type-sonder {
  background: var(--accent-10);
  color: var(--accent);
}

.zt-type-leer {
  color: var(--text-faintest);
  font-size: 12px;
}

.zt-notiz {
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode .zt-notiz {
  color: var(--text-secondary) !important;
}

.zt-edit-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-faintest);
  cursor: pointer;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms, color 200ms;
  opacity: 0;
}

.zt-cal-row:hover .zt-edit-btn {
  opacity: 1;
}

.zt-edit-btn:hover {
  background: var(--bg-main);
  color: var(--accent);
}

body.dark-mode .zt-edit-btn {
  color: var(--text-muted);
}

body.dark-mode .zt-edit-btn:hover {
  background: var(--border-light);
  color: var(--accent-dark);
}

/* ─────────────────────────────────────────────────────────────────────────────
   16. FAHRZEUGE
───────────────────────────────────────────────────────────────────────────── */
.fz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
}

.fz-card {
  background: var(--bg-main);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.dark-mode .fz-card {
  background: #1f2937;
  border-color: var(--border-light);
}

.fz-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fz-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

body.dark-mode .fz-icon {
  background: var(--border-light);
}

.fz-info {
  flex: 1;
}

.fz-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.fz-plate {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

.fz-status-badge {
  padding: 4px 12px;
  border-radius: var(--radius-badge);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.fz-verfuegbar {
  background: var(--color-success-12);
  color: var(--color-success);
}

.fz-unterwegs {
  background: var(--color-warn-12);
  color: var(--color-warn);
}

body.dark-mode .fz-name {
  color: #f9fafb;
}

body.dark-mode .fz-plate {
  background: var(--border-light);
  color: #e5e7eb;
}

.fz-unterwegs-info {
  background: rgba(255, 168, 0, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
}

body.dark-mode .fz-unterwegs-info {
  background: rgba(255, 168, 0, 0.06);
}

.fz-unterwegs-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

body.dark-mode .fz-unterwegs-user {
  color: #e5e7eb;
}

.fz-meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fz-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fz-meta-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.fz-meta-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.fz-km {
  font-weight: 600;
  color: var(--text-primary);
}

body.dark-mode .fz-meta-label {
  color: var(--text-muted);
}

body.dark-mode .fz-meta-value {
  color: #e5e7eb;
}

body.dark-mode .fz-km {
  color: #e5e7eb;
}

/* ─────────────────────────────────────────────────────────────────────────────
   17. KOSTENERSTATTUNG
───────────────────────────────────────────────────────────────────────────── */
.ke-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.ke-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
}

.ke-cat-fahrt {
  background: var(--accent-10);
  color: var(--accent);
}

.ke-cat-bewirt {
  background: var(--color-warn-12);
  color: var(--color-warn);
}

.ke-cat-reise {
  background: var(--color-success-12);
  color: var(--color-success);
}

.ke-cat-material {
  background: var(--bg-main);
  color: var(--text-secondary);
}

.ke-betrag {
  font-weight: 600;
  color: var(--text-primary);
}

.ke-beleg {
  font-size: 12.5px;
  color: var(--accent);
  cursor: pointer;
}

.ke-beleg.ke-missing {
  color: var(--color-danger);
  cursor: default;
}

body.dark-mode .ke-betrag {
  color: #e5e7eb;
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────────────────
   18. ANLAGE-DROPZONE
───────────────────────────────────────────────────────────────────────────── */
.anlage-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 200ms, background 200ms;
  text-align: center;
  margin-bottom: 4px;
}

.anlage-dropzone:hover,
.anlage-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.04);
}

body.dark-mode .anlage-dropzone {
  background: #1a2234;
  border-color: var(--border-light);
}

body.dark-mode .anlage-dropzone:hover,
body.dark-mode .anlage-dropzone.drag-over {
  border-color: var(--accent);
}

.anlage-dropzone-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.anlage-browse {
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.anlage-dropzone-sub {
  font-size: 12px;
  color: var(--text-faint);
}

body.dark-mode .anlage-dropzone-text {
  color: var(--text-secondary);
}

body.dark-mode .anlage-dropzone-sub {
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   19. EINSTELLUNGEN & PROFIL
───────────────────────────────────────────────────────────────────────────── */
.settings-section {
  padding: 8px 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
}

.settings-row:last-child {
  border-bottom: none;
}

body.dark-mode .settings-row {
  border-bottom-color: var(--border-light);
}

.settings-row-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.settings-row-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.settings-row-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

body.dark-mode .settings-row-label {
  color: #f9fafb;
}

.settings-select {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-main);
  border: 1.5px solid transparent;
  border-radius: var(--radius-btn);
  padding: 8px 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 200ms;
  min-width: 150px;
}

.settings-select:focus {
  border-color: var(--accent);
}

body.dark-mode .settings-select {
  background: var(--border-light);
  color: #e5e7eb;
  border-color: transparent;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

body.dark-mode .settings-select:focus {
  border-color: var(--accent);
}

/* Toggle-Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-mid);
  border-radius: 26px;
  transition: background 220ms ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 220ms ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}

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

body.dark-mode .toggle-slider {
  background: var(--border-light);
}

/* Farbwähler */
.color-picker-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform 150ms, border-color 150ms;
  outline: none;
}

.color-swatch:hover {
  transform: scale(1.12);
}

.color-swatch.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px #fff inset;
}

body.dark-mode .color-swatch.active {
  border-color: #f9fafb;
}

/* Profil-Avatar */
.profil-avatar-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
}

.profil-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #8B5CF6 100%);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 1px;
}

.profil-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profil-avatar-info strong {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.profil-avatar-info span {
  font-size: 13px;
  color: var(--text-secondary);
}

body.dark-mode .profil-avatar-info strong {
  color: #f9fafb;
}

/* ─────────────────────────────────────────────────────────────────────────────
   20. FILTER-LEISTE
───────────────────────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px 0;
  flex-wrap: wrap;
}

.filter-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
  white-space: nowrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1.5px solid var(--border-mid);
  background: var(--bg-card);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  color: #5a5e80;
  cursor: pointer;
  transition: border-color 160ms, background 160ms, color 160ms;
  user-select: none;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: #c0c4dc;
  background: #f5f6fb;
}

.filter-chip.active {
  border-color: var(--accent, #5D5FEF);
  background: rgba(var(--accent-rgb, 93, 95, 239), 0.08);
  color: var(--accent, #5D5FEF);
}

.filter-chip .chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-chip.active .chip-dot {
  opacity: 1;
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border-mid);
  margin: 0 4px;
}

body.dark-mode .filter-chip {
  background: #1e2443;
  border-color: #2e3560;
  color: #9ba4c8;
}

body.dark-mode .filter-chip:hover {
  background: #252b55;
}

body.dark-mode .filter-chip.active {
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}

body.dark-mode .filter-divider {
  background: #2e3560;
}

/* ─────────────────────────────────────────────────────────────────────────────
   21. TICKET-DETAIL
───────────────────────────────────────────────────────────────────────────── */
.ticket-zammad-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.ticket-conv-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ticket-conv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1.5px solid var(--border-light);
}

.ticket-conv-header-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ticket-conv-header-title h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

body.dark-mode .ticket-conv-header-title h2 {
  color: #e0e4f8;
}

.ticket-conv-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ticket-conv-header-meta .meta-item {
  font-size: 12.5px;
  color: var(--text-muted);
}

.ticket-conv-header-meta .meta-item strong {
  color: #5a5e80;
}

.ticket-conv-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 24px 24px;
}

.ticket-msg {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
}

.ticket-msg:last-child {
  border-bottom: none;
}

.ticket-msg.internal {
  background: #fffbeb;
  border-left: 3px solid #f5c842;
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 4px 0;
}

.ticket-msg.internal .ticket-msg-body {
  padding-left: 44px;
}

body.dark-mode .ticket-msg.internal {
  background: #2a2510;
  border-color: #c9a500;
}

.ticket-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ticket-msg-sender {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-msg-sender .av,
.ticket-msg-sender .av-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8eaf6;
  color: var(--accent);
}

.ticket-msg-sender .av {
  background-image: url('assets/images/thumb.png');
  background-size: cover;
  background-position: center;
}

.ticket-msg-sender-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ticket-msg-sender-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.ticket-msg-sender-role {
  font-size: 11.5px;
  color: var(--text-muted);
}

.ticket-msg-time {
  font-size: 12px;
  color: var(--text-faint);
}

.ticket-msg-body {
  font-size: 13.5px;
  line-height: 1.7;
  color: #3d4166;
  padding-left: 44px;
}

.ticket-msg-body p {
  margin: 0 0 6px;
}

.ticket-msg-body p:last-child {
  margin: 0;
}

body.dark-mode .ticket-msg-body {
  color: #c8ccee;
}

.ticket-reply-box {
  border-top: 2px solid var(--border-light);
  padding: 16px 24px 20px;
}

.ticket-reply-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.ticket-reply-tab {
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  color: #7b7fa8;
  background: transparent;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 150ms;
}

.ticket-reply-tab.active {
  background: rgba(var(--accent-rgb, 93, 95, 239), 0.09);
  color: var(--accent, #5D5FEF);
  border-color: rgba(var(--accent-rgb, 93, 95, 239), 0.2);
}

.ticket-reply-tab:hover:not(.active) {
  background: #f4f5fb;
  color: #4a4e7a;
}

body.dark-mode .ticket-reply-tab:hover:not(.active) {
  background: #1e2443;
}

.ticket-reply-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-input);
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--bg-card);
  resize: vertical;
  outline: none;
  transition: border-color 200ms;
  box-sizing: border-box;
}

.ticket-reply-textarea:focus {
  border-color: var(--accent, #5D5FEF);
}

.ticket-reply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.ticket-reply-actions-left {
  display: flex;
  gap: 8px;
}

.ticket-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   22. ARBEITSPLATZ-KPI
───────────────────────────────────────────────────────────────────────────── */
.ap-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.ap-kpi-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

body.dark-mode .ap-kpi-card {
  background: #1a2040;
  border-color: #232b52;
}

.ap-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ap-kpi-overdue .ap-kpi-icon {
  background: #fee2e2;
  color: #ef4444;
}

.ap-kpi-due-today .ap-kpi-icon {
  background: #fef9c3;
  color: #ca8a04;
}

.ap-kpi-due-week .ap-kpi-icon {
  background: #e0f2fe;
  color: #0284c7;
}

.ap-kpi-open-tickets .ap-kpi-icon {
  background: #f3e8ff;
  color: #9333ea;
}

.ap-kpi-vorgaenge .ap-kpi-icon {
  background: #dcfce7;
  color: #16a34a;
}

.ap-kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.ap-kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 3px;
}

body.dark-mode .ap-kpi-value {
  color: #e0e4f8;
}

.ap-next-deadline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 14px 20px;
}

body.dark-mode .ap-next-deadline {
  background: #1e1a0e;
}

.ap-next-deadline-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.ap-next-deadline-badge {
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.ap-next-deadline-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.ap-next-deadline-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.ap-next-deadline-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.ap-next-deadline-assign {
  font-size: 13px;
  font-weight: 500;
  color: #5a5e80;
}

body.dark-mode .ap-next-deadline-title {
  color: #e0e4f8;
}

/* ─────────────────────────────────────────────────────────────────────────────
   23. URLAUBSPLANUNG
───────────────────────────────────────────────────────────────────────────── */
.urlaub-quota-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: #f5f6fb;
  border-radius: 14px;
  padding: 16px;
}

body.dark-mode .urlaub-quota-row {
  background: #141933;
}

.urlaub-quota-item {
  text-align: center;
}

.urlaub-quota-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.urlaub-quota-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

body.dark-mode .urlaub-quota-value {
  color: #e0e4f8;
}

/* ─────────────────────────────────────────────────────────────────────────────
   24. SUCHE
───────────────────────────────────────────────────────────────────────────── */
.search-highlight {
  background: rgba(var(--accent-rgb), 0.18);
  border-radius: 3px;
  color: var(--accent);
  font-weight: 600;
  padding: 0 2px;
}

body.dark-mode .search-highlight {
  background: rgba(129, 140, 248, 0.2);
  color: var(--accent-dark);
}

.search-no-results {
  padding: 40px 28px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}

body.dark-mode .search-no-results {
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   25. HAMBURGER-BUTTON & HEADER-ACTIONS
───────────────────────────────────────────────────────────────────────────── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  flex-shrink: 0;
  transition: background 200ms;
}

.hamburger-btn:hover {
  background: var(--bg-main);
}

body.dark-mode .hamburger-btn:hover {
  background: var(--border-light);
}

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 250ms ease, opacity 250ms ease;
  transform-origin: center;
}

body.dark-mode .hamburger-btn span {
  background: #f9fafb;
}

.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.header-actions .zt-user-select {
  height: 38px;
  font-size: 13px;
  min-width: 140px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   26. COMPACT-MODE
───────────────────────────────────────────────────────────────────────────── */
body.compact-mode main#main-area {
  padding: 14px;
  gap: 12px;
}

body.compact-mode .card-header {
  padding: 14px 18px 0;
}

body.compact-mode .detail-section {
  padding: 14px 18px 18px;
}

body.compact-mode .detail-grid {
  gap: 10px;
  margin-top: 10px;
}

body.compact-mode .field .field-value {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

body.compact-mode .field label {
  font-size: 11px;
}

body.compact-mode .data-table thead th {
  padding: 8px 18px;
}

body.compact-mode .data-table tbody td {
  padding: 10px 18px;
  font-size: 13px;
}

body.compact-mode .task-card {
  padding: 12px 14px 10px;
  gap: 6px;
}

body.compact-mode .kanban-list {
  gap: 8px;
}

body.compact-mode .settings-row {
  padding: 12px 0;
}

body.compact-mode .topline {
  height: 68px;
}

body.compact-mode .sidebar .brand {
  height: 68px;
}

/* ── Compact-Mode auf Mobile: topline-height-Override zurücksetzen ── */
@media (max-width: 768px) {
  body.compact-mode .topline {
    height: auto;
    padding: 10px 16px;
  }

  body.compact-mode .sidebar .brand {
    height: var(--topline-height);
  }

  body.compact-mode main#main-area {
    padding: 10px;
    gap: 10px;
  }

  body.compact-mode .card-header {
    padding: 12px 14px 0;
  }

  body.compact-mode .detail-section {
    padding: 12px 14px 14px;
  }

  body.compact-mode .data-table thead th {
    padding: 7px 14px;
    font-size: 11px;
  }

  body.compact-mode .data-table tbody td {
    padding: 8px 14px;
    font-size: 12px;
  }

  body.compact-mode .task-card {
    padding: 10px 12px 8px;
  }

  body.compact-mode .filter-bar {
    padding: 8px 14px 0;
  }

  body.compact-mode .filter-chip {
    padding: 3px 8px;
    font-size: 11px;
  }
}

body.compact-mode .zt-cal-row {
  min-height: 40px;
}

body.compact-mode .notif-item {
  padding: 9px 18px;
}

body.compact-mode .filter-bar {
  padding: 10px 18px 0;
}

body.compact-mode .filter-chip {
  padding: 4px 10px;
  font-size: 11.5px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   27. FONT-SIZE SKALIERUNG
───────────────────────────────────────────────────────────────────────────── */
body[data-fontsize="small"] {
  font-size: 13px;
}

body[data-fontsize="small"] .data-table tbody td,
body[data-fontsize="small"] .task-title,
body[data-fontsize="small"] .task-body,
body[data-fontsize="small"] .field .field-value {
  font-size: calc(1em * 0.92);
}

body[data-fontsize="small"] .topline h1 {
  font-size: 24px;
}

body[data-fontsize="small"] .sidebar nav ul li a {
  font-size: 13.5px;
}

body[data-fontsize="large"] {
  font-size: 16px;
}

body[data-fontsize="large"] .data-table tbody td,
body[data-fontsize="large"] .task-title,
body[data-fontsize="large"] .task-body,
body[data-fontsize="large"] .field .field-value {
  font-size: 15px;
}

body[data-fontsize="large"] .topline h1 {
  font-size: 32px;
}

body[data-fontsize="large"] .sidebar nav ul li a {
  font-size: 16px;
}

body[data-fontsize="large"] .card-title h2 {
  font-size: 17px;
}

body[data-fontsize="large"] .card-header {
  flex-wrap: nowrap;
  align-items: center;
}

body[data-fontsize="large"] .card-header-actions {
  flex-shrink: 0;
  flex-wrap: nowrap;
}

body[data-fontsize="large"] .collapse-chevron {
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   28. RESPONSIVE BREAKPOINTS
───────────────────────────────────────────────────────────────────────────── */
/* Desktop: Collapse-Button anzeigen */
@media (min-width: 769px) {
  .sidebar-collapse-btn {
    display: flex;
  }
}

/* ── 1200px: 2-spaltige Layouts ── */
@media (max-width: 1200px) {
  .kanban {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .field.span-4 {
    grid-column: span 2;
  }

  .zt-summary-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .ke-summary-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── 1100px: KPI 3-spaltig ── */
@media (max-width: 1100px) {
  .ap-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── 1060px (Tablet): Topline 2-zeilig ── */
@media (max-width: 1060px) and (min-width: 769px) {
  .topline {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    height: auto;
    padding: 14px 24px;
    gap: 12px;
  }

  .topline h1 {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: 22px;
  }

  .topline .search {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    margin: 0;
  }

  .topline .user {
    grid-column: 2;
    grid-row: 2;
  }
}

/* ── 900px: Sidebar nur Icons ── */
@media (max-width: 900px) and (min-width: 769px) {
  .sidebar {
    width: 70px;
    min-width: 70px;
  }

  .sidebar .brand {
    padding: 0;
    justify-content: center;
  }

  .sidebar .brand a img {
    height: 26px;
  }

  .sidebar nav {
    padding: 0 8px;
  }

  .sidebar nav ul li a {
    padding: 13px;
    justify-content: center;
    gap: 0;
  }

  .sidebar nav ul li a span {
    display: none;
  }

  .sidebar .logo {
    height: 68px;
  }

  .topline .user .profile .title {
    display: none;
  }

  .notif-panel {
    width: 320px;
  }

  .zt-cal-header,
  .zt-cal-row {
    grid-template-columns: 44px 100px 80px 80px 60px 1fr 28px;
    padding: 0 16px;
  }

  .zt-summary-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .fz-meta-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .ticket-zammad-layout {
    grid-template-columns: 1fr;
  }

  .ticket-sidebar-col {
    order: -1;
  }
}

/* ── 768px (Mobile): Drawer-Sidebar ── */
@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 260px !important;
    min-width: 260px !important;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 32px rgba(21, 29, 72, 0.15);
  }

  .sidebar .brand {
    padding: 0 36px;
    justify-content: flex-start;
  }

  .sidebar .brand a img {
    height: 30px;
  }

  .sidebar nav {
    padding: 0 20px;
  }

  .sidebar nav ul li a {
    padding: 14px 18px;
    justify-content: flex-start;
    gap: 14px;
  }

  .sidebar nav ul li a span {
    display: inline;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-mobile-only {
    display: block;
  }

  .sidebar-mobile-user {
    display: block;
  }

  .sidebar-mobile-only:first-of-type {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--border-light);
  }

  body.dark-mode .sidebar-mobile-only:first-of-type {
    border-top-color: var(--border-light);
  }

  .topline {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    height: auto;
    padding: 12px 16px;
    gap: 8px 12px;
  }

  .hamburger-btn {
    grid-column: 1;
    grid-row: 1;
  }

  .topline h1 {
    grid-column: 2 / 4;
    grid-row: 1;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topline .search {
    grid-column: 1 / 3;
    grid-row: 2;
    max-width: none;
    margin: 0;
  }

  .topline .user {
    grid-column: 3;
    grid-row: 2;
  }

  /* Profil im Hamburger-Menü, nicht in Topline */
  .topline .user .profile {
    display: none;
  }

  .notif-panel {
    width: calc(100vw - 24px);
    right: -50px;
  }

  .data-table td {
    white-space: nowrap;
  }
}

/* ── 700px ── */
@media (max-width: 700px) {
  .ap-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .ap-next-deadline {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── 600px: 1-spaltig ── */
@media (max-width: 600px) {
  .kanban {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .field.span-2,
  .field.span-4 {
    grid-column: span 1;
  }

  .topline {
    padding: 12px 16px;
    gap: 10px;
  }

  .topline h1 {
    font-size: 18px;
  }

  .topline .search {
    max-width: none;
  }

  .notif-panel {
    width: calc(100vw - 32px);
    right: -40px;
  }

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

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

  .fz-grid {
    grid-template-columns: 1fr;
  }

  .zt-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .zt-toolbar-right {
    justify-content: space-between;
  }

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

  .zt-cal-header {
    display: none;
  }

  .zt-cal-row {
    grid-template-columns: 52px 1fr auto 28px;
    grid-template-rows: auto auto;
    padding: 10px 16px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .card-header.collapsible {
    flex-direction: row;
    align-items: center;
  }

  .card-title {
    width: 100%;
  }

  .card-header-actions,
  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* ── 480px: Extra klein ── */
@media (max-width: 480px) {
  .topline {
    padding: 10px 12px;
    gap: 6px 10px;
  }

  .topline h1 {
    font-size: 16px;
  }

  .topline .search input {
    font-size: 12px;
    height: 42px;
  }

  .topline .user .profile .title {
    display: none;
  }

  .card {
    border-radius: 12px;
  }

  .card-header {
    padding: 14px 16px;
  }

  main#main-area {
    padding: 12px !important;
    gap: 12px !important;
  }
}
