:root {
  --primary: #1d5b8f;
  --primary-dark: #144267;
  --primary-light: #e8f1fa;
  --accent: #2c8c5e;
  --danger: #b3312c;
  --warn: #a9720b;
  --bg: #f4f6f8;
  --card-bg: #ffffff;
  --text: #223;
  --text-muted: #667;
  --border: #dde3ea;
  --radius: 10px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.top-bar {
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar a { color: #fff; opacity: .9; }
.top-bar .brand { font-weight: 600; font-size: 1.05rem; }
.top-bar nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.top-bar .rolle-badge {
  background: rgba(255,255,255,.15);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .8rem;
}

.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.container.schmal { max-width: 620px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(20,30,50,.04);
}

.card h2, .card h3 { margin-top: 0; }

h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.kachel {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-align: center;
}
.kachel .zahl { font-size: 1.8rem; font-weight: 700; color: var(--primary-dark); }
.kachel .label { color: var(--text-muted); font-size: .85rem; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: var(--primary-light); font-weight: 600; }
tr.zeile-urlaub { background: #fdf6e0; }
tr.zeile-wochenende { background: #f6f7f8; color: var(--text-muted); }
.table-wrap { overflow-x: auto; }

form.inline { display: inline; }

label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: .9rem; }
label.inline-label { display: inline; font-weight: 500; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=time], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .95rem;
  font-family: inherit;
  background: #fff;
}
textarea { resize: vertical; min-height: 90px; }
.feld-hinweis { color: var(--text-muted); font-size: .8rem; margin-top: 3px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); margin: 16px 0; padding: 14px 18px; }
legend { font-weight: 600; padding: 0 6px; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: .95rem;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn.sekundaer { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.sekundaer:hover { background: var(--primary-light); }
.btn.gefahr { background: var(--danger); }
.btn.gefahr:hover { background: #8f2622; }
.btn.klein { padding: 5px 11px; font-size: .82rem; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge.offen { background: #fdeecb; color: var(--warn); }
.badge.genehmigt { background: #dcf0e3; color: var(--accent); }
.badge.abgelehnt { background: #f7dedd; color: var(--danger); }
.badge.aktiv { background: #dcf0e3; color: var(--accent); }
.badge.inaktiv { background: #eee; color: var(--text-muted); }

.flash-liste { list-style: none; padding: 0; margin: 0 0 16px; }
.flash { padding: 11px 16px; border-radius: 8px; margin-bottom: 8px; font-size: .92rem; }
.flash.erfolg { background: #dcf0e3; color: #1e5e37; }
.flash.fehler { background: #f7dedd; color: #7a2320; }
.flash.warnung { background: #fdeecb; color: #7a5407; }

.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.saldo-plus { color: var(--accent); font-weight: 700; }
.saldo-minus { color: var(--danger); font-weight: 700; }

/* Landingpage */
.hero {
  position: relative;
  color: #fff;
  padding: 70px 24px 90px;
  text-align: center;
  background: linear-gradient(180deg, rgba(10,25,45,.55), rgba(10,25,45,.75)), var(--primary-dark) center/cover no-repeat;
}
.hero .firmenname { font-size: 1.9rem; font-weight: 700; margin-bottom: 6px; }
.hero .uhrzeit { font-size: 2.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero .datum { font-size: 1.05rem; opacity: .9; }
.banner-bild { width: 100%; max-height: 220px; object-fit: cover; display: block; }

.stempel-box {
  max-width: 420px;
  margin: -55px auto 0;
  position: relative;
  z-index: 2;
}

footer.site-footer {
  text-align: center;
  padding: 26px 16px 40px;
  color: var(--text-muted);
  font-size: .85rem;
}
footer.site-footer a { color: var(--text-muted); text-decoration: underline; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,25,40,.55);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal-box { background: #fff; border-radius: var(--radius); padding: 26px 28px; max-width: 480px; width: 100%; }
.modal-box h3 { margin-top: 0; }

.uhr-gross { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .top-bar { flex-direction: column; align-items: flex-start; }
  .hero { padding: 46px 16px 70px; }
  .hero .uhrzeit { font-size: 2rem; }
}
