/* ============================================
   PROBEGESPRÄCH WEB-APP - Premium Design System
   ============================================ */

:root {
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-card-hover: #1e2231;
  --bg-input: #12141c;
  --border: #2a2d3a;
  --border-focus: #6366f1;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --text-heading: #fafafa;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --nav-height: 60px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(99,102,241,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}

/* ========== SCREENS ========== */
.screen { display: none; }
.screen.active { display: block; }
.hidden { display: none !important; }

/* ========== LOGIN ========== */
.login-bg {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f1117 0%, #1a1040 50%, #0f1117 100%);
  position: relative; overflow: hidden;
}
.login-bg::before {
  content: ''; position: absolute; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  top: -100px; right: -100px; border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}
.login-bg::after {
  content: ''; position: absolute; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 70%);
  bottom: -80px; left: -80px; border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}
.login-card {
  background: rgba(26, 29, 39, 0.85); backdrop-filter: blur(20px);
  border: 1px solid rgba(99,102,241,0.2); border-radius: var(--radius-lg);
  padding: 48px 40px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative; z-index: 1; animation: slideUp 0.6s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-logo { text-align: center; margin-bottom: 36px; }
.logo-icon { font-size: 48px; margin-bottom: 12px; filter: drop-shadow(0 0 20px rgba(99,102,241,0.4)); }
.login-logo h1 {
  font-size: 1.8rem; font-weight: 800;
  background: linear-gradient(135deg, #fff, #c7d2fe);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.login-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }
.login-footer { text-align: center; margin-top: 28px; color: var(--text-muted); font-size: 0.75rem; }

/* ========== FORM ELEMENTS ========== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase;
  letter-spacing: 0.5px;
}
input, select, textarea {
  width: 100%; padding: 10px 12px; font-size: 0.9rem;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; transition: all 0.2s; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
input::placeholder, textarea::placeholder { color: #52525b; }
input[readonly] { background: rgba(99,102,241,0.08); color: var(--primary); cursor: default; }
select { cursor: pointer; }
textarea { resize: vertical; min-height: 80px; }

.error-msg {
  background: var(--danger-bg); color: var(--danger);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; margin-bottom: 14px;
  border: 1px solid rgba(239,68,68,0.2);
}
.feedback {
  padding: 12px; border-radius: var(--radius-sm);
  font-size: 0.85rem; margin-top: 12px; text-align: center;
  animation: slideUp 0.3s ease;
}
.feedback.success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.feedback.error { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.feedback.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); font-weight: 600; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; font-size: 0.9rem; font-weight: 600;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-family: inherit; transition: all 0.2s; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 16px var(--primary-glow); }
.btn-warning { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); }
.btn-warning:hover { background: rgba(245,158,11,0.25); }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.btn-full { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* ========== NAVIGATION ========== */
.topnav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: var(--nav-height);
  background: rgba(15, 17, 23, 0.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-logo { font-size: 1.6rem; }
.nav-title { font-weight: 800; font-size: 1.35rem; color: var(--text-heading); letter-spacing: -0.3px; }
.nav-center { display: flex; gap: 4px; }
.nav-tab {
  padding: 8px 16px; font-size: 0.85rem; font-weight: 500;
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; border-radius: var(--radius-sm); transition: all 0.2s;
  font-family: inherit;
}
.nav-tab:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-tab.active { color: var(--primary); background: rgba(99,102,241,0.1); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-user { font-size: 0.85rem; color: var(--text-muted); }

/* ========== LAYOUT ========== */
.container { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 20px 24px; }
.page-header { margin-bottom: 20px; }
.page-header h2 { font-size: 1.4rem; font-weight: 700; color: var(--text-heading); }
.page-desc { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); transition: border-color 0.2s;
}
.card:hover { border-color: rgba(99,102,241,0.15); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-header h3 { font-size: 1.1rem; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }

/* ========== STEP NAVIGATION ========== */
.step { animation: fadeSlide 0.3s ease; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.breadcrumb-label { font-size: 0.85rem; color: var(--text-muted); }

/* ========== STANDORT CARDS ========== */
.standort-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.standort-card {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 24px;
  text-align: center; cursor: pointer;
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.standort-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.standort-card:active { transform: translateY(-2px); }
.standort-emoji { font-size: 3rem; margin-bottom: 12px; }
.standort-name { font-size: 1.2rem; font-weight: 700; color: var(--text-heading); }
.standort-kuerzel {
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  margin-top: 4px; letter-spacing: 1px;
}

/* ========== MITARBEITER CARDS ========== */
.ma-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.ma-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  cursor: pointer; transition: all 0.2s;
}
.ma-card:hover {
  border-color: var(--primary); background: var(--bg-card-hover);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.ma-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.ma-info { overflow: hidden; }
.ma-name { font-weight: 600; font-size: 0.9rem; color: var(--text-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-role { font-size: 0.75rem; color: var(--text-muted); }

/* ========== BREADCRUMB ========== */
.breadcrumb-big {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.breadcrumb-big .btn { font-size: 0.9rem; padding: 6px 12px; }
.breadcrumb-sep { color: var(--text-muted); font-size: 1.1rem; font-weight: 300; }
.breadcrumb-active {
  font-size: 1.05rem; font-weight: 700; color: var(--primary);
  background: rgba(99,102,241,0.1); padding: 5px 14px;
  border-radius: var(--radius-sm);
}

/* ========== THEME SWITCHER ========== */
.theme-btn {
  background: none; border: 1px solid var(--border); border-radius: 50%;
  width: 28px; height: 28px; cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.theme-btn:hover { transform: scale(1.15); border-color: var(--primary); }
.theme-dropdown {
  position: absolute; top: 100%; right: 0; z-index: 999;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px; min-width: 180px;
  box-shadow: var(--shadow-lg); display: none;
}
.theme-dropdown.show { display: block; }
.theme-option {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 6px; cursor: pointer; transition: background 0.15s;
  border: none; background: none; color: var(--text); width: 100%; font-family: inherit; font-size: 0.85rem;
}
.theme-option:hover { background: var(--bg-card-hover); }
.theme-swatch {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2);
}

/* ========== THEMES ========== */
[data-theme="midnight"] { --bg: #0a0e1a; --bg-card: #111827; --bg-card-hover: #1f2937; --bg-input: #0d1117; --border: #1e3a5f; --border-focus: #3b82f6; --primary: #3b82f6; --primary-hover: #60a5fa; --primary-glow: rgba(59,130,246,0.25); }
[data-theme="forest"] { --bg: #0a1210; --bg-card: #132117; --bg-card-hover: #1a2e1f; --bg-input: #0d1610; --border: #1e3a2a; --border-focus: #22c55e; --primary: #22c55e; --primary-hover: #4ade80; --primary-glow: rgba(34,197,94,0.25); }
[data-theme="warm"] { --bg: #151010; --bg-card: #211a15; --bg-card-hover: #2d231a; --bg-input: #1a1210; --border: #3a2a1e; --border-focus: #f59e0b; --primary: #f59e0b; --primary-hover: #fbbf24; --primary-glow: rgba(245,158,11,0.25); }
[data-theme="rose"] { --bg: #140a10; --bg-card: #1f1218; --bg-card-hover: #2d1a22; --bg-input: #180d12; --border: #3a1e2a; --border-focus: #f43f5e; --primary: #f43f5e; --primary-hover: #fb7185; --primary-glow: rgba(244,63,94,0.25); }
[data-theme="ocean"] { --bg: #0a1015; --bg-card: #111a24; --bg-card-hover: #172533; --bg-input: #0d1319; --border: #1e3040; --border-focus: #06b6d4; --primary: #06b6d4; --primary-hover: #22d3ee; --primary-glow: rgba(6,182,212,0.25); }
[data-theme="purple"] { --bg: #0f0a18; --bg-card: #1a1128; --bg-card-hover: #231838; --bg-input: #120d1c; --border: #2e1e50; --border-focus: #a855f7; --primary: #a855f7; --primary-hover: #c084fc; --primary-glow: rgba(168,85,247,0.25); }

/* ========== SHEET HEADER ========== */
.sheet-header {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.08));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 14px 20px; margin-bottom: 0;
}
.sheet-title {
  font-size: 1.2rem; font-weight: 800;
  color: var(--text-heading);
}

/* ========== ENTRY FORM (Sheet-style) ========== */
.entry-card-wide {
  border-radius: 0; border-top: none;
  padding: 16px 20px; margin-bottom: 0;
  border-bottom: 2px solid var(--primary);
}
.form-grid-wide {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
}
.form-grid-wide .form-group {
  flex: 1; min-width: 100px; margin-bottom: 0;
}
.form-grid-wide .form-group select,
.form-grid-wide .form-group input,
.form-grid-wide .form-group textarea {
  padding: 9px 11px; font-size: 0.85rem;
}
/* Bemerkung volle Breite */
.form-grid-wide .form-group-wide {
  flex: 0 0 100%; min-width: 100%;
}
/* Signatur schmaler */
.form-grid-wide .form-group-sm {
  flex: 0 0 100px; min-width: 80px; max-width: 120px;
}
.form-actions-inline {
  display: flex; gap: 6px; min-width: auto !important; flex: 0 0 auto !important;
  align-items: flex-end;
}
.form-actions-inline .btn {
  padding: 9px 14px; font-size: 0.85rem;
}

/* ========== HISTORY TABLE ========== */
.history-card {
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: none; padding: 12px 20px 20px;
}
.history-card h3 { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }
.data-table-compact th { padding: 6px 8px; font-size: 0.7rem; }
.data-table-compact td { padding: 6px 8px; font-size: 0.8rem; }
/* Bemerkung & Signatur Spaltenbreiten */
.data-table-compact td:nth-child(9) { max-width: 200px; word-break: break-word; white-space: normal; }
.data-table-compact td:nth-child(10) { min-width: 60px; white-space: nowrap; }
.data-table-compact th:nth-child(9) { min-width: 100px; }
.data-table-compact th:nth-child(10) { min-width: 60px; }

/* ========== STATS GRID ========== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-2px); border-color: rgba(99,102,241,0.3); box-shadow: var(--shadow-glow); }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text-heading); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card.highlight { border-color: var(--primary); background: linear-gradient(135deg, rgba(99,102,241,0.08), transparent); }

/* ========== TABLES ========== */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th {
  text-align: left; padding: 10px 12px; font-weight: 600; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px 12px; border-bottom: 1px solid rgba(42,45,58,0.5);
  color: var(--text); vertical-align: top;
}
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.table-footer { margin-top: 12px; text-align: center; }
.table-count { font-size: 0.8rem; color: var(--text-muted); margin-right: 12px; }

/* Status badges */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-normal { background: var(--success-bg); color: var(--success); }
.badge-nicht-gemeldet { background: var(--warning-bg); color: var(--warning); }
.badge-nicht-geschafft { background: var(--danger-bg); color: var(--danger); }
.badge-aktiv { background: var(--success-bg); color: var(--success); }
.badge-inaktiv { background: var(--danger-bg); color: var(--danger); }

/* ========== BEWERTUNG BADGES ========== */
.bw {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.bw-leer { color: var(--text-muted); }
.bw-ja { background: rgba(34,197,94,0.15); color: #22c55e; }
.bw-nein { background: rgba(239,68,68,0.15); color: #ef4444; }
.bw-kue { background: rgba(59,130,246,0.15); color: #3b82f6; }
.bw-hinfaellig { background: rgba(245,158,11,0.15); color: #f59e0b; }
.bw-sehr-gut { background: rgba(34,197,94,0.2); color: #16a34a; }
.bw-gut { background: rgba(59,130,246,0.15); color: #3b82f6; }
.bw-ok { background: rgba(245,158,11,0.15); color: #eab308; }
.bw-schlecht { background: rgba(249,115,22,0.15); color: #f97316; }
.bw-sehr-schlecht { background: rgba(239,68,68,0.2); color: #dc2626; }

/* ========== TABS ========== */
.tabs-inline { display: flex; gap: 4px; margin-bottom: 20px; padding: 4px; background: var(--bg-input); border-radius: var(--radius-sm); }
.tab-btn {
  flex: 1; padding: 10px 16px; font-size: 0.85rem; font-weight: 500;
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; border-radius: 6px; transition: all 0.2s; font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--bg-card); color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.subtab { display: none; }
.subtab.active { display: block; }

/* ========== TAGS ========== */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2); border-radius: 20px;
  font-size: 0.85rem; color: var(--text);
}
.tag-remove { cursor: pointer; color: var(--danger); font-weight: bold; opacity: 0.6; transition: opacity 0.2s; }
.tag-remove:hover { opacity: 1; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { max-width: 240px; }

/* ========== CHART ========== */
.chart-container { height: 200px; display: flex; align-items: flex-end; gap: 8px; padding-top: 16px; }
.chart-bar-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar {
  width: 100%; min-height: 4px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--primary), #4f46e5);
  transition: height 0.6s ease;
}
.chart-label { font-size: 0.7rem; color: var(--text-muted); }
.chart-value { font-size: 0.75rem; color: var(--text); font-weight: 600; }

/* ========== TOP LIST ========== */
.top-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid rgba(42,45,58,0.5);
}
.top-item:last-child { border-bottom: none; }
.top-rank { font-size: 0.85rem; font-weight: 700; color: var(--primary); width: 28px; }
.top-name { flex: 1; font-size: 0.9rem; }
.top-count { font-weight: 700; font-size: 0.9rem; color: var(--text-heading); }

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 90%; max-width: 520px;
  max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 600; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.5rem; cursor: pointer; padding: 0; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }

/* ========== EMPTY STATE ========== */
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .form-grid-wide { flex-wrap: wrap; }
  .form-grid-wide .form-group { min-width: 140px; }
}
@media (max-width: 768px) {
  .topnav { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px; }
  .nav-center { order: 3; width: 100%; overflow-x: auto; }
  .nav-tab { font-size: 0.78rem; padding: 6px 10px; }
  .form-grid-wide { flex-direction: column; }
  .form-grid-wide .form-group { min-width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .login-card { margin: 16px; padding: 32px 24px; }
  .container, .container-wide { padding: 16px; }
  .tabs-inline { flex-wrap: wrap; }
  .inline-form { flex-direction: column; }
  .inline-form input { max-width: 100%; }
  .standort-grid { grid-template-columns: 1fr; }
  .ma-grid { grid-template-columns: 1fr; }
}

/* ========== MA-REITER UNTEN (wie Sheet-Tabs) ========== */
.ma-tabs-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 0 12px; height: 38px; display: flex; align-items: center;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
}
.ma-tabs-list {
  display: flex; gap: 2px; overflow-x: auto; white-space: nowrap;
  scrollbar-width: thin;
}
.ma-tab {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; font-size: 0.78rem; font-weight: 500;
  background: var(--bg-input); color: var(--text-muted);
  border: 1px solid var(--border); border-bottom: none;
  border-radius: 6px 6px 0 0; cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.ma-tab:hover { background: var(--bg-card-hover); color: var(--text); }
.ma-tab.active {
  background: var(--primary); color: #fff;
  border-color: var(--primary); font-weight: 600;
}

/* ========== ZEILEN-STATUS FARBEN ========== */
tr.row-nicht-gemeldet {
  background: rgba(220, 38, 38, 0.35) !important;
}
tr.row-nicht-gemeldet td {
  color: #fecaca !important;
  font-weight: 700;
}
tr.row-nicht-geschafft {
  background: rgba(180, 83, 9, 0.30) !important;
}
tr.row-nicht-geschafft td {
  color: #fed7aa !important;
  font-weight: 700;
}
.status-center {
  text-align: center;
  font-weight: 900 !important;
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
tr.row-nicht-gemeldet .status-center { color: #fff !important; text-shadow: 0 0 8px rgba(220,38,38,0.6); }
tr.row-nicht-geschafft .status-center { color: #fde68a !important; text-shadow: 0 0 8px rgba(180,83,9,0.5); }

/* Bemerkung Label hervorheben */
.form-group-wide label {
  color: var(--primary) !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
}

/* Checkbox-Labels (Rechte) */
.check-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--text);
  cursor: pointer; padding: 4px 0;
}
.check-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary);
}

/* ========== ☀️ WEISSES / HELLES THEME ========== */
[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f5;
  --bg-input: #f8f9fb;
  --border: #d1d5db;
  --border-focus: #6366f1;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-heading: #111827;
  --primary: #4f46e5;
  --primary-hover: #6366f1;
  --primary-glow: rgba(79, 70, 229, 0.15);
  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.08);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.08);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 20px rgba(79,70,229,0.08);
}
[data-theme="light"] .login-bg {
  background: linear-gradient(135deg, #e8e8f0 0%, #f5f5ff 50%, #e8e8f0 100%) !important;
}
[data-theme="light"] .topnav {
  background: rgba(255,255,255,0.95) !important;
  border-bottom: 1px solid #e5e7eb;
}
[data-theme="light"] .nav-title {
  color: #111827 !important;
}
[data-theme="light"] .nav-tab {
  color: #4b5563;
}
[data-theme="light"] .nav-tab:hover {
  color: #111827;
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .nav-tab.active {
  color: #4f46e5;
  background: rgba(79,70,229,0.08);
}
[data-theme="light"] .nav-user {
  color: #4b5563;
}
[data-theme="light"] .btn-ghost {
  color: #374151;
}
[data-theme="light"] .data-table thead th {
  background: #f0f0f5 !important;
  color: #374151 !important;
}
[data-theme="light"] .data-table tbody tr:hover {
  background: #f0f0f5 !important;
}
[data-theme="light"] tr.row-nicht-gemeldet {
  background: rgba(220, 38, 38, 0.12) !important;
}
[data-theme="light"] tr.row-nicht-gemeldet td {
  color: #991b1b !important;
}
[data-theme="light"] tr.row-nicht-geschafft {
  background: rgba(180, 83, 9, 0.10) !important;
}
[data-theme="light"] tr.row-nicht-geschafft td {
  color: #92400e !important;
}
[data-theme="light"] .ma-tabs-bar {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}
[data-theme="light"] .ma-tab {
  background: #f3f4f6;
  color: #4b5563;
  border-color: #d1d5db;
}
[data-theme="light"] .ma-tab:hover {
  background: #e5e7eb;
  color: #111827;
}
