/* ══════════════════════════════════════════════════════════════════════════════
   SECURIPLANER — Custom Design System
══════════════════════════════════════════════════════════════════════════════ */
:root {
  --sidebar-w:   248px;
  --sidebar-bg:  #09090c;
  --primary:     #e11d48;
  --primary-h:   #be123c;
  --primary-rgb: 225,29,72;
  --topnav-h:    62px;
  --bg:          #0d0d11;
  --surface:     #13131a;
  --surface2:    #1a1a23;
  --surface3:    #22222d;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);
  --text:        #f0f0f5;
  --text-muted:  #6b7280;
  --text-dim:    #9ca3af;
  --radius:      10px;
  --radius-lg:   14px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.4);
  --shadow:      0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.6);

  /* ── Status-Farben (einheitlich fuer die ganze App) ──────────────────── */
  --status-planned:        #818cf8;
  --status-planned-bg:     rgba(129,140,248,.15);
  --status-planned-border: rgba(129,140,248,.30);

  --status-confirmed:        #22c55e;
  --status-confirmed-bg:     rgba(34,197,94,.15);
  --status-confirmed-border: rgba(34,197,94,.30);

  --status-completed:        #9ca3af;
  --status-completed-bg:     rgba(156,163,175,.15);
  --status-completed-border: rgba(156,163,175,.30);

  --status-cancelled:        #f87171;
  --status-cancelled-bg:     rgba(248,113,113,.15);
  --status-cancelled-border: rgba(248,113,113,.30);

  --alert-danger-accent:  #ef4444;
  --alert-warning-accent: #eab308;
  --alert-info-accent:    #3b82f6;
  --alert-success-accent: #22c55e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  transition: width .22s cubic-bezier(.4,0,.2,1);
  z-index: 1000;
  overflow: hidden;
  border-right: 1px solid var(--border);
}
.sidebar.collapsed { width: 64px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  height: var(--topnav-h);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 1px 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .875rem;
  white-space: nowrap;
  border-radius: 8px;
  transition: color .15s, background .15s;
  position: relative;
}
.sidebar-link:hover {
  color: var(--text-dim);
  background: rgba(255,255,255,.05);
}
.sidebar-link.active {
  color: #fff;
  background: rgba(var(--primary-rgb), .15);
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
  margin-left: -8px;
}
.sidebar-link i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  opacity: .8;
}
.sidebar-link.active i { opacity: 1; color: var(--primary); }

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 16px;
}

/* Stammdaten group */
.sidebar-group-toggle {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}
.sidebar-chevron {
  margin-left: auto;
  font-size: .7rem !important;
  width: auto !important;
  transition: transform .2s;
  opacity: .4;
}
.sidebar-chevron.rotated { transform: rotate(-180deg); }
.sidebar-group {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.sidebar-group.open { max-height: 300px; }
.sidebar-sublink {
  padding-left: 40px !important;
  font-size: .82rem !important;
  opacity: .8;
}
.sidebar-sublink:hover { opacity: 1; }
.sidebar-sublink.active { opacity: 1; }

/* Collapsed state */
.sidebar.collapsed .sidebar-group   { display: none; }
.sidebar.collapsed .sidebar-chevron { display: none; }
.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .sidebar-link span { display: none; }
.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 11px;
  margin: 2px 4px;
}
.sidebar.collapsed .sidebar-link.active::before { display: none; }
.sidebar.collapsed .sidebar-divider { display: none; }

/* ── Main content ────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left .22s cubic-bezier(.4,0,.2,1);
}
.main-content.expanded { margin-left: 64px; }

/* ── Topnav ──────────────────────────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  height: var(--topnav-h);
  background: rgba(13,13,17,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav .text-muted { color: var(--text-muted) !important; }
.topnav .fw-semibold { font-size: .95rem; letter-spacing: .01em; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  padding: 16px 20px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .01em;
}
.card-body { color: var(--text); padding: 20px; }
.card-footer {
  background: transparent;
  border-top: 1px solid var(--border);
  padding: 14px 20px;
}

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stat-card {
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow);
  border: none;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.08) 0%, transparent 60%);
  pointer-events: none;
}
.stat-card .stat-icon   { font-size: 2rem; opacity: .6; }
.stat-card .stat-number { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label  { font-size: .78rem; opacity: .75; margin-top: 3px; letter-spacing: .04em; text-transform: uppercase; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table {
  font-size: .875rem;
  color: var(--text);
  --bs-table-bg: transparent;
}
.table thead th {
  background: var(--surface2);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border2);
  padding: 12px 16px;
  white-space: nowrap;
}
.table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-color: var(--border);
  color: var(--text);
}
.table tbody tr { border-color: var(--border); transition: background .1s; }
.table-hover tbody tr:hover { background: rgba(255,255,255,.035); }
.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: rgba(255,255,255,.02);
  color: var(--text);
}

/* ── Status badges ───────────────────────────────────────────────────────── */
/* Alte status-* Klassen — leiten jetzt auf die einheitlichen Variablen */
.status-geplant       { background: var(--status-planned-bg)   !important; color: var(--status-planned)   !important; border: 1px solid var(--status-planned-border)   !important; }
.status-bestaetigt    { background: var(--status-confirmed-bg) !important; color: var(--status-confirmed) !important; border: 1px solid var(--status-confirmed-border) !important; }
.status-abgeschlossen { background: var(--status-completed-bg) !important; color: var(--status-completed) !important; border: 1px solid var(--status-completed-border) !important; }
.status-abgesagt      { background: var(--status-cancelled-bg) !important; color: var(--status-cancelled) !important; border: 1px solid var(--status-cancelled-border) !important; }

/* ── Role / qual badges ──────────────────────────────────────────────────── */
.badge-ssh     { background: rgba(59,130,246,.2); color: #93c5fd; border: 1px solid rgba(59,130,246,.3); }
.badge-spotter { background: rgba(16,185,129,.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }
.badge {
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 3px 8px;
  border-radius: 6px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .01em;
  transition: all .15s ease;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb),.3);
}
.btn-primary:hover {
  background: var(--primary-h);
  border-color: var(--primary-h);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),.4);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline-secondary {
  color: var(--text-muted);
  border-color: var(--border2);
}
.btn-outline-secondary:hover {
  background: var(--surface2);
  color: var(--text-dim);
  border-color: var(--border2);
}
.btn-sm { font-size: .82rem; padding: 5px 11px; }

.btn-outline-danger   { color: #f87171; border-color: rgba(248,113,113,.35); }
.btn-outline-danger:hover   { background: rgba(220,38,38,.15);  border-color: rgba(220,38,38,.5);  color: #fca5a5; }
.btn-outline-success  { color: #34d399; border-color: rgba(52,211,153,.35); }
.btn-outline-success:hover  { background: rgba(5,150,105,.15);  border-color: rgba(5,150,105,.5);  color: #6ee7b7; }
.btn-outline-info     { color: #67e8f9; border-color: rgba(103,232,249,.35); }
.btn-outline-info:hover     { background: rgba(8,145,178,.15);  border-color: rgba(8,145,178,.5);  color: #a5f3fc; }
.btn-outline-warning  { color: #fbbf24; border-color: rgba(251,191,36,.35); }
.btn-outline-warning:hover  { background: rgba(217,119,6,.15);  border-color: rgba(217,119,6,.5);  color: #fcd34d; }
.btn-outline-primary  { color: var(--primary); border-color: rgba(var(--primary-rgb),.35); }
.btn-outline-primary:hover  { background: rgba(var(--primary-rgb),.12); border-color: rgba(var(--primary-rgb),.5); color: #fb7185; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text);
  padding: 9px 13px;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: var(--text-muted); opacity: .7; }
.form-control:focus, .form-select:focus {
  border-color: rgba(var(--primary-rgb),.5);
  background: var(--surface2);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.15);
  outline: none;
}
.form-select option { background: var(--surface2); color: var(--text); }
.form-label {
  font-size: .83rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.form-text  { color: var(--text-muted); font-size: .8rem; }
.form-check-input {
  background-color: var(--surface2);
  border-color: var(--border2);
}
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}
.form-check-label { color: var(--text); }
.input-group-text {
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text-muted);
}
.cal-day-col--today { background: rgba(var(--primary-rgb),.04); }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  font-size: .875rem;
}
.alert-info    { background: rgba(99,102,241,.1);  border: 1px solid rgba(99,102,241,.25);  color: #a5b4fc; }
.alert-success { background: rgba(16,185,129,.1);  border: 1px solid rgba(16,185,129,.25);  color: #6ee7b7; }
.alert-warning { background: rgba(245,158,11,.1);  border: 1px solid rgba(245,158,11,.25);  color: #fcd34d; }
.alert-danger  { background: rgba(220,38,38,.1);   border: 1px solid rgba(220,38,38,.25);   color: #fca5a5; }
.alert code    { color: inherit; background: rgba(255,255,255,.1); padding: 1px 5px; border-radius: 4px; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -.01em;
}

/* ── Sperrtag-Warnung ────────────────────────────────────────────────────── */
.sperrtag-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(234,179,8,.1);
  border: 1px solid rgba(234,179,8,.3);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 9px 14px;
  font-size: .875rem;
  color: #fde68a;
}
.sperrtag-warning + .assignment-item {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
}
.btn-warning-close {
  background: none;
  border: 1px solid rgba(234,179,8,.35);
  border-radius: 6px;
  color: #fde68a;
  padding: 2px 8px;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
  font-size: .8rem;
}
.btn-warning-close:hover { background: rgba(234,179,8,.18); }

/* ── Assignment items ────────────────────────────────────────────────────── */
.assignment-item {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background .15s, box-shadow .15s;
  margin-bottom: 8px;
}
.assignment-item:hover {
  background: var(--surface3);
  box-shadow: var(--shadow-sm);
}
.assignment-item.ai-pending {
  border-left-color: rgba(100,116,139,.4);
  opacity: .7;
}
.assignment-item.ai-notified {
  border-left-color: #f59e0b;
  background: rgba(245,158,11,.04);
}
.assignment-item.ai-confirmed {
  border-left-color: #22c55e;
  background: rgba(34,197,94,.10);
  box-shadow: inset 3px 0 0 #22c55e;
}
.assignment-item.ai-declined {
  border-left-color: #ef4444;
  background: rgba(239,68,68,.05);
  opacity: .75;
}

/* ── Bootstrap overrides ─────────────────────────────────────────────────── */
.text-muted   { color: var(--text-muted) !important; }
.text-dark    { color: var(--text) !important; }
.bg-light     { background: var(--surface2) !important; color: var(--text) !important; }
.bg-white     { background: var(--surface)  !important; }
.border       { border-color: var(--border) !important; }
.rounded      { border-radius: var(--radius) !important; }

/* Tabellen-Zeilenfärbung im Dark-Theme – überschreibt grelles Bootstrap-Weiß */
.table-danger, .table > :not(caption) > * > .table-danger {
  background-color: rgba(239,68,68,.12) !important;
  color: var(--text) !important;
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
}
.table-warning, .table > :not(caption) > * > .table-warning {
  background-color: rgba(245,158,11,.10) !important;
  color: var(--text) !important;
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
}

.dropdown-menu {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.dropdown-item { color: var(--text); font-size: .875rem; }
.dropdown-item:hover { background: var(--surface3); color: var(--text); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.modal-header { border-color: var(--border); padding: 18px 22px; }
.modal-footer { border-color: var(--border); padding: 14px 22px; }
.modal-body   { padding: 20px 22px; }
.btn-close    { filter: invert(1) brightness(.7); }

/* ── Links ───────────────────────────────────────────────────────────────── */
a { color: #fb7185; }
a:hover { color: #fda4af; }
.text-primary   { color: var(--primary) !important; }
.text-secondary { color: var(--text-muted) !important; }
.fw-semibold.text-secondary { color: #c7c7cc !important; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.page-link {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text-dim);
  border-radius: var(--radius) !important;
}
.page-link:hover { background: var(--surface3); color: var(--text); }
.page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(225,29,72,.12) 0%, transparent 60%),
              linear-gradient(135deg, #07070a 0%, #0d0d16 100%);
}
.login-card {
  width: 100%; max-width: 420px;
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(225,29,72,.2);
  box-shadow: 0 0 60px rgba(225,29,72,.08), 0 20px 60px rgba(0,0,0,.7);
}
.login-header {
  background: linear-gradient(180deg, rgba(225,29,72,.14) 0%, rgba(225,29,72,.04) 100%);
  border-bottom: 1px solid rgba(225,29,72,.18);
  padding: 28px 24px 22px;
  text-align: center;
}
.login-body {
  background: var(--surface);
  padding: 28px;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: 64px; }
  .main-content { margin-left: 64px; }
  .sidebar-brand span, .sidebar-link span { display: none; }
  .sidebar-link.active::before { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SELF-SERVICE PORTAL
══════════════════════════════════════════════════════════════════════════════ */
.ss-body { background: var(--bg); padding-bottom: 76px; }

.ss-topbar {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: 54px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
}
.ss-logout {
  color: var(--text-muted); font-size: 1.4rem;
  padding: 8px; border-radius: 8px;
  transition: color .15s;
  text-decoration: none;
}
.ss-logout:hover { color: var(--primary); }

.ss-greeting { padding: 20px 16px 12px; }
.ss-greeting-name { font-size: 1.45rem; font-weight: 700; color: var(--text); }

.ss-notice {
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius); padding: 10px 14px;
  color: #fbbf24; font-size: .88rem;
  display: flex; align-items: center;
}

.ss-assignment-card {
  border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px;
  border-left: 3px solid transparent;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  box-shadow: var(--shadow-sm);
}
.ss-card-accepted { border-left-color: #22c55e !important; }
.ss-card-declined { border-left-color: #ef4444 !important; opacity: .75; }
.ss-card-pending  { border-left-color: #f59e0b !important; }

.ss-event-date { font-size: .8rem; color: var(--text-muted); }
.ss-weekday {
  display: inline-block; background: var(--surface2);
  border-radius: 4px; padding: 1px 6px;
  font-size: .72rem; font-weight: 600; margin-right: 4px;
  color: var(--text-dim);
}
.ss-event-name { font-size: 1.08rem; font-weight: 700; color: var(--text); margin: 6px 0 4px; }
.ss-event-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: .8rem; color: var(--text-muted); margin-bottom: 4px;
}

.ss-status-pill {
  font-size: .74rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.ss-pill-accepted { background: rgba(34,197,94,.15);  color: #4ade80; border: 1px solid rgba(34,197,94,.25); }
.ss-pill-declined { background: rgba(239,68,68,.15);  color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.ss-pill-pending  { background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.25); }

.ss-action-buttons { display: flex; gap: 10px; margin-top: 12px; }
.ss-btn-accept, .ss-btn-decline {
  flex: 1; width: 100%; padding: 13px;
  border: none; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.ss-btn-accept { background: #16a34a; color: #fff; }
.ss-btn-accept:hover { background: #15803d; transform: translateY(-1px); }
.ss-btn-decline {
  background: var(--surface2); color: #f87171;
  border: 1px solid rgba(239,68,68,.3);
}
.ss-btn-decline:hover { background: rgba(239,68,68,.12); }

.ss-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.ss-empty i { font-size: 3.5rem; opacity: .3; display: block; }
.ss-empty p { margin-top: 14px; font-size: 1.05rem; font-weight: 600; }
.ss-empty small { font-size: .82rem; }

.ss-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 68px;
  background: var(--sidebar-bg);
  border-top: 1px solid var(--border);
  display: flex; z-index: 200;
}
.ss-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--text-muted); text-decoration: none;
  font-size: .68rem; font-weight: 500; padding: 8px 0;
  transition: color .15s;
}
.ss-nav-item i { font-size: 1.5rem; }
.ss-nav-item.active { color: var(--primary); }
.ss-nav-item:hover { color: var(--text); }

.ss-card-plain {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.ss-btn-primary {
  display: block; width: 100%; padding: 14px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: background .15s, transform .1s;
}
.ss-btn-primary:hover { background: var(--primary-h); transform: translateY(-1px); }
.ss-blocked-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--border);
}

/* ── Profil & Hunde – Shared inputs (auch in Modals genutzt) ──────────────── */
.ss-input {
  width: 100%; background: rgba(255,255,255,.06);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 12px; color: var(--text); font-size: .95rem;
  outline: none; transition: border-color .15s;
}
.ss-input:focus { border-color: var(--primary); }
.ss-input option { background: var(--surface); color: var(--text); }
textarea.ss-input { resize: vertical; }
.ss-btn-save {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius); font-weight: 600;
  font-size: .95rem; cursor: pointer; transition: background .15s, transform .1s;
}
.ss-btn-save:hover { background: var(--primary-h); transform: translateY(-1px); }

/* Modal */
.ss-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.65); backdrop-filter: blur(6px);
  align-items: flex-end; justify-content: center;
}
.ss-modal-overlay.ss-modal-open { display: flex; animation: modal-in .22s ease; }
@keyframes modal-in { from { opacity:0; } to { opacity:1; } }
.ss-modal {
  background: #1c1c21; border-radius: 20px 20px 0 0;
  width: 100%; max-width: 560px; max-height: 92vh;
  overflow-y: auto; box-shadow: 0 -12px 60px rgba(0,0,0,.6);
  border: 1px solid var(--border); border-bottom: none;
  animation: modal-slide .25s cubic-bezier(.32,1,.6,1);
}
@keyframes modal-slide { from { transform: translateY(60px); } to { transform: translateY(0); } }
.ss-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 1rem; color: var(--text);
  position: sticky; top: 0; background: #1c1c21; z-index: 1;
}
.ss-modal-close {
  background: rgba(255,255,255,.08); border: none; color: var(--text-muted);
  font-size: .9rem; cursor: pointer; padding: 6px 8px; border-radius: 8px;
  transition: background .15s;
}
.ss-modal-close:hover { background: rgba(255,255,255,.14); }
.ss-modal-body { padding: 18px 20px; }
.ss-modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 20px; border-top: 1px solid var(--border);
  position: sticky; bottom: 0; background: #1c1c21;
}
.ss-btn-cancel {
  padding: 10px 18px; background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .9rem; cursor: pointer; transition: border-color .15s;
}
.ss-btn-cancel:hover { border-color: var(--text-muted); }
.ss-btn-warn {
  padding: 10px 18px; background: #dc2626; color: #fff;
  border: none; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; cursor: pointer;
}
.ss-btn-warn:hover { background: #b91c1c; }

/* ── Profil-Seite ────────────────────────────────────────────────────────── */
.prof-hero {
  background: linear-gradient(160deg, #1a1a20 0%, #111113 100%);
  padding: 32px 20px 24px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.prof-hero-sm { padding: 24px 20px 20px; }
.prof-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #9333ea);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800; color: #fff;
  box-shadow: 0 4px 20px rgba(225,29,72,.35);
  margin-bottom: 12px;
}
.prof-avatar-dog {
  background: linear-gradient(135deg, #dc2626, #9333ea);
  font-size: 1.8rem;
}
.prof-hero-name {
  font-size: 1.25rem; font-weight: 700; color: var(--text);
}
.prof-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.prof-section {
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--border); overflow: hidden;
}
.prof-section-label {
  font-size: .72rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em;
  padding: 12px 16px 8px; border-bottom: 1px solid var(--border);
}
.prof-field { padding: 0 16px 14px; }
.prof-field:first-of-type { padding-top: 14px; }
.prof-row { display: flex; gap: 0; }
.prof-row .prof-field { flex: 1; }
.prof-field-half { flex: 1; }
.prof-label {
  display: block; font-size: .76rem; color: var(--text-muted);
  margin-bottom: 5px; font-weight: 500;
}
.prof-readonly {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px; padding: 10px 14px;
  color: var(--text-muted); font-size: .95rem;
}
.prof-input-wrap { position: relative; }
.prof-input-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .9rem; pointer-events: none;
}
.prof-input {
  width: 100%; background: rgba(255,255,255,.06);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px 10px 38px; color: var(--text); font-size: .95rem;
  outline: none; transition: border-color .15s, background .15s;
}
.prof-input:focus {
  border-color: var(--primary);
  background: rgba(225,29,72,.07);
}
.prof-sizes-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--border);
}
.prof-size-item {
  background: var(--surface); padding: 14px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.prof-size-icon { font-size: 1.3rem; color: var(--text-muted); margin-bottom: 2px; }
.prof-size-badge {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(225,29,72,.12); color: var(--primary);
  border: 1px solid rgba(225,29,72,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; letter-spacing: .02em;
  margin-bottom: 4px;
}
.emp-size-badge {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; color: var(--text);
  margin-bottom: 4px;
}
.prof-select {
  width: 100%; background: rgba(255,255,255,.06);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; color: var(--text); font-size: .9rem;
  outline: none; text-align: center; transition: border-color .15s;
}
.prof-select:focus { border-color: var(--primary); }
.prof-select option { background: var(--surface); }
.prof-save-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--primary), #be123c);
  color: #fff; border: none; border-radius: 14px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  box-shadow: 0 4px 16px rgba(225,29,72,.3);
  transition: transform .15s, box-shadow .15s;
}
.prof-save-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(225,29,72,.4); }
.prof-save-btn:active { transform: translateY(0); }

/* ── Hunde-Seite ─────────────────────────────────────────────────────────── */
.dog-stats { display: flex; gap: 8px; justify-content: center; }
.dog-stat-pill {
  font-size: .78rem; font-weight: 600; padding: 4px 12px;
  border-radius: 20px;
}
.dog-stat-ok    { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.25); }
.dog-stat-total { background: rgba(255,255,255,.06); color: var(--text-muted); border: 1px solid var(--border); }

.dog-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  background: rgba(225,29,72,.1); color: var(--primary);
  border: 1.5px dashed rgba(225,29,72,.4); border-radius: 14px;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.dog-add-btn:hover { background: rgba(225,29,72,.18); border-color: var(--primary); }

.dog-card {
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
  transition: transform .15s;
}
.dog-card:active { transform: scale(.99); }
.dog-card-blocked { border-color: rgba(239,68,68,.4); box-shadow: 0 2px 16px rgba(239,68,68,.15); }
.dog-card-inactive { opacity: .55; }

.dog-card-inner {
  display: flex; gap: 14px; padding: 16px 16px 12px; align-items: flex-start;
}
.dog-paw {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  background: rgba(225,29,72,.12); color: var(--primary);
}
.dog-paw-blocked { background: rgba(239,68,68,.15); color: #f87171; }
.dog-paw-inactive { background: rgba(100,116,139,.12); color: var(--text-muted); }

.dog-info { flex: 1; min-width: 0; }
.dog-card-name { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.dog-card-breed { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }
.dog-card-meta {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
  font-size: .78rem; color: var(--text-muted);
}
.dog-block-banner {
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25);
  border-radius: 8px; padding: 6px 10px;
  font-size: .8rem; color: #f87171;
}
.dog-card-notes { font-size: .8rem; color: var(--text-muted); font-style: italic; }

.dog-status-wrap { flex-shrink: 0; }
.dog-status-pill {
  font-size: .72rem; font-weight: 700; padding: 4px 10px;
  border-radius: 20px; letter-spacing: .03em;
}
.dog-status-ok      { background: rgba(34,197,94,.15);  color: #4ade80; border: 1px solid rgba(34,197,94,.25); }
.dog-status-blocked { background: rgba(239,68,68,.15);  color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.dog-status-inactive{ background: rgba(100,116,139,.12); color: var(--text-muted); border: 1px solid var(--border); }

.dog-card-actions {
  display: flex; gap: 0; border-top: 1px solid var(--border);
}
.dog-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 8px; font-size: .82rem; font-weight: 600;
  border: none; cursor: pointer; transition: background .15s;
}
.dog-action-edit   { background: rgba(255,255,255,.04); color: var(--text-muted); }
.dog-action-edit:hover { background: rgba(255,255,255,.09); }
.dog-action-lock   { background: rgba(239,68,68,.08); color: #f87171; border-left: 1px solid var(--border); }
.dog-action-lock:hover { background: rgba(239,68,68,.16); }
.dog-action-unlock { background: rgba(34,197,94,.08); color: #4ade80; border-left: 1px solid var(--border); width: 100%; }
.dog-action-unlock:hover { background: rgba(34,197,94,.16); }

.dog-sperren-hint {
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2);
  border-radius: 10px; padding: 10px 14px;
  font-size: .83rem; color: #f87171;
}

/* Fahrzeug-Selfservice Kategorie-Grid */
.fz-kategorie-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.fz-kat-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 6px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1.5px solid var(--border);
  font-size: .75rem; color: var(--text-muted); text-align: center;
  transition: border-color .15s, background .15s;
}
.fz-kat-btn.fz-kat-active {
  border-color: var(--primary); background: rgba(225,29,72,.1); color: var(--text);
}

/* Compat: flex-1 helper */
.flex-1 { flex: 1; }

/* ══════════════════════════════════════════════════════════════════════════════
   DASHBOARD PRIORITÄTS-BANNER
══════════════════════════════════════════════════════════════════════════════ */

/* ── Prio 1 – Alarm: dezent, Akzent-Rand links, kein Glow ─────────────── */
.prio1-banner {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--alert-danger-accent);
}
.prio1-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(239,68,68,.05);
  border-bottom: 1px solid var(--border);
  color: var(--alert-danger-accent);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.prio1-header i { font-size: 1rem; color: var(--alert-danger-accent); }
.prio1-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--alert-danger-accent);
  flex-shrink: 0;
  animation: prio1-pulse 1.4s cubic-bezier(.4,0,.6,1) infinite;
}
@keyframes prio1-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.55); }
  70%  { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.prio1-item {
  padding: 14px 18px;
  background: transparent;
  border-bottom: 1px solid var(--border);
}
.prio1-item:last-child { border-bottom: none; }
.prio1-daybadge {
  background: #dc2626;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .07em;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  align-self: flex-start;
  flex-shrink: 0;
  margin-top: 2px;
}
.prio1-name {
  font-weight: 700;
  font-size: .98rem;
  color: var(--text);
  margin-bottom: 3px;
}
.prio1-meta {
  font-size: .8rem;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.prio1-status {
  font-size: .82rem;
  color: var(--text-dim);
}
.prio1-status strong { color: var(--alert-danger-accent); }
.prio1-status i { color: var(--alert-danger-accent); }
.prio1-btn {
  background: var(--alert-danger-accent);
  color: #fff !important;
  border: none;
  font-weight: 600;
  white-space: nowrap;
}
.prio1-btn:hover { background: #b91c1c; transform: translateY(-1px); }

/* ── Prio 2 – Warnung: dezent, Akzent-Rand links ──────────────────────── */
.prio2-banner {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--alert-warning-accent);
}
.prio2-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  background: rgba(234,179,8,.05);
  border-bottom: 1px solid var(--border);
  color: var(--alert-warning-accent);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.prio2-header i { font-size: 1rem; color: var(--alert-warning-accent); }
.prio2-item {
  padding: 13px 18px;
  background: transparent;
  border-bottom: 1px solid var(--border);
}
.prio2-item:last-child { border-bottom: none; }
.prio2-item:hover { background: rgba(234,179,8,.04); }
.prio2-daybadge {
  font-size: .75rem;
  font-weight: 700;
  color: var(--alert-warning-accent);
  background: rgba(234,179,8,.10);
  border: 1px solid rgba(234,179,8,.25);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.prio2-name {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  margin-bottom: 2px;
}
.prio2-meta { font-size: .78rem; color: var(--text-dim); }
.prio2-tag {
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.prio2-tag-red {
  background: rgba(220,38,38,.15);
  color: #fca5a5;
  border: 1px solid rgba(220,38,38,.25);
}
.prio2-tag-orange {
  background: rgba(217,119,6,.15);
  color: #fcd34d;
  border: 1px solid rgba(217,119,6,.25);
}

/* ══════════════════════════════════════════════════════════════════════════════
   AVATAR-KREISE
══════════════════════════════════════════════════════════════════════════════ */
.av-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: .02em;
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════════════════════════
   GLOBALE SUCHLEISTE
══════════════════════════════════════════════════════════════════════════════ */
.topnav-search {
  position: relative;
  flex: 0 0 auto;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 7px 12px;
  width: 240px;
  transition: width .2s, border-color .2s, box-shadow .2s;
}
.search-input-wrap:focus-within {
  width: 320px;
  border-color: rgba(var(--primary-rgb),.4);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.1);
}

.search-icon {
  color: var(--text-muted);
  font-size: .85rem;
  flex-shrink: 0;
}

.search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: .875rem;
  flex: 1;
  min-width: 0;
}
.search-input::placeholder { color: var(--text-muted); }

.search-kbd {
  font-size: .68rem;
  color: var(--text-muted);
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 2px 5px;
  flex-shrink: 0;
  font-family: inherit;
  letter-spacing: .02em;
}
.search-input-wrap:focus-within .search-kbd { display: none; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  overflow: hidden;
  min-width: 320px;
}

.search-group-label {
  padding: 8px 14px 4px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.search-group-label:first-child { border-top: none; }

.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  text-decoration: none;
  color: var(--text);
  transition: background .1s;
}
.search-item:hover { background: var(--surface2); color: var(--text); }

.search-item-title {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.search-item-sub {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.search-inactive {
  font-size: .7rem;
  background: var(--surface3);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 5px;
}
.search-empty {
  padding: 16px 14px;
  color: var(--text-muted);
  font-size: .875rem;
  text-align: center;
}

@media (max-width: 768px) {
  .search-input-wrap { width: 36px; padding: 7px 10px; }
  .search-input-wrap:focus-within { width: 200px; }
  .search-kbd { display: none; }
  .search-input { font-size: .82rem; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   EVENTS – SUCH-CLUSTER
══════════════════════════════════════════════════════════════════════════════ */
.cluster-banner {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(99,102,241,.35);
  background: linear-gradient(135deg, rgba(99,102,241,.08) 0%, rgba(139,92,246,.06) 100%);
  overflow: hidden;
}
.cluster-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid rgba(99,102,241,.2);
  font-size: .95rem;
}
.cluster-header i { color: #818cf8; font-size: 1.1rem; }
.cluster-title {
  font-weight: 700;
  color: #c4b5fd;
  font-size: 1.05rem;
  flex: 1;
}
.cluster-total {
  font-size: .8rem;
  color: var(--text-muted);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 2px 10px;
}
.cluster-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: .75rem 1.25rem;
}
.cluster-stat {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cluster-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cluster-num {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.cluster-lbl {
  font-size: .78rem;
  color: var(--text-muted);
}

/* Filter-Chips */
.filter-chip { border-radius: 999px !important; font-size: .78rem !important; }

/* Schicht-Konfiguration im Event-Formular */
.schicht-config-block {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin-bottom: .75rem;
}
.schicht-block-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #818cf8;
  margin-bottom: .5rem;
}

/* Schicht-Badge im Einsatzplan */
.ep-schicht-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .68rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  margin-left: 4px;
}
.ep-schicht-badge--1 {
  background: rgba(99,102,241,.15);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,.25);
}
.ep-schicht-badge--2 {
  background: rgba(139,92,246,.15);
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,.25);
}

/* Schicht-Badge im Event-Detail */
.schicht-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.schicht-pill--1 {
  background: rgba(99,102,241,.15);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,.3);
}
.schicht-pill--2 {
  background: rgba(139,92,246,.15);
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,.3);
}

/* Protokoll – Bereich-Auswahl mit Zeiten */
.area-row { background: var(--surface2); transition: background .15s; }
.area-row:last-child { border-bottom: none !important; }
.area-row-main {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  cursor: pointer;
  user-select: none;
}
.area-row-main:hover { background: var(--surface3); }
.area-checkbox {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
  transition: all .15s;
}
.area-checked {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}
.area-label { flex: 1; font-size: .9rem; font-weight: 500; }
.area-time-preview {
  font-size: .75rem;
  color: #22c55e;
  font-weight: 600;
  white-space: nowrap;
}
.area-time-inputs {
  display: flex;
  gap: 1rem;
  padding: .5rem 1rem .75rem 3.25rem;
  background: rgba(34,197,94,.05);
  border-top: 1px solid rgba(34,197,94,.1);
}
.area-time-inputs > div { flex: 1; min-width: 80px; max-width: 140px; }
.area-time-inputs > div:last-child { flex: 1.5; max-width: 180px; }

/* Suchdropdown – "Alle anzeigen" */
.search-all-link {
  font-size: .72rem;
  color: #818cf8;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.search-all-link:hover { color: #c4b5fd; text-decoration: underline; }
.search-show-all {
  border-top: 1px solid var(--border);
  background: rgba(99,102,241,.06);
  font-size: .82rem;
  font-weight: 600;
}
.search-show-all:hover { background: rgba(99,102,241,.14); }

/* ══════════════════════════════════════════════════════════════════════════════
   STATUS-PILLS — einheitlich für die ganze App
   Benutzung: <span class="status-pill status-pill-planned">Geplant</span>
   Klassen: status-pill-planned / -confirmed / -completed / -cancelled
══════════════════════════════════════════════════════════════════════════════ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .25px;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}
.status-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: .9;
}
.status-pill-planned {
  background: var(--status-planned-bg);
  color: var(--status-planned);
  border-color: var(--status-planned-border);
}
.status-pill-confirmed {
  background: var(--status-confirmed-bg);
  color: var(--status-confirmed);
  border-color: var(--status-confirmed-border);
}
.status-pill-completed {
  background: var(--status-completed-bg);
  color: var(--status-completed);
  border-color: var(--status-completed-border);
}
.status-pill-cancelled {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled);
  border-color: var(--status-cancelled-border);
}

/* ══════════════════════════════════════════════════════════════════════════════
   ALERT-CARDS — dezenter Akzent-Rand statt voll-farbigem Hintergrund
   Benutzung: .alert-card.alert-card-danger / -warning / -info / -success
══════════════════════════════════════════════════════════════════════════════ */
.alert-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius);
  overflow: hidden;
}
.alert-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.alert-card-danger  { border-left-color: var(--alert-danger-accent); }
.alert-card-warning { border-left-color: var(--alert-warning-accent); }
.alert-card-info    { border-left-color: var(--alert-info-accent); }
.alert-card-success { border-left-color: var(--alert-success-accent); }
.alert-card-danger  .card-header { color: var(--alert-danger-accent); }
.alert-card-warning .card-header { color: var(--alert-warning-accent); }
.alert-card-info    .card-header { color: var(--alert-info-accent); }
.alert-card-success .card-header { color: var(--alert-success-accent); }
.alert-card-danger::before,
.alert-card-warning::before,
.alert-card-info::before,
.alert-card-success::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0;
}
.alert-card-danger  > .card-header { background: rgba(239,68,68,.04); }
.alert-card-warning > .card-header { background: rgba(234,179,8,.04); }
.alert-card-info    > .card-header { background: rgba(59,130,246,.04); }
.alert-card-success > .card-header { background: rgba(34,197,94,.04); }

/* Klappbare Karte (Header ist Trigger) */
.collapsible-header {
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.collapsible-header:hover { background: rgba(255,255,255,.03); }
.collapse-chevron {
  display: inline-block;
  transition: transform .2s cubic-bezier(.4,0,.2,1);
}
.collapsible-header[aria-expanded="true"] .collapse-chevron {
  transform: rotate(90deg);
}

/* ══════════════════════════════════════════════════════════════════════════════
   EMPTY-STATE — wenn Listen leer sind
   Benutzung:
     <div class="empty-state">
       <i class="bi bi-calendar-event empty-state-icon"></i>
       <h5 class="empty-state-title">Keine Einsätze</h5>
       <p class="empty-state-text">Noch keine Einsätze geplant.</p>
       <a class="btn btn-primary btn-sm">Neuer Einsatz</a>
     </div>
══════════════════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 3rem;
  color: var(--surface3);
  display: inline-block;
  margin-bottom: 14px;
  line-height: 1;
}
.empty-state-title {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 6px 0;
}
.empty-state-text {
  font-size: .9rem;
  margin: 0 0 14px 0;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.45;
}
.empty-state .btn { margin-top: 4px; }
/* Kompakt-Variante in kleineren Karten */
.empty-state.empty-state-sm { padding: 24px 16px; }
.empty-state.empty-state-sm .empty-state-icon { font-size: 2rem; margin-bottom: 8px; }
.empty-state.empty-state-sm .empty-state-title { font-size: .95rem; }

/* ══════════════════════════════════════════════════════════════════════════════
   FORM-FOKUS — Brand-Rot statt Bootstrap-Blau
══════════════════════════════════════════════════════════════════════════════ */
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="month"]:focus,
textarea:focus,
select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 .2rem rgba(var(--primary-rgb), .18) !important;
  outline: none !important;
}
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* ══════════════════════════════════════════════════════════════════════════════
   TOAST-NOTIFICATIONS — Flash-Messages als Slide-In statt Alert-Bar
══════════════════════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: 360px;
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 12px 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-left: 4px solid var(--text-muted);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.4);
  color: var(--text);
  font-size: .88rem;
  line-height: 1.4;
  transform: translateX(120%);
  opacity: 0;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
  min-width: 260px;
  max-width: 360px;
  position: relative;
  overflow: hidden;
}
.toast-item.toast-show { transform: translateX(0); opacity: 1; }
.toast-item.toast-hide { transform: translateX(120%); opacity: 0; }
.toast-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  margin-top: 1px;
}
.toast-msg { flex-grow: 1; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
  transition: color .15s;
}
.toast-close:hover { color: var(--text); }
/* Per-Kategorie Akzent links + Icon-Farbe */
.toast-item.toast-success { border-left-color: var(--alert-success-accent); }
.toast-item.toast-success .toast-icon { color: var(--alert-success-accent); }
.toast-item.toast-danger  { border-left-color: var(--alert-danger-accent); }
.toast-item.toast-danger  .toast-icon { color: var(--alert-danger-accent); }
.toast-item.toast-warning { border-left-color: var(--alert-warning-accent); }
.toast-item.toast-warning .toast-icon { color: var(--alert-warning-accent); }
.toast-item.toast-info    { border-left-color: var(--alert-info-accent); }
.toast-item.toast-info    .toast-icon { color: var(--alert-info-accent); }
/* Auto-Hide-Fortschritts-Balken */
.toast-progress {
  position: absolute;
  left: 0; bottom: 0; height: 2px;
  background: currentColor;
  opacity: .35;
  animation: toast-progress 5s linear forwards;
  width: 100%;
}
@keyframes toast-progress { from { width: 100%; } to { width: 0; } }
.toast-item.toast-success .toast-progress { color: var(--alert-success-accent); }
.toast-item.toast-danger  .toast-progress { color: var(--alert-danger-accent); }
.toast-item.toast-warning .toast-progress { color: var(--alert-warning-accent); }
.toast-item.toast-info    .toast-progress { color: var(--alert-info-accent); }

@media (max-width: 600px) {
  .toast-container {
    right: 10px; left: 10px; bottom: 10px;
    max-width: none;
  }
  .toast-item { min-width: 0; max-width: none; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SIDEBAR ACTIVE-INDICATOR — sanfte Animation beim Wechsel der aktiven Seite
══════════════════════════════════════════════════════════════════════════════ */
.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  height: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
  margin-left: -8px;
  transform: translateY(-50%);
  transition: height .25s cubic-bezier(.4,0,.2,1), opacity .2s ease;
  opacity: 0;
}
.sidebar-link.active::before {
  height: 60%;
  opacity: 1;
}
.sidebar-link {
  transition: color .15s, background .15s, padding-left .18s ease;
}
.sidebar-link.active { padding-left: 18px; }
.sidebar-link i { transition: color .15s, transform .2s ease; }
.sidebar-link.active i { transform: scale(1.08); }

/* ══════════════════════════════════════════════════════════════════════════════
   TYPOGRAFIE — einheitliche Titel-Hierarchie
══════════════════════════════════════════════════════════════════════════════ */
/* page-header (oben auf jeder Seite) — bereits genutzt, hier durchnormalisiert */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-header h1, .page-header h2, .page-header h3, .page-header h4, .page-header h5 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -.01em;
}
/* Section-Titel innerhalb einer Page (z. B. "Aktuelle Einsätze", "Verfügbare Mitarbeiter") */
.section-title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin: 0 0 12px;
}
/* Card-Header normalisieren — etwas mehr Padding, dezenter Akzent */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card-header {
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: -.01em;
  padding: .85rem 1.25rem;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--border);
}
.card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5, .card-header h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}
.card-body { padding: 1.25rem; }
.card-body.p-0 { padding: 0 !important; }
/* mehr Atemraum zwischen direkt aufeinanderfolgenden Cards */
.card + .card { margin-top: 1.25rem; }
/* Subtile Akzent-Lichtkante unter dem Header (Brand-Rot, sehr dezent) */
.card-header::after {
  content: '';
  display: block;
  position: relative;
  height: 1px;
  margin: 0 -1.25rem;
  background: linear-gradient(90deg, transparent 0%, rgba(var(--primary-rgb),.18) 50%, transparent 100%);
  margin-top: .85rem;
  margin-bottom: -.86rem;
}

/* ══════════════════════════════════════════════════════════════════════════════
   BUTTON-SYSTEM — klare Hierarchie
   - btn-primary  = Haupt-Aktion (rot)
   - btn-outline-* = Sekundär
   - btn-link / btn-ghost = Tertiär
══════════════════════════════════════════════════════════════════════════════ */
.btn {
  font-weight: 600;
  letter-spacing: -.005em;
  transition: transform .12s ease, box-shadow .15s, background .15s, color .15s, border-color .15s;
}
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-h);
  border-color: var(--primary-h);
  color: #fff;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), .35);
  transform: translateY(-1px);
}
.btn-primary:active { background: var(--primary-h); transform: translateY(0); }
.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
/* Tertiäre Aktion: dezent, ohne Border */
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: .375rem .75rem;
}
.btn-ghost:hover {
  background: rgba(255,255,255,.06);
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════════════════════════
   SKELETON-LOADER — Platzhalter beim Daten-Nachladen
   Benutzung: <div class="skeleton skeleton-line"></div>
══════════════════════════════════════════════════════════════════════════════ */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface2);
  border-radius: 6px;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,.06) 50%,
    transparent 100%);
  animation: skeleton-shimmer 1.4s infinite linear;
  transform: translateX(-100%);
}
@keyframes skeleton-shimmer {
  to { transform: translateX(100%); }
}
.skeleton-line   { height: 12px; margin: 6px 0; }
.skeleton-line.lg { height: 18px; }
.skeleton-line.sm { height: 9px; }
.skeleton-line.w-25 { width: 25%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-75 { width: 75%; }
.skeleton-circle { width: 36px; height: 36px; border-radius: 50%; }
.skeleton-card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ══════════════════════════════════════════════════════════════════════════════
   MITARBEITER-CARDS — Card-Grid statt Tabelle
══════════════════════════════════════════════════════════════════════════════ */
.emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.emp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, transform .12s, box-shadow .15s;
  position: relative;
}
.emp-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.emp-card.inactive { opacity: .55; }
.emp-card-header { display: flex; align-items: center; gap: 10px; }
.emp-card-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  flex-shrink: 0;
}
.emp-card-name {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  line-height: 1.2;
}
.emp-card-sub {
  font-size: .78rem;
  color: var(--text-dim);
  line-height: 1.2;
  margin-top: 2px;
}
.emp-card-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: .77rem;
  color: var(--text-dim);
}
.emp-card-meta i { margin-right: 4px; opacity: .8; }
.emp-card-actions {
  display: flex; gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.emp-card-actions .btn { padding: .25rem .55rem; font-size: .78rem; }
