/* ========================================================================== 
   SpVgg Diepersdorf – Hallenverkauf
   --------------------------------------------------------------------------
   Aufbau dieser Datei:
   1. Design-Tokens / Grundwerte
   2. Globale Basiselemente
   3. Kopfzeile
   4. Hauptlayout
   5. Preislisten-Kopf und Werkzeuge
   6. Kategorien und Artikel
   7. Warenkorb
   8. Meldungen / Hilfsklassen
   9. Responsive Breakpoints
   ========================================================================== */

/* Lokal gespeicherte Schreibschrift für die Kategorieüberschriften.
   Playball unter SIL Open Font License 1.1 – siehe assets/fonts/OFL-Playball.txt.
   Die Datei wird von der Verkaufsapp selbst ausgeliefert; keine Cloud nötig. */
@font-face {
  font-family: "Diepersdorf Kategorie";
  src: url("./fonts/playball-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   1. DESIGN-TOKENS
   Zentrale Werte, die bei einem späteren Redesign nur hier geändert werden
   müssen.
   -------------------------------------------------------------------------- */
:root {
  --bg: #070a08;
  --bg-deep: #040605;

  --surface: rgba(10, 15, 12, 0.82);
  --surface-strong: rgba(11, 17, 13, 0.96);
  --surface-soft: rgba(230, 240, 234, 0.035);

  --sage: #a9c5b8;
  --sage-bright: #c7d9d1;
  --sage-dim: #7f9d90;

  --line: rgba(180, 209, 196, 0.62);
  --line-soft: rgba(180, 209, 196, 0.18);

  --text: #f3f5f2;
  --muted: #9ca9a1;

  --danger: #d6a7a4;
  --danger-bg: rgba(128, 48, 44, 0.13);

  /* Sonderfarben für die Eintritts-Schnellaktionen. */
  --ticket-blue: #6fa8ff;
  --ticket-pink: #ef79bf;
  --ticket-green: #74c98a;
  --ticket-green-deep: #2d7e49;

  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);

  /* Drei Kategorien sollen auf einem normalen PC nebeneinander passen. */
  --category-gap: 20px;

  --serif: Didot, "Bodoni MT", "Times New Roman", Georgia, serif;
  --script: "Diepersdorf Kategorie", cursive;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  font-family: var(--sans);
}

/* --------------------------------------------------------------------------
   2. GLOBALE BASIS
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18% 4%, rgba(95, 135, 117, 0.13), transparent 34rem),
    radial-gradient(circle at 82% 86%, rgba(72, 106, 89, 0.10), transparent 40rem),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.010) 0,
      rgba(255, 255, 255, 0.010) 2px,
      transparent 2px,
      transparent 7px
    ),
    linear-gradient(
      96deg,
      rgba(255, 255, 255, 0.008),
      transparent 24%,
      rgba(255, 255, 255, 0.006) 55%,
      transparent 80%
    );
}

/* Leichte Vignette und Struktur, ohne die Lesbarkeit zu beeinträchtigen. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent 0 13%,
      rgba(176, 205, 192, 0.022) 13.2%,
      transparent 13.5% 48%,
      rgba(176, 205, 192, 0.018) 48.2%,
      transparent 48.6%
    ),
    radial-gradient(ellipse at center, transparent 34%, rgba(0, 0, 0, 0.32) 100%);
  mix-blend-mode: screen;
  opacity: 0.75;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
label:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--sage-bright);
  outline-offset: 3px;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   3. TECHNISCHE KOPFZEILE
   -------------------------------------------------------------------------- */
.utility-bar {
  position: sticky;
  top: 0;
  z-index: 40;

  min-height: 66px;
  padding: 11px 22px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  border-bottom: 1px solid var(--line-soft);
  background: rgba(5, 8, 6, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.19);
}

.utility-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.utility-kicker {
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.65rem;
  font-weight: 800;
}

.utility-brand strong {
  font-size: 0.94rem;
  letter-spacing: 0.01em;
}

.utility-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.status {
  padding: 8px 11px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(169, 197, 184, 0.08);
}

.status.error .status-dot {
  background: #d48781;
  box-shadow: 0 0 0 4px rgba(212, 135, 129, 0.09);
}

/* Allgemeine Buttons der technischen Oberfläche. */
.button {
  min-height: 38px;
  padding: 0 13px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  border: 1px solid var(--line-soft);
  border-radius: 3px;

  cursor: pointer;
  font-weight: 750;
  font-size: 0.78rem;
  letter-spacing: 0.015em;

  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    transform 0.14s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(199, 217, 209, 0.48);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.button-secondary {
  background: rgba(169, 197, 184, 0.08);
}

.button-secondary:hover {
  background: rgba(169, 197, 184, 0.13);
}

.button-ghost {
  background: transparent;
  color: #a7b3ad;
}

.file-button {
  cursor: pointer;
}

/* Optischer Trenner zwischen Preislistenpflege und Verkaufsprotokoll. */
.utility-separator {
  margin: 0 3px;
  color: rgba(169, 197, 184, 0.40);
  font-size: 1.05rem;
  line-height: 1;
  user-select: none;
}

.button-protocol {
  border-color: rgba(169, 197, 184, 0.30);
  background: rgba(169, 197, 184, 0.075);
  color: var(--sage-bright);
}

.button-protocol:hover:not(:disabled) {
  border-color: rgba(199, 217, 209, 0.58);
  background: rgba(169, 197, 184, 0.13);
}

/*
  Vollbild bleibt bewusst in derselben zurückhaltenden Designsprache wie
  Verkaufsprotokoll und technische Kopfzeile. Im aktiven Zustand erhält
  der Button nur eine etwas deutlichere grüne Fläche.
*/
.button-fullscreen {
  border-color: rgba(169, 197, 184, 0.24);
  background: rgba(255, 255, 255, 0.025);
  color: #b9c7c0;
}

.button-fullscreen:hover:not(:disabled) {
  border-color: rgba(199, 217, 209, 0.54);
  background: rgba(169, 197, 184, 0.095);
  color: var(--sage-bright);
}

.button-fullscreen[aria-pressed="true"] {
  border-color: rgba(116, 201, 138, 0.44);
  background: rgba(45, 126, 73, 0.20);
  color: #c6e5ce;
}

/* Im echten Vollbild füllt die App zuverlässig die gesamte Arbeitsfläche. */
:fullscreen {
  background: var(--bg);
}

:fullscreen body,
:fullscreen .app-shell {
  min-height: 100vh;
}

.button-danger {
  border-color: rgba(214, 167, 164, 0.24);
  background: var(--danger-bg);
  color: #e2bfbc;
}

.button-danger:hover {
  background: rgba(128, 48, 44, 0.20);
  border-color: rgba(214, 167, 164, 0.38);
}

.button-full {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

/* --------------------------------------------------------------------------
   4. HAUPTLAYOUT
   Katalog nimmt den verfügbaren Platz ein, Warenkorb bleibt rechts 390 px.
   -------------------------------------------------------------------------- */
.layout {
  width: 100%;
  min-height: calc(100vh - 66px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
}

.catalog {
  min-width: 0;
  padding: 48px clamp(24px, 4.2vw, 72px) 70px;
}

/* --------------------------------------------------------------------------
   5. PREISLISTEN-KOPF UND WERKZEUGE
   -------------------------------------------------------------------------- */
.price-list-heading {
  max-width: 900px;
  margin: 0 auto 34px;
  text-align: center;
}

.price-list-kicker {
  margin: 0 0 5px;
  color: var(--sage-dim);
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.price-list-heading h1 {
  margin: 0;
  color: #edf2ee;
  font-family: var(--serif);
  font-size: clamp(3.35rem, 7vw, 6.3rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.055em;
  text-shadow: 0 0 34px rgba(169, 197, 184, 0.07);
}

.support-line {
  max-width: 660px;
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: minmax(35px, 1fr) auto minmax(35px, 1fr);
  align-items: center;
  gap: 15px;
  color: #d8ded9;
}

.support-line span {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sage));
}

.support-line span:last-child {
  background: linear-gradient(90deg, var(--sage), transparent);
}

.support-line strong {
  font-size: clamp(0.66rem, 1.25vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 0.31em;
  white-space: nowrap;
}

.catalog-tools {
  width: 100%;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-nav {
  min-width: 0;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px;
  scrollbar-width: thin;
}

.category-chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;

  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.015);

  color: #bac5bf;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-chip:hover {
  color: var(--text);
  border-color: rgba(199, 217, 209, 0.42);
  background: rgba(169, 197, 184, 0.06);
}

/*
  Die drei Schnellaktionen liegen gemeinsam rechts neben der Kategorienavigation.
  Auf kleineren Bildschirmen dürfen sie umbrechen bzw. untereinander stehen.
*/
.quick-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 9px;
}

.quick-action-card {
  flex: 0 0 auto;
  min-width: 154px;
  min-height: 56px;
  padding: 8px 13px;

  display: flex;
  align-items: center;
  gap: 10px;

  border: 1px solid rgba(169, 197, 184, 0.42);
  border-radius: 4px;
  background: rgba(169, 197, 184, 0.055);

  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);

  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    transform 0.14s ease,
    box-shadow 0.14s ease;
}

/* Die Klasse setzt display:flex; daher muss [hidden] explizit Vorrang haben. */
.quick-action-card[hidden] {
  display: none !important;
}

.quick-action-card:hover:not(:disabled) {
  transform: translateY(-1px);
}

.quick-action-card:active:not(:disabled) {
  transform: translateY(0);
}

.quick-action-card:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.quick-action-icon {
  flex: 0 0 auto;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.quick-action-card strong,
.quick-action-card small {
  display: block;
}

.quick-action-card strong {
  font-size: 0.78rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.quick-action-card small {
  margin-top: 3px;
  font-size: 0.73rem;
  font-weight: 750;
}

/* Einzeleintritt: bewusst blau/pink als klarer visueller Sonderfall. */
.single-admission-card {
  border-color: rgba(111, 168, 255, 0.52);
  background:
    linear-gradient(135deg, rgba(64, 112, 220, 0.28), rgba(220, 77, 161, 0.22));
}

.single-admission-card .quick-action-icon {
  color: #c7dcff;
  background: rgba(36, 74, 160, 0.22);
}

.single-admission-card small {
  color: #f3b3da;
}

.single-admission-card:hover:not(:disabled) {
  border-color: rgba(239, 121, 191, 0.78);
  background:
    linear-gradient(135deg, rgba(64, 112, 220, 0.38), rgba(220, 77, 161, 0.32));
  box-shadow: 0 10px 28px rgba(86, 105, 207, 0.12);
}

/* Doppeleintritt: grüner Aktionsbutton. */
.double-admission-card {
  border-color: rgba(116, 201, 138, 0.54);
  background:
    linear-gradient(135deg, rgba(45, 126, 73, 0.30), rgba(87, 171, 105, 0.18));
}

.double-admission-card .quick-action-icon {
  color: #bce8c7;
  background: rgba(36, 104, 61, 0.23);
}

.double-admission-card small {
  color: #a9dfb7;
}

.double-admission-card:hover:not(:disabled) {
  border-color: rgba(116, 201, 138, 0.82);
  background:
    linear-gradient(135deg, rgba(45, 126, 73, 0.40), rgba(87, 171, 105, 0.26));
  box-shadow: 0 10px 28px rgba(58, 138, 81, 0.11);
}

/* Pfandrückgabe behält das gedeckte Salbeigrün der Preislisten-Optik. */
.deposit-return-card {
  border-color: rgba(169, 197, 184, 0.42);
  background: rgba(169, 197, 184, 0.055);
}

.deposit-return-card .quick-action-icon {
  color: var(--sage-bright);
}

.deposit-return-card small {
  color: var(--sage);
}

.deposit-return-card:hover:not(:disabled) {
  border-color: var(--sage);
  background: rgba(169, 197, 184, 0.10);
}

/* --------------------------------------------------------------------------
   6. KATEGORIEN UND ARTIKEL

   WICHTIG FÜR DIE RESPONSIVE DARSTELLUNG:
   - Desktop: Flex-Row mit maximal drei Kategorien pro Zeile.
   - Weitere Kategorien umbrechen automatisch in die nächste Flex-Row.
   - Unter 1200 px: Kategorien werden vollständig untereinander dargestellt.
   -------------------------------------------------------------------------- */
.category-sections {
  width: 100%;
  margin: 0 auto;

  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  gap: 48px var(--category-gap);
}

.category-section {
  /*
    Drei gleich breite Kategorien:
    100 % minus zwei Zwischenräume, geteilt durch drei.
  */
  flex: 0 1 calc((100% - (2 * var(--category-gap))) / 3);
  min-width: 0;
  scroll-margin-top: 92px;
}

.category-section-head {
  position: relative;
  z-index: 2;
  margin-bottom: -1px;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  pointer-events: none;
}

.category-section-head h3 {
  margin: 0;
  padding: 0 14px 4px;

  color: var(--sage);
  background: linear-gradient(180deg, transparent 0 64%, #080c0a 64%);

  font-family: var(--script);
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-align: center;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.48);
}

/* Artikelanzahl wird aktuell nicht angezeigt, bleibt aber im DOM verfügbar. */
.category-section-head span {
  display: none;
}

/*
  Innerhalb einer Kategorie bleibt die klassische Preislisten-Darstellung:
  ein Artikel pro Zeile. Die Kategorie selbst ist Teil der Flex-Row.
*/
.article-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 10px;
  background: rgba(5, 9, 7, 0.30);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.20),
    0 14px 45px rgba(0, 0, 0, 0.08);
}

.article-card {
  position: relative;
  width: 100%;
  min-height: 60px;
  padding: 9px 11px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;

  border: 0;
  border-bottom: 1px solid rgba(169, 197, 184, 0.08);
  border-radius: 0;
  background: transparent;

  cursor: pointer;
  overflow: hidden;
  text-align: left;

  transition:
    background 0.12s ease,
    padding 0.12s ease;
}

.article-card:last-child {
  border-bottom: 0;
}

.article-card:hover {
  padding-left: 14px;
  padding-right: 14px;
  background: rgba(169, 197, 184, 0.075);
}

.article-card:active {
  background: rgba(169, 197, 184, 0.12);
}

/* Pluszeichen erscheint beim Hover als zusätzliche visuelle Rückmeldung. */
.article-card::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);

  color: var(--sage-bright);
  font-size: 1.2rem;
  opacity: 0;

  transition:
    opacity 0.12s ease,
    right 0.12s ease;
}

.article-card:hover::after {
  right: 12px;
  opacity: 1;
}

.article-card-name {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;

  color: #f1f3f1;
  font-size: clamp(0.90rem, 1.15vw, 1.12rem);
  font-weight: 780;
  line-height: 1.15;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.article-card-price {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  padding-right: 2px;

  color: #f4f5f3;
  font-size: clamp(0.98rem, 1.2vw, 1.18rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;

  transition: padding-right 0.12s ease;
}

.article-card:hover .article-card-price {
  padding-right: 20px;
}

.article-meta {
  grid-column: 1;
  grid-row: 2;
  min-height: 14px;
  margin-top: 4px;

  color: #78877f;
  font-size: 0.64rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.deposit-badge {
  color: var(--sage-dim);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   7. WARENKORB
   -------------------------------------------------------------------------- */
.cart-panel {
  position: sticky;
  top: 66px;
  align-self: start;

  height: calc(100vh - 66px);
  min-height: 520px;

  display: flex;
  flex-direction: column;

  border-left: 1px solid var(--line-soft);
  background: rgba(5, 8, 6, 0.88);
  backdrop-filter: blur(20px);
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.16);
}

.cart-head {
  padding: 27px 26px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.cart-kicker {
  margin: 0 0 1px;
  color: var(--sage-dim);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cart-head h2 {
  margin: 0;
  color: #ecf0ed;
  font-family: var(--serif);
  font-size: 2.15rem;
  font-weight: 500;
  line-height: 1;
}

.cart-count {
  min-width: 42px;
  height: 42px;
  padding: 0 10px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line);
  border-radius: 50%;

  color: var(--sage-bright);
  font-weight: 800;
}

.cart-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px;
}

.empty-cart {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line-soft);
  border-radius: 50%;

  color: var(--sage);
  font-size: 1.4rem;
}

.empty-cart p {
  margin: 0 0 6px;
  color: #d9dfdb;
  font-weight: 750;
}

.empty-cart span {
  max-width: 250px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.cart-item {
  padding: 13px 8px 14px;
  border-bottom: 1px solid rgba(169, 197, 184, 0.11);
}

.cart-item:last-child {
  border-bottom: 0;
}

.return-item {
  color: var(--sage-bright);
}

.cart-item-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.cart-item-name {
  color: #edf1ee;
  font-size: 0.90rem;
  font-weight: 800;
  line-height: 1.25;
}

.cart-item-detail {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.35;
}

.cart-item-total {
  color: #f5f7f5;
  font-size: 0.90rem;
  font-weight: 800;
  white-space: nowrap;
}

/*
  Summe und Direkt-entfernen-Funktion bilden rechts eine kleine Spalte.
  Der Mülleimer sitzt bewusst direkt unter der Positionssumme und entfernt
  unabhängig von der Menge die komplette Position.
*/
.cart-item-total-block {
  min-width: 62px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.cart-item-remove {
  width: 25px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: rgba(214, 167, 164, 0.62);
  cursor: pointer;
  transition:
    color 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease;
}

.cart-item-remove svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.cart-item-remove:hover:not(:disabled) {
  color: #e3b5b1;
  border-color: rgba(214, 167, 164, 0.28);
  background: rgba(128, 48, 44, 0.14);
}

.cart-item-controls {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  overflow: hidden;
}

.qty-button {
  width: 38px;
  height: 34px;
  padding: 0;

  border: 0;
  background: rgba(169, 197, 184, 0.05);

  color: var(--sage-bright);
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
}

.qty-button:hover {
  background: rgba(169, 197, 184, 0.13);
}

.qty-number {
  min-width: 38px;
  text-align: center;
  font-size: 0.80rem;
  font-weight: 800;
}

.cart-item-badge,
.cart-item-deposit {
  color: var(--sage-dim);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Eintrittspositionen werden dezent passend zum jeweiligen Schnellbutton markiert. */
.admission-item-single .cart-item-name,
.admission-badge-single {
  color: #d7c7f4;
}

.admission-item-double .cart-item-name,
.admission-badge-double {
  color: #a9dfb7;
}

.cart-summary {
  flex: 0 0 auto;
  padding: 20px 26px 25px;
  border-top: 1px solid var(--line-soft);
  background: rgba(3, 6, 4, 0.46);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.summary-row + .summary-row {
  margin-top: 8px;
}

.summary-row.muted {
  color: var(--muted);
  font-size: 0.78rem;
}

.summary-row.muted strong {
  color: #cbd3ce;
}

.summary-divider {
  height: 1px;
  margin: 16px 0 13px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.total-row {
  color: #f0f4f1;
  font-family: var(--serif);
  font-size: 1.55rem;
}

.total-row strong {
  color: var(--sage-bright);
  font-size: 1.85rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Abschlussaktionen im Warenkorb: auf normalen Bildschirmen nebeneinander. */
.cart-actions {
  margin-top: 16px;
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.cart-action-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  line-height: 1.2;
}

.button-success {
  border-color: rgba(116, 201, 138, 0.46);
  background: linear-gradient(135deg, rgba(45, 126, 73, 0.30), rgba(87, 171, 105, 0.18));
  color: #c9ead2;
}

.button-success:hover:not(:disabled) {
  border-color: rgba(116, 201, 138, 0.78);
  background: linear-gradient(135deg, rgba(45, 126, 73, 0.42), rgba(87, 171, 105, 0.28));
}

/* Während des Speicherns werden Warenkorbänderungen absichtlich blockiert. */
.checkout-busy .article-card,
.checkout-busy .quick-action-card,
.checkout-busy .qty-button,
.checkout-busy .cart-item-remove {
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   8. VERKAUFSPROTOKOLL-MODAL
   -------------------------------------------------------------------------- */
body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.sales-log-modal {
  width: min(1080px, 100%);
  max-height: min(88vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(180, 209, 196, 0.54);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(95, 135, 117, 0.10), transparent 30rem),
    linear-gradient(180deg, rgba(10, 15, 12, 0.985), rgba(4, 7, 5, 0.985));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.62);
}

.sales-log-head {
  flex: 0 0 auto;
  padding: 26px 28px 21px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.012);
}

.sales-log-kicker {
  margin: 0 0 3px;
  color: var(--sage-dim);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

.sales-log-head h2 {
  margin: 0;
  color: #eef2ef;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 500;
  line-height: 0.98;
}

.sales-log-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.sales-log-head-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sales-log-date-control {
  min-width: 225px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sales-log-date-control > span {
  color: var(--sage-dim);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sales-log-date-control select {
  width: 100%;
  min-height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: #0a100c;
  color: #e5ebe7;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  color-scheme: dark;
}

.sales-log-date-control select:hover:not(:disabled) {
  border-color: rgba(199, 217, 209, 0.48);
  background: #0d1510;
}

.sales-log-date-control select:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.modal-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  color: var(--sage-bright);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.modal-close:hover {
  transform: rotate(4deg);
  border-color: rgba(199, 217, 209, 0.52);
  background: rgba(169, 197, 184, 0.09);
}

.sales-log-body {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px 30px;
}

.sales-log-state {
  min-height: 210px;
  display: grid;
  place-items: center;
  padding: 28px;
  border: 1px dashed var(--line-soft);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.sales-log-state.error {
  border-color: rgba(214, 167, 164, 0.30);
  color: #e2bfbc;
  background: rgba(128, 48, 44, 0.07);
}

.sales-log-content[hidden],
.sales-log-state[hidden] {
  display: none;
}

.sales-log-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 24px;
}

.protocol-kpi {
  min-width: 0;
  padding: 15px 16px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.protocol-kpi span,
.protocol-kpi strong {
  display: block;
}

.protocol-kpi span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.protocol-kpi strong {
  margin-top: 7px;
  color: #eff3f0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
  font-weight: 500;
  white-space: nowrap;
}

.protocol-kpi-total {
  border-color: rgba(169, 197, 184, 0.42);
  background: rgba(169, 197, 184, 0.07);
}

.protocol-kpi-total strong {
  color: var(--sage-bright);
}

.sales-log-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
  gap: 16px;
}

.protocol-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.012);
}

.protocol-section-articles {
  grid-row: span 2;
}

.protocol-section-head {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.protocol-section-head p {
  margin: 0 0 1px;
  color: var(--sage-dim);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.protocol-section-head h3 {
  margin: 0;
  color: var(--sage-bright);
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
}

.protocol-section-head > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.protocol-table-wrap {
  overflow-x: auto;
}

.protocol-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.protocol-table th,
.protocol-table td {
  padding: 10px 9px;
  border-bottom: 1px solid rgba(169, 197, 184, 0.09);
  text-align: left;
  vertical-align: middle;
}

.protocol-table th {
  color: #829189;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.protocol-table td:first-child {
  color: #edf1ee;
  font-weight: 750;
}

.protocol-table tbody tr:last-child td {
  border-bottom: 0;
}

.protocol-table .number-cell {
  text-align: right;
  white-space: nowrap;
}

.protocol-category-cell {
  color: var(--muted);
}

.protocol-money-cell {
  color: var(--sage-bright);
  font-weight: 750;
}

.protocol-empty {
  padding: 28px 12px 18px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.protocol-stat-list {
  border-top: 1px solid rgba(169, 197, 184, 0.09);
}

.protocol-stat-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(169, 197, 184, 0.09);
}

.protocol-stat-row:last-child {
  border-bottom: 0;
}

.protocol-stat-row span {
  color: #dfe5e1;
  font-size: 0.78rem;
  font-weight: 700;
}

.protocol-stat-row strong {
  color: var(--muted);
  font-size: 0.73rem;
  white-space: nowrap;
}

.protocol-stat-row em {
  min-width: 76px;
  color: #eef2ef;
  font-size: 0.80rem;
  font-style: normal;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.protocol-stat-total {
  margin-top: 5px;
}

.protocol-stat-total span,
.protocol-stat-total em {
  color: var(--sage-bright);
}

.admission-single-row span {
  color: #d7c7f4;
}

.admission-double-row span {
  color: #a9dfb7;
}

/* --------------------------------------------------------------------------
   9. MELDUNGEN UND HILFSKLASSEN
   -------------------------------------------------------------------------- */
.catalog-message {
  width: 100%;
  margin: 0 auto 24px;
  padding: 18px;

  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);

  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.catalog-message[hidden] {
  display: none;
}

.toast-region {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
}

.toast {
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 16px;

  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(9, 14, 11, 0.96);
  box-shadow: var(--shadow);

  color: #edf2ee;
  font-size: 0.80rem;
  font-weight: 700;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */

/*
  Unter 1200 px ist der Bereich für drei Kategorien neben dem Warenkorb zu
  schmal. Deshalb werden die Kategorien bewusst vollständig untereinander
  angeordnet statt in eine unruhige 2+1-Verteilung zu wechseln.
*/
@media (max-width: 1199px) {
  .catalog-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .quick-action-card {
    flex: 1 1 0;
    min-width: 0;
  }

  .category-sections {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 42px;
  }

  .category-section {
    flex: 0 0 auto;
    width: 100%;
  }

  .category-section-head h3 {
    font-size: clamp(2rem, 4vw, 2.8rem);
  }

  .article-card-name {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
  }

  .article-card-price {
    font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  }
}

/*
  Auf Tablets / kleinen Notebooks wandert der Warenkorb unter den Katalog.
  So bleibt die Artikelauswahl groß genug für Touch- und Mausbedienung.
*/
@media (max-width: 920px) {
  .utility-bar {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }

  .utility-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .layout {
    display: block;
  }

  .catalog {
    padding: 38px 24px 54px;
  }

  .cart-panel {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .cart-items {
    max-height: 480px;
  }

  .sales-log-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-log-grid {
    grid-template-columns: 1fr;
  }

  .protocol-section-articles {
    grid-row: auto;
  }
}

/* Smartphones: Werkzeuge und Überschrift werden kompakter. */
@media (max-width: 620px) {
  .utility-bar {
    padding: 10px 14px;
  }

  .utility-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .utility-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .status,
  .button,
  .file-button {
    width: 100%;
  }

  .catalog {
    padding: 34px 14px 44px;
  }

  .price-list-heading {
    margin-bottom: 26px;
  }

  .price-list-heading h1 {
    font-size: clamp(3rem, 18vw, 4.4rem);
  }

  .support-line {
    gap: 9px;
  }

  .support-line strong {
    font-size: 0.58rem;
    letter-spacing: 0.16em;
  }

  .catalog-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-actions {
    flex-direction: column;
  }

  .quick-action-card {
    width: 100%;
  }

  .article-list {
    border-radius: 12px;
    padding: 8px;
  }

  .article-card {
    min-height: 58px;
    padding: 8px 9px;
  }

  .article-card-name {
    font-size: 0.95rem;
    letter-spacing: 0.055em;
  }

  .article-card-price {
    font-size: 1rem;
  }

  .article-meta {
    font-size: 0.59rem;
  }

  .cart-head,
  .cart-summary {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cart-items {
    padding-left: 12px;
    padding-right: 12px;
  }

  .cart-actions {
    flex-direction: column-reverse;
  }

  .utility-separator {
    align-self: center;
    margin: 1px 0;
  }

  .sales-log-head {
    flex-direction: column;
  }

  .sales-log-head-actions {
    width: 100%;
    align-items: flex-end;
  }

  .sales-log-date-control {
    flex: 1 1 auto;
    min-width: 0;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .sales-log-modal {
    max-height: 94vh;
    border-radius: 12px;
  }

  .sales-log-head {
    padding: 20px 18px 16px;
  }

  .sales-log-body {
    padding: 16px 14px 20px;
  }

  .sales-log-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .protocol-kpi {
    padding: 12px;
  }

  .protocol-section {
    padding: 14px;
  }

  .protocol-table {
    min-width: 560px;
  }

  .protocol-stat-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 9px 0;
  }

  .protocol-stat-row em {
    grid-column: 1 / -1;
    justify-self: end;
  }
}


/* ==========================================================================
   PREISLISTEN-EDITOR
   Dunkles Diepersdorf-Design, konsistente SVG-Aktionen und responsive Panels.
   ========================================================================== */
.profile-svg {
  display: block;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-edit-trigger {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  color: #d4e7dc;
  border-color: rgba(159, 201, 177, .35);
  background: rgba(110, 163, 130, .12);
}

.profile-edit-trigger:hover:not(:disabled) {
  border-color: rgba(159, 201, 177, .75);
  background: rgba(110, 163, 130, .20);
}

.active-profile-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  max-width: 200px;
  border: 1px solid rgba(169, 197, 184, .18);
  border-radius: 99px;
  background: rgba(169, 197, 184, .06);
  color: #c9dbcf;
  font-size: .74rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-profile-label::before {
  content: "";
  flex: 0 0 auto;
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: #82c997;
  box-shadow: 0 0 0 4px rgba(130, 201, 151, .10);
}

#profileNameModal { z-index: 96; }

.profile-editor-modal,
.profile-name-modal {
  width: min(990px, 100%);
  max-height: min(94vh, 960px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(163, 205, 181, .36);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 0 0, rgba(58, 101, 74, .24), transparent 480px),
    linear-gradient(145deg, #101b15, #0c150f);
  color: #f4f6f3;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .64);
}

.profile-editor-modal .button,
.profile-name-modal .button {
  border-radius: 9px;
  min-height: 42px;
  padding: 0 16px;
  white-space: nowrap;
}

.profile-editor-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 28px 21px;
  border-bottom: 1px solid rgba(171, 209, 188, .16);
  background: rgba(7, 14, 9, .30);
}

.profile-editor-heading { min-width: 0; }

.profile-eyebrow {
  display: block;
  color: #99b9a6;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.profile-editor-heading h2 {
  margin: 7px 0 3px;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.2;
  font-weight: 500;
  color: #f3f7f3;
}

.profile-editor-heading p {
  margin: 0;
  color: #a9bbae;
  font-size: .84rem;
}

.profile-editor-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 28px 30px;
  display: grid;
  gap: 21px;
  scrollbar-color: #50745a #132218;
  scrollbar-width: thin;
}

.profile-editor-content section,
.profile-editor-content fieldset {
  min-width: 0;
}

.profile-select-panel,
.profile-catalog-panel,
.profile-add-panel {
  border: 1px solid rgba(172, 211, 188, .18);
  background: rgba(207, 240, 220, .025);
  border-radius: 12px;
  padding: 18px 20px;
}

.profile-editor-top {
  display: flex;
  align-items: flex-end;
  gap: 13px;
}

.profile-select-label {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
}

.profile-field-label,
.profile-add-field > span,
.profile-add-field > label {
  color: #b5cbbd;
  font-size: .72rem;
  font-weight: 750;
}

.profile-panel-hint {
  margin: 11px 0 0;
  color: #91a79a;
  font-size: .72rem;
}

.profile-editor-modal input:not([type="checkbox"]),
.profile-editor-modal select,
.profile-name-modal input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(161, 198, 175, .34);
  border-radius: 8px;
  background: rgba(6, 13, 8, .45);
  color: #f4f7f2;
  outline: 0;
  font-size: .85rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.profile-editor-modal input:not([type="checkbox"]):hover,
.profile-editor-modal select:hover,
.profile-name-modal input:not([type="checkbox"]):hover {
  border-color: rgba(161, 198, 175, .58);
}

.profile-editor-modal input:not([type="checkbox"]):focus-visible,
.profile-editor-modal select:focus-visible,
.profile-name-modal input:not([type="checkbox"]):focus-visible {
  border-color: #a6d6b5;
  box-shadow: 0 0 0 3px rgba(133, 202, 151, .17);
}

.profile-editor-modal input::placeholder,
.profile-name-modal input::placeholder { color: #7d9283; }

.profile-editor-modal input[type="checkbox"],
.profile-name-modal input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #9dd6af;
  cursor: pointer;
}

.profile-button-new {
  gap: 8px;
  color: #d3eada;
  border-color: rgba(125, 194, 146, .3);
}

.profile-settings {
  min-width: 0;
  margin: 0;
  padding: 15px 16px 16px;
  border: 1px solid rgba(172, 211, 188, .18);
  border-radius: 12px;
  background: rgba(207, 240, 220, .025);
}

.profile-settings legend {
  padding: 0 8px;
  color: #dcebe1;
  font-size: .93rem;
  font-weight: 750;
}

.profile-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profile-setting-card {
  min-width: 0;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(168, 206, 182, .13);
  border-radius: 10px;
  background: rgba(4, 12, 7, .31);
}

.profile-setting-top {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-setting-icon,
.profile-empty-icon,
.profile-name-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(131, 196, 152, .22);
  border-radius: 10px;
  color: #acd9ba;
  background: rgba(95, 163, 117, .13);
}

.profile-setting-description {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.profile-setting-description strong {
  font-size: .81rem;
  color: #eff5f0;
}

.profile-setting-description small {
  color: #91a799;
  font-size: .67rem;
}

.profile-setting-controls { padding-left: 48px; }

.profile-money {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: min(100%, 140px);
  color: #9fb5a5;
  font-size: .8rem;
  white-space: nowrap;
}

.profile-money input {
  width: 100%;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.profile-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: 39px;
  height: 23px;
  margin-left: auto;
  cursor: pointer;
}

.profile-switch input {
  position: absolute;
  opacity: 0;
  width: 100% !important;
  height: 100% !important;
  cursor: pointer;
}

.profile-switch-track {
  width: 39px;
  height: 23px;
  border-radius: 99px;
  background: #44544a;
  border: 1px solid #67776a;
  transition: background .15s ease, border-color .15s ease;
}

.profile-switch-track::after {
  content: "";
  display: block;
  width: 17px;
  height: 17px;
  margin: 2px;
  border-radius: 50%;
  background: #e7ede8;
  box-shadow: 0 1px 4px #0005;
  transition: transform .15s ease;
}

.profile-switch input:checked + .profile-switch-track {
  background: #398253;
  border-color: #79c492;
}

.profile-switch input:checked + .profile-switch-track::after { transform: translateX(16px); }

.profile-switch input:focus-visible + .profile-switch-track {
  outline: 2px solid #cce7d5;
  outline-offset: 3px;
}

.profile-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 15px;
}

.profile-section-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 5px 0 0;
  color: #f0f4f0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
}

.profile-section-head p {
  margin: 0;
  max-width: 250px;
  color: #9eb2a4;
  font-size: .71rem;
  line-height: 1.5;
  text-align: right;
}

.profile-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  border-radius: 99px;
  color: #b6dfc2;
  background: rgba(117, 186, 135, .12);
  border: 1px solid rgba(117, 186, 135, .21);
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 800;
}

.profile-editor-columns,
.profile-article-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 125px 100px 44px 44px;
  align-items: center;
  gap: 12px;
}

.profile-editor-columns {
  padding: 11px 12px;
  border-top: 1px solid rgba(162, 201, 178, .18);
  border-bottom: 1px solid rgba(162, 201, 178, .2);
  color: #91a999;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.profile-editor-columns span:nth-last-child(-n+2) { text-align: center; }

.profile-editor-rows { display: grid; gap: 2px; }

.profile-category-heading {
  padding: 16px 12px 7px;
  color: #b5d6c1;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .015em;
}

.profile-article-row {
  min-height: 63px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-bottom-color: rgba(174, 207, 183, .09);
  border-radius: 8px;
  transition: background .14s ease, border-color .14s ease;
}

.profile-article-row:hover {
  background: rgba(133, 180, 147, .075);
  border-color: rgba(174, 207, 183, .14);
}

.profile-article-name {
  display: grid;
  min-width: 0;
  gap: 3px;
  overflow-wrap: anywhere;
}

.profile-article-name strong {
  color: #ecf2ec;
  font-size: .84rem;
  font-weight: 700;
}

.profile-article-meta {
  color: #88a08d;
  font-size: .67rem;
}

.profile-article-row .profile-money { width: 100%; }

.profile-article-row .profile-money input {
  min-height: 38px;
  padding: 7px 9px;
}

.profile-deposit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cfddd1;
  font-size: .73rem;
  cursor: pointer;
  white-space: nowrap;
}

.profile-hidden-article .profile-article-name strong {
  color: #9daa9f;
  text-decoration: line-through;
  text-decoration-color: rgba(201, 224, 207, .43);
}

.profile-hidden-article .profile-article-meta { color: #d3ae8a; }

.profile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid rgba(160, 203, 175, .18);
  border-radius: 10px;
  background: rgba(154, 194, 168, .07);
  color: #bfe3cb;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.profile-icon:hover:not(:disabled) {
  border-color: rgba(154, 222, 173, .55);
  background: rgba(116, 188, 136, .2);
  color: #e0ffe6;
  transform: translateY(-1px);
}

.profile-icon:active { transform: translateY(0); }

.profile-icon:focus-visible,
.profile-editor-modal .button:focus-visible,
.profile-name-modal .button:focus-visible {
  outline: 2px solid #d2ebd6;
  outline-offset: 3px;
}

.profile-icon-off {
  color: #dfa983;
  background: rgba(180, 124, 80, .10);
}

.profile-icon-off:hover:not(:disabled) {
  color: #f4c6a5;
  background: rgba(180, 124, 80, .20);
  border-color: rgba(214, 154, 110, .50);
}

.profile-icon-danger { color: #dda8a1; }

.profile-icon-danger:hover:not(:disabled) {
  color: #ffd4cf;
  background: rgba(185, 77, 77, .18);
  border-color: rgba(223, 123, 119, .42);
}

.profile-icon-close { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }

.profile-catalog-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px 14px;
  color: #92aa99;
  text-align: center;
  font-size: .76rem;
}

.profile-empty-icon { width: 46px; height: 46px; margin-bottom: 3px; }
.profile-empty-icon .profile-svg { width: 25px; height: 25px; }
.profile-catalog-empty strong { color: #d8e9db; font-size: .87rem; }

.profile-add-panel {
  border-color: rgba(129, 194, 148, .29);
  background: linear-gradient(140deg, rgba(83, 152, 102, .10), rgba(154, 190, 165, .025));
}

.profile-add-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: #a7d8b6;
}

.profile-add-head h3 {
  margin: 0;
  color: #e1eee3;
  font-size: .9rem;
  font-weight: 750;
}

.profile-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr) 110px 80px auto;
  align-items: end;
  gap: 10px;
}

.profile-add-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}


/* Vollständig selbst gezeichnete, profilbezogene Kategorienauswahl.
   Keine Browser-Datalist; Farben und Abstände folgen dem Preislisten-Editor. */
.profile-category-combobox {
  position: relative;
  min-width: 0;
}
.profile-editor-modal .profile-category-combobox > input {
  padding-right: 43px;
}
.profile-editor-modal .profile-category-combobox.is-open > input {
  border-color: #a6d6b5;
  box-shadow: 0 0 0 3px rgba(133, 202, 151, .13);
}
.profile-category-toggle {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid rgba(161, 198, 175, .22);
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: #b3d5bf;
  cursor: pointer;
}
.profile-category-toggle:hover {
  background: rgba(161, 198, 175, .09);
  color: #e1f3e4;
}
.profile-category-toggle .profile-svg {
  width: 17px;
  height: 17px;
  transition: transform .15s ease;
}
.profile-category-combobox.is-open .profile-category-toggle .profile-svg {
  transform: rotate(180deg);
}
.profile-category-options {
  position: absolute;
  z-index: 70;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 224px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid rgba(161, 198, 175, .53);
  border-radius: 10px;
  background: #15271b;
  box-shadow: 0 15px 34px rgba(0, 0, 0, .50), inset 0 1px 0 rgba(210, 242, 217, .06);
  scrollbar-color: #618a6d #15271b;
  overscroll-behavior: contain;
}
.profile-category-options[hidden] {
  display: none !important;
}
.profile-category-combobox.drop-up .profile-category-options {
  top: auto;
  bottom: calc(100% + 5px);
}
.profile-category-option {
  display: flex;
  align-items: center;
  min-height: 39px;
  padding: 9px 11px;
  border-radius: 6px;
  color: #edf6ee;
  cursor: pointer;
  font-size: .83rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.profile-category-option:hover,
.profile-category-option.is-active {
  background: rgba(136, 199, 151, .17);
  color: #fff;
}
.profile-category-option[aria-selected="true"] {
  background: rgba(136, 199, 151, .25);
}
.profile-category-empty {
  padding: 11px;
  color: #b1cab8;
  font-size: .78rem;
  line-height: 1.5;
}
@media (prefers-reduced-motion: reduce) {
  .profile-category-toggle .profile-svg { transition: none; }
}

.profile-add-price input { font-variant-numeric: tabular-nums; }

.profile-add-deposit {
  min-height: 42px;
  justify-content: center;
}

.profile-editor-modal .profile-add-button {
  gap: 8px;
  border-color: #6dab7d;
  color: #d2f0d9;
  background: linear-gradient(135deg, #265b37, #397e4a);
}

.profile-editor-modal .profile-add-button:hover {
  border-color: #a2e1b0;
  background: linear-gradient(135deg, #347246, #469557);
}

.profile-editor-error {
  min-height: 0;
  margin: 0;
  color: #ffc0ba;
  font-size: .77rem;
  font-weight: 700;
  line-height: 1.5;
}

.profile-editor-error:empty { display: none; }

.profile-editor-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-top: 1px solid rgba(171, 209, 188, .18);
  background: #101d14;
}

.profile-editor-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-save-hint {
  margin: 0;
  color: #8ea798;
  font-size: .72rem;
  line-height: 1.4;
}

.profile-save-hint.is-dirty { color: #e7c68f; }

.profile-name-modal {
  width: min(450px, 100%);
  max-height: min(90vh, 600px);
  gap: 14px;
  padding: 25px;
}

.profile-name-icon { width: 46px; height: 46px; }

.profile-name-modal h2 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 500;
}

.profile-name-modal > p:not(.profile-editor-error) {
  margin: 0 0 4px;
  color: #a6bbab;
  font-size: .81rem;
  line-height: 1.55;
}

.profile-name-modal .profile-editor-footer {
  margin: 6px -25px -25px;
  justify-content: flex-end;
  padding: 17px 25px;
  border-radius: 0 0 17px 17px;
}

@media (max-width: 860px) {
  .profile-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-add-row { grid-template-columns: 1fr 1fr; }
  .profile-add-deposit { justify-content: start; }
  .profile-add-button { justify-self: end; }
  .profile-editor-columns,
  .profile-article-row {
    grid-template-columns: minmax(0, 1fr) 112px 90px 40px 40px;
    gap: 8px;
  }
  .profile-section-head { align-items: start; }
}

@media (max-width: 650px) {
  #profileEditorModal, #profileNameModal { padding: 8px; }
  .profile-editor-modal {
    width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }
  .profile-editor-head { padding: 17px 15px; }
  .profile-editor-heading h2 { font-size: 1.7rem; }
  .profile-editor-content { padding: 14px 12px 18px; gap: 14px; }
  .profile-select-panel, .profile-catalog-panel, .profile-add-panel { padding: 14px 12px; }
  .profile-editor-top { align-items: stretch; flex-direction: column; }
  .profile-editor-modal .profile-button-new { align-self: start; width: auto; }
  .profile-settings { padding: 12px; }
  .profile-settings-grid { grid-template-columns: 1fr; }
  .profile-setting-controls { padding-left: 48px; }
  .profile-setting-card { gap: 10px; padding: 12px; }
  .profile-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .profile-section-head p { text-align: left; max-width: none; }
  .profile-editor-columns { display: none; }
  .profile-article-row {
    grid-template-columns: minmax(0, 1fr) minmax(80px, 1fr) 40px 40px;
    grid-template-areas:
      "name name name name"
      "price deposit eye trash";
    column-gap: 8px;
    row-gap: 10px;
    padding: 12px 6px;
  }
  .profile-article-name { grid-area: name; }
  .profile-article-row > .profile-money { grid-area: price; }
  .profile-article-row > .profile-deposit { grid-area: deposit; }
  .profile-icon-visibility { grid-area: eye; }
  .profile-icon-danger { grid-area: trash; }
  .profile-add-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-add-name, .profile-add-category { grid-column: 1 / -1; }
  .profile-add-price { grid-column: 1; }
  .profile-add-deposit { grid-column: 2; justify-self: center; }
  .profile-editor-modal .profile-add-button { grid-column: 1 / -1; width: 100%; }
  .profile-editor-footer { flex-direction: column; align-items: stretch; padding: 13px 15px; gap: 10px; }
  .profile-editor-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; }
  .profile-editor-actions .button { min-width: 0; padding: 0 8px; white-space: normal; }
  .profile-name-modal { padding: 20px; }
  .profile-name-modal .profile-editor-footer {
    flex-direction: row; margin: 6px -20px -20px; padding: 14px 20px;
  }
  .profile-name-modal .profile-editor-footer .button { width: auto; }
  .active-profile-label { max-width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-icon, .profile-switch-track, .profile-switch-track::after,
  .profile-editor-modal input, .profile-editor-modal select { transition: none; }
}


/* ==========================================================================
   KASSENOBERFLÄCHE – GEMEINSAME ANPASSUNGEN
   Diese Regeln lagen zuvor in einem zusätzlichen Theme-Stylesheet.
   Sie gehören zur Verkaufsapp und werden zentral hier gepflegt.
   ========================================================================== */

/* Einheitliche, kompakte Kopfzeile */
.utility-bar {
  min-height: 54px;
  padding: 7px clamp(10px, 1.4vw, 20px);
}
.utility-actions {
  width: 100%;
  gap: 7px;
  justify-content: flex-end;
}
.utility-actions > .status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-right: auto;
  padding: 7px 10px;
  font-size: .68rem;
}
.utility-actions > .button {
  min-height: 34px;
  padding-inline: 10px;
  gap: 6px;
  font-size: .72rem;
}
.utility-actions > .active-profile-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  font-size: .70rem;
}
.utility-actions .profile-svg { width: 16px; height: 16px; }
.utility-separator { margin: 0 1px; }

/* Schnellaktionen über dem Sortiment – ohne zusätzliche Kategorienavigation */
.catalog-tools {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
  margin-bottom: 30px;
  border-top: 1px solid var(--line-soft);
}
.quick-actions {
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}
.quick-action-card[hidden] { display: none !important; }

/* Einzeleintritt: klar erkennbarer blau-pinker Verlauf. */
.quick-actions .single-admission-card {
  border-color: #986fc8;
  background: linear-gradient(120deg, #244baf 0%, #7545b5 53%, #ca448a 100%);
  color: #fff;
}
.quick-actions .single-admission-card .quick-action-icon {
  color: #fff;
  border-color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .13);
}
.quick-actions .single-admission-card strong { color: #fff; }
.quick-actions .single-admission-card small { color: #ffe3f6; }
.quick-actions .single-admission-card:hover:not(:disabled) {
  border-color: #f2a6e5;
  background: linear-gradient(120deg, #315dcc 0%, #9256d0 53%, #e657a5 100%);
  box-shadow: 0 6px 20px rgba(111, 65, 173, .24);
}

/* Pfandrückgabe: schwarz mit heller Kontur. */
.quick-actions .deposit-return-card {
  border-color: rgba(191, 205, 196, .48);
  background: #030404;
  color: #f2f3ef;
}
.quick-actions .deposit-return-card .quick-action-icon {
  color: #f2f3ef;
  border-color: rgba(191, 205, 196, .48);
  background: #0a0b0a;
}
.quick-actions .deposit-return-card strong { color: #f2f3ef; }
.quick-actions .deposit-return-card small { color: #c3d5c8; }
.quick-actions .deposit-return-card:hover:not(:disabled) {
  border-color: rgba(214, 233, 220, .80);
  background: #121513;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}

/* Drei gleich breite Kategorien auf großen Monitoren, zwei auf Tablets,
   eine auf Smartphones. Die Preisliste bleibt trotz langer Namen lesbar. */
.category-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 46px 18px;
}
.category-section {
  width: 100%;
  min-width: 0;
  flex: none;
}
.article-card-name { overflow-wrap: anywhere; }

@media (max-width: 1199px) {
  .category-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 18px;
  }
  .category-section { width: 100%; min-width: 0; }
}
@media (max-width: 920px) {
  .layout { display: flex; flex-direction: column; }
  .cart-panel {
    position: static;
    top: auto;
    height: auto;
    min-height: 460px;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
}
@media (max-width: 650px) {
  .utility-bar { min-height: 50px; padding: 8px 10px; }
  .utility-actions {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .utility-actions > .status {
    width: 100%;
    margin: 0;
    justify-content: center;
  }
  .utility-actions > .button {
    width: auto;
    min-height: 36px;
    padding-inline: 8px;
  }
  .utility-actions > .active-profile-label { max-width: 100%; }
  .utility-separator { display: none; }
  .category-sections {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }
  .quick-actions { flex: 1 1 100%; justify-content: stretch; }
  .quick-action-card { flex: 1 1 100%; min-width: 0; }
}

/* Deutsche Preiseingabe: Ziffern und Dezimalkomma, ohne Number-Spinner. */
.profile-editor-modal input[data-money] {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.profile-editor-modal input[data-money][aria-invalid="true"] {
  border-color: #e4a39b;
  box-shadow: 0 0 0 2px rgba(228, 163, 155, .15);
}


/* ==========================================================================
   WECHSELGELDRECHNER NACH KAUFABSCHLUSS
   Der Dialog ist bewusst kompakt, touchfreundlich und vollständig lokal.
   ========================================================================== */
#cashChangeModal {
  z-index: 112;
}

.cash-change-dialog {
  width: min(790px, 100%);
  max-height: min(92dvh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(165, 207, 181, .48);
  border-radius: 19px;
  color: #eff5ef;
  background:
    radial-gradient(ellipse at 90% -10%, rgba(79, 139, 93, .19), transparent 430px),
    linear-gradient(155deg, #122018, #0c1510);
  box-shadow: 0 30px 95px rgba(0, 0, 0, .62);
}

.cash-change-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 19px;
  border-bottom: 1px solid rgba(164, 202, 176, .19);
  background: rgba(6, 15, 10, .29);
}
.cash-change-eyebrow {
  display: block;
  color: #a8dfb9;
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .14em;
}
.cash-change-header h2 {
  margin: 6px 0 4px;
  color: #f0f7ed;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.1;
  font-weight: 500;
}
.cash-change-header p {
  margin: 0;
  color: #a7c3b0;
  font-size: .79rem;
  line-height: 1.4;
}
.cash-change-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(159, 198, 174, .37);
  border-radius: 50%;
  background: rgba(197, 225, 207, .045);
  color: #d3e8d8;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.cash-change-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.cash-change-close:hover {
  border-color: #b5e1bf;
  background: rgba(174, 221, 184, .13);
}
.cash-change-close:focus-visible,
.cash-keypad button:focus-visible,
.cash-banknotes button:focus-visible,
.cash-exact-button:focus-visible {
  outline: 2px solid #c1e8c8;
  outline-offset: 3px;
}
.cash-change-body {
  padding: 23px 28px 25px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-color: rgba(141, 182, 157, .55) transparent;
}
.cash-change-due {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px 19px;
  border: 1px solid rgba(170, 213, 182, .33);
  border-radius: 10px;
  background: rgba(91, 144, 104, .12);
}
.cash-change-due span {
  color: #c3ddcb;
  font-size: .88rem;
  font-weight: 750;
}
.cash-change-due strong {
  color: #f0fff1;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.05;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cash-change-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}
.cash-change-workspace[hidden] { display: none !important; }
.cash-change-number-section,
.cash-change-notes-section {
  min-width: 0;
}
.cash-change-number-section > label,
.cash-change-notes-section h3 {
  display: block;
  margin: 0 0 9px;
  color: #d5ebd9;
  font-size: .88rem;
  font-weight: 800;
}
.cash-change-dialog .cash-change-input {
  width: 100%;
  min-height: 59px;
  padding: 10px 14px;
  border: 1px solid rgba(169, 212, 182, .52);
  border-radius: 9px;
  outline: none;
  background: rgba(5, 14, 9, .68);
  color: #fff;
  font-size: 1.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  letter-spacing: .01em;
}
.cash-change-dialog .cash-change-input:focus {
  border-color: #a4dab3;
  box-shadow: 0 0 0 3px rgba(163, 220, 179, .15);
}
.cash-change-input::placeholder { color: #718a7a; }
.cash-change-hint {
  display: block;
  min-height: 28px;
  margin: 7px 0 8px;
  color: #93b5a0;
  font-size: .7rem;
  line-height: 1.35;
}
.cash-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.cash-keypad button {
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(163, 206, 180, .28);
  border-radius: 8px;
  background: rgba(102, 152, 114, .105);
  color: #ecf6ed;
  cursor: pointer;
  font-size: 1.22rem;
  font-weight: 770;
  font-variant-numeric: tabular-nums;
  transition: background .12s, border-color .12s;
}
.cash-keypad button:hover {
  background: rgba(119, 189, 139, .22);
  border-color: rgba(181, 228, 195, .56);
}
.cash-keypad button:active {
  background: rgba(131, 215, 151, .32);
}
.cash-keypad .cash-keypad-special {
  color: #f2c9a5;
  background: rgba(166, 106, 81, .14);
}
.cash-keypad .cash-keypad-comma {
  grid-column: 1 / -1;
  min-height: 40px;
  font-size: 1.35rem;
}
.cash-change-notes-section > p {
  margin: 0 0 13px;
  color: #9bbda6;
  font-size: .74rem;
  line-height: 1.35;
}
.cash-banknotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.cash-banknotes button {
  position: relative;
  min-width: 0;
  min-height: 76px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
  overflow: hidden;
  border: 1px solid rgba(185, 214, 193, .48);
  border-radius: 8px;
  background: linear-gradient(125deg, #46574a, #26352a);
  color: #eff4ee;
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.035);
  transition: transform .12s, filter .12s, border-color .12s;
}
.cash-banknotes button::after {
  content: "€";
  position: absolute;
  top: -15px;
  right: -5px;
  font-size: 5rem;
  font-weight: 850;
  opacity: .09;
  pointer-events: none;
}
.cash-banknotes button:nth-child(2) { background: linear-gradient(125deg, #893d41, #4d292e); }
.cash-banknotes button:nth-child(3) { background: linear-gradient(125deg, #355a87, #243e61); }
.cash-banknotes button:nth-child(4) { background: linear-gradient(125deg, #976036, #61442f); }
.cash-banknotes button:nth-child(5) { background: linear-gradient(125deg, #30664e, #1c4033); }
.cash-banknotes button:nth-child(6) { background: linear-gradient(125deg, #9b8c4b, #5f5633); }
.cash-banknotes button span {
  position: relative;
  z-index: 1;
  font-size: 1.23rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}
.cash-banknotes button small {
  position: relative;
  z-index: 1;
  font-size: .68rem;
  font-weight: 700;
  opacity: .83;
}
.cash-banknotes button:hover {
  transform: translateY(-1px);
  filter: brightness(1.17);
  border-color: rgba(246, 244, 216, .7);
}
.cash-banknotes button:active { transform: translateY(0); }
.cash-exact-button {
  width: 100%;
  margin-top: 13px;
  padding: 10px 12px;
  min-height: 42px;
  border: 1px solid rgba(164, 207, 176, .48);
  border-radius: 8px;
  background: rgba(137, 186, 149, .10);
  color: #d9eedc;
  font-size: .79rem;
  font-weight: 800;
  cursor: pointer;
}
.cash-exact-button:hover { background: rgba(137, 186, 149, .20); }
.cash-change-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 23px;
  padding: 17px 19px;
  border: 1px solid rgba(163, 206, 178, .48);
  border-radius: 10px;
  background: rgba(48, 112, 70, .22);
}
.cash-change-result span {
  color: #cbe9d4;
  font-size: .85rem;
  font-weight: 800;
}
.cash-change-result strong {
  color: #f3fff4;
  font-size: clamp(1.65rem, 3.5vw, 2.2rem);
  line-height: 1.05;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cash-change-result[data-status="waiting"] {
  background: rgba(110, 142, 120, .10);
  border-color: rgba(169, 199, 179, .28);
}
.cash-change-result[data-status="missing"] {
  background: rgba(143, 98, 48, .18);
  border-color: rgba(227, 166, 99, .53);
}
.cash-change-result[data-status="missing"] span,
.cash-change-result[data-status="missing"] strong { color: #f5d4a8; }
.cash-change-result[data-status="payout"] {
  background: rgba(136, 72, 59, .21);
  border-color: rgba(236, 153, 124, .5);
}
.cash-change-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-top: 1px solid rgba(166, 202, 175, .19);
  background: rgba(5, 15, 10, .40);
}
.cash-change-footer span {
  color: #9eb8a5;
  font-size: .72rem;
  line-height: 1.45;
}
.cash-change-footer .button {
  min-width: 116px;
  min-height: 42px;
  border-radius: 8px;
}

@media (max-width: 640px) {
  #cashChangeModal { padding: 9px; }
  .cash-change-dialog { max-height: calc(100dvh - 18px); border-radius: 12px; }
  .cash-change-header { padding: 16px 16px 13px; }
  .cash-change-body { padding: 14px 16px 18px; }
  .cash-change-workspace { grid-template-columns: 1fr; gap: 19px; }
  .cash-banknotes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cash-banknotes button { min-height: 64px; padding: 9px; }
  .cash-banknotes button span { font-size: 1.1rem; }
  .cash-change-due { padding: 12px 14px; }
  .cash-change-footer { padding: 13px 16px; }
  .cash-change-footer .button { min-width: 86px; }
}
@media (max-width: 380px) {
  .cash-banknotes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-change-footer { flex-direction: column; align-items: stretch; }
  .cash-change-footer .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cash-change-close, .cash-keypad button, .cash-banknotes button { transition: none; }
}
