/* Stallbuch – Gestaltung
   Heidekraut-Violett für Aktionen, Ohrmarken-Gelb für Tierkennzeichen,
   Signalrot nur für überfällige Fristen. */

@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #ECEFE9;
  --surface: #FFFFFF;
  --surface-2: #F5F7F3;
  --ink: #1D2421;
  --ink-2: #57625C;
  --line: #D2D9CF;
  --line-strong: #B9C2B6;
  --heide: #5B3A63;
  --heide-hover: #6E4B77;
  --heide-soft: #F0E8F1;
  --tag: #F2C318;
  --tag-edge: #D9AC00;
  --tag-ink: #2B2405;
  --alarm: #B3322A;
  --alarm-soft: #F9E4E1;
  --warn: #8A5D00;
  --warn-soft: #FBF1D3;
  --ok: #2E6A45;
  --ok-soft: #E2EFE6;
  --info: #3C4E5C;
  --info-soft: #E6EBEF;

  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;

  --r-sheet: 14px;
  --r-control: 9px;
  --nav-h: 64px;
  --rail-w: 232px;
  --gap: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--heide); text-underline-offset: .18em; }
a:hover { color: var(--heide-hover); }
:focus-visible { outline: 3px solid var(--heide); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.ico { width: 1.35em; height: 1.35em; flex: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: .005em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1.1rem; margin: 1.2rem 0 .4rem; }
p { margin: 0 0 .8rem; max-width: 70ch; }
small, .muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Gerüst ---------- */

.page { min-height: 100vh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 1.5rem); }
main { padding: 0 1rem; max-width: 64rem; }
.pagefoot { padding: 2rem 1rem 0; font-size: .8rem; color: var(--ink-2); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .6rem;
  padding: calc(env(safe-area-inset-top) + .7rem) 1rem .7rem;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  margin-bottom: .5rem;
}
.topbar h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; gap: .4rem; }
.back { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-left: -.5rem; color: var(--ink); border-radius: 50%; }
.back:hover { background: var(--surface); }

.mainnav {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.brand { display: none; }
.mainnav .nav-extra { display: none; }
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-2); text-decoration: none; font-size: .74rem; font-weight: 700;
}
.nav-item .ico { width: 1.6rem; height: 1.6rem; }
.nav-item.is-active { color: var(--heide); }
.nav-item.is-active .ico { stroke-width: 2.1; }

@media (min-width: 900px) {
  .page { margin-left: var(--rail-w); padding-bottom: 2rem; }
  main, .topbar { padding-left: 2.2rem; padding-right: 2.2rem; }
  .pagefoot { padding-left: 2.2rem; }
  .topbar { padding-top: 1.6rem; padding-bottom: 1rem; }
  h1 { font-size: 2rem; }
  .mainnav {
    top: 0; right: auto; width: var(--rail-w); height: auto; flex-direction: column; justify-content: flex-start;
    gap: .15rem; padding: 1.4rem .9rem; border-top: 0; border-right: 1px solid var(--line);
  }
  .brand { display: flex; align-items: center; gap: .7rem; padding: 0 .5rem 1.4rem; text-decoration: none; color: var(--ink); }
  .brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
  .brand-text b { font-family: var(--font-display); font-size: 1.35rem; }
  .brand-text small { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-item { flex: none; flex-direction: row; justify-content: flex-start; gap: .7rem; padding: .55rem .7rem; border-radius: var(--r-control); font-size: 1rem; }
  .nav-item .ico { width: 1.35rem; height: 1.35rem; }
  .nav-item:hover { background: var(--surface-2); color: var(--ink); }
  .nav-item.is-active { background: var(--heide-soft); }
  .mainnav .nav-extra { display: flex; margin-top: auto; }
  .only-mobile { display: none !important; }
}

/* Markenzeichen: stilisierte Ohrmarke */
.brand-mark { width: 30px; height: 38px; flex: none; background: var(--tag); border-radius: 15px 15px 7px 7px; position: relative; box-shadow: inset 0 -3px 0 var(--tag-edge); }
.brand-mark::before { content: ""; position: absolute; left: 50%; top: 6px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--tag-edge); }

/* ---------- Ohrmarke als Kennzeichen-Badge ---------- */

.tag {
  display: inline-flex; align-items: center; gap: .38em;
  padding: .12em .55em .12em .4em;
  background: var(--tag); color: var(--tag-ink);
  border-radius: 1em .38em .38em 1em;
  box-shadow: inset 0 -2px 0 var(--tag-edge);
  font: 700 1rem/1.25 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: .02em;
  white-space: nowrap;
}
.tag::before { content: ""; width: .42em; height: .42em; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--tag-edge); }
.tag-none { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 600; }
.tag-none::before { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.tag-gone { background: #E4E1D3; box-shadow: inset 0 -2px 0 #C9C4AE; color: #4D4A3C; }

.tag-xl {
  font-size: 2.6rem; padding: .1em .45em .1em .32em; border-radius: .7em .22em .22em .7em; box-shadow: inset 0 -4px 0 var(--tag-edge);
}
.tag-xl::before { width: .3em; height: .3em; box-shadow: inset 0 0 0 2.5px var(--tag-edge); }

/* Herde auf der Startseite: Ohrmarken an der Leiste */
.herd { display: flex; flex-wrap: wrap; gap: .55rem .5rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.herd a { text-decoration: none; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; color: var(--ink); }
.herd .tag { font-size: 1.35rem; }
.herd small { font-size: .82rem; padding-left: .2rem; max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.herd-count { font: 700 3rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.herd-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.herd-head span + span { font-size: 1.05rem; color: var(--ink-2); }

/* ---------- Flächen & Listen ---------- */

.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); padding: 1rem; margin: 0 0 1rem; }
.sheet > h2:first-child, .sheet > h3:first-child { margin-top: 0; }
.sheet-flush { padding: 0; overflow: hidden; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 1.15rem; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .8rem; align-items: center;
  padding: .8rem 1rem; color: inherit; text-decoration: none; min-height: 3.4rem;
}
a.row:hover { background: var(--surface-2); color: inherit; }
.row-main { min-width: 0; }
.row-title { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; }
.row-sub { display: block; font-size: .9rem; color: var(--ink-2); }
.row-aside { text-align: right; font-size: .88rem; color: var(--ink-2); white-space: nowrap; }
.row-date { font: 600 1rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--ink); min-width: 3.6rem; }
.row-date small { display: block; font: 400 .78rem var(--font); color: var(--ink-2); }

.empty { padding: 1.4rem 1rem; color: var(--ink-2); }
.empty p { margin-bottom: .8rem; }

/* Kennzeichnung der Richtung */
.dir { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.dir-zugang { background: var(--ok-soft); color: var(--ok); }
.dir-abgang { background: #F6DDE3; color: #8B2F48; }

.pill { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill-alarm { background: var(--alarm-soft); color: var(--alarm); border-color: transparent; }
.pill-med { background: var(--heide-soft); color: var(--heide); border-color: transparent; }

/* ---------- Hinweise ---------- */

.notices { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.notice { display: block; padding: .75rem 1rem .75rem .9rem; border-radius: var(--r-control); background: var(--info-soft); color: var(--info); text-decoration: none; border-left: 5px solid currentColor; }
.notice b { display: block; color: var(--ink); }
.notice span { font-size: .92rem; color: var(--ink-2); }
a.notice:hover { filter: brightness(.98); color: var(--info); }
.notice-alarm { background: var(--alarm-soft); color: var(--alarm); }
.notice-alarm b { color: var(--alarm); }
.notice-warn { background: var(--warn-soft); color: var(--warn); }
.notice-ok { background: var(--ok-soft); color: var(--ok); }

.flash { margin: 0 0 1rem; padding: .7rem 1rem; border-radius: var(--r-control); background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.flash-error { background: var(--alarm-soft); color: var(--alarm); }
.flash-info { background: var(--info-soft); color: var(--info); }

/* ---------- Schaltflächen ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 2.75rem; padding: .5rem 1rem; border-radius: var(--r-control);
  border: 1px solid var(--heide); background: var(--heide); color: #fff;
  font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--heide-hover); border-color: var(--heide-hover); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--heide); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--heide-soft); color: var(--heide); border-color: var(--heide); }
.btn-danger { background: var(--surface); color: var(--alarm); border-color: #E2B4AE; }
.btn-danger:hover { background: var(--alarm); color: #fff; border-color: var(--alarm); }
.btn-small { min-height: 2.2rem; padding: .3rem .7rem; font-size: .92rem; }
.btn-icon { width: 2.6rem; padding: 0; }
.btn .ico { width: 1.2em; height: 1.2em; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; align-items: center; }
.toolbar .spacer { flex: 1; }
button.linklike { background: none; border: 0; padding: 0; color: var(--heide); font: inherit; text-decoration: underline; cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; align-items: center; }
.inline-form { display: inline; }

/* Umschalter (Filter) */
.seg { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 1rem; }
.seg a { padding: .4rem .85rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: .92rem; }
.seg a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Formulare ---------- */

form.stack > * + * { margin-top: .2rem; }
fieldset { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
legend { font: 700 1.15rem/1.2 var(--font-display); padding: 0; margin-bottom: .6rem; }
.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .85rem; min-width: 0; }
.field label { font-weight: 700; font-size: .95rem; }
.field small { font-size: .85rem; }
input[type=text], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 2.75rem; padding: .5rem .7rem; border: 1px solid var(--line-strong); border-radius: var(--r-control);
  background: var(--surface); color: var(--ink); font: 400 1.0625rem/1.35 var(--font);
}
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--heide) 35%, transparent); border-color: var(--heide); outline-offset: 0; }
textarea { min-height: 5rem; resize: vertical; }
input[type=file] { font: inherit; max-width: 100%; }
.check { display: flex; gap: .55rem; align-items: flex-start; margin: .2rem 0 .7rem; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin: .12rem 0 0; accent-color: var(--heide); flex: none; }
.grid2 { display: grid; gap: 0 1rem; }
.grid3 { display: grid; gap: 0 1rem; }
@media (min-width: 640px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr 1fr; }
}
.span2 { grid-column: 1 / -1; }
.req::after { content: " *"; color: var(--alarm); }
.form-note { font-size: .9rem; color: var(--ink-2); margin: -.2rem 0 1rem; }
details.more { margin: 0 0 1rem; }
details.more > summary { cursor: pointer; font-weight: 700; color: var(--heide); padding: .4rem 0; }
details.more[open] > summary { margin-bottom: .6rem; }

/* Tierauswahl als Ohrmarken-Chips */
.picks { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .6rem; }
.pick { position: relative; display: inline-flex; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick > span {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .3rem .8rem .3rem .4rem;
  border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: .95rem;
}
.pick > span .tag { font-size: .95rem; }
.pick input:checked + span { border-color: var(--heide); background: var(--heide-soft); box-shadow: inset 0 0 0 1px var(--heide); }
.pick input:checked + span::after { content: ""; width: .5rem; height: .9rem; border: solid var(--heide); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translateY(-2px); margin-left: .1rem; }
.pick input:focus-visible + span { outline: 3px solid var(--heide); outline-offset: 2px; }
.pick-wrap { display: inline-flex; align-items: center; }
.pick-value { display: none; margin-left: .3rem; }
.pick-value input { width: 5.2rem; min-height: 2.2rem; padding: .2rem .5rem; }
.show-values .pick-value { display: inline-flex; }
.picks-tools { display: flex; gap: 1rem; margin: 0 0 .6rem; font-size: .92rem; }

/* Neue Tiere im Zugang */
.newanimal { border: 1px dashed var(--line-strong); border-radius: var(--r-control); padding: .8rem .8rem 0; margin-bottom: .7rem; background: var(--surface-2); }
.newanimal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; font-weight: 700; }

.med-box { border-left: 4px solid var(--heide); background: var(--heide-soft); border-radius: 0 var(--r-control) var(--r-control) 0; padding: .9rem .9rem .1rem; margin: 0 0 1rem; }
.med-box[hidden] { display: none; }

/* ---------- Tierakte ---------- */

.animal-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.1rem; margin: .2rem 0 1rem; }
.animal-head h2 { margin: 0; font-size: 1.6rem; }
.animal-head .sub { color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .8rem 1.2rem; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: .85rem; color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* Profilbild */
.animal-head { flex-wrap: nowrap; align-items: flex-start; }
.animal-id { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.animal-id .tag-xl { font-size: 2.2rem; }
@media (min-width: 640px) { .animal-id { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .6rem 1.1rem; } .animal-id .tag-xl { font-size: 2.6rem; } }
.avatar-form { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.avatar { width: 112px; height: 112px; border-radius: 18px; object-fit: cover; display: block; background: var(--surface-2); border: 1px solid var(--line); }
.avatar-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; border: 2px dashed var(--line-strong); color: var(--ink-2); font-size: .85rem; font-weight: 700; cursor: pointer; background: var(--surface); }
.avatar-empty .ico { width: 1.9rem; height: 1.9rem; }
.avatar-empty:hover, .avatar-empty:focus-within { border-color: var(--heide); color: var(--heide); }
.avatar-change { font-size: .85rem; font-weight: 700; color: var(--heide); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.avatar-change:focus-within { outline: 3px solid var(--heide); outline-offset: 2px; border-radius: 4px; }
.avatar-form.is-busy { opacity: .5; pointer-events: none; }
.thumb { width: 2.9rem; height: 2.9rem; border-radius: 10px; object-fit: cover; display: block; }
.thumb-empty, .herd-photo.thumb-empty { display: grid; place-items: center; background: var(--surface-2); color: var(--line-strong); border: 1px solid var(--line); }
.thumb-empty .ico { width: 1.5rem; height: 1.5rem; }
.row.has-thumb { grid-template-columns: auto auto 1fr auto; }
.herd-photo { width: 5.2rem; height: 5.2rem; border-radius: 14px; object-fit: cover; display: block; margin-bottom: .1rem; }
.herd-photos { gap: 1rem .8rem; }
.herd-photos small { max-width: 5.2rem; }
.herd-photos .tag { font-size: 1.05rem; margin-top: -.9rem; margin-left: .25rem; position: relative; box-shadow: inset 0 -2px 0 var(--tag-edge), 0 0 0 2px var(--surface); }

.name-form { display: flex; gap: .4rem; margin: .35rem 0 .2rem; max-width: 22rem; }
.name-form input { min-height: 2.3rem; padding: .3rem .6rem; font-size: 1rem; }

/* Chronik */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 5.2rem 1fr; gap: .8rem; padding: .85rem 1rem; position: relative; }
.timeline li + li { border-top: 1px solid var(--line); }
.tl-date { font: 600 1rem/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.tl-date small { display: block; font: 400 .8rem var(--font); color: var(--ink-2); }
.tl-kind { font-size: .82rem; font-weight: 700; color: var(--heide); }
.tl-title { display: block; font-weight: 700; }
.tl-meta { display: block; font-size: .9rem; color: var(--ink-2); }
.tl-kind-zugang .tl-kind { color: var(--ok); }
.tl-kind-abgang .tl-kind { color: #8B2F48; }

/* ---------- Tabellen ---------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; vertical-align: top; padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
table.data th { font-weight: 700; background: var(--surface-2); white-space: nowrap; }
table.data td.pre { white-space: pre-line; }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr:last-child td { border-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .6rem; margin: 0 0 1rem; }
.stat { background: var(--surface-2); border-radius: var(--r-control); padding: .7rem .9rem; }
.stat b { display: block; font: 700 2rem/1.05 var(--font-display); font-variant-numeric: tabular-nums; }
.stat span { font-size: .88rem; color: var(--ink-2); }

.files { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .5rem; }
.files li { display: flex; align-items: center; gap: .7rem; }
.files img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.files .file-ico { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-weight: 700; font-size: .8rem; }
.files .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.log-entry { margin: 0; padding: .6rem 1rem; }
.log-entry summary { font-weight: 400; color: var(--ink); }
.log-pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .6rem; max-height: 18rem; overflow: auto; }
.form-note.pad { padding: .8rem 1rem 0; }

/* ---------- Anmeldung ---------- */

.bare-main { max-width: 26rem; margin: 0 auto; padding: 12vh 1.2rem 2rem; }
.bare-main.wide { max-width: 40rem; }
.login-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.6rem; }
.login-brand .brand-mark { width: 40px; height: 50px; border-radius: 20px 20px 9px 9px; }
.login-brand .brand-mark::before { top: 8px; width: 11px; height: 11px; margin-left: -5.5px; }
.login-brand h1 { font-size: 2.2rem; }
.login-brand p { margin: 0; color: var(--ink-2); }

/* ---------- Druck ---------- */

@media print {
  @page { margin: 14mm 12mm; }
  body { background: #fff; font-size: 10pt; }
  .mainnav, .topbar-actions, .back, .toolbar, .btn, .seg, .btn-row, form .btn, .no-print, .pagefoot, .flash { display: none !important; }
  .page { margin: 0; padding: 0; }
  main, .topbar { padding: 0; max-width: none; }
  .topbar { position: static; background: none; backdrop-filter: none; }
  .sheet { border: 0; padding: 0; border-radius: 0; }
  table.data { font-size: 8.5pt; }
  table.data th { background: #eee; }
  .table-wrap { overflow: visible; }
  a { color: inherit; text-decoration: none; }
  .tag { box-shadow: none; border: 1px solid #999; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
