/* UI-Stylesheet für die Web-Oberfläche */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f4f5f7;
  color: #222;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 16px; }

/* Kopfzeile */
.kopf { background: #1f2a44; color: #fff; margin-bottom: 24px; }
.kopf-innen { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
.marke { color: #fff; font-weight: 700; font-size: 1.2rem; text-decoration: none; margin-right: auto; }
.kopf nav { display: flex; flex-wrap: wrap; gap: 4px; }
.kopf nav a {
  color: #cdd6ea; text-decoration: none; padding: 6px 10px; border-radius: 6px;
}
.kopf nav a:hover { background: #2c3a5e; color: #fff; }

main.container { padding-bottom: 48px; }

h1 { font-size: 1.5rem; margin: 8px 0 16px; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; }

/* Meldungen */
.meldung { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; }
.meldung-ok { background: #e1f3e5; border: 1px solid #9ed4ab; color: #1d6b30; }
.meldung-fehler { background: #fde8e8; border: 1px solid #f3b1b1; color: #9b1c1c; }

/* Karten Dashboard */
.karten { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
.karte {
  background: #fff; border: 1px solid #e2e5ea; border-radius: 10px;
  padding: 18px 22px; min-width: 200px; flex: 1;
}
.karte-zahl { font-size: 1.6rem; font-weight: 700; }
.karte-label { color: #667; margin-top: 4px; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e8eaee; }
thead th { background: #eef1f5; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.rechts { text-align: right; }
.leer { color: #667; }

/* Buttons */
.btn {
  display: inline-block; padding: 8px 14px; border: 1px solid #c6ccd6; border-radius: 6px;
  background: #fff; color: #222; text-decoration: none; cursor: pointer; font-size: .95rem;
}
.btn:hover { background: #f0f2f5; }
.btn-primaer { background: #2456c8; border-color: #2456c8; color: #fff; }
.btn-primaer:hover { background: #1c46a8; }
.btn-gefahr { background: #c8242e; border-color: #c8242e; color: #fff; }
.btn-gefahr:hover { background: #a51d26; }
.btn-klein { padding: 4px 10px; font-size: .85rem; }

.aktionen, .aktionsreihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.aktionen form, .aktionsreihe form { margin: 0; }
.zeile-oben { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }

/* Formulare */
.formular { background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 20px; margin-bottom: 24px; }
.formular label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .9rem; }
.formular input[type="text"], .formular input[type="email"], .formular input[type="password"],
.formular input[type="number"], .formular input[type="date"], .formular input[type="file"],
.formular select, .formular textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
  border: 1px solid #c6ccd6; border-radius: 6px; font-size: 1rem; font-family: inherit;
}
.form-reihe { display: flex; gap: 16px; flex-wrap: wrap; }
.form-reihe label { flex: 1; min-width: 160px; }
.form-aktionen { display: flex; gap: 10px; margin-top: 8px; }
.checkbox-label { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.checkbox-label input { width: auto !important; margin: 0 !important; }
.hinweis { color: #667; font-size: .9rem; }
.css-editor { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: .85rem; }
.logo-vorschau { max-height: 60px; vertical-align: middle; margin-left: 8px; }

/* Positionen-Tabelle im Formular */
.pos-tabelle input { width: 100%; }
.zahl-eingabe { text-align: right; }

/* Status-Badges */
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.status-entworfen { background: #eceff3; color: #555; }
.status-versendet { background: #fff3cd; color: #856404; }
.status-bezahlt { background: #d4edda; color: #155724; }

/* Detail */
.detail-box { background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 16px 20px; margin-bottom: 16px; }
.detail-box p { margin: 6px 0; }
.summen { margin-top: 16px; max-width: 340px; margin-left: auto; }
.summen > div { display: flex; justify-content: space-between; padding: 6px 0; }
.summe-gesamt { border-top: 2px solid #222; font-size: 1.1rem; padding-top: 8px !important; }

/* Login */
.login-seite { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.login-box { background: #fff; border-radius: 12px; padding: 32px; width: 340px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.login-box h1 { text-align: center; }
.login-box label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .9rem; }
.login-box input { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid #c6ccd6; border-radius: 6px; font-size: 1rem; }
.login-box button { width: 100%; margin-top: 6px; }

@media (max-width: 640px) {
  table { font-size: .85rem; }
  th, td { padding: 8px 6px; }
  .karten { flex-direction: column; }
}
