/* ═══════════════════════════════════════════════════════════════
   Verkostungsplattform — Design System v6
   Amber · Hell & Freundlich · Inter · shadcn/ui-inspired
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── 1. Design Tokens ────────────────────────────────────────── */
:root {
  /* ── Primär — Ember (Maison Praline) ── */
  --brand:          #F36C21;
  --brand-hover:    #D85A12;
  --brand-light:    #FEF1E8;
  --brand-border:   #FBDBC2;
  --brand-dark:     #893808;
  --brand-fg:       #FFFFFF;

  /* ── Hintergrund & Flächen — Cream Canvas ── */
  --bg:             #F7F1E6;
  --surface:        #ffffff;
  --surface-2:      #FBF8F2;
  --surface-hover:  #EFE7D5;
  --surface-3:      #EFE7D5;

  /* ── Header — Aubergine Canvas (Maison Praline) ── */
  --header-bg:      #2E2545;
  --header-border:  rgba(255,255,255,0.08);
  --header-fg:      #FBF8F2;
  --header-muted:   rgba(251,248,242,0.65);
  --header-hover-bg:rgba(243,108,33,0.12);
  --header-active-bg:rgba(243,108,33,0.20);
  --header-active-fg:#F47A36;

  /* ── Grenzen — Cream Hairline ── */
  --border:         #E6E1D7;
  --border-strong:  #D6CDB8;

  /* ── Text ── */
  --text:           #111827;
  --text-2:         #374151;
  --text-muted:     #6b7280;
  --text-subtle:    #9ca3af;

  /* ── Semantik — Maison Praline Food-Tones (Sage/Saffron/Pomegranate) ── */
  --success:        #7C8C6E;
  --success-bg:     #E5EADE;
  --success-border: #C4D0B8;
  --success-text:   #4A5839;

  --danger:         #A8332B;
  --danger-bg:      #F4D9D6;
  --danger-border:  #E0AAA5;
  --danger-text:    #6B1F19;

  --warning:        #E2A93B;
  --warning-bg:     #F8EDD0;
  --warning-border: #E9CB8A;
  --warning-text:   #7A5B14;

  --info:           #2563eb;
  --info-bg:        #eff6ff;
  --info-border:    #bfdbfe;
  --info-text:      #1e3a8a;

  /* ── Schatten — warm aubergine-tinted (Maison Praline) ── */
  --shadow-xs: 0 1px 2px rgba(46, 37, 69, 0.04);
  --shadow-sm: 0 1px 2px rgba(46, 37, 69, 0.06);
  --shadow-md: 0 4px 12px rgba(46, 37, 69, 0.08), 0 1px 2px rgba(46, 37, 69, 0.04);
  --shadow-lg: 0 8px 24px rgba(46, 37, 69, 0.12), 0 3px 8px rgba(46, 37, 69, 0.06);
  --shadow-xl: 0 16px 40px rgba(46, 37, 69, 0.16);
  --shadow-amber: 0 4px 14px rgba(243, 108, 33, 0.35);
  --shadow-focus: 0 0 0 3px rgba(243, 108, 33, 0.32);

  /* ── Radii ── */
  --r-xs:   3px;
  --r-sm:   6px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-pill: 9999px;

  /* ── Typografie ── */
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* ── Übergänge ── */
  --ease:    150ms ease;
  --ease-md: 220ms cubic-bezier(.4,0,.2,1);
  --ease-lg: 320ms cubic-bezier(.4,0,.2,1);

  /* ── Sidebar (legacy compat) ── */
  --navy:         var(--header-bg);
  --navy-hover:   #1f2937;
  --navy-light:   #f3f4f6;
  --navy-mid:     #374151;
  --navy-muted:   #9ca3af;

  /* ────────────────────────────────────────────────────────────
     Maison Praline — Primitives (Aubergine, Ember, Cream, Charcoal,
     Sage, Saffron, Pomegranate). Quelle: claude.ai/design.
     Verwendung: nutze --brand für Akzent (= ember-500),
     --color-aubergine-500 für dunkle Flächen, --color-cream-100 als Canvas.
     ──────────────────────────────────────────────────────────── */
  --color-aubergine-50:  #F4F2F8;
  --color-aubergine-100: #E2DDEB;
  --color-aubergine-200: #BFB5D0;
  --color-aubergine-300: #9385AC;
  --color-aubergine-400: #635581;
  --color-aubergine-500: #2E2545;
  --color-aubergine-600: #251D38;
  --color-aubergine-700: #1C162A;
  --color-aubergine-800: #14101E;
  --color-aubergine-900: #0A0810;

  --color-ember-50:  #FEF1E8;
  --color-ember-100: #FBDBC2;
  --color-ember-200: #F8B98A;
  --color-ember-300: #F69556;
  --color-ember-400: #F47A36;
  --color-ember-500: #F36C21;
  --color-ember-600: #D85A12;
  --color-ember-700: #B0470C;
  --color-ember-800: #893808;
  --color-ember-900: #5E2604;

  --color-cream-50:  #FBF8F2;
  --color-cream-100: #F7F1E6;
  --color-cream-200: #EFE7D5;
  --color-cream-300: #E6E1D7;
  --color-cream-400: #D6CDB8;
  --color-cream-500: #B8AC91;

  --color-charcoal-50:  #F5F5F5;
  --color-charcoal-100: #E5E5E5;
  --color-charcoal-200: #C9C9C9;
  --color-charcoal-300: #9C9C9C;
  --color-charcoal-400: #6B6B6B;
  --color-charcoal-500: #4A4A4A;
  --color-charcoal-600: #333333;
  --color-charcoal-700: #1F1F1F;
  --color-charcoal-800: #1A1A1A;

  --color-sage-500:        #7C8C6E;
  --color-sage-100:        #E5EADE;
  --color-saffron-500:     #E2A93B;
  --color-saffron-100:     #F8EDD0;
  --color-pomegranate-500: #A8332B;
  --color-pomegranate-100: #F4D9D6;

  /* Tracking-Tokens (Maison Praline) */
  --tracking-tight:   -0.02em;
  --tracking-eyebrow: 0.12em;
}

}

/* ── 2. Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-hover); text-decoration: none; transition: color var(--ease), text-decoration-thickness var(--ease); }
a:hover { color: var(--brand); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
  font-variation-settings: "opsz" 48;
}
h4, h5, h6 {
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -.01em;
}

input, select, textarea, button {
  font-family: var(--font);
  font-size: inherit;
}

/* ── 3. Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(46, 37, 69, 0.92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--header-border);
  height: 56px;
  box-shadow: 0 1px 0 rgba(0,0,0,.18), 0 2px 8px rgba(46, 37, 69,.10);
}

.site-header-pub {
  position: relative;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  height: 56px;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-brand-group {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.header-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--header-fg);
  letter-spacing: -.01em;
  white-space: nowrap;
}

.header-title::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: 2px;
  margin-right: .45rem;
  vertical-align: middle;
}

.header-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
}

.header-logo-pub {
  height: 36px;
  width: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
}

.header-byline {
  font-size: .78rem;
  color: var(--header-muted);
  margin-left: auto;
}

/* ── Desktop Navigation ── */
.main-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: .15rem;
  overflow: hidden;
}

.main-nav a,
.main-nav .nav-text {
  display: inline-flex;
  align-items: center;
  padding: .35rem .65rem;
  border-radius: var(--r-sm);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}

.main-nav a:hover {
  background: var(--header-hover-bg);
  color: var(--brand);
  text-decoration: none;
}

.main-nav a.active {
  background: var(--header-active-bg);
  color: var(--header-active-fg);
  font-weight: 600;
}

.nav-separator { display: none; }

/* ── Header User-Bereich ── */
.header-user-area {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
  padding-left: .75rem;
  border-left: 1px solid rgba(255,255,255,.08);
}

.header-user-name {
  font-size: .78rem;
  color: var(--header-muted);
  white-space: nowrap;
}

.header-logout-link {
  font-size: .75rem;
  font-weight: 500;
  color: var(--color-ember-400);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .22rem .6rem;
  transition: all var(--ease);
  text-decoration: none;
}

.header-logout-link:hover {
  background: var(--surface-hover);
  color: var(--color-ember-500, var(--color-ember-400));
  border-color: var(--border-strong);
  text-decoration: none;
}

/* ── Mobile Header ── */
.mobile-header-actions {
  display: none;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
}

.mobile-username {
  font-size: .75rem;
  color: var(--header-muted);
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-logout-btn {
  font-size: .73rem;
  color: var(--color-ember-400);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .2rem .5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all var(--ease);
}

.mobile-logout-btn:hover {
  background: var(--surface-hover);
  color: var(--color-ember-500, var(--color-ember-400));
  text-decoration: none;
}

/* ── 4. Page Shell ───────────────────────────────────────────── */
main.page-shell {
  max-width: 1280px;
  margin: 2rem auto 5rem;
  padding: 0 1.75rem;
}

/* ── 5. Mobile Bottom-Navigation ────────────────────────────── */
.mob-bottom-nav { display: none; }

/* ── 6. Karten ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.card-sm { padding: .875rem 1.125rem; border-radius: var(--r-md); }

.card-info {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: var(--r-md);
  padding: .875rem 1rem;
  color: var(--info-text);
  font-size: .875rem;
}

.hero-card {
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-top: 3px solid var(--brand);
}

.card + .card { margin-top: 1.25rem; }

.card-accent-navy  { border-left: 3px solid var(--header-bg); }
.card-accent-brand { border-left: 3px solid var(--brand); }

.card-danger {
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
}

/* ── 7. Buttons ──────────────────────────────────────────────── */
button, .button, .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--ease), box-shadow var(--ease), transform 80ms ease, opacity var(--ease);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
  letter-spacing: .01em;
}

button:active, .button:active { transform: translateY(1px); }
button:disabled, .button:disabled { opacity: .5; cursor: not-allowed; }

/* Primary — Amber */
button[type="submit"]:not(.btn-secondary):not(.btn-danger):not(.btn-small):not(.btn-xs),
button.btn-primary, a.btn-primary, .btn-primary {
  background: var(--brand);
  color: var(--brand-fg);
  box-shadow: var(--shadow-amber);
}

button[type="submit"]:not(.btn-secondary):not(.btn-danger):not(.btn-small):not(.btn-xs):hover,
.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 6px 20px rgba(245,158,11,.45);
  text-decoration: none;
  color: var(--brand-fg);
}

/* .button (links + explicit) */
.button {
  background: var(--brand);
  color: var(--brand-fg);
  box-shadow: var(--shadow-amber);
}
.button:hover {
  background: var(--brand-hover);
  box-shadow: 0 6px 20px rgba(245,158,11,.45);
  color: var(--brand-fg);
  text-decoration: none;
}

/* Secondary — outlined */
.btn-secondary, button.btn-secondary, a.btn-secondary {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border-strong);
  box-shadow: none;
  padding: .5rem 1.05rem;
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
  color: var(--text);
  text-decoration: none;
}

/* Standard "Zurück zum Dashboard"-Button: Form wie .button, links durch margin-right:auto, Pfeil-Präfix */
.btn-back, a.btn-back, button.btn-back {
  background: #2E2545;
  color: #fff;
  box-shadow: 0 4px 14px rgba(46,37,69,.35);
  margin-right: auto;
}
.btn-back:hover {
  background: #3D3260;
  box-shadow: 0 6px 20px rgba(46,37,69,.45);
  color: #fff;
  text-decoration: none;
}
.btn-back::before {
  content: "← ";
  font-weight: 700;
  margin-right: .15rem;
}
/* Aubergine wie .btn-back, aber ohne Pfeil-Präfix */
.btn-aubergine, a.btn-aubergine, button.btn-aubergine {
  background: #2E2545;
  color: #fff;
  box-shadow: 0 4px 14px rgba(46,37,69,.35);
}
.btn-aubergine:hover {
  background: #3D3260;
  box-shadow: 0 6px 20px rgba(46,37,69,.45);
  color: #fff;
  text-decoration: none;
}


/* Navy variant */
.btn-navy {
  background: var(--header-bg);
  color: #fff;
  border: none;
}
.btn-navy:hover { background: var(--navy-mid); color: #fff; text-decoration: none; }

/* Danger */
.btn-danger, button.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  box-shadow: 0 2px 6px rgba(220,38,38,.25);
}
.btn-danger:hover { background: #b91c1c; color: #fff; text-decoration: none; }
/* Blue */
.btn-blue, button.btn-blue, a.btn-blue {
  background: #2563eb;
  color: #fff;
  border: none;
  box-shadow: 0 2px 6px rgba(37,99,235,.25);
}
.btn-blue:hover { background: #1d4ed8; color: #fff; text-decoration: none; }

/* Success */
.btn-success, button.btn-success {
  background: var(--success);
  color: #fff;
  border: none;
}
.btn-success:hover { background: #15803d; color: #fff; text-decoration: none; }

/* Sizes */
.btn-small, button.btn-small, a.btn-small { padding: .28rem .7rem; font-size: .78rem; border-radius: var(--r-sm); }
.btn-xs,    button.btn-xs,    a.btn-xs    { padding: .18rem .5rem;  font-size: .72rem; border-radius: var(--r-xs); }

.btn-orange-sm  { background: var(--brand); color: var(--brand-fg); padding: .28rem .65rem; font-size: .78rem; border-radius: var(--r-sm); font-weight: 600; display: inline-flex; align-items: center; border: none; cursor: pointer; font-family: var(--font); }
.btn-warn-sm    { background: var(--warning); color: #fff; padding: .28rem .65rem; font-size: .78rem; border-radius: var(--r-sm); font-weight: 600; display: inline-flex; align-items: center; border: none; cursor: pointer; font-family: var(--font); }
.btn-success-sm { background: var(--success); color: #fff; padding: .28rem .65rem; font-size: .78rem; border-radius: var(--r-sm); font-weight: 600; display: inline-flex; align-items: center; border: none; cursor: pointer; font-family: var(--font); }
.btn-done-sm    { background: var(--success); color: #fff; padding: .28rem .65rem; font-size: .78rem; border-radius: var(--r-sm); font-weight: 600; display: inline-flex; align-items: center; border: none; cursor: pointer; font-family: var(--font); }
.btn-del-sm     { background: var(--danger); color: #fff; padding: .28rem .65rem; font-size: .78rem; border-radius: var(--r-sm); font-weight: 600; display: inline-flex; align-items: center; border: none; cursor: pointer; font-family: var(--font); }
.btn-del-xs     { background: var(--danger); color: #fff; padding: .16rem .45rem; font-size: .72rem; border-radius: var(--r-xs); font-weight: 600; display: inline-flex; align-items: center; border: none; cursor: pointer; font-family: var(--font); }

/* Global primary-button rules (for pages without local .btn-orange/.btn-ghost) */
.btn-orange { padding: .4rem .9rem; background: #F36C21; color: #fff; border: none; border-radius: 6px; font-size: .85rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .15s; display: inline-flex; align-items: center; gap: .4rem; }
.btn-orange:hover { background: #D85A12; }
.btn-ghost { padding: .4rem .9rem; background: #f5f5f5; color: #555; border: 1.5px solid #e0e0e0; border-radius: 6px; font-size: .85rem; cursor: pointer; font-family: inherit; transition: all .15s; display: inline-flex; align-items: center; gap: .4rem; }
.btn-ghost:hover { border-color: #F36C21; color: #F36C21; }
.btn-danger { padding: .4rem .9rem; background: #fff0f0; color: #c62828; border: 1.5px solid #ffcdd2; border-radius: 6px; font-size: .85rem; cursor: pointer; font-family: inherit; }

/* ── 8. Formulare ────────────────────────────────────────────── */
label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 1rem;
  gap: .4rem;
}

label > span, label > .label-text { display: block; margin-bottom: .35rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="url"],
input[type="tel"],
select,
textarea {
  display: block;
  width: 100%;
  padding: .55rem .8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-size: .875rem;
  font-family: var(--font);
  line-height: 1.5;
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
  margin-top: .3rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}

input::placeholder, textarea::placeholder { color: var(--text-subtle); }

textarea { resize: vertical; min-height: 80px; }
textarea.resize-vert { resize: vertical; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.select-inline {
  width: auto;
  display: inline-block;
  padding: .3rem .65rem;
  padding-right: 2rem;
  font-size: .8rem;
}

/* ── Formular-Layouts ── */
.form-section { max-width: 760px; }
.form-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) { .form-grid-two { grid-template-columns: 1fr; } }

/* ── 9. Tabellen ─────────────────────────────────────────────── */
.data-table, .table-clean, .table-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.data-table th, .table-clean th {
  padding: .7rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td, .table-clean td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}

.data-table tr:last-child td, .table-clean tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover td,
.table-clean tbody tr:hover td {
  background: var(--surface-hover);
}

.table-compact th { padding: .5rem .75rem; }
.table-compact td { padding: .5rem .75rem; font-size: .8rem; }

.table-xs th { padding: .35rem .6rem; font-size: .7rem; }
.table-xs td { padding: .35rem .6rem; font-size: .78rem; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive { overflow-x: auto; }

/* ── 10. Typografie-Hilfsklassen ─────────────────────────────── */
.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
  letter-spacing: -.02em;
}

.page-subtitle {
  font-size: .975rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .75rem;
  letter-spacing: -.01em;
}

.text-muted       { color: var(--text-muted) !important; }
.text-muted-sm    { color: var(--text-muted); font-size: .85rem; }
.text-muted-strong{ color: var(--text-muted); font-weight: 500; }
.text-subtle      { color: var(--text-subtle); }
.text-center      { text-align: center; }
.text-sm          { font-size: .875rem; }
.text-xs          { font-size: .78rem; }
.text-tiny        { font-size: .7rem; }
.text-lg          { font-size: 1.1rem; }
.text-md          { font-size: 1rem; }
.text-body        { font-size: .875rem; line-height: 1.6; }
.text-body-sm     { font-size: .8rem; line-height: 1.55; }
.text-success     { color: var(--success) !important; }
.text-danger      { color: var(--danger) !important; }
.text-danger-bold { color: var(--danger); font-weight: 700; }
.text-wrap        { word-break: break-word; }
.text-prewrap     { white-space: pre-wrap; }
.text-line-height { line-height: 1.8; }
.text-icon        { display: inline-flex; align-items: center; gap: .35rem; }
.text-icon-lg     { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.05rem; }

.font-bold   { font-weight: 700; }
.font-semi   { font-weight: 600; }
.font-normal { font-weight: 400; }
.font-mono   { font-family: var(--font-mono); }

/* ── 11. Badges & Pills ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .18rem .55rem;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  line-height: 1.4;
}

.badge-soft     { background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); }
.badge-danger   { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.badge-warning  { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.badge-success  { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.badge-active   { background: var(--brand-light); color: var(--brand-dark); border: 1px solid var(--brand-border); }
.badge-blue     { background: var(--info-bg); color: var(--info-text); border: 1px solid var(--info-border); }
.badge-eu       { background: #1e3a8a; color: #dbeafe; border: 1px solid #1d4ed8; }
.badge-btn      { cursor: pointer; }

.tag-pill { display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: var(--r-pill); font-size: .75rem; font-weight: 500; background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); }
.tag-row  { display: flex; flex-wrap: wrap; gap: .35rem; }
.pills-gap { display: flex; flex-wrap: wrap; gap: .35rem; }

.pill-success { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); }
.pill-warning { background: var(--warning-bg); color: var(--warning-text); border-color: var(--warning-border); }
.pill-warn-sm { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); padding: .15rem .5rem; font-size: .72rem; border-radius: var(--r-pill); font-weight: 500; }
.pill-neutral { background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); }

/* ── 12. Dashboard ───────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

/* Equal-height course/dashboard cards: flex column + min-height */
.dashboard-grid > .card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.dashboard-tile {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  text-decoration: none;
  transition: box-shadow var(--ease-md), border-color var(--ease-md), transform var(--ease-md);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.dashboard-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand);
  opacity: 0;
  transition: opacity var(--ease-md);
}

.dashboard-tile:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-border);
  transform: translateY(-2px);
  text-decoration: none;
}

.dashboard-tile:hover::before { opacity: 1; }

.tile-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
}

.tile-text {
  font-size: .825rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.tile-active-tasting {
  border: 1.5px solid var(--brand-border);
  background: var(--brand-light);
}
.tile-name-active     { font-size: .9rem; font-weight: 600; color: var(--brand-dark); }
.tile-subtitle-active { font-size: .8rem; color: var(--warning); }
.tile-title-active    { font-size: 1.05rem; font-weight: 700; color: var(--brand-dark); }

/* ── 13. Login ───────────────────────────────────────────────── */
.login-logo-img {
  display: block !important;
  height: 70px !important;
  width: auto !important;
  max-width: 280px !important;
  object-fit: contain !important;
  margin-bottom: .5rem;
  border-radius: var(--r-sm);
}

.link-muted { color: var(--text-muted); font-size: .825rem; }
.link-muted:hover { color: var(--brand-hover); }

/* ── 14. Benachrichtigungen / Notices ────────────────────────── */
.notice {
  padding: .875rem 1rem;
  border-radius: var(--r-md);
  font-size: .875rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  line-height: 1.5;
}

.notice-success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.notice-error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.notice-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.notice-info {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info-text);
}

/* ── 15. Modals ──────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal-overlay.is-open { display: flex; }

.modal-box {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  text-align: center;
  border: 1px solid var(--border);
}

.modal-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; color: var(--text); }
.modal-body { font-size: .875rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.6; }

/* ── 16. Toast ───────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 360px;
}

.toast {
  background: var(--header-bg);
  color: var(--header-fg);
  padding: .8rem 1.1rem;
  border-radius: var(--r-lg);
  font-size: .85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.08);
  animation: toast-in .25s var(--ease-md);
}

.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error   { border-left: 3px solid var(--danger); }
.toast.toast-warn    { border-left: 3px solid var(--brand); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── 17. Layout-Hilfen ───────────────────────────────────────── */
.flex-center       { display: flex; align-items: center; justify-content: center; }
.flex-end          { display: flex; align-items: center; justify-content: flex-end; }
.flex-row          { display: flex; align-items: center; }
.flex-row-wrap     { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.flex-row-wrap-mt  { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .5rem; }
.flex-row-sm       { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.flex-wrap         { flex-wrap: wrap; }
.flex-between-top  { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.flex-label        { display: flex; align-items: center; gap: .5rem; }
.flex-1            { flex: 1; }
.d-flex            { display: flex; }
.d-none            { display: none !important; }
.block             { display: block; }
.hidden-block      { display: none; }
.row-between       { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.row-between-mb3   { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.row-between-mb4   { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.row-between-mb5   { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-top       { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.back-nav-row      { display: flex; align-items: center; margin-top: 2rem; gap: .75rem; }
.header-row        { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; gap: .75rem; }

/* Gap-Hilfen */
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }

/* Margin / Padding Shortcuts */
.mb-0{margin-bottom:0!important} .mb-1{margin-bottom:.25rem} .mb-2{margin-bottom:.5rem}
.mb-3{margin-bottom:.75rem}       .mb-4{margin-bottom:1rem}   .mb-5{margin-bottom:1.25rem}
.mt-0{margin-top:0!important}     .mt-1{margin-top:.25rem}    .mt-2{margin-top:.5rem}
.mt-3{margin-top:.75rem}          .mt-4{margin-top:1rem}      .mt-5{margin-top:1.25rem}
.py-2{padding-top:.5rem;padding-bottom:.5rem}
.pl-list{padding-left:1.25rem}

.max-prose { max-width: 65ch; }
.w-full    { width: 100%; }
.w-auto    { width: auto; }
.scroll-hidden { overflow: hidden; }

/* ── 18. Grid-Layouts ────────────────────────────────────────── */
.grid-2col      { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-auto-260  { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.grid-info-md   { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.grid-info-sm   { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; }
.grid-products  { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
}

.info-grid .col-full { grid-column: 1 / -1; }

.info-item-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-subtle);
  margin-bottom: .2rem;
}

.info-item-value {
  font-size: .875rem;
  color: var(--text);
  font-weight: 500;
}

.ro-field { margin-bottom: .75rem; }
.ro-field-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-subtle);
  margin-bottom: .2rem;
}
.ro-field-value { font-size: .875rem; color: var(--text); font-weight: 500; }
.ro-field-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.ro-field-grid-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }

/* ── 19. Produkt-Karten ──────────────────────────────────────── */
.product-card-link { display: block; text-decoration: none; color: inherit; }
.product-card-link .card {
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--ease-md), border-color var(--ease-md), transform var(--ease-md);
}
.product-card-link .card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand);
  opacity: 0;
  transition: opacity var(--ease-md);
}
.product-card-link:hover { text-decoration: none; }
.product-card-link:hover .card {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-border);
  transform: translateY(-2px);
}
.product-card-link:hover .card::before { opacity: 1; }
.product-card-body { padding: .75rem 0; }
.product-card-img  { width: 100%; height: 160px; object-fit: cover; border-radius: var(--r-md); background: var(--surface-3); }

.product-info      { display: flex; flex-direction: column; gap: .35rem; }
.product-flex      { display: flex; align-items: flex-start; gap: 1rem; }
.product-img-sm    { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-md); background: var(--surface-3); flex-shrink: 0; }
.product-thumb     { width: 48px; height: 48px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-3); flex-shrink: 0; }

.product-img-container { position: relative; }

.img-frame-lg { width: 100%; height: 220px; object-fit: contain; border-radius: var(--r-md); background: var(--surface-2); padding: .5rem; }
.img-frame-md { width: 100%; height: 160px; object-fit: contain; border-radius: var(--r-md); background: var(--surface-2); padding: .5rem; }
.img-card-top { width: 100%; height: 180px; object-fit: cover; border-radius: var(--r-md) var(--r-md) 0 0; display: block; }
.img-display  { max-width: 100%; border-radius: var(--r-md); }
.img-row      { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-start; }
.img-row-sm   { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-start; }
.thumb-col    { display: flex; flex-direction: column; gap: .5rem; }
.img-placeholder-lg { width: 100%; height: 220px; background: var(--surface-3); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; color: var(--text-subtle); font-size: .8rem; }
.img-placeholder-md { width: 100%; height: 160px; background: var(--surface-3); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; color: var(--text-subtle); font-size: .8rem; }
.img-placeholder-xs { width: 48px; height: 48px; background: var(--surface-3); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; }

/* ── 20. Fortschrittsbalken ──────────────────────────────────── */
.progress-track    { width: 100%; height: 6px;  background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.progress-track-sm { width: 100%; height: 4px;  background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.progress-track-lg { width: 100%; height: 10px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.progress-fill     { height: 100%; background: var(--brand); border-radius: var(--r-pill); transition: width .4s var(--ease-md); }
.progress-fill-lg  { height: 100%; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-hover) 100%); }

/* ── 21. Bewertungs-Elemente ─────────────────────────────────── */
.crit-row        { display: flex; flex-direction: column; gap: .25rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.crit-label-row  { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; }
.overall-bar-row { margin-top: 1rem; padding-top: .75rem; border-top: 2px solid var(--border); }
.legend-row      { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: .5rem; font-size: .85rem; color: var(--text-muted); }
.legend-swatch   { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); margin-right: .3rem; vertical-align: middle; }
.legend-swatch-sm { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); margin-right: .2rem; vertical-align: middle; }

/* ── 22. Vergleichs-UI ───────────────────────────────────────── */
.product-compare-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  transition: box-shadow var(--ease-md), border-color var(--ease-md), transform var(--ease-md);
  cursor: pointer;
}
.product-compare-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand);
  opacity: 0;
  transition: opacity var(--ease-md);
  z-index: 1;
}
.product-compare-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-border);
  transform: translateY(-2px);
}
.product-compare-card:hover::before { opacity: 1; }
.product-compare-card-inner { padding: 1rem; }
.product-compare-cb         { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.compare-cb-input           { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand); }
.compare-cb-label           { font-size: .825rem; font-weight: 500; cursor: pointer; }
.compare-bar                { display: flex; gap: .5rem; align-items: center; }
.bar-split                  { display: flex; height: 10px; border-radius: var(--r-pill); overflow: hidden; width: 100%; }
.bar-split-seg              { flex: 1; height: 100%; }
.compare-reset-btn          { font-size: .78rem; padding: .2rem .5rem; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }

/* ── 23. Lieferung / Verkostung spezifisch ───────────────────── */
.tasting-headline {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}

.tastings-overview { }

.deliveries-overview { }

.supplier-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.status-dot-active   { width: 8px; height: 8px; background: var(--success); border-radius: 50%; display: inline-block; }
.status-dot-inactive { width: 8px; height: 8px; background: var(--text-subtle); border-radius: 50%; display: inline-block; }
.status-bar-active   { display: flex; align-items: center; gap: .4rem; color: var(--success); font-size: .8rem; font-weight: 600; }
.status-bar-inactive { display: flex; align-items: center; gap: .4rem; color: var(--text-muted); font-size: .8rem; }

.dot-green  { width: 8px; height: 8px; background: var(--success); border-radius: 50%; display: inline-block; }
.dot-orange { width: 8px; height: 8px; background: var(--brand); border-radius: 50%; display: inline-block; }
.dot-gray   { width: 8px; height: 8px; background: var(--text-subtle); border-radius: 50%; display: inline-block; }

.product-rate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: .75rem;
}

/* ── 24. Suchfeld & Filter ───────────────────────────────────── */
.search-group-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-subtle);
  margin-bottom: .35rem;
}

.filter-btn {
  padding: .35rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  font-size: .8rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--ease);
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--brand-light);
}

/* ── 25. Spezial-Inputs ──────────────────────────────────────── */
.qty-input {
  width: 70px;
  text-align: center;
  padding: .35rem .5rem;
}

.qty-input-sm {
  width: 55px;
  text-align: center;
  padding: .25rem .4rem;
  font-size: .8rem;
}

.qty-input-xs {
  width: 45px;
  text-align: center;
  padding: .18rem .35rem;
  font-size: .75rem;
}

.qty-saved {
  font-size: .75rem;
  color: var(--success);
  font-weight: 500;
  opacity: 0;
  transition: opacity .3s;
}
.qty-saved.visible { opacity: 1; }

.cell-input-transparent {
  background: transparent;
  border: none;
  width: 100%;
  padding: .2rem .3rem;
  font-family: var(--font);
  font-size: .875rem;
  color: var(--text);
}
.cell-input-transparent:focus {
  outline: 2px solid var(--brand);
  background: var(--surface);
  border-radius: var(--r-xs);
}

.checkbox-md { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.checkbox-sm { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; }

/* ── 26. Drop-Zone ───────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: center;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: .875rem;
  transition: border-color var(--ease), background var(--ease);
  cursor: pointer;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}

/* ── 27. Akkordeon ───────────────────────────────────────────── */
.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: .875rem 1rem;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--r-md);
  transition: background var(--ease);
}
.accordion-trigger:hover { background: var(--surface-hover); }

/* ── 28. Hilfsvariablen für Tabellen (Legacy-Compat) ─────────── */
.tr-separator td { border-top: 2px solid var(--border-strong) !important; }
.desktop-only { }

/* ── 29. Diverses ────────────────────────────────────────────── */
.preview-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-2);
  line-height: 1.6;
  overflow-x: auto;
}

.pre-sm {
  font-family: var(--font-mono);
  font-size: .78rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .4rem .65rem;
}

.qr-box {
  display: inline-flex;
  padding: .75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.upload-button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  background: var(--surface-3);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--ease);
}
.upload-button:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-light); }

.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner-blue {
  border-top-color: var(--info);
}
@keyframes spin { to { transform: rotate(360deg); } }

.bg-success { background: var(--success-bg); }
.bg-danger  { background: var(--danger-bg); }

/* ── Kontrollcenter ── */
.kontrollcenter-nav {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* ── Sortiment/Folder spezifisch ── */
.spoon-btn-wrap { display: flex; gap: .35rem; }
.spoon-link { color: #ff7f32; font-weight: 700; text-decoration: none; font-size: 2rem; line-height: 1; display: inline-block; }
.spoon-link:hover { color: var(--brand-hover); text-decoration: underline; }
.backup-label-input { font-size: .8rem; padding: .25rem .55rem; }
.backup-label-saved { color: var(--success); font-size: .78rem; font-weight: 500; }

/* ── Bulk actions ── */
.bulk-action-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: var(--r-md);
  margin-bottom: 1rem;
}

/* ── Company Logo ── */
.company-logo-lg { height: 64px; width: auto; object-fit: contain; }
.company-logo-sm { height: 32px; width: auto; object-fit: contain; }

/* ── Chart ── */
.chart-label { font-size: .72rem; color: var(--text-muted); }

/* ── Edit form panel ── */
.edit-form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}

/* ── 30. Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .desktop-nav-only { display: none !important; }
  .mobile-header-actions { display: flex; }
  .desktop-only { display: none !important; }

  .mob-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 300;
    padding: .35rem 0 max(.35rem, env(safe-area-inset-bottom));
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-shadow: 0 -2px 12px rgba(0,0,0,.07);
  }

  .mob-bottom-nav::-webkit-scrollbar { display: none; }

  .mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .35rem .6rem;
    text-decoration: none;
    color: var(--text-muted);
    min-width: 56px;
    flex-shrink: 0;
    border-radius: var(--r-sm);
    transition: color var(--ease), background var(--ease);
  }

  .mob-nav-item.active,
  .mob-nav-item:hover {
    color: var(--brand);
    background: var(--brand-light);
    text-decoration: none;
  }

  .mob-nav-icon { line-height: 1; }
  .mob-nav-label { font-size: .62rem; font-weight: 500; white-space: nowrap; }

  main.page-shell {
    margin-bottom: 5.5rem;
    padding: 0 1rem;
  }

  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .hero-card { padding: 1.5rem; }
  .form-grid-two { grid-template-columns: 1fr; }
  .grid-2col { grid-template-columns: 1fr; }
  .login-wrapper { padding: 1rem 1rem 2rem; align-items: center; }
}

@media (max-width: 480px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 1.35rem; }
  main.page-shell { padding: 0 .875rem; }
}

/* ── 31. Print ───────────────────────────────────────────────── */
@media print {
  .site-header, .mob-bottom-nav, #toast-container { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  main.page-shell { margin: 0; padding: 0; }
}


/* ── Foto-Grid (Tasting Summary) ─────────────────────────────── */
.photos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.photo-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  margin: 0;
  width: 90px;
  flex-shrink: 0;
}

.photo-tile img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: box-shadow var(--ease-md), transform var(--ease-md);
  display: block;
}

.photo-tile img:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.05);
}

.photo-tile figcaption {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 90px;
}

/* ── Produkt-Bild in Summary-Header ─────────────────────────── */
.product-thumb-wrap {
  flex-shrink: 0;
}

.product-summary-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: block;
}

/* ── Bild-Klassen (vollständiges System) ────────────────────── */

/* Überblick-Kachel (criteria-card, comparison-card) — 72x72 */
.product-overview-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: block;
}

/* Detail-Ansicht im Produkt-Abschnitt — zentriert, max 200px */
.product-detail-img {
  max-width: 200px;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: .5rem;
  display: inline-block;
}

/* Floated Thumb (Tasting-Start Seite) — rechts, 100px */
.product-float-thumb {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 4px;
  float: right;
  margin: 0 0 .75rem 1rem;
  display: block;
}

/* Inline Foto in Tasting-Start Tabelle — 56x56 */
.photo-inline-sm {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  display: block;
}

/* Tabellen-Thumbnail (Bestellungen) — 40x40 */
.img-thumb-xs {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: block;
}

/* Produkt-Thumbnail in Vergleichskarten (Tasting-Zusammenfassung) */
.img-thumb-sm {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: block;
  flex-shrink: 0;
}

/* Logo in Lieferung-Detail (innerhalb img-frame-lg) */
.logo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Company-Logo auf Rating-Abschluss-Seite */
.company-logo-rating {
  max-height: 56px;
  width: auto;
  object-fit: contain;
  display: inline-block;
  margin-bottom: 1rem;
}

/* product-card-img: max-width damit es in breiten Cards nicht riesig wird */
.product-card-img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  background: var(--surface-2);
  display: block;
  margin: 0 auto;
}

/* ── Foto Lightbox Overlay ───────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  cursor: zoom-out;
  pointer-events: none;
}



/* ── Produktdetail: stabiles Layout ─────────────────────────── */
.product-detail-shell {
  padding: 1.25rem;
}
.product-detail-shell form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.product-detail-top {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 2.25rem;
  align-items: start;
}
.product-detail-media {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  position: static !important;
}
.product-detail-media .img-frame-md,
.product-detail-media .img-placeholder-md {
  width: 100%;
  height: 280px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.product-detail-media .img-frame-md img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.product-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  align-content: start;
}
.product-detail-grid .col-full {
  grid-column: 1 / -1;
}
.product-detail-grid label {
  display: block;
  margin-bottom: 0;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: .04em;
  width: 100%;
}
.product-detail-grid label input,
.product-detail-grid label select,
.product-detail-grid label textarea {
  display: block;
  width: 100%;
  margin-top: .3rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: .875rem;
  font-weight: 400;
}
.product-detail-text-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.product-detail-text-row label {
  display: block;
  margin-bottom: 0;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: .04em;
  width: 100%;
}
.product-detail-text-row label textarea {
  display: block;
  width: 100%;
  margin-top: .3rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: .875rem;
  font-weight: 400;
  resize: vertical;
  height: 90px;
}
.product-detail-upload-row {
  margin-top: 0;
}
.product-detail-stack {
  display: grid;
  gap: 1rem;
  margin-top: 0;
}
.product-detail-stack > .card {
  margin-top: 0 !important;
}
.product-detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0;
}
.product-detail-actions form {
  margin: 0;
}

@media (max-width: 980px) {
  .product-detail-top {
    grid-template-columns: 1fr;
  }
  .product-detail-media {
    width: 100%;
    min-width: 0;
    max-width: none;
    position: static;
  }
  .product-detail-media .img-frame-md,
  .product-detail-media .img-placeholder-md {
    height: 240px;
    min-height: 240px;
  }
}

@media (max-width: 720px) {
  .product-detail-grid.ro-field-grid,
  .product-detail-grid.ro-field-grid-sm,
  .product-detail-text-grid {
    grid-template-columns: 1fr;
  }
  .product-detail-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .product-detail-actions > * {
    width: 100%;
  }
}


/* ── Produktliste: feste Kartenpositionen ────────────────────── */
.product-list-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  min-height: 320px;
  position: relative;
}
.product-list-card-media {
  height: 170px;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .85rem;
}
.product-list-card-media .product-img-sm {
  width: 100%;
  max-width: 100%;
  height: 170px;
  object-fit: contain;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.product-list-card-media .text-muted {
  width: 100%;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.product-list-card-body {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  flex: 1 1 auto;
  min-height: 0;
}
.product-list-card-title {
  min-height: 3.3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-list-card-meta {
  min-height: 2.4em;
}
.product-list-card-actions {
  margin-top: auto;
  padding-top: .9rem;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
}
.product-list-card-info {
  align-self: flex-start;
}

@media (max-width: 640px) {
  .product-list-card {
    min-height: 0;
  }
  .product-list-card-title,
  .product-list-card-meta {
    min-height: 0;
  }
}


/* ── Produktübersicht: Kachelabstände wie im restlichen Design ── */
#product-grid.criteria-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 1.5rem !important;
  row-gap: 1.5rem !important;
  column-gap: 1.5rem !important;
  align-items: stretch;
}
#product-grid.criteria-grid > .product-list-card,
#product-grid.criteria-grid > .criteria-card.product-compare-card.product-list-card {
  margin: 0 !important;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 720px) {
  #product-grid.criteria-grid {
    gap: 1rem !important;
    row-gap: 1rem !important;
    column-gap: 1rem !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   PRODUKT-SEITEN OVERRIDES (konsolidiert 2026-04-12)
   ══════════════════════════════════════════════════════════════ */

/* Utility-Klassen */
.m-0         { margin: 0 !important; }
.min-280     { min-width: 280px; }
.max-420     { max-width: 420px; }
.input-sm-mt { margin-top: .25rem !important; }



/* ── Produktdetail: sauberes 2-Spalten-Layout ──────────────── */
.pd-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.25rem;
  align-items: start;
}
.pd-media-col {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.pd-media-col .img-frame-md,
.pd-media-col .img-placeholder-md {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.pd-media-col .img-frame-md img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pd-fields-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
  align-content: start;
}
.pd-field {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  grid-column: span 2;
}
.pd-field-full {
  grid-column: 1 / -1;
}
.pd-field-half {
  /* bleibt in der normalen Spalte (kein grid-column override) */
}
.pd-field-quarter {
  grid-column: span 1;
}
.pd-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-subtle, #888);
}
.pd-input {
  width: 100%;
  box-sizing: border-box;
  padding: .35rem .55rem;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 6px;
  font-size: .855rem;
  font-family: inherit;
  background: var(--surface, #fff);
  color: var(--text, #1a1a1a);
  transition: border-color .15s;
}
.pd-input:focus {
  outline: none;
  border-color: var(--accent, #ff7f32);
}
textarea.pd-input {
  resize: vertical;
  min-height: 52px;
}
@media (max-width: 900px) {
  .pd-layout { grid-template-columns: 1fr; }
  .pd-media-col { max-width: 240px; }
}
@media (max-width: 600px) {
  .pd-fields-col { grid-template-columns: 1fr 1fr; }
  .pd-field { grid-column: span 1; }
  .pd-field-full { grid-column: 1 / -1; }
  .pd-field-half { grid-column: span 1; }
  .pd-field-quarter { grid-column: span 1; }
}
/* Kacheln (Uebersicht): full-bleed Bild */
#product-grid .criteria-card.product-list-card { padding: 0; }
#product-grid .criteria-card.product-list-card > .compare-cb-label {
  position: absolute; top: .5rem; left: .5rem; z-index: 2;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: .2rem .4rem;
  display: flex; align-items: center; gap: .3rem; opacity: .85;
}
#product-grid .criteria-card.product-list-card > .spoon-btn-wrap {
  position: absolute; bottom: .5rem; left: .5rem; z-index: 2;
}
#product-grid .criteria-card.product-list-card > .product-img-container.product-list-card-media {
  margin-bottom: 0; height: 160px; min-height: 160px;
}
#product-grid .criteria-card.product-list-card .product-list-card-media .product-img-sm,
#product-grid .criteria-card.product-list-card .product-list-card-media .text-muted {
  border-radius: 0; height: 160px;
}
#product-grid .criteria-card.product-list-card > .product-list-card-body {
  padding: .8rem .85rem .1rem;
}
#product-grid .criteria-card.product-list-card > .product-list-card-actions {
  padding: 0 .85rem .85rem;
}

/* Kachelgrid: gap 1.5rem */
#product-grid.criteria-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 1.5rem !important;
  align-items: stretch;
}
#product-grid.criteria-grid > .product-list-card {
  margin: 0 !important;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 720px) {
  #product-grid.criteria-grid { gap: 1rem !important; }
}

/* ── Aktive-Verkostung Top-Container ──────────────────────────── */
.active-tasting-top {
  width: 100%;
}
.active-tasting-top .tile-active-tasting {
  width: 100%;
  box-sizing: border-box;
}

/* ── QR-Code groß (rechts in Aktive-Verkostung-Kachel) ──────────────────── */
.qr-box-lg {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.qr-box-lg img {
  width: 200px;
  height: 200px;
  display: block;
}

/* ── Aktive-Verkostung-Tile: zweispaltig ────────────────────────────────── */
.tile-active-inner {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.tile-active-content {
  flex: 1;
  min-width: 0;
}
.tile-active-qr {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
@media (max-width: 600px) {
  .tile-active-inner { flex-direction: column; }
  .tile-active-qr { align-items: center; width: 100%; }
  .qr-box-lg img { width: 160px; height: 160px; }
}

/* ── Aktive Verkostung – größere Darstellung ────────────────────────────── */
.active-tasting-top {
  width: 100%;
}
.active-tasting-top .tile-active-tasting {
  padding: 2.5rem;
  min-height: 320px;
}
.active-tasting-top .tile-title-active  { font-size: 1.25rem; }
.active-tasting-top .tile-subtitle-active { font-size: .9rem; }
.active-tasting-top .tile-name-active   { font-size: 1.15rem; }
.active-tasting-top .tile-text          { font-size: .95rem; }
.active-tasting-top .qr-box-lg img      { width: 240px; height: 240px; }

/* ── Buttons in aktiver Kachel nach unten schieben ──────────────────────── */
.tile-active-content {
  display: flex;
  flex-direction: column;
}
.tile-active-content .flex-row-sm {
  margin-top: auto;
  padding-top: 2rem;
}

/* ══════════════════════════════════════════════════════════════════
   Rate-Page – Produkt-Karte (prc = product-rate-card)
   ══════════════════════════════════════════════════════════════════ */
.prc-badge        { font-size:.75rem; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; }
.prc-title        { font-size:1.2rem; font-weight:700; color:var(--text); }

/* Bild links + Meta rechts */
.prc-layout       { display:flex; gap:1.25rem; align-items:flex-start; margin-bottom:1rem; }
/* ══════════════════════════════════════════════════════════════
   RATE-PAGE  (rp-*)  — komplett neu
   ══════════════════════════════════════════════════════════════ */

/* Seiten-Wrapper */
.rp-page { max-width: 860px; margin: 0 auto; }

/* Produkt-Karte */
.rp-product-card  { border-top: 3px solid var(--brand); }
.rp-product-header{ margin-bottom: 1rem; }
.rp-badge { display: inline-block; font-size: .7rem; font-weight: 700;
            text-transform: uppercase; letter-spacing: .07em;
            color: var(--brand-dark); background: var(--brand-light);
            border-radius: var(--r-pill); padding: .2rem .65rem; margin-bottom: .4rem; }
.rp-product-name  { font-size: 1.3rem; font-weight: 700; margin: 0; }

/* Bild + Meta nebeneinander */
.rp-info-row      { display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: .5rem; }
.rp-img-wrap      { width: 150px; height: 150px; flex-shrink: 0; overflow: hidden;
                    border-radius: var(--r-md); border: 1px solid var(--border); }
.rp-img-wrap img  { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-img-hidden     { display: none !important; }
.rp-img-placeholder { width: 150px; height: 150px; flex-shrink: 0; border-radius: var(--r-md);
                      background: var(--surface-2); border: 1px dashed var(--border); }
.rp-info-meta     { flex: 1; min-width: 0; }
.rp-meta-grid     { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                    gap: .35rem .75rem; margin-bottom: .5rem; }
.rp-meta-full     { margin-bottom: .35rem; }
.rp-field-label   { display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase;
                    letter-spacing: .05em; color: var(--text-muted); margin-bottom: .15rem; }
.rp-field-val     { display: block; font-size: .875rem; color: var(--text); }

/* Abschnitts-Trennlinie */
.rp-section-divider {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); border-bottom: 2px solid var(--border);
  padding-bottom: .35rem; margin: 1.5rem 0 .75rem;
}
.rp-req-note  { font-size: .72rem; font-weight: 400; color: var(--error,#dc2626);
                text-transform: none; letter-spacing: 0; }
.rp-star      { color: var(--error,#dc2626); }



/* Gesamtkommentar */
.rp-textarea { width: 100%; box-sizing: border-box; resize: vertical; display: block; }

/* Kriterien-Grid */

.rp-select {
  margin-top: .25rem; padding: .45rem .6rem;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); font-size: .875rem; color: var(--text);
  appearance: auto;
}
.rp-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }

/* Foto-Upload */
.rp-photo-label {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border: 1.5px dashed var(--border);
  border-radius: var(--r-md); font-size: .875rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: border-color .15s;
}
.rp-photo-label:hover { border-color: var(--brand); color: var(--brand-dark); }

/* Abschluss-Card */
.rp-submit-card { border-top: 3px solid var(--brand); }

/* Fehler-Highlight */
.rp-field-error { border: 2px solid #dc2626 !important;
                  box-shadow: 0 0 0 3px rgba(220,38,38,.15) !important;
                  border-radius: var(--r-sm) !important; }
.rp-marktreif-row.rp-field-error { outline: 2px solid #dc2626;
                                    outline-offset: 4px; border-radius: var(--r-sm); }

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .rp-info-row          { flex-direction: column; }
  .rp-img-wrap,
  .rp-img-placeholder   { width: 100%; height: 120px; }
  .rp-img-hidden        { display: none !important; }
  .rp-crit-grid         { grid-template-columns: 1fr; }
  .rp-marktreif-row     { flex-wrap: wrap; }
}

/* ── Abschluss-Zeile: Marktreif links + Gesamtkommentar rechts ── */
.rp-bottom-row   { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.rp-bottom-left  { flex-shrink: 0; }
.rp-bottom-right { flex: 1; min-width: 200px; }
@media (max-width: 600px) {
  .rp-bottom-row { flex-direction: column; }
  .rp-bottom-right { min-width: 0; width: 100%; }
}

/* ── Produktinfo Definition-List ─────────────────────────────── */
.rp-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .3rem 1rem;
  margin: 0;
}
.rp-dl dt {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
  white-space: nowrap; padding-top: .1rem;
}
.rp-dl dd {
  font-size: .875rem; color: var(--text); margin: 0;
}

/* ── Kriterium Kommentar-Button ──────────────────────────────── */
.rp-comment-wrap   { margin-top: .6rem; }
.rp-comment-toggle {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .78rem; font-weight: 600; color: var(--text-muted);
  background: none; border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: .25rem .7rem;
  cursor: pointer; transition: all .15s;
}
.rp-comment-toggle:hover,
.rp-comment-toggle.rp-comment-active {
  border-color: var(--brand); color: var(--brand-dark);
  background: var(--brand-light);
}
.rp-comment-area {
  width: 100%; box-sizing: border-box;
  margin-top: .5rem; resize: vertical;
}

/* ── Kriterien-Grid ──────────────────────────────────────────── */


/* ── Kriterien-Grid ──────────────────────────────────────────── */
.rp-crit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-top: .75rem;
}

/* Einzelne Kriterien-Kachel */
.rp-crit-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #d1d5db;
  border-bottom: 2px solid #f97316;
  border-left: 4px solid var(--brand);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.25rem 1.25rem 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.rp-crit-card:focus-within {
  border-left-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light), 0 2px 8px rgba(0,0,0,.08);
}

/* Header: Nummer-Badge + Name */
.rp-crit-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .6rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid #e5e7eb;
}
.rp-crit-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  flex-shrink: 0;
}
.rp-crit-name  { font-size: .95rem; font-weight: 700; color: var(--text); }
.rp-crit-desc  { font-size: .8rem; color: var(--text-muted); line-height: 1.5; margin-bottom: .5rem; }
.rp-crit-label { display: flex; flex-direction: column; margin-top: auto; padding-top: .5rem; }

@media (max-width: 600px) {
  .rp-crit-grid { grid-template-columns: 1fr; gap: 1rem; }
}



/* ══════════════════════════════════════════════════════════════════
   Summary-Page Layout Fixes
   ══════════════════════════════════════════════════════════════════ */

/* criteria-grid standalone (summary-page, außerhalb #product-grid) */
.criteria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* criteria-card standalone */
section.criteria-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.criteria-card-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: .3rem;
}

.criteria-card-text {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* card-sm: background + border hinzufügen */
.card-sm {
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* label-semi-sm */
.label-semi-sm {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-subtle);
  margin-bottom: .35rem;
}

/* img-tile-sm für Foto-Grid */
.img-tile-sm {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--r-md);
  display: block;
  flex-shrink: 0;
}

/* product-flex: wrap + overflow-safe */
.product-flex {
  flex-wrap: wrap;
}
.product-flex > div:first-child {
  flex-shrink: 0;
  max-width: 200px;
}
.product-info {
  flex: 1;
  min-width: 0;
}

/* info-item-value: kein Overflow */
.info-item-value {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* grid-info-md Zellen: kein Overflow */
.grid-info-md > * {
  min-width: 0;
  word-break: break-word;
}


/* ── Produktseite: Palette sichtbar ─────────────────────────── */
.palette-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .55rem;
  border-radius: var(--r-pill);
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  color: var(--brand-dark);
  font-size: .78rem;
  font-weight: 700;
  margin-top: .35rem;
}

/* ── Mobile: Header oben fix, Nav unten fix, sauberer Abstand ── */
@media (max-width: 768px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 400;
  }

  .mob-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 450;
  }

  main.page-shell {
    padding-top: .75rem;
    padding-bottom: calc(6.25rem + env(safe-area-inset-bottom));
  }

  .product-detail-shell {
    padding: .9rem;
  }

  .product-detail-top {
    gap: .9rem;
  }

  .product-detail-media,
  .pd-media-col {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .product-detail-media .img-frame-md,
  .product-detail-media .img-placeholder-md,
  .pd-media-col .img-frame-md,
  .pd-media-col .img-placeholder-md {
    height: 220px;
    min-height: 220px;
  }

  .pd-fields-col,
  .product-detail-grid,
  .ro-field-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ── Login-Seite responsive ─────────────────────────────────── */
.login-wrapper {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg);
  box-sizing: border-box;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
}

.login-card.hero-card {
  padding: 2rem;
}

.login-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-card {
  padding-bottom: 2.6rem;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-card form label {
  display: block;
  width: 100%;
}

.login-card form input,
.login-card form button {
  box-sizing: border-box;
}

.login-card form .mt-5 {
  margin-top: .7rem;
}

.login-logo {
  max-width: min(220px, 72%);
}

.login-footer {
  margin-top: 1rem;
  padding-bottom: .35rem;
  text-align: center;
}

.login-footer .link-muted {
  display: inline-block;
}

.login-logo {
  display: block !important;
  height: 70px !important;
  width: auto !important;
  max-width: 280px !important;
  object-fit: contain !important;
  margin: 0 auto .875rem !important;
}

.login-logo-text {
  display: block;
  font-size: 0.675rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
  letter-spacing: -.02em;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.login-field {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
}

.login-field input {
  display: block;
  width: 100%;
  margin-top: .3rem;
  padding: .6rem .85rem;
  font-size: .9rem;
}

.login-submit-wrap {
  width: 100%;
  margin-top: .5rem;
}

.login-submit-wrap button {
  display: block;
  width: 100%;
  padding: .7rem 1rem;
  font-size: .95rem;
  justify-content: center;
}

.login-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: .825rem;
}

/* Tablet */
@media (max-width: 768px) {
  .header-inner {
    gap: .7rem;
  }

  .header-byline {
    font-size: .72rem;
    max-width: 42%;
    line-height: 1.2;
    text-align: right;
  }

  .login-wrapper {
    min-height: calc(100dvh - 56px);
    padding: 1.25rem .875rem 4.5rem;
    align-items: center;
  }

  .login-card,
  .login-card.hero-card {
    max-width: min(100%, 460px);
    padding: 1.4rem 1.15rem 2rem;
  }

  .login-header {
    margin-bottom: 1.3rem;
  }

  .login-logo {
    height: 60px !important;
    max-width: min(210px, 74%) !important;
    margin: 0 auto .75rem !important;
  }

  .login-card .page-title {
    font-size: 1.42rem;
  }

  .login-card .page-subtitle {
    font-size: .96rem;
    line-height: 1.45;
  }

  .login-card form {
    gap: .95rem;
  }

  .login-card form input {
    padding: .68rem .82rem;
    font-size: .95rem;
  }

  .login-card form .mt-5 {
    margin-top: .6rem;
  }

  .login-card form button {
    min-height: 46px;
  }

  .login-footer {
    margin-top: .95rem;
    font-size: .84rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .site-header-pub {
    height: 52px;
  }

  .header-inner {
    padding: 0 .7rem;
    gap: .55rem;
  }

  .header-logo-pub {
    height: 30px;
  }

  .header-byline {
    display: none;
  }

  .login-wrapper {
    min-height: calc(100dvh - 52px);
    padding: .8rem .75rem 2.7rem;
  }

  .login-card,
  .login-card.hero-card {
    max-width: 100%;
    padding: 1rem .9rem 1.55rem;
    border-radius: 18px;
  }

  .login-header {
    margin-bottom: 1rem;
  }

  .login-logo {
    height: 46px !important;
    max-width: min(165px, 74%) !important;
    margin: 0 auto .6rem !important;
  }

  .login-card .page-title {
    font-size: 1.18rem;
  }

  .login-card .page-subtitle {
    font-size: .88rem;
    line-height: 1.38;
  }

  .login-card form {
    gap: .85rem;
  }

  .login-card form input {
    padding: .72rem .8rem;
    font-size: .95rem;
  }

  .login-card form .mt-5 {
    margin-top: .5rem;
  }

  .login-card form button {
    min-height: 47px;
    font-size: .95rem;
  }

  .login-footer {
    margin-top: 1rem;
    font-size: .86rem;
  }

  .login-footer .link-muted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: .3rem .2rem;
  }
}

@media (max-width: 360px) {
  .header-byline {
    display: none;
  }

  .header-inner {
    justify-content: center;
  }

  .header-brand {
    flex: 0 1 auto;
  }

  .login-wrapper {
    padding-bottom: 2.5rem;
  }

  .login-card,
  .login-card.hero-card {
    padding-left: .85rem;
    padding-right: .85rem;
  }
}

/* ── Orders mobile fix ──────────────────────────────────────── */
.orders-table-view {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.orders-table {
  min-width: 720px;
}

@media (max-width: 768px) {
  .orders-table-view {
    margin: 0 -0.25rem;
    padding: 0 .25rem .25rem;
  }

  .orders-table {
    min-width: 640px;
  }

  .orders-table th,
  .orders-table td {
    white-space: nowrap;
  }

  .order-search-inp {
    width: 100%;
    max-width: 100%;
  }

  .search-group-label,
  #search-ufs-list,
  #search-fremd-list,
  #order-search-results {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}


/* ── Order detail mobile fix ────────────────────────────────── */
.orders-detail-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.orders-detail-table {
  min-width: 760px;
}

.orders-mobile-cards {
  display: none;
}

.order-item-card {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}

.order-item-card:last-child {
  border-bottom: none;
}

.order-item-card .qty-input {
  width: 78px;
  max-width: 78px;
}

@media (max-width: 768px) {
  .orders-detail-table {
    min-width: 640px;
  }

  .orders-mobile-cards {
    display: grid;
    gap: .25rem;
    margin-bottom: 1rem;
  }
}


/* ── Login mobile rebuilt ───────────────────────────────────── */
.login-screen {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-mobile-card {
  width: min(100%, 420px);
  max-width: 420px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  overflow: hidden;
}

.login-screen-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.login-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  margin-bottom: .75rem;
}

.login-logo,
.login-logo-img {
  display: block;
  width: auto;
  max-width: min(240px, 100%);
  max-height: 72px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.login-screen-title {
  margin-bottom: .35rem;
}

.login-screen-subtitle {
  margin-bottom: 0;
}

.login-screen-form {
  width: 100%;
  max-width: 100%;
}

.login-screen-field {
  display: block;
  width: 100%;
  max-width: 100%;
  text-align: left;
  margin-bottom: .95rem;
}

.login-screen-field input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: .35rem;
  padding: .82rem .95rem;
  border-radius: 12px;
  font-size: .96rem;
}

.login-screen-submit,
.login-screen-submit button {
  width: 100%;
  max-width: 100%;
}

.login-screen-submit button {
  min-height: 48px;
  border-radius: 12px;
  justify-content: center;
}

.login-screen-footer {
  text-align: center;
}

@media (max-width: 768px) {
  .login-screen {
    min-height: calc(100dvh - 56px);
    padding: 1.25rem 1rem 6.5rem;
  }

  .login-mobile-card {
    width: min(100%, 360px);
    max-width: 360px;
    padding: 1.5rem 1rem;
    border-radius: 18px;
  }

  .login-logo-wrap {
    min-height: 64px;
  }

  .login-logo,
  .login-logo-img {
    max-width: min(200px, 100%);
    max-height: 60px;
  }

  .login-screen-title {
    font-size: 1.45rem;
  }

  .login-screen-subtitle {
    font-size: .9rem;
    line-height: 1.45;
  }
}

@media (max-width: 480px) {
  .login-screen {
    padding: 1rem .875rem 6.25rem;
  }

  .login-mobile-card {
    width: 100%;
    max-width: 340px;
    padding: 1.25rem .9rem;
  }

  .login-screen-field input {
    padding: .76rem .85rem;
    font-size: .92rem;
  }

  .login-screen-submit button {
    min-height: 46px;
    font-size: .92rem;
  }
}


/* ── Mobile fixed header + bottom nav ───────────────────────── */
@media (max-width: 768px) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
  }

  .mob-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    width: 100%;
  }

  body {
    padding-top: 56px;
  }

  main.page-shell {
    margin-top: 1rem;
    margin-bottom: 0;
    padding-bottom: calc(6rem + env(safe-area-inset-bottom));
  }
}


/* ── Dashboard mobile final layout ──────────────────────────── */
@media (max-width: 768px) {
  body {
    padding-top: 56px;
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .header-inner {
    padding: 0 .875rem;
  }

  .header-brand {
    min-width: 0;
    flex: 1;
  }

  .header-brand-link,
  .header-brand-group {
    min-width: 0;
    max-width: 100%;
  }

  .header-title {
    font-size: .86rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-header-actions {
    gap: .4rem;
    flex-shrink: 0;
  }

  .mobile-username {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mob-bottom-nav {
    min-height: 62px;
    padding-bottom: max(.35rem, env(safe-area-inset-bottom));
  }

  main.page-shell {
    padding: .75rem .875rem calc(6.25rem + env(safe-area-inset-bottom));
    margin-top: 0;
  }

  .hero-card {
    padding: 1.1rem 1rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  .dashboard-tile {
    padding: 1rem;
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 .7rem;
  }

  .header-title {
    font-size: .8rem;
  }

  .mobile-username {
    display: none;
  }

  main.page-shell {
    padding: .7rem .75rem calc(6rem + env(safe-area-inset-bottom));
  }

  .dashboard-tile {
    padding: .95rem .9rem;
  }

  .tile-title {
    font-size: .98rem;
  }
}

/* ─── Präsentationen ──────────────────────────────────── */
.btn-small {
  font-size: .78rem;
  padding: .25rem .65rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  cursor: pointer;
  border-radius: 6px;
  padding: .3rem .7rem;
  font-size: .83rem;
}
.btn-danger:hover {
  background: #fca5a5;
}
.pres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.pres-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.pres-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
.pres-card-thumb {
  height: 140px;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pres-card-body {
  padding: 1rem;
}

/* ─── Präsentationen ──────────────────────────────────── */
.btn-small {
  font-size: .78rem;
  padding: .25rem .65rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  cursor: pointer;
  border-radius: 6px;
  padding: .3rem .7rem;
  font-size: .83rem;
}
.btn-danger:hover {
  background: #fca5a5;
}
.pres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.pres-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.pres-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
.pres-card-thumb {
  height: 140px;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pres-card-body {
  padding: 1rem;
}

/* ─── Präsentationen ──────────────────────────────────── */
.btn-small {
  font-size: .78rem;
  padding: .25rem .65rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  cursor: pointer;
  border-radius: 6px;
  padding: .3rem .7rem;
  font-size: .83rem;
}
.btn-danger:hover {
  background: #fca5a5;
}
.pres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.pres-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.pres-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
.pres-card-thumb {
  height: 140px;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pres-card-body {
  padding: 1rem;
}
/* ── Kalender Mobile Optimierungen ─────────────────────────── */
@media (max-width: 640px){
  .cal-grid { gap: 1px; }
  .cal-dow { font-size: .65rem; padding: .25rem 0; }
  .cal-day { min-height: auto; padding: .1rem .05rem; word-break: break-word; overflow-wrap: anywhere; }
  .cal-day-num { font-size: .65rem; margin-bottom: 1px; }
  .cal-ev-chip { font-size: .55rem; padding: 0 2px; border-radius: 3px; margin-bottom: 1px; }
  .cal-ev-chip:nth-child(n+3) { display: none; }
  .cal-nav { gap: .5rem; flex-wrap: wrap; }
  .cal-nav-btn { min-width: 44px; min-height: 44px; padding: .4rem; }
  .cal-month-label { min-width: 0; font-size: .95rem; flex: 1; }
}

/* ── Products-Listing: OOS-Pill Badge (rechts oben in der Kachel) ── */
.pl-oos-pill {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  border: 1px solid transparent;
  pointer-events: auto;
  white-space: nowrap;
  max-width: calc(100% - 1rem);
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}
.pl-oos-pill.is-ok   { color: #4A5839; border-color: rgba(124, 140, 110, .35); background: rgba(229, 234, 222, .96); }
.pl-oos-pill.is-warn { color: #7A5B14; border-color: rgba(226, 169, 59, .35); background: rgba(248, 237, 208, .96); }
.pl-oos-pill.is-bad  { color: #6B1F19; border-color: rgba(168, 51, 43, .35); background: rgba(244, 217, 214, .96); }
@media (max-width: 640px) {
  .pl-oos-pill { font-size: .62rem; padding: .22rem .45rem; bottom: .4rem; right: .4rem; }
}

/* ── Products-Listing: OOS-Info (Datums-Zeile unter Artikelnummer) ── */
.pl-oos-info {
  font-size: .68rem;
  font-weight: 500;
  line-height: 1.3;
  margin-top: .2rem;
  letter-spacing: .005em;
}
.pl-oos-info-ok   { color: #4A5839; }
.pl-oos-info-warn { color: #7A5B14; }
.pl-oos-info-bad  { color: #6B1F19; }


/* ═══════════════════════════════════════════════════════════════
   Maison Praline — Utility Add-ons (Phase A)
   ═══════════════════════════════════════════════════════════════ */

/* Eyebrow label — small uppercased ember tag above headlines */
.type-eyebrow {
  display: inline-block;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--brand);
}

/* Universal card hover — translateY + warm shadow */
.card:hover,
.criteria-card:hover,
.product-list-card:hover,
.up-card:hover,
.st-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  transition: transform var(--ease-md), box-shadow var(--ease-md);
}

/* Aubergine canvas section utility */
.on-dark {
  background: var(--color-aubergine-500);
  color: var(--color-cream-50);
}
.on-dark h1, .on-dark h2, .on-dark h3,
.on-dark h4, .on-dark h5, .on-dark h6,
.on-dark p { color: var(--color-cream-50); }
.on-dark .text-muted { color: var(--color-cream-300); }
.on-dark a { color: var(--color-cream-50); }
.on-dark a:hover { color: var(--color-ember-400); }


/* ═══════════════════════════════════════════════════════════════
   Maison Praline — Iconography
   Lucide-style: 1.5px stroke, 24px grid, rounded caps, currentColor.
   ═══════════════════════════════════════════════════════════════ */

/* Default: any inline SVG with currentColor stroke → 1.5px + rounded caps */
svg[stroke="currentColor"] {
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Utility classes for explicit icon sizing */
.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-xs { width: 16px; height: 16px; }
.icon-sm { width: 20px; height: 20px; }
.icon-md { width: 24px; height: 24px; }
.icon-lg { width: 32px; height: 32px; }

/* Accent variant — only for the meaningful focus icon (CTA chevron, "new" dot) */
.icon-accent { color: var(--brand); }


/* ═══════════════════════════════════════════════════════════════
   Maison Praline — Dashboard Hero (Aubergine canvas)
   ═══════════════════════════════════════════════════════════════ */
.hero-card.dashboard-hero {
  background: var(--color-aubergine-500);
  border-top: none;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--color-cream-50);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.75rem, 5vw, 3rem);
  border-radius: var(--r-lg);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-card.dashboard-hero::after {
  /* subtle ember glow corner */
  content: '';
  position: absolute;
  right: -120px;
  top: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(243,108,33,0.18) 0%, transparent 65%);
  pointer-events: none;
}
.hero-card.dashboard-hero > * { position: relative; z-index: 1; }

.hero-card.dashboard-hero .type-eyebrow {
  color: var(--color-ember-400);
  margin-bottom: 0.6rem;
  font-size: 12px;
}
.hero-card.dashboard-hero .page-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  color: var(--color-ember-400);
  margin: 0 0 0.6rem;
  font-variation-settings: "opsz" 96;
}
.hero-card.dashboard-hero .page-subtitle {
  color: rgba(251,248,242,0.78);
  font-size: 1.05rem;
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 60ch;
}

@media (max-width: 720px) {
  .hero-card.dashboard-hero { padding: 1.75rem 1.25rem; }
  .hero-card.dashboard-hero::after { width: 220px; height: 220px; right: -80px; top: -80px; }
}

/* === MOBILE BOTTOM NAV FIXATION (final) === */
@media (max-width: 768px) {
  .mob-bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    min-height: 62px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0,0,0,.07);
    padding-bottom: max(.35rem, env(safe-area-inset-bottom));
  }
  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom)) !important;
  }
  main.page-shell {
    padding-bottom: 1rem !important;
    margin-bottom: 0 !important;
  }
}

/* === MOBILE BOTTOM NAV HARD RESET (final v2) === */
@media (max-width: 768px) {
  html, body {
    overflow-x: clip;
    max-width: 100vw;
  }
  body > nav.mob-bottom-nav,
  nav.mob-bottom-nav {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-height: 62px !important;
    z-index: 9999 !important;
    transform: none !important;
    margin: 0 !important;
    background: var(--surface) !important;
    border-top: 1px solid var(--border) !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,.07);
    padding-bottom: max(.35rem, env(safe-area-inset-bottom));
  }
  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom)) !important;
  }
  main.page-shell {
    max-width: 100%;
    margin-bottom: 0 !important;
  }
  /* breite Tabellen scrollen innerhalb ihres Card-Wrappers, statt den Body zu schieben */
  .card { max-width: 100%; overflow-x: auto; }
}

/* ── Compare-Auswahl Touch-Target auf Mobile ────────────────────────── */
@media (max-width: 768px) {
  /* Checkbox sichtbar größer */
  .compare-cb-input {
    width: 22px !important;
    height: 22px !important;
  }
  /* Label vergrößern → 44px+ Touch-Zone, voll deckend */
  #product-grid .criteria-card.product-list-card > .compare-cb-label {
    padding: .55rem .7rem;
    background: #fff;
    border: 1.5px solid var(--border);
    opacity: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
    justify-content: center;
  }
  /* Hover-Lift auf Touch deaktivieren (sticky-hover Bug) */
  .product-compare-card:hover {
    transform: none;
  }
  /* Compare-Bar deutlich über mobiler Nav anheben */
  #compare-bar {
    z-index: 10000 !important;
  }
}

/* ── Benutzerverwaltung (system-page/users) ─────────────────────────── */
.um-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.um-toolbar > .um-toolbar-text { min-width: 0; }
.um-toolbar h2.section-title { margin-bottom: .25rem; }
.um-toolbar p { margin: 0; }

.um-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 700px) {
  .um-stats { grid-template-columns: repeat(2, 1fr); }
}
.um-stat-card {
  background: var(--surface-1, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-md, .55rem);
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.um-stat-card .um-stat-label {
  font-size: .72rem;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}
.um-stat-card .um-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-1, #0f172a);
  line-height: 1.05;
}
.um-stat-card.um-stat-success .um-stat-value { color: #15803d; }
.um-stat-card.um-stat-danger  .um-stat-value { color: #dc2626; }
.um-stat-card.um-stat-muted   .um-stat-value { color: #64748b; }

.um-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1rem;
}
.um-section-header h3 { margin: 0; }
.um-section-header .um-meta {
  font-size: .82rem;
  color: #64748b;
  font-weight: 400;
  margin-left: .25rem;
}

.um-status-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  padding: .15rem .65rem;
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
}
.um-status-active   { background: #dcfce7; color: #166534; }
.um-status-inactive { background: #f1f5f9; color: #64748b; }

.um-role-badge {
  display: inline-flex;
  align-items: center;
  padding: .15rem .55rem;
  border-radius: 4px;
  font-size: .74rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: .01em;
}
.um-role-master       { background: #fef3c7; color: #92400e; }
.um-role-admin        { background: #dbeafe; color: #1e40af; }
.um-role-marketing    { background: #fce7f3; color: #9d174d; }
.um-role-viewer       { background: #f1f5f9; color: #475569; }
.um-role-logistik     { background: #ede9fe; color: #5b21b6; }
.um-role-aussendienst { background: #ffedd5; color: #9a3412; }

.um-fail-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .73rem;
  font-weight: 700;
  white-space: nowrap;
}
.um-fail-time {
  display: block;
  font-size: .7rem;
  color: #94a3b8;
  margin-top: .15rem;
}
.um-no-data { color: #cbd5e1; font-size: .9rem; }
.um-pw-date { font-size: .82rem; color: #475569; }

.um-current-user {
  display: inline-block;
  font-size: .7rem;
  color: #64748b;
  margin-left: .35rem;
  font-weight: 500;
}

.um-actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  align-items: center;
}

.um-edit-panel {
  margin-top: .75rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.um-edit-panel .form-grid-two label { font-size: .85rem; }

/* ── Create-User Form Polish ─────────────────────────────────────────── */
.um-create-form .um-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}
.um-create-form .um-fieldset:last-of-type { margin-bottom: .5rem; }
.um-create-form .um-fieldset-legend {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #64748b;
  padding: 0 0 .55rem 0;
  margin: 0 0 .85rem 0;
  border-bottom: 1px solid #e2e8f0;
  width: 100%;
  display: block;
}
.um-create-form .form-grid-two {
  align-items: start;
  row-gap: 0;
}
.um-create-form label {
  display: block;
  margin: 0;
  font-weight: 500;
  color: #334155;
  padding: 0;
  min-width: 0;
}
.um-create-form .um-label-text {
  display: block;
  font-size: .82rem;
  color: #334155;
  font-weight: 600;
  margin: 0 0 .35rem 0;
  line-height: 1.2;
  letter-spacing: .005em;
}
.um-create-form .um-label-text .um-required {
  display: inline;
  color: #dc2626;
  font-weight: 700;
  margin-left: .2rem;
}
.um-create-form input,
.um-create-form select {
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
}
.um-create-form .um-hint {
  display: block;
  font-size: .72rem;
  color: #94a3b8;
  font-weight: 400;
  margin: .3rem 0 0 0;
  line-height: 1.35;
}
.um-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .75rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 1.5rem;
}
.um-form-actions .um-actions-meta {
  margin-right: auto;
  font-size: .78rem;
  color: #94a3b8;
}
.um-form-actions .um-required { color: #dc2626; font-weight: 700; }
