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

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

/* ── 1. Design Tokens ────────────────────────────────────────── */
:root {
  /* ── Primär-Amber ── */
  --brand:          #f59e0b;
  --brand-hover:    #d97706;
  --brand-light:    #fffbeb;
  --brand-border:   #fde68a;
  --brand-dark:     #92400e;
  --brand-fg:       #000000;

  /* ── Hintergrund & Flächen ── */
  --bg:             #f8f7f5;
  --surface:        #ffffff;
  --surface-2:      #f9fafb;
  --surface-hover:  #f3f4f6;
  --surface-3:      #f3f4f6;

  /* ── Header ── */
  --header-bg:      #ffffff;
  --header-border:  #e5e7eb;
  --header-fg:      #111827;
  --header-muted:   #6b7280;
  --header-hover-bg:rgba(245,158,11,.08);
  --header-active-bg:rgba(245,158,11,.12);
  --header-active-fg:#f59e0b;

  /* ── Grenzen ── */
  --border:         #e5e7eb;
  --border-strong:  #d1d5db;

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

  /* ── Semantik ── */
  --success:        #16a34a;
  --success-bg:     #f0fdf4;
  --success-border: #bbf7d0;
  --success-text:   #14532d;

  --danger:         #dc2626;
  --danger-bg:      #fef2f2;
  --danger-border:  #fecaca;
  --danger-text:    #7f1d1d;

  --warning:        #d97706;
  --warning-bg:     #fffbeb;
  --warning-border: #fde68a;
  --warning-text:   #78350f;

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

  /* ── Schatten ── */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.10), 0 3px 8px rgba(0,0,0,.05);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.12), 0 6px 16px rgba(0,0,0,.07);
  --shadow-amber: 0 4px 14px rgba(245,158,11,.35);

  /* ── 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: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-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;
}

}

/* ── 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; }
a:hover { text-decoration: underline; }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-head);
  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: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  height: 56px;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.06);
}

.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-dark);
  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(--text-muted);
  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(--text);
  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(--text-muted);
  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(--text);
  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;
}

/* 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; }

/* 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); }

/* ── 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-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;
}

.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-wrapper {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
  border-top: 3px solid var(--brand);
}

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

.login-logo {
  height: 56px;
  width: auto;
  margin-bottom: 1rem;
  border-radius: var(--r-sm);
}

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

.login-logo-img {
  height: 56px;
  width: auto;
  margin-bottom: 1rem;
  border-radius: var(--r-sm);
}

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

.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:hover { text-decoration: none; }
.product-card-link:hover .card { box-shadow: var(--shadow-md); border-color: var(--brand-border); }
.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; }
.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: var(--brand); font-weight: 500; text-decoration: none; }
.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; align-items: flex-start; padding-top: 2rem; }
}

@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;
}

/* 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: 1.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: 260px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.pd-media-col {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.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: 1fr 1fr;
  gap: .75rem;
  align-content: start;
}
.pd-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.pd-field-full {
  grid-column: 1 / -1;
}
.pd-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-subtle, #888);
}
.pd-input {
  width: 100%;
  box-sizing: border-box;
  padding: .45rem .6rem;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 6px;
  font-size: .875rem;
  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: 72px;
}
@media (max-width: 900px) {
  .pd-layout { grid-template-columns: 1fr; }
  .pd-media-col { max-width: 280px; }
}
@media (max-width: 600px) {
  .pd-fields-col { grid-template-columns: 1fr; }
  .pd-field-full { grid-column: 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; top: .45rem; right: .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.25
/* ══════════════════════════════════════════════════════════════
   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           { width: 150px; height: 150px; object-fit: cover; flex-shrink: 0;
                    border-radius: var(--r-md); border: 1px solid var(--border); }
.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,
  .rp-img-placeholder   { width: 100%; height: 180px; }
  .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: 1.5rem;
  margin-top: .75rem;
}

/* Einzelne Kriterien-Kachel */
.rp-crit-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #d1d5db;
  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; }
}
