:root {
  /* Modern color palette */
  --primary: #6366f1;
  --primary-hover: #5855e6;
  --primary-light: #eef2ff;
  --secondary: #64748b;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  /* Neutral colors */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Semantic colors */
  --text: var(--gray-900);
  --text-muted: var(--gray-500);
  --text-light: var(--gray-400);
  
  /* Background and surfaces */
  --background: #fafbfc;
  --bg: #fafbfc;
  --surface: #ffffff;
  --border: var(--gray-200);
  --border-light: var(--gray-100);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* Spacing */
  --space-2xs: 0.125rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
    margin: 0;
  font-family: var(--font-sans);
  font-feature-settings: normal;
  font-variation-settings: normal;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App layout */
.app-bg { 
  background: var(--bg);
  min-height: 100vh;
}

/* Header - Modern design */
.app-header { 
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner { 
  display: flex; 
  align-items: center; 
  gap: var(--space-lg); 
  padding: var(--space-md) 0; 
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.brand { 
  display: inline-flex; 
  align-items: center; 
  gap: var(--space-sm); 
  text-decoration: none; 
  color: var(--text);
  font-weight: 600;
  font-size: 1.125rem;
  transition: all 0.2s ease;
}

.brand:hover {
  color: var(--primary);
}

.brand img {
  transition: transform 0.2s ease;
}

.brand:hover img {
  transform: scale(1.1);
}

.nav-links { 
  display: flex; 
  gap: var(--space-sm); 
  margin-left: auto;
}

.nav-links a { 
  color: var(--text-muted); 
  text-decoration: none; 
  padding: var(--space-sm) var(--space-md); 
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  position: relative;
}

.nav-links a:hover { 
  color: var(--primary); 
  background: var(--primary-light);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links a:hover::after {
  width: 80%;
}

.user-meta { 
  /* margin-left: var(--space-lg);  */
  display: inline-flex; 
  align-items: center; 
  gap: var(--space-sm); 
  color: var(--text-muted);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  border: 1px solid var(--border-light);
}

.user-name {
  font-weight: 500;
  color: var(--text);
}

.user-meta .logout { 
  color: var(--text-muted); 
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.user-meta .logout:hover { 
  color: var(--danger); 
}

.divider { 
  color: var(--gray-300);
  font-weight: 300;
}

/* Typography - Modern hierarchy */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 { 
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.025em;
}

h1, .h1 { font-size: 2.25rem; }
h2, .h2 { font-size: 1.875rem; }
h3, .h3 { font-size: 1.5rem; }
h4, .h4 { font-size: 1.25rem; }
h5, .h5 { font-size: 1.125rem; }
h6, .h6 { font-size: 1rem; }

.page-title { 
  font-size: 1.875rem; 
  font-weight: 700; 
  margin: 0 0 var(--space-xl) 0;
  color: var(--text);
  letter-spacing: -0.025em;
}

/* Cards / Surfaces - Enhanced design */
.surface {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  overflow: hidden;
}

.surface:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.surface-subtle {
  background: var(--gray-50);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: var(--space-xl);
}

/* Forms - Modern design */
.form-control, .form-select, input[type="text"], input[type="tel"], input[type="password"], input[type="email"], select, textarea {
  width: 100%;
  padding: var(--space) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  transition: all 0.2s ease;
  font-family: inherit;
}

/* Mobile form optimizations */
@media (max-width: 767px) {
  .form-control, .form-select, input[type="text"], input[type="tel"], input[type="password"], input[type="email"], select, textarea {
    padding: var(--space) var(--space-md);
    font-size: 1rem;
    border-radius: var(--radius-lg);
    min-height: 48px;
  }
  
  .form-label {
    font-size: 1rem;
    margin-bottom: var(--space);
  }
  
  .btn {
    min-height: 48px;
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
  }
  
  .btn-sm {
    min-height: 40px;
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .form-control, .form-select, input[type="text"], input[type="tel"], input[type="password"], input[type="email"], select, textarea {
    padding: var(--space) var(--space-md);
    font-size: 0.95rem;
    min-height: 44px;
  }
  
  .form-label {
    font-size: 0.9rem;
  }
  
  .btn {
    min-height: 44px;
    padding: var(--space) var(--space-lg);
    font-size: 0.95rem;
  }
  
  .btn-sm {
    min-height: 36px;
    padding: var(--space-xs) var(--space-md);
    font-size: 0.85rem;
  }
}

.form-control:focus, 
.form-select:focus, 
input[type="text"]:focus, 
input[type="tel"]:focus, 
input[type="password"]:focus, 
input[type="email"]:focus, 
select:focus, 
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-light);
}

.form-label { 
  display: block; 
  margin-bottom: var(--space-sm); 
  font-weight: 600; 
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0.025em;
}

.form-text { 
  color: var(--text-muted); 
  font-size: 0.875rem; 
  margin-top: var(--space-xs);
}

/* Buttons - Modern design system */
.btn { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: var(--space-sm); 
  padding: var(--space) var(--space-lg); 
  font-weight: 600; 
  font-size: 0.95rem;
  border: 1px solid transparent; 
  border-radius: var(--radius); 
  cursor: pointer; 
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  line-height: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:disabled, 
.btn.disabled { 
  opacity: 0.5; 
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover::before,
.btn.disabled:hover::before {
  left: -100%;
}

.btn-primary { 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white; 
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover { 
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary { 
  background: transparent; 
  color: var(--primary); 
  border-color: var(--primary);
}

.btn-outline-primary:hover { 
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary { 
  background: var(--secondary); 
  color: white; 
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--gray-600);
  box-shadow: var(--shadow-md);
}

.btn-light { 
  background: var(--gray-100); 
  color: var(--text); 
  border-color: var(--border);
}

.btn-light:hover {
  background: var(--gray-200);
}

.btn-sm { 
  padding: var(--space-sm) var(--space-md); 
  font-size: 0.875rem;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.125rem;
}

/* Badges - Modern design */
.badge { 
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm); 
  border-radius: var(--radius-lg); 
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

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

.text-bg-danger { 
  background: var(--danger); 
  color: white;
}

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

/* Alerts - Enhanced design */
.alert { 
  padding: var(--space-md) var(--space-lg); 
  border-radius: var(--radius-lg); 
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: currentColor;
}

.alert-primary { 
  background: var(--primary-light); 
  color: var(--primary); 
  border-color: rgba(99, 102, 241, 0.2);
}

.alert-danger { 
  background: rgba(239, 68, 68, 0.1); 
  color: var(--danger); 
  border-color: rgba(239, 68, 68, 0.2);
}

.alert-warning { 
  background: rgba(245, 158, 11, 0.1); 
  color: var(--warning); 
  border-color: rgba(245, 158, 11, 0.2);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

/* Pagination - Modern design */
.pagination { 
  display: flex; 
  gap: var(--space-xs); 
  list-style: none; 
    padding: 0;
  margin: var(--space-lg) 0;
  justify-content: center;
}

.page-item { 
  display: inline-block; 
}

.page-link { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: var(--space-sm) var(--space);
  border: 1px solid var(--border); 
  border-radius: var(--radius); 
  text-decoration: none; 
  color: var(--text-muted); 
  background: var(--surface);
  font-weight: 500;
  transition: all 0.2s ease;
}

.page-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.page-item.active .page-link { 
  background: var(--primary); 
  color: white; 
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.page-item.disabled .page-link { 
  opacity: 0.5; 
  pointer-events: none;
  cursor: not-allowed;
}

/* Mobile pagination optimization */
@media (max-width: 767px) {
  .pagination {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 var(--space);
    margin: var(--space-md) 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .pagination::-webkit-scrollbar {
    display: none;
  }
  
  .page-link {
    min-width: 2.25rem;
    height: 2.25rem;
    font-size: 0.9rem;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .pagination {
    padding: 0 var(--space-sm);
    margin: var(--space-md) 0;
  }
  
  .page-link {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
    padding: var(--space-xs);
  }
}

/* Layout & Container */
.container { 
  max-width: 1200px; 
  width: 100%;
  margin: 0 auto; 
  padding: 0 var(--space-md);
}

.content { 
  /* padding: var(--space-xl) 0 var(--space-2xl) 0; */
  min-height: calc(100vh - 200px);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Footer */
.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.footer-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: var(--space-lg) 0; 
  color: var(--text-muted);
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.footer-link { 
  color: var(--text-muted); 
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover { 
  color: var(--primary); 
}

/* Utility system */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.flex-nowrap { flex-wrap: nowrap; }
.overflow-auto { overflow: auto; }

/* Spacing utilities */
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space); }
.gap-4 { gap: var(--space-md); }

/* Width utilities */
.w-100 { width: 100%; }
.w-auto { width: auto; }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.small { font-size: 0.875rem; }

/* Margin utilities */
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space); }
.mb-4 { margin-bottom: var(--space-md); }
.mb-5 { margin-bottom: var(--space-lg); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space); }
.mt-4 { margin-top: var(--space-md); }
.mt-5 { margin-top: var(--space-lg); }
.ms-1 { margin-left: var(--space-xs); }
.ms-2 { margin-left: var(--space-sm); }
.me-1 { margin-right: var(--space-xs); }
.me-2 { margin-right: var(--space-sm); }
.mt-auto { margin-top: auto; }

/* Padding utilities */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space); }
.p-4 { padding: var(--space-md); }
.p-5 { padding: var(--space-lg); }

/* Height utilities */
.vh-100 { height: 100vh; }
.min-vh-100 { min-height: 100vh; }

/* Mobile typography adjustments */
@media (max-width: 767px) {
  .small { font-size: 0.8rem; }
  
  /* Make text more readable on mobile */
  body {
    font-size: 1rem;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .small { font-size: 0.75rem; }
  
  body {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  /* Adjust text utilities for small screens */
  .text-center { 
    text-align: center; 
  }
  
  /* Prevent text from being too small */
  * {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

/* Auth layout - Enhanced modern design */
.auth-wrap { 
  min-height: 100vh; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--gray-50) 50%, var(--primary-light) 100%);
  padding: var(--space-lg);
  position: relative;
}

.auth-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(99,102,241,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(99,102,241,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

/* Mobile auth optimizations */
@media (max-width: 767px) {
  .auth-wrap {
    padding: var(--space);
    align-items: flex-start;
    padding-top: var(--space-lg);
  }
  
  .auth-container {
    width: 100%;
    max-width: none;
  }
  
  .auth-brand {
    margin-bottom: var(--space-lg);
  }
  
  .auth-title {
    font-size: 1.5rem;
  }
  
  .auth-subtitle {
    font-size: 1rem;
  }
  
  .auth-form-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
  }
  
  .form-group {
    margin-bottom: var(--space-lg);
  }
  
  .input-wrapper input {
    font-size: 1rem;
    padding: var(--space-md);
  }
  
  .auth-submit {
    font-size: 1rem;
    padding: var(--space-md) var(--space-lg);
  }
}

@media (max-width: 480px) {
  .auth-wrap {
    padding: var(--space-sm);
    padding-top: var(--space-md);
  }
  
  .auth-brand img {
    width: 40px;
    height: 40px;
  }
  
  .auth-title {
    font-size: 1.25rem;
  }
  
  .auth-subtitle {
    font-size: 0.9rem;
  }
  
  .auth-form-card {
    padding: var(--space-md);
  }
  
  .input-wrapper input {
    padding: var(--space) var(--space-md);
  }
  
  .resend-section {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
  }
}

.auth-container {
  max-width: 440px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.auth-brand {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-brand img {
  filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.2));
  margin-bottom: var(--space-lg);
}

.auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.025em;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin: 0;
}

.auth-form-card {
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
  background: var(--surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
}

.auth-back {
  margin-bottom: var(--space-lg);
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--primary);
}

.auth-form {
  width: 100%;
}

.form-group {
  margin-bottom: var(--space-xl);
}

.form-group:last-of-type {
  margin-bottom: var(--space-2xl);
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  font-size: 1.125rem;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--surface);
  transition: all 0.3s ease;
}

.input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: var(--space-sm);
  font-weight: 500;
}

.auth-submit {
  font-size: 1.125rem;
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  box-shadow: var(--shadow);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-xl);
}

.auth-footer a {
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Resend code section */
.resend-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.resend-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.resend-timeout {
  font-weight: 600;
  color: var(--primary);
}

/* List styles - Enhanced */
.list { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
}

.list-item { 
  padding: var(--space) var(--space-lg); 
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s ease;
}

.list-item:last-child { 
  border-bottom: 0; 
}

.list-item:hover {
  background-color: var(--gray-50);
}

/* Details/summary styling - Modern accordion */
details.surface { 
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

details.surface > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-lg);
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  user-select: none;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

details.surface > summary:hover {
  background: var(--gray-50);
}

details.surface > summary::after {
  content: '+';
  position: absolute;
  right: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

details.surface[open] > summary::after {
  transform: translateY(-50%) rotate(45deg);
}

details.surface[open] > summary { 
  background: var(--primary-light);
  color: var(--primary);
}

details.surface > div { 
  padding: 0;
  background: var(--surface);
}

/* Mobile accordion optimization */
@media (max-width: 767px) {
  details.surface > summary {
    padding: var(--space-md);
    font-size: 1rem;
  }
  
  details.surface > summary::after {
    right: var(--space-md);
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  details.surface > summary {
    padding: var(--space);
    font-size: 0.95rem;
  }
  
  details.surface > summary::after {
    right: var(--space);
    font-size: 1rem;
  }
}

/* Mobile-first responsive design - 360px+ */
@media (max-width: 767px) {
  /* Base mobile styles */
  .container {
    padding: 0 var(--space);
    max-width: 100%;
  }
  
  /* .content {
    padding: var(--space) 0 var(--space-lg) 0;
  } */
  
  /* Header mobile optimization - Compact single row */
  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-xs);
    /* padding: var(--space-sm) 0; */
    align-items: center;
    justify-content: space-between;
  }
  
  .brand {
    flex-shrink: 0;
    font-size: 1rem;
  }
  
  .brand img {
    width: 20px;
    height: 20px;
  }
  
  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: right;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  
  .nav-links a {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.85rem;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: auto;
  }
  
  .user-meta {
    order: 2;
    margin-left: 0;
    flex-shrink: 0;
  }
  
  /* Typography mobile adjustments */
  .page-title {
    font-size: 1.375rem;
    margin-bottom: var(--space-md);
    text-align: center;
  }
  
  h1, .h1 { font-size: 1.75rem; }
  h2, .h2 { font-size: 1.5rem; }
  h3, .h3 { font-size: 1.25rem; }
  h4, .h4 { font-size: 1.125rem; }
  
  /* Footer mobile optimization */
  .footer-inner {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
    padding: var(--space-md) 0;
  }
}

/* Extra small devices (360px and up) */
@media (max-width: 480px) {
  :root {
    --space-2xs: 0.1rem;
    --space-xs: 0.2rem;
    --space-sm: 0.4rem;
    --space: 0.6rem;
    --space-md: 0.8rem;
    --space-lg: 1.2rem;
    --space-xl: 1.6rem;
    --space-2xl: 2.4rem;
  }
  
  .container {
    padding: 0 var(--space-sm);
  }
  
  /* .content {
    padding: var(--space-sm) 0 var(--space-md) 0;
  } */
  
  .header-inner {
    /* padding: var(--space-xs) 0; */
    gap: var(--space-2xs);
  }
  
  /* Ultra compact header for very small screens */
  .nav-links {
    margin-top: var(--space-2xs);
  }
  
  .nav-links a {
    padding: var(--space-2xs) var(--space-xs);
    font-size: 0.8rem;
  }
  
  .brand {
    font-size: 0.9rem;
  }
  
  .brand img {
    width: 18px;
    height: 18px;
  }
  

  
  .page-title {
    font-size: 1.25rem;
    margin-bottom: var(--space);
  }
  
  /* Ensure minimum touch targets (44px) */
  .btn, .nav-links a, .page-link {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-links a {
    padding: var(--space-sm) var(--space);
  }
}

.bookings-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  margin: 0 auto;
}

.booking-card {
  padding: 0;
  transition: all 0.3s ease;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.booking-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border) !important;
}

.booking-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border-light);
}

.booking-date {
  font-size: 0.8rem;
  letter-spacing: 0.025em;
}

.booking-status {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.booking-content {
  padding: var(--space-lg);
}

.booking-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-lg);
  line-height: 1.3;
}

.tour-details {
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
  gap: var(--space-md);
}

.detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 140px;
  font-size: 0.9rem;
}

.detail-value {
  color: var(--text);
  text-align: right;
  flex: 1;
  font-weight: 500;
}

.manager-info {
  padding: var(--space-lg);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--gray-50) 100%);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.manager-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space);
}

.manager-details p {
  margin: var(--space-xs) 0;
}

.manager-name {
  font-weight: 600;
  color: var(--text);
}

.manager-contact {
  color: var(--text-muted);
}

.phone-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.phone-link:hover {
  text-decoration: underline;
}

.extension {
  color: var(--text-light);
  font-size: 0.9rem;
}

.manager-email {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.booking-actions {
  padding: var(--space-lg) var(--space-lg) 0 var(--space-lg);
  border-top: 1px solid var(--border-light);
  width: 100%;
}

.booking-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--border-light);
  background-color: var(--gray-50);
}

.booking-feedback {
  padding: 0 10px 20px 10px;
}

.feedback-not-allowed {
  display: flex;
  justify-content: right;
  align-items: right;
}
.feedback-not-allowed-content {
  background-color: #F1F5F9;
  border-radius: 8px;
  display: flex;
  justify-content: right;
  align-items: center;
  max-width: 400px;
  width: 100%;
}
.feedback-not-allowed-text {
  font-size: 16px;
  margin: 10px;
  font-size: 14px;
  font-style: italic;
  color: #64748C;
}

.payment-status {
  margin-bottom: var(--space-md);
}

.action-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.alert-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.alert-link:hover {
  color: inherit;
  text-decoration: none;
}


@media (max-width: 767px) {
  .bookings-grid {
    gap: var(--space-lg);
    margin-top: var(--space-lg);
  }
  
  .booking-card {
    border-radius: var(--radius-md);
  }
  
  .booking-header {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space);
    align-items: flex-start;
    padding: var(--space-md);
  }
  
  .booking-status {
    align-self: flex-start;
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
  }
  
  .booking-content {
    padding: var(--space-md);
  }
  
  .booking-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
    line-height: 1.4;
  }
  
  .tour-details {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }
  
  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
    padding: var(--space-sm) 0;
  }
  
  .detail-label {
    min-width: auto;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
  }
  
  .detail-value {
    text-align: left;
    font-size: 0.95rem;
  }
  
  .manager-info {
    padding: var(--space-md);
  }
  
  .manager-title {
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
  }
  
  .manager-details p {
    margin: var(--space-xs) 0;
    font-size: 0.9rem;
  }
  
  .booking-actions {
    padding: var(--space-md);
  }
  
  .action-buttons {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .action-buttons .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .bookings-grid {
    gap: var(--space-md);
    margin-top: var(--space-md);
  }
  
  .booking-header {
    padding: var(--space);
  }
  
  .booking-content {
    padding: var(--space);
  }
  
  .booking-title {
    font-size: 1rem;
  }
  
  .tour-details, .manager-info {
    padding: var(--space);
  }
  
  .booking-actions {
    padding: var(--space);
  }
  
  .badge {
    font-size: 0.7rem;
    padding: var(--space-xs) var(--space-sm);
  }
}

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.surface, .card, .booking-card {
  animation: fadeIn 0.6s ease-out;
}

.nav-links a, .btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
  transform: scale(0.98);
}

.form-control:focus, input:focus, textarea:focus, select:focus {
  animation: pulse 0.3s ease-out;
}

.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Touch-friendly mobile optimizations */
@media (max-width: 767px) {
  /* Increase touch target sizes */
  .btn, button, [role="button"], input[type="submit"], input[type="button"] {
    min-height: 48px;
    min-width: 48px;
  }
  
  .page-link, .nav-links a {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Optimize scrolling performance */
  .bookings-grid, .pagination {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Prevent zoom on input focus (iOS Safari) */
  input[type="text"], input[type="tel"], input[type="email"], input[type="password"], select, textarea {
    font-size: 16px;
  }
  
  /* Improve tap highlights */
  a, button, [role="button"] {
    -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
  }
}

@media (max-width: 480px) {
  /* Extra padding for very small screens */
  .surface, .card {
    margin: 0 var(--space-xs);
  }
  
  /* Ensure minimum viable spacing */
  /* .container {
    min-width: 360px;
  } */
  
  /* Stack elements on very small screens */
  .d-flex.gap-3 {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* Landscape mobile optimization */
@media (max-width: 767px) and (orientation: landscape) {
  .auth-wrap {
    padding: var(--space-sm);
    align-items: flex-start;
  }
  
  /* .header-inner {
    padding: var(--space-xs) 0;
  } */
  
  /* .content {
    padding: var(--space-sm) 0;
  } */
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .brand img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Search functionality styles */
.search-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.search-form {
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  overflow: hidden;
}

.search-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input {
  flex: 1;
  border: none !important;
  outline: none;
  padding: var(--space-md) var(--space-lg);
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  box-shadow: none !important;
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-input:focus {
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border: none;
  padding: var(--space-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
}

.search-btn:hover {
  background: var(--primary-hover);
}

.search-btn:active {
  transform: scale(0.98);
}

.search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding: var(--space-sm);
  margin-right: var(--space-sm);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
}

.search-clear:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.search-results-info {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

/* Mobile search optimization */
@media (max-width: 767px) {
  /* .search-container {
    padding: var(--space-md);
    margin: 0 -var(--space);
    border-radius: var(--radius-lg);
    border-left: none;
    border-right: none;
  } */
  
  .search-input {
    padding: var(--space) var(--space-md);
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .search-btn {
    padding: var(--space);
  }
  
  .search-clear {
    padding: var(--space-xs);
    margin-right: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .search-input {
    font-size: 0.95rem;
  }
  
  .search-input::placeholder {
    font-size: 0.9rem;
  }
}

/* Search loading state */
.search-input-wrapper.loading {
  opacity: 0.7;
}

.search-input-wrapper.loading .search-btn {
  background: var(--secondary);
  cursor: not-allowed;
}

/* Search results highlighting */
.booking-card.search-match {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-md);
  position: relative;
}

.booking-card.search-match::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary), var(--primary-hover));
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.1;
}

.search-highlight {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
  font-weight: 600;
  padding: 0 2px;
  border-radius: 2px;
  animation: highlight-pulse 2s ease-in-out;
}

@keyframes highlight-pulse {
  0% { background: rgba(99, 102, 241, 0.4); }
  50% { background: rgba(99, 102, 241, 0.6); }
  100% { background: rgba(99, 102, 241, 0.2); }
}

/* Search result animations */
.booking-card {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Empty search state */
.search-empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
}

.search-empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

/* Search suggestions (future enhancement) */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.search-suggestion {
  padding: var(--space) var(--space-lg);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s ease;
}

.search-suggestion:hover {
  background: var(--gray-50);
}

.search-suggestion:last-child {
  border-bottom: none;
}

/* Settings page styles */
.settings-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.settings-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.settings-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.settings-section {
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.settings-section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.settings-section-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.settings-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  color: var(--primary);
}

.settings-title-group {
  flex: 1;
}

.settings-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-sm) 0;
}

.settings-section-description {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Theme selector styles */
.theme-selector {
  width: 100%;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.theme-option {
  position: relative;
  display: block;
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.2s ease;
  background: var(--surface);
}

.theme-option:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.theme-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-radio:checked + .theme-preview {
  border-color: var(--primary);
}

.theme-option:has(.theme-radio:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.theme-preview {
  width: 100%;
  height: 80px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  margin-bottom: var(--space-md);
  overflow: hidden;
  position: relative;
  transition: all 0.2s ease;
}

.theme-preview-light {
  background: #ffffff;
}

.theme-preview-dark {
  background: #1e293b;
}

.theme-preview-system {
  background: linear-gradient(90deg, #ffffff 50%, #1e293b 50%);
}

.theme-preview-header {
  height: 20px;
  width: 100%;
}

.theme-preview-light .theme-preview-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.theme-preview-dark .theme-preview-header {
  background: #334155;
  border-bottom: 1px solid #475569;
}

.theme-preview-system .theme-preview-header {
  background: linear-gradient(90deg, #f8fafc 50%, #334155 50%);
  border-bottom: 1px solid #64748b;
}

.theme-preview-content {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.theme-preview-line {
  height: 8px;
  border-radius: 4px;
}

.theme-preview-line.short {
  width: 70%;
}

.theme-preview-light .theme-preview-line {
  background: #e2e8f0;
}

.theme-preview-dark .theme-preview-line {
  background: #475569;
}

.theme-preview-system .theme-preview-line {
  background: linear-gradient(90deg, #e2e8f0 50%, #475569 50%);
}

.theme-preview-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.theme-preview-system .theme-preview-overlay {
  opacity: 1;
}

.theme-info {
  text-align: center;
}

.theme-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.theme-description {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Coming soon placeholder */
.coming-soon {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-muted);
  font-style: italic;
}

/* Mobile optimization for settings */
@media (max-width: 767px) {
  .settings-container {
    padding: 0 var(--space);
  }
  
  .settings-header {
    margin-bottom: var(--space-lg);
  }
  
  .page-title {
    font-size: 1.75rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  .settings-section {
    padding: var(--space-lg);
  }
  
  .settings-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
  }
  
  .settings-icon {
    width: 40px;
    height: 40px;
  }
  
  .theme-options {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .theme-option {
    padding: var(--space-md);
  }
  
  .theme-preview {
    height: 60px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.5rem;
  }
  
  .settings-section {
    padding: var(--space-md);
  }
  
  .theme-preview {
    height: 50px;
  }
}

/* Dark theme specific adjustments */
[data-theme="dark"] .theme-preview-light {
  border: 2px solid var(--border-light);
}

[data-theme="dark"] .theme-preview-dark {
  border: 2px solid var(--primary);
}

/* Animation for theme changes */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .theme-option,
  .theme-preview,
  .settings-section,
  * {
    transition: none !important;
  }
}

/* Customer page styles */
.customer-page {
  /* max-width: 800px; */
  margin: 0 auto;
  /* padding: 0 var(--space-md); */
}

.customer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
}

.customer-intro {
  flex: 1;
}

.customer-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-sm) 0;
}

.customer-description {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin: 0;
  line-height: 1.5;
}

.customer-actions {
  flex-shrink: 0;
}

.customer-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.customer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.2s ease;
}

.customer-card:hover {
  box-shadow: var(--shadow-md);
}

.customer-card.primary-customer {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--surface) 0%, var(--primary-light) 100%);
}

.customer-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
}

.primary-customer .customer-card-header {
  background: rgba(99, 102, 241, 0.05);
  border-bottom-color: var(--primary);
}

.customer-avatar {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.customer-avatar.secondary {
  background: var(--gray-100);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
}

.customer-info {
  flex: 1;
}

.customer-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-xs) 0;
}

.customer-role {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

.customer-card-actions {
  flex-shrink: 0;
}

.customer-details {
  padding: var(--space-xl);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg) var(--space-xl);
  align-items: start;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-height: 3rem;
  justify-content: flex-start;
}

.detail-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.detail-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  background: var(--surface-subtle);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
}

.empty-state-icon {
  margin-bottom: var(--space-lg);
  color: var(--text-muted);
  opacity: 0.7;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-sm) 0;
}

.empty-state-description {
  color: var(--text-muted);
  margin: 0 0 var(--space-xl) 0;
  line-height: 1.5;
}

/* Desktop optimizations */
@media (min-width: 768px) {
  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg) var(--space-2xl);
  }
  
  .detail-item {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-md);
    min-height: auto;
    justify-content: space-between;
  }
  
  .detail-label {
    flex: 0 0 40%;
    text-align: left;
  }
  
  .detail-value {
    flex: 1;
    text-align: right;
    font-weight: 500;
  }
}

/* Mobile optimizations */
@media (max-width: 767px) {
  .customer-page {
    padding: 0 var(--space);
  }
  
  .customer-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
  }
  
  .customer-title {
    font-size: 1.5rem;
  }
  
  .customer-description {
    font-size: 1rem;
  }
  
  .customer-actions {
    align-self: stretch;
  }
  
  .customer-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .customer-card-header {
    padding: var(--space-lg);
    gap: var(--space-md);
  }
  
  .customer-details {
    padding: var(--space-lg);
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .detail-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: stretch;
    justify-content: flex-start;
  }
  
  .detail-label {
    text-align: left;
    flex: none;
  }
  
  .detail-value {
    text-align: left;
    flex: none;
  }
  
  .empty-state {
    padding: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .customer-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
  }
  
  .customer-title {
    font-size: 1.375rem;
  }
  
  .customer-card-header {
    padding: var(--space-md);
  }
  
  .customer-details {
    padding: var(--space-md);
  }
  
  .customer-avatar {
    width: 40px;
    height: 40px;
  }
  
  .customer-avatar.secondary {
    width: 36px;
    height: 36px;
  }
  
  .customer-name {
    font-size: 1.125rem;
  }
}

/* Dark theme adjustments */
[data-theme="dark"] .customer-card.primary-customer {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(99, 102, 241, 0.1) 100%);
}

[data-theme="dark"] .primary-customer .customer-card-header {
  background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .empty-state {
  background: var(--surface);
  border-color: var(--border);
}

/* Ensure input text is visible in dark theme */
[data-theme="dark"] .form-control, 
[data-theme="dark"] .form-select, 
[data-theme="dark"] input[type="text"], 
[data-theme="dark"] input[type="tel"], 
[data-theme="dark"] input[type="password"], 
[data-theme="dark"] input[type="email"], 
[data-theme="dark"] select, 
[data-theme="dark"] textarea {
  color: var(--text) !important;
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: var(--text-light) !important;
}

/* Tourist form styles */
.tourist-form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.form-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.form-wrapper {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.tourist-form .form-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
}

/* Mobile optimizations for tourist form */
@media (max-width: 767px) {
  .tourist-form-container {
    padding: 0 var(--space);
  }
  
  .form-wrapper {
    padding: var(--space-lg);
    margin: 0 var(--space-xs);
  }
  
  .tourist-form .form-actions {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .tourist-form-container {
    padding: 0 var(--space-sm);
  }
  
  .form-wrapper {
    padding: var(--space-md);
    margin: 0;
    border-radius: var(--radius);
  }
  
  .form-header {
    margin-bottom: var(--space-lg);
  }
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text);
  background: var(--gray-100);
}

.modal-body {
  padding: var(--space-lg);
  flex: 1;
  overflow: auto;
}

.schema-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.schema-image {
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-top: 1px solid var(--border-light);
}

/* Mobile optimizations for modal */
@media (max-width: 767px) {
  .modal {
    padding: var(--space);
  }
  
  .modal-content {
    width: 100%;
    max-height: 95vh;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: var(--space-md);
  }
  
  .modal-title {
    font-size: 1.125rem;
  }
  
  .schema-image {
    max-height: 60vh;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: var(--space-sm);
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: var(--space);
  }
  
  .schema-image {
    max-height: 50vh;
  }
}

/* Dark theme adjustments for modal */
[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .modal-close:hover {
  background: var(--gray-700);
}

/* Keep optional offcanvas interaction if used somewhere */
.offcanvas-backdrop.show + .offcanvas-start ~ main {
    transform: translateX(250px);
    transition: transform 0.3s ease;
}

.feedback-rating span svg path {
  transition: fill 0.2s;
  fill: #D9D9D9
}

.feedback-rating span.active svg path {
  fill: #FFDA32;
}

.feedback-rating span.selected svg path {
  fill: #FFDA32;
}

.feedback-rating {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.feedback-open-button {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #FF5722;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
}

.feedback-open-button-text {
  font-size: 14px;
  font-weight: 500;
  color: #FFF;
  margin: 0;
}

@media (max-width: 480px) {
  .feedback-open-button-text {
      font-size: 12.8px;
  }
}

.feedback-allowed-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.feedback-allowed {
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  justify-content: right;
  align-items: center;
  gap: 10px;
}

.feedback-allowed-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.feedback-allowed-modal.active {
  display: flex;
}

.feedback-modal-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: white;
  border-radius: 16px;
  padding: 40px 20px 20px 20px;
  max-width: 360px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.feedback-modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.feedback-modal-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #0F172A;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: #0F172A;
  text-decoration-style: solid;
  text-decoration-skip-ink: none;
  text-decoration-skip-ink: none;
}

.feedback-modal-close {
  cursor: pointer;
  position: absolute;
  top: 9px;
  right: 9px;
}

.feedback-modal-rating-content {
  width: 100%;
  background-color: #F8FAFC;
  border: 1px solid #6466F1;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.feedback-modal-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.feedback-modal-rating-text , .feedback-modal-textarea-text{
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: #605F5F;
}

.feedback-modal-textarea-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.feedback-modal-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border: 1px solid #6466F1;
  border-radius: 16px;
  background-color: #F8FAFC;
  font-family: inherit;
  resize: vertical;
  color: #0F172A;
  font-size: 16px;
}

.feedback-modal-textarea::placeholder {
  color: #64748B;
  font-size: 12px;
}

.feedback-modal-textarea:focus {
  outline: none;
}

.feedback-modal-submit {
  width: 100%;
  padding: 10px;
  background-color: #FF5722;
  color: white;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
}


@keyframes errorShake {
  0%, 100% {
      transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
      transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
      transform: translateX(5px);
  }
}

.feedback-modal-rating-content {
  transition: border-color 0.3s ease;
}

.feedback-modal-textarea {
  transition: border-color 0.3s ease;
}

.feedback-modal-rating-content.area-error {
  border: 1px solid #EF4444 !important;
  animation: errorShake 0.5s ease-in-out;
}

.feedback-modal-textarea.area-error {
  border: 1px solid #EF4444 !important;
  animation: errorShake 0.5s ease-in-out;
}


.feedback-modal-submit.inactive {
  background-color: #BDBDBD;
  cursor: not-allowed;
}

.feedback-modal-submit.submitting {
  background-color: #BDBDBD;
  cursor: not-allowed;
  pointer-events: none;
}

/* Стили для submitted шаблона */
.feedback-submitted {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.feedback-submitted-content {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.feedback-rating-submitted {
  display: flex;
  gap: 10px;
  flex-direction: row;
  align-items: center;
}

.feedback-rating-submitted-star svg path {
  fill: #D9D9D9;
  transition: fill 0.2s;
}

.feedback-rating-submitted-star.active svg path {
  fill: #FFDA32;
}

.feedback-text-submitted {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.feedback-text-submitted-header {
  font-size: 18px;
  font-weight: 600;
  color: #000;
  margin: 0;
}

.feedback-text-submitted-text {
  font-size: 12px;
  font-weight: 400;
  color: #000;
  margin: 0;
  text-align: center;
}


.feedback-submitted {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.feedback-submitted-content {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.feedback-rating-submitted {
  display: flex;
  gap: 10px;
  flex-direction: row;
  align-items: center;
}

.feedback-rating-submitted-star svg path {
  fill: #D9D9D9;
  transition: fill 0.2s;
}

.feedback-rating-submitted-star.active svg path {
  fill: #FFDA32;
}
.feedback-text-submitted {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.feedback-text-submitted-header {
  font-size: 18px;
  font-weight: 600;
  color: #000;
  margin: 0;
}
.feedback-text-submitted-text {
  font-size: 12px;
  font-weight: 400;
  color: #000;
  margin: 0;
  text-align: center;
}