@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* UID brand — UID-Blau auf Weiß (Light-Theme) */
  --primary: #0A3D91;
  --primary-hover: #1F5FBF;
  --secondary: #EAF3FF;

  /* Alias-Namen (Downstream-CSS nutzt weiter --brand-teal*/--brand-navy*) */
  --brand-teal: var(--primary);
  --brand-teal-hi: var(--primary-hover);
  --brand-teal-soft: var(--secondary);
  --brand-navy: var(--primary);
  --brand-navy-hi: var(--primary-hover);

  /* Surfaces — hell */
  --bg-dark: #FFFFFF;   /* Seiten-Hintergrund */
  --bg-base: #F5F6F8;   /* tiefe Fläche / Tabellen-Kopf */
  --bg-card: #FFFFFF;   /* Karten */
  --bg-soft: #F5F6F8;   /* Inputs, weiche Flächen */
  --bg-hover: #EAF3FF;  /* Hover (helles Blau) */
  --border: #D9DDE5;
  --border-soft: #E7EAF0;

  /* Text — dunkler für bessere Lesbarkeit auf Weiß */
  --text: #232629;
  --text-dim: #4B515A;
  --text-muted: #6A7079;

  /* Status */
  --accent: var(--primary);
  --accent-hi: var(--primary-hover);
  --green: #2E7D32;
  --red: #D32F2F;
  --amber: #F5A623;
  --blue: #1F5FBF;

  /* Display-Serif für große Titel, Manrope bleibt Body */
  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --sidebar-w: 232px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 3px rgba(16,24,40,0.06), 0 10px 24px -10px rgba(16,24,40,0.16), 0 24px 48px -24px rgba(16,24,40,0.22);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg-dark);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient depth: sehr dezenter Blau-Schein oben rechts */
body {
  background:
    radial-gradient(1200px 620px at 88% -12%, rgba(10,61,145,0.05), transparent 62%),
    radial-gradient(900px 520px at -10% 110%, rgba(31,95,191,0.04), transparent 58%),
    var(--bg-dark);
  background-attachment: fixed;
}

/* Girih-Sternmuster (public/background.svg) als edle, fixe Textur hinter allem.
   Die SVG wird als Maske genutzt und in UID-Blau eingefärbt (statt des Gold-Originals),
   niedrige Deckkraft → dezentes, aber sichtbares Wasserzeichen auf Weiß. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: rgba(10,61,145,0.32);
  -webkit-mask-image: url('/background.svg');
          mask-image: url('/background.svg');
  -webkit-mask-repeat: repeat;         mask-repeat: repeat;
  -webkit-mask-size: 720px auto;       mask-size: 720px auto;
  opacity: 1;
}
/* Inhalt über die Textur heben (Sidebar hat bereits z-index:40) */
.layout { position: relative; z-index: 1; }

a { color: var(--accent-hi); text-decoration: none; }
a:hover { color: #1F5FBF; }

::selection { background: var(--brand-teal-soft); color: var(--text); }

/* Icons (inline SVG, currentColor — hydratisiert von admin.js uiIcon/data-icon) */
.ui-ico { display: block; flex-shrink: 0; width: 18px; height: 18px; }
.btn .ui-ico { width: 16px; height: 16px; }
.btn-sm .ui-ico { width: 15px; height: 15px; }
.ql-icon .ui-ico { width: 20px; height: 20px; }
.drop-icon .ui-ico { width: 26px; height: 26px; }
.refresh-icon .ui-ico { width: 15px; height: 15px; }

/* Layout */
.layout { display: flex; min-height: 100vh; }

/* Sidebar — UID-Blau, helle Schrift */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0A3D91 0%, #072F70 100%);
  border-right: 1px solid rgba(255,255,255,0.10);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 22px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-brand .brand-home {
  display: inline-block;
  line-height: 0;
  border-radius: 6px;
  align-self: flex-start;
}
.sidebar-brand .brand-home:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 4px;
}

.sidebar-brand .brand-logo {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.sidebar-brand .brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.sidebar ul {
  list-style: none;
  padding: 14px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: rgba(255,255,255,0.74);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
  position: relative;
}

.sidebar ul li a:hover { color: #fff; background: rgba(255,255,255,0.10); }

.sidebar ul li.active a {
  color: #fff;
  background: rgba(255,255,255,0.14);
  font-weight: 600;
}

.sidebar ul li.active a::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px; bottom: 8px;
  width: 3px;
  background: #fff;
  border-radius: 0 3px 3px 0;
}

.sidebar ul li.logout {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 12px;
}

/* Identitäts-Block (Benutzer · Rolle · Niederlassung), unten im Sidebar */
.sidebar ul li.si-li {
  margin-top: auto;          /* trägt die Lücke, drückt Identität + Abmelden nach unten */
  padding: 4px 14px 8px;
}
.sidebar ul li.si-li + li.logout { margin-top: 0; }  /* Identität trägt bereits die auto-Lücke */
.sidebar ul li.si-li .si-user { font-size: 13px; font-weight: 700; color: #fff; }
.sidebar ul li.si-li .si-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.58);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.sidebar ul li.logout a { color: rgba(255,255,255,0.62); }
.sidebar ul li.logout a:hover { color: #fff; background: rgba(255,255,255,0.10); }

/* Content */
.content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 48px 56px 80px;
  overflow-y: auto;
  min-height: 100vh;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-soft);
}

.page-header h1 {
  font-size: 29px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Grouped actions on the right of a page header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.card h2 {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 22px;
  letter-spacing: -0.01em;
}

.card h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }

/* Hero (Event Status) Card */
.hero-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(10,61,145,0.06), transparent 55%),
    radial-gradient(80% 100% at 100% 100%, rgba(31,95,191,0.07), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, #F5F8FF 100%);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 36px 40px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(31,95,191,0.5), transparent);
}

.hero-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--accent-hi);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--accent-hi);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(31,95,191,0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(31,95,191,0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(31,95,191,0.04); }
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.16;
  margin-bottom: 18px;
}

/* Guest of honor — sharp, sans-serif, diplomatic */
.hero-guest {
  --hg-gold: #0A3D91;
  --hg-gold-hi: #1F5FBF;
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 18px 22px 18px 20px;
  margin: 0 0 28px;
  background:
    linear-gradient(135deg, rgba(216,162,74,0.10) 0%, rgba(216,162,74,0) 38%),
    linear-gradient(180deg, rgba(10,61,145,0.05), rgba(10,61,145,0.02));
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
}
.hero-guest::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 120px at 100% 0%, rgba(216,162,74,0.10), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero-guest .hg-rail {
  flex-shrink: 0;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--hg-gold-hi) 0%, var(--hg-gold) 50%, transparent 100%);
  box-shadow: 0 0 16px rgba(216,162,74,0.35);
}
.hero-guest .hg-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-guest .hg-label {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.hero-guest .hg-pill {
  font-family: 'Manrope', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--hg-gold-hi);
  padding: 3px 8px;
  background: rgba(216,162,74,0.10);
  border: 1px solid rgba(216,162,74,0.30);
  border-radius: 999px;
  line-height: 1.2;
}
.hero-guest .hg-pill-alt {
  color: var(--text-dim);
  background: rgba(10,61,145,0.04);
  border-color: var(--border-soft);
}
.hero-guest .hg-name {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.025em;
}
.hero-guest .hg-role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
}
.hero-guest .hg-role-tr {
  color: var(--text-muted);
  font-weight: 500;
}
.hero-guest .hg-sep {
  color: var(--hg-gold);
  font-weight: 700;
  opacity: 0.7;
}

.hero-when {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.hero-when .hero-dot { color: var(--text-muted); }
.hero-when .hero-date { font-weight: 600; color: var(--text); }

.hero-countdown {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(72px, auto));
  gap: 14px;
  padding: 16px 20px;
  background: rgba(245,246,248, 0.55);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
.hero-countdown .cd-cell {
  text-align: center;
  padding: 0 6px;
  border-right: 1px solid var(--border-soft);
}
.hero-countdown .cd-cell:last-child { border-right: none; }
.hero-countdown .cd-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hero-countdown .cd-lbl {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 6px;
}
.hero-countdown.cd-live .cd-num { color: var(--green); }

.hero-donut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.donut-wrap {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
}
.donut-wrap canvas { display: block; }
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.donut-pct {
  font-size: 38px;
  font-weight: 800;
  color: var(--accent-hi);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.donut-sub {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 6px;
}
.donut-legend {
  display: flex;
  gap: 18px;
  font-size: 12.5px;
  color: var(--text-dim);
  flex-wrap: wrap;
  justify-content: center;
}
.donut-legend strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.dot-checked { background: var(--accent-hi); }
.dot-pending { background: #D9DDE5; border: 1px solid #C4CAD4; }

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  text-align: left;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-teal-soft) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.stat-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(16,24,40,0.06), 0 16px 32px -12px rgba(16,24,40,0.24), 0 32px 56px -28px rgba(16,24,40,0.28);
}
.stat-card:hover::after { opacity: 1; }

.stat-card.success { border-color: rgba(32,178,122,0.35); }
.stat-card.warning { border-color: rgba(224,145,68,0.35); }
.stat-card.info    { border-color: rgba(78,163,214,0.35); }

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stat-trend {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-hi);
  background: var(--brand-teal-soft);
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  font-variant-numeric: tabular-nums;
}
.stat-trend:empty { display: none; }

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-hi);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-card.success .stat-value { color: #2E7D32; }
.stat-card.info    .stat-value { color: #1F5FBF; }
.stat-card.warning .stat-value { color: #F5A623; }

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}

.stat-bar {
  position: relative;
  height: 5px;
  background: rgba(10,61,145,0.05);
  border-radius: 999px;
  overflow: hidden;
}
.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  border-radius: 999px;
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}
.stat-bar-fill.warn { background: linear-gradient(90deg, #C77C00, #F5A623); }
.stat-bar-fill.info { background: linear-gradient(90deg, #0A3D91, #1F5FBF); }

.stat-foot {
  font-size: 12px;
  color: var(--text-muted);
}
.stat-foot span {
  color: var(--text-dim);
  font-weight: 600;
}

/* Card head (title + legend) */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.card-head h2 { margin-bottom: 0; }
.card-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

/* Category chart wrapper — height set via JS */
.cat-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 180px;
}
.cat-chart-wrap canvas { width: 100% !important; height: 100% !important; }

.cat-empty {
  padding: 32px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Refresh button spinner state */
.refresh-icon {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
}
.btn.loading .refresh-icon {
  animation: spin .8s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Quick Links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,0.05), 0 6px 16px -10px rgba(16,24,40,0.16);
}

.quick-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 100% 0%, var(--brand-teal-soft), transparent 50%);
  opacity: 0;
  transition: opacity .2s;
}

.quick-link:hover {
  border-color: rgba(10,61,145,0.5);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(16,24,40,0.06), 0 14px 28px -12px rgba(16,24,40,0.22);
}
.quick-link:hover::before { opacity: 1; }

.ql-icon {
  font-size: 18px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-teal-soft);
  color: var(--accent-hi);
  border-radius: 10px;
  margin-bottom: 4px;
  font-weight: 700;
}

.ql-title { font-size: 14px; font-weight: 700; color: var(--text); }
.ql-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s;
  gap: 8px;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 18px -10px var(--accent);
}
.btn-primary:hover { background: var(--accent-hi); color: #ffffff; transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-hi); background: var(--brand-teal-soft); }

/* Danger — outline (destructive secondary action) */
.btn-danger {
  background: transparent;
  border-color: rgba(223,74,63,0.45);
  color: #D32F2F;
}
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-1px); }

/* Danger — solid fill (primary destructive CTA, e.g. in confirm dialogs) */
.btn-danger-solid {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 18px -10px var(--red);
}
.btn-danger-solid:hover { background: #B71C1C; border-color: #B71C1C; color: #fff; transform: translateY(-1px); }

/* Danger — soft fill (inline table action, e.g. Auschecken/Löschen) */
.btn-danger-soft {
  background: rgba(223,74,63,0.15);
  border-color: rgba(223,74,63,0.4);
  color: #D32F2F;
}
.btn-danger-soft:hover { background: rgba(223,74,63,0.28); border-color: var(--red); color: #fff; }

/* Success — soft fill (inline table action, e.g. Einchecken) */
.btn-success-soft {
  background: var(--brand-teal-soft);
  border-color: rgba(10,61,145,0.4);
  color: var(--accent-hi);
}
.btn-success-soft:hover { background: rgba(10,61,145,0.26); border-color: var(--accent); color: var(--accent-hi); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Keyboard focus — visible, consistent ring across interactive elements */
.btn:focus-visible,
.cs-trigger:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
}
a:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
  border-radius: 4px;
}
.sidebar ul li a:focus-visible { outline-offset: -2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* Forms */
.form-input, .form-select {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow .18s;
}

.form-input::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--brand-teal-soft);
}
.form-select { cursor: pointer; }

/* ── Custom Select (progressive enhancement of native <select>) ──────
   Native <select> option menus are drawn by the OS and overlap the field
   below them — not CSS-positionable. We hide the native control (it stays
   the value/form source) and render our own trigger + listbox panel that
   opens cleanly below the field. */
.cs-native { display: none !important; }

.cs-wrap { display: block; width: 100%; position: relative; }
/* In flex rows the trigger should size to its content, not the whole row. */
.filter-bar > .cs-wrap { width: auto; }
.mapping-row > .cs-wrap { flex: 1; max-width: 320px; width: auto; }

/* Trigger reuses .form-select / .es-select look (class copied at runtime),
   plus room for the chevron. */
.cs-trigger {
  display: inline-flex;
  align-items: center;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding-right: 36px;
}
.cs-trigger .cs-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-trigger .cs-value.cs-placeholder { color: var(--text-muted); }
.cs-chevron {
  position: absolute;
  right: 13px; top: 50%;
  width: 11px; height: 11px;
  transform: translateY(-50%);
  transition: transform .18s ease;
  pointer-events: none;
  color: var(--text-muted);
}
.cs-wrap.cs-open .cs-chevron { transform: translateY(-50%) rotate(180deg); }
.cs-wrap.cs-open .cs-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--brand-teal-soft);
}

/* Panel is appended to <body> and positioned (fixed) relative to the trigger,
   so it is never clipped by the sidebar/cards and sits above the modal (9999). */
.cs-panel {
  position: fixed;
  z-index: 10000;
  min-width: 140px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 48px -22px rgba(0,0,0,0.8), 0 0 0 1px rgba(0,0,0,0.02) inset;
  animation: cs-pop .14s ease;
}
.cs-panel.cs-up { animation-name: cs-pop-up; }
@keyframes cs-pop { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cs-pop-up { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.cs-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
}
.cs-option:hover,
.cs-option.cs-active { background: var(--bg-hover); color: var(--text); }
.cs-option.cs-selected { color: var(--accent-hi); font-weight: 600; }
.cs-option .cs-check { margin-left: auto; flex-shrink: 0; opacity: 0; }
.cs-option.cs-selected .cs-check { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .cs-panel { animation: none; }
  .cs-chevron { transition: none; }
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Drop Zone */
.drop-zone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
}

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

.drop-icon {
  font-size: 28px;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-teal-soft);
  color: var(--accent-hi);
  border-radius: 50%;
  margin-bottom: 4px;
}
.drop-text { font-size: 16px; font-weight: 700; color: var(--text); }
.drop-sub { font-size: 13px; color: var(--text-muted); }

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
}

/* Mapping */
.mapping-grid { display: flex; flex-direction: column; gap: 14px; }
.mapping-row { display: flex; align-items: center; gap: 16px; }
.mapping-row label { width: 170px; font-size: 13px; color: var(--text-dim); flex-shrink: 0; font-weight: 500; }
.mapping-row select { flex: 1; max-width: 320px; }

/* Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background: var(--bg-base);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-soft);
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(10,61,145,0.05); }

/* Guest list is a wide table (10 cols) — freeze the Aktion column to the right
   edge so check-in / approve / delete stay reachable without horizontal scroll. */
.guests-table th:last-child,
.guests-table td:last-child {
  position: sticky;
  right: 0;
  background: var(--bg-card);
  box-shadow: -10px 0 12px -10px rgba(16,24,40,0.25);
}
.guests-table th:last-child {
  background: var(--bg-base);
  z-index: 2;
}
.guests-table td:last-child { z-index: 1; }
/* Keep the frozen cell opaque on row hover (must cover columns scrolling under it). */
.guests-table tr:hover td:last-child { background: #EEF3FA; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge.success { background: rgba(32,178,122,0.15); color: #2E7D32; border-color: rgba(32,178,122,0.35); }
.badge.muted { background: rgba(10,61,145,0.05); color: var(--text-muted); border-color: var(--border-soft); }
.badge.warn { background: rgba(224,142,20,0.15); color: #b45309; border-color: rgba(224,142,20,0.4); }

/* Category badge — generic, color comes from inline style */
.badge.cat {
  background: rgba(10,61,145,0.05);
  color: var(--text);
  border: 1px solid var(--border-soft);
}

/* VIP badge — distinct, no fill (gold is already taken by A3) */
.badge.cat.vip {
  background: transparent;
  color: var(--accent-hi);
  border: 1px dashed var(--accent);
  box-shadow: 0 0 0 1px rgba(10,61,145,0.15) inset;
  letter-spacing: 0.6px;
}
.badge.cat.vip::before {
  content: "★ ";
  color: var(--accent-hi);
}

/* Color swatch helper (for category management UI) */
.color-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  vertical-align: middle;
  margin-right: 6px;
}
.color-swatch.empty {
  background: repeating-linear-gradient(45deg,
    rgba(0,0,0,0.06) 0 4px,
    transparent 4px 8px);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.table-info {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 8px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  animation: slideUp 0.3s ease;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
}
.toast.success { background: var(--green); color: #fff; }
.toast.error { background: var(--red); color: #fff; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Progress bar (native) */
progress {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-soft);
}
progress::-webkit-progress-bar { background: var(--bg-soft); }
progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  border-radius: 999px;
}
progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 24px 64px -12px rgba(0,0,0,0.6);
  animation: slideUp 0.2s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--accent-hi); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}
.form-group label .req { color: var(--red, #df4a3f); }
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Helpers */
.text-muted { color: var(--text-muted); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
  border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-teal); }

/* Mobile top bar + sidebar drawer (injected by admin.js) */
.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.mobile-topbar .mt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent-hi);
}
.mobile-topbar .mt-brand img { height: 26px; }
.menu-toggle {
  width: 42px; height: 42px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  padding: 0;
  /* Über dem Scrim (z-index:15) halten, damit der öffnende Tap die Sidebar
     nicht sofort wieder schließt und der Button zum Schließen-X wird. */
  position: relative;
  z-index: 25;
  transition: background .18s ease, border-color .18s ease;
}
.menu-toggle:active { background: var(--border-soft); }
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform-origin: center;
  transition: transform .24s cubic-bezier(.2,.7,.2,1), opacity .18s ease;
}
/* Offen → Hamburger wird zum X (aria-expanded von admin.js gesetzt) */
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(.4); }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4,18,46,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  /* MUSS unter der Topbar (z-index:20) liegen: sonst fängt das Overlay den
     öffnenden Tap ab und die Sidebar flackert sofort wieder zu. Sidebar (40)
     und Topbar (20) bleiben darüber, der restliche Content wird abgedunkelt. */
  z-index: 15;
  animation: fadeIn .18s ease;
}
.sidebar-overlay.open { display: block; }

/* Tablet/Mobile breakpoint */
@media (max-width: 960px) {
  .content { margin-left: 0; padding: 0 24px 56px; }
  .mobile-topbar { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.2,.7,.2,1);
    box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6);
  }
  .sidebar.open { transform: translateX(0); }
  body.no-scroll { overflow: hidden; }

  .page-header { padding-top: 20px; margin-bottom: 28px; padding-bottom: 18px; flex-wrap: wrap; gap: 12px; }
  .page-header h1 { font-size: 22px; }
  /* Multi-button headers (guests etc.) drop to their own full-width row on
     narrow screens instead of crowding above the title. */
  .header-actions { width: 100%; justify-content: flex-start; }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 28px 24px;
    gap: 28px;
    margin-bottom: 24px;
  }
  .hero-title { font-size: 21px; }
  .hero-guest .hg-name { font-size: 20px; }
  .donut-wrap { max-width: 200px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .quick-links { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  .card { padding: 24px; }
  .mt-32 { margin-top: 24px; }
  .filter-bar { gap: 8px; }
}

/* Phone breakpoint */
@media (max-width: 540px) {
  .content { padding: 0 18px 48px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 18px 18px 16px; }
  .stat-value { font-size: 1.85rem; }
  .quick-links { grid-template-columns: 1fr; }
  .hero-card { padding: 24px 20px; border-radius: 14px; }
  .hero-title { font-size: 19px; }
  .hero-guest { padding: 12px 14px; }
  .hero-guest .hg-name { font-size: 18px; }
  .hero-guest .hg-role { font-size: 12px; }
  .hero-countdown .cd-num { font-size: 18px; }
  .donut-pct { font-size: 32px; }
  .card { padding: 20px 18px; }
  .card-head { gap: 8px; }
  .card-legend { font-size: 11.5px; gap: 10px; }
  .page-header { flex-wrap: wrap; gap: 8px; }
}

/* Larger desktop refinements */
@media (min-width: 1280px) {
  .content { padding: 40px 48px 64px; }
}

/* ===== Sitzordnung (Seating) ===== */
.seating-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}
.stage-bar {
  text-align: center;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  border-radius: var(--radius, 8px);
  padding: 8px;
  margin-bottom: 14px;
  letter-spacing: 0.1em;
  font-size: 12px;
  text-transform: uppercase;
}
.plan-grid {
  display: grid;
  /* auto-fill (not a fixed 6) so the grid shrinks to the available width instead
     of forcing a ~840px min-content that clips the side panel on desktop and
     overflows the viewport on mobile. */
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-auto-rows: minmax(140px, auto);
  gap: 14px;
}
.zone {
  border: 2px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  background: var(--bg-soft);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.zone:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 18px -8px rgba(0, 0, 0, 0.6);
}
.zone-round {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.zone-label { font-weight: 600; font-size: 13px; color: var(--text); }
.zone-count { display: block; font-size: 12px; color: var(--text-muted); }
.zone-over { border-color: var(--red, #df4a3f); }
.zone-over .zone-count { color: var(--red, #df4a3f); }
.seat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.seat {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
}
.seat-taken {
  background: var(--accent);
  border-color: var(--accent);
}
.unassigned-list {
  max-height: 70vh;
  overflow: auto;
  margin-top: 4px;
}
.unassigned-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.unassigned-item:hover { background: var(--bg-soft); }
.cat-mismatch { color: var(--amber, #f59e0b); font-size: 12px; }

/* Gewählte Gäste („scharf", Mehrfachauswahl) + Banner + Zonen-Hinweis */
.unassigned-item.selected {
  background: var(--brand-teal-soft);
  box-shadow: inset 0 0 0 1px rgba(10,61,145,0.55);
  border-radius: 6px;
  border-bottom-color: transparent;
}

/* Checkbox-Indikator pro Gast (Mehrfachauswahl) */
.unassigned-item .ua-box {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  position: relative;
  transition: background .12s, border-color .12s;
}
.unassigned-item:hover .ua-box { border-color: var(--accent); }
.unassigned-item.selected .ua-box { background: var(--accent); border-color: var(--accent); }
.unassigned-item.selected .ua-box::after {
  content: '';
  position: absolute;
  left: 5px; top: 1.5px;
  width: 4px; height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.unassigned-item .ua-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unassigned-item .ua-cat { flex-shrink: 0; color: var(--text-muted); font-size: 12px; }

/* Auswahl-Leiste über der Gästeliste */
.select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.select-count { font-size: 12px; font-weight: 600; color: var(--accent-hi); font-variant-numeric: tabular-nums; }
.armed-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--brand-teal-soft);
  border: 1px solid rgba(10,61,145,0.4);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-dim);
}
.armed-banner .armed-name { color: var(--accent-hi); }
/* Während eine Auswahl scharf ist: Zonen als „Ziel" hervorheben. */
.plan-grid.arming .zone { border-style: dashed; }
.plan-grid.arming .zone:hover {
  border-color: var(--accent-hi);
  box-shadow: 0 0 0 3px var(--brand-teal-soft);
}

/* Sitzplatz-Auswahl (Modal) */
.seat-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
}
.seat-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
}
button.seat-pick.free {
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .12s;
}
button.seat-pick.free:hover {
  background: var(--brand-teal-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.seat-pick.taken {
  background: rgba(10,61,145,0.04);
  color: var(--text-muted);
  border-style: dashed;
  cursor: not-allowed;
}

/* Anpassungs-Zeilen im "Vorlage anwenden"-Dialog */
.override-hint { margin: 0 0 6px; font-size: 13px; color: var(--text-muted, #6b7280); }
.override-row {
  display: grid;
  grid-template-columns: 70px 70px 150px;
  justify-content: start;
  align-items: end;
  gap: 8px 10px;
  margin-bottom: 14px;
}
.override-label { grid-column: 1 / -1; font-size: 13px; font-weight: 600; }
.override-row label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--text-muted, #6b7280); }
.override-row .form-input,
.override-row .form-select { padding: 4px 6px; font-size: 13px; }

@media (max-width: 800px) {
  .seating-wrap { grid-template-columns: 1fr; }
}
@media print {
  .sidebar,
  .page-header .btn,
  .seating-side,
  #sidePanel { display: none !important; }
  .seating-wrap { grid-template-columns: 1fr; }
}
.overlay-seat { margin-top: 10px; font-size: 22px; font-weight: 700; letter-spacing: .02em; }

/* --- Tisch-Detailansicht (Sitzplan-Modal) --------------------------------- */
.table-view { position: relative; margin: 10px auto 6px; }

/* Runder Tisch: quadratischer Container (Größe/Radius werden per JS anhand der
   Platzanzahl gesetzt, damit sich Stühle nie überlappen). Stühle absolut im Kreis. */
.table-round { max-width: 100%; }
.table-round .table-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 132px; height: 132px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-align: center; font-weight: 700; font-size: 15px; color: var(--text);
  background: var(--surface-2, #f4f4f5);
  border: 1px solid var(--border-soft, #e7eaf0);
  box-shadow: inset 0 0 0 6px var(--bg-card, #fff);
}
.table-center-count { font-weight: 500; font-size: 12px; color: var(--text-muted); }
.table-round .chair { position: absolute; left: 50%; top: 50%; }

/* Reihe/Block: Stühle im Flow — großzügiger Abstand, mittig umbrechend. */
.table-linear {
  display: flex; flex-wrap: wrap; gap: 14px 16px;
  justify-content: center; padding: 12px 4px; max-width: 460px; margin: 0 auto;
}

/* Stuhl-Chip (beide Formen). */
.chair {
  box-sizing: border-box; width: 100px; min-height: 40px;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 9px; border-radius: var(--radius-sm, 8px); font-size: 12.5px;
  border: 1px solid var(--border, #d9dde5); background: var(--surface, #fff);
}
.chair-taken {
  font-weight: 500; color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}
.chair-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chair-num {
  flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: 11px; font-weight: 600;
  background: var(--surface-2, #f4f4f5); color: var(--text-muted);
}
.chair-free {
  opacity: .55; border-style: dashed; background: transparent;
  box-shadow: none;
}
.chair-free .chair-name { font-style: italic; color: var(--text-muted); }
.chair-remove {
  flex: 0 0 auto; margin-left: 2px; border: none; background: transparent; cursor: pointer;
  font-size: 17px; line-height: 1; color: var(--text-muted); padding: 2px 4px; border-radius: 4px;
}
.chair-remove:hover { color: var(--danger, #dc2626); background: rgba(220, 38, 38, 0.08); }
.table-hint { opacity: .7; font-size: 13px; text-align: center; margin: 14px 0 2px; }
