/* ================================================
   FileBrowser Custom Styles 2025
   Современный почти белый дизайн с трендами 2025
   ================================================ */

:root {
  /* Цветовая палитра */
  --primary-white: #FEFEFE;
  --secondary-white: #F8F9FA;
  --accent-blue: #4F46E5;
  --accent-purple: #7C3AED;
  --accent-pink: #EC4899;
  --accent-green: #10B981;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6B7280;
  --border-light: #E5E7EB;
  --border-medium: #D1D5DB;
  
  /* Тени и эффекты */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Градиенты */
  --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%);
  --gradient-soft: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  
  /* Радиусы */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  
  /* Анимации */
  --animation-fast: 0.15s ease;
  --animation-normal: 0.3s ease;
  --animation-slow: 0.5s ease;
}

/* ================================================
   Глобальные стили
   ================================================ */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--primary-white);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================
   Хедер и навигация
   ================================================ */

.header {
  background: var(--primary-white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header__content {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 20px;
  transition: transform var(--animation-normal);
}

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

.logo__icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.logo__icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3));
  opacity: 0;
  transition: opacity var(--animation-normal);
}

.logo:hover .logo__icon::before {
  opacity: 1;
}

.logo__icon svg {
  width: 20px;
  height: 20px;
  fill: white;
  z-index: 1;
  position: relative;
}

/* ================================================
   Кнопки и элементы управления
   ================================================ */

.btn, 
button:not(.unstyled) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--animation-normal);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

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

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

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

.btn--secondary:hover {
  background: var(--primary-white);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn--ghost:hover {
  background: var(--secondary-white);
  color: var(--text-primary);
}

/* Ripple эффект для кнопок */
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

/* ================================================
   Поиск и фильтры
   ================================================ */

.search {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search__input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--secondary-white);
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--animation-normal);
}

.search__input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background: var(--primary-white);
}

.search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: color var(--animation-normal);
}

.search__input:focus + .search__icon {
  color: var(--accent-blue);
}

/* ================================================
   Сайдбар и навигация
   ================================================ */

.sidebar {
  background: var(--secondary-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: 120px;
}

.sidebar__section {
  margin-bottom: 32px;
}

.sidebar__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__item {
  margin-bottom: 4px;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--animation-normal);
  font-weight: 500;
  position: relative;
}

.nav__link:hover,
.nav__link--active {
  background: var(--primary-white);
  color: var(--accent-blue);
  transform: translateX(4px);
  box-shadow: var(--shadow-xs);
}

.nav__link--active::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 0 2px 2px 0;
}

.nav__icon {
  width: 20px;
  height: 20px;
  transition: transform var(--animation-normal);
}

.nav__link:hover .nav__icon {
  transform: scale(1.1);
}

/* ================================================
   Основной контент
   ================================================ */

.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  min-height: calc(100vh - 120px);
}

.content {
  background: var(--primary-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.content__header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-light);
  background: var(--secondary-white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb__link {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--animation-normal);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
}

.breadcrumb__link:hover {
  color: var(--accent-purple);
  background: rgba(79, 70, 229, 0.1);
}

.breadcrumb__separator {
  color: var(--text-muted);
  font-weight: 300;
}

/* ================================================
   Переключатель видов
   ================================================ */

.view-toggle {
  display: flex;
  background: var(--secondary-white);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--border-light);
}

.view-toggle__btn {
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--animation-normal);
  color: var(--text-secondary);
}

.view-toggle__btn--active,
.view-toggle__btn:hover {
  background: var(--primary-white);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* ================================================
   Список файлов - сетка
   ================================================ */

.files {
  padding: 32px;
}

.files__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.file-item {
  background: var(--secondary-white);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--animation-normal);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.file-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity var(--animation-normal);
  z-index: 0;
}

.file-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-blue);
}

.file-item:hover::before {
  opacity: 1;
}

.file-item > * {
  position: relative;
  z-index: 1;
}

.file-item__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--animation-normal);
}

.file-item:hover .file-item__icon {
  transform: scale(1.05) rotate(2deg);
}

.file-item__icon svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.file-item__name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.4;
}

.file-item__info {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  justify-content: center;
  gap: 8px;
}

.file-item__size,
.file-item__date {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Типы файлов - цветовое кодирование */
.file-item--folder .file-item__icon {
  background: linear-gradient(135deg, #10B981, #065F46);
}

.file-item--document .file-item__icon {
  background: linear-gradient(135deg, #3B82F6, #1E40AF);
}

.file-item--image .file-item__icon {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.file-item--video .file-item__icon {
  background: linear-gradient(135deg, #EC4899, #BE185D);
}

.file-item--audio .file-item__icon {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
}

.file-item--archive .file-item__icon {
  background: linear-gradient(135deg, #6B7280, #374151);
}

.file-item--code .file-item__icon {
  background: linear-gradient(135deg, #06B6D4, #0891B2);
}

/* ================================================
   Список файлов - таблица
   ================================================ */

.files__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.files__table th {
  text-align: left;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-light);
  background: var(--secondary-white);
  position: sticky;
  top: 0;
  z-index: 10;
}

.files__table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--animation-normal);
  vertical-align: middle;
}

.files__table tr:hover td {
  background: var(--secondary-white);
}

.files__table tr:active td {
  background: rgba(79, 70, 229, 0.05);
}

.file-table-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-table-item__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-table-item__icon svg {
  width: 16px;
  height: 16px;
  fill: white;
}

.file-table-item__name {
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
}

/* ================================================
   Статистика и индикаторы
   ================================================ */

.storage-info {
  padding: 20px;
  background: var(--gradient-soft);
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-light);
}

.storage-info__title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.storage-info__used {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.storage-info__total {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.progress-bar {
  background: var(--border-light);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-bar__fill {
  background: var(--gradient-primary);
  height: 100%;
  border-radius: 3px;
  transition: width var(--animation-slow);
  position: relative;
}

.progress-bar__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ================================================
   Модальные окна и оверлеи
   ================================================ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--animation-normal);
}

.modal--active {
  opacity: 1;
  visibility: visible;
}

.modal__content {
  background: var(--primary-white);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9) translateY(20px);
  transition: transform var(--animation-normal);
}

.modal--active .modal__content {
  transform: scale(1) translateY(0);
}

/* ================================================
   Дропзона для загрузки файлов
   ================================================ */

.dropzone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  transition: all var(--animation-normal);
  background: var(--secondary-white);
  margin: 24px 0;
}

.dropzone--active {
  border-color: var(--accent-blue);
  background: rgba(79, 70, 229, 0.05);
  transform: scale(1.02);
}

.dropzone__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--gradient-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone__text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.dropzone__subtext {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ================================================
   Контекстное меню
   ================================================ */

.context-menu {
  position: absolute;
  background: var(--primary-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  min-width: 200px;
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(-10px);
  transition: all var(--animation-fast);
}

.context-menu--active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.context-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color var(--animation-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.context-menu__item:hover {
  background: var(--secondary-white);
}

.context-menu__item--danger {
  color: #EF4444;
}

.context-menu__item--danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.context-menu__separator {
  height: 1px;
  background: var(--border-light);
  margin: 8px 0;
}

/* ================================================
   Уведомления и тосты
   ================================================ */

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: var(--primary-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  max-width: 400px;
  z-index: 2500;
  transform: translateX(100%);
  transition: transform var(--animation-normal);
}

.toast--active {
  transform: translateX(0);
}

.toast--success {
  border-left: 4px solid var(--accent-green);
}

.toast--error {
  border-left: 4px solid #EF4444;
}

.toast--warning {
  border-left: 4px solid #F59E0B;
}

.toast__content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast__message {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.toast__close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  transition: all var(--animation-fast);
}

.toast__close:hover {
  background: var(--secondary-white);
  color: var(--text-primary);
}

/* ================================================
   Меню действий для файлов
   ================================================ */

.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-white);
  border-top: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 16px 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  transform: translateY(100%);
  transition: transform var(--animation-normal);
}

.action-bar--active {
  transform: translateY(0);
}

.action-bar__info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.action-bar__count {
  background: var(--gradient-primary);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.action-bar__buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-bar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--secondary-white);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--animation-normal);
  font-size: 16px;
}

.action-bar__btn:hover,
.action-bar__btn:focus {
  background: var(--border-light);
  transform: scale(1.05);
}

.action-bar__btn--primary {
  background: var(--gradient-primary);
  color: white;
}

.action-bar__btn--primary:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.action-bar__btn--danger {
  background: #FEE2E2;
  color: #DC2626;
}

.action-bar__btn--danger:hover {
  background: #FECACA;
}

/* Меню действий в хедере (для десктопа) */
.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.selection-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--accent-blue);
  font-weight: 500;
}

.selection-info__count {
  background: var(--accent-blue);
  color: white;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  min-width: 20px;
  text-align: center;
}

/* ================================================
   Адаптивность для меню действий
   ================================================ */

@media (max-width: 768px) {
  /* Скрываем хедер-экшны на мобильных */
  .header-actions .selection-info {
    display: none;
  }
  
  /* Показываем нижнее меню действий */
  .action-bar {
    display: flex;
  }
  
  /* Адаптируем кнопки для мобильных */
  .action-bar__btn {
    min-width: 44px;
    height: 44px;
    touch-action: manipulation;
  }
  
  /* Увеличиваем область нажатия */
  .action-bar__btn::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
  }
  
  /* Компактная версия для очень маленьких экранов */
  @media (max-width: 480px) {
    .action-bar {
      padding: 12px 16px;
    }
    
    .action-bar__info {
      font-size: 13px;
    }
    
    .action-bar__btn {
      width: 40px;
      height: 40px;
      font-size: 14px;
    }
    
    .action-bar__buttons {
      gap: 6px;
    }
  }
}

@media (min-width: 769px) {
  /* Скрываем нижнее меню на десктопе */
  .action-bar {
    display: none;
  }
  
  /* Показываем хедер-экшны на десктопе */
  .header-actions .selection-info {
    display: flex;
  }
}

/* ================================================
   Улучшения для выделения файлов
   ================================================ */

.file-item--selected {
  background: rgba(79, 70, 229, 0.1);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.file-item--selected::before {
  opacity: 1;
}

.file-item--selected .file-item__icon {
  transform: scale(1.05);
}

/* Чекбокс для выделения */
.file-item__checkbox {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  background: var(--primary-white);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all var(--animation-normal);
  z-index: 2;
}

.file-item:hover .file-item__checkbox,
.file-item--selected .file-item__checkbox {
  opacity: 1;
}

.file-item--selected .file-item__checkbox {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

.file-item__checkbox::after {
  content: '✓';
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transition: opacity var(--animation-fast);
}

.file-item--selected .file-item__checkbox::after {
  opacity: 1;
}

/* Множественное выделение в таблице */
.files__table tr.selected {
  background: rgba(79, 70, 229, 0.1);
  border-left: 3px solid var(--accent-blue);
}

.files__table tr.selected td {
  background: transparent;
}

/* Анимация появления меню действий */
@keyframes slideUpFromBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.action-bar--active {
  animation: slideUpFromBottom 0.3s ease-out;
}

/* ================================================
   Адаптивность
   ================================================ */

@media (max-width: 1024px) {
  .main {
    grid-template-columns: 250px 1fr;
    gap: 24px;
  }
  
  .files__grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .main {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  
  .sidebar {
    position: static;
    margin-bottom: 16px;
  }
  
  .header__content {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .search {
    max-width: none;
  }
  
  .content__header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .files__grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  
  .files {
    padding: 20px;
  }
  
  .file-item {
    padding: 16px;
  }
  
  .files__table {
    font-size: 12px;
  }
  
  .files__table th,
  .files__table td {
    padding: 12px 8px;
  }
}

@media (max-width: 480px) {
  .header__content {
    padding: 12px 16px;
  }
  
  .main {
    padding: 12px;
  }
  
  .files {
    padding: 16px;
  }
  
  .files__grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }
  
  .file-item {
    padding: 12px;
  }
  
  .file-item__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
  }
  
  .file-item__icon svg {
    width: 20px;
    height: 20px;
  }
  
  .sidebar {
    padding: 16px;
  }
  
  .content__header {
    padding: 16px 20px;
  }
}

/* ================================================
   Микроанимации и эффекты
   ================================================ */

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

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

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

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Задержки анимации для каскадного эффекта */
.file-item:nth-child(1) { animation-delay: 0ms; }
.file-item:nth-child(2) { animation-delay: 100ms; }
.file-item:nth-child(3) { animation-delay: 200ms; }
.file-item:nth-child(4) { animation-delay: 300ms; }
.file-item:nth-child(5) { animation-delay: 400ms; }
.file-item:nth-child(6) { animation-delay: 500ms; }

/* ================================================
   Органические формы для фона
   ================================================ */

.background-blob {
  position: fixed;
  border-radius: 50% 40% 60% 30%;
  background: var(--gradient-soft);
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.background-blob--1 {
  top: 10%;
  right: 10%;
  width: 200px;
  height: 200px;
  animation-delay: 0s;
}

.background-blob--2 {
  bottom: 20%;
  left: 15%;
  width: 150px;
  height: 150px;
  animation-delay: -4s;
}

.background-blob--3 {
  top: 60%;
  right: 30%;
  width: 100px;
  height: 100px;
  animation-delay: -2s;
}

/* ================================================
   Скролл-бары
   ================================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--secondary-white);
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ================================================
   Утилитарные классы
   ================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
  animation: pulse 1.5s infinite;
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.bg-primary { background: var(--primary-white); }
.bg-secondary { background: var(--secondary-white); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
