/* ===== PREMIUM ERP DESIGN FOR RADIS ===== */
/* Performance Optimized: Reduced will-change usage to prevent GPU memory issues */

/* CSS Variables for Ultra-Modern Theme */
:root {
  /* Primary Brand Colors - Radis Purple */
  --radis-primary: #6366F1;
  --radis-primary-light: #8B5CF6;
  --radis-primary-dark: #4338CA;
  --radis-accent: #F59E0B;
  --radis-success: #10B981;
  --radis-error: #EF4444;
  --radis-warning: #F59E0B;
  --radis-info: #3B82F6;
  
  /* Sophisticated Color Palette */
  --primary-50: #F8FAFC;
  --primary-100: #F1F5F9;
  --primary-200: #E2E8F0;
  --primary-300: #CBD5E1;
  --primary-400: #94A3B8;
  --primary-500: #64748B;
  --primary-600: #475569;
  --primary-700: #334155;
  --primary-800: #1E293B;
  --primary-900: #0F172A;
  
  /* Brand Gradients */
  --gradient-radis: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  --gradient-radis-soft: linear-gradient(135deg, #EEF2FF 0%, #FBBF24 100%);
  --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --gradient-warning: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  --gradient-error: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  
  /* Glass Morphism */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  --backdrop-blur: blur(8px);
  
  /* Neumorphism */
  --neu-light: #ffffff;
  --neu-dark: #e6e6e6;
  --neu-shadow-light: 20px 20px 60px #d1d1d1;
  --neu-shadow-dark: -20px -20px 60px #ffffff;
  
  /* Secondary Colors */
  --secondary-500: #8B5CF6;
  --secondary-600: #7C3AED;
  
  /* Status Colors */
  --success-500: #10B981;
  --success-100: #D1FAE5;
  --warning-500: #F59E0B;
  --warning-100: #FEF3C7;
  --error-500: #EF4444;
  --error-100: #FEE2E2;
  --info-500: #3B82F6;
  --info-100: #DBEAFE;
  
  /* Neutral Colors */
  --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;
  
  /* Layout */
  --sidebar-width: 280px;
  --header-height: 80px;
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;
  
  /* Shadows */
  --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);
  
  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.25s ease-out;
  --transition-slow: 0.35s ease-out;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}

/* ===== PERFORMANCE OPTIMIZED BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  color: var(--gray-800);
  background-color: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Force GPU acceleration for entire page */
  transform: translateZ(0);
  /* Optimize repaints */
  backface-visibility: hidden;
  /* Improve text rendering */
  text-rendering: optimizeLegibility;
}

/* ===== APP LAYOUT ===== */
.app-container {
  display: flex;
  min-height: 100vh;
  background-color: var(--gray-50);
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1F2937 0%, #111827 100%);
  border-right: 1px solid var(--gray-200);
  position: fixed !important;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100vh !important;
  height: 100dvh !important; /* Dynamic viewport height for mobile */
  min-height: 100vh !important; /* Fallback for older browsers */
  max-height: 100vh !important;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  box-shadow: var(--shadow-xl);
  display: flex !important;
  flex-direction: column !important;
}

.sidebar-header {
  padding: 32px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-text {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: white;
  letter-spacing: -0.02em;
}

.sidebar-menu {
  padding: 24px 16px;
  flex: 1 !important;
  overflow-y: auto;
  min-height: 0; /* Важно для flex элементов с overflow */
}

.menu-section {
  margin-bottom: 32px;
}

.menu-title {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding: 0 8px;
}

.menu-list {
  list-style: none;
}

.menu-item {
  margin-bottom: 4px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.menu-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.menu-link:hover::before,
.menu-item.active .menu-link::before {
  opacity: 1;
}

.menu-link:hover,
.menu-item.active .menu-link {
  color: white;
  transform: translateX(4px);
}

.menu-link i {
  width: 20px;
  height: 20px;
}

.coming-soon {
  background: var(--warning-500);
  color: white;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-left {
  flex: 1;
}

.page-title {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--gray-600);
  font-size: 14px;
}

.header-right {
  display: flex;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.notification-bell {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-fast);
}

.notification-bell:hover {
  background-color: var(--gray-100);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--error-500);
  color: white;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-fast);
  position: relative;
}

.user-profile:hover {
  background-color: var(--gray-100);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gray-200);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  text-align: left;
}

.user-name {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--gray-900);
  line-height: 1.2;
}

.user-role {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.2;
}

.dropdown-icon {
  color: var(--gray-400);
  transition: transform var(--transition-fast);
}

.user-profile:hover .dropdown-icon {
  transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease-out;
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 1px solid var(--gray-100);
}

.dropdown-item:hover {
  background-color: var(--gray-50);
  color: var(--primary-500);
}

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

.dropdown-item i {
  width: 16px;
  height: 16px;
}

.dropdown-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 8px 0;
}

.logout-item {
  color: var(--error-500);
}

.logout-item:hover {
  background-color: var(--error-100);
  color: var(--error-600);
}

.logout-item i {
  color: var(--error-500);
}

.logout-item:hover i {
  color: var(--error-600);
}

/* ===== DASHBOARD CONTENT ===== */
.dashboard {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Welcome Banner */
.welcome-banner {
  background: var(--primary-gradient);
  border-radius: var(--border-radius-xl);
  padding: 40px;
  margin-bottom: 32px;
  color: white;
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="rgba(255,255,255,0.05)"><circle cx="20" cy="20" r="2"/></g></svg>');
  pointer-events: none;
}

.banner-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.banner-title {
  font-size: 36px;
  font-weight: var(--font-weight-bold);
  margin-bottom: 16px;
  line-height: 1.2;
}

.banner-description {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 500px;
}

.banner-actions {
  display: flex;
  gap: 16px;
}

.stats-cards-mini {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mini-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 20px;
  text-align: center;
  min-width: 120px;
  transition: transform var(--transition-normal);
}

.mini-card:hover {
  transform: translateY(-2px);
}

.mini-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.mini-card-icon.purple { background: rgba(139, 92, 246, 0.3); }
.mini-card-icon.blue { background: rgba(59, 130, 246, 0.3); }
.mini-card-icon.green { background: rgba(16, 185, 129, 0.3); }

.mini-card-value {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  margin-bottom: 4px;
}

.mini-card-label {
  font-size: 12px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Stats Section */
.stats-section {
  margin-bottom: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 32px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  opacity: 0;
  transform: translateY(20px);
}

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

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.stat-icon.purple { background: var(--primary-gradient); }
.stat-icon.blue { background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%); }
.stat-icon.green { background: linear-gradient(135deg, #10B981 0%, #059669 100%); }
.stat-icon.orange { background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); }

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  padding: 4px 8px;
  border-radius: 20px;
}

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

.stat-trend i {
  width: 14px;
  height: 14px;
}

.stat-value {
  font-size: 36px;
  font-weight: var(--font-weight-bold);
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1;
}

.stat-label {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--gray-700);
  margin-bottom: 4px;
}

.stat-sublabel {
  font-size: 14px;
  color: var(--gray-500);
}

/* Quick Actions */
.quick-actions {
  margin-bottom: 32px;
}

.section-title {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--gray-900);
  margin-bottom: 24px;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.action-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: translateY(20px);
}

.action-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-500);
}

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

.action-content {
  flex: 1;
}

.action-content h4 {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--gray-900);
  margin-bottom: 4px;
}

.action-content p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.4;
}

.action-arrow {
  color: var(--gray-400);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.action-card:hover .action-arrow {
  color: var(--primary-500);
  transform: translateX(4px);
}

/* Recent Activity */
.recent-activity {
  background: white;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-200);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-fast);
}

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

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon.success {
  background: var(--success-100);
  color: var(--success-500);
}

.activity-icon.info {
  background: var(--info-100);
  color: var(--info-500);
}

.activity-icon.warning {
  background: var(--warning-100);
  color: var(--warning-500);
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--gray-900);
  margin-bottom: 4px;
}

.activity-meta {
  font-size: 12px;
  color: var(--gray-500);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

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

.btn-primary:hover {
  background: var(--primary-gradient-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-outline:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  background: var(--gray-50);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

/* ===== REPORTS PAGE SPECIFIC ===== */
.reports-content {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ===== PREMIUM SPACE SELECTION ===== */
.space-selection {
  background: white;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 32px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  box-shadow: 
    0 8px 32px rgba(99, 102, 241, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.space-selection::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-radis);
}

/* ===== PREMIUM MONTH SELECTION ===== */
.month-selection {
  background: white;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 32px;
  border: 1px solid rgba(16, 185, 129, 0.15);
  box-shadow: 
    0 8px 32px rgba(16, 185, 129, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.month-selection::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.month-selection:hover {
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 
    0 12px 40px rgba(16, 185, 129, 0.12),
    0 6px 20px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Month Selection Icon Styling */
.month-selection .form-label i[data-feather="calendar"] {
  color: var(--radis-success);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.form-label i {
  color: var(--radis-primary);
  width: 24px;
  height: 24px;
}

.form-select {
  padding: 18px 24px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  max-width: 500px;
  cursor: pointer;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.form-select:hover {
  border-color: var(--radis-primary);
  transform: translateY(-1px);
  box-shadow: 
    0 4px 16px rgba(99, 102, 241, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-select:focus {
  outline: none;
  border-color: var(--radis-primary);
  box-shadow: 
    0 0 0 4px rgba(99, 102, 241, 0.1),
    0 6px 20px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

/* Premium Select Arrow */
.form-select {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%236366F1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px 20px;
  appearance: none;
  padding-right: 50px;
}

/* Loading, Error, Success States */
.loading-container,
.error-container,
.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  text-align: center;
  background: white;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-left-color: var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

.loading-text {
  font-size: 18px;
  color: var(--gray-600);
}

.error-icon,
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.error-icon {
  background: var(--error-100);
  color: var(--error-500);
}

.success-icon {
  background: var(--success-100);
  color: var(--success-500);
}

.error-content h3,
.success-content h3 {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  margin-bottom: 16px;
}

.error-content p,
.success-content p {
  font-size: 16px;
  color: var(--gray-600);
  margin-bottom: 32px;
  max-width: 400px;
}

/* Clients Selection */
.clients-selection {
  background: white;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--gray-200);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--gray-900);
}

.section-actions {
  display: flex;
  gap: 12px;
}

/* ===== PREMIUM CLIENT GROUPS DESIGN ===== */
.clients-groups {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Ultra-Modern Card Design */
.client-group {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 
    0 4px 20px rgba(99, 102, 241, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.1);
  position: relative;
  backdrop-filter: saturate(180%) blur(20px);
  /* will-change removed to save GPU memory */
}

.client-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-radis);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.client-group:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 
    0 20px 40px rgba(99, 102, 241, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(99, 102, 241, 0.3);
}

.client-group:hover::before {
  opacity: 1;
}

/* Premium Header Design */
.group-header {
  background: linear-gradient(
    135deg, 
    #1e293b 0%, 
    #334155 50%, 
    #475569 100%
  );
  padding: 28px 32px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

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

.group-header:hover::before {
  left: 100%;
}

.group-header:hover {
  background: linear-gradient(
    135deg, 
    #334155 0%, 
    #475569 50%, 
    #64748b 100%
  );
}

.group-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.group-title::before {
  content: '📁';
  font-size: 18px;
  opacity: 0.8;
}

.group-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
}

.group-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.group-toggle {
  color: #fbbf24;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.group-toggle.expanded {
  transform: rotate(90deg);
  color: #10b981;
}

/* Premium Client List with Scrolling */
.clients-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: linear-gradient(
    180deg, 
    #ffffff 0%, 
    #f8fafc 100%
  );
}

.clients-list.expanded {
  max-height: 400px; /* Фиксированная высота для прокрутки */
  overflow-y: auto; /* Включаем вертикальный скроллинг */
  overflow-x: hidden;
  
  /* Красивый скроллбар */
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

/* Webkit скроллбар для Chromium браузеров */
.clients-list.expanded::-webkit-scrollbar {
  width: 8px;
}

.clients-list.expanded::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.5);
  border-radius: 10px;
  margin: 4px 0;
}

.clients-list.expanded::-webkit-scrollbar-thumb {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.4) 0%,
    rgba(139, 92, 246, 0.4) 100%
  );
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: all 0.3s ease;
}

.clients-list.expanded::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.6) 0%,
    rgba(139, 92, 246, 0.6) 100%
  );
  background-clip: content-box;
}

/* Плавные переходы при скроллинге */
.clients-list.expanded {
  scroll-behavior: smooth;
}

/* Добавим небольшую тень сверху и снизу для индикации скролла */
.clients-list.expanded::before {
  content: '';
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

.clients-list.expanded::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.9) 0%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Индикатор прокрутки */
.scroll-indicator {
  position: sticky;
  bottom: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(99, 102, 241, 0.05) 20%,
    rgba(99, 102, 241, 0.1) 100%
  );
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  color: var(--radis-primary);
  font-size: 14px;
  font-weight: 500;
  animation: gentle-bounce 2s ease-in-out infinite;
}

.scroll-hint i {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

@keyframes gentle-bounce {
  0%, 100% { 
    transform: translateY(0); 
  }
  50% { 
    transform: translateY(-2px); 
  }
}

/* ===== PREMIUM CLIENT SEARCH ===== */
.client-search-container {
  padding: 24px 32px;
  margin-bottom: 8px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(248, 250, 252, 0.8) 100%
  );
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  backdrop-filter: blur(10px);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  border: 2px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 
    0 4px 12px rgba(99, 102, 241, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.search-input-wrapper:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 
    0 6px 20px rgba(99, 102, 241, 0.12),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.search-input-wrapper:focus-within {
  border-color: var(--radis-primary);
  box-shadow: 
    0 0 0 4px rgba(99, 102, 241, 0.1),
    0 8px 24px rgba(99, 102, 241, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.search-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--gray-400);
  transition: color 0.3s ease;
  z-index: 1;
}

.search-input-wrapper:focus-within .search-icon {
  color: var(--radis-primary);
}

.client-search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  font-size: 16px;
  font-weight: 500;
  color: #000000 !important; /* Черный цвет для видимости */
  background: white !important; /* Белый фон */
  border: none;
  outline: none;
  border-radius: 12px;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.client-search-input:focus {
  color: #000000 !important;
  background: white !important;
}

.client-search-input::placeholder {
  color: #6b7280 !important; /* Серый цвет для placeholder */
  font-weight: 400;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  padding: 8px;
  background: rgba(107, 114, 128, 0.1);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.search-clear-btn i {
  width: 16px;
  height: 16px;
  color: var(--gray-500);
  transition: color 0.2s ease;
}

.search-clear-btn:hover i {
  color: var(--red-500);
}

/* Search Results Info */
.search-results-info {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.search-results-info span {
  font-size: 14px;
  color: var(--gray-700);
  font-weight: 500;
}

.btn-link {
  background: none;
  border: none;
  color: var(--radis-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-link:hover {
  background: rgba(99, 102, 241, 0.1);
  text-decoration: none;
}

/* Search Highlighting */
.client-item.search-match {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.08) 0%,
    rgba(139, 92, 246, 0.06) 100%
  ) !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
  animation: search-highlight 0.3s ease-out;
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.client-item.search-match .client-name {
  color: #000000 !important; /* Чисто черный цвет */
  font-weight: 700;
  text-shadow: none !important;
  background-color: rgba(255, 255, 255, 0.9) !important; /* Белый фон для контраста */
  padding: 2px 8px !important;
  border-radius: 6px !important;
}

.client-item.search-match .client-id {
  color: #333333 !important; /* Темно-серый цвет для ID */
  background: rgba(255, 255, 255, 0.8) !important; /* Светлый фон */
  border: 1px solid #ddd !important;
}

.search-highlight {
  background: #ffeb3b !important; /* Яркий желтый фон */
  color: #000000 !important; /* Чисто черный цвет для подсветки */
  padding: 3px 8px !important;
  border-radius: 6px !important;
  font-weight: 900 !important;
  border: 2px solid #ffc107 !important;
  text-shadow: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Дополнительные стили для видимости найденных элементов */
.client-item[style*="display: none"] {
  display: none !important;
}

.client-item.search-match[style*="display: flex"] {
  display: flex !important;
}

/* Общие стили для всех видимых клиентов */
.client-item:not([style*="display: none"]) .client-name,
.client-item.search-match .client-name {
  color: #1e293b !important;
  opacity: 1 !important;
}

.client-item:not([style*="display: none"]) .client-id,
.client-item.search-match .client-id {
  color: #64748b !important;
  opacity: 1 !important;
}

@keyframes search-highlight {
  from {
    transform: scale(0.98);
    opacity: 0.7;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Счетчик клиентов в группе */
.clients-counter {
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.95);
  padding: 8px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 12px;
  color: var(--gray-600);
  text-align: center;
  font-weight: 500;
  z-index: 3;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.clients-counter.scrolled {
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Ultra-Modern Client Items */
.client-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 32px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  background: transparent;
  /* will-change removed to save GPU memory */
}

.client-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-radis);
  transform: scaleY(0);
  transition: transform 0.3s ease;
  border-radius: 0 4px 4px 0;
}

.client-item:hover {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.05) 0%,
    rgba(139, 92, 246, 0.03) 50%,
    rgba(236, 72, 153, 0.05) 100%
  );
  transform: translateX(4px);
  border-color: rgba(99, 102, 241, 0.2);
}

.client-item:hover::before {
  transform: scaleY(1);
}

.client-item:last-child {
  border-bottom: none;
  border-radius: 0 0 20px 20px;
}

/* Premium Checkbox Design */
.client-checkbox {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: white;
  flex-shrink: 0;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.05),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  /* will-change removed to save GPU memory */
}

.client-checkbox:hover {
  border-color: var(--radis-primary);
  box-shadow: 
    0 0 0 4px rgba(99, 102, 241, 0.1),
    0 4px 8px rgba(99, 102, 241, 0.15);
  transform: scale(1.05);
}

.client-checkbox:checked {
  background: var(--gradient-radis);
  border-color: var(--radis-primary);
  box-shadow: 
    0 0 0 4px rgba(99, 102, 241, 0.2),
    0 6px 12px rgba(99, 102, 241, 0.3);
}

.client-checkbox:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 16px;
  font-weight: 900;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation: checkBounce 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes checkBounce {
  0% { transform: translate(-50%, -50%) scale(0); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Premium Client Name Display */
.client-name {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  min-height: 24px;
  display: flex;
  align-items: center;
  letter-spacing: -0.025em;
  position: relative;
  z-index: 1;
  transition: color 0.2s ease;
}

.client-item:hover .client-name {
  color: var(--radis-primary);
  transform: translateX(2px);
}

/* Premium Client ID Badge */
.client-id {
  font-size: 12px;
  color: #64748b;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.client-item:hover .client-id {
  background: var(--gradient-radis-soft);
  color: var(--radis-primary);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
  transform: scale(1.05);
}

/* Client Avatar Placeholder */
.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gradient-radis);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
  margin-right: 4px;
  transition: all 0.3s ease;
  /* Optimized for performance */
}

.client-item:hover .client-avatar {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(99, 102, 241, 0.25);
}

/* Status Indicators */
.client-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--radis-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
  margin-left: auto;
}

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

/* Client Avatar - Optimized for Performance */
.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gradient-radis);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
  margin-right: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* will-change removed to save GPU memory */
}

.client-item:hover .client-avatar {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(99, 102, 241, 0.25);
}

/* Status Indicators */
.client-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--radis-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
  margin-left: auto;
}

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

/* ===== OPTIMIZED SELECTED SUMMARY ===== */
.selected-summary {
  background: linear-gradient(
    135deg, 
    rgba(99, 102, 241, 0.08) 0%, 
    rgba(139, 92, 246, 0.04) 50%,
    rgba(236, 72, 153, 0.08) 100%
  );
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  padding: 32px;
  box-shadow: 0 -4px 16px rgba(99, 102, 241, 0.08);
  /* Removed backdrop-filter to prevent quality issues */
  position: relative;
  overflow: hidden;
}

.selected-summary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-radis);
  animation: shimmer 2s infinite;
}

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

.summary-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.summary-info {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  position: relative;
}

.summary-info i {
  color: var(--radis-success);
  width: 28px;
  height: 28px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
  60% { transform: translateY(-2px); }
}

#selected-count {
  color: var(--radis-primary);
  font-weight: 900;
  font-size: 24px;
  text-shadow: 0 1px 2px rgba(99, 102, 241, 0.1);
  position: relative;
}

#selected-count::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-radis);
  border-radius: 2px;
}

/* Create Report Button - Performance Optimized */
#create-report-btn {
  background: var(--gradient-radis);
  border: none;
  color: white;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 32px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 
    0 6px 20px rgba(99, 102, 241, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  min-width: 200px;
  /* will-change removed to save GPU memory */
}

#create-report-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.4s ease;
  /* will-change removed to save GPU memory */
}

#create-report-btn:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 8px 24px rgba(99, 102, 241, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.12);
}

#create-report-btn:hover::before {
  left: 100%;
}

#create-report-btn:active {
  transform: translateY(0);
}

.btn-loader {
  animation: spin 1s linear infinite;
}

/* Floating Action Effects */
.summary-info,
#create-report-btn {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Empty State Styling */
.empty-state {
  text-align: center;
  padding: 60px 32px;
  color: var(--gray-600);
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.empty-icon i {
  width: 32px;
  height: 32px;
  color: var(--gray-400);
}

.empty-state h3 {
  font-size: 20px;
  font-weight: var(--font-weight-semibold);
  color: var(--gray-800);
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 16px;
  color: var(--gray-600);
  max-width: 400px;
  margin: 0 auto;
}

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== PREMIUM RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .clients-groups {
    padding: 24px;
  }
  
  .client-item {
    padding: 16px 24px;
    gap: 16px;
  }
  
  .client-name {
    font-size: 16px;
  }
  
  .client-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 260px;
  }
  
  .dashboard,
  .reports-content {
    padding: 24px;
  }
  
  .banner-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .space-selection {
    padding: 32px;
  }
  
  .month-selection {
    padding: 32px;
  }
  
  .form-select {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    z-index: 9999;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .header {
    padding: 0 16px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .dashboard,
  .reports-content {
    padding: 16px;
  }
  
  /* Мобильная версия скролла - меньше высота */
  .clients-list.expanded {
    max-height: 300px !important;
  }
  
  /* Мобильная версия поиска */
  .client-search-container {
    padding: 16px 20px;
    margin-bottom: 16px;
  }
  
  .client-search-input {
    font-size: 16px; /* Предотвращает zoom на iOS */
    padding: 14px 18px 14px 48px;
    color: #000000 !important;
    background: white !important;
  }
  
  .search-icon {
    left: 14px;
    width: 18px;
    height: 18px;
  }
  
  .banner-title {
    font-size: 28px;
  }
  
  .banner-description {
    font-size: 16px;
  }
  
  .banner-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .actions-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .summary-content {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 20px;
  }
  
  .space-selection {
    padding: 24px;
    margin: 0 0 24px;
    border-radius: 16px;
  }
  
  .month-selection {
    padding: 24px;
    margin: 0 0 24px;
    border-radius: 16px;
  }
  
  .clients-groups {
    padding: 16px;
    gap: 20px;
  }
  
  .client-group {
    border-radius: 16px;
  }
  
  .group-header {
    padding: 20px 24px;
  }
  
  .group-title {
    font-size: 18px;
  }
  
  .client-item {
    padding: 16px 20px;
    gap: 12px;
  }
  
  .client-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .client-name {
    font-size: 15px;
  }
  
  .client-id {
    font-size: 11px;
    padding: 6px 10px;
  }
  
  .selected-summary {
    padding: 24px;
  }
  
  .summary-info {
    font-size: 18px;
  }
  
  #selected-count {
    font-size: 20px;
  }
  
  #create-report-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .welcome-banner {
    padding: 20px;
  }
  
  .stat-card,
  .action-card {
    padding: 20px;
  }
  
  .space-selection {
    padding: 20px;
    margin: 0 0 20px;
    border-radius: 12px;
  }
  
  .month-selection {
    padding: 20px;
    margin: 0 0 20px;
    border-radius: 12px;
  }
  
  .form-label {
    font-size: 16px;
  }
  
  /* Мобильная версия скролла - еще меньше на очень маленьких экранах */
  .clients-list.expanded {
    max-height: 250px !important;
  }
  
  .clients-list.expanded::-webkit-scrollbar {
    width: 6px; /* Тоньше скроллбар на мобильных */
  }
  
  /* Очень маленькие экраны - компактный поиск */
  .client-search-container {
    padding: 12px 16px;
  }
  
  .client-search-input {
    padding: 12px 16px 12px 44px;
    font-size: 16px;
    color: #000000 !important;
    background: white !important;
  }
  
  .search-results-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .btn-link {
    font-size: 13px;
    padding: 6px 12px;
  }
  
  .form-select {
    padding: 14px 16px;
    padding-right: 40px;
    border-radius: 12px;
  }
  
  .clients-groups {
    padding: 12px;
    gap: 16px;
  }
  
  .client-group {
    border-radius: 12px;
  }
  
  .group-header {
    padding: 16px 20px;
  }
  
  .group-title {
    font-size: 16px;
  }
  
  .group-title::before {
    display: none;
  }
  
  .client-item {
    padding: 12px 16px;
    gap: 10px;
  }
  
  .client-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
    border-radius: 8px;
  }
  
  .client-checkbox {
    width: 20px;
    height: 20px;
  }
  
  .client-name {
    font-size: 14px;
  }
  
  .client-id {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 8px;
  }
  
  .selected-summary {
    padding: 20px;
  }
  
  .summary-info {
    font-size: 16px;
    gap: 12px;
  }
  
  .summary-info i {
    width: 20px;
    height: 20px;
  }
  
  #selected-count {
    font-size: 18px;
  }
  
  #create-report-btn {
    padding: 14px 24px;
    font-size: 14px;
    border-radius: 12px;
  }
}

/* Mobile Menu Toggle */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
    background: var(--gradient-radis);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  
  .mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-select:focus,
.client-checkbox:focus,
.menu-link:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --gray-100: #e0e0e0;
    --gray-200: #c0c0c0;
    --border-radius: 4px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #1a1a1a;
    --gray-100: #2a2a2a;
    --gray-200: #3a3a3a;
    --gray-700: #d0d0d0;
    --gray-800: #e0e0e0;
    --gray-900: #ffffff;
  }
  
  body {
    background-color: var(--gray-50);
    color: var(--gray-800);
  }
}

/* Print styles */
@media print {
  .sidebar,
  .header,
  .btn,
  .notification-bell {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .welcome-banner {
    background: transparent !important;
    color: black !important;
    border: 1px solid #000;
  }
}
