:root {
  --bg: #0b1020;
  --card: #121831;
  --muted: #94a3b8;
  --text: #e2e8f0;
  --primary: #0ea5e9;
  --primary-pressed: #0284c7;
  --danger: #ef4444;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px;
  background: linear-gradient(180deg, rgba(11,16,32,0.9), rgba(11,16,32,0.2));
  backdrop-filter: blur(8px);
}

.app-header h1 {
  margin: 0;
  font-size: 20px;
}

.container {
  padding: 16px;
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto 64px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.now-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.now-time { font-size: 40px; font-weight: 700; }
.now-date { color: var(--muted); margin-top: 4px; }

.status-row { margin-top: 12px; color: var(--muted); }

.primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 16px;
}

.primary:active { background: var(--primary-pressed); }

.primary.large {
  padding: 16px 24px;
  font-size: 18px;
}

.btn {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 12px;
}

.btn.ghost { border-color: rgba(255,255,255,0.18); }
.btn.danger { border-color: rgba(239,68,68,0.5); color: #fecaca; }

.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap { gap: 8px; }

.section-title { margin: 0; font-size: 16px; }

.list { list-style: none; padding: 0; margin: 8px 0 0; }
.list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.list li.surcharge {
  background: rgba(14, 165, 233, 0.1);
  border-radius: 8px;
  padding: 10px;
  margin: 4px 0;
  border: 1px solid rgba(14, 165, 233, 0.3);
}
.list li:last-child { border-bottom: none; }

.row-meta { color: var(--muted); font-size: 12px; }
.row-strong { font-weight: 600; }

.sum-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed rgba(255,255,255,0.12);
  padding-top: 10px;
  margin-top: 8px;
}

/* Highlighting for surcharge entries */
.list li.surcharge {
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid #ffc107;
  padding-left: 8px;
}

.list li.surcharge .row-strong {
  color: #ffc107;
}

.list li.surcharge .row-meta::after {
  content: " (Zuschlag)";
  color: #ffc107;
  font-weight: 600;
}

.month-picker { display: grid; gap: 6px; }
.month-picker span { color: var(--muted); font-size: 12px; }

dialog::backdrop { background: rgba(0,0,0,0.5); }
dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  background: var(--card);
  color: var(--text);
}
.dialog-body { display: grid; gap: 12px; padding: 16px; }
.dialog-body h3 { margin: 0 0 4px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

input[type="datetime-local"],
input[type="month"],
input[type="number"],
input[type="text"],
input[type="time"],
input[type="date"],
select {
  background: #0f1530;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 6px 0;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 420px) {
  .grid2 { grid-template-columns: 1fr; }
}

.list li.holiday {
  border-left: 3px solid rgba(34, 197, 94, 0.8);
  padding-left: 8px;
}

.list li.daytype-u {
  border-left: 3px solid rgba(168, 85, 247, 0.8);
  padding-left: 8px;
}

.list li.daytype-f {
  border-left: 3px solid rgba(34, 197, 94, 0.8);
  padding-left: 8px;
}

@media (min-width: 480px) {
  .now-time { font-size: 48px; }
}

