/* AUMEAS Apotheke — Gestaltung (System wie VHS/Wirtschaftsrat, Akzent Anthrazit wie in FileMaker)
   Schriftgrade: 11 / 12 / 13 / 14 / 22 px     Abstände: 4 / 8 / 12 / 16 / 24 / 40 px */

:root {
  --akzent: #262626;   /* Anthrazit wie die FileMaker-Leiste */
  --text: #111827;
  --grau: #4b5563;
  --linie: #c9d0da;
  --rand: #aeb7c4;
  --flaeche: #e9edf2;
  --rot: #d43f3f;
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0; background: var(--flaeche); color: var(--text);
  font: 14px/1.45 var(--schrift);
}
.aum-seite { max-width: 1180px; margin: 0 auto; padding: 0 24px 64px; }
a { color: var(--akzent); }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px; border: 1px solid #9aa5b4; border-radius: 8px;
  background: #fff; color: #1f2937; font: 500 14px/1.2 var(--schrift);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn:hover { background: #eef2f7; }
.btn:active { transform: translateY(1px); }
.btn-primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.btn-primaer:hover { background: #4a4a4a; }
.btn-klein { padding: 2px 9px; font-size: 13px; }
.btn-gefahr-rand { border-color: #d36b6b; color: #b42323; }
.btn-gefahr-rand:hover { background: #fdf2f2; }
/* Löschen in Listen: weißes Kreuz auf rotem Grund */
.btn-x {
  width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px;
  background: var(--rot); color: #fff; font: 600 13px/1 var(--schrift); cursor: pointer;
}
.btn-x:hover { background: #b83030; }

/* ---------- Aktionsleiste ---------- */
.aum-leiste {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  margin: 0 -24px; padding: 12px 24px;
  background: var(--flaeche); border-bottom: 1px solid #c3cad5;
}
.aum-kopf { flex: 1 1 auto; min-width: 0; margin-left: 4px; }
.aum-ueberzeile {
  display: block; font-size: 11px; line-height: 1.2; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--grau); margin-bottom: 4px;
}
.aum-titel {
  display: block; font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em;
  color: var(--akzent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aum-abmelden { margin: 0; }
.aum-hinweis { margin: 12px 0 0; font-size: 13px; color: var(--grau); }

.aum-savestate {
  font-size: 12px; font-weight: 500; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
}
.aum-savestate:empty { display: none; }
.aum-savestate.is-saving { color: #4b5563; background: #dfe5ed; }
.aum-savestate.is-saved  { color: #17693a; background: #dcf2e4; }
.aum-savestate.is-dirty  { color: #8a5a00; background: #fdf1d6; }
.aum-savestate.is-error  { color: #a12626; background: #fde4e4; }

/* ---------- Abschnitte ---------- */
.aum-abschnitt, .aum-portalkopf h2 {
  font-size: 13px; line-height: 1.3; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--akzent); margin: 0;
}
.aum-abschnitt { margin: 40px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--akzent); }
.aum-portalkopf {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin: 40px 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--akzent);
}
.aum-portalkopf h2 { flex: 1 1 12rem; }
.aum-portalkopf .btn { margin-left: auto; }

/* ---------- Felder ---------- */
.aum-feld {
  width: 100%; padding: 6px 10px; border: 1px solid var(--rand); border-radius: 8px;
  background: #fff; color: var(--text); font: 14px/1.4 var(--schrift);
}
.aum-feld:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px rgba(38,38,38,0.18); }
.aum-feld:required { border-left: 3px solid #5b7096; }
.aum-feld[readonly] { background: #f3f5f8; color: var(--grau); }
textarea.aum-feld { resize: vertical; line-height: 1.55; }
.aum-feld.aum-ok { border-color: #15803d; box-shadow: 0 0 0 3px rgba(21,128,61,0.18); }
.aum-feld.aum-fehler { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }
.aum-fett { font-weight: 600; }
.aum-blau { color: var(--akzent); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--akzent); }

.aum-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
/* Beschriftung + Feld: feste Beschriftungsspalte = gemeinsame Fluchtlinie */
.aum-zeile { display: grid; grid-template-columns: 9rem minmax(0, 1fr); align-items: start; gap: 0 8px; margin-bottom: 8px; }
.aum-zeile > span:first-child { padding-top: 8px; font-size: 13px; line-height: 1.3; font-weight: 600; color: #1f2937; hyphens: auto; }
.aum-zeile-breit { margin-top: 0; }
.aum-haken { align-items: center; }
.aum-haken > span:first-child { padding-top: 0; }
.aum-haken input { justify-self: start; }
.aum-plzort { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 8px; }
.aum-oben { display: block; margin-top: 8px; }
.aum-oben > span {
  display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: #374151;
}
.aum-fehlerliste {
  margin: 16px 0 0; padding: 10px 14px; border: 1px solid #e8a3a3; border-radius: 8px;
  background: #fdeeee; color: #8f1d1d; font-size: 13px;
}

/* ---------- Tabellen ---------- */
.aum-tabellenrahmen { overflow-x: auto; }
.aum-tabelle {
  width: 100%; border-collapse: separate; border-spacing: 0; background: #fff;
  border: 1px solid #d3d9e1; border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(16,24,40,0.12);
}
.aum-tabelle th {
  padding: 10px 12px; background: #ece7e6; color: #1f2937; text-align: left; vertical-align: bottom;
  font-size: 12px; line-height: 1.3; font-weight: 600; border-bottom: 1px solid #cfc5c3;
}
.aum-tabelle th a { color: inherit; text-decoration: none; }
.aum-tabelle th a:hover { text-decoration: underline; text-underline-offset: 3px; }
.aum-tabelle td { padding: 6px 12px; vertical-align: middle; border-top: 1px solid #e3e7ed; }
.aum-tabelle tbody tr:first-child td { border-top: 0; }
.aum-tabelle .aum-schmal { width: 1%; white-space: nowrap; text-align: center; }
.aum-tabelle .aum-mitte { text-align: center; }
.aum-tabelle form { margin: 0; }
.aum-leerzeile td { text-align: center; color: #6b7280; font-style: italic; padding: 14px; }
.aum-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: #374151; overflow-wrap: anywhere; }

.aum-uebersicht th.aum-mitte { width: 1%; padding-left: 6px; padding-right: 6px; hyphens: manual; }
.aum-uebersicht td.aum-mitte { padding-left: 6px; padding-right: 6px; }
.aum-uebersicht tbody tr[data-href] { cursor: pointer; }
.aum-uebersicht tbody tr[data-href]:hover { background: #eef2f8; }

/* ---------- Kombifeld: freier Text + Vorschläge ---------- */
.aum-combo { position: relative; }
.aum-combo > input { padding-right: 32px; }
.aum-combo-btn {
  position: absolute; top: 1px; right: 1px; bottom: 1px; width: 28px; padding: 0;
  border: 0; border-left: 1px solid #d3d9e1; border-radius: 0 7px 7px 0;
  background: #f4f6f9; color: #1f2937; font-size: 12px; cursor: pointer;
}
.aum-combo-btn:hover { background: #e3e9f1; }
.aum-combo-liste {
  position: fixed; z-index: 50; max-height: 260px; overflow: auto; margin: 0; padding: 4px 0;
  list-style: none; background: #fff; border: 1px solid var(--rand); border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16,24,40,0.16);
}
.aum-combo-liste li { padding: 7px 12px; cursor: pointer; overflow-wrap: anywhere; }   /* lange Einträge umbrechen */
.aum-combo-liste li:hover, .aum-combo-liste li.ist-aktiv { background: #e6edf7; }
.aum-combo-liste li.ist-aktuell { font-weight: 600; }
.aum-combo-liste li.aum-combo-leer { color: var(--grau); font-style: italic; cursor: default; white-space: normal; max-width: 22rem; }

/* ---------- Löschen klar abgesetzt ---------- */
.aum-gefahr {
  display: flex; align-items: center; gap: 16px; margin-top: 40px; padding-top: 16px;
  border-top: 1px solid var(--linie); font-size: 13px; color: var(--grau);
}

/* ---------- Übersicht ---------- */
.aum-legende { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 16px 0; font-size: 13px; color: #374151; }
.aum-suche { display: flex; gap: 8px; margin-bottom: 16px; }
.aum-leerseite { margin: 64px 0; text-align: center; font-size: 15px; color: var(--grau); }

/* ---------- Meldungen ---------- */
.aum-meldungen { position: fixed; top: 12px; right: 12px; z-index: 60; display: grid; gap: 8px; max-width: 26rem; }
.aum-meldung { padding: 10px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--linie); box-shadow: 0 6px 16px rgba(16,24,40,0.14); font-size: 13px; }
.aum-meldung-success { border-color: #9fd3b1; background: #e9f7ee; color: #17693a; }
.aum-meldung-error { border-color: #e8a3a3; background: #fdeeee; color: #8f1d1d; }

/* ---------- Anmeldung ---------- */
.aum-anmeldeseite { background: var(--akzent); }
.aum-anmeldung {
  max-width: 24rem; margin: 12vh auto 0; padding: 32px; border-radius: 12px; background: #fff;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.aum-anmeldung h1 { margin: 0 0 16px; font-size: 22px; font-weight: 600; color: var(--akzent); }
.aum-anmeldung .btn { width: 100%; margin-top: 24px; padding: 9px 12px; }
.aum-anmeldung .aum-fehlerliste { margin: 0 0 8px; }

/* ---------- Schmale Fenster ---------- */
@media (max-width: 860px) {
  /* Übersicht: weniger Polster, damit alle Spalten Platz haben */
  .aum-uebersicht th, .aum-uebersicht td { padding-left: 6px; padding-right: 6px; }
  .aum-uebersicht th.aum-mitte, .aum-uebersicht td.aum-mitte { padding-left: 2px; padding-right: 2px; }
  .aum-uebersicht .btn-klein { padding: 2px 7px; }
}
@media (max-width: 760px) {
  .aum-spalten { grid-template-columns: minmax(0, 1fr); }
  .aum-titel { font-size: 18px; }
}
@media (max-width: 520px) {
  .aum-seite { padding: 0 12px 48px; }
  .aum-leiste { margin: 0 -12px; padding: 8px 12px; flex-wrap: wrap; }
  .aum-zeile { grid-template-columns: 1fr; }
  .aum-zeile > span:first-child { padding-top: 0; }
}

/* ---------- Liste ---------- */
.aum-werkzeuge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.aum-werkzeuge .aum-feld[type="search"] { flex: 1 1 18rem; width: auto; }
.aum-werkzeuge select.aum-feld { flex: 0 0 auto; width: auto; min-width: 11rem; }
.aum-zaehler { margin: -4px 0 12px; font-size: 13px; color: var(--grau); }
.aum-liste tbody tr[data-href] { cursor: pointer; }
.aum-liste tbody tr[data-href]:hover { background: #fbf1f1; }
.aum-liste td { padding-top: 8px; padding-bottom: 8px; }
.aum-liste .aum-nr { white-space: nowrap; font-variant-numeric: tabular-nums; }
.aum-liste .aum-zeit { white-space: nowrap; font-variant-numeric: tabular-nums; color: #374151; }
.aum-marke {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; vertical-align: 1px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: #fff; background: var(--akzent);
}
.aum-haken-ok { color: #17693a; font-weight: 700; }
.aum-haken-offen { color: #b7bfcb; }

/* ---------- Detailansicht ---------- */
.aum-blaettern { display: inline-flex; align-items: center; gap: 4px; }
.aum-blaettern .aum-position { min-width: 5.5rem; text-align: center; font-size: 12px; color: var(--grau); font-variant-numeric: tabular-nums; }
.aum-blaettern .btn[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }
.aum-von-bis { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.aum-von-bis > span { font-size: 13px; color: var(--grau); }
.aum-kurz { max-width: 14rem; }
details.aum-erweitert {
  margin-top: 40px; border: 1px solid #c3cad5; border-radius: 10px; background: #f6f7fa; padding: 0 16px;
}
details.aum-erweitert > summary {
  cursor: pointer; padding: 12px 0; list-style-position: inside;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--akzent);
}
details.aum-erweitert[open] > summary { border-bottom: 1px solid #d3d9e1; margin-bottom: 16px; }
details.aum-erweitert > .aum-spalten { padding-bottom: 8px; }
.aum-stand { margin-top: 16px; font-size: 12px; color: var(--grau); }
@media (max-width: 760px) {
  .aum-blaettern .aum-position { display: none; }
}

/* ======================================================================
   AUMEAS: Kopf (Name, Reiter, Linie)
   ====================================================================== */
body { background: #f3f3f3; }
.aum-kopfbereich { margin: 0 -24px; padding: 16px 24px 0; background: #fff; }
.aum-markenzeile { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; }
.aum-name { font-size: 24px; line-height: 1.2; font-weight: 700; color: var(--akzent); text-decoration: none; letter-spacing: -0.01em; }
.aum-publikation { font-size: 12px; color: #4b5563; background: #ececec; padding: 3px 10px; border-radius: 4px; }
.aum-reiter {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; margin-top: 14px;
  border-bottom: 6px solid var(--akzent);
}
.aum-reiter > a {
  padding: 8px 18px; border: 1px solid #d5d0cf; border-bottom: 0; border-radius: 8px 8px 0 0;
  background: #f2f2f2; color: #262626; font-weight: 600; text-decoration: none;
}
.aum-reiter > a:hover { background: #e6e6e6; }
.aum-reiter > a[aria-current="page"] { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.aum-reiter-rest { margin-left: auto; display: flex; align-items: center; gap: 4px; padding-bottom: 6px; }
.aum-nebenlink {
  border: 0; background: none; padding: 4px 8px; color: #4b5563; font: 500 13px/1.2 var(--schrift);
  text-decoration: none; cursor: pointer; border-radius: 6px;
}
.aum-nebenlink:hover { background: #ececec; color: var(--akzent); }
.aum-abmelden { margin: 0; }

/* Aktionsleiste unter dem Kopf */
.aum-leiste { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  margin: 0 -24px; padding: 12px 24px; background: #f3f3f3; border-bottom: 1px solid #dadada; }
.aum-ueberzeile { color: #6b7280; }
.btn-pfeil { color: #2f8f2f; font-size: 15px; }

/* Liste */
.aum-rechts { margin-left: auto; }
.aum-zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aum-tabelle th.aum-zahl a { display: block; }
.aum-neu, .aum-neu input { color: var(--akzent); font-weight: 600; }
.aum-grau { color: #6b7280; }
.aum-klein { font-size: 12px; }
.aum-beschreibung { color: #374151; font-size: 13px; max-width: 22rem; }
.aum-mini { display: block; width: 40px; height: 40px; object-fit: contain; border-radius: 4px; background: #fff; }
.aum-zeilenlink { color: inherit; text-decoration: none; }
.aum-zeilenlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.aum-liste td[data-autosave] input { cursor: pointer; }

/* Artikelansicht: Bild links, Felder rechts */
.aum-artikelansicht { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; margin-top: 24px; }
.aum-bildspalte { display: grid; gap: 8px; align-content: start; }
.aum-bildrahmen {
  display: grid; place-items: center; aspect-ratio: 1; padding: 8px; background: #fff;
  border: 1px solid #ddd5d4; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.aum-bildrahmen img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.aum-bildleer { color: #9ca3af; font-size: 13px; }
.aum-bildaktionen { margin: 0; }
.aum-bildaktionen .btn { width: 100%; }
.aum-zeile-gross .aum-feld { font-size: 18px; font-weight: 700; }
.aum-menge { display: grid; grid-template-columns: 7rem 5rem minmax(0, 1fr); gap: 8px; align-items: center; }
.aum-bildname { display: grid; grid-template-columns: minmax(0, 1fr) 9rem; gap: 8px; }
.aum-preise { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.aum-euro { display: grid; grid-template-columns: minmax(0, 9rem) auto; gap: 6px; align-items: center; }
.aum-euro i { font-style: normal; color: #4b5563; }
.aum-berechnet {
  display: block; min-height: 34px; padding: 6px 10px; border: 1px dashed #d1c7c6; border-radius: 8px;
  background: #faf7f7; color: #374151; font-variant-numeric: tabular-nums;
}
.aum-gelb { background: #fff4b8; border-color: #e7cf4a; font-weight: 700; }
/* Handzettel-Haken ganz oben in der Artikelansicht, gut sichtbar */
.aum-handzettel {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 14px;
  border: 1px solid #e3c9c9; border-radius: 10px; background: #fbf1f1; cursor: pointer;
  font-size: 15px; font-weight: 700; color: var(--akzent);
}
.aum-handzettel input { width: 20px; height: 20px; flex: none; }
.aum-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.aum-zeile-oben { grid-template-columns: 1fr; }
.aum-zeile-oben > span:first-child { padding-top: 0; }


/* Anmeldung */
.aum-anmeldeseite { background: var(--akzent); }

@media (max-width: 760px) {
  .aum-artikelansicht { grid-template-columns: 1fr; }
  .aum-bildspalte { grid-template-columns: 140px 1fr; }
  .aum-preise { grid-template-columns: 1fr; }
  .aum-reiter-rest { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .aum-kopfbereich { margin: 0 -12px; padding: 12px 12px 0; }
  .aum-name { font-size: 20px; }
  .aum-menge { grid-template-columns: 1fr 5rem; }
  .aum-menge .aum-berechnet { grid-column: 1 / -1; }
}

/* Benutzerverwaltung */
.aum-angemeldet { font-size: 12px; color: #6b7280; padding: 4px 6px; }
.aum-ohne-abstand { margin: 0; }
.aum-formularbereich { display: grid; gap: 24px; max-width: 46rem; margin-top: 24px; }
.aum-karte { padding: 8px 20px 20px; background: #fff; border: 1px solid #ddd5d4; border-radius: 10px; }
.aum-abschnitt.aum-erster { margin-top: 16px; }
.aum-hilfe, .aum-haken-text small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: #6b7280; }
.aum-hilfe ul { margin: 4px 0 0; padding-left: 18px; }
.aum-haken-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.aum-feldfehler { margin: -4px 0 8px 9.5rem; font-size: 13px; color: #b42323; }
.aum-knopfzeile { display: flex; gap: 8px; margin-top: 16px; padding-left: 9.5rem; }
.aum-rolle { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #eef0f3; color: #374151; }
.aum-rolle-admin { background: #fbe9e9; color: var(--akzent); font-weight: 600; }
.aum-gesperrt td { color: #9ca3af; }
@media (max-width: 520px) {
  .aum-feldfehler, .aum-knopfzeile { margin-left: 0; padding-left: 0; }
}

