/* Стили для админ-панели */

/* CSS Custom Properties для админки */
:root {
  /* Цвета админки - под стиль сайта */
  --admin-primary: #d4a574;
  --admin-primary-light: #e6c2a6;
  --admin-primary-dark: #c19660;
  --admin-sidebar-bg: #faf8f5;
  --admin-sidebar-text: #6d5a47;
  --admin-sidebar-active: #d4a574;
  
  /* Размеры - более компактные */
  --sidebar-width: 220px;
  --topbar-height: 60px;
  --admin-radius: 0.5rem;
  --admin-shadow: 0 2px 4px rgba(212, 165, 116, 0.1);
  
  /* Теплые цвета для элементов */
  --warm-50: #faf8f5;
  --warm-100: #f5f1ec;
  --warm-200: #ede5dd;
  --warm-300: #e0d4c7;
  --warm-700: #6d5a47;
  --warm-800: #524539;
  --warm-900: #3a322b;
}

/* Базовые стили админки */
body {
  background-color: var(--warm-100);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Боковая панель - светлая и теплая */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: var(--admin-sidebar-bg);
  color: var(--admin-sidebar-text);
  z-index: 100;
  transition: transform 0.3s ease-in-out;
  border-right: 1px solid var(--warm-200);
  box-shadow: var(--admin-shadow);
}

.sidebar-header {
  padding: 1.2rem;
  border-bottom: 1px solid var(--warm-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.sidebar-title a {
  color: var(--admin-primary);
  text-decoration: none;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--admin-sidebar-text);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
}

.sidebar-toggle:hover {
  background-color: var(--warm-200);
}

.sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: currentColor;
  margin: 4px 0;
  transition: all 0.3s;
}

.sidebar-nav {
  padding: 0.8rem 0;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin: 0.2rem 0;
}

.nav-item.nav-divider {
  margin-top: 1.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--warm-200);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  color: var(--admin-sidebar-text);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--admin-radius);
  margin: 0 0.8rem;
}

.nav-link:hover {
  background-color: var(--warm-200);
  color: var(--warm-800);
}

.nav-link.active {
  background-color: var(--admin-sidebar-active);
  color: #ffffff;
}

.nav-link svg {
  flex-shrink: 0;
}

/* Основной контент */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Верхняя панель */
.topbar {
  background-color: var(--warm-100);
  border-bottom: 1px solid #e2e8f0;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2rem;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
  background-color: #f1f5f9;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: #64748b;
  margin: 4px 0;
  transition: all 0.3s;
}

.topbar-title h1 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--warm-800);
  margin: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-actions .language-selector {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  margin-right: 0.5rem;
}

.topbar-actions .language-link {
  padding: 0.25rem 0.5rem;
  background-color: var(--warm-200);
  color: var(--warm-700);
  text-decoration: none;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.2s;
  border: 1px solid var(--warm-300);
}

.topbar-actions .language-link:hover {
  background-color: var(--admin-primary);
  color: var(--white);
  border-color: var(--admin-primary);
}

.topbar-actions .language-link.active {
  background-color: var(--admin-primary);
  color: var(--white);
  border-color: var(--admin-primary);
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.admin-username {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--warm-700);
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

/* Контент */
.content-wrapper {
  flex: 1;
  padding: 2rem;
  background-color: var(--warm-50);
}

/* Flash сообщения в админке */
.flash-messages {
  position: relative;
  margin-bottom: 2rem;
}

.flash-message {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--admin-radius);
  margin-bottom: 0.75rem;
  box-shadow: var(--admin-shadow);
}

.flash-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.flash-success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.flash-error {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.flash-warning {
  background-color: #fefce8;
  color: #ca8a04;
  border: 1px solid #fef3c7;
}

.flash-info {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
}

.flash-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.flash-close:hover {
  opacity: 1;
}

/* Кнопки админки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--admin-radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus {
  outline: 2px solid var(--admin-primary);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--admin-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--admin-primary-dark);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  border-color: #d1d5db;
  color: #374151;
}

.btn-outline:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.btn-ghost {
  background-color: transparent;
  color: #6b7280;
}

.btn-ghost:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #b91c1c;
  color: #ffffff;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Заголовки страниц */
.page-header {
  margin-bottom: 2rem;
}

.page-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-info h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.page-description {
  color: #64748b;
  margin: 0;
}

.page-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Дашборд */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background-color: var(--warm-100);
  padding: 1.5rem;
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease-out;
}

.stat-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-primary {
  background-color: #eff6ff;
  color: #2563eb;
}

.stat-icon-success {
  background-color: #f0fdf4;
  color: #16a34a;
}

.stat-icon-warning {
  background-color: #fffbeb;
  color: #d97706;
}

.stat-icon-danger {
  background-color: #fef2f2;
  color: #dc2626;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

.stat-label {
  color: #64748b;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Быстрые действия */
.quick-actions {
  margin-top: 1rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.5rem;
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.action-card {
  background-color: var(--warm-100);
  padding: 1.5rem;
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  opacity: 0;
  transform: translateY(20px);
}

.action-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease-out;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  color: inherit;
}

.action-icon {
  width: 3rem;
  height: 3rem;
  background-color: #f8fafc;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-primary);
  flex-shrink: 0;
}

.action-content {
  flex: 1;
}

.action-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
}

.action-description {
  color: #64748b;
  font-size: 0.875rem;
  margin: 0;
}

/* Таблицы */
.table-container {
  background-color: var(--warm-100);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--warm-200);
}

.data-table,
.products-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td,
.products-table th,
.products-table td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--warm-200);
}

.data-table th,
.products-table th {
  background-color: var(--warm-200);
  font-weight: 600;
  color: var(--warm-800);
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
}

.table-row {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease-out;
}

.table-row.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.table-row:hover {
  background-color: var(--warm-50);
}

.product-image-cell {
  display: flex;
  align-items: center;
}

.table-product-image {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 0.5rem;
}

.table-image-placeholder {
  width: 3rem;
  height: 3rem;
  background-color: #f1f5f9;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.product-name-cell {
  max-width: 200px;
}

.product-name {
  font-weight: 600;
  color: #1e293b;
  display: block;
  margin-bottom: 0.25rem;
}

.product-description-preview {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.category-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #eff6ff;
  color: #2563eb;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.price-cell {
  font-weight: 600;
  color: #059669;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-active {
  background-color: #dcfce7;
  color: #166534;
}

.status-inactive {
  background-color: #fef2f2;
  color: #dc2626;
}

.date-cell {
  color: #64748b;
  font-size: 0.875rem;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Формы */
.form-card {
  background-color: var(--warm-100);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}

.form-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.form-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.form-description {
  color: #64748b;
  margin: 0;
}

.product-form,
.category-form {
  padding: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.form-section {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease-out;
}

.form-section.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--warm-700);
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.form-label.required::after {
  content: ' *';
  color: #dc2626;
}

.form-input,
.form-select,
.form-textarea {
  width: 80%;
  padding: 0.6rem;
  border: 1px solid var(--warm-300);
  border-radius: var(--admin-radius);
  font-size: 0.85rem;
  transition: all 0.2s;
  background-color: var(--warm-100);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-help {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-checkbox {
  margin-top: 0.125rem;
}

.checkbox-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
}

.checkbox-text {
  font-weight: 500;
  color: #374151;
}

.checkbox-help {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Загрузка изображений */
.image-upload-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.current-image {
  position: relative;
  border-radius: var(--admin-radius);
  overflow: hidden;
  box-shadow: var(--admin-shadow);
}

.current-image-preview {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
}

.current-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: 1rem;
}

.current-image-label {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
}

.file-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: var(--admin-radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: var(--admin-primary);
  background-color: rgb(79 70 229 / 0.05);
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: #6b7280;
}

.file-upload-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.file-upload-primary {
  font-weight: 500;
  color: #374151;
}

.file-upload-secondary {
  font-size: 0.875rem;
  color: #6b7280;
}

.image-preview {
  position: relative;
  border-radius: var(--admin-radius);
  overflow: hidden;
  box-shadow: var(--admin-shadow);
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s ease-out;
}

.image-preview.animate-in {
  opacity: 1;
  transform: scale(1);
}

.image-preview img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
}

.image-preview-overlay {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.image-preview-label {
  background-color: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.remove-preview {
  background-color: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.remove-preview:hover {
  background-color: rgba(185, 28, 28, 0.9);
}

.form-actions {
  display: flex;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  justify-content: flex-end;
}

/* Навигация формы */
.form-navigation {
  margin-bottom: 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: #374151;
}

/* Фильтры */
.filters-section {
  background-color: var(--warm-100);
  padding: 1.5rem;
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  margin-bottom: 2rem;
}

.filters-form {
  display: flex;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 200px;
}

.filter-label {
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
}

.filter-input,
.filter-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: var(--admin-radius);
  font-size: 0.875rem;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
}

/* Пагинация */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--warm-100);
  padding: 1rem 1.5rem;
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--admin-primary);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--admin-radius);
  font-weight: 500;
  transition: background-color 0.2s;
}

.pagination-btn:hover {
  background-color: var(--admin-primary-dark);
  color: #ffffff;
}

.pagination-info {
  color: #64748b;
  font-size: 0.875rem;
  text-align: center;
}

/* Управление категориями */
.categories-management {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.categories-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2rem;
  align-items: start;
}

.add-category-section {
  position: sticky;
  top: 2rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background-color: var(--warm-100);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease-out;
}

.category-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.category-info {
  flex: 1;
}

.category-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.category-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-slug {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  color: #6b7280;
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  width: fit-content;
}

.category-count {
  font-size: 0.875rem;
  color: #059669;
  font-weight: 500;
}

.category-actions {
  display: flex;
  gap: 0.5rem;
}

.category-description {
  color: #64748b;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.category-products {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.category-products-header {
  margin-bottom: 0.75rem;
}

.category-products-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.category-products-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-product-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background-color: #f8fafc;
  border-radius: 0.5rem;
}

.product-mini-image {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-mini-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-mini-image svg {
  color: #9ca3af;
}

.product-mini-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.product-mini-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-mini-price {
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
  white-space: nowrap;
}

.category-products-more {
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
  padding: 0.5rem;
  font-style: italic;
}

/* Модальные окна админки */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-out;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-content {
  background-color: var(--warm-100);
  border-radius: var(--admin-radius);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  max-width: 500px;
  width: 90vw;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-out;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.text-danger {
  color: #dc2626;
  font-size: 0.875rem;
}

/* Пустое состояние */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background-color: var(--warm-100);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
}

.empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: #9ca3af;
}

.empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}

.empty-text {
  color: #6b7280;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Заголовки секций */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--admin-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.section-link:hover {
  color: var(--admin-primary-dark);
}

/* Адаптивность для админки */
@media (max-width: 1024px) {
  .categories-layout {
    grid-template-columns: 1fr;
  }
  
  .add-category-section {
    position: static;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .sidebar-toggle {
    display: flex;
  }
  
  .topbar-content {
    padding: 0 1rem;
  }
  
  .content-wrapper {
    padding: 0.8rem;
  }
  
  .page-header-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .action-cards {
    grid-template-columns: 1fr;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .filters-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    min-width: auto;
  }
  
  .filter-actions {
    justify-content: stretch;
  }
  
  .filter-actions .btn {
    flex: 1;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  /* Адаптивные таблицы для мобильных */
  .table-container {
    overflow-x: auto;
  }
  
  .data-table,
  .products-table {
    min-width: 600px;
  }
  
  .data-table th,
  .data-table td,
  .products-table th,
  .products-table td {
    padding: 0.6rem 0.4rem;
    font-size: 0.8rem;
  }
  
  .pagination {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .table-container {
    overflow-x: auto;
  }
  
  .data-table,
  .products-table {
    min-width: 600px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 95vw;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .product-name-cell {
    max-width: 150px;
  }
}
