* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
  margin: 0;
  background: #ecf0f4;
  color: #1f2933;
  min-height: 100vh;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
.login-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #1e5aa0 0, #051726 65%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.login-screen.hidden { display: none; }
.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem 1.8rem;
  width: min(360px, 90vw);
  box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}
.login-card h1 { margin: 0; font-size: 1.25rem; color: #133b5c; }
.login-card .subtitle { margin: 0.15rem 0 1rem; color: #4b627b; font-size: 0.75rem; }
.login-card label { display: block; margin-bottom: 0.25rem; font-size: 0.75rem; }
.login-card input {
  width: 100%; padding: 0.4rem 0.5rem; margin-bottom: 0.6rem;
  border-radius: 6px; border: 1px solid #cfd5e1;
}
.login-card button {
  width: 100%; background: #1e5aa0; color: #fff; border: none;
  border-radius: 6px; padding: 0.4rem 0.5rem; font-size: 0.8rem; cursor: pointer;
}
.error-msg { color: #c9302c; font-size: 0.7rem; margin-top: 0.4rem; }
.app.hidden { display: none; }
.topbar {
  background: #1f3e5a; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.6rem 1.3rem; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.brand-title { font-weight: 600; font-size: 1rem; }
.main-nav { display: flex; gap: 0.35rem; }
.main-nav button {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff; border-radius: 999px; padding: 0.25rem 0.75rem;
  font-size: 0.75rem; cursor: pointer;
}
.main-nav button.active { background: #fff; color: #1f3e5a; }
.user-pill { background: rgba(255,255,255,0.06); padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.75rem; }
.shell { padding: 1.3rem; display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.panel {
  background: #fff; border-radius: 12px; padding: 1rem 1.25rem 1.25rem;
  box-shadow: 0 8px 22px rgba(15,23,42,0.02);
}
.panel-head h2 { margin: 0 0 0.25rem; }
.muted { color: #5d7285; font-size: 0.75rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.search-box input {
  padding: 0.3rem 0.4rem; border: 1px solid #ced6df; border-radius: 8px;
  font-size: 0.75rem; min-width: 180px;
}
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.card { background: #f9fafc; border: 1px solid #e0e5ee; border-radius: 10px; padding: 0.75rem 0.8rem; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.4rem; }
.item, .empty {
  background: #fff; border: 1px solid #e5e9f0; border-radius: 8px;
  padding: 0.55rem 0.65rem; display: flex; justify-content: space-between; align-items: center; gap: 0.6rem;
}
.item .info { display: flex; flex-direction: column; gap: 0.12rem; }
.item .info span { font-size: 0.7rem; color: #5d7285; }
.actions { display: flex; gap: 0.35rem; }
button {
  background: #c9302c; color: #fff; border: none; border-radius: 6px;
  padding: 0.35rem 0.6rem; font-size: 0.7rem; cursor: pointer; white-space: nowrap;
}
button.primary { background: #1e5aa0; }
button.ghost-btn { background: #fff; border: 1px solid #d0d7e2; color: #1f2933; }
button:hover { opacity: 0.9; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
label { display: block; font-size: 0.7rem; margin-bottom: 0.25rem; color: #1f2933; }
input, select, textarea {
  border: 1px solid #d0d7e2; border-radius: 6px; padding: 0.35rem 0.4rem;
  font-size: 0.75rem; width: 100%; margin-bottom: 0.5rem; background: #fff;
}
.inline { display: flex; align-items: center; gap: 0.25rem; margin-bottom: 0.5rem; }
.two-col { display: flex; gap: 0.5rem; }
.two-col > div { flex: 1; }
.month-head { font-weight: 600; margin-bottom: 0.5rem; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(80px, 1fr)); gap: 0.25rem; }
.day {
  background: #f9fafc; border: 1px solid #e0e5ee; border-radius: 6px;
  min-height: 65px; padding: 0.25rem; font-size: 0.7rem;
}
.day .date { font-weight: 600; display: block; margin-bottom: 0.25rem; }
.badge { border-radius: 4px; padding: 0.1rem 0.25rem; margin-bottom: 0.2rem; font-size: 0.6rem; color: #fff; }
.badge-mittel { background: #5376c4; }
.badge-dringend { background: #d9534f; }
.badge-niedrig { background: #5cb85c; }
.view { display: none; }
.view.active { display: block; }
.modal {
  position: fixed; inset: 0; background: rgba(8,15,26,0.42);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
.modal.hidden { display: none; }
.modal-content {
  background: #fff; border-radius: 12px; width: min(420px, 95vw);
  padding: 1rem 1.1rem 1.1rem; box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }
@media (min-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
}
