/* ============================================================
   GastronomiX — Modern Dark UI  v2.0
   Design: Deep slate base · Indigo/violet accent · Glass cards
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #0d0f14;
  --surface:     #13151c;
  --surface2:    #1a1d27;
  --surface3:    #22263a;
  --accent:      #7c6af7;        /* indigo-violet */
  --accent2:     #6254e8;
  --accent-glow: rgba(124,106,247,.18);
  --accent-line: rgba(124,106,247,.45);
  --text:        #e4e6f0;
  --text2:       #7a7f99;
  --text3:       #4e5268;
  --green:       #34d399;
  --green-bg:    rgba(52,211,153,.12);
  --red:         #f87171;
  --red-bg:      rgba(248,113,113,.12);
  --yellow:      #fbbf24;
  --yellow-bg:   rgba(251,191,36,.12);
  --blue:        #60a5fa;
  --blue-bg:     rgba(96,165,250,.12);
  --purple:      #c084fc;
  --purple-bg:   rgba(192,132,252,.12);
  --border:      rgba(255,255,255,.07);
  --border2:     rgba(255,255,255,.04);
  --sidebar-w:   256px;
  --radius:      10px;
  --radius-lg:   14px;
  --shadow:      0 4px 24px rgba(0,0,0,.45);
  --shadow-sm:   0 2px 10px rgba(0,0,0,.3);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { color-scheme:dark; scroll-behavior:smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ─────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Brand header */
.sidebar h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  padding: 4px 10px 0;
  margin-bottom: 2px;
}
.sidebar h2 img {
  width: 30px;
  height: 30px;
  border-radius: 8px !important;
  object-fit: cover;
  flex-shrink: 0;
}

/* Slogan under brand */
.sidebar > p.slogan {
  font-size: .72rem;
  color: var(--text3);
  padding: 0 10px;
  margin-bottom: 18px;
  line-height: 1.4;
}

/* Section label */
.sidebar .nav-section {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 14px 10px 4px;
}

/* Nav links */
.sidebar a {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text2);
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 450;
  transition: background .15s, color .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar a .nav-icon {
  font-size: 1rem;
  flex-shrink: 0;
  opacity: .75;
}
.sidebar a:hover {
  background: var(--surface2);
  color: var(--text);
}
.sidebar a:hover .nav-icon { opacity: 1; }
.sidebar a.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}
.sidebar a.active .nav-icon { opacity: 1; }

/* Logout */
.sidebar a.logout {
  color: var(--red);
  margin-top: 4px;
}
.sidebar a.logout:hover { background: var(--red-bg); color: var(--red); }
/* Abmelden als POST-Formular, sieht aus wie der Link */
.sidebar form.logout-form { margin: 0; }
.sidebar button.logout {
  display: flex; align-items: center; gap: 9px;
  width: 100%; box-sizing: border-box;
  padding: 9px 10px; margin-top: 4px;
  border: 0; border-radius: 8px; background: none;
  color: var(--red); font: inherit; font-size: .875rem; font-weight: 450;
  text-align: left; cursor: pointer;
  transition: background .15s, color .15s;
}
.sidebar button.logout .nav-icon { font-size: 1rem; flex-shrink: 0; opacity: .75; }
.sidebar button.logout:hover { background: var(--red-bg); color: var(--red); }

/* Divider */
.sidebar hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 10px 4px;
}

/* User chip */
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text2);
  padding: 8px 10px;
  background: var(--surface2);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 6px 0 2px;
}
.user-info .u-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid var(--accent-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  flex-shrink: 0;
}

/* Footer version string */
.sidebar .sidebar-footer {
  font-size: .67rem;
  color: var(--text3);
  text-align: center;
  padding: 10px 6px 0;
  line-height: 1.5;
}

/* ── Main content ────────────────────────────────────────────── */
.content {
  flex: 1;
  min-width: 0;
  padding: 40px clamp(20px, 4vw, 60px);
  overflow-x: auto;
}

/* Page title row */
.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.content h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--text);
  margin-bottom: 28px;
}
.content h2 {
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 28px 0 14px;
}

/* ── Stat cards (dashboard) ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .15s;
}
.stat-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .2s;
}
.stat-card:hover::before { opacity: 1; }
.stat-card h3 {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.05em;
  line-height: 1;
}
.stat-card .stat-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 1.5rem;
  opacity: .18;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-frueh, .badge-genehmigt  { background: var(--green-bg);  color: var(--green);  border: 1px solid rgba(52,211,153,.25); }
.badge-spaet                    { background: var(--blue-bg);   color: var(--blue);   border: 1px solid rgba(96,165,250,.25); }
.badge-nacht                    { background: var(--purple-bg); color: var(--purple); border: 1px solid rgba(192,132,252,.25); }
.badge-frei                     { background: rgba(255,255,255,.06); color: var(--text2); border: 1px solid var(--border); }
.badge-beantragt                { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(251,191,36,.25); }
.badge-abgelehnt                { background: var(--red-bg);    color: var(--red);    border: 1px solid rgba(248,113,113,.25); }

/* ── Data table ──────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: .875rem;
}
.data-table th {
  background: var(--surface2);
  font-weight: 600;
  color: var(--text2);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border2);
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: var(--surface2); }
.low-stock { background: rgba(248,113,113,.07); }

/* Status text colours */
.status-beantragt, .status-offen  { color: var(--yellow); }
.status-genehmigt, .status-geliefert { color: var(--green); }
.status-abgelehnt, .status-storniert { color: var(--red); }
.status-bestellt                  { color: var(--blue); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: 0;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent2); box-shadow: 0 0 20px var(--accent-glow); }
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface3); }
.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(248,113,113,.2);
}
.btn-danger:hover { background: rgba(248,113,113,.2); }
.btn-sm { padding: 5px 12px; font-size: .8rem; border-radius: 6px; }

/* legacy compat */
.btn-ok  { @extend .btn; background: var(--green); color: #fff; border: 0; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: .85rem; }
.btn-del { background: none; border: 0; cursor: pointer; font-size: 1.1rem; color: var(--red); opacity: .7; transition: opacity .15s; }
.btn-del:hover { opacity: 1; }

/* ── Forms ───────────────────────────────────────────────────── */
input, select, textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
select option { background: var(--surface2); }
label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Add / filter card */
.add-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 22px;
  overflow: hidden;
}
.add-form summary {
  cursor: pointer;
  padding: 14px 20px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  list-style: none;
  transition: background .15s;
}
.add-form summary:hover { background: var(--surface2); }
.add-form summary::marker, .add-form summary::-webkit-details-marker { display: none; }
.add-form summary::before {
  content: '+';
  width: 20px;
  height: 20px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-line);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}
details[open] .add-form summary::before { content: '−'; }
.add-form-body {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 0;
}
.grid-form input, .grid-form select {
  padding: 10px 12px;
}
.grid-form button, .grid-form .btn {
  align-self: end;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: .875rem;
  transition: background .15s;
  min-height: 42px;
}
.grid-form button:hover { background: var(--accent2); }

/* Filter strip */
.filter-section { margin-bottom: 22px; }
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: flex-end;
}
.filter-form > * { flex: 1 1 160px; min-width: 0; }
.filter-form button, .filter-form .btn {
  flex: 0 0 auto;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-size: .875rem;
  min-height: 42px;
}
.filter-form button:hover { background: var(--accent2); }

/* week form (shifts) */
.week-form { display: flex; flex-direction: column; gap: 16px; }
.week-table input, .week-table select { width: 100%; }
.checkbox-line { display: flex; align-items: center; gap: 8px; color: var(--text2); }

/* Staff selector */
.staff-selector {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 22px;
}

/* ── Stats box ───────────────────────────────────────────────── */
.stats-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 22px;
}
.stats-box h3 {
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text2);
  margin-bottom: 12px;
}
.stats-box ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.stats-box li {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .85rem;
  color: var(--text2);
}
.stats-box strong { color: var(--text); }

/* ── Login page ──────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-box {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px 36px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-box .login-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  object-fit: cover;
  margin: 0 auto 18px;
  display: block;
  border: 2px solid var(--border);
}
.login-box h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 4px;
}
.login-box .subtitle {
  color: var(--text2);
  font-size: .875rem;
  margin-bottom: 28px;
}
.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.login-box input {
  padding: 12px 14px;
  font-size: .95rem;
}
.login-box button {
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: background .15s, box-shadow .15s;
  margin-top: 4px;
}
.login-box button:hover {
  background: var(--accent2);
  box-shadow: 0 0 24px var(--accent-glow);
}
.error {
  background: var(--red-bg);
  border: 1px solid rgba(248,113,113,.25);
  border-radius: 8px;
  color: var(--red);
  padding: 10px 14px;
  font-size: .875rem;
  text-align: center;
  margin-bottom: 14px;
}
.hint {
  color: var(--text3);
  font-size: .78rem;
  margin-top: 16px;
}
.btn-staff {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 11px 24px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: border-color .15s, color .15s, background .15s;
  width: 100%;
}
.btn-staff:hover {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-glow);
}
.login-box .footer {
  color: var(--text3);
  font-size: .72rem;
  margin-top: 20px;
}

/* ── Notifications / flash ───────────────────────────────────── */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .875rem;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.flash-success { background: var(--green-bg); color: var(--green); border-color: rgba(52,211,153,.25); }
.flash-error   { background: var(--red-bg);   color: var(--red);   border-color: rgba(248,113,113,.25); }
.flash-info    { background: var(--blue-bg);  color: var(--blue);  border-color: rgba(96,165,250,.25); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .layout { flex-direction: column !important; }

  .mobile-header { display: flex !important; }
  .sidebar-backdrop.active { display: block !important; }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    height: 100vh !important;
    z-index: 101 !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
    display: flex !important;
    flex-direction: column !important;
    background: var(--surface) !important;
    border-right: 1px solid var(--border) !important;
    padding: 24px 12px 20px !important;
    overflow-y: auto !important;
    white-space: normal !important;
  }
  .sidebar.open {
    transform: translateX(0) !important;
  }
  .sidebar h2 {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    padding: 4px 10px 0 !important;
    margin-bottom: 2px !important;
  }
  .sidebar h2 img {
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
  }
  .sidebar > p.slogan,
  .sidebar hr,
  .sidebar .user-info,
  .sidebar .sidebar-footer,
  .sidebar .nav-section {
    display: block !important;
    width: 100% !important;
  }
  .sidebar .user-info {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .sidebar a {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    color: var(--text2) !important;
    text-decoration: none !important;
    padding: 9px 10px !important;
    border-radius: 8px !important;
    font-size: .875rem !important;
    font-weight: 450 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    flex-shrink: 0 !important;
    border-left: 0 !important;
  }
  .sidebar a:hover {
    background: var(--surface2) !important;
    color: var(--text) !important;
  }
  .sidebar a.active {
    background: var(--accent-glow) !important;
    color: var(--accent) !important;
    font-weight: 600 !important;
    border-left: 2px solid var(--accent) !important;
    padding-left: 8px !important;
    box-shadow: none !important;
  }
  .sidebar a.logout {
    color: var(--red) !important;
    margin-top: 4px !important;
  }
  .sidebar a.logout:hover {
    background: var(--red-bg) !important;
    color: var(--red) !important;
  }

  .content { padding: 20px 16px !important; }
  .content h1 { font-size: 1.3rem !important; margin-bottom: 18px !important; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .stat-card { padding: 16px !important; }
  .stat-num { font-size: 1.75rem !important; }
  .grid-form { grid-template-columns: 1fr !important; }
  .data-table { display: block !important; overflow-x: auto !important; white-space: nowrap !important; }
  .data-table th, .data-table td { padding: 10px 12px !important; font-size: .82rem !important; }
  .login-box { padding: 32px 24px 28px !important; }
  .login-wrap { align-items: flex-start !important; padding-top: 40px !important; }
}

@media (max-width: 420px) {
  .sidebar a { padding: 7px 8px; font-size: .76rem; }
  .stats-grid { grid-template-columns: 1fr; }
}


/* --- Off-Canvas Mobile Hamburger Menu --- */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--surface, #1e1e2e);
  color: var(--text, #cdd6f4);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #313244);
  position: sticky;
  top: 0;
  z-index: 100;
}
.mobile-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
}
.mobile-header .brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}
.hamburger-btn {
  background: none;
  border: 1px solid var(--border, #313244);
  color: var(--text, #cdd6f4);
  font-size: 1.4rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}



/* ── Prüfseite vor dem Senden (Paket E) ── */
  .check-wrap { max-width: 900px; }
  .check-box { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; border: 1px solid var(--border); background: var(--surface); }
  .check-box h3 { margin-bottom: 8px; font-size: 1rem; }
  .check-box ul { margin: 0; padding-left: 18px; line-height: 1.6; font-size: .9rem; }
  .check-red { border-color: var(--red); background: var(--red-bg); }
  .check-red h3 { color: var(--red); }
  .check-yellow { border-color: var(--yellow); background: var(--yellow-bg); }
  .check-yellow h3 { color: var(--yellow); }
  .check-green { border-color: var(--green); background: var(--green-bg); }
  .check-green h3 { color: var(--green); }
  .check-form textarea { width: 100%; min-height: 80px; margin: 8px 0 12px; }
  .check-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
  .flag-text { font-size: .8rem; color: var(--text2); }
.check-box .flag-text { margin-top: 8px; }

/* ══ Paket G: Hilfsklassen ════════════════════════════════════════
   Ersetzen frühere Inline-Styles. !important, weil sie wie Inline-Styles
   über allgemeinen Regeln (z. B. .content h2, .data-table td) stehen sollen. */
.muted { color: var(--text2) !important; }
.faint { color: var(--text3) !important; }
.c-text { color: var(--text) !important; }
.c-accent { color: var(--accent) !important; }
.c-green { color: var(--green) !important; }
.c-red { color: var(--red) !important; }
.c-yellow { color: var(--yellow) !important; }
.c-blue { color: var(--blue) !important; }
.fs-xs { font-size: .75rem !important; }
.fs-sm { font-size: .82rem !important; }
.fs-md { font-size: .9rem !important; }
.small { font-size: .85rem; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.italic { font-style: italic !important; }
.nowrap { white-space: nowrap !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.lh-15 { line-height: 1.5 !important; }
.v-middle { vertical-align: middle !important; }
.no-underline { text-decoration: none !important; }
.pointer { cursor: pointer !important; }
.block { display: block !important; }
.inline { display: inline !important; }
.inline-block { display: inline-block !important; }
.flex { display: flex !important; }
.grid { display: grid !important; }
.col { flex-direction: column !important; }
.wrap { flex-wrap: wrap !important; }
.flex-1 { flex: 1 !important; }
.shrink-0 { flex-shrink: 0 !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }
.items-start { align-items: flex-start !important; }
.items-baseline { align-items: baseline !important; }
.justify-between { justify-content: space-between !important; }
.justify-end { justify-content: flex-end !important; }
.justify-center { justify-content: center !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.min-h-42 { min-height: 42px !important; }
.scroll-x { overflow-x: auto !important; }
.m-0 { margin: 0 !important; }
.p-0 { padding: 0 !important; }
.gap-0 { gap: 0 !important; } .gap-1 { gap: 6px !important; } .gap-2 { gap: 10px !important; }
.gap-3 { gap: 14px !important; } .gap-4 { gap: 20px !important; } .gap-5 { gap: 30px !important; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 5px !important; } .mt-2 { margin-top: 10px !important; }
.mt-3 { margin-top: 15px !important; } .mt-4 { margin-top: 22px !important; } .mt-5 { margin-top: 30px !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 5px !important; } .mb-2 { margin-bottom: 10px !important; }
.mb-3 { margin-bottom: 15px !important; } .mb-4 { margin-bottom: 22px !important; } .mb-5 { margin-bottom: 30px !important; }
.ml-0 { margin-left: 0 !important; } .ml-1 { margin-left: 5px !important; } .ml-2 { margin-left: 10px !important; }
.ml-3 { margin-left: 15px !important; }
.mr-0 { margin-right: 0 !important; } .mr-1 { margin-right: 5px !important; } .mr-2 { margin-right: 10px !important; }
.mr-3 { margin-right: 15px !important; }

/* ══ Paket G: Bausteine ══════════════════════════════════════════ */
.content-plain { max-width: 720px; margin: 0 auto; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.empty-row { text-align: center; color: var(--text2); padding: 24px !important; }
.checkbox-label { display: flex; gap: 8px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--text); }
.checkbox-label input { width: auto; margin-top: 3px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.card-title { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); margin-bottom: 12px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.page-header h1 { margin-bottom: 0; }
.btn-success { background: var(--green); color: #06281c; }
.btn-success:hover { background: #29c987; box-shadow: 0 0 20px rgba(52,211,153,.3); }
.btn-danger-solid { background: var(--red); color: #fff; }
.btn-danger-solid:hover { background: #f05050; }
.btn-link { background: none; border: 0; color: var(--accent); font-weight: 600; text-decoration: none; cursor: pointer; padding: 0; font-size: .85rem; width: auto; }
.btn-link:hover { text-decoration: underline; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input[type=text] { flex: 1; min-width: 200px; width: auto; }

/* Statusmarken */
.status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.status-ok { background: var(--green-bg); color: var(--green); border-color: rgba(52,211,153,.25); }
.status-warn { background: var(--yellow-bg); color: var(--yellow); border-color: rgba(251,191,36,.25); }
.status-bad { background: var(--red-bg); color: var(--red); border-color: rgba(248,113,113,.25); }
.status-info { background: var(--accent-glow); color: var(--accent); border-color: var(--accent-line); }
.status-neutral { background: rgba(255,255,255,.05); color: var(--text2); border-color: var(--border); }

/* Hinweis-Kästen */
.notice { border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; border: 1px solid var(--border); background: var(--surface); }
.notice p + p { margin-top: 6px; }
.notice-title { font-size: 1.05rem !important; margin: 0 0 8px !important; }
.notice-error { border-color: rgba(248,113,113,.4); background: var(--red-bg); }
.notice-error .notice-title { color: var(--red) !important; }
.notice-warn { border-color: rgba(251,191,36,.4); background: var(--yellow-bg); }
.notice-ok { border-color: rgba(52,211,153,.4); background: var(--green-bg); }

/* Meldungsband (flash) */
.flash-stack { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.flash-stack .flash { margin-bottom: 0; }
.flash { transition: opacity .35s, transform .35s; animation: flash-in .25s ease-out; }
.flash-warn { background: var(--yellow-bg); color: var(--yellow); border-color: rgba(251,191,36,.25); }
.flash-icon { font-weight: 700; }
.flash-close { margin-left: auto; background: none; border: 0; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; opacity: .7; padding: 0 4px; width: auto; }
.flash-close:hover { opacity: 1; }
.flash-hide { opacity: 0; transform: translateY(-4px); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* dezente Übergänge */
.card, .month-card, .stat-card, .notice { transition: border-color .2s, background .2s, transform .15s; }
a.stat-card { color: inherit; text-decoration: none; display: block; }
a.stat-card:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Zeitfelder einheitlich */
input[type=time], input[type=date], input[type=month] { min-height: 42px; font-variant-numeric: tabular-nums; }
input[type=time]::-webkit-calendar-picker-indicator,
input[type=date]::-webkit-calendar-picker-indicator,
input[type=month]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }

/* Tabellen werden auf Handy und Tablet-Hochformat zu Karten (data-label setzt app.js) */
@media (max-width: 900px) {
  table.cards-on-mobile { display: block !important; overflow: visible !important; white-space: normal !important; border: 0; background: none; }
  table.cards-on-mobile thead { display: none; }
  table.cards-on-mobile tbody, table.cards-on-mobile tfoot { display: block; }
  table.cards-on-mobile tr { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
  table.cards-on-mobile tbody tr:hover { background: var(--surface); }
  table.cards-on-mobile td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0 !important; border: 0 !important; text-align: right; white-space: normal !important; }
  table.cards-on-mobile td + td { border-top: 1px solid var(--border2) !important; }
  table.cards-on-mobile td::before { content: attr(data-label); color: var(--text2); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; text-align: left; flex-shrink: 0; padding-top: 2px; }
  table.cards-on-mobile td:not([data-label])::before, table.cards-on-mobile td[data-label=""]::before { content: none; }
  table.cards-on-mobile td:not([data-label]), table.cards-on-mobile td[colspan] { justify-content: center; text-align: center; }
  table.cards-on-mobile td[colspan]::before { content: none; }
  .page-header, .toolbar { align-items: stretch; }
}

.span-all { grid-column: 1 / -1; }

.normal-case { text-transform: none !important; letter-spacing: 0 !important; }
.pre-text { white-space: pre-wrap; font-family: inherit; }
.log-box { background: var(--bg); padding: 12px; border-radius: 6px; border-left: 4px solid var(--accent); }

/* ══ Paket G: Startseiten ════════════════════════════════════════ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.dash-grid, .home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 4px; }
.dash-grid .card, .home-grid .card { margin-bottom: 16px; }
.people-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.people-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border2); }
.people-list li:last-child { border-bottom: 0; }
.people-list a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; }
.people-list a:not(.btn):hover { color: var(--accent); }
.people-list .btn { margin-left: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .92rem; }
.kv dt { color: var(--text2); }
.kv dd { text-align: right; font-variant-numeric: tabular-nums; }
.home-big { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.home-status.home-dienst { border-color: rgba(52,211,153,.4); }
.home-status.home-pause { border-color: rgba(251,191,36,.4); }
.home-status.home-stale { border-color: rgba(248,113,113,.5); }
.stat-card-warn { border-color: rgba(251,191,36,.45); }
.stat-card-bad { border-color: rgba(248,113,113,.55); background: linear-gradient(0deg, var(--red-bg), var(--surface)); }
.card-title.m-0 { margin: 0; }
.toolbar select { width: auto; min-width: 160px; }
@media (max-width: 700px) {
  .dash-grid, .home-grid { grid-template-columns: 1fr; }
  .toolbar { width: 100%; }
  .toolbar select { flex: 1; min-width: 0; }
  .people-list .btn { margin-left: 0; }
}

/* Tablet quer (901–1200 px): Tabellen volle Breite statt Block mit Seitenscroll */
@media (min-width: 901px) and (max-width: 1200px) {
  .data-table { display: table !important; width: 100%; white-space: normal !important; overflow: visible !important; }
}
/* Paket S: Angemeldet bleiben, Aufkleber-Seite */
.login-box .remember-line { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text2); cursor: pointer; }
.login-box .remember-line input { width: auto; padding: 0; margin: 0; }
.stk-wrap { max-width: 520px; margin: 24px auto; text-align: center; }
.stk-result { border-radius: 16px; padding: 32px 20px; color: #fff; margin-bottom: 16px; }
.stk-result .stk-icon { font-size: 3.2rem; line-height: 1; }
.stk-result .stk-title { font-size: 1.9rem; font-weight: 700; margin: 10px 0 4px; }
.stk-result .stk-time { font-size: 2.6rem; font-weight: 700; letter-spacing: 1px; }
.stk-result .stk-sub { opacity: .9; margin-top: 6px; }
.stk-punch_in { background: #1f9d55; }
.stk-pause_start { background: #d97706; }
.stk-pause_end { background: #2563eb; }
.stk-punch_out { background: #dc2626; }
.stk-info { background: #475569; }
.stk-error { background: #991b1b; }
.stk-wrap .btn { min-height: 48px; }
.stk-undo { margin-top: 8px; }
.qr-box { background: #fff; display: inline-block; padding: 8px; border-radius: 8px; }
.qr-box svg { display: block; width: 180px; height: 180px; }
