/* ===== MODERN HOTEL ADMIN PANEL CSS 2024-25 ===== */
/* Унифицированная система дизайна с современными UI/UX трендами */

/* ===== CSS VARIABLES - DESIGN SYSTEM ===== */
:root {
  /* === СОВРЕМЕННАЯ ЦВЕТОВАЯ ПАЛИТРА === */
  --primary: #059669;
  --primary-light: #10b981;
  --primary-dark: #047857;
  --secondary: #f1f5f9;
  --accent: #fbbf24;
  --danger: #ef4444;
  --warning: #fbbf24;
  --success: #10b981;
  --info: #3b82f6;
  
  /* === НЕЙТРАЛЬНЫЕ ЦВЕТА === */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* === ТЕМНАЯ ТЕМА === */
  --dark-bg: #0f172a;
  --dark-surface: #1e293b;
  --dark-surface-light: #334155;
  --dark-text: #f1f5f9;
  --dark-text-muted: #94a3b8;
  
  /* === ГРАДИЕНТЫ === */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  --gradient-success: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  --gradient-danger: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  --gradient-warning: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, #f59e0b 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  
  /* === ОТСТУПЫ === */
  --space-xs: 0.25rem;    /* 4px */
  --space-sm: 0.5rem;     /* 8px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  
  /* === РАДИУСЫ СКРУГЛЕНИЯ === */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
  
  /* === ТЕНИ === */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  
  /* === ТИПОГРАФИКА === */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  
  /* === РАЗМЕРЫ ШРИФТОВ === */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */
  
  /* === ПЕРЕХОДЫ === */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* === МАКЕТ === */
  --sidebar-width: 280px;
  --sidebar-width-collapsed: 80px;
  --header-height: 80px;
  --container-max-width: 1400px;
  --container-padding: var(--space-xl);
  
  /* === Z-INDEX === */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
}

/* === ПЕРЕМЕННЫЕ ДЛЯ ТЕМНОЙ ТЕМЫ === */
[data-theme="dark"] {
  --bg: var(--dark-bg);
  --surface: var(--dark-surface);
  --surface-light: var(--dark-surface-light);
  --surface-elevated: var(--dark-surface-light);
  --text-primary: var(--dark-text);
  --text-secondary: var(--dark-text-muted);
  --border: var(--gray-700);
  --border-light: var(--gray-600);
  --shadow-sm: 0 1px 2px 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.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* === ПЕРЕМЕННЫЕ ДЛЯ СВЕТЛОЙ ТЕМЫ === */
[data-theme="light"] {
  --bg: var(--gray-50);
  --surface: var(--white);
  --surface-light: var(--gray-100);
  --surface-elevated: var(--white);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --border: var(--gray-200);
  --border-light: var(--gray-200);
}

/* ===== ГЛОБАЛЬНЫЕ СТИЛИ ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== КОМПОНЕНТЫ МАКЕТА ===== */
.layout {
  display: flex;
  min-height: 100vh;
}

/* === БОКОВАЯ ПАНЕЛЬ === */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: var(--z-fixed);
  transition: all var(--transition-normal);
  scrollbar-width: thin;
  scrollbar-color: var(--gray-400) transparent;
  box-shadow: var(--shadow-lg);
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

.sidebar-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  background: var(--gradient-primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.sidebar-brand {
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.brand-icon {
  font-size: var(--text-2xl);
  line-height: 1;
}

.brand-text {
  background: linear-gradient(45deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  padding: var(--space-lg) 0;
}

.nav-group {
  margin-bottom: var(--space-lg);
}

.nav-group-title {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 var(--space-lg);
  margin-bottom: var(--space-sm);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin-right: var(--space-md);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  font-weight: 500;
}

.nav-item:hover {
  background: var(--surface-light);
  transform: translateX(4px);
  color: var(--primary);
}

.nav-item.active {
  background: var(--gradient-primary);
  color: white;
  transform: translateX(4px);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--primary-light);
}

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

.nav-icon {
  font-size: var(--text-lg);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-text {
  flex: 1;
}

/* === ОСНОВНОЙ КОНТЕНТ === */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  background: var(--bg);
  min-height: 100vh;
  transition: margin-left var(--transition-normal);
}

/* === ШАПКА === */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--container-padding);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-md);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.header-title-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.header-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  width: 44px;
  height: 44px;
  position: relative;
}

.mobile-menu-toggle:hover {
  background: var(--surface-light);
}

.hamburger {
  display: block;
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  bottom: -6px;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-fixed) - 1);
  backdrop-filter: blur(4px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

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

.user-hotel {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* === КОНТЕНТ === */
.content {
  padding: var(--container-padding);
  max-width: var(--container-max-width);
  margin: 0 auto;
  width: 100%;
}

/* ===== КАРТОЧКИ ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  min-height: 10%;
  max-height: 80%;
  overflow-y: auto;
  margin-bottom: var(--space-xl);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.card-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin: 0;
}

/* ===== КНОПКИ ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}

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

.btn-loading {
  pointer-events: none;
}

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

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

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--surface-light);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-warning {
  background: var(--gradient-warning);
  color: white;
  box-shadow: var(--shadow-md);
}

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

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

.btn-full {
  width: 100%;
}

/* ===== ФОРМЫ ===== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: var(--text-secondary);
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right var(--space-md) center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: calc(var(--space-md) * 3);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-file {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.form-file input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.form-file-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.form-file:hover .form-file-label {
  background: var(--border);
  transform: translateY(-1px);
}

/* ===== ТАБЛИЦЫ ===== */
.table-container {
  background: var(--surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  margin-bottom: var(--space-xl);
  max-height: 70vh;
}

.table-wrapper {
  position: relative;
  width: 100%;
  min-width: 800px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: var(--surface-light);
  padding: var(--space-lg);
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
  font-size: var(--text-sm);
}

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--surface-light);
}

.table tbody tr:last-child td {
  border-bottom: none;
}
/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn var(--transition-normal) ease-out;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  max-width: 500px;
  animation: slideIn var(--transition-normal) ease-out;
}

.modal-content.modal-lg {
  max-width: 700px;
}

.modal-content.modal-xl {
  max-width: 900px;
}

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

.modal-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--text-2xl);
  cursor: pointer;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-xl);
  max-height: 60vh;
  overflow-y: auto;
}

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

.modal-alert {
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  font-weight: 500;
}

.modal-alert.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.modal-alert.danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.modal-alert.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

.modal-alert.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--info);
}

/* Анимации для модальных окон */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.modal {
  animation: modalFadeIn var(--transition-normal) ease-out;
}

.modal-content {
  animation: modalSlideIn var(--transition-normal) ease-out;
}

/* Адаптивность для модальных окон */
@media (max-width: 768px) {
  .modal {
    padding: var(--space-md);
  }
  
  .modal-content {
    max-width: 100%;
    max-height: 95vh;
  }
  
  .modal-content.modal-lg,
  .modal-content.modal-xl {
    max-width: 100%;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: var(--space-lg);
  }
  
  .modal-title {
    font-size: var(--text-lg);
  }
}

@media (max-width: 480px) {
  .modal {
    padding: var(--space-sm);
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: var(--space-md);
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
}

/* ===== КАРТОЧКИ ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  min-height: 10%;
  max-height: 80%;
  overflow-y: auto;
  margin-bottom: var(--space-xl);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.card-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin: 0;
}

/* ===== КНОПКИ ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}

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

.btn-loading {
  pointer-events: none;
}

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

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

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--surface-light);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-warning {
  background: var(--gradient-warning);
  color: white;
  box-shadow: var(--shadow-md);
}

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

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

.btn-full {
  width: 100%;
}

/* ===== ФОРМЫ ===== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: var(--text-secondary);
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right var(--space-md) center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: calc(var(--space-md) * 3);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-file {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.form-file input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.form-file-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.form-file:hover .form-file-label {
  background: var(--border);
  transform: translateY(-1px);
}

/* ===== ТАБЛИЦЫ ===== */
.table-container {
  background: var(--surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  margin-bottom: var(--space-xl);
  max-height: 70vh;
}

.table-wrapper {
  position: relative;
  width: 100%;
  min-width: 800px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: var(--surface-light);
  padding: var(--space-lg);
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
  font-size: var(--text-sm);
}

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--surface-light);
}

.table tbody tr:last-child td {
  border-bottom: none;
}
/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn var(--transition-normal) ease-out;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  max-width: 500px;
  animation: slideIn var(--transition-normal) ease-out;
}

.modal-content.modal-lg {
  max-width: 700px;
}

.modal-content.modal-xl {
  max-width: 900px;
}

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

.modal-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--text-2xl);
  cursor: pointer;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-xl);
  max-height: 60vh;
  overflow-y: auto;
}

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

.modal-alert {
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  font-weight: 500;
}

.modal-alert.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.modal-alert.danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.modal-alert.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

.modal-alert.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--info);
}

/* Анимации для модальных окон */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.modal {
  animation: modalFadeIn var(--transition-normal) ease-out;
}

.modal-content {
  animation: modalSlideIn var(--transition-normal) ease-out;
}

/* Адаптивность для модальных окон */
@media (max-width: 768px) {
  .modal {
    padding: var(--space-md);
  }
  
  .modal-content {
    max-width: 100%;
    max-height: 95vh;
  }
  
  .modal-content.modal-lg,
  .modal-content.modal-xl {
    max-width: 100%;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: var(--space-lg);
  }
  
  .modal-title {
    font-size: var(--text-lg);
  }
}

@media (max-width: 480px) {
  .modal {
    padding: var(--space-sm);
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: var(--space-md);
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
}

/* ===== УМЕНЬШЕНИЕ АНИМАЦИИ ===== */
@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;
  }
}
/* === АДАПТИВНЫЕ ТАБЛИЦЫ === */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 95vh;
  overflow-y: auto;
  max-width: 100%;
  width: 100%;
  height: 100%;
  max-height: 100%;
}

/* ===== БЕЙДЖИ ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

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

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

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-primary {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-accent {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.badge-secondary {
  background-color:rgb(0, 0, 0);
}

/* ===== ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ ===== */
.theme-toggle {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-lg);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--border);
  transform: translateY(-1px);
}

/* ===== СТАТИСТИЧЕСКИЕ КАРТОЧКИ ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.1;
}

.stat-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-trend {
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: var(--space-sm);
}

.stat-trend.positive {
  color: var(--success);
}

.stat-trend.negative {
  color: var(--danger);
}

.stat-icon-large {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  text-align: center;
  display: block;
  opacity: 0.8;
}

/* === АДАПТИВНЫЕ УТИЛИТЫ === */
.hide-mobile {
  display: table-cell;
}

.hide-tablet {
  display: table-cell;
}

@media (max-width: 1024px) {
  .hide-tablet {
    display: none;
  }
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
}

/* === СОВРЕМЕННЫЕ КНОПКИ === */
.btn-icon {
  font-size: 1em;
  margin-right: var(--space-xs);
}

.btn-text {
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* === СОВРЕМЕННЫЕ КАРТОЧКИ === */
.management-panel,
.user-actions-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
  margin-bottom: var(--space-xl);
}

.management-panel:hover,
.user-actions-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.data-table {
  width: 100%;
  overflow: visible;
}

.responsive-table {
  width: 100%;
  min-width: 720px; /* reduce to avoid horizontal scroll on 1280px */
}

/* Visible scrollbars for table containers */
.table-container {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-400) transparent;
}

.table-container::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
  background-color: var(--gray-300);
  border-radius: 8px;
}

/* ===== Clients Report (SuperAdmin) ===== */
.clients-report .hotel-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: var(--gray-600);
}

.clients-report .tickets-count {
  text-align: center;
  font-weight: 700;
}

.clients-report .tickets-count.high { color: var(--success); }
.clients-report .tickets-count.medium { color: var(--warning); }
.clients-report .tickets-count.low { color: var(--text-secondary); }

.clients-report .revenue-amount {
  font-weight: 700;
  color: var(--success);
}

.clients-report .marketing-consent { text-align: center; }
.clients-report .marketing-consent.yes { color: var(--success); font-weight: 700; }
.clients-report .marketing-consent.no { color: var(--danger); }

.clients-report .gender-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

.clients-report .gender-badge.male { background: #e3f2fd; color: #1976d2; }
.clients-report .gender-badge.female { background: #fce4ec; color: #c2185b; }
.clients-report .gender-badge.other { background: #f3e5f5; color: #7b1fa2; }

/* Filters layout reuse */
.clients-report .filters-bar { margin-bottom: var(--space-lg); }
.clients-report .filter-controls { gap: var(--space-md); }
.clients-report .filter-controls .form-input,
.clients-report .filter-controls .form-select { min-width: 180px; }

/* ===== Hotels filters toolbar ===== */
.hotels-filter-bar {
  margin-bottom: 12px;
}

.hotels-filter-inner {
  margin: 12px;
}

.hotels-date-input {
  width: 180px;
  height: 40px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
}

.hotels-filter-btn {
  height: 40px;
  border-radius: var(--radius-md);
}

/* ===== FLASH СООБЩЕНИЯ ===== */
.flash-messages {
  margin-bottom: var(--space-xl);
}

.flash-message {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
  border: 1px solid;
  box-shadow: var(--shadow-md);
  position: relative;
}

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

.flash-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

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

.flash-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--info);
}

.flash-icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.flash-text {
  flex: 1;
  font-weight: 500;
}

.flash-close {
  background: none;
  border: none;
  color: currentColor;
  cursor: pointer;
  font-size: var(--text-xl);
  line-height: 1;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.flash-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fade-in {
  animation: fadeIn var(--transition-normal) ease-out;
}

.slide-in {
  animation: slideIn var(--transition-normal) ease-out;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
  :root {
      --sidebar-width: 250px;
      --container-padding: var(--space-lg);
  }
}

@media (max-width: 768px) {
  :root {
      --header-height: 60px;
      --container-padding: var(--space-md);
  }
  
  .sidebar {
      transform: translateX(-100%);
      z-index: var(--z-modal);
  }
  
  .main-content {
      margin-left: 0;
  }
  
  .mobile-menu-toggle {
      display: flex;
  }
  
  .header-title {
      font-size: var(--text-xl);
  }
  
  .stats-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: var(--space-md);
  }
  
  .table-container {
      overflow-x: auto;
  }
  
  .card {
      padding: var(--space-lg);
  }
  
  .btn {
      padding: var(--space-md) var(--space-lg);
  }
  
    .header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  
  .user-info {
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-xs);
    order: 2;
  }

  .header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    order: 1;
  }

  .lang-select {
    min-width: 100px;
    font-size: var(--text-sm);
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }
  
  /* Enhanced table mobile styles */
  .table th,
  .table td {
      padding: var(--space-sm);
      font-size: var(--text-sm);
  }
  
  .card-header {
      flex-direction: column;
      align-items: stretch;
      gap: var(--space-md);
  }
  
  .card-header .flex {
      flex-direction: column;
      align-items: stretch;
      gap: var(--space-md);
  }
  
  .card-header .btn {
      width: 100%;
      justify-content: center;
  }
  
  /* Hide less important columns on mobile */
  .table th:nth-child(n+7),
  .table td:nth-child(n+7) {
      display: none;
  }
  
  /* Better form layouts on mobile */
  .modal-content {
      margin: var(--space-md);
      max-width: calc(100vw - 2rem);
  }
  
  .form-group {
      margin-bottom: var(--space-md);
  }
  
  .flex.gap-md {
      flex-direction: column;
      gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  :root {
      --container-padding: var(--space-sm);
  }
  
  .header {
      padding: 0 var(--space-md);
  }

  .header-title {
      font-size: var(--text-base);
  }

  .header-actions {
      gap: var(--space-xs);
  }

  .user-info {
      display: none; /* Скрываем информацию о пользователе на очень маленьких экранах */
  }

  .header-controls {
      gap: var(--space-xs);
  }

  .lang-select {
      min-width: 70px;
      font-size: var(--text-xs);
      padding: var(--space-xs);
  }

  .theme-toggle {
      width: 28px;
      height: 28px;
      font-size: var(--text-xs);
  }
  
  .form-input, .form-select, .form-textarea {
      padding: var(--space-sm);
  }
  
  .table th, .table td {
      padding: var(--space-xs) var(--space-sm);
      font-size: var(--text-xs);
  }
  /* Hotels table responsive tweaks */
  #hotelsTable td.hotel-cell .flex {
    gap: var(--space-xs);
  }
  #hotelsTable td,
  #hotelsTable th {
    white-space: normal; /* allow wrapping */
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  #hotelsTable .flex.flex-col.gap-xs.items-stretch .btn {
    min-height: 32px;
    justify-content: flex-start;
  }
  #hotelsTable .btn-text { display: none; }
  #hotelsTable .btn-icon {
    margin-right: var(--space-xs);
  }
  #hotelsTable .btn { min-width: 32px; }
  
  .stat-card {
      padding: var(--space-md);
      text-align: center;
  }
  
  .stat-value {
      font-size: var(--text-xl);
  }
  
  .stats-grid {
      grid-template-columns: 1fr;
      gap: var(--space-sm);
  }
  
  /* Hide more columns on small screens */
  .table th:nth-child(n+5),
  .table td:nth-child(n+5) {
      display: none;
  }
  
  /* Hotels table mobile adjustments */
  #hotelsTable .btn-text {
    display: none;
  }
  #hotelsTable .btn-icon {
    margin-right: 0;
  }
  #hotelsTable .btn {
    min-width: 36px;
    padding: var(--space-xs);
  }
  
  .card-header .flex {
      align-items: center;
      text-align: center;
  }
  
  .card-title {
      font-size: var(--text-lg);
  }
  
  .modal-content {
      margin: var(--space-sm);
      max-width: calc(100vw - 1rem);
  }
  
  .btn {
      padding: var(--space-sm);
      font-size: var(--text-sm);
      min-height: 44px; /* Touch-friendly */
  }
}

/* ===== УТИЛИТАРНЫЕ КЛАССЫ ===== */
/* Текст */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-accent { color: var(--accent) !important; }
.text-info { color: var(--info) !important; }

/* Выравнивание текста */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Вес шрифта */
.font-light { font-weight: 300 !important; }
.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }

/* Отступы снизу */
.mb-0 { margin-bottom: 0 !important; }
.mb-xs { margin-bottom: var(--space-xs) !important; }
.mb-sm { margin-bottom: var(--space-sm) !important; }
.mb-md { margin-bottom: var(--space-md) !important; }
.mb-lg { margin-bottom: var(--space-lg) !important; }
.mb-xl { margin-bottom: var(--space-xl) !important; }
.mb-2xl { margin-bottom: var(--space-2xl) !important; }

/* Отступы сверху */
.mt-0 { margin-top: 0 !important; }
.mt-xs { margin-top: var(--space-xs) !important; }
.mt-sm { margin-top: var(--space-sm) !important; }
.mt-md { margin-top: var(--space-md) !important; }
.mt-lg { margin-top: var(--space-lg) !important; }
.mt-xl { margin-top: var(--space-xl) !important; }
.mt-2xl { margin-top: var(--space-2xl) !important; }

/* Flexbox */
.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.items-end { align-items: flex-end !important; }
.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }

/* Пробелы */
.gap-xs { gap: var(--space-xs) !important; }
.gap-sm { gap: var(--space-sm) !important; }
.gap-md { gap: var(--space-md) !important; }
.gap-lg { gap: var(--space-lg) !important; }
.gap-xl { gap: var(--space-xl) !important; }

/* Видимость */
.hidden { display: none !important; }
.visible { display: block !important; }

/* Ширина */
.w-full { width: 100% !important; }
.w-auto { width: auto !important; }

/* Высота */
.h-full { height: 100% !important; }
.h-auto { height: auto !important; }

/* Позиционирование */
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.fixed { position: fixed !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }

/* Пользовательский выбор */
.select-none { user-select: none !important; }
.select-all { user-select: all !important; }

/* Курсор */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* ===== СОСТОЯНИЯ ЗАГРУЗКИ ===== */
.loading {
  position: relative;
  pointer-events: none;
}

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

/* ===== ПЕЧАТЬ ===== */
@media print {
  .sidebar,
  .header-actions,
  .mobile-menu-toggle,
  .btn,
  .flash-messages {
      display: none !important;
  }
  
  .main-content {
      margin-left: 0 !important;
  }
  
  .card {
      box-shadow: none !important;
      border: 1px solid #000 !important;
      page-break-inside: avoid;
  }
  
  .table {
      font-size: 10px !important;
  }
}

/* ===== ВЫСОКАЯ КОНТРАСТНОСТЬ ===== */
@media (prefers-contrast: high) {
  :root {
      --border: #000000;
      --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.8);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.8);
      --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.8);
  }
  
  .btn {
      border: 2px solid currentColor;
  }
  
  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
      border-width: 2px;
  }
}
.lang-selector {
  position: relative;
}

.lang-select {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 120px;
}

.lang-select:hover {
  background: var(--border);
}

.lang-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== РЕСПОНСИВНАЯ ТАБЛИЦА БИЛЕТОВ ===== */

/* Десктопная версия таблицы */
.desktop-row {
  display: table-row;
}

.mobile-card {
  display: none;
}

/* Улучшенные стили кнопок с единой системой */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  min-height: 36px;
}

.btn-xs {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
  min-height: 28px;
  gap: 2px;
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
  min-height: 32px;
  gap: var(--space-xs);
}

.btn-mobile {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  min-height: 44px;
  gap: var(--space-sm);
  border-radius: var(--radius-lg);
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.btn-icon {
  font-size: 1em;
  line-height: 1;
  flex-shrink: 0;
}

.btn-text {
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Стили для кнопок действий */
.action-buttons {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  align-items: center;
}

/* Стилизация ячеек таблицы */
.table td {
  padding: var(--space-md) var(--space-sm);
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.checkbox-cell {
  width: 40px;
  text-align: center;
}

.ticket-cell {
  min-width: 80px;
}

.client-cell {
  min-width: 160px;
}

.route-cell {
  min-width: 120px;
}

.number-cell {
  min-width: 120px;
}

.date-cell {
  min-width: 100px;
}

.price-cell {
  min-width: 80px;
  text-align: right;
}

.status-cell {
  min-width: 100px;
}

.pdf-cell {
  min-width: 80px;
  text-align: center;
}

.created-cell {
  min-width: 100px;
}

.actions-cell {
  min-width: 200px;
  text-align: center;
}

/* ===== МОБИЛЬНЫЕ КАРТОЧКИ ===== */
.card-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin: var(--space-sm) 0;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.card-container:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

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

.card-checkbox {
  flex-shrink: 0;
}

.card-main-info {
  flex: 1;
  margin: 0 var(--space-md);
}

.card-ticket-id {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.card-status {
  margin-bottom: 0;
}

.card-price {
  flex-shrink: 0;
  text-align: right;
}

.card-price .price-amount {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--success);
}

.card-body-mobile {
  margin-bottom: var(--space-lg);
}

.card-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.info-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  font-weight: 500;
  color: var(--text-primary);
}

.client-name {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.client-passport {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.route-text {
  font-weight: 600;
  color: var(--primary);
}

.ticket-number {
  font-family: var(--font-mono);
  font-weight: 600;
  background: var(--surface-light);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  display: inline-block;
}

.card-actions-mobile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-sm);
}

/* Page Specific Styles */
.filters-bar {
  padding: var(--space-lg) var(--space-xl);
  background: var(--surface-light);
  border-bottom: 1px solid var(--border);
}

.filter-controls {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 250px;
}

.date-range {
  display: flex;
  gap: var(--space-sm);
}

.date-range input {
  width: 140px;
}

.ticket-info {
  display: flex;
  flex-direction: column;
}

.ticket-id {
  font-weight: 600;
  color: var(--primary);
}

.ticket-meta {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.client-info {
  display: flex;
  flex-direction: column;
}

.route-info {
  font-weight: 500;
  color: var(--text-primary);
}

.price-info {
  font-weight: 600;
  color: var(--success);
  font-size: var(--text-lg);
}

.ticket-modal .modal-content {
  max-width: 600px;
}

.reports-modal .modal-content {
  max-width: 800px;
}

.report-period {
  margin-bottom: var(--space-xl);
}

.period-selector {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.period-selector .btn.active {
  background: var(--primary);
  color: white;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.report-card {
  background: var(--surface-light);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  text-align: center;
  border: 1px solid var(--border);
}

.report-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.report-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.report-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.report-change {
  font-size: var(--text-xs);
  font-weight: 600;
}

.report-change.positive {
  color: var(--success);
}

.report-change.negative {
  color: var(--danger);
}

.chart-section {
  margin-bottom: var(--space-2xl);
}

.chart-section h4 {
  margin-bottom: var(--space-lg);
  color: var(--primary);
}

.chart-placeholder {
  background: var(--surface-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  border: 1px solid var(--border);
}

.top-routes h4 {
  margin-bottom: var(--space-lg);
  color: var(--primary);
}

.route-list {
  background: var(--surface-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.route-item:last-child {
  border-bottom: none;
}

.route-name {
  font-weight: 600;
}

.route-stats {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.bulk-actions-bar {
  padding: var(--space-lg) var(--space-xl);
  background: var(--primary);
  color: white;
  position: sticky;
  bottom: 0;
  z-index: var(--z-sticky);
}

.bulk-actions-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bulk-actions-buttons {
  display: flex;
  gap: var(--space-sm);
}

.bulk-actions-buttons .btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.bulk-actions-buttons .btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.empty-state {
  padding: var(--space-3xl);
  text-align: center;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
}

.empty-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.empty-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--border);
  position: relative;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

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

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

.modal-close {
  background: none;
  border: none;
  font-size: var(--text-xl);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  background: var(--surface-light);
  color: var(--text-primary);
}

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

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

.confirmation-content {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.confirmation-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.confirmation-text {
  flex: 1;
}

.confirmation-note {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  margin-bottom: 0;
}
/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--border);
  position: relative;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

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

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

.modal-close {
  background: none;
  border: none;
  font-size: var(--text-xl);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  background: var(--surface-light);
  color: var(--text-primary);
}

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

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

.confirmation-content {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.confirmation-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.confirmation-text {
  flex: 1;
}

.confirmation-note {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  margin-bottom: 0;
}

.form-error {
  color: var(--danger);
  font-size: var(--text-sm);
  margin-top: var(--space-xs);
  display: none;
}

.form-error.show {
  display: block;
}

.required::after {
  content: ' *';
  color: var(--danger);
}

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

.hotel-detail-item {
  padding: var(--space-lg);
  background: var(--surface-light);
  border-radius: var(--radius-lg);
  text-align: center;
}

.hotel-detail-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.hotel-detail-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
}

.flash-messages {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: calc(var(--z-modal) + 10);
}

.form-display {
  padding: var(--space-md);
  background: var(--surface-light);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  word-break: break-all;
}

/* Water Park Integration CSS */
.waterpark-modal .modal-content {
  max-width: 1000px;
}

.waterpark-controls {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background: var(--surface-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.controls-row {
  display: flex;
  gap: var(--space-lg);
  align-items: end;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.control-group label {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.control-group .form-input,
.control-group .form-select {
  min-width: 150px;
}

.ticket-preview {
  max-width: 100%;
}

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

.ticket-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.detail-group {
  background: var(--surface-light);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}

.detail-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: var(--space-sm);
}

.detail-value {
  font-weight: 500;
}

.detail-value.price {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--success);
}

.ticket-timeline h4 {
  margin-bottom: var(--space-lg);
  color: var(--primary);
}

.timeline-item {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.timeline-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Overview section full width */
.overview-section {
  width: 100%;
  grid-template-columns: 1fr !important;
}

/* Water Park ticket cards styling */
.water-park-tickets-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.water-park-ticket-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.water-park-ticket-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.water-park-ticket-image {
  height: 150px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
}

.water-park-ticket-category {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
}

.water-park-ticket-timeslot {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px 0 0 0;
  font-size: var(--text-xs);
  font-weight: 500;
}

.water-park-ticket-content {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.water-park-ticket-name {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  line-height: 1.3;
}

.water-park-ticket-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
  line-height: 1.4;
  flex-grow: 1;
  max-height: 80px;
  overflow: hidden;
  position: relative;
}

.water-park-ticket-description::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(transparent, var(--surface));
}

.water-park-ticket-footer {
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.water-park-ticket-price {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-md);
  text-align: center;
}

.ticket-availability-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-md);
  padding: var(--space-sm);
  background: var(--surface-light);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.availability-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
}

.availability-count {
  font-weight: 600;
}

.text-warning {
  color: #e67e22;
  font-weight: bold;
}

.availability-separator {
  margin: 0 4px;
  color: var(--text-secondary);
}

.selected-count {
  font-weight: 600;
  color: var(--primary);
}

.ticket-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.quantity-control-group {
  display: flex;
  align-items: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface-light);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.qty-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
}

.qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.qty-minus {
  border-right: 1px solid var(--border);
}

.qty-plus {
  border-left: 1px solid var(--border);
}

.ticket-qty {
  text-align: center;
  border: none;
  width: 45px;
  height: 32px;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0;
  background: white;
}

.ticket-qty:focus {
  outline: none;
  background: var(--surface-light);
}

.order-btn {
  padding: 8px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  min-width: 80px;
}

.water-park-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl) 0;
  color: var(--text-secondary);
  font-size: var(--text-lg);
}

/* ===== МЕДИА ЗАПРОСЫ ДЛЯ АДАПТИВНОСТИ ===== */

/* Планшеты */
@media (max-width: 1024px) {
  .table th:nth-child(6),
  .table td:nth-child(6),
  .table th:nth-child(10),
  .table td:nth-child(10) {
      display: none;
  }
  
  .action-buttons {
      flex-direction: column;
      gap: var(--space-xs);
  }
  
  .action-buttons .btn {
      width: 100%;
      min-width: 120px;
  }
  
  .water-park-tickets-container {
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: var(--space-lg);
  }
  
  .waterpark-modal .modal-content {
      width: 95%;
      max-width: 900px;
  }
}

/* Мобильные устройства */
@media (max-width: 768px) {
  /* Скрываем десктопную таблицу */
  .desktop-row {
      display: none;
  }
  
  /* Показываем мобильные карточки */
  .mobile-card {
      display: table-row;
  }
  
  .mobile-card td {
      padding: 0;
      border: none;
  }
  
  /* Фильтры становятся вертикальными */
  .filter-controls {
      flex-direction: column;
      gap: var(--space-md);
  }
  
  .filter-controls > * {
      width: 100%;
  }
  
  .search-input-wrapper {
      min-width: auto;
  }
  
  /* Заголовок карточки */
  .card-header {
      flex-direction: column;
      text-align: center;
      gap: var(--space-md);
  }
  
  .card-header .flex {
      flex-direction: column;
      width: 100%;
  }
  
  .card-header .btn {
      width: 100%;
      margin-bottom: var(--space-sm);
  }
  
  /* Bulk actions становятся вертикальными */
  .bulk-actions-content {
      flex-direction: column;
      gap: var(--space-md);
      text-align: center;
  }
  
  .bulk-actions-buttons {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: var(--space-sm);
      width: 100%;
  }
  
  .controls-row {
      flex-direction: column;
      align-items: stretch;
  }
  
  .control-group .form-input,
  .control-group .form-select {
      min-width: auto;
      width: 100%;
  }
  
  .water-park-tickets-container {
      grid-template-columns: 1fr;
      gap: var(--space-md);
  }
  
  .waterpark-modal .modal-content {
      width: 98%;
      max-height: 98vh;
  }
  
  .ticket-actions-row {
      flex-direction: column;
      gap: var(--space-sm);
  }
  
  .order-btn {
      width: 100%;
  }
}

/* Маленькие мобильные устройства */
@media (max-width: 480px) {
  .card-info-grid {
      grid-template-columns: 1fr;
      gap: var(--space-lg);
  }
  
  .card-actions-mobile {
      grid-template-columns: 1fr;
      gap: var(--space-md);
  }
  
  .btn-mobile {
      padding: var(--space-lg);
      min-height: 48px;
      font-size: var(--text-base);
  }
  
  .card-header-mobile {
      flex-direction: column;
      text-align: center;
      gap: var(--space-md);
  }
  
  .card-main-info {
      margin: 0;
      text-align: center;
  }
  
  .card-price {
      text-align: center;
  }
  
  /* Статистические карточки */
  .stats-grid {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: var(--space-md);
  }
  
  .stat-card {
      padding: var(--space-md);
      text-align: center;
  }
  
  .stat-value {
      font-size: var(--text-xl);
  }
  
  .waterpark-controls {
      padding: var(--space-md);
  }
  
  .water-park-ticket-content {
      padding: var(--space-md);
  }
  
  .quantity-control-group {
      width: 100%;
      max-width: 140px;
  }
}

/* ===== СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ БОЛЬШИХ ЭКРАНОВ ===== */
@media (min-width: 1400px) {
  .table td {
      padding: var(--space-lg) var(--space-md);
  }
  
  .action-buttons {
      gap: var(--space-sm);
  }
  
  .btn-sm {
      padding: var(--space-sm) var(--space-lg);
      min-height: 36px;
  }
  
  .btn-text {
      display: inline;
  }
}

/* ===== УЛУЧШЕНИЯ ДЛЯ ACCESSIBILITY ===== */
@media (max-width: 768px) {
  /* Увеличиваем размер чекбоксов на мобильных */
  .ticket-checkbox {
      width: 20px;
      height: 20px;
      cursor: pointer;
  }
  
  /* Улучшаем читаемость текста */
  .card-ticket-id {
      font-size: var(--text-xl);
  }
  
  .info-label {
      font-size: var(--text-sm);
  }
  
  .info-value {
      font-size: var(--text-base);
  }
}

/* ===== АНИМАЦИИ ДЛЯ ПЕРЕХОДОВ ===== */
.card-container {
  animation: fadeInUp 0.3s ease-out;
}

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

/* ===== СТИЛИ ДЛЯ TOUCH УСТРОЙСТВ ===== */
@media (hover: none) and (pointer: coarse) {
  .btn {
      min-height: 44px;
      padding: var(--space-md) var(--space-lg);
  }
  
  .btn-sm {
      min-height: 40px;
      padding: var(--space-sm) var(--space-md);
  }
  
  .btn-xs {
      min-height: 36px;
      padding: var(--space-sm);
  }
  
  .ticket-checkbox {
      width: 22px;
      height: 22px;
  }
}

/* ===== PRINT СТИЛИ ===== */
@media print {
  .mobile-card {
      display: none !important;
  }
  
  .desktop-row {
      display: table-row !important;
  }
  
  .action-buttons,
  .bulk-actions-bar,
  .filters-bar {
      display: none !important;
  }
  
  .table {
      font-size: 10px !important;
  }
  
  .card {
      box-shadow: none !important;
      border: 1px solid #000 !important;
  }
}

/* ===== PROFILE СТИЛИ ===== */


.profile-card {
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 4px 32px rgba(0,0,0,0.08);
  max-width: 480px;
  margin: 2rem auto;
  padding: 2.5rem 2rem 2rem 2rem;
  position: relative;
  overflow: hidden;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.profile-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e0e7ef;
  background: #f8fafc;
  transition: box-shadow 0.2s;
}
.profile-avatar-label {
  cursor: pointer;
  display: block;
}
.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #e3def5;
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.12);
  transition: background 0.2s;
}
.profile-avatar-label:hover .profile-avatar-edit {
  background: var(--primary);
}
.profile-avatar-animate {
  animation: pop 0.8s cubic-bezier(.23,1.12,.62,1.01);
}
@keyframes pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.profile-header-info h2 {
  margin: 0 0 0.2rem 0;
  font-size: 1.5rem;
  font-weight: 700;
}
.profile-role {
  font-size: 1rem;
  color: #2563eb;
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.profile-email {
  font-size: 0.95rem;
  color: #64748b;
}
.profile-form {
  margin-top: 1rem;
}
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.form-label {
  font-weight: 500;
  color: #334155;
}
.form-input {
  padding: 0.7rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid #e0e7ef;
  font-size: 1rem;
  background: #f8fafc;
  transition: border 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border: 1.5px solid var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary22);
}
.profile-divider {
  border: none;
  border-top: 1.5px dashed #e0e7ef;
  margin: 2rem 0 1.5rem 0;
}
.profile-save-btn {
  font-size: 1.1rem;
  padding: 0.7rem 2.2rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(37,99,235,0.10);
  transition: background 0.2s, box-shadow 0.2s;
}
.profile-save-btn:hover {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  box-shadow: 0 4px 16px rgba(37,99,235,0.13);
}
@media (max-width: 600px) {
  .profile-card {
    padding: 1.2rem 0.5rem 1.5rem 0.5rem;
  }
  .profile-header {
    flex-direction: column;
    gap: 0.7rem;
    align-items: flex-start;
  }
  .profile-header-info h2 {
    font-size: 1.1rem;
  }
}
/* ===== Hotel Admin Dashboard===== */
.date-badge {
  padding: var(--space-sm) var(--space-lg);
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

/* ===== УМЕНЬШЕНИЕ АНИМАЦИИ ===== */
@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;
  }
}

/* ===== ТАБЛИЦЯ КВИТКІВ - ОПТИМІЗАЦІЯ ===== */

/* Приховування колонок на різних розмірах екрану */
@media (max-width: 1024px) {
  .hide-tablet {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Компактні стилі таблиці */
.table th,
.table td {
  padding: var(--space-sm) var(--space-xs);
  vertical-align: middle;
  white-space: nowrap;
}

.table th {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  font-size: var(--text-sm);
}

/* Стилі для інформації про клієнта */
.client-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-name {
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1.2;
}

.client-passport {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Компактні кнопки дій */
.action-buttons {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-xs {
  padding: 4px 6px;
  font-size: 14px;
  min-height: 24px;
  min-width: 24px;
  border-radius: var(--radius-sm);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Адаптація для iPhone Pro (390px x 844px) */
@media (max-width: 414px) {
  /* iPhone Pro Max розміри */
  .table th,
  .table td {
    padding: var(--space-xs) 2px;
    font-size: var(--text-xs);
  }
  
  .btn-xs {
    padding: 2px 4px;
    font-size: 12px;
    min-height: 20px;
    min-width: 20px;
  }
  
  .action-buttons {
    gap: 1px;
  }
  
  .client-name {
    font-size: var(--text-xs);
  }
  
  .client-passport {
    font-size: 10px;
  }
  
  .badge {
    padding: 2px 4px;
    font-size: 10px;
  }
  
  .price-amount {
    font-size: var(--text-xs);
    font-weight: 600;
  }
}

/* Ширина колонок для оптимізації */
.checkbox-cell {
  width: 30px;
}

.ticket-cell {
  width: 60px;
}

.client-cell {
  min-width: 120px;
  max-width: 150px;
}

.route-cell {
  width: 80px;
}

.price-cell {
  width: 60px;
  text-align: center;
}

.status-cell {
  width: 40px;
  text-align: center;
}

.pdf-cell {
  width: 40px;
  text-align: center;
}

.actions-cell {
  width: 140px;
  text-align: center;
}

@media (max-width: 414px) {
  .client-cell {
    min-width: 80px;
    max-width: 100px;
  }
  
  .route-cell {
    width: 60px;
  }
  
  .actions-cell {
    width: 100px;
  }
}

/* Мобільні карточки для iPhone Pro */
@media (max-width: 768px) {
  .card-container {
    margin: var(--space-xs) 0;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
  }
  
  .card-header-mobile {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
  }
  
  .card-ticket-id {
    font-size: var(--text-lg);
    font-weight: 700;
  }
  
  .card-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }
  
  .card-actions-mobile {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xs);
  }
  
  .btn-mobile {
    padding: var(--space-sm);
    font-size: var(--text-sm);
    min-height: 40px;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 414px) {
  .card-info-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  
  .card-actions-mobile {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  
  .btn-mobile {
    padding: var(--space-sm) var(--space-xs);
    font-size: var(--text-xs);
    min-height: 36px;
  }
}

/* Статистичні карточки для iPhone Pro */
@media (max-width: 414px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  
  .stat-card {
    padding: var(--space-md);
    text-align: center;
  }
  
  .stat-value {
    font-size: var(--text-xl);
    margin-bottom: var(--space-xs);
  }
  
  .stat-label {
    font-size: var(--text-xs);
  }
}

/* Фільтри для iPhone Pro */
@media (max-width: 414px) {
  .filters-bar {
    padding: var(--space-sm);
  }
  
  .filter-controls {
    gap: var(--space-sm);
  }
  
  .form-input,
  .form-select {
    font-size: var(--text-sm);
    padding: var(--space-sm);
  }
}

/* Bulk actions для iPhone Pro */
@media (max-width: 414px) {
  .bulk-actions-bar {
    padding: var(--space-sm);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
  }
  
  .bulk-actions-content {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .bulk-actions-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xs);
  }
  
  .bulk-actions-buttons .btn {
    font-size: var(--text-xs);
    padding: var(--space-sm);
  }
}

/* ===== CLIENT MOBILE CARDS ===== */
.card-client-id {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.card-client-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.card-tickets {
  flex-shrink: 0;
  text-align: right;
}

.tickets-count {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
}

.tickets-icon {
  font-size: var(--text-lg);
}

.tickets-number {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--success);
}

.passport-number {
  font-family: var(--font-mono);
  font-weight: 600;
  background: var(--surface-light);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  display: inline-block;
}

.contact-icon {
  font-size: var(--text-sm);
  margin-right: var(--space-xs);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--text-sm);
}

.client-avatar.large {
  width: 60px;
  height: 60px;
  font-size: var(--text-lg);
}

/* Client Detail Styles */
.client-detail-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.client-detail-info h4 {
  margin: 0 0 var(--space-sm) 0;
  font-size: var(--text-xl);
  font-weight: 600;
}

.client-detail-info p {
  color: var(--text-secondary);
  margin: 0;
}

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

.detail-item {
  background: var(--surface-light);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.detail-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.detail-value {
  font-weight: 500;
  color: var(--text-primary);
  font-size: var(--text-base);
}

.ticket-list {
  background: var(--surface-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  max-height: 200px;
  overflow-y: auto;
}

.ticket-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.ticket-item:last-child {
  border-bottom: none;
}

.ticket-route {
  font-weight: 600;
  color: var(--primary);
}

.ticket-date {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Loading States */
.loading-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-secondary);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-md) auto;
}

/* Import Modal Styles */
.import-instructions {
  background: var(--surface-light);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.import-instructions h4 {
  margin-bottom: var(--space-md);
  color: var(--primary);
}

.import-instructions ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.import-instructions li {
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.csv-example {
  background: var(--bg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.csv-example pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  margin: var(--space-sm) 0 0 0;
  color: var(--text-primary);
  overflow-x: auto;
}

.import-options {
  margin: var(--space-lg) 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.checkbox-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .client-detail-header {
    flex-direction: column;
    text-align: center;
  }
  
  .tickets-count {
    justify-content: center;
  }


}