/* ============================================
   GASTROBOT - MODERN ADMIN UI
   Modernisiertes Design mit Glassmorphism
   ============================================ */

/* ============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
  /* Brand Colors */
  --primary: #FF8C42;
  --primary-dark: #E67A2E;
  --primary-light: #FFB377;
  --primary-glow: rgba(255, 140, 66, 0.3);

  /* Neutrals - Warm Dark Palette */
  --bg-primary: #0A0E1A;
  --bg-secondary: #12192B;
  --bg-tertiary: #1A2332;
  --bg-elevated: rgba(26, 35, 50, 0.6);

  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.06);

  /* Text Colors */
  --text-primary: #F5F7FA;
  --text-secondary: #A0AEC0;
  --text-tertiary: #718096;
  --text-muted: #4A5568;

  /* Semantic Colors */
  --success: #48BB78;
  --success-bg: rgba(72, 187, 120, 0.1);
  --danger: #F56565;
  --danger-bg: rgba(245, 101, 101, 0.1);
  --warning: #ED8936;
  --info: #4299E1;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px var(--primary-glow);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated Background Gradient */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 50%, rgba(255, 140, 66, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(66, 153, 225, 0.05) 0%, transparent 50%);
  animation: gradientShift 20s ease infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gradientShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(5%, -5%) rotate(120deg); }
  66% { transform: translate(-5%, 5%) rotate(240deg); }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  padding: var(--space-lg) var(--space-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo svg,
.logo img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--transition-base);
  position: relative;
}

.nav-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: var(--glass-hover);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::before {
  opacity: 1;
}

/* Logout Button in Nav */
.nav-links button {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(245, 101, 101, 0.2);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.nav-links button:hover {
  background: var(--danger);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  box-shadow: var(--shadow-glow);
}

.login-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.login-header svg,
.login-header img {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  filter: drop-shadow(0 0 20px var(--primary-glow));
}

.login-header h1 {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-header p {
  color: var(--text-tertiary);
  font-size: 0.9375rem;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: var(--space-lg);
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  transition: all var(--transition-base);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  background: var(--glass-hover);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A0AEC0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  padding-right: var(--space-3xl);
}

/* ============================================
   BUTTONS
   ============================================ */
button,
.btn {
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  font-family: var(--font-sans);
}

/* Primary Button */
.btn-primary,
button[type="submit"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary::before,
button[type="submit"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-primary:hover,
button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:hover::before,
button[type="submit"]:hover::before {
  opacity: 1;
}

.btn-primary:active,
button[type="submit"]:active {
  transform: translateY(0);
}

.btn-primary span,
button[type="submit"] span {
  position: relative;
  z-index: 1;
}

/* Secondary Button */
.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* Danger Button */
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(245, 101, 101, 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Success Button */
.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(72, 187, 120, 0.2);
}

.btn-success:hover {
  background: var(--success);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Small Button */
.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
}

/* Large Button */
.btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1rem;
}

/* Full Width Button */
.btn-block {
  width: 100%;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.12);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--glass-border);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body {
  color: var(--text-secondary);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard {
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  z-index: 1;
}

.page-header {
  margin-bottom: var(--space-2xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   RESTAURANT CARDS
   ============================================ */
.restaurants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.restaurant-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.restaurant-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.restaurant-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-xl);
  border-color: rgba(255, 255, 255, 0.15);
}

.restaurant-card:hover::after {
  transform: scaleX(1);
}

.restaurant-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.restaurant-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.restaurant-info {
  flex: 1;
}

.restaurant-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.restaurant-email {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.status-badge {
  padding: 4px var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-active {
  background: var(--success-bg);
  color: var(--success);
}

.status-inactive {
  background: var(--danger-bg);
  color: var(--danger);
}

/* Restaurant Stats Tabs */
.stats-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  padding: var(--space-xs);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  flex-wrap: nowrap;
  overflow-x: auto;
}

.stats-tab {
  flex: 1;
  min-width: 60px;
  padding: var(--space-sm) var(--space-sm);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  text-align: center;
  white-space: nowrap;
}

.stats-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.stats-tab:hover:not(.active) {
  color: var(--text-secondary);
  background: var(--glass-hover);
}

/* Restaurant Metrics */
.restaurant-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.metric {
  text-align: center;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

.metric:hover {
  transform: scale(1.05);
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.metric-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.metric-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-value.highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-subvalue {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}

/* Restaurant Actions */
.restaurant-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

/* ============================================
   MODAL / DIALOG
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-xl);
  animation: fadeIn var(--transition-base);
}

.modal-overlay.show {
  display: flex;
}

/* Symmetrisches Padding für Modal-Content (Form-Inhalt) */
.modal.modal-content > form {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.modal.modal-content > form > .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
.modal.modal-content > form .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--glass-border);
  margin-top: var(--space-md);
}
.modal.modal-content .features-section {
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.modal.modal-content .section-title {
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}
@media (max-width: 640px) {
  .modal.modal-content > form > .form-row { grid-template-columns: 1fr; }
}

/* Price Display */
.price-display {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.price-display .price-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}
.price-display .setup-fee {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp var(--transition-slow);
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: var(--space-xl);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 10;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  font-size: 1.25rem;
}

.modal-close:hover {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger);
  transform: rotate(90deg);
}

.modal-body {
  padding: var(--space-xl);
}

.modal-footer {
  padding: var(--space-xl);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  position: sticky;
  bottom: 0;
  background: var(--bg-secondary);
}

/* ============================================
   STATISTICS DASHBOARD
   ============================================ */
.stats-period-selector {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.period-btn {
  padding: var(--space-sm) var(--space-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.period-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.period-btn:hover:not(.active) {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--transition-slow);
}

.stat-card:hover {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-card:hover::before {
  transform: scaleY(1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

/* ============================================
   CHARTS
   ============================================ */
.chart-container {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.chart-header {
  margin-bottom: var(--space-lg);
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--text-tertiary);
  border-radius: 50%;
  transition: all var(--transition-base);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
  background: white;
}

.toggle-switch:hover .toggle-slider {
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   FEATURE TOGGLES GRID
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
  max-height: 400px;
  overflow-y: auto;
  padding-right: var(--space-sm);
}

.features-grid::-webkit-scrollbar {
  width: 6px;
}

.features-grid::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: var(--radius-sm);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 0.875rem;
}

.feature-item:hover {
  background: var(--glass-hover);
  border-color: var(--primary);
}

.feature-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.feature-name {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* ============================================
   CHAT / ORDER HUB
   ============================================ */
.order-hub {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-xl);
  height: calc(100vh - 200px);
  min-height: 600px;
}

.conversations-sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.conversations-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--glass-border);
}

.search-input {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.filter-tabs {
  display: flex;
  gap: var(--space-xs);
}

.filter-tab {
  flex: 1;
  padding: var(--space-sm);
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
}

.conversation-item {
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.conversation-item:hover {
  background: var(--glass-hover);
  border-color: var(--primary);
  transform: translateX(4px);
}

.conversation-item.active {
  background: var(--primary-glow);
  border-color: var(--primary);
}

.chat-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--glass-border);
  background: var(--bg-secondary);
}

.chat-messages {
  flex: 1;
  padding: var(--space-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.message {
  max-width: 70%;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  line-height: 1.5;
}

.message.incoming {
  align-self: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
}

.message.outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-tertiary);
  text-align: center;
  padding: var(--space-2xl);
}

.empty-state svg,
.empty-state img {
  width: 120px;
  height: 120px;
  opacity: 0.3;
  margin-bottom: var(--space-lg);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-tertiary); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: var(--radius-sm);
  transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
  .restaurants-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }

  .order-hub {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 968px) {
  .dashboard {
    padding: var(--space-xl) var(--space-lg);
  }

  .restaurants-grid {
    grid-template-columns: 1fr;
  }

  .stats-overview {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .order-hub {
    grid-template-columns: 1fr;
    height: auto;
  }

  .conversations-sidebar {
    max-height: 300px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    font-size: 14px;
  }

  header {
    padding: var(--space-md);
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .dashboard {
    padding: var(--space-lg) var(--space-md);
  }

  .login-card {
    padding: var(--space-xl);
  }

  .restaurant-metrics {
    grid-template-columns: 1fr;
  }

  .restaurant-actions {
    grid-template-columns: 1fr;
  }

  .modal {
    margin: var(--space-md);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  body {
    background: white;
    color: black;
  }

  header,
  .btn,
  button {
    display: none;
  }

  .card,
  .restaurant-card {
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================
   LOADING STATES
   ============================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--glass-bg) 25%,
    var(--glass-hover) 50%,
    var(--glass-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   COST OVERVIEW CARDS
   ============================================ */
.costs-section {
  margin-top: var(--space-xl);
}

.costs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.cost-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.cost-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow, rgba(99,102,241,0.15));
}

.cost-card h4 {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin: 0 0 var(--space-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cost-card .amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.cost-card .breakdown {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: var(--space-sm);
}

.cost-card .breakdown span {
  display: inline-block;
}

.cost-card .status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.cost-card .status.positive { color: var(--success, #86efac); }
.cost-card .status.negative { color: #fca5a5; }

.cost-card--margin {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--bg-tertiary), rgba(99, 102, 241, 0.08));
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.cost-card--margin h4 {
  color: var(--primary);
}

.cost-card--margin .amount {
  font-size: 1.75rem;
}

.cost-positive { color: #86efac !important; }
.cost-negative { color: #fca5a5 !important; }

.cost-warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: 0.875rem;
  color: #fbbf24;
  margin-bottom: var(--space-md);
}

/* ============================================
   NOTIFICATIONS GRID
   ============================================ */
.notifications-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.notification-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
}

.notification-item:hover {
  border-color: var(--primary);
  background: var(--glass-hover);
}

.notification-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.notification-item span {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* ============================================
   NOTIFICATION TARGETS
   ============================================ */
.notification-targets {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.notification-targets h4 {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.targets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.target-input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.target-input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.target-input-group input {
  padding: var(--space-sm) var(--space-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  width: 100%;
  box-sizing: border-box;
}

.target-input-group input::placeholder {
  color: var(--text-muted, var(--text-tertiary));
}

.target-help-text {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ============================================
   CHANNEL CONFIG
   ============================================ */
.channel-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  transition: border-color var(--transition-base);
}

.channel-item:last-child { margin-bottom: 0; }

.channel-item:not([style*="opacity"]):hover {
  border-color: var(--primary);
}

.channel-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.channel-icon {
  font-size: 1.125rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.channel-header > span:last-child {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.channel-fields {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.channel-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-sm);
  flex: 1;
}

.channel-inputs input {
  padding: 6px var(--space-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8125rem;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-mono);
  transition: border-color var(--transition-base);
}

.channel-inputs input:focus {
  outline: none;
  border-color: var(--primary);
}

.channel-inputs input::placeholder {
  color: var(--text-tertiary);
  font-family: var(--font-sans, inherit);
}

.btn-test {
  padding: 6px var(--space-md);
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.btn-test:hover {
  background: var(--primary);
  color: white;
}

.btn-test:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.guide-link {
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.guide-link a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity var(--transition-base);
}

.guide-link a:hover { opacity: 0.7; }

/* ============================================
   PAYMENT OPTIONS
   ============================================ */

/* Payment Config Cards */
.payment-methods-available {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.payment-config-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-top: var(--space-md);
  transition: border-color var(--transition-base);
}

.payment-config-card:hover {
  border-color: var(--glass-hover);
}

.payment-config-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.payment-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  transition: border-color var(--transition-base);
}

.payment-option:last-of-type { margin-bottom: 0; }

.payment-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.payment-icon { font-size: 1rem; }

.paypal-link-field {
  margin-top: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  transition: all var(--transition-base);
}

.slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-tertiary);
  border-radius: 50%;
  transition: all var(--transition-base);
}

.switch input:checked + .slider {
  background: var(--primary);
  border-color: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translate(18px, -50%);
  background: white;
}

.switch input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   WIZARD STYLES
   ============================================ */
.wizard-container {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.wizard-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.wizard-header h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
}

.wizard-progress {
  margin-bottom: var(--space-2xl);
}

.progress-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.4s ease;
  border-radius: var(--radius-full);
}

.wizard-step {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--glass-border);
}

.mode-selection {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.mode-card {
  background: var(--bg-secondary);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.mode-card:hover {
  border-color: var(--primary);
  background: var(--glass-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--primary-glow);
}

.mode-card.selected {
  border-color: var(--primary);
  background: var(--glass-hover);
  box-shadow: 0 0 30px var(--primary-glow);
}

.mode-card h3 {
  font-size: 1.375rem;
  margin-bottom: var(--space-md);
}

.mode-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: var(--primary);
  color: white;
  padding: 3px var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.mode-features {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0;
}

.mode-features li {
  padding: var(--space-xs) 0;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.mode-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.mode-time {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin-top: var(--space-md);
}

.help-box {
  background: rgba(255, 140, 66, 0.08);
  border-left: 3px solid var(--primary);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.warning-box {
  background: rgba(245, 101, 101, 0.08);
  border-left: 3px solid var(--danger);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.category-item {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-md);
}

.category-item input[type="text"] {
  padding: var(--space-sm) var(--space-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: border-color var(--transition-base);
}

.category-item input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
}

.radio-card {
  display: block;
  background: var(--bg-tertiary);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--glass-hover);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.btn-submit {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-cancel {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-cancel:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
  .mode-selection { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ============================================
   AUTOCOMPLETE DARK MODE FIX
   ============================================ */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--bg-tertiary) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Telefon-Input Autocomplete Fix */
input[type="tel"]:-webkit-autofill,
input[type="tel"]:-webkit-autofill:hover,
input[type="tel"]:-webkit-autofill:focus,
input[type="tel"]:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--bg-tertiary) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: var(--text-primary);
}

/* ============================================
   KASSENSYSTEM CARDS
   ============================================ */
.kassensystem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.kassen-card {
  background: var(--bg-tertiary);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.kassen-card:hover {
  border-color: var(--primary);
  background: var(--glass-hover);
  transform: translateY(-2px);
}

.kassen-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(255, 140, 66, 0.08);
  box-shadow: 0 4px 20px var(--primary-glow);
}

.kassen-card input[type="radio"] { display: none; }

.kassen-icon {
  font-size: 2.25rem;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.kassen-content strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.kassen-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.4;
}

/* Kassensystem-Logos */
.kassen-logo-wrapper {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  position: relative;
}

.kassen-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: brightness(0.9);
  transition: all var(--transition-base);
}

.kassen-card:hover .kassen-logo {
  filter: brightness(1.1);
  transform: scale(1.05);
}

.kassen-card:has(input:checked) .kassen-logo {
  filter: brightness(1.2) drop-shadow(0 0 8px var(--primary));
}

.kassen-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-tertiary);
  transition: all var(--transition-base);
}

.kassen-card:hover .kassen-icon-fallback {
  color: var(--primary);
}

.kassen-card:has(input:checked) .kassen-icon-fallback {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary));
}

/* ============================================
   WEBHOOK INFO BOX
   ============================================ */
.webhook-info-box {
  background: var(--bg-tertiary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}

.webhook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.webhook-header h4 { margin: 0; }

.btn-copy {
  padding: var(--space-sm) var(--space-lg);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-copy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-copy:not(:disabled):hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.webhook-url-display {
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  overflow-x: auto;
  margin-bottom: var(--space-lg);
}

.webhook-url-display code {
  color: var(--primary-light);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.webhook-help ol {
  margin: var(--space-sm) 0 var(--space-md);
  padding-left: var(--space-xl);
}

.webhook-help li {
  margin: var(--space-xs) 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.webhook-what-updates {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
}

.webhook-what-updates strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
}

.webhook-what-updates ul {
  padding-left: 0;
  list-style: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs);
}

.webhook-what-updates li {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ============================================
   MESSAGE SELECT MODE
   ============================================ */
.msg-check {
  display: none;
}
.select-mode .msg-check {
  display: inline-block;
}

/* ============================================
   RESPONSIVE OVERRIDES
   ============================================ */
@media (max-width: 768px) {
  .modal { max-width: 95vw; }
  .costs-grid,
  .notifications-grid,
  .targets-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .channel-fields { flex-direction: column; align-items: stretch; }
  .btn-test { width: 100%; }
  .kassensystem-grid { grid-template-columns: repeat(2, 1fr); }
  .webhook-what-updates ul { grid-template-columns: 1fr; }
}
