/* =========================
   Reset & Basis
========================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f4f6f8;
  color: #1f2933;
  line-height: 1.5;
}

/* =========================
   Layout
========================= */
header {
  background: #ffffff;
  border-bottom: 1px solid #e0e6ed;
  padding: 14px 24px;
}

header strong {
  font-size: 1.2rem;
  color: #0b5ed7;
}

header nav a {
  margin-left: 12px;
  text-decoration: none;
  color: #374151;
  font-weight: 500;
}

header nav a:hover {
  color: #0b5ed7;
}

main {
  max-width: 1100px;
  margin: 32px auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

footer {
  margin-top: 40px;
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}

/* =========================
   Überschriften & Text
========================= */
h1 {
  margin-top: 0;
  font-size: 1.8rem;
  color: #111827;
}

h2 {
  font-size: 1.3rem;
  margin-top: 24px;
}

p {
  margin: 0.5em 0 1em;
}

/* =========================
   Formulare
========================= */
form {
  margin-top: 16px;
}

label {
  font-weight: 500;
  display: block;
}

input,
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0b5ed7;
  box-shadow: 0 0 0 2px rgba(11,94,215,0.15);
}

/* =========================
   Buttons
========================= */
button {
  background: #0b5ed7;
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #094db3;
}

button.secondary {
  background: #6b7280;
}

button.secondary:hover {
  background: #4b5563;
}

/* =========================
   Tabellen
========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

th {
  background: #f9fafb;
  font-weight: 600;
}

/* =========================
   Flash Messages
========================= */
.flash {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.flash.ok {
  background: #e6f4ea;
  color: #14532d;
  border: 1px solid #bbf7d0;
}

.flash.error {
  background: #fdecea;
  color: #7f1d1d;
  border: 1px solid #fecaca;
}

/* =========================
   Kleine Helfer
========================= */
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.75rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
}

.card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

/* Modal (native dialog) */
dialog.modal {
  border: none;
  border-radius: 14px;
  padding: 0;
  width: min(680px, calc(100% - 24px));
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
dialog.modal::backdrop {
  background: rgba(17,24,39,.45);
}
.modal-head {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 16px;
}
.modal-actions {
  padding: 14px 16px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn.small { padding: 8px 12px; border-radius: 10px; font-weight: 700; }
.btn.danger { background: #dc2626; }
.btn.danger:hover { background: #b91c1c; }
