/* ===============================================
   OderOder Enterprise Dashboard - Dark Theme
   =============================================== */

@keyframes pulse-save {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231,76,60,0.5); }
  50% { box-shadow: 0 0 12px 4px rgba(231,76,60,0.4); }
}

/* Wizard */
.wizard-step { display:flex;flex-direction:column;align-items:center;gap:4px;min-width:60px; }
.wizard-num { width:32px;height:32px;border-radius:50%;background:#333;color:#888;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:0.9rem;transition:all 0.3s; }
.wizard-label { font-size:0.7rem;color:#888;transition:color 0.3s; }
.wizard-step.active .wizard-num { background:#c8a96e;color:#0f0e0a; }
.wizard-step.active .wizard-label { color:#c8a96e; }
.wizard-step.done .wizard-num { background:#27ae60;color:#fff; }
.wizard-step.done .wizard-label { color:#27ae60; }
.wizard-line { flex:1;max-width:60px;height:2px;background:#333;align-self:center;margin:0 4px;margin-bottom:18px; }

.template-card {
  border:2px solid #333;border-radius:12px;padding:20px;text-align:center;cursor:pointer;
  transition:all 0.2s;background:rgba(255,255,255,0.02);
}
.template-card:hover { border-color:#c8a96e;background:rgba(200,169,110,0.06); }
.template-card.selected { border-color:#c8a96e;background:rgba(200,169,110,0.1);box-shadow:0 0 0 2px rgba(200,169,110,0.3); }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #0f1014;
  --bg-card: #1a1b26;
  --bg-hover: #252736;
  --bg-input: #12131a;
  --border: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --text-muted: rgba(255,255,255,.55);
  --primary: #5a8be8;
  --primary-hover: #6fa0ff;
  --success: #28a745;
  --warning: #f3a15b;
  --danger: #dc3545;
  --sidebar-width: 260px;
}

/* Light Mode */
body.light-mode {
  --bg-dark: #f0f2f5;
  --bg-card: #ffffff;
  --bg-hover: #f5f6f8;
  --bg-input: #ffffff;
  --border: rgba(0,0,0,.12);
  --text: #111827;
  --text-muted: #4b5563;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
}
body.light-mode .sidebar { background:#ffffff; border-right:1px solid #e5e7eb; }
body.light-mode .sidebar-logo { color:#1a1a2e; }
body.light-mode .sidebar-logo small { color:#6c757d; }
body.light-mode .nav-item { color:#374151; }
body.light-mode .nav-item:hover { background:#e5e7eb; color:#111827; }
body.light-mode .nav-item.active { background:rgba(37,99,235,0.1); color:#2563eb; border-right-color:#2563eb; box-shadow:0 2px 8px rgba(37,99,235,0.15); font-weight:600; }
body.light-mode .topbar { background:#ffffff; border-bottom:1px solid #e5e7eb; }
body.light-mode .stat-card { background:#ffffff; border:1px solid #e5e7eb; }
body.light-mode .stat-value { color:#111827; }
body.light-mode .stat-label { color:#4b5563; }
body.light-mode .profile-card { background:#ffffff; border:1px solid #e5e7eb; }
body.light-mode .section-header h2 { color:#111827; }
body.light-mode .section-header p { color:#4b5563; }
body.light-mode .btn { border-color:#9ca3af; color:#1f2937; }
body.light-mode .btn:hover { border-color:#2563eb; color:#2563eb; }
body.light-mode .btn-primary { background:#2563eb; color:#fff; border-color:#2563eb; }
body.light-mode .btn-primary:hover { background:#1d4ed8; }
body.light-mode input, body.light-mode select, body.light-mode textarea { background:#ffffff; border-color:#9ca3af; color:#111827; }
body.light-mode input:focus, body.light-mode select:focus, body.light-mode textarea:focus { border-color:#2563eb; box-shadow:0 0 0 2px rgba(37,99,235,0.15); }
body.light-mode .toggle-switch .toggle-slider { background:#d1d5db; }
body.light-mode .toggle-switch input:checked + .toggle-slider { background:#3b82f6; }
body.light-mode .menu-category { background:#ffffff; border:1px solid #e5e7eb; }
body.light-mode .menu-category-header { background:#f8f9fa; }
body.light-mode .menu-item { border-bottom:1px solid #f1f3f5; }
body.light-mode .order-tab.active { background:#3b82f6; color:#fff; }
body.light-mode .order-tab { background:#f1f3f5; color:#6c757d; }
body.light-mode #authOverlay { background:#f5f7fa; }
body.light-mode .auth-card { background:#ffffff; border-color:#e5e7eb; }
body.light-mode .auth-card h2 { color:#111827; }
body.light-mode .auth-card p { color:#4b5563; }
body.light-mode .auth-card input { background:#ffffff; border-color:#9ca3af; color:#111827; }
body.light-mode .settings-card { background:#ffffff; border:1px solid #e5e7eb; }
body.light-mode .template-card { border-color:#d1d5db; background:#fff; }
body.light-mode .template-card:hover { border-color:#3b82f6; background:rgba(59,130,246,0.04); }
body.light-mode .template-card.selected { border-color:#3b82f6; background:rgba(59,130,246,0.08); }
body.light-mode .wizard-num { background:#d1d5db; color:#374151; }
body.light-mode .wizard-label { color:#4b5563; }

/* Light Mode: Umfrage-Auswertung */
body.light-mode #detailScoreCard > div,
body.light-mode .survey-detail-card,
body.light-mode [style*="rgba(30,32,50"],
body.light-mode [style*="rgba(20,22,40"],
body.light-mode [style*="#1a1b26"],
body.light-mode [style*="#1e2032"] { background:#ffffff !important; border-color:#e5e7eb !important; color:#111827 !important; }
body.light-mode [style*="color:#fff"] { color:#111827 !important; }
body.light-mode [style*="color:#aaa"], body.light-mode [style*="color:#888"], body.light-mode [style*="color:#666"] { color:#4b5563 !important; }
body.light-mode [style*="stroke:#333"] { stroke:#e5e7eb !important; }
body.light-mode [style*="background:#333"] { background:#e5e7eb !important; }
body.light-mode [style*="border-color:#333"] { border-color:#d1d5db !important; }
body.light-mode .wizard-step.active .wizard-num { background:#3b82f6; color:#fff; }
body.light-mode .wizard-step.active .wizard-label { color:#3b82f6; }
body.light-mode .wizard-line { background:#e5e7eb; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  display: flex;
}

/* ===============================================
   Auth Overlay
   =============================================== */

#authOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#authOverlay.hidden { display: none; }

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo .logo {
  font-size: 1.8rem;
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }

.auth-title {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
  font-size: 0.85rem;
}

.auth-error, .auth-success {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}
.auth-error.show, .auth-success.show { display: block; }

.auth-error {
  background: rgba(220,53,69,.1);
  border: 1px solid rgba(220,53,69,.3);
  color: var(--danger);
}
.auth-success {
  background: rgba(40,167,69,.1);
  border: 1px solid rgba(40,167,69,.3);
  color: var(--success);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-link {
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.85rem;
}
.auth-link:hover { text-decoration: underline; }

/* ===============================================
   Sidebar
   =============================================== */

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--warning));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 10px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.nav-item.active {
  background: rgba(90,139,232,.15);
  color: var(--primary);
}

.nav-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

/* ===============================================
   Main Content
   =============================================== */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.header-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}
.header-brand-slogan {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.content-section {
  display: none;
  padding: 32px;
}
.content-section.active { display: block; }

.section-header {
  margin-bottom: 24px;
}
.section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}
.section-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ===============================================
   Stats Grid
   =============================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

/* ===============================================
   Forms
   =============================================== */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-group input::placeholder { color: var(--text-muted); }

/* Chrome Autofill Override */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  border-color: var(--border) !important;
}

/* ===============================================
   Buttons
   =============================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn:hover { background: var(--bg-hover); }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===============================================
   Survey Cards
   =============================================== */

.survey-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.survey-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.survey-card:hover { border-color: var(--primary); }

.survey-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.survey-card-title {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
  margin-right: 12px;
}

.survey-card-meta {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.survey-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.survey-card-actions .btn {
  padding: 6px 12px;
  font-size: 0.75rem;
}

/* ===============================================
   Status Badge
   =============================================== */

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.status-badge.active {
  background: rgba(40,167,69,.15);
  color: var(--success);
}
.status-badge.inactive {
  background: rgba(255,255,255,.06);
  color: var(--text-muted);
}

/* ===============================================
   Survey Detail
   =============================================== */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.detail-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.detail-info h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-row span:first-child { color: var(--text-muted); }

/* QR Display */
.qr-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  max-width: 280px;
  margin: 0 auto;
}

.qr-share-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  width: 100%;
  margin-top: 16px;
}
.qr-share-link input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
}

/* Result Bars */
.result-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.result-bar-label {
  min-width: 120px;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.result-bar-track {
  flex: 1;
  height: 28px;
  background: var(--bg-hover);
  border-radius: 8px;
  overflow: hidden;
}
.result-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #8ab4f8);
  border-radius: 8px;
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  padding-left: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  min-width: fit-content;
}

/* ===============================================
   Option Editor
   =============================================== */

.option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.option-row input { flex: 1; }

.option-remove {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(220,53,69,.1);
  color: var(--danger);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.option-remove:hover { background: rgba(220,53,69,.25); }

/* ===============================================
   Question Builder
   =============================================== */

.question-type-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.question-type-btn {
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: 10px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.question-type-btn:hover {
  border-color: var(--primary);
  background: rgba(90,139,232,.1);
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  border: 2px dashed var(--border);
  border-radius: 14px;
  font-size: 0.9rem;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.question-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border);
}

.question-card-type {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}

.question-card-num {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.question-card-actions {
  display: flex;
  gap: 4px;
}

.btn-icon {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.btn-icon:hover { background: rgba(255,255,255,.08); color: var(--text); }
.btn-icon-danger:hover { background: rgba(220,53,69,.15); color: var(--danger); }

.question-card-body {
  padding: 16px;
}

.question-text-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  margin-bottom: 10px;
}
.question-text-input:focus { border-color: var(--primary); }
.question-text-input::placeholder { color: var(--text-muted); }

.question-preview {
  padding: 8px 12px;
  background: rgba(90,139,232,.06);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.choice-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.survey-card-business {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ===============================================
   Results: v2 Multi-Question
   =============================================== */

.results-summary {
  margin-bottom: 24px;
}

.results-total {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.result-question-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.result-question-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.result-question-type {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 16px;
}

.result-no-data {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* Stars Result */
.stars-result { display: block; }
.stars-avg {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}
.stars-avg-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--warning);
}
.stars-avg-stars {
  font-size: 1.3rem;
  color: var(--warning);
}
.stars-avg-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stars-distribution { display: block; }
.stars-dist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.stars-dist-label {
  width: 40px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}
.stars-dist-row .result-bar-track {
  flex: 1;
  height: 20px;
}
.stars-fill {
  background: linear-gradient(90deg, var(--warning), #f5c842) !important;
}
.stars-dist-count {
  width: 30px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

/* Yes/No Result */
.yesno-result { display: block; }
.yesno-bar {
  display: flex;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.yesno-yes {
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  transition: width 0.6s ease;
}
.yesno-no {
  background: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  transition: width 0.6s ease;
}
.yesno-counts {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Scale Result */
.scale-result { display: block; }
.scale-avg {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}
.scale-avg-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}
.scale-avg-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.scale-distribution {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 80px;
  margin-bottom: 8px;
}
.scale-dist-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.scale-dist-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary), #8ab4f8);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height 0.6s ease;
}
.scale-dist-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.scale-counts {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Text Responses */
.text-responses {
  max-height: 400px;
  overflow-y: auto;
}

.text-response-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-hover);
  border-radius: 10px;
  margin-bottom: 8px;
  align-items: flex-start;
}
.text-response-icon {
  flex-shrink: 0;
  font-size: 1rem;
}
.text-response-text {
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}

/* ===============================================
   Settings Cards & Accordion
   =============================================== */

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 12px;
}

.settings-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.settings-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}

.settings-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s;
}
.settings-accordion-header:hover {
  background: var(--bg-hover);
}

.accordion-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}
.settings-accordion.open .accordion-arrow {
  transform: rotate(90deg);
}

.settings-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
}
.settings-accordion.open .settings-accordion-body {
  max-height: 500px;
  padding: 0 24px 20px;
}

.settings-accordion-danger .settings-accordion-header span:first-child {
  color: var(--danger);
}
.settings-accordion-danger {
  border-color: rgba(220,53,69,.2);
}

.settings-inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.settings-inline-form input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
.settings-inline-form input:focus {
  border-color: var(--primary);
}

.settings-msg {
  margin-top: 10px;
  font-size: 0.8rem;
  min-height: 20px;
}
.settings-msg.success { color: var(--success); }
.settings-msg.error { color: var(--danger); }

/* ===============================================
   Publish Panel & Pricing
   =============================================== */

.publish-status {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.publish-status.draft {
  background: rgba(90,139,232,.1);
  border: 1px solid rgba(90,139,232,.25);
  color: var(--primary);
}
.publish-status.expired {
  background: rgba(243,161,91,.1);
  border: 1px solid rgba(243,161,91,.25);
  color: var(--warning);
}
.publish-status.paused {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.publish-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.pricing-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pricing-card:hover {
  border-color: var(--primary);
  background: rgba(90,139,232,.05);
}
.pricing-card.selected {
  border-color: var(--primary);
  background: rgba(90,139,232,.12);
  box-shadow: 0 0 0 1px var(--primary);
}

.pricing-hint {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--success);
  letter-spacing: 0.5px;
}

.pricing-duration {
  font-size: 0.95rem;
  font-weight: 600;
}

.pricing-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.publish-start-date {
  margin-bottom: 20px;
}
.publish-start-date label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.publish-date-options {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.publish-date-btn {
  padding: 8px 16px;
  font-size: 0.8rem;
}
.publish-date-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.publish-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
}
.publish-summary:empty {
  display: none;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child {
  border-bottom: none;
}
.summary-row span:first-child {
  color: var(--text-muted);
}
.summary-total {
  background: rgba(90,139,232,.06);
}
.summary-total span:last-child {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.publish-btn {
  margin-top: 8px;
  padding: 14px 20px;
  font-size: 1rem;
}
.publish-btn:disabled {
  opacity: 0.4;
}

/* Status Badge erweitert */
.status-badge.draft {
  background: rgba(90,139,232,.15);
  color: var(--primary);
}
.status-badge.expired {
  background: rgba(243,161,91,.15);
  color: var(--warning);
}
.status-badge.paused {
  background: rgba(255,255,255,.06);
  color: var(--text-muted);
}

/* ===============================================
   Edit Survey Modal
   =============================================== */

.edit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.edit-overlay.open {
  display: flex;
}

.edit-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  overflow: hidden;
}

.edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.edit-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.edit-modal-body {
  padding: 24px;
}

.edit-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ===============================================
   Empty State
   =============================================== */

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state-text { font-size: 1.1rem; margin-bottom: 24px; }

/* ===============================================
   Toast
   =============================================== */

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  z-index: 10000;
  transition: transform 0.3s ease;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

/* ===============================================
   Responsive
   =============================================== */

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.5);
  }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
}

@media (max-width: 768px) {
  .content-section { padding: 20px 16px; }
  .top-header { padding: 12px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .survey-cards { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* -----------------------------------------------
   Suggestion Chips
----------------------------------------------- */
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.suggestion-chip {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary, #6366f1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.suggestion-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.6);
}

/* -----------------------------------------------
   Unternehmensprofil
----------------------------------------------- */
.profile-card {
  background: var(--card-bg, #1e1e2e);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}

.profile-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #888);
  margin: 0 0 18px 0;
}

/* Logo Upload */
.logo-upload-area {
  width: 180px;
  height: 180px;
  border: 2px dashed var(--border, rgba(255,255,255,0.2));
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 12px;
}

.logo-upload-area:hover {
  border-color: var(--primary, #6366f1);
  background: rgba(99,102,241,0.06);
}

.logo-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted, #888);
  font-size: 0.85rem;
}

.logo-upload-icon { font-size: 2.5rem; }

.logo-upload-hint {
  font-size: 0.72rem;
  color: var(--muted, #666);
}

.logo-upload-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid var(--danger, #ef4444);
  color: var(--danger, #ef4444);
}
.btn-danger-outline:hover {
  background: rgba(239,68,68,0.1);
}

/* Form layout helpers */
.form-row {
  display: flex;
  gap: 12px;
}
.form-col-grow { flex: 1; min-width: 0; }
.form-col-small { flex: 0 0 90px; }

.profile-save-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

select {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg, #2a2a3e);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 8px;
  color: var(--text, #e0e0e0);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  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 d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
select:focus {
  border-color: var(--primary, #6366f1);
}

/* -----------------------------------------------
   Logo Crop Modal
----------------------------------------------- */
.crop-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.crop-modal-box {
  background: var(--card-bg, #1e1e2e);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.crop-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
}

.crop-close-btn {
  background: none;
  border: none;
  color: var(--muted, #888);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.crop-close-btn:hover { background: rgba(255,255,255,0.08); }

/* Viewport */
.crop-viewport-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  cursor: grab;
}
.crop-viewport-wrap:active { cursor: grabbing; }

.crop-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

#cropImg {
  position: absolute;
  top: 0; left: 0;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Rahmen-Overlay (zeigt Ausschnitt) */
.crop-frame-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 2px solid rgba(99,102,241,0.8);
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(0,0,0,0.35);
}

/* Zoom-Slider */
.crop-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.crop-ctrl-label { font-size: 1rem; }
.crop-controls input[type=range] {
  flex: 1;
  accent-color: var(--primary, #6366f1);
  cursor: pointer;
}

.crop-hint {
  font-size: 0.75rem;
  color: var(--muted, #888);
  text-align: center;
  margin: 0;
}

.crop-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================
   BESTELLUNGS-TOOL
   ============================================ */

/* Order Sub-Tabs */
.order-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.order-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}
.order-tab:hover {
  color: var(--text);
}
.order-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Tab Content */
.order-tab-content {
  display: none;
}
.order-tab-content.active {
  display: block;
}

/* Menu Editor */
.menu-add-category {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.menu-add-category input {
  flex: 1;
}
.menu-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

/* Category Block */
.menu-category {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.menu-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-hover);
  cursor: grab;
}
.menu-category-header .drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 16px;
}
.menu-category-name {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.menu-category-actions {
  display: flex;
  gap: 6px;
}
.menu-category-body {
  padding: 12px 16px;
}

/* Menu Item Row */
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.menu-item:last-child {
  border-bottom: none;
}
.menu-item-info {
  flex: 1;
}
.menu-item-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
}
.menu-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.menu-item-price {
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
  min-width: 60px;
  text-align: right;
}
.menu-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Toggle Switch (for available/highlight) */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-hover);
  border-radius: 22px;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform .2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* Add Item Inline Form */
.menu-add-item {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.menu-add-item input {
  font-size: 13px;
  padding: 8px 10px;
}
.menu-add-item input.item-name-input {
  flex: 2;
  min-width: 120px;
}
.menu-add-item input.item-price-input {
  width: 80px;
  min-width: 80px;
}
.menu-add-item input.item-desc-input {
  flex: 3;
  min-width: 150px;
}

/* Highlight badge */
.menu-item-highlight {
  background: #ff9800;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Tables */
.table-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.table-row:last-child {
  border-bottom: none;
}
.table-number {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  min-width: 40px;
  text-align: center;
}
.table-name {
  flex: 1;
  color: var(--text);
  font-size: 14px;
}
.table-qr-preview {
  width: 40px;
  height: 40px;
}
.table-actions {
  display: flex;
  gap: 6px;
}

/* Live Orders */
.order-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.order-filter {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all .2s;
}
.order-filter:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.order-filter.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.order-filter.sound-toggle {
  margin-left: auto;
  background: transparent;
  border-style: dashed;
}
.order-stats-bar {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Order Card */
.order-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--bg-card);
  transition: border-color .2s;
}
.order-card.status-new {
  border-left: 4px solid #ef4444;
}
.order-card.status-preparing {
  border-left: 4px solid #f59e0b;
}
.order-card.status-served {
  border-left: 4px solid #22c55e;
  opacity: 0.7;
}
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.order-table-badge {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
}
.order-time {
  font-size: 12px;
  color: var(--text-muted);
}
.order-items-list {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
}
.order-items-list span {
  display: block;
  padding: 2px 0;
}
.order-total {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 12px;
}
.order-card-actions {
  display: flex;
  gap: 8px;
}
.order-card-actions .btn {
  flex: 1;
  font-size: 13px;
}

/* Statistik KPI */
.stats-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.stats-kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
}
.stats-kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.stats-kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stats-top-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.stats-top-item:last-child {
  border-bottom: none;
}
.stats-top-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-right: 12px;
  flex-shrink: 0;
}
.stats-top-name {
  flex: 1;
  font-weight: 600;
}
.stats-top-count {
  color: var(--text-muted);
  font-size: 13px;
  margin-right: 12px;
}
.stats-top-revenue {
  font-weight: 700;
  color: var(--accent);
}
.stats-table-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.stats-table-row:last-child {
  border-bottom: none;
}
.stats-table-name {
  flex: 1;
  font-weight: 600;
}
.stats-table-count {
  color: var(--text-muted);
  font-size: 13px;
  margin-right: 12px;
}
.stats-table-revenue {
  font-weight: 700;
  color: var(--accent);
}
.stats-bar {
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-width: 20px;
  flex: 1;
  position: relative;
  cursor: default;
}
.stats-bar-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}
.stats-bar-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto;
}
