:root {
  --blue: #1d4e89;
  --blue-dark: #123a66;
  --gray-bg: #f4f6f8;
  --gray-border: #dbe1e6;
  --text: #1f2933;
  --green: #1c7a3e;
  --red: #b3261e;
  --orange: #b76a00;
}

* { box-sizing: border-box; }

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

.topbar {
  background: var(--blue);
  color: white;
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 56px;
  flex-wrap: wrap;
}

.brand {
  color: white;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
  margin-right: 24px;
}

.nav { display: flex; gap: 16px; flex: 1; }
.nav a { color: #dce9f7; text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: white; }
.admin-link { font-weight: 700; color: #ffd166 !important; }

.user-area { display: flex; align-items: center; gap: 10px; color: #dce9f7; font-size: 0.9rem; }

.link-button {
  background: none;
  border: none;
  color: #dce9f7;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
}

.inline-form { display: inline; }

.container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px 60px;
}

h1 { font-size: 1.6rem; margin-bottom: 8px; }
h2 { font-size: 1.2rem; margin-top: 30px; }
p.subtitle { color: #5c6b73; margin-top: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card {
  background: white;
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.card:hover { border-color: var(--blue); }
.card h3 { margin: 0 0 6px; color: var(--blue-dark); }
.card p { margin: 0; font-size: 0.9rem; color: #5c6b73; }

.list-item {
  background: white;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.list-item .meta { font-size: 0.8rem; color: #5c6b73; margin-top: 4px; }

form.box, .box {
  background: white;
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  padding: 20px;
  margin-top: 16px;
  max-width: 480px;
}

label { display: block; font-weight: 600; margin-top: 12px; margin-bottom: 4px; font-size: 0.9rem; }

input[type=text], input[type=password], input[type=date], textarea, select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gray-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}

textarea { min-height: 90px; resize: vertical; }

.checkbox-row { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; }
.checkbox-row input { width: auto; margin-top: 3px; }
.checkbox-row label { margin: 0; font-weight: 400; font-size: 0.85rem; }

button, .btn {
  background: var(--blue);
  color: white;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 16px;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--blue-dark); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #8a1d17; }
.btn-secondary { background: #5c6b73; }

.flash {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.flash-success { background: #e3f6e8; color: var(--green); border: 1px solid #b7e4c2; }
.flash-error { background: #fbe9e7; color: var(--red); border: 1px solid #f3bcb6; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.badge-wartend { background: #fff3d6; color: var(--orange); }
.badge-aktiv, .badge-genehmigt { background: #e3f6e8; color: var(--green); }
.badge-abgelehnt, .badge-geloescht { background: #fbe9e7; color: var(--red); }
.badge-offen { background: #e6edf5; color: var(--blue-dark); }

table { width: 100%; border-collapse: collapse; margin-top: 10px; background: white; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--gray-border); font-size: 0.9rem; }
th { color: #5c6b73; font-weight: 600; }

.actions { display: flex; gap: 8px; margin-top: 8px; }
.actions form { margin: 0; }
.actions button { margin-top: 0; padding: 6px 12px; font-size: 0.82rem; }

.hint-box {
  background: #eef3fa;
  border: 1px solid #cddceb;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #33475b;
  margin-top: 14px;
}

.footer { text-align: center; padding: 20px; font-size: 0.8rem; color: #5c6b73; }
.footer a { color: #5c6b73; }

.tabs-note { font-size: 0.85rem; color: #5c6b73; }
