/* sloppyscan – Baustellen-Zugangskontrolle
   Farbpalette: cream #f9f2e0 | slate-blue #8cadb4 | terra-orange #ca633a | brick-red #aa241b */

:root {
  --zuko-dark:    #1e293b;
  --zuko-mid:     #334155;
  --zuko-cream:   #f9f2e0;
  --zuko-slate:   #8cadb4;
  --zuko-orange:  #b05530;
  --zuko-red:     #aa241b;
  --zuko-green:   #16a34a;
  --zuko-border:  #d4c9b0;
  --zuko-shadow:  0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --radius:       12px;

  /* Bootstrap variable overrides – alle "weißen" Hintergründe → cream */
  --bs-body-bg:            #f9f2e0;
  --bs-body-bg-rgb:        249,242,224;
  --bs-secondary-bg:       #ede8d8;
  --bs-secondary-bg-rgb:   237,232,216;
  --bs-tertiary-bg:        #e6dfcc;
  --bs-tertiary-bg-rgb:    230,223,204;
  --bs-body-color:         #1e293b;
  --bs-body-color-rgb:     30,41,59;
  --bs-emphasis-color:     #1e293b;
  --bs-border-color:       #d4c9b0;
  --bs-border-color-translucent: rgba(30,41,59,.15);
}

/* ── Layout ── */
body {
  background: var(--zuko-cream);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1e293b;
  min-height: 100vh;
}

/* ── Navbar ── */
.navbar {
  background: var(--zuko-cream) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  border-bottom: 1px solid var(--zuko-border);
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .02em;
}
.navbar-brand span {
  color: var(--zuko-orange);
}
.nav-link { color: var(--zuko-mid) !important; }
.nav-link:hover, .nav-link.active { color: var(--zuko-dark) !important; }
.nav-link.active { font-weight: 600; }
.navbar-toggler { border-color: var(--zuko-border); }
.navbar-toggler-icon { filter: invert(0); }

/* ── Cards ── */
.card {
  border: 1px solid var(--zuko-border);
  border-radius: var(--radius);
  box-shadow: var(--zuko-shadow);
  background: var(--zuko-cream);
}
.card-header {
  background: var(--zuko-slate);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0 !important;
  font-weight: 600;
  padding: .75rem 1.25rem;
  border-bottom: none;
}

/* ── Stat cards (dashboard) ── */
.stat-card {
  border-radius: var(--radius);
  padding: .5rem .75rem;
  box-shadow: var(--zuko-shadow);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-card .stat-value { font-size: 1.1rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: .7rem; opacity: .85; margin-top: .15rem; }
a.stat-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .1s, box-shadow .15s;
  border-radius: var(--radius);
}
a.stat-card-link:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
a.stat-card-link .stat-card { cursor: pointer; }
.stat-card-primary  { background: var(--zuko-dark); }
.stat-card-success  { background: var(--zuko-green); }
.stat-card-warning  { background: var(--zuko-orange); }
.stat-card-danger   { background: var(--zuko-red); }
.stat-card-accent {
  border-left: 4px solid #7c3aed;
}
.stat-card-accent .stat-number { color: #7c3aed; }

/* ── SÜG warning ── */
.sueg-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #f5d5d0;
  color: var(--zuko-red);
  border: 1px solid #d9a09a;
  border-radius: 6px;
  padding: .15rem .5rem;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.sueg-badge svg { width: 14px; height: 14px; }

/* ── Status badges ── */
.status-erwartet   { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.status-anwesend   { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.status-ausgecheckt { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

/* ── Buttons ── */
.btn-zuko {
  background: var(--zuko-orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
}
.btn-zuko:hover { background: #964824; color: #fff; }

/* ── Form controls (light mode) – etwas heller als Karten-Hintergrund ── */
.form-control,
.form-select {
  background-color: #fffef8;
  border-color: var(--zuko-border);
}
.form-control:focus,
.form-select:focus {
  background-color: #fffef8;
  border-color: var(--zuko-slate);
  box-shadow: 0 0 0 0.2rem rgba(140,173,180,.2);
}

/* ── Table ── */
.table { font-size: .9rem; }
.table thead th {
  background: var(--zuko-slate);
  color: #fff;
  font-weight: 600;
  border: none;
  white-space: nowrap;
}
.table-hover tbody tr:hover { background: #eef3f5; }
.table:not(.table-hover) tbody tr:hover { background: inherit; }

/* ── Striped column highlight (every other td in a row) ── */
.table-striped-col > tbody > tr > td:nth-child(even),
.table-striped-col > tbody > tr > th:nth-child(even) {
  background: rgba(140,173,180,.08);
}

/* ── Login page ── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--zuko-dark) 0%, #2563eb 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}
.login-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--zuko-dark);
  text-align: center;
  margin-bottom: .25rem;
}
.login-logo span { color: var(--zuko-orange); }

/* ── Sidebar nav (admin) ── */
.admin-sidebar .nav-link {
  color: var(--zuko-mid) !important;
  border-radius: 8px;
  padding: .5rem .75rem;
  margin-bottom: .15rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: var(--zuko-slate);
  color: #fff !important;
}
.admin-sidebar .nav-link.active { font-weight: 600; }

/* ── Alerts ── */
.alert { border-radius: 10px; border: none; }

/* ── SÜG warning banner ── */
.sueg-alert {
  background: #f5d5d0;
  border: 2px solid var(--zuko-red);
  border-radius: var(--radius);
  color: var(--zuko-red);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .stat-card .stat-value { font-size: 1rem; }
  .table { font-size: .8rem; }
}

/* ── User pill + avatar (SloppyFix style) ── */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--zuko-cream);
  border: 1px solid var(--zuko-border);
  border-radius: 20px;
  padding: .25rem .75rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--zuko-dark);
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.user-pill:hover {
  background: #ede8d8;
  border-color: #bbb49e;
}
.user-pill i { font-size: .85rem; opacity: .7; }
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #4a5a3a;
  color: #f0e8d8;
  font-size: .85rem;
  font-weight: 700;
  flex-shrink: 0;
}
[data-bs-theme="dark"] .user-pill {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}
[data-bs-theme="dark"] .user-pill:hover {
  background: #374151;
  border-color: #4b5563;
}
[data-bs-theme="dark"] .user-avatar {
  background: #6b7a5a;
  color: #f0e8d8;
}
/* Hide Bootstrap dropdown caret on icon-only nav items */
.nav-no-caret::after { display: none !important; }

/* ── Custom icons – blend modes so black-on-white PNGs work on any background ── */
/* Navbar (now light/cream bg): multiply hides white bg, black art stays black */
.nav-icon {
  width: 57px; height: 57px;
  object-fit: contain;
  vertical-align: middle;
  mix-blend-mode: multiply;
  opacity: .85;
  flex-shrink: 0;
}
.nav-icon-sm {
  width: 47px; height: 47px;
  object-fit: contain;
  vertical-align: middle;
  mix-blend-mode: multiply;
  opacity: .85;
  flex-shrink: 0;
}
/* Content area (light mode cream bg): multiply hides white bg, shows black art */
.content-icon {
  object-fit: contain;
  mix-blend-mode: multiply;
}
/* Content area dark mode: invert + screen = white art on dark bg */
[data-bs-theme="dark"] .content-icon {
  filter: invert(1);
  mix-blend-mode: screen;
}

/* ── Dark mode – Bootstrap CSS variable overrides (must come AFTER :root block) ── */
/* These fix --bs-body-color etc. which :root overrides with light-mode values */
[data-bs-theme="dark"] {
  --bs-body-bg:                   #07101d;
  --bs-body-bg-rgb:               7,16,29;
  --bs-body-color:                #b0c4d8;
  --bs-body-color-rgb:            176,196,216;
  --bs-secondary-bg:              #0e1a2a;
  --bs-secondary-bg-rgb:          14,26,42;
  --bs-tertiary-bg:               #0a1520;
  --bs-tertiary-bg-rgb:           10,21,32;
  --bs-emphasis-color:            #d0e0ef;
  --bs-emphasis-color-rgb:        208,224,239;
  --bs-secondary-color:           #6080a0;
  --bs-secondary-color-rgb:       96,128,160;
  --bs-border-color:              #1e2d42;
  --bs-border-color-translucent:  rgba(176,196,216,.15);
  --bs-link-color:                #8cadb4;
  --bs-link-color-rgb:            140,173,180;
  --bs-link-hover-color:          #b0d0d8;
  --bs-heading-color:             #c8dae8;
}

/* ── Dark mode – nullroutine-style: monochrome, minimal color ── */
[data-bs-theme="dark"] body {
  background: #07101d;
  color: #b0c4d8;
}
[data-bs-theme="dark"] .card {
  background: #0e1a2a;
  border-color: #1e2d42;
}
/* Card headers: slate-blue tint, no orange */
[data-bs-theme="dark"] .card-header {
  background: #12253a;
  color: #8cadb4;
  border-color: #1e2d42;
  font-weight: 600;
  letter-spacing: .02em;
}
/* Tables */
[data-bs-theme="dark"] .table {
  color: #b0c4d8;
  --bs-table-bg: transparent;
}
[data-bs-theme="dark"] .table thead th {
  background: #0a1e30;
  color: #8cadb4;
  border-color: #1e2d42;
}
[data-bs-theme="dark"] .table > :not(caption) > * > * {
  border-color: #1e2d42;
  background-color: transparent;
}
[data-bs-theme="dark"] .table-hover tbody tr:hover td {
  background: #0e2038 !important;
}
[data-bs-theme="dark"] .table:not(.table-hover) tbody tr:hover td {
  background: inherit !important;
}
/* Fix table-danger in dark mode (SÜG rows) */
[data-bs-theme="dark"] .table-danger,
[data-bs-theme="dark"] .table-danger td,
[data-bs-theme="dark"] .table-danger th {
  --bs-table-bg: rgba(170,36,27,.15) !important;
  --bs-table-hover-bg: rgba(170,36,27,.28) !important;
  background-color: rgba(170,36,27,.15) !important;
  color: #b0c4d8 !important;
}
[data-bs-theme="dark"] .table-danger:hover td,
[data-bs-theme="dark"] .table tbody tr.table-danger:hover td {
  background: rgba(170,36,27,.28) !important;
  color: #b0c4d8 !important;
}
/* Links inside SÜG rows – Bootstrap link color override */
[data-bs-theme="dark"] .table-danger a,
[data-bs-theme="dark"] .table-danger td a,
[data-bs-theme="dark"] .table-danger th a {
  color: #b0c4d8 !important;
}
[data-bs-theme="dark"] .table-danger a:hover,
[data-bs-theme="dark"] .table-danger td a:hover {
  color: #d0e4f4 !important;
}
/* Modals */
[data-bs-theme="dark"] .modal-content {
  background: #0e1a2a;
  color: #b0c4d8;
  border-color: #1e2d42;
}
[data-bs-theme="dark"] .modal-header {
  border-color: #1e2d42;
}
/* Forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background: #07101d;
  border-color: #2a3d55;
  color: #b0c4d8;
}
[data-bs-theme="dark"] .form-control::placeholder { color: #4a6070; }
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background: #07101d;
  color: #d0e0ef;
  border-color: #8cadb4;
  box-shadow: 0 0 0 0.2rem rgba(140,173,180,.2);
}
[data-bs-theme="dark"] .form-text,
[data-bs-theme="dark"] .form-check-label { color: #6080a0; }
/* Alerts */
[data-bs-theme="dark"] .alert-info    { background: #0a1e35; color: #7ab0d8; border-color: #1a3a55; }
[data-bs-theme="dark"] .alert-warning { background: #1e1500; color: #c09030; border-color: #3a2a00; }
[data-bs-theme="dark"] .alert-danger  { background: #1e0a0a; color: #c07070; border-color: #3a1515; }
[data-bs-theme="dark"] .alert-success { background: #051510; color: #50a070; border-color: #0a2a1a; }
/* Dropdown */
[data-bs-theme="dark"] .dropdown-menu {
  background: #0e1a2a;
  border-color: #1e2d42;
}
[data-bs-theme="dark"] .dropdown-item { color: #b0c4d8; }
[data-bs-theme="dark"] .dropdown-item:hover { background: #1e2d42; color: #d0e0ef; }
/* Non-clickable dropdown rows: no hover effect in any mode */
.dropdown-item-static,
.dropdown-item-static:hover,
.dropdown-item-static:focus {
  cursor: default;
  background: transparent !important;
  color: inherit !important;
}
[data-bs-theme="dark"] .dropdown-item-static,
[data-bs-theme="dark"] .dropdown-item-static:hover {
  background: transparent !important;
  color: #b0c4d8 !important;
}
[data-bs-theme="dark"] .dropdown-divider { border-color: #1e2d42; }
/* Footer */
[data-bs-theme="dark"] footer { border-top-color: #1e2d42 !important; color: #4a6070; }
[data-bs-theme="dark"] footer a { color: #4a6070 !important; }
/* SÜG */
[data-bs-theme="dark"] .sueg-badge { background: rgba(170,36,27,.25); color: #d07070; border-color: rgba(170,36,27,.4); }
[data-bs-theme="dark"] .sueg-alert { background: rgba(170,36,27,.15); border-color: rgba(170,36,27,.4); color: #d07070; }
/* Status badges */
[data-bs-theme="dark"] .status-erwartet   { background: rgba(120,80,0,.25); color: #b09040; border-color: rgba(120,80,0,.4); }
[data-bs-theme="dark"] .status-anwesend   { background: rgba(0,80,40,.25);  color: #50a070; border-color: rgba(0,80,40,.4); }
[data-bs-theme="dark"] .status-ausgecheckt{ background: rgba(30,45,66,.5);   color: #5070a0; border-color: rgba(30,45,66,.8); }
/* Buttons */
[data-bs-theme="dark"] .btn-outline-secondary { color: #6080a0; border-color: #2a3d55; }
[data-bs-theme="dark"] .btn-outline-secondary:hover { background: #1e2d42; color: #b0c4d8; }
[data-bs-theme="dark"] .btn-outline-primary  { color: #8cadb4; border-color: #2a4060; }
[data-bs-theme="dark"] .btn-outline-primary:hover { background: #1a2d42; color: #b0c8d0; }
[data-bs-theme="dark"] .btn-outline-danger  { color: #c07070; border-color: #4a1a1a; }
[data-bs-theme="dark"] .btn-outline-warning { color: #c09040; border-color: #4a3a10; }
[data-bs-theme="dark"] .btn-outline-success { color: #50a070; border-color: #0a3020; }
/* Text */
[data-bs-theme="dark"] .text-dark   { color: #b0c4d8 !important; }
[data-bs-theme="dark"] .text-body   { color: #b0c4d8 !important; }
[data-bs-theme="dark"] .text-muted  { color: #4a6070 !important; }
[data-bs-theme="dark"] .fw-semibold { color: #c8dae8 !important; }
/* General link color in dark mode – prevents Bootstrap's default light-blue links */
[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.lang-toggle-btn) {
  color: #8cadb4;
}
[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.lang-toggle-btn):hover {
  color: #b0d0d8;
}
[data-bs-theme="dark"] code { color: #ca633a; background: rgba(0,0,0,.3); padding: .1em .3em; border-radius: 4px; }
/* Admin sidebar */
[data-bs-theme="dark"] .admin-sidebar .nav-link { color: #6080a0 !important; }
[data-bs-theme="dark"] .admin-sidebar .nav-link:hover,
[data-bs-theme="dark"] .admin-sidebar .nav-link.active { background: #1e2d42; color: #b0c4d8 !important; }
/* NFC result */
[data-bs-theme="dark"] .nfc-result-granted { background: rgba(0,80,40,.25); border-color: rgba(0,80,40,.5); color: #50c080; }
[data-bs-theme="dark"] .nfc-result-denied  { background: rgba(170,36,27,.2); border-color: rgba(170,36,27,.4); color: #d07070; }
/* Badge in dark mode */
[data-bs-theme="dark"] .badge.bg-warning { color: #1a1200 !important; }
/* Theme toggle button */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--zuko-border);
  color: var(--zuko-mid);
  border-radius: 6px;
  padding: .2rem .5rem;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
}
.theme-toggle-btn:hover {
  background: rgba(30,41,59,.08);
  color: var(--zuko-dark);
  border-color: var(--zuko-mid);
}
/* Lang toggle */
.lang-toggle-btn {
  background: none;
  border: 1px solid var(--zuko-border);
  color: var(--zuko-mid);
  border-radius: 6px;
  padding: .2rem .5rem;
  font-size: .8rem;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.lang-toggle-btn:hover {
  background: rgba(30,41,59,.08);
  color: var(--zuko-dark);
  border-color: var(--zuko-mid);
}
.lang-toggle-btn.active {
  background: rgba(202,99,58,.15);
  border-color: #ca633a;
  color: #ca633a;
}
/* Dark mode: invert nav icons (black art → white) since dark bg */
[data-bs-theme="dark"] .nav-icon,
[data-bs-theme="dark"] .nav-icon-sm {
  filter: invert(1);
  mix-blend-mode: screen;
}
/* Dark mode navbar stays dark */
[data-bs-theme="dark"] .navbar {
  background: #0a1520 !important;
  border-bottom-color: #1e2d42;
}
[data-bs-theme="dark"] .nav-link { color: #8cadb4 !important; }
[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active { color: #d0e4f4 !important; }
[data-bs-theme="dark"] .theme-toggle-btn {
  border-color: #2a3d55; color: #8cadb4;
}
[data-bs-theme="dark"] .theme-toggle-btn:hover {
  background: rgba(140,173,180,.1); color: #d0e4f4; border-color: #8cadb4;
}
[data-bs-theme="dark"] .lang-toggle-btn {
  border-color: #2a3d55; color: #8cadb4;
}
[data-bs-theme="dark"] .lang-toggle-btn:hover {
  background: rgba(140,173,180,.1); color: #d0e4f4; border-color: #8cadb4;
}
[data-bs-theme="dark"] .lang-toggle-btn.active {
  background: rgba(202,99,58,.2); border-color: #ca633a; color: #ca633a;
}
[data-bs-theme="dark"] .navbar-toggler { border-color: #2a3d55; }
[data-bs-theme="dark"] .navbar-toggler-icon { filter: invert(1); }
/* ══════════════════════════════════════════════════════════
   Visitor list – "Heute" card rows (touch-optimized)
   ══════════════════════════════════════════════════════════ */
.vlist { display: flex; flex-direction: column; gap: .5rem; }

.vlist-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--zuko-border);
  border-radius: var(--radius);
  background: #fffef8;
  overflow: hidden;
  transition: box-shadow .12s, border-color .12s;
  min-height: 72px;
}
.vlist-row:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  border-color: var(--zuko-slate);
}

/* SÜG-relevante Zeile */
.vlist-row-sueg {
  border-left: 4px solid var(--zuko-red);
  background: #fef8f7;
}

/* ── Status-Streifen (4px am linken Rand) ── */
.vlist-status-strip {
  width: 5px;
  flex-shrink: 0;
}
.vlist-row-sueg .vlist-status-strip { display: none; }
.vlist-strip-erwartet   { background: #f59e0b; }
.vlist-strip-anwesend   { background: var(--zuko-green); }
.vlist-strip-ausgecheckt { background: #94a3b8; }

/* ── Klickbarer Hauptbereich ── */
.vlist-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.vlist-body:hover { color: inherit; }

.vlist-info { flex: 1; min-width: 0; }

.vlist-name {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--zuko-dark);
}
.vlist-meta {
  font-size: .82rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem;
  margin-top: .15rem;
}
.vlist-sep::before {
  content: '·';
  margin: 0 .3rem;
  color: #94a3b8;
}

.vlist-zones {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .35rem;
}
.vlist-zone-badge {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.vlist-times {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .25rem;
  text-align: right;
}
.vlist-time-label {
  font-size: .8rem;
  color: #64748b;
  white-space: nowrap;
}
.vlist-status-badge {
  border-radius: 6px;
  font-size: .78rem;
  padding: .2rem .6rem;
}
.vlist-presence-warn {
  font-size: .72rem;
  color: var(--zuko-red);
  font-weight: 600;
}
.vlist-presence-ok {
  font-size: .72rem;
  color: var(--zuko-green);
  font-weight: 600;
}

/* ── Aktions-Buttons (groß, touch-tauglich) ── */
.vlist-actions {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}
.vlist-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: filter .12s, background .12s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.vlist-btn:active { filter: brightness(.85); }

.vlist-btn-icon {
  width: 26px;
  height: 26px;
  margin-bottom: .15rem;
}
.vlist-btn-label {
  font-size: .68rem;
  letter-spacing: .02em;
  line-height: 1.2;
  text-align: center;
}

.vlist-btn-checkin {
  background: #dcfce7;
  color: #166534;
}
.vlist-btn-checkin:hover { background: #bbf7d0; }

.vlist-btn-checkout {
  background: #f1f5f9;
  color: #475569;
}
.vlist-btn-checkout:hover { background: #e2e8f0; }

.vlist-btn-done {
  background: transparent;
  color: #94a3b8;
  cursor: default;
  width: 56px;
}

/* ── Full-HD: Breite optimal nutzen ── */
@media (min-width: 1400px) {
  .vlist-body { padding: .85rem 1.25rem; }
  .vlist-name { font-size: 1.1rem; }
  .vlist-btn { width: 90px; }
  .vlist-btn-icon { width: 28px; height: 28px; }
}

/* ── Tablet / Touch ── */
@media (max-width: 768px) {
  .vlist-body {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    padding: .65rem .75rem;
  }
  .vlist-times {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
  }
  .vlist-btn { width: 68px; }
  .vlist-btn-icon { width: 24px; height: 24px; }
  .vlist-btn-label { font-size: .62rem; }
}

/* ── Dark mode visitor list ── */
[data-bs-theme="dark"] .vlist-row {
  background: #0e1a2a;
  border-color: #1e2d42;
}
[data-bs-theme="dark"] .vlist-row:hover {
  border-color: #8cadb4;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
[data-bs-theme="dark"] .vlist-row-sueg {
  background: rgba(170,36,27,.1);
  border-left-color: var(--zuko-red);
}
[data-bs-theme="dark"] .vlist-name { color: #c8dae8; }
[data-bs-theme="dark"] .vlist-meta { color: #4a6070; }
[data-bs-theme="dark"] .vlist-sep::before { color: #2a3d55; }
[data-bs-theme="dark"] .vlist-time-label { color: #4a6070; }
[data-bs-theme="dark"] .vlist-btn-checkin {
  background: rgba(0,80,40,.25);
  color: #50c080;
}
[data-bs-theme="dark"] .vlist-btn-checkin:hover { background: rgba(0,80,40,.4); }
[data-bs-theme="dark"] .vlist-btn-checkout {
  background: rgba(30,45,66,.5);
  color: #8cadb4;
}
[data-bs-theme="dark"] .vlist-btn-checkout:hover { background: rgba(30,45,66,.8); }
[data-bs-theme="dark"] .vlist-btn-done { color: #2a3d55; }

/* ── Settings page (Chrome-style flat rows) ── */
.settings-section-title {
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--zuko-mid);
  margin: 2rem 0 .6rem;
  padding-left: .25rem;
}
.settings-section-title:first-child { margin-top: .5rem; }

.settings-panel {
  border: 1px solid var(--zuko-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fffef8;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--zuko-border);
  min-height: 56px;
}
.settings-row:last-child { border-bottom: none; }

.settings-row-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .12s;
}
.settings-row-link:hover {
  background: rgba(140,173,180,.08);
  color: inherit;
}

.settings-row-stacked {
  flex-direction: column;
  align-items: stretch;
  gap: .5rem;
}

.settings-label { flex: 1; min-width: 0; }
.settings-label-main {
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--zuko-dark);
}
.settings-label-desc {
  font-size: .78rem;
  color: #64748b;
  line-height: 1.35;
  margin-top: .15rem;
}

.settings-control { flex-shrink: 0; }
.settings-control-wide { width: 100%; }

.settings-select {
  min-width: 150px;
  border-radius: 8px;
  font-size: .85rem;
}

.settings-toggle {
  width: 2.8em !important;
  height: 1.5em;
  cursor: pointer;
}

.settings-chevron {
  font-size: 1.4rem;
  font-weight: 300;
  color: #94a3b8;
  line-height: 1;
}

.settings-save-row {
  margin: 1rem 0 1.5rem;
  text-align: right;
}

/* Dark mode settings */
[data-bs-theme="dark"] .settings-panel {
  background: #0e1a2a;
  border-color: #1e2d42;
}
[data-bs-theme="dark"] .settings-row {
  border-bottom-color: #1e2d42;
}
[data-bs-theme="dark"] .settings-row-link:hover {
  background: rgba(140,173,180,.06);
}
[data-bs-theme="dark"] .settings-label-main {
  color: #c8dae8;
}
[data-bs-theme="dark"] .settings-label-desc {
  color: #4a6070;
}
[data-bs-theme="dark"] .settings-section-title {
  color: #6080a0;
}
[data-bs-theme="dark"] .settings-chevron {
  color: #4a6070;
}
[data-bs-theme="dark"] .settings-select {
  background: #07101d;
  border-color: #2a3d55;
  color: #b0c4d8;
}

/* NFC result cards */
.nfc-result-granted {
  background: #dcfce7;
  border: 2px solid #16a34a;
  border-radius: 12px;
  color: #166534;
  padding: 1.5rem;
  text-align: center;
}
.nfc-result-denied {
  background: #f5d5d0;
  border: 2px solid #aa241b;
  border-radius: 12px;
  color: #aa241b;
  padding: 1.5rem;
  text-align: center;
}

/* ═══ Badge Cards (Baustellenausweis-Design) ═══ */
.badge-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.1), 0 0 0 1px rgba(0,0,0,.04);
  transition: box-shadow .2s, transform .15s;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
}
.badge-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  transform: translateY(-2px);
}
.badge-card-anwesend  { }
.badge-card-erwartet  { }
.badge-card-ausgecheckt { opacity: .5; filter: grayscale(.4); }
.badge-card-ausgecheckt:hover { opacity: .85; filter: none; }
.badge-card-sueg { box-shadow: 0 2px 10px rgba(0,0,0,.1), 0 0 0 2px var(--zuko-red); }

/* Header – Orange Leiste */
.badge-card-header {
  background: linear-gradient(135deg, var(--zuko-orange) 0%, #c45e2e 100%);
  color: #fff;
  padding: 3px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
}
.badge-card-header-title {
  font-size: .5rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.badge-card-header-brand {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: .5rem;
  font-weight: 700;
  opacity: .9;
}
.badge-card-logo {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

/* Body */
.badge-card-inner {
  display: flex;
  gap: 8px;
  padding: 6px 8px 4px;
  align-items: flex-start;
  flex: 1;
}

/* Photo – Passfoto (compact) */
.badge-card-photo {
  flex-shrink: 0;
  width: 48px;
  height: 62px;
}
.badge-card-photo img {
  width: 48px;
  height: 62px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid #d1d5db;
}
.badge-card-nophoto {
  width: 48px;
  height: 62px;
  border-radius: 2px;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .03em;
  border: 1px solid #d1d5db;
}

/* Data – compact labels */
.badge-card-data {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.badge-card-label {
  font-size: .42rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1;
  margin-top: 1px;
}
.badge-card-label:first-child { margin-top: 0; }
.badge-card-name {
  font-size: .78rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .02em;
}
.badge-card-firstname {
  font-size: .68rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-card-company {
  font-size: .58rem;
  color: #4b5563;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-card-idnr {
  font-size: .6rem;
  font-family: monospace;
  font-weight: 700;
  color: #111827;
  letter-spacing: .03em;
}

/* Zones + Nationality bar */
.badge-card-zones-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  flex-wrap: wrap;
  border-top: 1px solid #f3f4f6;
}
.badge-card-nat {
  font-size: .55rem;
  color: #6b7280;
  font-weight: 500;
}
.badge-card-zones-bar .zone-square {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.badge-card-zones-bar .vlist-zone-badge {
  font-size: .48rem;
  padding: .02rem .25rem;
  border-radius: 2px;
}

/* Access time */
.badge-card-access {
  font-size: .5rem;
  color: #9ca3af;
  padding: 0 8px 2px;
  font-style: italic;
}

/* Nonsense-Zeile */
.badge-card-nonsense {
  font-size: .4rem;
  color: #d1d5db;
  text-align: right;
  padding: 0 8px 1px;
  font-style: italic;
}

/* Status bar */
.badge-card-status {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.badge-card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-card-status-anwesend {
  background: #dcfce7;
  color: #166534;
}
.badge-card-status-anwesend .badge-card-status-dot {
  background: #16a34a;
  box-shadow: 0 0 4px rgba(22,163,74,.5);
}
.badge-card-status-erwartet {
  background: #fef3c7;
  color: #92400e;
}
.badge-card-status-erwartet .badge-card-status-dot { background: #f59e0b; }
.badge-card-status-ausgecheckt {
  background: #f1f5f9;
  color: #94a3b8;
}
.badge-card-status-ausgecheckt .badge-card-status-dot { background: #94a3b8; }

/* Dark mode */
[data-bs-theme="dark"] .badge-card { background: #111827; }
[data-bs-theme="dark"] .badge-card-header { background: linear-gradient(135deg, #b35520 0%, #8a3d15 100%); }
[data-bs-theme="dark"] .badge-card-name { color: #e5e7eb; }
[data-bs-theme="dark"] .badge-card-firstname { color: #d1d5db; }
[data-bs-theme="dark"] .badge-card-idnr { color: #e5e7eb; }
[data-bs-theme="dark"] .badge-card-nophoto { background: #1f2937; border-color: #374151; color: #6b7280; }
[data-bs-theme="dark"] .badge-card-photo img { border-color: #374151; }
[data-bs-theme="dark"] .badge-card-zones-bar { border-color: #1f2937; }
[data-bs-theme="dark"] .badge-card-nonsense { color: #374151; }
[data-bs-theme="dark"] .badge-card-status-anwesend { background: #052e16; color: #6ee7a8; }
[data-bs-theme="dark"] .badge-card-status-erwartet { background: #1c1106; color: #fbbf24; }
[data-bs-theme="dark"] .badge-card-status-ausgecheckt { background: #111827; color: #6b7280; }

/* Footer: status + actions */
.badge-card-footer {
  border-top: 1px solid rgba(0,0,0,.08);
  margin-top: auto;
  background: #f8f8f6;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.badge-card-actions {
  display: flex;
  gap: 4px;
  padding: 6px 8px 7px;
  align-items: center;
}
.badge-action-btn {
  border: none;
  border-radius: 5px;
  padding: .3rem .65rem;
  font-size: .68rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}
.badge-action-btn:active { transform: scale(.95); }
.badge-action-checkin {
  background: #16a34a;
  color: #fff;
}
.badge-action-checkin:hover { background: #15803d; box-shadow: 0 2px 8px rgba(22,163,74,.4); }
.badge-action-checkout {
  background: #64748b;
  color: #fff;
}
.badge-action-checkout:hover { background: #475569; }
.badge-action-confirm {
  background: #2563eb;
  color: #fff;
  font-size: .6rem;
  padding: .2rem .4rem;
}
.badge-action-confirm:hover { background: #1d4ed8; box-shadow: 0 2px 8px rgba(37,99,235,.4); }
.badge-action-confirmed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: .6rem;
  font-weight: 700;
}

[data-bs-theme="dark"] .badge-action-checkin { background: #16a34a; color: #fff; }
[data-bs-theme="dark"] .badge-action-checkout { background: #475569; color: #fff; }
[data-bs-theme="dark"] .badge-action-confirm { background: #2563eb; color: #fff; }
[data-bs-theme="dark"] .badge-action-confirmed { background: #0a2e1a; color: #6ee7a8; }
[data-bs-theme="dark"] .badge-card-footer { border-color: rgba(255,255,255,.06); background: #0a1018; }

@media (max-width: 576px) {
  .badge-card { aspect-ratio: auto; }
  .badge-card-photo { width: 44px; height: 56px; }
  .badge-card-photo img { width: 44px; height: 56px; }
  .badge-card-nophoto { width: 44px; height: 56px; font-size: .8rem; }
  .badge-card-name { font-size: .72rem; }
  .badge-card-inner { padding: 6px; gap: 6px; }
}
