/* The login service's pages: same colours and controls as the management (frontend/src/styles.css). */
:root {
  --bg: #f4f4f4; --card: #ffffff; --line: #e6e6e6; --line-strong: #d0d0d0; --text: #171717; --muted: #5b5b5b;
  --red: #d9000d; --red-dark: #b3000b; --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --ok-bg: #e6f4ea; --ok: #1e6b34; --bad-bg: #fde8e8; --bad: #9e0009; --info-bg: #e7f0fb; --info: #0b4f96;
  --grey-bg: #efefef; --grey: #4a4a4a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Figtree Variable', system-ui, 'Segoe UI', Arial, sans-serif;
  font-size: 14px; line-height: 1.45; }
a { color: var(--red-dark); }
h1 { margin: 2px 0 0; font-size: 22px; font-weight: 600; }
h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
button, input { font: inherit; color: inherit; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 24px; width: 100%; max-width: 380px;
  display: flex; flex-direction: column; gap: 14px; }
.login.breit .card { max-width: 560px; }
.logo { height: 34px; width: auto; align-self: flex-start; }
.card form { display: flex; flex-direction: column; gap: 12px; }
.card section { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: var(--muted); }
input { min-height: 36px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; width: 100%; }
input:focus { outline: 2px solid #f3b3b6; border-color: var(--red); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--text); text-decoration: none; font-weight: 500; cursor: pointer; }
.btn:hover { border-color: #a8a8a8; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.small { min-height: 28px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.abmelden { align-self: flex-start; }

/* Mein Konto: large tiles to the sites, the account settings folded below them */
.ziele { display: flex; flex-direction: column; gap: 10px; }
.ziel { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 12px; min-height: 64px; padding: 12px 16px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); color: var(--text); text-decoration: none; }
.ziel:hover { border-color: var(--red); }
.ziel:focus-visible { outline: 2px solid #f3b3b6; border-color: var(--red); }
.ziel-name { font-size: 18px; font-weight: 600; flex: 1 0 auto; }
.ziel-name::after { content: ' \2192'; color: var(--red); }
.ziel-unter { font-size: 12px; color: var(--muted); }
@media (max-width: 480px) { .ziel { flex-direction: column; align-items: flex-start; justify-content: center; } .ziel-name { flex: 0 0 auto; } }
details.einstellungen { border-top: 1px solid var(--line); padding-top: 12px; }
details.einstellungen > summary { cursor: pointer; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap;
  font-weight: 600; font-size: 15px; list-style: none; }
details.einstellungen > summary::-webkit-details-marker { display: none; }
details.einstellungen > summary::before { content: '\25B8'; color: var(--muted); width: 12px; }
details.einstellungen[open] > summary::before { content: '\25BE'; }
details.einstellungen .stand { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; font-weight: 400; }
details.einstellungen > section { margin-top: 14px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.abbrechen { align-self: center; }
.error { background: var(--bad-bg); color: var(--bad); border-radius: 8px; padding: 8px 10px; }
.ok { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 8px 10px; }
.oder { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.oder::before, .oder::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.grau { background: var(--grey-bg); color: var(--grey); }
.reihe { flex-direction: row !important; gap: 8px !important; }
.reihe input { flex: 1 1 auto; min-width: 0; }

.einrichten { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qr { width: 168px; height: 168px; flex: 0 0 auto; }
.qr svg { width: 100%; height: 100%; display: block; }
.geheim { font-size: 13px; overflow-wrap: anywhere; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.list td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
table.list td:last-child { text-align: right; }

/* The central administration (/verwaltung): full width, a header with the sections, tiles in a grid (same height in a
   row, only as tall as their content), tables that scroll sideways on a phone. */
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.nowrap { white-space: nowrap; }
body.v { min-height: 100vh; }
.v-kopf { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 10px 24px; background: var(--card);
  border-bottom: 1px solid var(--line); }
.v-marke { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.v-marke .logo { height: 28px; }
.v-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.v-nav a, .v-tabs a { padding: 6px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.v-nav a:hover, .v-tabs a:hover { background: var(--grey-bg); }
.v-nav a[aria-current="page"], .v-tabs a[aria-current="page"] { background: var(--text); color: #fff; }
.v-wer { margin-left: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.v-wer span { color: var(--muted); }
.v-inhalt { padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 16px; }
.v-inhalt > h1 { margin: 0; }
.v-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: stretch; }
.kachel { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.kachel h2 { margin: 0; }
.fakten { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.fakten dt { color: var(--muted); font-size: 13px; }
.fakten dd { margin: 0; overflow-wrap: anywhere; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-top: auto; }
.aktionen.spalte { flex-direction: column; align-items: stretch; margin-top: 0; }
form.knopf { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.knopf label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
form.knopf input:not([type="checkbox"]), form.knopf select { width: auto; min-height: 30px; }
.check input { width: auto; min-height: 0; }
select { font: inherit; min-height: 36px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.werkzeug { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
form.filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.filter label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
form.filter input { width: auto; min-height: 32px; }
form.filter input[name="suche"] { min-width: 200px; }
.formular { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.formular .btn, .v-inhalt > .btn, .v-inhalt > a.btn { align-self: flex-start; }
.v .reihe { display: flex; gap: 8px; flex-wrap: wrap; }
.tabelle { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.tabelle table.list td:last-child { text-align: left; }
.tabelle table.list td, .tabelle table.list th { vertical-align: top; }
.blaettern { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
h2.abschnitt { margin: 8px 0 0; }
pre.log { background: #1d1d1d; color: #e8e8e8; border-radius: 8px; padding: 12px; font-family: var(--mono); font-size: 12px;
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow: auto; margin: 0; }
.passwort { font-size: 15px; font-weight: 600; user-select: all; }
@media (max-width: 700px) {
  .v-kopf { padding: 10px 16px; }
  .v-wer { margin-left: 0; width: 100%; }
  .v-inhalt { padding: 16px 16px 32px; }
  .kacheln { grid-template-columns: 1fr; }
  form.filter input[name="suche"] { min-width: 0; flex: 1 1 140px; }
}

/* Automatic updates under each update card (central administration) */
details.auto { border-top: 1px solid var(--line); padding-top: 8px; }
details.auto summary { cursor: pointer; }
details.auto form { margin-top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
details.auto .tage { display: flex; flex-wrap: wrap; gap: 4px 12px; }
