:root {
  --bg: #0b0f14;
  --card: #121821;
  --text: #e6edf3;
  --muted: #98a2ad;
  --accent: #4aa3ff;
  --success: #22c55e;
  --danger: #ef4444;
  --border: #223042;
}

* { box-sizing: border-box; }
body {
  margin: 0; padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; letter-spacing: 0.3px; }
.nav-right { display: flex; gap: 12px; align-items: center; }

.container { max-width: 1050px; margin: 24px auto; padding: 0 16px; }

.flash-container { display: grid; gap: 8px; margin-bottom: 16px; }
.flash { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); }
.flash.success { background: #0f1a12; border-color: #214a2b; }
.flash.info { background: #0f172a; border-color: #334155; }
.flash.warning { background: #1f1320; border-color: #6b1c1e; }
.flash.danger { background: #1d1212; border-color: #7f1d1d; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

h2 { margin: 0 0 10px 0; font-size: 1.25rem; }

label { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 8px; }
input, select {
  width: 100%; padding: 10px 12px; margin-top: 6px; border-radius: 10px;
  border: 1px solid var(--border); background: #0d131b; color: var(--text);
}
input[type="month"], input[type="date"] { width: auto; }

.btn {
  display: inline-block; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: #0d1726; color: var(--text); text-decoration: none; cursor: pointer; margin-top: 10px;
}
.btn:hover { background: #11223a; }
.btn.success { background: #0e2015; border-color: #1e3a2f; }
.btn.success:hover { background: #13301e; }
.btn.danger { background: #2a1010; border-color: #7f1d1d; }
.btn.danger:hover { background: #3a1515; }

.inline-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }

/* ===== Tabellen (Allgemein) ===== */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: separate;   /* für sticky thead */
  border-spacing: 0;
}
th, td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
thead th {
  background: #0f1a2a;
  position: sticky;
  top: 0;                     /* klebt am oberen Rand der Card */
  z-index: 2;
}
thead th::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px; background: var(--border);
}
tfoot th { text-align: right; }

/* ===== Kompakte Tabelle (z. B. 'Tage' in Rufbereitschaft) ===== */
/* Gib der Tabelle zusätzlich class="table-tight" */
table.table-tight { width: auto; }                            /* füllt NICHT die ganze Card */
table.table-tight th, table.table-tight td { padding: 6px 10px; }
table.table-tight th:nth-child(2),
table.table-tight td:nth-child(2) { text-align: right; }      /* Betrag rechtsbündig */
table.table-tight th:nth-child(3),
table.table-tight td:nth-child(3) { width: 1%; }              /* Aktion so schmal wie möglich */

/* Optional: breite Tabellen nur dort erzwingen, wo nötig.
   Um weite Tabelle zu aktivieren: <div class="table-wrap wide-table">… */
.table-wrap.wide-table table { width: max(100%, 1200px); }
.table-wrap.wide-table th, .table-wrap.wide-table td { white-space: nowrap; }

/* ===== Export-Bar, Hinweise ===== */
.export-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.overtime { margin-top: 10px; color: var(--muted); }
.hint { margin-top: 6px; color: var(--muted); font-size: 0.9rem; }

/* ===== Login-Logo über dem Formular ===== */
.auth-header { display: flex; justify-content: center; margin-bottom: 12px; }
.auth-logo { display: block; max-width: 180px; height: auto; }

/* ===== Status-Farben Monatsübersicht ===== */
tr.status-vacation { background: rgba(255, 176, 73, 0.14); }   /* hellorange */
tr.status-sick     { background: rgba(239, 68, 68, 0.14); }    /* rot */
tr.status-holiday  { background: rgba(59, 130, 246, 0.16); }   /* blau */
tr.status-comp     { background: rgba(216, 180, 254, 0.16); }  /* hell-lila */
/* --- Stets vertikal stapeln: Karten untereinander --- */
.grid { 
  display: grid;
  grid-template-columns: 1fr !important;  /* nur eine Spalte */
  gap: 16px;
}
tr.weekend { background: rgba(255,255,255,0.04); }
