/* ============================================================
   Базовые сбросы и типографика
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f9f9f9; /* Светло-серый фон как в index.css */
  color: #444; /* Тёмно-серый текст как в index.css */
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: #444;
  text-align: left;
}
a:hover {
  text-decoration: none;
  color: #b9080e; /* Акцентный красный при наведении */
}

/* ============================================================
   Фоновый слой (убираем тёмный градиент, делаем светлым)
   ============================================================ */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background: #f9f9f9; /* Просто светло-серый фон */
}
.bg-layer::after {
  display: none; /* Убираем шум, он не нужен на светлом фоне */
}

/* ============================================================
   Анимации
   ============================================================ */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(185, 8, 14, 0.4); } /* Красный акцент */
  70% { box-shadow: 0 0 0 10px rgba(185, 8, 14, 0); }
  100% { box-shadow: 0 0 0 0 rgba(185, 8, 14, 0); }
}

/* ============================================================
   Макет: сайдбар + контент
   ============================================================ */
.app-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100vh;
}

/* --- Сайдбар --- */
.app-sidebar {
  flex: 0 0 340px;
  max-width: 340px;
  background: #ffffff; /* Белый сайдбар */
  backdrop-filter: blur(8px);
  padding: 2.5rem 1.8rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  border-right: 1px solid #e7e7e7; /* Светлая граница */
  overflow-y: auto;
}

/* Стилизация скроллбара */
.app-sidebar::-webkit-scrollbar {
  width: 4px;
}
.app-sidebar::-webkit-scrollbar-track {
  background: #f3f0ea;
}
.app-sidebar::-webkit-scrollbar-thumb {
  background: #c9bb9f;
  border-radius: 2px;
}

/* Логотип */
.logo-area {
  margin-bottom: 2.5rem;
  text-align: center;
}
.logo-area h1 {
  color: #444; /* Тёмно-серый как в index.css */
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: 700;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.logo-area .wheel {
  display: inline-block;
  position: relative;
  font-size: 1.8rem;
  color: #b9080e; /* Акцентный красный */
  transition: all 0.3s ease;
}
.logo-area .wheel:hover {
  transform: scale(1.1);
  color: #c9bb9f; /* Бежевый при наведении */
}
.logo-area .wheel::after {
  content: '';
  display: inline-block;
  width: 32px;
  height: 32px;
  background-image: url("/public/constructor/img/car-wheel.png");
  background-size: contain;
  background-repeat: no-repeat;
  animation: spin 12s linear infinite;
  vertical-align: middle;
}
.logo-area .subtitle {
  color: #9e0b10; /* Серый как в index.css */
  font-size: 1.9rem;
  /* letter-spacing: 3px;
  text-transform: uppercase; */
  /* margin-top: 0.5rem; */
  /* font-weight: 300; */
  font-weight: bold;
  /* font-family: "Merriweather", serif; */

}

/* ============================================================
   Форма поиска в сайдбаре
   ============================================================ */
.search-sidebar {
  flex: 1;
}

.search-sidebar .search-title {
  color: #777777;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid #e7e7e7;
  padding-bottom: 0.5rem;
  font-weight: 600;
}

/* Поле быстрого поиска */
.search-fullname {
  margin-bottom: 0.8rem;
}

.search-fullname .form-control-lg {
  height: 48px;
  font-size: 1rem;
  padding: 0.8rem 1rem;
  background: #f9f9f9;
  border: 2px solid #c9bb9f; /* Бежевая граница */
  border-radius: 10px;
  color: #444;
  transition: all 0.3s ease;
}

.search-fullname .form-control-lg:focus {
  border-color: #b9080e; /* Красный при фокусе */
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(185, 8, 14, 0.1);
  animation: pulse 1.5s ease-in-out;
}

.search-fullname .form-control-lg::placeholder {
  color: #aaaaaa;
  font-weight: 300;
}

/* Переключатель расширенного поиска */
.search-toggler {
  margin: 0.5rem 0 0.8rem;
}

.search-toggler a {
  color: #777777;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  display: inline-block;
}

.search-toggler a:hover {
  color: #b9080e;
}

.search-toggler .chevron {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.6rem;
  margin-right: 4px;
}

/* Расширенный поиск */
#advancedSearch {
  margin-top: 0.5rem;
}

#advancedSearch .form-group {
  margin-bottom: 0.5rem;
}

#advancedSearch .form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid #c9bb9f; /* Бежевая граница */
  border-radius: 8px;
  color: #444;
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
  transition: all 0.25s ease;
  font-family: inherit;
}

#advancedSearch .form-control:focus {
  border-color: #b9080e; /* Красный при фокусе */
  outline: none;
  background: #f9f9f9;
  box-shadow: 0 0 0 3px rgba(185, 8, 14, 0.1);
}

#advancedSearch .form-control::placeholder {
  color: #aaaaaa;
  font-size: 0.75rem;
}

#advancedSearch .help-block {
  display: none;
}

/* Кнопки поиска — НЕ ИЗМЕНЯЕМ (оставляем как в index.css) */
.search-actions {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.6rem;
}

.btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.25s ease;
  flex: 1;
  height: 42px;
}

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

.btn-search:active {
  transform: scale(0.97);
}

.btn-search-primary {
  background: #b9080e; /* Красный как в index.css */
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(185, 8, 14, 0.25);
}

.btn-search-primary:hover {
  box-shadow: 0 4px 24px rgba(185, 8, 14, 0.4);
  background: #b9080e;
  color: #ffffff;
}

.btn-search-secondary {
  background: #444; /* Тёмно-серый как в index.css */
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-search-secondary:hover {
  box-shadow: 0 4px 24px rgba(185, 8, 14, 0.4);
  background: #444;
  color: #ffffff;
}

/* ============================================================
   Основной контент
   ============================================================ */
.app-content {
  flex: 1;
  padding: 2.5rem 3rem;
  display: flex;
  align-items: flex-start;
}

.main-card {
  background: #dddddc;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); /* Мягкая тень как в index.css */
  padding: 2.5rem;
  width: 100%;
  min-height: 500px;
  position: relative;
  animation: fadeIn 0.4s ease;
}

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

/* Заголовки */
.main-card h1,
.main-card h2,
.main-card h3 {
  color: #444;
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.main-card h3 {
  font-size: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #7f7f7f; /* Бежевая граница */
}

/* Хлебные крошки */
.breadcrumb {
  background: transparent;
  padding: 0 0 1rem 0;
  margin: 0;
  font-size: 0.85rem;
  color: #777777;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  color: #c9bb9f;
  padding: 0 0.5rem;
}

.breadcrumb a {
  color: #777777;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #b9080e;
}

/* ============================================================
   Таблица
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  margin-top: 0.5rem;
  border-radius: 8px;
  border: 1px solid #e7e7e7;
}

.table {
  width: 100%;
  background: #ffffff;
  border-collapse: collapse;
  margin-bottom: 0;
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background: #b9080e;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  /* padding: 0.9rem 1.2rem; */
  border-bottom: 2px solid #e7e7e7;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table tbody td {
  padding: 0.8rem 1.2rem;
  border-top: 1px solid #f3f0ea;
  vertical-align: middle;
  color: #444;
  font-size: 0.9rem;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: #f9f9f9;
  transform: scale(1.002);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Пустое состояние */
.table .empty-row td {
  text-align: center;
  padding: 2rem;
  color: #aaaaaa;
  font-style: italic;
}

/* ============================================================
   Действия в таблице
   ============================================================ */
.btn-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-table-action-view {
  background: #f9f9f9;
  color: #444;
  border: 1px solid #c9bb9f;
}

.btn-table-action-view:hover {
  background: #f3f0ea;
  transform: translateX(3px);
  color: #b9080e;
}

/* ============================================================
   Пагинация
   ============================================================ */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f3f0ea;
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.summary {
  font-size: 0.9rem;
  color: #353535;
}

.pagination {
  display: flex;
  list-style: none;
  padding: 0.5%;
  margin: 0;
  gap: 4px;
}

.pagination li {
  display: inline-block;
  background: #f9f9f9;
  border-radius: 6px;
  min-width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  font-size: 0.85rem;
  color: #444;
  transition: all 0.2s;
  border: 1px solid #e7e7e7;
}

.pagination li.active {
  background: #b9080e; /* Красный акцент */
  color: #ffffff;
  border-color: #b9080e;
}

.pagination li.active a {
  color: #ffffff;
}

.pagination li a {
  display: block;
  color: #444;
  padding: 0 10px;
}

.pagination li:hover:not(.active) {
  background: #f3f0ea;
  border-color: #c9bb9f;
}

.pagination li.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   Детальный просмотр (View) — светлая тема
   ============================================================ */
.detail-view {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e7e7e7;
}

.detail-view th,
.detail-view td {
  padding: 0.9rem 1.2rem;
  border-top: 1px solid #f3f0ea;
}

.detail-view th {
  width: 25%;
  background: #f9f9f9;
  font-weight: 600;
  color: #444;
  font-size: 0.85rem;
}

.detail-view td {
  color: #444;
}

.detail-view tr:first-child th,
.detail-view tr:first-child td {
  border-top: none;
}

.detail-view tr:hover {
  background: #f9f9f9;
}

/* Кнопка "Назад" */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  background: #f9f9f9;
  color: #444;
  border: 1px solid #e7e7e7;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.btn-back:hover {
  background: #f3f0ea;
  color: #b9080e;
  transform: translateX(-3px);
}

/* ============================================================
   Утилиты
   ============================================================ */
.text-muted {
  color: #aaaaaa;
}

.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

/* ============================================================
   Сетка (Grid system)
   ============================================================ */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -8px;
  margin-left: -8px;
}

.row.no-gutters {
  margin-right: 0;
  margin-left: 0;
}

.row.no-gutters > [class*="col-"] {
  padding-right: 0;
  padding-left: 0;
}

[class*="col-"] {
  padding-right: 8px;
  padding-left: 8px;
  flex: 0 0 auto;
  width: 100%;
}

.col-xs-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

.col-sm-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.col-sm-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

/* ============================================================
   Карточка просмотра (View) — светлая тема
   ============================================================ */
.view-container {
  max-width: 900px;
  margin: 0 auto;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f3f0ea;
  
}

.view-header .view-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.view-header .view-title .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #b9080e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(185, 8, 14, 0.3);
}
.view-header .view-title .avatar .glyphicon {
  font-size: 2rem;
  line-height: 1;
}
.view-header .view-title h3 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: #444;
  border-bottom: none;
  padding-bottom: 0;
}

.view-header .view-title .badge-id {
  font-size: 0.7rem;
  background: #f3f0ea;
  color: #777777;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-weight: 500;
}

.view-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-back-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 10px;
  background: #f9f9f9;
  color: #444;
  border: 1px solid #e7e7e7;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.btn-back-modern:hover {
  background: #f3f0ea;
  color: #b9080e;
  transform: translateX(-4px);
  border-color: #c9bb9f;
}

.btn-edit-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 10px;
  background: #b9080e; /* Красный */
  color: #ffffff;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(185, 8, 14, 0.25);
}

.btn-edit-modern:hover {
  background: #b9080e;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(185, 8, 14, 0.35);
  color: #ffffff;
}

.btn-delete-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 10px;
  background: #f3f0ea;
  color: #b9080e;
  border: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.btn-delete-modern:hover {
  background: #e7e7e7;
  transform: translateY(-2px);
}

/* ============================================================
   Стилизованный DetailView (для View)
   ============================================================ */
.detail-modern {
  background: #f9f9f9;
  border-radius: 12px;
  border: 1px solid #e7e7e7;
  overflow: hidden;
  margin-top: 0.5rem;
}

.detail-modern .detail-item {
  display: flex;
  border-bottom: 1px solid #f3f0ea;
  transition: background 0.2s ease;
}

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

.detail-modern .detail-item:hover {
  background: #f9f9f9;
}

.detail-modern .detail-label {
  flex: 0 0 200px;
  padding: 0.9rem 1.5rem;
  background: #f9f9f9;
  font-weight: 600;
  color: #444;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-modern .detail-label .label-icon {
  color: #b9080e;
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.detail-modern .detail-value {
  flex: 1;
  padding: 0.9rem 1.5rem;
  color: #444;
  font-size: 0.95rem;
  word-break: break-word;
  display: flex;
  align-items: center;
}

.detail-modern .detail-value.empty-value {
  color: #aaaaaa;
  font-style: italic;
}

.detail-modern .detail-value .tag {
  display: inline-block;
  background: #f3f0ea;
  padding: 0.15rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #444;
}

/* Информационные блоки */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.info-card {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  border: 1px solid #e7e7e7;
  text-align: center;
}

.info-card .info-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #444;
  line-height: 1.2;
}

.info-card .info-number.gold {
  color: #b9080e;
}

.info-card .info-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #aaaaaa;
  margin-top: 0.2rem;
}
h4.d-none {
    display: none !important;
  }
/* ============================================================
   Адаптивность
   ============================================================ */
@media (max-width: 1024px) {
  .app-sidebar {
    flex: 0 0 300px;
    max-width: 300px;
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .app-wrapper {
    flex-direction: column;
  }

  .app-sidebar {
    flex: none;
    max-width: none;
    width: 100%;
    min-height: auto;
    padding: 1.5rem;
    border-right: none;
    border-bottom: 1px solid #e7e7e7;
  }

  .app-content {
    padding: 0;
  }

  .main-card {
    border-radius: 0;
    padding: 1.2rem;
    min-height: auto;
    box-shadow: none;
  }

  .logo-area h1 {
    font-size: 1.3rem;
  }
  .logo-area .wheel::after {
    width: 24px;
    height: 24px;
  }

  .search-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .pagination-container {
    flex-direction: column;
    align-items: stretch;
  }

  .summary {
    text-align: center;
  }

  .pagination {
    justify-content: center;
    flex-wrap: wrap;
  }

  .table thead th,
  .table tbody td {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }

  .detail-view th,
  .detail-view td {
    padding: 0.6rem;
  }
  .detail-view th {
    width: 35%;
  }

  .stats-bar {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .view-header .view-title {
    width: 100%;
  }
  
  .view-actions {
    width: 100%;
    justify-content: flex-start;
  }
  
  .detail-modern .detail-item {
    flex-direction: column;
  }
  
  .detail-modern .detail-label {
    flex: none;
    width: 100%;
    padding: 0.6rem 1rem 0.2rem 1rem;
    background: transparent;
    font-size: 0.75rem;
    color: #aaaaaa;
  }
  
  .detail-modern .detail-value {
    padding: 0.2rem 1rem 0.8rem 1rem;
  }
  
  .info-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {

  .info-cards {
    grid-template-columns: 1fr;
  }
  
  .view-header .view-title .avatar {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
  
  .view-header .view-title h3 {
    font-size: 1.2rem;
  }
}
@media print {
    /* Скрываем сайдбар, навигацию, кнопки, шапку */
    .app-sidebar,
    .app-content,
    .view-actions,
    .btn-back-modern,
    .btn-print-modern,
    .breadcrumb,
    .logo-area,
    .modal-header,
    .modal-footer,
    .info-cards,
    .bg-layer {
        display: none !important;
    }

    .modal{
border-radius: 0 !important;
 width: 100% !important;
    max-width: 100%;
    margin: 0;
    }
    /* Основной контент занимает всю ширину */
    .app-content {
        padding: 0 !important;
    }
    .main-card {
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 1rem !important;
    }

    /* Убираем тени, границы для печати */
    .detail-modern {
        border: none !important;
        box-shadow: none !important;
    }
    .detail-item {
        border-bottom: 1px solid #ccc !important;
    }
     h4.d-none {
    display: block !important;
    line-height: 1.5em;
    margin-bottom: 30px;
    color: #000;
  }
}