/* Kleiderkammer – gemeinsame Grundstruktur aller drei Designs.
   Farben, Schriften und die designtypischen Elemente (Etikett, Reflexstreifen,
   Bestandskarte) kommen aus theme-*.css über die CSS-Variablen unten. */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.45;
}
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.masthead :focus-visible { outline-color: var(--head-focus, var(--focus)); }

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding-inline: 20px; }
.is-wide .wrap { max-width: 1180px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; background: var(--surface); color: var(--ink); padding: 10px 14px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); font-weight: 400; }
.hint { font-size: 14px; color: var(--muted); }

/* --- Kopf, Streifen, Navigation --- */
.masthead { background: var(--head-bg); color: var(--head-ink); padding: 26px 0 22px; }
.org { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--head-muted); }
.masthead h1 { margin: 0; font-family: var(--font-head); font-size: 40px; line-height: 1.02; font-weight: 800; overflow-wrap: anywhere; }
.summary { margin: 8px 0 0; font-size: 15px; color: var(--head-muted); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -6px 0 6px; color: var(--head-muted); text-decoration: none; font-weight: 600; }
.back:hover { color: var(--head-ink); }
.stripe { display: none; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; background: var(--nav-bg); border-top: 1px solid var(--line); }
.tabs a { flex: 1; min-height: 60px; display: flex; align-items: center; justify-content: center; padding: 0 4px; text-align: center; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); }
.tabs a[aria-current] { color: var(--nav-active); font-weight: 700; box-shadow: inset 0 3px 0 var(--nav-active); }
.tabs a:hover { color: var(--ink); }
@media (min-width: 900px) {
  .tabs { position: static; justify-content: center; border-top: 0; border-bottom: 1px solid var(--line); }
  .tabs a { flex: 0 0 auto; min-height: 52px; padding: 0 22px; }
  .tabs a[aria-current] { box-shadow: inset 0 -3px 0 var(--nav-active); }
}

.content { flex: 1; padding-top: 22px; padding-bottom: 24px; }
.foot { padding-top: 8px; padding-bottom: 88px; font-size: 14px; }
.foot a { color: var(--muted); }
@media (min-width: 900px) { .foot { padding-bottom: 32px; } }

/* --- Bausteine --- */
.section-title { margin: 0 0 12px; font-family: var(--font-head); font-size: 20px; font-weight: 700; line-height: 1.2; }
.lead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.lead .section-title { margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 2px solid transparent; border-radius: var(--radius); font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-quiet { background: none; color: var(--link); padding-inline: 8px; }
.btn-block { width: 100%; }
.btn-small { min-height: 44px; padding: 0 14px; font-size: 15px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.small-link { display: inline-block; padding: 10px 0; font-size: 14px; font-weight: 600; }

.notice { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--notice-bg); color: var(--ink); }
.notice-error { border: 2px solid var(--danger); font-weight: 600; }
.panel { margin-bottom: 18px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel > p { margin: 0 0 14px; max-width: 65ch; }
.empty { padding: 20px 0; }
.empty p { color: var(--muted); max-width: 60ch; }

/* --- Ausrüstungsliste --- */
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-name { font-family: var(--font-head); font-size: 18px; font-weight: 700; line-height: 1.2; }
.item-meta, .item-status { font-size: 14px; }
.item-meta, .status-ok { color: var(--muted); }
.status-open { color: var(--danger); font-weight: 600; }
.status-cleaning { color: var(--info); font-weight: 600; }
.item-since, .items-head { display: none; }

/* --- Formulare --- */
.stack { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 700; }
.field-title { margin: 0; font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.optional { font-family: var(--font-body); font-size: 14px; font-weight: 400; color: var(--muted); }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="month"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-border); border-radius: var(--radius);
}
textarea { resize: vertical; }
.file { font: inherit; font-size: 15px; color: var(--muted); max-width: 100%; }
.file::file-selector-button { min-height: 44px; margin-right: 12px; padding: 0 14px; font: inherit; font-weight: 600; color: var(--ink); background: transparent; border: 2px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; }

.kinds-list { display: flex; flex-wrap: wrap; gap: 8px; }
.kind { position: relative; font-weight: 500; }
.kind input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kind span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--ink); background: var(--pill-bg); border: 2px solid var(--pill-border); border-radius: var(--pill-radius); cursor: pointer; }
.kind input:checked + span { color: var(--pill-on-ink); background: var(--pill-on-bg); border-color: var(--pill-on-bg); font-weight: 600; }
.kind input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.submit-row { display: flex; flex-direction: column; gap: 10px; }
.submit-row .hint { margin: 0; }

.done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 0; }
.done .icon { width: 56px; height: 56px; stroke-width: 1.8; color: var(--done-icon); }
.done-title { margin: 0; font-family: var(--font-head); font-size: 30px; line-height: 1.1; }
.done p { margin: 0; max-width: 60ch; color: var(--muted); }

/* --- Meldungen --- */
.reports { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.report { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.report-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.report-item { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--ink); }
.report-meta { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.report-text { margin: 10px 0 0; white-space: pre-line; max-width: 65ch; }
.answer { margin-top: 12px; padding: 10px 12px; background: var(--answer-bg); border-radius: var(--radius); }
.answer p { margin: 0; white-space: pre-line; }
.answer .answer-label { margin-bottom: 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.badge { display: inline-block; padding: 2px 9px; font-size: 13px; font-weight: 700; white-space: nowrap; border: 1.5px solid currentColor; border-radius: 999px; }
.badge-offen { color: var(--danger); }
.badge-bearbeitung { color: var(--info); }
.badge-erledigt { color: var(--muted); }

/* --- Profil: Design-Auswahl --- */
.theme-choices { display: grid; gap: 10px; }
@media (min-width: 560px) { .theme-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.theme-choice { position: relative; font-weight: 600; }
.theme-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-card { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.theme-choice input:checked + .theme-card { border-color: var(--choice-on, var(--accent)); box-shadow: 0 0 0 1px var(--choice-on, var(--accent)); }
.theme-choice input:focus-visible + .theme-card { outline: 3px solid var(--focus); outline-offset: 2px; }
.theme-name { font-size: 15px; }
.theme-preview { display: flex; flex-direction: column; height: 76px; overflow: hidden; border-radius: 2px; }
@media (max-width: 559px) {
  .theme-card { flex-direction: row; align-items: center; gap: 14px; }
  .theme-preview { width: 96px; flex-shrink: 0; }
}
@media (min-width: 560px) { .theme-name { text-align: center; } }
.theme-preview-etikett { background: #EEF1F4; }
.theme-preview-etikett span:nth-child(1) { height: 30px; background: #1A2238; }
.theme-preview-etikett span:nth-child(2) { height: 4px; background: #D9E021; }
.theme-preview-etikett span:nth-child(3) { height: 18px; margin: 10px 8px; background: #FFFFFF; outline: 1px dashed #AEB6C3; outline-offset: -3px; }
.theme-preview-reflex { background: #1C2A47; }
.theme-preview-reflex span:nth-child(1) { height: 24px; }
.theme-preview-reflex span:nth-child(2) { height: 16px; background: linear-gradient(#E3EA3A 0 4px, #C7CDD4 4px 12px, #E3EA3A 12px); }
.theme-preview-reflex span:nth-child(3) { width: 45%; height: 10px; margin: 12px 8px; background: #E3EA3A; border-radius: 2px; }
.theme-preview-karte { background: #FFFFFF; border: 1px solid #C3C8D0; }
.theme-preview-karte span:nth-child(1) { width: 50%; height: 7px; margin: 9px 8px 0; background: #B00E28; }
.theme-preview-karte span:nth-child(2) { height: 6px; margin: 6px 8px 0; border-top: 2px solid #B00E28; border-bottom: 1px solid #B00E28; }
.theme-preview-karte span:nth-child(3) { flex: 1; margin: 6px 8px 8px; background: repeating-linear-gradient(#FFFFFF 0 9px, #D5D9DF 9px 10px); }

/* --- Kleiderkammer (Admin) --- */
.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.subnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.subnav a[aria-current] { color: var(--pill-on-ink); background: var(--pill-on-bg); border-color: var(--pill-on-bg); }
.filters { display: flex; flex-wrap: wrap; gap: 0 20px; margin-bottom: 12px; }
.filters a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--muted); text-decoration: none; }
.filters a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.count { font-weight: 400; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { padding: 10px 12px; text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--line-strong); }
.table td { padding: 10px 12px; vertical-align: top; border-bottom: 1px solid var(--line); }
.table tbody tr:last-child td { border-bottom: 0; }
.table-compact th, .table-compact td { padding: 6px 8px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.is-inactive, .is-inactive td, .is-inactive .edit-name { color: var(--muted); }
.split { display: grid; gap: 18px; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .split-wide-first { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 0; }
.photo { display: inline-block; margin-top: 14px; }
.photo img { display: block; max-width: 100%; max-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); }
.edit-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.edit-row { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.edit-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.edit-name { flex: 1 1 100%; font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.edit-form .field { flex: 1 1 130px; }
.edit-form .field label { font-size: 13px; color: var(--muted); }
.edit-form .field-grow { flex: 2 1 220px; }
.edit-form .field-narrow { flex: 0 1 92px; }
.edit-form .check { min-height: 46px; }
.edit-meta { flex: 1 1 100%; font-size: 13px; color: var(--muted); }
.flag-missing { color: var(--danger); font-weight: 700; }
.item-qty { color: var(--muted); }
.stock { display: grid; gap: 14px; }
.stock-group { margin: 0; }
@media (min-width: 700px) { .stock { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1050px) { .stock { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.prose p { max-width: 65ch; }
