/* Berufsbekleidung – Gestaltung nach CI Schul-IT Region Osnabrück e. V. */
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: local("Figtree"), url("fonts/figtree-400.woff2") format("woff2"); }
@font-face { font-family: Figtree; font-weight: 500; font-display: swap; src: local("Figtree Medium"), url("fonts/figtree-500.woff2") format("woff2"); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: local("Figtree SemiBold"), url("fonts/figtree-600.woff2") format("woff2"); }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: local("Figtree Bold"), url("fonts/figtree-700.woff2") format("woff2"); }
@font-face { font-family: Figtree; font-weight: 800; font-display: swap; src: local("Figtree ExtraBold"), url("fonts/figtree-800.woff2") format("woff2"); }

:root {
  --navy: #123f6e;
  --navy-dark: #0d2f53;
  --blue: #1d5fa3;
  --text: #16233a;
  --muted: #5a6a7e;
  --line: #e3e9ef;
  --bg: #f4f7fa;
  --steel: #a7bec8;
  --steel-light: #dfe8ed;
  --border: #7d93a3;
  --shadow: 0 10px 30px -12px rgba(18, 63, 110, .25);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5;
}
h1, h2, p, ul, fieldset { margin: 0; padding: 0; }
h1 { font-size: 34px; font-weight: 800; line-height: 1.15; color: var(--navy); }
h2 { font-size: 20px; font-weight: 800; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.muted { color: var(--muted); }
.small-text { font-size: 14px; }
.nowrap { white-space: nowrap; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main.wrap { flex: 1; padding-top: 36px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
main.narrow { max-width: 508px; }

/* Kopf und Fuß */
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 19px; }
.brand img { height: 52px; width: auto; display: block; }
.brand span { padding-left: 16px; border-left: 1px solid var(--steel); }
.top-nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.top-nav form { margin: 0; }
.who { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.foot { background: var(--navy-dark); color: var(--steel-light); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }
.foot a { color: #fff; }
.foot a:hover { color: var(--steel-light); }

/* Bausteine */
.card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px;
  border-radius: 8px; border: 1px solid var(--navy); background: #fff; color: var(--navy);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--bg); color: var(--navy); }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-dark); color: #fff; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 15px; font-weight: 600; }
.btn:disabled, .btn.primary:disabled { background: var(--steel-light); border-color: var(--steel-light); color: var(--muted); cursor: not-allowed; }
label, legend { font-weight: 600; font-size: 15px; }
.form-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin: 0; }
.form-row .stack { flex: 1 1 220px; }
.form-row .btn { flex: 0 0 auto; }
.btn.narrow-btn { width: auto; }
.back { font-weight: 600; }
input[type=text], input[type=email], input[type=datetime-local] {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border);
  font: inherit; color: var(--text); background: #fff;
}
select {
  width: 100%; height: 48px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border);
  font: inherit; color: var(--text); background: #fff;
}
.stack label { margin-top: 6px; }
.btn.danger { border-color: #8a1c1c; color: #8a1c1c; width: 100%; }
.btn.danger:hover { background: #fdecec; color: #8a1c1c; }
.danger-zone { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
input.code { height: 56px; font-size: 24px; font-weight: 700; letter-spacing: 6px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack .btn { margin-top: 8px; }
.flash { padding: 12px 16px; border-radius: 8px; font-weight: 600; }
.flash.ok { background: var(--steel-light); color: var(--navy-dark); border-left: 0; }
.flash.err { background: #fdecec; color: #8a1c1c; }

/* Anmeldung */
.login { display: flex; flex-direction: column; gap: 16px; padding: 32px; }
.login h1 { font-size: 28px; }
.row-2 { display: flex; flex-wrap: wrap; gap: 12px; }
.row-2 form { flex: 1 1 160px; margin: 0; }
.row-2 .btn { width: 100%; font-weight: 600; font-size: 15px; }

/* Einleitung mit Gesamtzahl */
.intro { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; }
.intro-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 10px; }
.intro-text p { max-width: 640px; }
.total { flex: 0 1 320px; display: flex; gap: 16px; align-items: center; background: var(--navy); color: #fff; border-radius: 14px; padding: 16px 20px; font-size: 15px; line-height: 1.35; }
.total-num { font-size: 44px; font-weight: 800; line-height: 1; }
.total-sub { color: var(--steel-light); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .chip { display: inline-block; padding: 4px 12px; border-radius: 6px; background: var(--steel-light); font-size: 14px; font-weight: 600; }
.seals { max-width: 100%; width: 420px; height: auto; }

/* Artikel und Bestellung */
.shop { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.cards { flex: 999 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.article { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.pic { height: 190px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pic img { width: 100%; height: 100%; object-fit: contain; }
.article-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sizes { border: 0; display: flex; flex-direction: column; gap: 8px; }
.pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pills label {
  display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; font-weight: 700; cursor: pointer;
}
.pills input:checked + label { background: var(--navy); border-color: var(--navy); color: #fff; }
.pills input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }
.pills input:disabled + label { background: var(--bg); color: var(--muted); cursor: not-allowed; }
.fit { padding: 8px 12px; border-radius: 8px; background: #fff4d6; color: #5c4300; font-size: 14px; font-weight: 600; }
.hint { min-height: 21px; }

.cart { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.cart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cart-head h2 { font-size: 22px; color: var(--navy); }
.count { font-size: 18px; font-weight: 800; white-space: nowrap; }
.bars { display: flex; gap: 6px; }
.bars span { flex: 1; height: 8px; border-radius: 4px; background: var(--steel-light); }
.bars span.on { background: var(--navy); }
.note { padding: 10px 12px; border-radius: 8px; background: var(--steel-light); font-size: 14px; font-weight: 600; }
.cart-list { list-style: none; display: flex; flex-direction: column; }
.cart-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.cart-list li div { display: flex; flex-direction: column; }
.btn.remove { width: 44px; min-height: 44px; padding: 0; font-size: 24px; line-height: 1; flex: none; }
.privacy { padding-top: 14px; border-top: 1px solid var(--line); }

/* Admin */
.stats { display: flex; flex-wrap: wrap; gap: 16px; }
.stat { display: flex; flex-direction: column; padding: 14px 22px; }
.stat-num { font-size: 32px; font-weight: 800; line-height: 1.1; color: var(--navy); }
.block { display: flex; flex-direction: column; gap: 16px; }
.block-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.block-head h2 { font-size: 22px; color: var(--navy); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions .btn { min-height: 44px; font-size: 15px; font-weight: 600; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 15px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--bg); white-space: nowrap; }
tbody th { font-weight: 700; white-space: nowrap; }
.num th.n, .num td { text-align: center; font-variant-numeric: tabular-nums; }
.num td.z { color: var(--muted); }
.num td.sum, .num th.sum { font-weight: 800; color: var(--navy); background: var(--bg); }
tfoot th, tfoot td { font-weight: 800; color: var(--navy); background: var(--steel-light); border-bottom: 0; }
td .chip { margin: 0 4px 6px 0; white-space: nowrap; }

@media (max-width: 720px) {
  h1 { font-size: 28px; }
  .cart { position: static; }
  .brand span { display: none; }
}

@media print {
  body { background: #fff; }
  .top, .foot, .actions, .stats, .flash, .no-print { display: none !important; }
  main.wrap { padding: 0; max-width: none; }
  .card { box-shadow: none; padding: 0; }
  .scroll { overflow: visible; }
  table { min-width: 0; }
  thead th, tfoot th, tfoot td, .num td.sum, .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
