/* =========================================================================
   Praktikum – Betriebspraktikum verwalten

   Farbtoken aus dem Modul „Abstimmung", damit beide Module erkennbar
   zusammengehören. Abweichung: Die Marke ist hier das gedeckte Blau des
   Modulkatalogs (#3f6fa8) statt der Terrakotta – sonst wären die beiden
   Seiten auf einem Elternabend nicht auseinanderzuhalten.

   Für das iPad ausgelegt. Vier Dinge, die dabei zählen und nicht offen-
   sichtlich sind:

   1. **Eingabefelder tragen 16 px.** Ist die Schrift kleiner, zoomt Safari
      beim Antippen automatisch in das Feld hinein – die Seite springt, und
      man muss von Hand zurückzoomen. Deshalb 16 px, nicht 15.
   2. **Berührungsziele sind mindestens 44 px hoch** (--tap). Alles darunter
      trifft man mit dem Finger nicht zuverlässig.
   3. **`:hover` nur, wo es Zeigegeräte gibt.** Auf Touch bleibt ein
      Hover-Zustand nach dem Tippen „kleben", bis man woanders hintippt.
   4. **`dvh` statt `vh`.** Bei `100vh` schiebt die ein- und ausfahrende
      Adressleiste den Inhalt; `dvh` rechnet mit der tatsächlichen Höhe.
   ========================================================================= */

:root {
  /* Flächen */
  --bg: #f0ece3;
  --surface: #fffdf9;
  --surface-2: #f6f1e8;
  --surface-inset: #f3eee4;

  /* Text */
  --ink: #211f1a;
  --ink-soft: #453f37;
  --muted: #7a736a;
  --faint: #9c968c;

  /* Linien */
  --line: #e7e0d3;
  --line-strong: #dbd2c1;

  /* Marke */
  --brand: #3f6fa8;
  --brand-strong: #33598a;
  --brand-soft: #dde7f3;
  --brand-tint: #eef3f9;
  --brand-ink: #24405f;

  /* Statusfarben */
  --ok: #3c8a5f;
  --ok-soft: #e2efe6;
  --info: #3f6fa8;
  --info-soft: #e3ebf5;
  --warn: #b07420;
  --warn-soft: #f4e9d5;
  --danger: #a8452f;
  --danger-soft: #f3e0d8;
  --neutral: #7c756c;
  --neutral-soft: #ece6da;

  /* Form */
  --r-xl: 20px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(60, 45, 25, 0.05);
  --shadow: 0 10px 30px rgba(70, 50, 25, 0.07);
  --shadow-pop: 0 18px 44px rgba(50, 35, 18, 0.16);

  --sidebar-w: 236px;
  --tap: 44px;
  --gap: clamp(0.9rem, 2vw, 1.3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 12% -8%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(900px 500px at 108% 4%, rgba(63, 111, 168, 0.07), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(63, 111, 168, 0.12);
}

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  line-height: 1.18;
  margin: 0 0 .4em;
  font-weight: 600;
  letter-spacing: -0.011em;
}
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); }
h2 { font-size: clamp(1.14rem, 1.05rem + 0.5vw, 1.35rem); }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .8em; }
a { color: var(--brand-strong); text-underline-offset: 2px; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.tiny  { font-size: .78rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: .75rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row.tight { gap: .35rem; }
.grow { flex: 1 1 auto; }

/* Lange Werte aus Schülereingaben dürfen nie aus ihrem Kasten laufen. */
.card, .codecard, td, li { overflow-wrap: anywhere; }

/* --------------------------------------------------------------- Layout */

.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: var(--gap) clamp(0.9rem, 3vw, 1.6rem) 4rem;
  padding-left: max(clamp(0.9rem, 3vw, 1.6rem), env(safe-area-inset-left));
  padding-right: max(clamp(0.9rem, 3vw, 1.6rem), env(safe-area-inset-right));
}
.wrap.narrow { max-width: 760px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: .75rem clamp(0.9rem, 3vw, 1.6rem);
  padding-top: max(.75rem, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.topbar__brand { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
.topbar__brand strong {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 1.05rem; letter-spacing: -0.01em;
}
.topbar__brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__spacer { flex: 1 1 auto; }

.hero {
  border-radius: var(--r-xl);
  padding: clamp(1.2rem, 3vw, 1.9rem);
  background:
    linear-gradient(135deg, var(--brand-tint), var(--surface) 62%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--gap);
  overflow: hidden;
}
.hero h1 { margin-bottom: .18em; }
.hero p:last-child { margin-bottom: 0; }

/* Begrüßungsbild.
 *
 * Das Bild sitzt oben, der Text darunter – nicht darüber. Ein Textblock auf
 * dem Bild wäre hier nicht lesbar: Die Vorlage hat helle und dunkle Stellen
 * nebeneinander, und der Schulname steht in Schwarz.
 *
 * `aspect-ratio` statt fester Höhe, damit der Ausschnitt auf jeder Breite
 * gleich wirkt; auf schmalen Geräten wird der Streifen flacher, weil ein
 * 16:9-Bild sonst den halben Bildschirm füllt, bevor der Code eingegeben
 * werden kann.
 */
.hero--bild { padding: 0; }
.hero__bild {
  display: block;
  width: 100%;
  /* `height: auto` ist Pflicht, nicht Geschmack: Solange das height-Attribut
     aus dem Markup (900) die Höhe festlegt, greift `aspect-ratio` gar nicht –
     das Bild wird 900 px hoch und schiebt das Eingabefeld aus dem Bild.
     Die Attribute bleiben trotzdem stehen, sie reservieren die Fläche vor dem
     Laden und verhindern den Sprung. */
  height: auto;
  aspect-ratio: 16 / 6.4;
  object-fit: cover;
  object-position: center 42%;
  background: var(--brand-tint);
}
.hero__text { padding: clamp(1.1rem, 3vw, 1.7rem); }
.hero__text > :last-child { margin-bottom: 0; }
@media (max-width: 560px) {
  .hero__bild { aspect-ratio: 16 / 8.5; }
}

/* Dasselbe für die Anmeldekarte – dort schmaler, der Weg zum Formular soll
   kurz bleiben. */
.card--bild { overflow: hidden; }
.card__bild {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 5.6;
  object-fit: cover;
  object-position: center 40%;
  background: var(--brand-tint);
  border-bottom: 1px solid var(--line);
}

.panel {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}
@media (max-width: 900px) { .panel { grid-template-columns: minmax(0, 1fr); } }

/* Bereichswahl: seitlich am Schreibtisch, als Reiterleiste auf dem Tablet. */
.sidenav {
  display: flex; flex-direction: column; gap: .12rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: .45rem;
  position: sticky; top: calc(3.6rem + env(safe-area-inset-top));
  box-shadow: var(--shadow-sm);
}
.sidenav button {
  display: flex; align-items: center;
  min-height: var(--tap);
  text-align: left; border: 0; background: transparent; cursor: pointer;
  padding: .5rem .7rem; border-radius: var(--r-sm); color: var(--ink-soft);
  font-weight: 500;
  transition: background-color .12s ease, color .12s ease;
}
@media (hover: hover) { .sidenav button:hover { background: var(--surface-2); } }
.sidenav button[aria-current="true"] {
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 650;
}
@media (max-width: 900px) {
  .sidenav {
    position: sticky; top: calc(3.4rem + env(safe-area-inset-top));
    flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .sidenav::-webkit-scrollbar { display: none; }
  .sidenav button { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
}

/* ----------------------------------------------------------------- Karten */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  margin-bottom: var(--gap);
  overflow: hidden;
}
.card__head {
  padding: .85rem 1.05rem;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  background: linear-gradient(var(--surface-2), var(--surface-2));
}
.card__head h2, .card__head h3 { margin: 0; }
.card__body { padding: clamp(.9rem, 2.2vw, 1.2rem); }
.card__body > :last-child { margin-bottom: 0; }

.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ------------------------------------------------------------- Formulare */

.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .85rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field .hint, .hint { font-size: .8rem; color: var(--muted); line-height: 1.45; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="url"], input[type="time"], input[type="search"], input[type="number"], input[type="file"],
select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: .55rem .7rem;
  /* 16 px – alles darunter lässt Safari beim Antippen hineinzoomen. */
  font-size: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}
textarea { min-height: 6rem; resize: vertical; line-height: 1.5; }
fieldset {
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1rem 1.05rem .35rem; margin: 0 0 1.1rem;
  background: var(--surface);
}
legend {
  padding: .15rem .55rem; font-weight: 650; font-size: .82rem;
  color: var(--brand-ink); background: var(--brand-tint);
  border-radius: 999px; letter-spacing: .01em;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: var(--tap);
  padding: .55rem 1.05rem;
  border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  font-weight: 600; text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(36, 64, 95, .18);
  transition: background-color .12s ease, border-color .12s ease, transform .06s ease;
}
@media (hover: hover) {
  .btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
  .btn.secondary:hover { background: var(--surface-2); }
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.secondary {
  background: var(--surface); color: var(--ink-soft);
  border-color: var(--line-strong); box-shadow: none;
}
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.small { min-height: 36px; padding: .3rem .7rem; font-size: .86rem; font-weight: 550; }
.btn.link {
  min-height: 32px; background: none; border: 0; color: var(--brand-strong);
  text-decoration: underline; padding: .15rem 0; box-shadow: none;
  font-weight: 500; white-space: normal; text-align: left;
  justify-content: flex-start;
}
/* Auf Touch-Geräten reicht ein 23 px hoher Textlink nicht – man trifft ihn
   nicht zuverlässig und erwischt stattdessen die Karte darunter. Nur bei
   grobem Zeiger vergrößern, damit die Maus-Ansicht kompakt bleibt. */
@media (pointer: coarse) {
  .btn.link { min-height: var(--tap); padding-block: .55rem; }
}

/* Kontrollkästchen groß genug für den Finger. */
input[type="checkbox"] {
  width: 1.15rem; height: 1.15rem; min-height: 0;
  accent-color: var(--brand); flex: 0 0 auto;
}
label.row { min-height: var(--tap); cursor: pointer; }

/* ------------------------------------------------------------- Tabellen */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  position: sticky; top: 0; z-index: 1;
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 700;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
tbody tr { transition: background-color .1s ease; }
@media (hover: hover) { tbody tr:hover { background: var(--surface-2); } }
tbody tr:last-child td { border-bottom: 0; }
/* In Tabellen dürfen die Bedienelemente schmaler sein als 44 px –
   sie stehen dicht, und die Zeile selbst ist das große Ziel. */
td select, td input { min-height: 38px; padding: .3rem .5rem; font-size: 15px; }
.company-table { min-width: 1200px; }
.company-table td:nth-child(3), .company-table td:nth-child(4), .company-table td:nth-child(5) { white-space: nowrap; }
.company-table td:nth-child(7) { min-width: 175px; }
.superadmin-filter-grid { align-items: start; }
.filter-box { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; }
.filter-box summary { cursor: pointer; padding: .75rem .9rem; font-weight: 700; list-style: none; border-bottom: 1px solid var(--line); }
.filter-box summary::-webkit-details-marker { display: none; }
.filter-box summary::after { content: '⌄'; float: right; color: var(--muted); transition: transform .15s ease; }
.filter-box:not([open]) summary::after { transform: rotate(-90deg); }
.filter-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: .35rem .65rem; padding: .75rem .9rem; max-height: 160px; overflow: auto; }
.filter-options label { display: flex; align-items: center; gap: .45rem; font-size: .9rem; padding: .2rem .25rem; border-radius: .4rem; }
.filter-options label:hover { background: var(--surface); }
.company-actions { display: flex; gap: .35rem; white-space: nowrap; }
.company-actions .btn { min-height: 34px; padding: .32rem .55rem; font-size: .82rem; }
.company-dialog { width: min(680px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; border: 0; padding: 0; border-radius: var(--r-lg); box-shadow: 0 24px 80px rgba(26, 24, 20, .26); color: var(--ink); background: var(--surface); }
.company-dialog::backdrop { background: rgba(35, 32, 26, .5); backdrop-filter: blur(2px); }
.company-dialog form { padding: 1.2rem; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; margin: -.1rem 0 1.1rem; }
.dialog-head h2 { margin: 0; }
.eyebrow { margin: 0 0 .15rem; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--muted); }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 2rem; line-height: 1; cursor: pointer; min-width: var(--tap); min-height: var(--tap); }
.dialog-actions { display: flex; align-items: center; gap: .6rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* --------------------------------------------------------------- Marken */

.badge {
  display: inline-block; padding: .16rem .55rem; border-radius: 999px;
  font-size: .76rem; font-weight: 650; letter-spacing: .01em;
  background: var(--neutral-soft); color: var(--ink-soft);
  white-space: nowrap;
}
.badge.ok      { background: var(--ok-soft); color: var(--ok); }
.badge.info    { background: var(--info-soft); color: var(--info); }
.badge.warn    { background: var(--warn-soft); color: var(--warn); }
.badge.danger  { background: var(--danger-soft); color: var(--danger); }

.stars { letter-spacing: .06em; color: var(--warn); white-space: nowrap; }
.stars .off { color: var(--line-strong); }
.star-btn {
  border: 0; background: none; cursor: pointer; font-size: 1.5rem;
  color: var(--line-strong); padding: 0 .08rem; line-height: 1;
  min-height: var(--tap); min-width: 2rem;
}
.star-btn.on { color: var(--warn); }

.notice {
  border-radius: var(--r-md); padding: .75rem .95rem; margin-bottom: 1rem;
  border: 1px solid var(--line-strong); background: var(--surface-2);
  border-left-width: 4px;
}
.notice.ok     { background: var(--ok-soft); border-color: #bcd9c7; border-left-color: var(--ok); }
.notice.warn   { background: var(--warn-soft); border-color: #e2cfa6; border-left-color: var(--warn); }
.notice.error  { background: var(--danger-soft); border-color: #e2bcae; border-left-color: var(--danger); }

.empty { padding: 2.4rem 1rem; text-align: center; color: var(--muted); }

details > summary {
  cursor: pointer; min-height: var(--tap); display: flex; align-items: center;
  padding: .3rem 0;
}
details > summary::marker { color: var(--muted); }

/* ------------------------------------------------------------ Codeblatt */

/*  Etiketten mit Name, Klasse, Code und QR.
 *
 *  ⚠️ Der Kasten ist die Schnittkante. Was hier hinausläuft, läuft auf dem
 *  Papier über den Rand des Etiketts – und die Adresse
 *  `praktikum.lehrerland.de/rsbs` ist ein Wort ohne Trennstelle, das genau das
 *  tut. Drei Dinge halten sie drin:
 *
 *    1. `minmax(0, 1fr)` in der Spalte – ohne die 0 als Untergrenze wächst ein
 *       Rasterfeld über seinen Anteil hinaus, sobald der Inhalt breiter ist.
 *    2. `min-width: 0` am Textblock, aus demselben Grund.
 *    3. `overflow-wrap: anywhere` – erlaubt den Umbruch mitten im Wort.
 */
.codesheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: .75rem;
}
.codecard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: .8rem;
  background: var(--surface);
  min-width: 0;
}
.codecard__qr { flex: 0 0 auto; line-height: 0; }
.codecard__qr svg {
  display: block;
  width: 82px; height: 82px;
  border-radius: 4px;
}
.codecard__text { min-width: 0; }
.codecard__name {
  font-weight: 650; line-height: 1.25;
  overflow-wrap: anywhere; hyphens: auto;
}
.codecard__class { font-size: .78rem; color: var(--muted); }
.codecard__code {
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 1.02rem; font-weight: 700; letter-spacing: .07em;
  margin: .2rem 0 .1rem;
  overflow-wrap: anywhere;
}
.codecard__url {
  font-size: .7rem; color: var(--muted); line-height: 1.3;
  overflow-wrap: anywhere;
}
.codecard .btn.link { font-size: .74rem; margin-top: .15rem; }

.codesheet__head { margin-bottom: .8rem; }
.codesheet__head h2 { margin-bottom: .1em; }

/* --------------------------------------------------------------- Route */

.route-list { list-style: none; margin: 0; padding: 0; counter-reset: stop; }
.route-list li {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .6rem 0; border-bottom: 1px solid var(--line);
}
.route-list li:last-child { border-bottom: 0; }
.route-list li::before {
  counter-increment: stop; content: counter(stop);
  flex: 0 0 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 700; font-size: .8rem;
}

/* ---------------------------------------------------------------- Druck */

@media print {
  :root { --gap: 0; }
  body {
    background: #fff; background-image: none;
    font-size: 10.5pt;
  }
  .topbar, .sidenav, .no-print, .btn, details, .notice,
  .hero__bild, .card__bild { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .card { box-shadow: none; border: 0; margin: 0; }
  .card__head { background: none; border-bottom: 1px solid #999; }

  @page { margin: 10mm; }

  /* Drei Etiketten je Reihe, feste Größe – so passen sie auf Bogenware und
     lassen sich mit der Schere trennen, ohne dass etwas abgeschnitten wird. */
  .codesheet {
    grid-template-columns: repeat(3, 1fr);
    gap: 4mm;
  }
  .codecard {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #999;
    border-radius: 2mm;
    padding: 3mm;
    min-height: 26mm;
  }
  .codecard__qr svg { width: 20mm; height: 20mm; }
  .codecard__code { font-size: 11pt; }
  .codecard__url { font-size: 6.5pt; }
  .codesheet__head { break-after: avoid; }
  a { text-decoration: none; color: #000; }
}

/* Filterzeile der Platzliste: steht unter der Kopfzeile, klebt aber nicht mit. */
.filter-row th {
  position: static; text-transform: none; letter-spacing: 0; font-weight: 400;
  padding: .35rem .4rem .5rem; background: var(--surface-2);
}
.filter-row input, .filter-row select {
  width: 100%; min-width: 5.5rem; min-height: 34px; padding: .25rem .45rem; font-size: 14px;
}
.filter-row .filter-aktiv { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-tint); }

/* Standortvorschläge bleiben im Dokumentfluss und sind auch per Tastatur erreichbar. */
.company-suggestions { border: 1px solid var(--line, #d6dee8); border-radius: .5rem; max-height: 20rem; overflow-y: auto; }
.company-suggestion { display: flex; flex-direction: column; gap: .2rem; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line, #d6dee8); padding: .75rem; background: var(--surface); color: inherit; cursor: pointer; font: inherit; overflow-wrap: anywhere; }
.company-suggestion:last-child { border-bottom: 0; }
.company-suggestion:hover, .company-suggestion:focus-visible { background: #edf3fa; outline: 2px solid var(--brand); outline-offset: -2px; }

/* Filter und Seitennavigation im Betriebsverzeichnis: eine Suchzeile,
   Spaltenfilter im Tabellenkopf, aktive Filter als Chips. */
.company-toolbar { display: flex; gap: .75rem; align-items: stretch; flex-wrap: wrap; }
.company-search { position: relative; flex: 1 1 320px; min-width: 0; }
.company-search__icon {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-52%);
  font-size: 1.25rem; color: var(--muted); pointer-events: none;
}
.company-search input { width: 100%; padding-left: 2.4rem; }
.company-sort { display: flex; align-items: center; gap: .5rem; flex: 0 1 auto; }
.company-sort span { font-size: .85rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.company-sort select { min-width: 12rem; }
.company-chips { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: .8rem; min-height: 1.9rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .55rem .3rem .75rem; border-radius: 999px;
  border: 1px solid var(--brand); background: var(--brand-tint); color: var(--brand-ink);
  font: inherit; font-size: .84rem; cursor: pointer;
}
.chip strong { font-weight: 700; }
.chip span { font-size: .75rem; opacity: .7; }
.chip:hover span, .chip:focus-visible span { opacity: 1; }
.company-result-head, .company-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; }
.company-pagination { justify-content: center; }
@media (max-width: 540px) {
  .company-sort { flex-basis: 100%; }
  .company-sort select { flex: 1; min-width: 0; }
}

.company-column-filters th { position: static; padding: .35rem .4rem .55rem; text-transform: none; letter-spacing: normal; font-weight: 400; }
.company-column-filters select { width: 100%; min-width: 7.5rem; min-height: 36px; font-size: .82rem; padding: .3rem .45rem; }
.company-column-filters .filter-aktiv, .filter-row .filter-aktiv {
  border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background-color: var(--brand-tint); color: var(--brand-ink);
}
.company-column-filters th:nth-child(-n+2) select { min-width: 10rem; }
