/* beki-kompass — Overrides für beki-module.css.
   Mappt Standard-HTML aus den Django-Templates auf das Designsystem. */

/* ===== Inputs ===== */
input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="search"], input[type="number"],
input[type="tel"], input[type="url"],
select, textarea {
  width: 100%; max-width: 540px;
  padding: 10px 12px;
  border: 1.5px solid #dde3ec;
  border-radius: var(--radius-sm);
  font: inherit; font-size: 13px;
  color: var(--text); background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(35, 181, 160, .14);
}
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] {
  width: auto; max-width: none; margin-right: 8px;
}

label {
  display: block;
  margin: 10px 0 14px;
  font-weight: 600; font-size: 12.5px;
  color: var(--text);
}
label small { display: block; font-weight: 500; color: var(--muted); margin-top: 4px; }

/* ===== Buttons ===== */
button, .button, a[role="button"], input[type="submit"] {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff; color: var(--text);
  font: inherit; font-size: var(--fs-base); font-weight: 600;
  cursor: pointer; text-decoration: none; line-height: 1.4;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
button:hover, a[role="button"]:hover { background: var(--bg); }
button:active, a[role="button"]:active { transform: scale(.98); }

/* Primäraktion: Submit-Buttons und nicht-secondary/outline/contrast Links */
button[type="submit"]:not(.secondary):not(.contrast):not(.outline),
a[role="button"]:not(.secondary):not(.contrast):not(.outline) {
  background: linear-gradient(135deg, var(--navy), var(--teal-d));
  color: #fff; border: none; font-weight: 700;
  box-shadow: 0 4px 14px rgba(22, 72, 166, .22);
}
button[type="submit"]:not(.secondary):not(.contrast):not(.outline):hover,
a[role="button"]:not(.secondary):not(.contrast):not(.outline):hover {
  filter: brightness(1.06); color: #fff;
}

.secondary {
  background: #fff !important;
  color: var(--muted) !important;
  border: 1.5px solid #dde3ec !important;
  box-shadow: none !important;
}
.secondary:hover {
  border-color: var(--navy) !important;
  color: var(--navy) !important;
  background: var(--soft) !important;
}

.outline {
  background: transparent !important;
  border: 1.5px solid var(--line) !important;
  color: var(--muted) !important;
  box-shadow: none !important;
}

.contrast {
  background: #fff !important;
  color: #c0392b !important;
  border: 1.5px solid rgba(192, 57, 43, .35) !important;
  box-shadow: none !important;
}
.contrast:hover {
  background: #c0392b !important;
  color: #fff !important;
  border-color: #c0392b !important;
}

/* ===== Tabellen ===== */
table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  background: #fff;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--sh-card);
  margin: 12px 0 18px;
}
table th, table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 13px;
}
table th {
  background: #f4f7fb;
  color: var(--muted);
  font-weight: 700; font-size: 11.5px;
  letter-spacing: .04em; text-transform: uppercase;
}
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: #fafbfd; }
table.sm th, table.sm td { padding: 7px 10px; font-size: 12.5px; }

/* ===== <article> → Card-Optik ===== */
article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 12px 0;
  box-shadow: var(--sh-card);
}
article > header,
article > header strong {
  display: block;
  font-size: var(--fs-lg); font-weight: 800; color: var(--navy);
  margin: 0 0 12px; padding: 0;
  background: none; border: none;
}
article > footer {
  margin: 14px -20px -18px;
  padding: 10px 20px;
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  font-size: 12.5px;
}

/* ===== Typografie ===== */
h1 { font-size: 24px; font-weight: 800; color: var(--text); margin: 0 0 18px; }
h2 { font-size: 18px; font-weight: 700; color: var(--text); margin: 24px 0 12px; }
h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 16px 0 8px; }

dl { margin: 8px 0 14px; }
dt { font-weight: 700; font-size: 11.5px; color: var(--muted);
     text-transform: uppercase; letter-spacing: .04em; margin-top: 10px; }
dd { margin: 2px 0 8px; padding: 0; }

pre { background: #f4f7fb; border: 1px solid var(--line);
      padding: 12px 14px; border-radius: 10px; font-size: 12px; }

details > summary { cursor: pointer; padding: 6px 0; }

/* ===== Layout-Helfer ===== */
.row { display: flex; gap: 18px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 280px; }
.actions a, .actions form, .actions button {
  display: inline-block; margin: 0 6px 6px 0; vertical-align: middle;
}
.actions form { display: inline-block; margin: 0 6px 6px 0; }

/* ===== Badges: Aliase auf Modul-Varianten ===== */
.badge.ok     { background: rgba(95, 194, 79, .14);  color: #3c8a31; }
.badge.warn   { background: rgba(255, 201, 60, .18); color: #b88410; }
.badge.danger { background: rgba(255, 90, 60, .12);  color: #c84a2c; }
.badge.muted  { background: var(--soft); color: var(--muted); }

/* ===== Flash-Messages ===== */
.messages { margin: 0 0 16px; }
.messages article {
  margin: 0 0 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  background: #eaf3ff;
  border: 1px solid #c8dbf6;
  color: #1e3d73;
  box-shadow: none;
}
.messages article.success { background: rgba(95, 194, 79, .12); border-color: rgba(95, 194, 79, .35); color: #2f6f25; }
.messages article.error,
.messages article.warning { background: rgba(255, 90, 60, .08); border-color: rgba(255, 90, 60, .25); color: #c0392b; }

/* ===== Text-Logo statt Bildasset ===== */
#sidebar-logo.txt-logo {
  height: 96px; width: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
}
#sidebar-logo .lg-mark {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px; letter-spacing: -.02em;
  box-shadow: 0 6px 16px rgba(22, 72, 166, .25);
}
#sidebar-logo .lg-text {
  font-size: 13px; font-weight: 800; color: var(--navy);
  letter-spacing: -.01em; margin-top: 6px;
}

/* ===== Sub-Navigation (Filter-Reiter auf Listenseiten) ===== */
nav.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 14px 0 18px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-card);
}
nav.subnav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
nav.subnav a:hover { background: var(--soft); color: var(--navy); }
nav.subnav a.active {
  background: linear-gradient(135deg, var(--navy), var(--teal-d));
  color: #fff;
  box-shadow: 0 2px 8px rgba(22, 72, 166, .25);
}

/* ===== Responsiveness ===== */
@media (max-width: 720px) {
  .row > * { min-width: 100%; }
}
