/*
 * StudyHub.AZ Mobile Styles
 * Filename: mobile.css
 * Author: Ostwind by Dr.FC
 * Медиа-стили для устройств до 767px
 */

/*
╔═══════════════════════════════════════════════════════════════════════════════╗
║                    🏗️ STUDYHUB.AZ CSS АРХИТЕКТУРА                            ║
║                        📂 ФАЙЛ: mobile.css                                  ║
╚═══════════════════════════════════════════════════════════════════════════════╝

🎯 НАЗНАЧЕНИЕ ФАЙЛА:
├─ Адаптивные стили для мобильных устройств ≤ 767px
├─ Touch-friendly интерфейсы
├─ Оптимизация для всех 5 целевых аудиторий
└─ Mobile-first подход

📱 БРЕЙКПОИНТЫ:
├─ ≤ 480px - Маленькие мобильные устройства
├─ 481px - 767px - Стандартные мобильные устройства
└─ Все стили наследуют переменные из vars.css

👥 ПОДДЕРЖКА АУДИТОРИЙ:
🧑‍💻 Программисты: touch-friendly tech элементы
👔 Директора: luxury мобильные компоненты
👩‍🏫 Учителя: accessible мобильные интерфейсы
👨‍👩‍👧‍👦 Родители: надежные мобильные панели
🎓 Ученики: trendy мобильные эффекты

💎 РЕЗУЛЬТАТ: Стили готовы к использованию и полностью соответствуют 
архитектуре StudyHub.AZ с 15+ летним опытом в IT!

📐 АРХИТЕКТУРНЫЕ ПРАВИЛА:
✅ Только медиа-запросы и адаптивные стили
✅ Touch-friendly минимальные размеры (44px)
✅ Использование переменных из vars.css
✅ Интеграция с тематическими файлами
❌ Запрещены: новые переменные, анимации, основные стили

🔗 СВЯЗИ:
├─ vars.css предоставляет все переменные
├─ themes-*.css предоставляют специализированные стили
└─ Активные медиа-запросы для мобильных устройств
*/

/* === 📱 УЛУЧШЕННЫЕ МОБИЛЬНЫЕ БРЕЙКПОИНТЫ === */

/* === 🎴 АДАПТИВНЫЕ СТИЛИ ДЛЯ КАРТОЧЕК ТАРИФОВ === */
@media (max-width: 767px) {
  .tariffs-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0;
  }

  .tariff-card-modern {
    border-radius: 12px;
  }

  .tariff-card-header {
    padding: 16px;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .tariff-card-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
    align-self: flex-end;
    margin-top: -48px;
  }

  .tariff-card-body {
    padding: 16px;
    gap: 16px;
  }

  .tariff-card-title {
    font-size: 1.3rem;
  }

  .tariff-card-description {
    font-size: 0.9rem;
  }

  .tariff-pricing-section {
    padding: 12px;
  }

  .price-value {
    font-size: 1.5rem;
  }

  .price-currency {
    font-size: 1rem;
  }

  .tariff-limits-section {
    padding: 12px;
  }

  .tariff-features-section {
    padding: 12px;
  }

  .tariff-card-footer {
    padding: 16px;
  }

  .tariff-actions {
    flex-direction: column;
  }

  .tariff-actions .btn-action {
    width: 100%;
    min-width: auto;
  }

  .tariff-actions .btn-action span {
    display: inline;
  }
}

@media (max-width: 480px) {
  .tariff-card-header {
    padding: 12px;
  }

  .tariff-card-body {
    padding: 12px;
    gap: 12px;
  }

  .tariff-card-title {
    font-size: 1.2rem;
  }

  .price-value {
    font-size: 1.3rem;
  }

  .tariff-card-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin-top: -40px;
  }
}

/* === МОБИЛЬНЫЕ УСТРОЙСТВА - ПРИНУДИТЕЛЬНЫЙ ПЕРЕНОС FEATURES === */
@media (max-width: 767px) {
  .section-features.container {
    /* ВСЕГДА переносим на новую строку на мобильных */
    clear: both !important;
    margin-top: 2rem !important;
    width: 100% !important;
    display: block !important;
    float: none !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
  }
  
  .features-wrapper {
    /* Одна колонка для мобильных */
    grid-template-columns: 1fr !important;
    min-width: 280px !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Дополнительная принудительная логика */
  .main-welcome .section-features.container {
    clear: both !important;
    margin-top: 2rem !important;
    width: 100% !important;
    display: block !important;
    float: none !important;
  }
  
  /* Принудительно делаем main-welcome блочным на мобильных */
  .main-welcome {
    display: block !important;
    flex-direction: column !important;
  }
  
  .main-welcome .section-top.container {
    width: 100% !important;
    margin-bottom: 2rem !important;
  }
}

/* === 👔 EXECUTIVE DASHBOARD MOBILE === */
@media (max-width: 767px) {
  .executive-dashboard-luxury {
    padding: 20px;
    border-radius: 16px;
    margin: 10px;
  }
  
  .executive-header-premium {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
    gap: 16px;
  }
  
  .executive-logo-crown {
    width: 60px;
    height: 60px;
  }
  
  .executive-logo-crown::before {
    font-size: 30px;
  }
  
  .executive-main-title {
    font-size: 2.5rem;
    text-align: center;
  }
  
  .executive-subtitle {
    font-size: 1rem;
    text-align: center;
  }
  
  .luxury-stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }
  
  .luxury-stats-grid .luxury-stat-card,
  .luxury-stats-grid .executive-card-luxury {
    padding: 24px 16px;
    border-radius: 16px;
    max-width: 100%;
    width: 100%;
  }
  
  .luxury-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
  }
  
  .luxury-icon-medium {
    font-size: 24px !important;
  }
  
  .luxury-icon-large {
    font-size: 32px !important;
  }
  
  .luxury-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }
  
  .luxury-value {
    font-size: 2.5rem;
    margin-bottom: 12px;
  }
  
  .luxury-description {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }
  
  .trust-guarantee {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  
  .enterprise-grid-premium {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
  }
  
  .button-grid-modern {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .button-grid-modern .btn {
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 44px;
  }
  
  .btn-executive-primary {
    padding: 14px 24px;
    font-size: 1rem;
  }
  
  .btn-executive-secondary {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
  
  .marble-panel {
    padding: 20px 16px;
    border-radius: 16px;
  }
  
  .royal-card {
    padding: 24px 16px;
    border-radius: 20px;
  }
}

/* === SMALL MOBILE DEVICES (up to 480px) === */
@media (max-width: 480px) {
  .container {
    padding: 15px 10px;
  }
  
  /* 📊 Monthly Profit Report Mobile */
  .section-top.container {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }
  
  .period-export-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .period-form-container {
    min-width: unset;
    max-width: unset;
  }
  
  .financial-summary-container {
    margin-top: 20px;
  }
  
  .income-amount,
  .expenses-amount,
  .profit-amount-positive,
  .profit-amount-negative {
    font-size: 2rem;
  }
  
  .margin-value {
    font-size: 1.5rem;
  }
  
  .form-block.u-glass {
    min-height: 350px;
  }

  /* === MAINTENANCE AUTO-CHECK INDICATOR === */
  .auto-check-indicator {
    bottom: var(--space-sm);
    min-width: 250px;
    padding: var(--space-xs) var(--space-sm);
  }
  
  .check-status {
    font-size: 0.85rem;
  }
  
  .check-timer {
    font-size: 0.7rem;
  }

  /* === MAINTENANCE PAGE MOBILE STYLES === */
  .maintenance-container {
    padding: var(--space-md);
    margin: var(--space-sm);
  }
  
  .maintenance-title {
    font-size: 1.5rem;
  }
  
  .logo-text {
    font-size: 1.8rem;
  }
  
  .floating-icon {
    font-size: 1.5rem;
  }
  
  .language-switcher {
    top: var(--space-sm);
    right: var(--space-sm);
  }
  
  .language-toggle {
    padding: var(--space-xs);
    min-width: 45px;
  }
  
  .language-menu {
    min-width: 100px;
  }
  
  .current-lang {
    font-size: 0.75rem;
  }

  /* === MAINTENANCE HEALTH STATUS MOBILE === */
  .site-health-status {
    padding: var(--space-sm);
  }
  
  .health-title {
    font-size: 1rem;
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
  
  .health-score {
    font-size: 0.9rem;
    padding: var(--space-xs);
  }
  
  .issues-list {
    font-size: 0.8rem;
  }
  
  .issue-item {
    padding: var(--space-xs);
    margin-bottom: var(--space-xs);
  }

  /* === 🧑‍💻 ПРОГРАММИСТЫ - МОБИЛЬНАЯ АДАПТАЦИЯ === */
  .tech-dashboard-wow {
    padding: 16px;
    border-radius: 12px;
  }
  
  .tech-stat-card {
    padding: 16px;
  }
  
  .tech-stat-value {
    font-size: 2rem;
  }
  
  .neural-network {
    height: 120px;
  }
  
  .tech-terminal {
    padding: 12px;
    min-height: 120px;
    font-size: 0.8rem;
  }
  
  .btn-tech-primary,
  .btn-tech-secondary {
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 44px;
  }
  
  /* === 👔 ДИРЕКТОРА - МОБИЛЬНАЯ АДАПТАЦИЯ (МИНИМАЛЬНЫЕ ОТСТУПЫ) === */
  .executive-dashboard-luxury {
    /* Минимальные отступы: 2.5% от ширины экрана, минимум 6px, максимум 12px */
    /* Отступы слева/справа: 1px для всех внутренних блоков */
    padding: clamp(6px, 2.5vw, 12px) 1px;
    margin-left: 0;
    margin-right: 0;
    border-radius: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .luxury-stats-grid {
    grid-template-columns: var(--grid-columns-mobile);
    gap: var(--grid-gap-mobile);
    /* Минимальные отступы сверху/снизу: 2% от высоты экрана, минимум 8px */
    margin: clamp(8px, 2vh, 12px) 0;
    /* Отступы слева/справа: 1px для всех внутренних блоков */
    padding-left: 1px;
    padding-right: 1px;
  }
  
  .luxury-stats-grid .executive-card-luxury {
    min-height: var(--card-min-height-mobile);
    padding: var(--card-padding-mobile);
  }
  
  /* Контейнер для иконки, названия и значения в одной строке (мобильные) */
  .luxury-header-row {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    margin-bottom: clamp(12px, 2.5vh, 16px);
    justify-content: space-between;
  }
  
  .luxury-stats-grid .luxury-icon {
    width: var(--icon-size-mobile);
    height: var(--icon-size-mobile);
    margin-bottom: 0;
    flex-shrink: 0;
  }
  
  .luxury-stats-grid .luxury-icon i {
    font-size: 18px;
  }
  
  .luxury-stats-grid .luxury-title {
    font-size: var(--title-font-size-mobile);
    min-height: auto;
    margin: 0;
    flex: 1;
  }
  
  /* Значение внутри header-row для мобильных */
  .luxury-header-row .luxury-value {
    margin: 0;
    margin-left: auto;
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    flex-shrink: 0;
  }
  
  /* Значение вне header-row (скрыто на мобильных, если есть в header-row) */
  .luxury-stat-card > .luxury-value {
    display: none;
  }
  
  .luxury-stats-grid .trust-guarantee {
    font-size: var(--description-font-size-mobile);
    min-height: 25px;
  }
  
  /* === EXECUTIVE QUICK ACTIONS - МИНИМАЛЬНЫЕ ОТСТУПЫ === */
  .executive-quick-actions {
    /* Отступы слева/справа: 1px для всех внутренних блоков */
    padding-left: 1px;
    padding-right: 1px;
    /* Минимальные отступы между элементами: 1.5% от ширины экрана, минимум 8px */
    gap: clamp(8px, 1.5vw, 12px);
    /* Минимальные отступы сверху/снизу: 2% от высоты экрана, минимум 10px */
    margin: clamp(10px, 2vh, 16px) 0;
    display: grid;
    grid-template-columns: 1fr;
  }
  
  .executive-quick-action {
    /* Минимальные отступы внутри блока: 2.5% от ширины экрана, минимум 10px, максимум 16px */
    padding: clamp(10px, 2.5vw, 16px);
    /* Убраны margin-left/right - отступы управляются через padding у .executive-quick-actions */
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: clamp(10px, 2vw, 16px);
  }
  
  .executive-quick-action-icon {
    /* Размер иконки: 7% от ширины экрана, минимум 36px, максимум 48px */
    width: clamp(36px, 7vw, 48px);
    height: clamp(36px, 7vw, 48px);
    /* Минимальный отступ снизу: 1.5% от высоты экрана, минимум 8px */
    margin-bottom: clamp(8px, 1.5vh, 12px);
  }
  
  .executive-quick-action-icon i {
    /* Размер иконки внутри: 5.5% от ширины экрана, минимум 16px, максимум 20px */
    font-size: clamp(16px, 5.5vw, 20px);
  }
  
  .executive-quick-action-title {
    /* Размер шрифта заголовка: 3.5% от ширины экрана, минимум 0.85rem, максимум 1rem */
    font-size: clamp(0.85rem, 3.5vw, 1rem);
    /* Минимальный отступ снизу: 1% от высоты экрана, минимум 6px */
    margin-bottom: clamp(6px, 1vh, 8px);
  }
  
  .executive-quick-action-desc {
    /* Размер шрифта описания: 3% от ширины экрана, минимум 0.75rem, максимум 0.9rem */
    font-size: clamp(0.75rem, 3vw, 0.9rem);
    /* Минимальный отступ снизу: 1.2% от высоты экрана, минимум 8px */
    margin-bottom: clamp(8px, 1.2vh, 12px);
  }
  
  .executive-quick-action .executive-quick-actions {
    /* Минимальный отступ между кнопками: 1% от ширины экрана, минимум 4px */
    gap: clamp(4px, 1vw, 8px);
    /* Минимальный отступ сверху: 1.5% от высоты экрана, минимум 8px */
    margin-top: clamp(8px, 1.5vh, 12px);
    padding-left: 0;
    padding-right: 0;
  }
  
  .executive-quick-action .executive-quick-actions .btn-executive-primary,
  .executive-quick-action .executive-quick-actions .btn-executive-secondary,
  .executive-quick-action .executive-quick-actions .btn-executive-success,
  .executive-quick-action .executive-quick-actions .btn-executive-warning,
  .executive-quick-action .executive-quick-actions .btn-executive-danger,
  .executive-quick-action .executive-quick-actions .btn-executive-info,
  .executive-quick-action .executive-quick-actions .btn-executive-neutral {
    width: 100%;
    /* Минимальные отступы внутри кнопки: 2% от ширины экрана, минимум 8px */
    padding: clamp(8px, 2vh, 10px) clamp(8px, 2vw, 12px);
    /* Минимальная высота для удобства нажатия: 42px */
    min-height: 42px;
    /* Размер шрифта: 3% от ширины экрана, минимум 0.75rem, максимум 0.8rem */
    font-size: clamp(0.75rem, 3vw, 0.8rem);
    border-radius: clamp(5px, 1.2vw, 6px);
    /* Текст выравнивается слева */
    justify-content: flex-start;
    text-align: left;
    /* Стили для автоматического уменьшения размера шрифта */
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  /* Очень маленькие экраны - МИНИМАЛЬНЫЕ ОТСТУПЫ */
  @media (max-width: 480px) {
    .main-welcome {
      /* Минимальные отступы для main-welcome */
      padding: clamp(4px, 1.5vh, 6px) clamp(1px, 1.5vw, 6px);
      box-sizing: border-box;
    }
    
    .executive-dashboard-luxury {
      /* Минимальные отступы: 2% от ширины, минимум 4px */
      /* Отступы слева/справа: 1px для всех внутренних блоков */
      padding: clamp(4px, 2vw, 8px) 1px;
      margin-left: 0;
      margin-right: 0;
      width: 100%;
      box-sizing: border-box;
    }
    
    .executive-header-premium {
      /* Минимальные отступы внутри заголовка */
      padding: clamp(8px, 2vw, 12px) clamp(6px, 1.5vw, 10px);
      gap: clamp(6px, 1.5vw, 10px);
    }
    
    .executive-logo-crown {
      width: clamp(40px, 8vw, 50px);
      height: clamp(40px, 8vw, 50px);
    }
    
    .executive-logo-crown::before {
      font-size: clamp(20px, 5vw, 26px);
    }
    
    .executive-main-title {
      font-size: clamp(1.4rem, 4vw, 2rem);
      margin-bottom: clamp(4px, 1vh, 6px);
    }
    
    .executive-company-name {
      font-size: clamp(1.1rem, 3.2vw, 1.5rem);
      margin: clamp(2px, 0.8vh, 4px) 0 clamp(4px, 1.2vh, 6px) 0;
    }
    
    .executive-subtitle {
      font-size: clamp(0.8rem, 2.5vw, 0.95rem);
      margin-bottom: clamp(4px, 1vh, 6px);
    }
    
    .luxury-stats-grid {
      gap: clamp(6px, 1.5vw, 8px);
      /* Отступы слева/справа: 1px для всех внутренних блоков */
      padding-left: 1px;
      padding-right: 1px;
      margin: clamp(6px, 2vh, 10px) 0;
    }
    
    .luxury-stats-grid .executive-card-luxury {
      min-height: 180px;
      padding: clamp(8px, 2vw, 12px);
    }
    
    /* Контейнер для иконки, названия и значения в одной строке (маленькие экраны) */
    .luxury-header-row {
      display: flex;
      align-items: center;
      gap: clamp(6px, 1.5vw, 10px);
      margin-bottom: clamp(10px, 2vh, 12px);
      justify-content: space-between;
    }
    
    .luxury-stats-grid .luxury-icon {
      width: clamp(28px, 6vw, 32px);
      height: clamp(28px, 6vw, 32px);
      margin-bottom: 0;
      flex-shrink: 0;
    }
    
    .luxury-stats-grid .luxury-icon i {
      font-size: clamp(12px, 4vw, 14px);
    }
    
    .luxury-stats-grid .luxury-title {
      font-size: clamp(0.7rem, 3vw, 0.75rem);
      min-height: auto;
      margin: 0;
      flex: 1;
    }
    
    /* Значение внутри header-row для маленьких экранов */
    .luxury-header-row .luxury-value {
      margin: 0;
      margin-left: auto;
      font-size: clamp(1.2rem, 3.5vw, 1.5rem);
      flex-shrink: 0;
    }
    
    /* Значение вне header-row (скрыто на маленьких экранах) */
    .luxury-stat-card > .luxury-value {
      display: none;
    }
    
    .luxury-stats-grid .trust-guarantee {
      font-size: clamp(0.65rem, 2.8vw, 0.7rem);
      min-height: clamp(16px, 2.5vh, 18px);
    }
    
    /* Executive Quick Actions - МИНИМАЛЬНЫЕ ОТСТУПЫ */
    .executive-quick-actions {
      /* Отступы слева/справа: 1px для всех внутренних блоков */
      padding-left: 1px;
      padding-right: 1px;
      gap: clamp(6px, 1.5vw, 8px);
      margin: clamp(8px, 2vh, 12px) 0;
    }
    
    .executive-quick-action {
      padding: clamp(8px, 2vw, 12px);
      /* Убраны margin-left/right - отступы управляются через padding у .executive-quick-actions */
      margin-left: 0;
      margin-right: 0;
      width: 100%;
      border-radius: clamp(8px, 1.5vw, 10px);
    }
    
    .executive-quick-action-icon {
      width: clamp(32px, 6.5vw, 36px);
      height: clamp(32px, 6.5vw, 36px);
      margin-bottom: clamp(6px, 1.5vh, 8px);
    }
    
    .executive-quick-action-icon i {
      font-size: clamp(14px, 4.5vw, 16px);
    }
    
    .executive-quick-action-title {
      font-size: clamp(0.8rem, 3.2vw, 0.9rem);
      margin-bottom: clamp(4px, 1vh, 6px);
    }
    
    .executive-quick-action-desc {
      font-size: clamp(0.7rem, 2.8vw, 0.8rem);
      margin-bottom: clamp(6px, 1.5vh, 8px);
    }
    
    .executive-quick-action .executive-quick-actions {
      gap: clamp(4px, 1.2vw, 6px);
      margin-top: clamp(6px, 1.5vh, 8px);
    }
    
    .executive-quick-action .executive-quick-actions .btn-executive-primary,
    .executive-quick-action .executive-quick-actions .btn-executive-secondary,
    .executive-quick-action .executive-quick-actions .btn-executive-success,
    .executive-quick-action .executive-quick-actions .btn-executive-warning,
    .executive-quick-action .executive-quick-actions .btn-executive-danger,
    .executive-quick-action .executive-quick-actions .btn-executive-info,
    .executive-quick-action .executive-quick-actions .btn-executive-neutral {
      padding: clamp(6px, 1.5vh, 8px) clamp(6px, 2vw, 10px);
      min-height: 40px;
      font-size: clamp(0.7rem, 2.8vw, 0.75rem);
      border-radius: clamp(4px, 1vw, 6px);
      /* Текст выравнивается слева */
      justify-content: flex-start;
      text-align: left;
      /* Стили для автоматического уменьшения размера шрифта */
      white-space: nowrap;
      overflow: hidden;
      box-sizing: border-box;
    }
  }
  
  .luxury-stat-card {
    padding: 20px;
  }
  
  .luxury-stat-value {
    font-size: 2.2rem;
  }
  
  .royal-card {
    padding: 24px;
  }
  
  .btn-executive-primary {
    padding: 14px 24px;
    font-size: 1rem;
    min-height: 48px;
  }
  
  .executive-table th,
  .executive-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  
  /* === 📊 ТАБЛИЦА КУРСОВ - МОБИЛЬНЫЙ (<768px) === */
  /* Мобильный: Минимальные ширины, горизонтальная прокрутка */
  .courses-table {
    min-width: 800px; /* Минимальная ширина для всех колонок */
  }
  
  .courses-table .col-course-name {
    width: clamp(200px, 30%, 400px);
    min-width: 200px;
  }
  
  .courses-table .col-price {
    width: clamp(120px, 12%, 150px);
    min-width: 120px;
  }
  
  .courses-table .col-teacher {
    width: clamp(140px, 18%, 220px);
    min-width: 140px;
  }
  
  .courses-table .col-room {
    width: clamp(120px, 15%, 180px);
    min-width: 120px;
  }
  
  .courses-table .col-max-students {
    width: clamp(80px, 10%, 120px);
    min-width: 80px;
  }
  
  .courses-table .col-status {
    width: clamp(100px, 10%, 140px);
    min-width: 100px;
  }
  
  /* Действия: 2 кнопки по 40px + gap 8px + padding 24px = 112px минимум */
  .courses-table .col-actions {
    width: clamp(120px, 12%, 160px);
    min-width: 120px;
  }
  
  /* На очень маленьких экранах можно разместить кнопки вертикально */
  @media (max-width: 480px) {
    .courses-table .executive-actions {
      flex-direction: column;
      gap: 4px;
    }
    
    .courses-table .executive-actions .btn-sm {
      width: 100%;
      min-width: 36px;
      height: 36px;
    }
    
    .courses-table .col-actions {
      width: clamp(60px, 10%, 80px);
      min-width: 60px;
    }
  }
  
  /* Гарантируем горизонтальную прокрутку на мобильных */
  .executive-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* === 👩‍🏫 УЧИТЕЛЯ - МОБИЛЬНАЯ АДАПТАЦИЯ === */
  .teacher-workspace-comfort {
    padding: 16px;
  }
  
  .productivity-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .productivity-stat-card {
    padding: 16px;
  }
  
  .productivity-stat-value {
    font-size: 2rem;
  }
  
  .lesson-planner {
    padding: 16px;
  }
  
  .lesson-planner-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .student-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .reading-mode {
    padding: 20px;
    font-size: 1.1rem;
  }
  
  .btn-teacher-primary {
    min-height: 48px;
    font-size: 1rem;
  }
  
  /* === 👨‍👩‍👧‍👦 РОДИТЕЛИ - МОБИЛЬНАЯ АДАПТАЦИЯ === */
  .parent-dashboard-trust {
    padding: 20px;
  }
  
  .security-stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .security-stat-card {
    padding: 20px;
  }
  
  .security-stat-value {
    font-size: 2.2rem;
  }
  
  .certification-container {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .certification-badge {
    min-width: 200px;
    padding: 16px;
  }
  
  .document-viewer {
    padding: 20px;
  }
  
  .document-signature {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  
  .progress-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .btn-parent-primary {
    min-height: 48px;
    font-size: 0.95rem;
  }
  
  /* === 🎓 УЧЕНИКИ - МОБИЛЬНАЯ АДАПТАЦИЯ === */
  .student-hub-modern {
    padding: 16px;
    border-radius: 16px;
  }
  
  .trendy-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .trendy-stat-card {
    padding: 16px;
  }
  
  .trendy-stat-value {
    font-size: 2rem;
  }
  
  .achievement-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
  }
  
  .achievement-item {
    padding: 12px;
  }
  
  .gaming-leaderboard {
    padding: 16px;
  }
  
  .leaderboard-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }
  
  .gaming-button-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-student-primary,
  .btn-student-gaming {
    min-height: 48px;
    font-size: 0.95rem;
  }
  
  .holographic-card {
    padding: 16px;
    border-radius: 16px;
  }

  .main-login,
  .main-welcome {
    /* Математический расчет: padding = 2% от ширины экрана, минимум 8px, максимум 16px */
    padding: clamp(8px, 2vh, 12px) clamp(8px, 2vw, 16px);
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
  }

  .welcome-container {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  /* === 🎯 АДАПТИВНЫЕ РАЗМЕРЫ ИЗОБРАЖЕНИЯ ДЛЯ МОБИЛЬНЫХ === */
  .studyhub-image {
    max-width: 280px;        /* 280px в пикселях */
    max-height: 200px;       /* 200px в пикселях */
    width: 90%;              /* 90% от ширины контейнера */
    height: auto;
    margin: 0 auto;          /* центрирование */
    display: block;          /* для центрирования */
  }

  /* === ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНЫХ === */
  .section-top.container {
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding: 15px !important;
    text-align: center !important;
  }
  
  .features-wrapper {
    grid-template-columns: 280px !important; /* Фиксированная ширина */
    gap: 1rem !important;
    padding: 0 0.625rem !important;
    max-width: 100% !important;
    justify-content: center !important; /* Центрирование */
    overflow-x: auto !important; /* Горизонтальная прокрутка при необходимости */
  }
  
  .feature-item {
    /* === АДАПТИВНЫЕ РАЗМЕРЫ ДЛЯ МОБИЛЬНЫХ === */
    width: 100% !important;
    min-width: 280px !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 320px !important;
    max-height: none !important;
    
    text-align: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Скрываем переполнение */
    margin: 0 auto !important; /* Центрирование */
    
    /* === ПРИНУДИТЕЛЬНОЕ ОГРАНИЧЕНИЕ РАЗМЕРОВ === */
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /* === 👔 ДИРЕКТОРА - СРЕДНИЕ МОБИЛЬНЫЕ ЭКРАНЫ (481px-767px) === */
  .executive-dashboard-luxury {
    /* Математический расчет: padding = 4% от ширины экрана, минимум 16px, максимум 24px */
    padding: clamp(16px, 4vw, 24px);
    /* Отступы слева/справа: 2% от ширины экрана, минимум 10px */
    margin-left: clamp(10px, 2vw, 16px);
    margin-right: clamp(10px, 2vw, 16px);
    /* Ширина блока: 100% минус отступы слева/справа */
    width: calc(100% - clamp(20px, 4vw, 32px));
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .executive-header-premium {
    /* Отступы внутри заголовка: 3% от ширины экрана, минимум 20px, максимум 24px */
    padding: clamp(20px, 3vw, 24px) clamp(16px, 2.5vw, 20px);
    /* Отступ между элементами: 2.5% от ширины экрана, минимум 14px */
    gap: clamp(14px, 2.5vw, 18px);
  }
  
  .executive-logo-crown {
    /* Размер логотипа: 10% от ширины экрана, минимум 50px, максимум 60px */
    width: clamp(50px, 10vw, 60px);
    height: clamp(50px, 10vw, 60px);
  }
  
  .executive-logo-crown::before {
    /* Размер иконки в логотипе: 6% от ширины экрана, минимум 28px, максимум 30px */
    font-size: clamp(28px, 6vw, 30px);
  }
  
  .executive-main-title {
    /* Размер заголовка: 5% от ширины экрана, минимум 1.8rem, максимум 2.5rem */
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
  
  .executive-company-name {
    /* Размер названия компании: 4% от ширины экрана, минимум 1.3rem, максимум 1.8rem */
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    /* Отступы: 1.5% от высоты экрана, минимум 6px */
    margin: clamp(6px, 1.5vh, 8px) 0 clamp(8px, 2vh, 12px) 0;
  }
  
  .executive-subtitle {
    /* Размер подзаголовка: 3% от ширины экрана, минимум 0.9rem, максимум 1rem */
    font-size: clamp(0.9rem, 3vw, 1rem);
  }
  
  .executive-quick-actions {
    /* Отступы слева/справа: 1.5% от ширины экрана, минимум 10px */
    padding-left: clamp(10px, 1.5vw, 14px);
    padding-right: clamp(10px, 1.5vw, 14px);
    /* Отступы между элементами: 2.5% от ширины экрана, минимум 16px, максимум 20px */
    gap: clamp(16px, 2.5vw, 20px);
    /* Отступы сверху/снизу: 3.5% от высоты экрана, минимум 20px */
    margin: clamp(20px, 3.5vh, 24px) 0;
  }
  
  .executive-quick-action {
    /* Отступы внутри блока: 3.5% от ширины экрана, минимум 20px, максимум 28px */
    padding: clamp(20px, 3.5vw, 28px);
    /* Отступы слева/справа: 0.8% от ширины экрана, минимум 6px */
    margin-left: clamp(6px, 0.8vw, 8px);
    margin-right: clamp(6px, 0.8vw, 8px);
    /* Ширина блока: 100% минус отступы слева/справа */
    width: calc(100% - clamp(12px, 1.6vw, 16px));
    border-radius: clamp(14px, 2.2vw, 18px);
  }
  
  .executive-quick-action-icon {
    /* Размер иконки: 7% от ширины экрана, минимум 48px, максимум 56px */
    width: clamp(48px, 7vw, 56px);
    height: clamp(48px, 7vw, 56px);
    margin-bottom: clamp(16px, 2.5vh, 20px);
  }
  
  .executive-quick-action-icon i {
    /* Размер иконки внутри: 5.5% от ширины экрана, минимум 20px, максимум 24px */
    font-size: clamp(20px, 5.5vw, 24px);
  }
  
  .executive-quick-action-title {
    /* Размер шрифта заголовка: 3.8% от ширины экрана, минимум 1rem, максимум 1.1rem */
    font-size: clamp(1rem, 3.8vw, 1.1rem);
    margin-bottom: clamp(10px, 1.8vh, 12px);
  }
  
  .executive-quick-action-desc {
    /* Размер шрифта описания: 3.2% от ширины экрана, минимум 0.85rem, максимум 0.95rem */
    font-size: clamp(0.85rem, 3.2vw, 0.95rem);
    margin-bottom: clamp(12px, 2.2vh, 16px);
  }
  
  .executive-quick-action .executive-quick-actions {
    /* Отступ между кнопками: 1.8% от ширины экрана, минимум 8px, максимум 10px */
    gap: clamp(8px, 1.8vw, 10px);
    margin-top: clamp(14px, 2.5vh, 16px);
    padding-left: 0;
    padding-right: 0;
  }
  
  .executive-quick-action .executive-quick-actions .btn-executive-primary,
  .executive-quick-action .executive-quick-actions .btn-executive-secondary,
  .executive-quick-action .executive-quick-actions .btn-executive-success,
  .executive-quick-action .executive-quick-actions .btn-executive-warning,
  .executive-quick-action .executive-quick-actions .btn-executive-danger,
  .executive-quick-action .executive-quick-actions .btn-executive-info,
  .executive-quick-action .executive-quick-actions .btn-executive-neutral {
    /* Отступы внутри кнопки: 2.8% от ширины экрана по горизонтали, минимум 12px, максимум 16px */
    padding: clamp(12px, 2.2vh, 14px) clamp(12px, 2.8vw, 16px);
    min-height: 44px;
    /* Размер шрифта: 3.2% от ширины экрана, минимум 0.82rem, максимум 0.85rem */
    font-size: clamp(0.82rem, 3.2vw, 0.85rem);
    border-radius: clamp(7px, 1.3vw, 8px);
    /* Текст выравнивается слева */
    justify-content: flex-start;
    text-align: left;
    /* Стили для автоматического уменьшения размера шрифта */
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .luxury-stats-grid {
    /* Отступы между карточками: 2.2% от ширины экрана, минимум 14px, максимум 18px */
    gap: clamp(14px, 2.2vw, 18px);
    /* Отступы слева/справа: 1.5% от ширины экрана, минимум 10px */
    padding-left: clamp(10px, 1.5vw, 14px);
    padding-right: clamp(10px, 1.5vw, 14px);
    /* Отступы сверху/снизу: 3% от высоты экрана, минимум 18px */
    margin: clamp(18px, 3vh, 20px) 0;
  }
  
  .luxury-stats-grid .executive-card-luxury,
  .luxury-stats-grid .luxury-stat-card {
    /* Отступы внутри карточки: 3% от ширины экрана, минимум 18px, максимум 24px */
    padding: clamp(18px, 3vw, 24px);
  }
  
  /* Контейнер для иконки, названия и значения в одной строке (средние мобильные) */
  .luxury-header-row {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 12px);
    margin-bottom: clamp(14px, 2.5vh, 16px);
    justify-content: space-between;
  }
  
  .luxury-stats-grid .luxury-icon {
    /* Размер иконки: 7% от ширины экрана, минимум 44px, максимум 52px */
    width: clamp(44px, 7vw, 52px);
    height: clamp(44px, 7vw, 52px);
    margin-bottom: 0;
    flex-shrink: 0;
  }
  
  .luxury-stats-grid .luxury-icon i {
    /* Размер иконки внутри: 5% от ширины экрана, минимум 20px, максимум 22px */
    font-size: clamp(20px, 5vw, 22px);
  }
  
  .luxury-stats-grid .luxury-title {
    /* Размер заголовка: 3.5% от ширины экрана, минимум 1rem, максимум 1.1rem */
    font-size: clamp(1rem, 3.5vw, 1.1rem);
    min-height: auto;
    margin: 0;
    flex: 1;
  }
  
  /* Значение внутри header-row для средних мобильных */
  .luxury-header-row .luxury-value {
    margin: 0;
    margin-left: auto;
    font-size: clamp(1.6rem, 4vw, 1.8rem);
    flex-shrink: 0;
  }
  
  /* Значение вне header-row (скрыто на мобильных) */
  .luxury-stat-card > .luxury-value {
    display: none;
  }

  .welcome-box {
    padding: 15px;
    margin: 5px;
    border-radius: var(--radius-sm);
  }

  .welcome-box h1 {
    font-size: 1.6rem;
    line-height: 1.2;
  }

  .welcome-box p {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  /* === TYPOGRAPHY FOR SMALL SCREENS === */
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }
  h4 { font-size: 1.1rem; }
  h5 { font-size: 1rem; }
  h6 { font-size: 0.95rem; }

  /* === FORM ADJUSTMENTS FOR SMALL SCREENS === */
  .form-block {
    padding: 15px;
    margin: 5px;
    border-radius: var(--radius-sm);
  }

  .form-login {
    padding: 20px 15px;
    margin: 10px auto;
    width: 95%;
    max-width: 95%;
  }

  .form-login h2 {
    font-size: 1.2rem;
  }

  /* === BUTTON ADJUSTMENTS FOR SMALL SCREENS === */
  button, .button, .welcome-button {
    padding: 10px 16px;
    font-size: 0.9rem;
    min-height: 44px; /* Touch-friendly minimum */
  }

  .main-button {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-height: 44px;
  }

  /* === INPUT ADJUSTMENTS FOR SMALL SCREENS === */
  .form-block input:not([type="radio"]):not([type="checkbox"]),
  .form-block select,
  .form-block textarea {
    min-height: 44px; /* Touch-friendly minimum */
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .verification-input {
    width: 40px;
    height: 50px;
    font-size: 18px;
  }

  /* === INPUT WITH ICON FIXES FOR SMALL SCREENS === */
  .input-with-icon input,
  .input-with-icon input[type="text"],
  .input-with-icon input[name="login"],
  #login {
    padding-left: 40px !important;
    padding-right: 16px !important;
    text-indent: 0 !important;
    box-sizing: border-box !important;
  }

  .input-with-icon.password-field input,
  .input-with-icon input[type="password"],
  .input-with-icon input[name="password"],
  #password {
    padding-left: 40px !important;
    padding-right: 45px !important;
    text-indent: 0 !important;
    box-sizing: border-box !important;
  }

  /* === БАЗОВОЕ ПОЗИЦИОНИРОВАНИЕ ИКОНОК (когда нет ошибки) === */
  .input-with-icon i:not(.toggle-password),
  .input-with-icon input:focus ~ i:not(.toggle-password),
  .input-with-icon:focus-within i:not(.toggle-password) {
    position: absolute !important;
    left: 12px !important;
    top: calc(50% - 10px) !important;
    transform: translateY(-50%) !important;
    font-size: 1rem !important;
    width: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
  }

  /* === ПОЗИЦИОНИРОВАНИЕ ИКОНОК ПРИ НАЛИЧИИ ОШИБКИ (20px выше) === */
  .input-with-icon:has(.field-error) i:not(.toggle-password),
  .input-with-icon .field-error ~ i:not(.toggle-password),
  .input-with-icon input.field-error ~ i:not(.toggle-password) {
    position: absolute !important;
    left: 12px !important;
    top: calc(50% - 20px) !important;
    transform: translateY(-50%) !important;
    font-size: 1rem !important;
    width: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
  }

  .input-with-icon .toggle-password {
    right: 14px !important;
    font-size: 0.9rem !important;
    pointer-events: auto !important;
    display: flex !important;
    visibility: visible !important;
    z-index: 15 !important;
    cursor: pointer !important;
  }

  /* === ИСПРАВЛЕНИЕ ПОЗИЦИОНИРОВАНИЯ ИКОНОК ПРИ ПОЯВЛЕНИИ ОШИБКИ === */
  .input-with-icon .field-error {
    position: static !important;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    display: block !important;
    width: 100% !important;
    clear: both !important;
    z-index: 1 !important;
  }

}

/* === MOBILE DEVICES (481px to 767px) === */
@media (min-width: 481px) and (max-width: 767px) {
  .container {
    padding: 20px 15px;
  }
  
  /* 📊 Monthly Profit Report Mobile (Large) */
  .section-top.container {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }
  
  .period-export-container {
    flex-direction: column;
    gap: 18px;
  }
  
  .financial-summary-container {
    margin-top: 30px;
  }
  
  .income-amount,
  .expenses-amount,
  .profit-amount-positive,
  .profit-amount-negative {
    font-size: 2.2rem;
  }
  
  .margin-value {
    font-size: 1.6rem;
  }
  
  .form-block.u-glass {
    min-height: 370px;
  }

  .main-login,
  .main-welcome {
    /* Математический расчет: padding = 2.5% от ширины экрана, минимум 10px, максимум 20px */
    padding: clamp(10px, 2.5vh, 16px) clamp(10px, 2.5vw, 20px);
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
  }

  .welcome-container {
    max-width: 100%;
    padding: 0;
  }

  .executive-dashboard-luxury {
    width: 90%;
    margin: 0 auto;
  }

  .welcome-box {
    padding: 20px;
    margin: 10px;
  }

  .welcome-box h1 {
    font-size: 2rem;
  }

  .welcome-box p {
    font-size: 1rem;
  }

  /* === TYPOGRAPHY ADJUSTMENTS === */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.3rem; }
  h5 { font-size: 1.2rem; }
  h6 { font-size: 1.1rem; }

  /* === FORM ADJUSTMENTS === */
  .form-block {
    padding: 20px;
    margin: 10px;
  }


  /* === BUTTON ADJUSTMENTS === */
  button, .button, .welcome-button {
    padding: 12px 20px;
    font-size: 1rem;
    min-height: 48px; /* Touch-friendly minimum */
  }

  .main-button {
    padding: 10px 20px;
    font-size: 1rem;
    min-height: 48px;
  }

  /* === INPUT ADJUSTMENTS === */
  .form-block input:not([type="radio"]):not([type="checkbox"]),
  .form-block select,
  .form-block textarea {
    min-height: 48px; /* Touch-friendly minimum */
    padding: 12px 16px;
    font-size: 1rem;
  }

  .verification-input {
    width: 45px;
    height: 55px;
    font-size: 20px;
  }
}

/* === SHARED MOBILE STYLES (all mobile devices) === */
@media (max-width: 767px) {
  /* === LAYOUT FLEXIBILITY === */
  .section-top.container {
    flex-direction: column;
    gap: 1rem;
    padding: 15px 10px;
  }

  .top-text, .top-image {
    flex: 1 1 100%;
    min-width: auto;
  }

  .features-wrapper {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 10px;
  }

  .tariff-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 20px;
    padding: 0 10px;
    align-items: stretch;
  }

  .tariff-card {
    width: 100%;
    max-width: 350px;
    height: 100%;
    margin: 0;
  }

  /* === LOGO ADJUSTMENTS === */
  .logos-container {
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    gap: 10px;
  }

  .logo-with-name {
    text-align: center;
  }

  .logo-image {
    width: 160px;
    max-width: 200px;
  }

  .company-title {
    font-size: 1.6rem;
    margin-top: 8px;
  }

  .logo-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 300px;
  }

  .logo-actions .welcome-button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* === TABLE ADJUSTMENTS === */
  table:not(.flag-table) {
    font-size: 0.85rem;
    width: 100%;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
  }

  table:not(.flag-table) thead, 
  table:not(.flag-table) tbody, 
  table:not(.flag-table) tr {
    display: block;
  }

  table:not(.flag-table) th, 
  table:not(.flag-table) td {
    padding: 8px 12px;
    display: inline-block;
    min-width: 120px;
  }

  /* === FLAG TABLE MOBILE ADJUSTMENTS === */
  .flag-container {
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 8px;
    width: 100% !important;
  }

  .flag-td {
    padding: 2px !important;
    border: none !important;
  }

  .flag-button {
    padding: 4px !important;
    min-height: auto !important;
    min-width: auto !important;
  }

  .flag-img {
    width: 28px !important;
    height: 28px !important;
  }

  /* === MODAL ADJUSTMENTS === */
  .modal-content {
    padding: 15px;
    margin: 5px;
    max-width: 95%;
    width: 95%;
    border-radius: var(--radius-sm);
  }

  .modal-title {
    font-size: 1.3rem;
    line-height: 1.3;
  }

  /* === UTILITY ADJUSTMENTS === */
  .d-only-mobile {
    display: block !important;
  }
  
  .d-hide-mobile {
    display: none !important;
  }

  /* === GLOBAL DEPARTMENTS ADJUSTMENTS === */
  .global-departments-list {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 10px;
  }
  
  .global-dept-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: 16px;
  }
  
  .global-dept-item .button-link {
    align-self: stretch;
    margin-top: var(--space-sm);
    text-align: center;
    width: 100%;
  }

  /* === VERIFY DEVICE BOX ADJUSTMENTS === */
  .verify-device-box {
    width: 95%;
    max-width: 400px;
    padding: 20px 15px;
    margin: 15px auto;
  }

  /* === SETTINGS BOX ADJUSTMENTS === */
  .settings-box {
    margin: 15px auto;
    padding: 20px 15px;
    max-width: 95%;
  }

  /* === ALERT ADJUSTMENTS === */
  .alert {
    min-width: 280px;
    max-width: 95vw;
    padding: 12px 16px;
    font-size: 0.9rem;
    margin: 10px auto;
  }

  /* === NOTIFICATION ADJUSTMENTS === */
  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
    padding: 12px 16px;
    font-size: 0.9rem;
    margin: 8px auto;
  }
  
  /* === SUPER ADMIN COMPONENTS MOBILE ADJUSTMENTS === */
  .super-admin-dashboard {
    padding: 15px;
  }
  
  .hero-section-modern {
    padding: 25px 15px;
  }
  
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 15px;
  }
  
  .hero-stat {
    min-width: 100%;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .config-card {
    padding: 15px;
  }
  
  .config-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .api-config-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .dashboard-section {
    padding: 15px;
  }
  
  .section-header h2 {
    font-size: 1.2rem;
  }
  
  .form-block {
    padding: 15px;
  }
  
  .bot-status-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .quick-actions-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .auto-save-indicator {
    bottom: 10px;
    right: 10px;
    left: 10px;
    text-align: center;
  }
  
  .connection-status {
    font-size: 11px;
    padding: 3px 6px;
  }

  /* === FOOTER ADJUSTMENTS === */
  .footer-text {
    padding: 20px 15px;
    font-size: 0.9rem;
    text-align: center;
  }

  /* === IMPROVED TOUCH TARGETS === */
  a:not(.flag-button), 
  button:not(.flag-button), 
  .button:not(.flag-button), 
  .welcome-button, 
  input:not(.verification-input), 
  select, 
  textarea {
    min-height: 44px;
  }

  button:not(.flag-button), 
  .button:not(.flag-button), 
  .welcome-button {
    min-width: 44px;
  }

  /* === IMPROVED SPACING FOR MOBILE === */
  .form-group {
    margin-bottom: 20px;
  }

  .section-features {
    margin-top: 30px;
    padding: 0 10px;
  }

  /* === FEATURE ITEMS MOBILE OPTIMIZATION === */
  .feature-item {
    max-width: 100% !important;
    width: 100% !important;
    padding: 18px 16px !important;
    margin: 0 auto 12px !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  .feature-item h3 {
    font-size: 1.1rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    line-height: 1.3 !important;
  }

  .feature-item p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }

  /* === FEATURES GRID MOBILE OPTIMIZATION === */
  .features-wrapper {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 0 10px !important;
    max-width: 100% !important;
  }

  /* === SMALL MOBILE SCREENS (≤ 480px) === */
  @media (max-width: 480px) {
    .feature-item {
      padding: 16px 14px !important;
      margin-bottom: 10px !important;
    }
    
    .feature-item h3 {
      font-size: 1rem !important;
      margin-bottom: 6px !important;
    }
    
    .feature-item p {
      font-size: 0.85rem !important;
      line-height: 1.4 !important;
    }
    
    .features-wrapper {
      gap: 12px !important;
      padding: 0 8px !important;
    }
  }

  /* === RESPONSIVE IMAGES === */
  img {
    max-width: 100%;
    height: auto;
  }

  .top-image img {
    max-width: 90%;
    margin: 0 auto;
    display: block;
  }

  /* === NAVIGATION IMPROVEMENTS === */
  .logo-actions form {
    width: 100%;
  }

  .logo-actions button {
    width: 100%;
  }

  /* === LOGIN FORM SPECIFIC FIXES === */

  .form-login input:not([type="radio"]):not([type="checkbox"]) {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 15px;
    box-sizing: border-box;
  }

  .form-login button {
    width: 100% !important;
    margin-top: 10px;
    box-sizing: border-box;
  }

  .input-with-icon {
    width: 100% !important;
    margin-bottom: 15px;
  }

  /* === PASSWORD FIELD WITH TWO ICONS === */
  .input-with-icon.password-field input,
  .input-with-icon input[type="password"],
  .input-with-icon input[name="password"],
  #password {
    padding-left: 42px !important;
    padding-right: 45px !important;
    text-indent: 0 !important;
    box-sizing: border-box !important;
  }

  /* === EXCLUDE FLAGS FROM GENERAL BUTTON RULES === */
  .flag-button {
    width: auto !important;
    min-width: auto !important;
    min-height: auto !important;
    padding: 4px !important;
  }

  /* === CARD RESPONSIVE IMPROVEMENTS === */
  .tariff-card h2 {
    font-size: 1.4rem;
  }

  .tariff-card .description {
    font-size: 0.9rem;
    min-height: auto;
  }

  .tariff-card .price {
    font-size: 1.2rem;
  }

  .tariff-details {
    font-size: 0.85rem;
  }

  /* === FEATURE ITEM MOBILE IMPROVEMENTS === */
  .feature-item .button-link,
  .feature-item .main-button {
    padding: 12px 16px !important;
    font-size: 0.9rem !important;
    min-height: 48px !important;
    text-align: left !important;
    justify-content: flex-start !important;
  }

  .feature-button-wrapper {
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  .feature-item .sub-links {
    gap: 10px !important;
    margin-top: 12px !important;
  }

  .feature-button-wrapper h3 {
    font-size: 1.1rem !important;
    margin: 6px 0 !important;
  }

  /* === MODERN ADMIN MOBILE АДАПТАЦИЯ === */
  .admin-container-modern {
    padding: 16px;
  }
  
  .stats-grid-modern {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .features-grid-modern {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .feature-header-modern {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .hero-section-modern {
    padding: 20px;
  }
  
  .stat-card-modern {
    padding: 16px;
  }
  
  .feature-card-modern {
    padding: 20px;
  }
  
  .btn-modern {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .stat-value-modern {
    font-size: 2.2rem;
  }

  .feature-title-modern {
    font-size: 1.3rem;
  }
}

/* 📊 Мобильные стили для statistics_dashboard.php */
@media (max-width: 768px) {
  .access-info {
    padding: 20px;
    margin-bottom: 25px;
  }
  
  .table-section {
    padding: 20px;
  }
  
  .table-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    flex-direction: column;
    gap: 5px;
  }
  
  .modern-table {
    font-size: 0.9rem;
  }
  
  .modern-table thead th,
  .modern-table tbody td {
    padding: 12px 15px;
  }
  
  .department-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    margin-right: 10px;
  }
}

@media (max-width: 480px) {
  .access-info {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .access-info h3 {
    font-size: 1.2rem;
  }
  
  .table-section {
    padding: 15px;
  }
  
  .modern-table thead th,
  .modern-table tbody td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  /* Горизонтальная прокрутка для таблиц */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .modern-table {
    min-width: 500px;
  }
}

/* === 🔧 API ADMIN MOBILE STYLES === */
@media (max-width: 1200px) {
  .api-settings-container {
    max-width: 100%;
    padding: 15px;
  }
  
  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .management-header {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .management-header h1 {
    font-size: 1.5rem;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    margin: 10px;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .modal-header {
    padding: 15px 20px;
  }
  
  .modal-title {
    font-size: 1.2rem;
  }
  
  .token-details-container {
    padding: 15px;
  }
  
  .token-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .token-textarea {
    min-height: 100px;
    font-size: 0.8rem;
  }
  
  .management-block {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .api-settings-container {
    padding: 10px;
  }
  
  .management-header {
    padding: 15px;
  }
  
  .management-header h1 {
    font-size: 1.3rem;
  }
  
  .btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  
  .btn-text {
    display: none;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .form-section {
    padding: 15px;
  }
  
  .token-card {
    padding: 15px;
  }
  
  .modal-content {
    margin: 5px;
    padding: 15px;
  }
  
  .token-details-container {
    padding: 10px;
  }
}

/* === SUPER ADMIN DASHBOARD RESPONSIVE === */

@media (max-width: 768px) {
    .super-admin-dashboard {
        width: 98%;
        padding: 15px;
    }
    
    .hero-section-modern {
        padding: 25px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 20px;
        justify-content: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats-grid-modern {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .system-health-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    /* === АДАПТИВНЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ ЛОГОВ === */
    .hero-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-actions .btn {
        width: 100%;
        padding: 12px 20px;
    }
    
    .debug-info {
        margin: 15px 0;
        padding: 10px;
    }
    
    .debug-info pre {
        font-size: 10px;
        max-height: 150px;
    }
    
    .filters-section {
        gap: 15px;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* === АДАПТИВНЫЕ СТИЛИ ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ === */
@media (max-width: 480px) {
    .super-admin-dashboard {
        width: 100%;
        padding: 10px;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .log-message {
        max-width: 200px;
    }
    
    /* === МОДАЛЬНЫЕ ОКНА: МАТЕМАТИЧЕСКИЕ РАСЧЕТЫ ДЛЯ МОБИЛЬНЫХ === */
    /* Расчеты основаны на viewport и оптимальных размерах для touch-устройств */
    
    #logDetailsModal .modal-dialog,
    #loggingSettingsModal.modal .modal-dialog.modal-lg,
    #loggingSettingsModal .modal-dialog.modal-lg {
        /* Математический расчет: 100vw - отступы (3px слева + 3px справа = 6px) */
        width: calc(100vw - 6px) !important;
        /* Отступы: 3px слева и справа для красивого вида, вертикальные адаптивные */
        margin: clamp(10px, 2.5vh, 20px) 3px !important;
        /* Высота: максимум 90vh для удобства прокрутки */
        max-height: 90vh !important;
        box-sizing: border-box !important;
    }
    
    /* Ширина header равна ширине модального окна (100% от modal-dialog) */
    #loggingSettingsModal .modal-header {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    #logDetailsModal .modal-body,
    #loggingSettingsModal .modal-body {
        /* Внутренние отступы: 5px согласно архитектуре */
        padding: 5px !important;
        /* Максимальная высота: 90vh минус header и footer */
        max-height: calc(90vh - clamp(3.5rem, 8vh, 5rem) - clamp(4rem, 9vh, 6rem));
    }
    
    /* Размеры для alert блока в модальном окне настроек */
    #loggingSettingsModal .modal-body .alert {
        /* Внутренние отступы: 5px согласно архитектуре */
        padding: 5px !important;
        /* Отступ снизу: минимум 12px, максимум 16px */
        margin-bottom: clamp(12px, 2vh, 16px);
        /* Радиус: пропорционально размеру окна */
        border-radius: clamp(0.375rem, 0.8vw, 0.5rem);
    }
    
    #loggingSettingsModal .modal-body .alert .d-flex {
        /* Отступ между элементами: компактный для мобильных */
        gap: clamp(8px, 1.5vw, 12px);
    }
    
    #loggingSettingsModal .modal-body .alert small {
        /* Размер шрифта: адаптивный для мобильных */
        font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    }
    
    #logDetailsModal .modal-footer,
    #loggingSettingsModal .modal-footer {
        flex-direction: column;
        /* Отступ между кнопками: минимум 10px, максимум 1.5vh */
        gap: clamp(10px, 1.5vh, 15px);
        /* Внутренние отступы: 5px согласно архитектуре */
        padding: 5px !important;
    }
    
    #logDetailsModal .modal-footer .d-flex,
    #loggingSettingsModal .modal-footer .d-flex {
        flex-direction: column;
        width: 100%;
        /* Отступ между группами: минимум 10px, максимум 1.5vh */
        gap: clamp(10px, 1.5vh, 15px);
    }
    
    #logDetailsModal .modal-footer .d-flex.justify-content-between,
    #loggingSettingsModal .modal-footer .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch;
    }
    
    #logDetailsModal .modal-footer .d-flex > div,
    #loggingSettingsModal .modal-footer .d-flex > div {
        width: 100%;
        flex-direction: column;
        /* Отступ между кнопками в группе: минимум 8px, максимум 1vh */
        gap: clamp(8px, 1vh, 12px);
    }
    
    #logDetailsModal .modal-footer .btn,
    #loggingSettingsModal .modal-footer .btn {
        width: 100%;
        /* Минимальная высота для touch: 44px (рекомендация Apple/Google) */
        min-height: clamp(44px, 6vh, 50px);
        /* Размер шрифта: адаптивный для мобильных */
        font-size: clamp(0.95rem, 2vw, 1.1rem);
        /* Внутренние отступы: 5px 10px согласно архитектуре */
        padding: 5px 10px !important;
    }
}

/* === 🔧 PHP EXTRACTED MOBILE STYLES === */
/* Стили извлеченные из PHP файлов для соблюдения архитектуры */

/* Из maintenance.php - мобильные стили */
@media (max-width: 480px) {
    .maintenance-container {
        margin: 10px;
        padding: 40px 24px;
    }
    
    .maintenance-title {
        font-size: 1.8rem;
    }
    
    .maintenance-subtitle {
        font-size: 1rem;
    }
}

/* Из teams/company_director/students_*.php */
@media (max-width: 480px) {
    .action-buttons .btn {
        padding: 8px !important;
        font-size: 0.8rem !important;
        min-width: 44px !important;
        max-width: 44px !important;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 375px) {
    .management-header {
        padding: 10px !important;
    }
    
    .management-header h1 {
        font-size: 1.2rem !important;
    }
}

/* Из modules/components/settings_icon_picker.php */
@media (max-width: 480px) {
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .icon-option {
        min-height: 70px;
        padding: 8px;
    }
}

/* Из include/templates/verify_device_form.php */
@media (max-width: 350px) {
    .verify-device-box { 
        width: 85%; 
        padding: 15px; 
    }
    
    .verification-input { 
        height: 50px; 
        font-size: 20px; 
    }
    
    .verify-device-box button { 
        font-size: 14px; 
        padding: 10px 20px; 
    }
}

/* === MOBILE STYLES === */
/* Стили для мобильных устройств */

/* === FEATURE ITEMS НА МОБИЛЬНЫХ === */
.feature-item {
  max-width: 100% !important;
  width: 100% !important;
  padding: 18px 16px !important;
  margin: 0 auto 12px !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  
  /* === МОБИЛЬНАЯ ЛОГИКА === */
  /* На мобильных блоках один под другим */
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  float: none !important;
  clear: both !important;
}

.feature-item h3 {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  font-size: 1.1rem !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
  line-height: 1.3 !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  
  /* === МОБИЛЬНАЯ ТИПОГРАФИКА === */
  margin-bottom: 8px !important;
  text-align: center !important;
}

.feature-item p {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  
  /* === МОБИЛЬНАЯ ТИПОГРАФИКА === */
  text-align: center !important;
  margin-bottom: 0 !important;
}

/* === FEATURES WRAPPER НА МОБИЛЬНЫХ === */
.features-wrapper {
  /* === МОБИЛЬНАЯ ЛОГИКА === */
  /* Блоки отображаются один под другим */
  display: grid !important;
  grid-template-columns: 1fr !important; /* Одна колонка */
  gap: 16px !important;
  padding: 0 10px !important;
  max-width: 100% !important;
  
  /* === МОБИЛЬНАЯ СЕТКА === */
  grid-auto-flow: row !important;
  grid-auto-rows: auto !important;
  align-items: stretch !important; /* Растягиваем карточки для одинаковой высоты */
}

/* === МОБИЛЬНЫЕ ИКОНКИ === */
.feature-item i {
  display: block !important;
  text-align: center !important;
  margin-bottom: 12px !important;
  font-size: 2rem !important;
}

/* === МАЛЕНЬКИЕ МОБИЛЬНЫЕ ЭКРАНЫ (≤ 480px) === */
@media (max-width: 480px) {
  .feature-item {
    padding: 16px 14px !important;
    margin-bottom: 10px !important;
  }
  
  .feature-item h3 {
    font-size: 1rem !important;
    margin-bottom: 6px !important;
  }
  
  .feature-item p {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
  }
  
  .features-wrapper {
    gap: 12px !important;
    padding: 0 8px !important;
  }
  
  .feature-item i {
    font-size: 1.8rem !important;
    margin-bottom: 10px !important;
  }
}

/* === ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (≤ 360px) === */
@media (max-width: 360px) {
  .feature-item {
    padding: 14px 12px !important;
    margin-bottom: 8px !important;
  }
  
  .feature-item h3 {
    font-size: 0.95rem !important;
    margin-bottom: 5px !important;
  }
  
  .feature-item p {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
  }
  
  .features-wrapper {
    gap: 10px !important;
    padding: 0 6px !important;
  }
  
  .feature-item i {
    font-size: 1.6rem !important;
    margin-bottom: 8px !important;
  }
}

/* === ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 320px) === */
@media (max-width: 320px) {
  .section-features {
    /* Принудительный перенос для очень маленьких экранов */
    clear: both !important;
    margin-top: 1.5rem !important;
    width: 100% !important;
    display: block !important;
    float: none !important;
  }
  
  .features-wrapper {
    grid-template-columns: 260px !important; /* Немного меньше для очень маленьких экранов */
    gap: 0.75rem !important;
    padding: 0 0.5rem !important;
    width: 100% !important;
  }
  
  .feature-item {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: 16px 12px !important;
  }
  
  .feature-item h3 {
    font-size: 0.9rem !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  .feature-item p {
    font-size: 0.8rem !important;
  }
  
  .feature-item i {
    font-size: 1.4rem !important;
    margin-bottom: 8px !important;
  }
}

/* === ПРИНУДИТЕЛЬНЫЙ ПЕРЕНОС FEATURES - МАКСИМАЛЬНАЯ СПЕЦИФИЧНОСТЬ === */
@media (max-width: 767px) {
  /* Принудительно переносим features на новую строку */
  body .main-welcome .section-features.container {
    clear: both !important;
    margin-top: 2rem !important;
    width: 100% !important;
    display: block !important;
    float: none !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    order: 999 !important;
  }
  
  /* === МОБИЛЬНАЯ ТИПОГРАФИКА ДЛЯ FEATURES === */
  /* Заголовок секции */
  body .main-welcome .section-features.container h2 {
    font-size: 2.2rem !important; /* Увеличен для лучшей читаемости */
    line-height: 1.3 !important;
    margin-bottom: 1.5rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 0 1rem !important;
  }
  
  /* Заголовки feature-item */
  body .main-welcome .section-features.container .feature-item h3 {
    font-size: 1.4rem !important; /* Увеличен для лучшей читаемости */
    line-height: 1.3 !important;
    margin-bottom: 0.75rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    min-height: auto !important;
    max-height: none !important;
    display: block !important;
    overflow: visible !important;
  }
  
  /* Описания feature-item */
  body .main-welcome .section-features.container .feature-item p {
    font-size: 1.1rem !important; /* Увеличен для лучшей читаемости */
    line-height: 1.4 !important;
    margin-bottom: 0 !important;
    text-align: center !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    min-height: auto !important;
    max-height: none !important;
    display: block !important;
    overflow: visible !important;
  }
  
  /* Принудительно делаем main-welcome вертикальным */
  body .main-welcome {
    display: block !important;
    flex-direction: column !important;
  }
  
  /* Принудительно делаем section-top полной ширины */
  body .main-welcome .section-top.container {
    width: 100% !important;
    margin-bottom: 2rem !important;
    display: block !important;
  }
  
  /* Принудительно делаем features-wrapper одной колонкой */
  body .main-welcome .section-features.container .features-wrapper {
    grid-template-columns: 280px !important;
    min-width: 280px !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* === АДАПТИВНАЯ ТИПОГРАФИКА ДЛЯ РАЗНЫХ МОБИЛЬНЫХ ЭКРАНОВ === */

/* === СРЕДНИЕ МОБИЛЬНЫЕ (481px - 767px) === */
@media (min-width: 481px) and (max-width: 767px) {
  body .main-welcome .section-features.container h2 {
    font-size: 2.4rem !important; /* Увеличен для лучшей читаемости */
    margin-bottom: 1.75rem !important;
  }
  
  body .main-welcome .section-features.container .feature-item h3 {
    font-size: 1.5rem !important; /* Увеличен для лучшей читаемости */
    margin-bottom: 0.875rem !important;
  }
  
  body .main-welcome .section-features.container .feature-item p {
    font-size: 1.2rem !important; /* Увеличен для лучшей читаемости */
    line-height: 1.45 !important;
  }
}

/* === МАЛЕНЬКИЕ МОБИЛЬНЫЕ (320px - 480px) === */
@media (min-width: 320px) and (max-width: 480px) {
  body .main-welcome .section-features.container h2 {
    font-size: 1.9rem !important; /* Увеличен для лучшей читаемости */
    margin-bottom: 1.25rem !important;
    padding: 0 0.75rem !important;
  }
  
  body .main-welcome .section-features.container .feature-item h3 {
    font-size: 1.2rem !important; /* Увеличен для лучшей читаемости */
    margin-bottom: 0.625rem !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  body .main-welcome .section-features.container .feature-item p {
    font-size: 1rem !important; /* Увеличен для лучшей читаемости */
    line-height: 1.35 !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* === ОЧЕНЬ МАЛЕНЬКИЕ МОБИЛЬНЫЕ (до 320px) === */
@media (max-width: 320px) {
  body .main-welcome .section-features.container h2 {
    font-size: 1.7rem !important; /* Увеличен для лучшей читаемости */
    margin-bottom: 1rem !important;
    padding: 0 0.5rem !important;
  }
  
  body .main-welcome .section-features.container .feature-item h3 {
    font-size: 1.1rem !important; /* Увеличен для лучшей читаемости */
    margin-bottom: 0.5rem !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  body .main-welcome .section-features.container .feature-item p {
    font-size: 0.95rem !important; /* Увеличен для лучшей читаемости */
    line-height: 1.3 !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* === 📱 СТУДЕНТЫ УПРАВЛЕНИЕ - МОБИЛЬНЫЕ СТИЛИ === */
/* Адаптивные стили для управления студентами на мобильных устройствах */

/* === 📋 КНОПКИ УПРАВЛЕНИЯ === */
@media (max-width: 767px) {
  .management-header {
    flex-direction: column !important;
    gap: 15px !important;
    padding: 15px !important;
    text-align: center !important;
  }
  
  .management-header h1 {
    font-size: 1.5rem !important;
    margin: 0 !important;
  }
  
  .action-buttons {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  
  .action-buttons .btn {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    min-width: 120px !important;
    flex: 1 1 auto !important;
    max-width: 140px !important;
  }
  
  .management-block {
    padding: 15px !important;
    margin-bottom: 15px !important;
  }
  
  .management-block h2 {
    font-size: 1.3rem !important;
    margin-bottom: 15px !important;
    text-align: center;
  }
  
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  .form-group label {
    font-size: 0.9rem !important;
    margin-bottom: 6px !important;
  }
  
  .form-group input:not([type="radio"]):not([type="checkbox"]),
  .form-group select {
    height: 48px !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  
  .form-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .form-actions button {
    width: 100% !important;
    padding: 12px !important;
    font-size: 0.9rem !important;
  }
  
  .button {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px !important;
    font-size: 0.9rem !important;
  }
  
  .credential-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
    padding: 10px 0 !important;
  }
  
  .student-credentials {
    padding: 15px !important;
    font-size: 0.9rem !important;
  }
  
  .management-block .fas.fa-3x {
    font-size: 2rem !important;
  }
  
  .management-block h3 {
    font-size: 1.1rem !important;
  }
  
  .management-block p {
    font-size: 0.9rem !important;
  }
}

/* === 📱 МАЛЕНЬКИЕ МОБИЛЬНЫЕ УСТРОЙСТВА === */
@media (max-width: 480px) {
  .action-buttons .btn {
    padding: 8px !important;
    font-size: 0.8rem !important;
    min-width: 44px !important;
    max-width: 44px !important;
    justify-content: center !important;
  }
  
  .action-buttons .btn .btn-text {
    display: none !important;
  }
  
  .action-buttons .btn i {
    margin: 0 !important;
    font-size: 1rem !important;
  }
  
  .management-block {
    padding: 10px !important;
  }
  
  .management-block h2 {
    font-size: 1.2rem !important;
  }
  
  .management-block table {
    min-width: 100% !important;
    font-size: 0.8rem !important;
  }
  
  .management-block th,
  .management-block td {
    padding: 8px 6px !important;
    word-break: break-word;
  }
  
  .management-block th {
    font-size: 0.75rem !important;
  }
  
  .form-group input:not([type="radio"]):not([type="checkbox"]),
  .form-group select {
    height: 48px !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  
  .student-credentials {
    font-size: 0.85rem !important;
  }
}

/* === 📱 ОЧЕНЬ МАЛЕНЬКИЕ МОБИЛЬНЫЕ УСТРОЙСТВА === */
@media (max-width: 375px) {
  .management-header {
    padding: 10px !important;
  }
  
  .management-header h1 {
    font-size: 1.3rem !important;
  }
  
  .action-buttons {
    gap: 4px !important;
  }
  
  .action-buttons .btn {
    padding: 6px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }
  
  .action-buttons .btn i {
    font-size: 0.9rem !important;
  }
  
  .management-block {
    padding: 8px !important;
  }
  
  .management-block h2 {
    font-size: 1.1rem !important;
  }
  
  .management-block table {
    font-size: 0.75rem !important;
  }
  
  .management-block th,
  .management-block td {
    padding: 6px 4px !important;
  }
  
  .form-group input:not([type="radio"]):not([type="checkbox"]),
  .form-group select {
    height: 48px !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
}

/* === 📱 TOUCH-FRIENDLY УЛУЧШЕНИЯ === */
@media (max-width: 767px) {
  .btn {
    min-height: 44px !important;
    min-width: 44px !important;
    touch-action: manipulation !important;
  }
  
  .btn i {
    pointer-events: none !important;
  }
  
  .students-table tbody tr {
    min-height: 44px !important;
  }
  
  .form-group input:not([type="radio"]):not([type="checkbox"]),
  .form-group select,
  .form-group textarea {
    min-height: 48px !important;
    font-size: 16px !important; /* Предотвращает зум на iOS */
  }
  
  .form-group input:not([type="radio"]):not([type="checkbox"]),
  .form-group select {
    height: 48px !important;
    padding: 12px 16px !important;
  }
  
  .management-block {
    margin: 10px !important;
    border-radius: 8px !important;
  }
  
  .notification {
    top: 10px !important;
    right: 10px !important;
    left: 10px !important;
    min-width: auto !important;
    max-width: none !important;
  }
}

/* === 📱 COMPONENTS.CSS MOBILE STYLES === */
/* Стили перенесены из components.css для соблюдения архитектуры */

/* Executive Form Grid */
.executive-form-grid {
  grid-template-columns: 1fr;
  gap: 20px;
}

.settings-form-grid {
  grid-template-columns: 1fr;
  align-items: start;
  max-width: 100%;
}

.settings-form-grid .settings-form-block {
  width: 100%;
  min-width: 0;
}

.date-range-container {
  grid-template-columns: 1fr;
  gap: 12px;
}

.schedule-row-content {
  grid-template-columns: 1fr;
  gap: 12px;
}

.schedule-time-inputs {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.schedule-day-select {
  min-width: auto;
}

/* Schedule Controls для очень маленьких экранов */
@media (max-width: 480px) {
  .schedule-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .schedule-time-inputs {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .schedule-row-compact {
    padding: 12px;
  }
  
  .compact-select,
  .compact-time {
    padding: 10px 12px;
    font-size: 1rem;
  }
}

/* Modal Dialog */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  /* === ОБЩИЕ МЕДИА-ЗАПРОСЫ ДЛЯ МОДАЛЬНЫХ ОКОН (≤767px) === */
  .modal-dialog,
  .modal-dialog.modal-sm,
  .modal-dialog.modal-lg,
  .modal-dialog.modal-xl {
    max-width: 95vw !important;
    min-width: auto !important;
    margin: 10px auto !important;
    max-height: 95vh !important;
  }
  .modal-content {
    max-height: 95vh !important;
    overflow-y: auto !important;
  }
  .modal-body {
    max-height: calc(95vh - 100px) !important;
    overflow-y: auto !important;
  }
}

/* Super Admin Responsive */
.section-header-content {
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.section-actions {
  width: 100%;
  justify-content: flex-end;
}

.data-table {
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.5rem;
}

.hero-stats {
  justify-content: center;
}

/* Managers Table Mobile Styles */
#managers-table thead {
  display: none;
}

#managers-table thead th:nth-child(2),
#managers-table tbody td:nth-child(2) {
  display: none !important;
}

#managers-table tbody {
  display: block;
}

#managers-table tbody tr {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
}

#managers-table tbody tr:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

#managers-table tbody td {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

#managers-table tbody td:last-child {
  border-bottom: none;
}

#managers-table tbody td:nth-child(7) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
}

#managers-table tbody td:nth-child(7) .text-muted,
#managers-table tbody td:nth-child(7) span.text-muted,
#managers-table tbody td:nth-child(7) span:not(.text-muted) {
  color: var(--color-text-secondary, #6c757d) !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: inline !important;
  font-size: 0.9rem !important;
}

#managers-table tbody td:nth-child(7):not(:has(.text-muted)) {
  color: var(--color-text-main, #2d3748) !important;
}

#managers-table tbody td::before {
  content: attr(data-label);
  font-weight: 600;
  color: var(--color-text-main);
  margin-right: 1rem;
  flex-shrink: 0;
  min-width: 120px;
}

#managers-table tbody td:not([data-label])::before {
  content: attr(data-label);
}

#managers-table tbody td:nth-child(3) {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  width: 100%;
}

#managers-table tbody td:nth-child(3) .mobile-checkbox-wrapper {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  flex-shrink: 0;
}

#managers-table tbody td:first-child {
  display: none !important;
}

#managers-table tbody td:nth-child(3) .mobile-checkbox-wrapper input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  cursor: pointer;
  transform: scale(1.1);
  -webkit-appearance: checkbox;
  appearance: checkbox;
}

/* Managers Table улучшения для мобильных */
#managers-table tbody tr {
  position: relative;
  padding-top: 2.5rem;
}

#managers-table tbody td {
  flex-wrap: wrap;
}

#managers-table tbody td::before {
  width: 100%;
  margin-bottom: 0.25rem;
}

#managers-table tbody td > * {
  width: 100%;
}

#managers-table tbody td:first-child,
#managers-table tbody td:last-child {
  flex-wrap: nowrap;
}

#managers-table tbody td:last-child {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

#managers-table tbody td:last-child > * {
  width: 100% !important;
}

#managers-table tbody td:last-child .action-buttons {
  width: 100% !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#managers-table tbody td:last-child .action-buttons .btn-sm {
  min-height: 40px !important;
  height: auto !important;
}

#managers-table tbody td:last-child .action-buttons * {
  visibility: visible !important;
  opacity: 1 !important;
}

#managers-table .action-buttons,
#managers-table .action-buttons *,
#managers-table tbody td:last-child,
#managers-table tbody td:last-child * {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#managers-table .action-buttons {
  display: flex !important;
}

#managers-table .action-buttons .btn {
  display: inline-flex !important;
}

/* Managers Table для очень маленьких экранов */
@media (max-width: 480px) {
  #managers-table tbody tr {
    padding: 0.75rem;
    margin-bottom: 1rem;
  }
  
  #managers-table tbody td {
    padding: 0.5rem 0;
    font-size: 0.9rem;
  }
  
  #managers-table tbody td::before {
    min-width: 100px;
    font-size: 0.85rem;
  }
  
  #managers-table .action-buttons {
    flex-direction: row !important;
    gap: 0.35rem !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  #managers-table .action-buttons .btn {
    flex: 1 1 auto;
    min-width: calc(33.333% - 0.35rem);
    padding: 0.5rem 0.4rem !important;
    font-size: 0.8rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  #managers-table .action-buttons .btn i {
    font-size: 0.95rem !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  #managers-table tbody td:first-child input[type="checkbox"],
  #managers-table tbody td:first-child .manager-checkbox {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    transform: scale(1.15);
  }
  
  .status-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
  }
  
  #managers-table tbody td strong {
    font-size: 1rem;
    color: var(--color-text-main);
  }
  
  #managers-table tbody td {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  #managers-table tbody td:nth-child(7) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  #managers-table tbody td:nth-child(7) .text-muted,
  #managers-table tbody td:nth-child(7) span.text-muted {
    color: var(--color-text-secondary, #6c757d) !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline !important;
    font-size: 0.9rem !important;
  }
}

/* Company Details Modal */
.company-details-modal-content {
  width: 95%;
  max-height: 95vh;
}

.company-details-grid {
  grid-template-columns: 1fr;
}

.company-details-header {
  padding: 20px;
}

.company-details-body {
  padding: 20px;
  max-height: calc(95vh - 180px);
}

.company-details-footer {
  flex-direction: column;
  padding: 16px 20px;
}

.company-details-footer .btn {
  width: 100%;
  justify-content: center;
}

/* Companies Table */
.companies-table .col-id {
  width: 40px;
  min-width: 40px;
}

.companies-table .col-identifier-domain {
  min-width: 120px;
}

.companies-table .col-name {
  min-width: 120px;
}

.companies-table .action-buttons {
  flex-direction: column;
  gap: 4px;
}

.companies-table .action-buttons .btn {
  width: 100%;
  min-width: auto;
}

/* Quick Action Buttons и Dashboard Sections */
.quick-action-btn,
.dashboard-section,
.hero-section-modern,
.stat-card,
.health-card {
  will-change: auto;
}

/* JS Tools Grid */
.js-tools-grid,
.js-files-grid {
  grid-template-columns: 1fr;
}

.modal-dialog {
  max-width: 95%;
  margin: 1rem auto;
}

.modal-content {
  max-width: 100%;
}

.status-grid,
.config-details {
  grid-template-columns: 1fr;
}

/* User Navigation */
.user-nav-content {
  flex-direction: column;
  text-align: center;
}

.user-actions {
  justify-content: center;
}

.user-actions .btn {
  padding: 10px 20px;
  font-size: 14px;
}

@media (max-width: 480px) {
  .user-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .user-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Guest Navigation */
.guest-nav-content {
  flex-direction: column;
  text-align: center;
}

.guest-actions {
  justify-content: center;
}

.guest-actions .btn {
  padding: 10px 20px;
  font-size: 14px;
}

@media (max-width: 480px) {
  .guest-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .guest-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Panel Links */
.panel-links {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.panel-link {
  margin: 5px 0;
  width: 200px;
  justify-content: center;
}

/* Status Card */
.status-card {
  flex-direction: column;
  text-align: center;
}

.status-actions {
  width: 100%;
}

.status-actions .btn {
  width: 100%;
}

.settings-grid {
  grid-template-columns: 1fr;
}

.form-actions {
  flex-direction: column;
}

.form-actions .btn {
  width: 100%;
}

/* Стили student-notification и уведомлений для мобильных — в responsive.css @media (max-width: 767px) */

/* === 📱 BUTTONS.CSS MOBILE STYLES === */
/* Стили перенесены из buttons.css для соблюдения архитектуры */

/* Quick Actions Grid */
.quick-actions-grid {
  grid-template-columns: 1fr;
  gap: 15px;
}

.quick-action-card {
  padding: 20px;
  min-height: 80px;
}

.quick-action-icon {
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
}

.quick-action-content h5 {
  font-size: 1rem;
}

.quick-action-content p {
  font-size: 0.85rem;
}

/* Panel Buttons */
.director-panel-button,
.admin-panel-button,
.manager-panel-button {
  padding: 10px 16px;
  font-size: 14px;
  min-height: 40px;
}

@media (max-width: 480px) {
  .director-panel-button,
  .admin-panel-button,
  .manager-panel-button {
    padding: 8px 12px;
    font-size: 13px;
    min-height: 36px;
  }
}

/* Management Header */
.management-header {
  flex-direction: column;
  gap: 15px;
  padding: 15px;
  text-align: center;
}

.management-header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.action-buttons {
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.action-buttons .btn {
  padding: 8px 12px;
  font-size: 0.85rem;
  min-width: 120px;
  flex: 1 1 auto;
  max-width: 140px;
}

.management-block {
  padding: 15px;
  margin-bottom: 15px;
}

.management-block h2 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  text-align: center;
}

.form-row {
  grid-template-columns: 1fr;
  gap: 15px;
}

.form-group label {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  padding: 10px;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .action-buttons .btn {
    padding: 8px;
    font-size: 0.8rem;
    min-width: 44px;
    max-width: 44px;
    justify-content: center;
  }
  
  .action-buttons .btn .btn-text {
    display: none;
  }
  
  .action-buttons .btn i {
    margin: 0;
    font-size: 1rem;
  }
  
  .management-block {
    padding: 10px;
  }
}

/* === 📱 CARDS.CSS MOBILE STYLES === */
/* Стили перенесены из cards.css для соблюдения архитектуры */

/* Luxury Stats Grid */
.luxury-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  padding: 16px;
}

.luxury-stats-grid .particle {
  display: none; /* Скрываем частицы на мобильных для производительности */
}

@media (max-width: 480px) {
  .luxury-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }
}

/* Enterprise Grid Premium */
.enterprise-grid-premium {
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px;
}

.enterprise-grid-premium .executive-card-luxury {
  padding: 24px;
}

@media (max-width: 480px) {
  .enterprise-grid-premium {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  
  .enterprise-grid-premium .executive-card-luxury {
    padding: 20px;
  }
}

/* Buttons in Cards */
.btn {
  padding: 10px 16px;
  font-size: 0.85rem;
}

.button-grid-modern {
  flex-direction: column;
}

.button-grid-modern .btn {
  width: 100%;
  justify-content: center;
}

/* Luxury Stats Grid Cards */
.luxury-stats-grid .executive-card-luxury {
  padding: 24px;
}

.luxury-stats-grid .executive-card-luxury .luxury-icon {
  width: 56px;
  height: 56px;
}

.luxury-stats-grid .executive-card-luxury .luxury-title {
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

.luxury-stats-grid .executive-card-luxury .luxury-value {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

@media (max-width: 480px) {
  .luxury-stats-grid .executive-card-luxury {
    padding: 20px;
  }
  
  .luxury-stats-grid .executive-card-luxury .luxury-icon {
    width: 48px;
    height: 48px;
  }
}

/* === 📱 FORMS.CSS MOBILE STYLES === */
/* Стили перенесены из forms.css для соблюдения архитектуры */

/* Small Mobile devices (up to 480px) */
.form-block {
  padding: 15px 12px;
  margin: 8px auto;
  border-radius: var(--radius-sm);
}


.form-block input:not([type="radio"]):not([type="checkbox"]),
.form-block textarea,
input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  min-height: 44px; /* Touch-friendly minimum */
  padding: 10px 14px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

.form-block select,
select.form-control {
  min-height: 44px !important;
  height: 44px !important;
  padding: 10px 36px 10px 14px !important;
  font-size: 16px !important; /* Предотвращает зум на iOS */
  border-radius: var(--radius-sm);
}

.form-block textarea {
  min-height: 100px;
  padding: 12px 14px;
}

.form-group {
  margin-bottom: 18px;
}

.modal .form-input {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.verification-input {
  width: 40px;
  height: 50px;
  font-size: 18px;
}

@media (max-width: 767px) {
  .input-with-icon input {
    padding-left: 42px !important;
    padding-right: 42px !important;
  }

  /* === БАЗОВОЕ ПОЗИЦИОНИРОВАНИЕ ИКОНОК (когда нет ошибки) === */
  .input-with-icon i:not(.toggle-password),
  .input-with-icon input:focus ~ i:not(.toggle-password),
  .input-with-icon:focus-within i:not(.toggle-password) {
    position: absolute !important;
    left: 12px !important;
    top: calc(50% - 10px) !important;
    transform: translateY(-50%) !important;
    font-size: 1rem !important;
    width: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
  }

  /* === ПОЗИЦИОНИРОВАНИЕ ИКОНОК ПРИ НАЛИЧИИ ОШИБКИ (20px выше) === */
  .input-with-icon:has(.field-error) i:not(.toggle-password),
  .input-with-icon .field-error ~ i:not(.toggle-password),
  .input-with-icon input.field-error ~ i:not(.toggle-password) {
    position: absolute !important;
    left: 12px !important;
    top: calc(50% - 20px) !important;
    transform: translateY(-50%) !important;
    font-size: 1rem !important;
    width: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
  }

  .input-with-icon .toggle-password {
    right: 14px !important;
    font-size: 0.9rem !important;
    pointer-events: auto !important;
    display: flex !important;
    visibility: visible !important;
    z-index: 15 !important;
    cursor: pointer !important;
  }
}

/* Form Row */
.form-row {
  grid-template-columns: 1fr;
}

.settings-form {
  padding: 20px;
}

/* Select элементы на мобильных устройствах */
select:not(.country-code-prefix),
select.form-control:not(.country-code-prefix),
.form-block select:not(.country-code-prefix),
.form-section select:not(.country-code-prefix),
.form-group select:not(.country-code-prefix) {
  font-size: 16px !important; /* Предотвращает зум на iOS */
  min-height: 44px !important;
  height: 44px !important;
  padding: 10px 36px 10px 14px !important;
}

select:not(.country-code-prefix) option {
  font-size: 14px !important;
  padding: 10px 12px !important;
}

.phone-input-with-prefix select,
.phone-input-with-prefix .country-code-prefix {
  /* Используют свои стили */
}

@media (max-width: 480px) {
  .settings-form {
    padding: 15px;
  }
  
  .form-control:hover {
    border-color: var(--color-primary);
  }
  
  .verify-device-box {
    margin: 16px;
    padding: 24px 16px;
  }
  
  .input-group {
    gap: 8px;
  }
  
  .verification-input {
    width: 40px;
    height: 48px;
    font-size: 18px;
  }
  
  .status-toggle-label,
  .company-active-toggle-label,
  .form-group label:has(input[type="checkbox"][name*="active"]),
  .form-group label:has(input[type="checkbox"][name*="status"]) {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
  }
  
  .toggle-label-text {
    font-size: 14px;
  }
}

/* Validation Message */
.validation-message {
  font-size: 11px;
  padding: 4px 6px;
}

/* Date Range Container */
.date-range-container {
  grid-template-columns: 1fr;
}

.weekday-grid {
  grid-template-columns: repeat(2, 1fr);
}

.time-inputs-single {
  grid-template-columns: 1fr;
}

.day-time-item {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.day-time-label {
  min-width: auto;
  justify-content: center;
}

.day-time-inputs {
  flex-direction: column;
}

/* === EXECUTIVE FORM CONTAINER MOBILE ADJUSTMENTS === */
/* Responsive adjustments for OTP block */
@media (max-width: 768px) {
  .executive-form-container {
    max-width: 100%;
    margin: 24px auto;
    padding: 0 16px;
  }

  .executive-form-container .executive-card-luxury {
    padding: 32px 24px;
    border-radius: 20px;
  }

  /* 
   * Мобильная адаптация с расчетом:
   * - Ширина экрана: ~375px (стандартный мобильный)
   * - Padding контейнера: 16px * 2 = 32px
   * - Рабочая ширина: 375px - 32px = 343px
   * - Padding контейнера ячеек: 8px * 2 = 16px
   * - Рабочая ширина для ячеек: 343px - 16px = 327px
   * - Gap между ячейками: 8px
   * - Количество промежутков: 5
   * - Ширина для ячеек: 327px - (5 * 8px) = 327px - 40px = 287px
   * - Ширина одной ячейки: 287px / 6 = 47.83px → округляем до 48px
   * - Высота ячейки: 48px * 1.1 = 52.8px → округляем до 52px
   * - Margin ячеек: 4px * 2 = 8px
   */
  .executive-form-container .otp-input-container {
    gap: 8px;
    padding: 8px;
    max-width: 100%;
  }

  .executive-form-container .otp-digit {
    width: 48px !important;
    height: 52px !important;
    min-width: 48px !important;
    min-height: 52px !important;
    max-width: 48px !important;
    max-height: 52px !important;
    font-size: 1.5rem !important;
    margin: 0 4px !important;
  }

  /* Legacy mobile styles */
  .executive-form-container #otp:not(.otp-digit),
  .executive-form-container input[name="otp"]:not(.otp-digit),
  .executive-form-container #otp.luxury-form-input:not(.otp-digit),
  .executive-form-container input[name="otp"].luxury-form-input:not(.otp-digit) {
    font-size: 1.25rem !important;
    padding: 18px 20px !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
  }

  .executive-form-container #otp-form.error-shake {
    animation-duration: 0.3s;
  }
  
  .executive-form-container #otp-form.success {
    animation-duration: 0.4s;
  }
  
  .executive-form-container .otp-clear-btn {
    right: -25px;
    font-size: 14px;
  }
  
  .executive-form-container .otp-timer {
    font-size: 12px;
  }
  
  .executive-form-container .otp-attempts {
    font-size: 11px;
  }

/* === 📱 JAVASCRIPT CHECK DASHBOARD - MOBILE STYLES (≤ 767px) === */

.super-admin-dashboard {
    padding: 10px;
}

.hero-section-modern {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.hero-stats {
    margin-top: 20px;
    flex-direction: column;
    gap: 15px;
}

.hero-stat {
    margin: 5px;
}

.stat-number {
    font-size: 2em;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1em;
}

.dashboard-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-section {
    border-radius: 8px;
    padding: 15px;
}

.section-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.section-actions {
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.btn {
    padding: 10px 14px;
    font-size: 13px;
    gap: 6px;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 11px;
}

.stats-grid-modern {
    grid-template-columns: 1fr;
    gap: 15px;
}

.stat-card {
    border-radius: 10px;
    padding: 20px;
}

.stat-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.stat-content h3 {
    font-size: 1.5em;
}

.stat-content p {
    font-size: 1em;
}

.js-files-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.js-file-card {
    border-radius: 6px;
    padding: 12px;
}

.js-file-header i {
    font-size: 1.3em;
    margin-right: 8px;
}

.js-file-size {
    padding: 2px 6px;
    font-size: 11px;
}

.js-file-content p {
    font-size: 13px;
}

.js-file-actions {
    gap: 4px;
    margin-top: 8px;
}

.js-tools-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.js-tool-card {
    border-radius: 6px;
    padding: 12px;
}

.tool-header i {
    font-size: 1.1em;
    margin-right: 8px;
}

.tool-content p {
    margin: 0 0 12px 0;
    font-size: 13px;
}

.js-errors-list {
    max-height: 300px;
}

.js-error-item {
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
}

.error-time {
    font-size: 11px;
}

.error-type {
    padding: 2px 6px;
    font-size: 11px;
}

.error-message {
    font-size: 13px;
}

.error-location {
    font-size: 11px;
}

.error-stack {
    border-radius: 4px;
    padding: 8px;
    font-size: 0.75em;
    max-height: 150px;
}

.no-data {
    padding: 30px 20px;
}

.no-data i {
    font-size: 2.5em;
    margin-bottom: 12px;
}

.debug-info {
    border-radius: 6px;
    padding: 12px;
    margin: 15px 0;
    font-size: 0.85em;
}

/* ОПТИМИЗАЦИЯ ДЛЯ МОБИЛЬНЫХ (≤767px) */
@media (max-width: 767px) {
  /* КРИТИЧНО: Обеспечиваем центрирование модальных окон на мобильных */
  .modal {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .modal-dialog,
  .modal-dialog.modal-sm,
  .modal-dialog.modal-lg,
  .modal-dialog.modal-xl {
    max-width: 95vw !important; /* Почти на всю ширину экрана */
    min-width: auto !important; /* Без минимальной ширины */
    margin: 10px auto !important; /* Небольшие отступы по бокам */
    align-self: center !important; /* Вертикальное центрирование */
  }
  
  .modal-content {
    width: 95%;
    max-width: 100%;
    margin: 10% auto;
    border-radius: 12px !important;
    min-width: 280px;
  }

  .modal-header {
    padding: 5px !important;
    margin: 0 !important;
    min-height: auto !important;
    color: #ffffff !important; /* Устанавливаем белый цвет для всего header */
  }
  
  /* Все элементы внутри modal-header наследуют белый цвет */
  .modal-header * {
    color: #ffffff !important;
  }
  
  /* КРИТИЧНО: Переопределяем цвет для кнопки закрытия - синий X на белом фоне */
  /* Используем максимальную специфичность для гарантированного переопределения */
  .modal .modal-dialog .modal-content .modal-header .btn-close,
  .modal.fade .modal-dialog .modal-content .modal-header .btn-close,
  .modal.active .modal-dialog .modal-content .modal-header .btn-close,
  .modal.show .modal-dialog .modal-content .modal-header .btn-close,
  .modal-header .btn-close,
  .modal-header * .btn-close,
  .modal-header button.btn-close,
  button.modal-header .btn-close {
    position: absolute !important; /* Абсолютное позиционирование */
    top: 0.5rem !important; /* Отступ сверху */
    right: 0.5rem !important; /* Отступ справа - в самом правом верхнем углу */
    margin: 0 !important; /* Убираем margin */
    color: #0c3c78 !important; /* Синий цвет X - как у кнопок */
    -webkit-text-fill-color: #0c3c78 !important; /* Синий цвет X для WebKit */
    -webkit-background-clip: unset !important; /* Убираем градиентный фон */
    background-clip: unset !important; /* Убираем градиентный фон */
    background: #ffffff !important; /* Белый круглый фон */
    border-radius: 50% !important; /* Круглый фон */
    filter: none !important; /* Убираем любые фильтры */
    opacity: 1 !important;
    font-weight: 700 !important; /* Жирный шрифт для видимости */
    z-index: 10 !important; /* Поверх других элементов */
  }
  
  .modal .modal-dialog .modal-content .modal-header .btn-close:hover,
  .modal-header .btn-close:hover {
    color: #0c3c78 !important; /* Синий цвет X - как у кнопок */
    -webkit-text-fill-color: #0c3c78 !important; /* Синий цвет X для WebKit */
    background: #f8f9fa !important; /* Светло-серый фон при наведении */
    opacity: 1 !important;
    font-weight: 700 !important; /* Жирный шрифт для видимости */
  }

  .modal-header h3 {
    font-size: 1.1em;
    padding: 5px !important;
    margin: 0 !important;
  }

  .close {
    font-size: 24px;
  }

  .modal-body {
    padding: 5px !important;
    margin: 0 !important;
  }
  
  .modal-footer {
    padding: 5px !important;
    margin: 0 !important;
  }
  
  /* Внутренние отступы 5px для элементов внутри модальных окон */
  .modal-header > *,
  .modal-body > *,
  .modal-footer > * {
    padding: 5px !important;
    margin: 0 !important;
  }
  
  /* КРИТИЧНО: Переопределение typography.css для белого текста в заголовках */
  .modal-header .modal-title {
    padding: 5px !important;
    margin: 0 !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    background: none !important;
    color: #ffffff !important;
  }
  
  .modal-header .modal-title i,
  .modal-header i {
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
  }
  
  .modal-header .modal-title::before {
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    background: none !important;
  }
  
  /* Внутренние отступы 5px для форм и элементов */
  .modal-body .form-group {
    margin-bottom: 0 !important;
    padding: 5px !important;
  }
  .modal-body .alert {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 5px !important;
  }
  .modal-body .text-center {
    padding: 5px !important;
  }
  .modal-body table {
    margin-bottom: 0 !important;
  }
  .modal-body table thead th {
    padding: 5px !important;
  }
  .modal-body table tbody td {
    padding: 5px !important;
  }
  .modal-body p,
  .modal-body div,
  .modal-body form > * {
    padding: 5px !important;
    margin: 0 !important;
  }
  .modal-body .mb-3 {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding: 5px !important;
  }
  .modal-body p {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding: 5px !important;
  }
  .modal-body ul, .modal-body ol {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-left: 1.5rem;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }
  .modal-footer button {
    margin: 0 !important;
    padding: 5px 10px !important;
  }
}

.console-output {
    padding: 12px;
    max-height: 250px;
    font-size: 0.85em;
}

.console-input {
    gap: 8px;
}

.console-input input {
    padding: 10px;
    font-size: 14px;
}

.dashboard-footer {
    padding: 15px;
    border-radius: 8px;
}

.footer-info p {
    font-size: 13px;
    margin: 3px 0;
}

.js-file-modified {
    font-size: 11px;
}

.js-file-path {
    font-size: 11px;
}

  .executive-form-container .executive-form-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* Status Toggle Labels */
.status-toggle-label,
.company-active-toggle-label,
.form-group label:has(input[type="checkbox"][name*="active"]),
.form-group label:has(input[type="checkbox"][name*="status"]) {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
}

.status-toggle-label .luxury-toggle-container,
.company-active-toggle-label .luxury-toggle-container,
.form-group label:has(input[type="checkbox"][name*="active"]) .luxury-toggle-container,
.form-group label:has(input[type="checkbox"][name*="status"]) .luxury-toggle-container {
  width: 80px;
  height: 32px;
}

/* Touch targets для всех интерактивных элементов */
.form-block input[type="radio"],
.form-block input[type="checkbox"] {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
}

/* === 📐 АДАПТИВНАЯ ШИРИНА БЛОКА ДОБАВЛЕНИЯ КУРСА - МОБИЛЬНЫЙ (< 768px) === */
/* Мобильный: 100% ширины с padding 16px с каждой стороны */
@media (max-width: 767px) {
  .course-add-form-container {
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
    margin: 0 auto;
  }

  /* ============================================
     PRIVACY POLICY - MOBILE РАЗМЕРЫ (≤767px)
     ============================================ */
  
  main.privacy-policy-container {
    max-width: 100%;
    padding: 30px 20px;
    min-height: calc(100vh - 200px);
  }
  
  main.privacy-policy-container .privacy-policy-header {
    margin-bottom: 35px;
    padding-bottom: 20px;
  }
  
  main.privacy-policy-container .privacy-policy-header h1 {
    font-size: 1.9em;
    margin-bottom: 15px;
    line-height: 1.3;
  }
  
  main.privacy-policy-container .privacy-policy-header .last-updated {
    font-size: 0.9em;
    margin-top: 10px;
  }
  
  main.privacy-policy-container .privacy-section {
    margin-bottom: 30px;
    padding: 25px 20px;
  }
  
  main.privacy-policy-container .privacy-section h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left-width: 4px;
  }
  
  main.privacy-policy-container .privacy-section h3 {
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 15px;
  }
  
  main.privacy-policy-container .privacy-section h4 {
    font-size: 1.15em;
    margin-top: 18px;
    margin-bottom: 12px;
  }
  
  main.privacy-policy-container .privacy-section ul {
    margin-left: 20px;
    margin-bottom: 20px;
    padding-left: 8px;
  }
  
  main.privacy-policy-container .privacy-section ul li {
    margin-bottom: 10px;
    padding-left: 5px;
    line-height: 1.65;
  }
  
  main.privacy-policy-container .privacy-section ol {
    margin-left: 20px;
    margin-bottom: 20px;
    padding-left: 8px;
  }
  
  main.privacy-policy-container .privacy-section ol li {
    margin-bottom: 10px;
    padding-left: 5px;
    line-height: 1.65;
  }
  
  main.privacy-policy-container .privacy-section p {
    margin-bottom: 18px;
    font-size: 1em;
    text-align: left;
    line-height: 1.75;
  }
  
  main.privacy-policy-container .back-to-home {
    margin-top: 50px;
    padding-top: 25px;
  }
  
  main.privacy-policy-container .back-to-home a {
    padding: 12px 28px;
    font-size: 1em;
    min-height: 44px; /* Touch-friendly */
  }
  
  main.privacy-policy-container .back-to-home a i {
    font-size: 1.1em;
  }
}

/* Маленькие мобильные устройства (320px - 567px) */
@media (max-width: 567px) {
  main.privacy-policy-container {
    padding: 25px 15px;
  }
  
  main.privacy-policy-container .privacy-policy-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
  }
  
  main.privacy-policy-container .privacy-policy-header h1 {
    font-size: 1.6em;
    margin-bottom: 10px;
  }
  
  main.privacy-policy-container .privacy-policy-header .last-updated {
    font-size: 0.85em;
  }
  
  main.privacy-policy-container .privacy-section {
    margin-bottom: 25px;
    padding: 20px 15px;
    border-radius: var(--radius-sm, 0.375rem);
  }
  
  main.privacy-policy-container .privacy-section h2 {
    font-size: 1.35em;
    margin-bottom: 18px;
    padding-left: 12px;
    border-left-width: 3px;
  }
  
  main.privacy-policy-container .privacy-section h3 {
    font-size: 1.2em;
    margin-top: 18px;
    margin-bottom: 12px;
  }
  
  main.privacy-policy-container .privacy-section h4 {
    font-size: 1.1em;
    margin-top: 15px;
    margin-bottom: 10px;
  }
  
  main.privacy-policy-container .privacy-section p {
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.7;
  }
  
  main.privacy-policy-container .privacy-section ul {
    margin-left: 18px;
    margin-bottom: 18px;
    padding-left: 5px;
  }
  
  main.privacy-policy-container .privacy-section ul li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 0.95em;
  }
  
  main.privacy-policy-container .privacy-section ol {
    margin-left: 18px;
    margin-bottom: 18px;
    padding-left: 5px;
  }
  
  main.privacy-policy-container .privacy-section ol li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 0.95em;
  }
  
  main.privacy-policy-container .back-to-home {
    margin-top: 40px;
    padding-top: 20px;
  }
  
  main.privacy-policy-container .back-to-home a {
    padding: 11px 25px;
    font-size: 0.95em;
    width: 100%;
    max-width: 280px;
    justify-content: center;
    min-height: 44px; /* Touch-friendly */
  }
}

/* Очень маленькие устройства (до 320px) */
@media (max-width: 319px) {
  main.privacy-policy-container {
    padding: 20px 12px;
  }
  
  main.privacy-policy-container .privacy-policy-header h1 {
    font-size: 1.4em;
  }
  
  main.privacy-policy-container .privacy-section {
    padding: 18px 12px;
  }
  
  main.privacy-policy-container .privacy-section h2 {
    font-size: 1.25em;
  }
  
  main.privacy-policy-container .privacy-section p {
    font-size: 0.9em;
  }
  
  main.privacy-policy-container .back-to-home a {
    padding: 10px 20px;
    font-size: 0.9em;
    min-height: 44px; /* Touch-friendly */
  }
  
  /* === APPLICATION MODAL - MOBILE === */
  .application-modal-content {
    min-width: 90%;
    max-width: 95%;
    padding: 16px;
    max-height: 85%;
  }
  
  .application-modal-header {
    margin-bottom: 16px;
  }
  
  .application-modal-header h3 {
    font-size: 1.2rem;
  }
  
  .application-modal-close {
    font-size: 20px;
    min-width: 44px;
    min-height: 44px;
  }
  
  .application-modal-form-group {
    margin-bottom: 12px;
  }
  
  .application-modal-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .application-modal-actions button {
    width: 100%;
    min-height: 44px;
  }
  
  /* === EXECUTIVE PAGINATION - MOBILE === */
  .executive-pagination {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }
  
  .executive-pagination-info {
    padding: 8px 0;
    text-align: center;
    font-size: 0.9rem;
  }
  
  .executive-pagination .btn-executive-secondary {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  /* === phone-input-row === */
  .phone-input-row {
    flex-direction: column;
    gap: 8px;
  }

  .phone-input-row .country-select {
    flex: none;
    width: 100%;
    min-width: auto;
  }

  .phone-input-row .phone-input {
    flex: none;
    width: 100%;
    min-width: 200px;
  }

  /* === form-section === */
  .form-section .section-header h3 {
    font-size: 1.25rem;
    padding: 12px 16px;
    gap: 10px;
  }

  .form-section .section-header h3 i {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  /* === Departments responsive === */
  .button-checkbox-group {
    gap: 8px;
  }

  .toggle-dept-btn {
    padding: 10px 12px;
    font-size: 0.9rem;
    min-height: 40px;
    max-height: 40px;
  }

  .control-buttons {
    justify-content: center;
  }

  .control-buttons .btn-sm {
    height: 32px;
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .luxury-icon-with-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .status-badges-row {
    gap: 4px;
  }

  .status-badge-active,
  .status-badge-inactive,
  .status-badge-linked,
  .status-badge-own,
  .status-badge-not-linked,
  .status-badge-global {
    font-size: 9px;
    padding: 3px 6px;
  }
}

/* === Small mobile (≤480px) === */
@media (max-width: 480px) {
  .form-section .section-header h3 {
    font-size: 1.1rem;
    padding: 10px 14px;
    gap: 8px;
  }

  .form-section .section-header h3 i {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}

/* === components.css: отключение анимаций фона на мобильных === */
@media (max-width: 767px) {
  .bg-animated::before,
  .main-login::before,
  .main-welcome::before {
    animation: none !important;
  }

  .admin-container-modern::before {
    animation: none !important;
  }
}

/* === cards.css: feature-item overflow на мобильных === */
@media (max-width: 767px) {
  .feature-item {
    overflow: visible !important;
  }

  .feature-item h3,
  .feature-item p {
    overflow: visible !important;
    max-height: none !important;
  }
}

/* === SCHEDULE MODULE (из schedule.css) === */
.schedule-container {
  padding: 12px;
}

.schedule-header {
  padding: 20px;
}

.schedule-title {
  font-size: 1.8rem;
  margin-bottom: 0;
}

.schedule-header-top {
  margin-bottom: 0;
}

.mobile-menu-toggle {
  display: flex;
}

.schedule-controls {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 0 0 16px 16px;
  padding: 20px;
  margin: 0;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--color-border);
  border-top: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  z-index: 50;
}

.schedule-controls .welcome-button,
.schedule-controls .btn,
.schedule-controls a,
.schedule-controls button {
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  min-height: 48px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  border: 1px solid transparent !important;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent)) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.schedule-controls .welcome-button:hover,
.schedule-controls .btn:hover,
.schedule-controls a:hover,
.schedule-controls button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.schedule-controls .welcome-button.active {
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary)) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  border-color: var(--color-accent) !important;
}

.schedule-controls .welcome-button i,
.schedule-controls .btn i,
.schedule-controls a i,
.schedule-controls button i {
  margin-right: 8px !important;
  font-size: 0.9rem !important;
}

.schedule-controls select {
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  min-height: 48px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent)) !important;
  color: white !important;
  border: 1px solid transparent !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
}

.schedule-controls select:focus {
  outline: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.schedule-controls select option {
  background: white !important;
  color: var(--color-text-main) !important;
  padding: 8px !important;
}

.schedule-controls.mobile-menu-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.schedule-header {
  position: relative;
  overflow: visible;
}

@media (orientation: landscape) {
  .schedule-controls {
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) rgba(255,255,255,0.1);
  }

  .schedule-controls::-webkit-scrollbar {
    width: 4px;
  }

  .schedule-controls::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
  }

  .schedule-controls::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 2px;
  }

  .schedule-controls .welcome-button,
  .schedule-controls .btn,
  .schedule-controls a,
  .schedule-controls button,
  .schedule-controls select {
    padding: 10px 14px !important;
    min-height: 40px !important;
    font-size: 0.9rem !important;
  }

  .schedule-controls .btn,
  .event-btn {
    width: 100%;
    justify-content: center;
    padding: 16px 20px;
    font-size: 1rem;
  }

  .calendar-day {
    padding: 20px;
  }

  .event {
    padding: 16px;
  }

  .event-actions {
    flex-direction: column;
    gap: 10px;
  }

  .event-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .schedule-title {
    font-size: 1.3rem;
    line-height: 1.2;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
  }

  .schedule-controls {
    padding: 16px;
    gap: 6px;
  }

  .schedule-controls .welcome-button,
  .schedule-controls .btn,
  .schedule-controls a,
  .schedule-controls button {
    padding: 12px 14px !important;
    font-size: 0.9rem !important;
    min-height: 44px !important;
    border-radius: 10px !important;
  }

  .schedule-controls .welcome-button i,
  .schedule-controls .btn i,
  .schedule-controls a i,
  .schedule-controls button i {
    margin-right: 6px !important;
    font-size: 0.85rem !important;
  }

  .schedule-controls select {
    padding: 12px 14px !important;
    font-size: 0.9rem !important;
    min-height: 44px !important;
    border-radius: 10px !important;
    background-position: right 10px center !important;
    background-size: 14px !important;
  }

  .calendar-day {
    padding: 16px;
  }

  .event {
    padding: 14px;
  }

  .schedule-controls .btn,
  .event-btn {
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  .day-date {
    font-size: 1rem;
  }

  .event-title {
    font-size: 1rem;
  }

  .event-type-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
}

/* teams/company_director/schedule.php - modal mobile */
@media (max-width: 640px) {
  #schedule-admin-modal .modal-content,
  #schedule-view-modal .modal-content {
    width: 95%;
    margin: 10px;
  }
  #schedule-admin-modal .form-group {
    padding: 0 1rem;
  }
  #schedule-admin-modal .modal-header,
  #schedule-view-modal .modal-header {
    padding: 1rem;
  }
}

