/* основные стили для темной темы */
body.dark {
    background-color: #111;
    color: #fff;
}

/* изменение стилей для элементов на основе классов Bootstrap */
.navbar-inverse.dark {
    background-color: #222;
    border-color: #080808;
    color: #fff;
}

.btn-primary.dark {
    background-color: #337ab7;
    border-color: #2e6da4;
    color: #fff;
}

.btn-primary.dark:hover {
    background-color: #286090;
    border-color: #204d74;
    color: #fff;
}

.panel-default.dark > .panel-heading {
    background-color: #222;
    border-color: #080808;
    color: #fff;
}

.panel-default.dark {
    border-color: #080808;
}

.panel-default.dark > .panel-footer {
    background-color: #222;
    border-color: #080808;
    color: #fff;
}

.list-group-item.dark {
    background-color: #222;
    border-color: #080808;
    color: #fff;
}

.list-group-item.dark:hover {
    background-color: #111;
    border-color: #080808;
    color: #fff;
}

.table.dark {
    background-color: #222;
    color: #fff;
}

.table.dark > thead > tr > th {
    border-bottom: 2px solid #080808;
}

.table.dark > tbody > tr > td {
    border-top: 1px solid #080808;
    border-bottom: 1px solid #080808;
}

.theme-switcher-label {
    background-color: #333;
}

.theme-switcher-inner {
    background-color: #333;
}

.theme-switcher-switch {
    background-color: #ddd;
}
.dark #top .btn-link, .dark #top-links li,.dark #top-links a,.dark .breadcrumb > li{
    text-shadow: none;
}
/* Навигационное меню */
.dark nav#top {
    background-color: black;
    border-bottom: 0px;
  }
  
  .dark nav .nav-link {
    color: #fff;
  }
  
  .dark nav .nav-link:hover {
    color: #fff;
  }
  
  /* Хлебные крошки */
  .dark .breadcrumb {
    background-color: #333;
    color: #fff;
  }
  
  /* Выпадающий список */
  .dark select {
    background-color: #444;
    color: #fff;
    border: none;
  }
  
  .dark select:hover {
    background-color: #555;
  }
  
  .dark select:focus {
    background-color: #555;
  }
  
  /* Текстовое поле */
  .dark input[type="text"],
  .dark input[type="email"],
  .dark input[type="password"],
  .dark input[type="tel"],
  .dark input[type="number"] {
    background-color: #444;
    color: #fff;
    border: none;
  }
  
  .dark input[type="text"]:hover,
  .dark input[type="email"]:hover,
  .dark input[type="password"]:hover,
  .dark input[type="tel"]:hover,
  .dark input[type="number"]:hover {
    background-color: #555;
  }
  
  .dark input[type="text"]:focus,
  .dark input[type="email"]:focus,
  .dark input[type="password"]:focus,
  .dark input[type="tel"]:focus,
  .dark input[type="number"]:focus {
    background-color: #555;
  }
  
  /* Блок информации */
  .dark .information-block-view {
    background-color: #444;
    color: #fff;
  }
  
  .dark .information-block-view .title {
    color: #fff;
  }
  
  .dark .information-block-view .description {
    color: #ccc;
  }
  
  .dark .information-block-view:hover {
    background-color: #555;
  }
  
  /* Кнопки */
  .dark .btn {
    background-color: #333;
    color: #fff;
  }
  
  .dark .btn:hover {
    background-color: #444;
    color: #fff;
  }
  
  .dark .btn:focus {
    background-color: #444;
    color: #fff;
  }
  
  /* Группы полей ввода */
  .dark .form-group input[type="text"],
  .dark .form-group input[type="email"],
  .dark .form-group input[type="password"],
  .dark .form-group input[type="tel"],
  .dark .form-group input[type="number"] {
    background-color: #444;
    color: #fff;
    border: none;
  }
  
  .dark .input-group-sm .form-control {
    background-color: #444;
    color: #fff;
    border: none;
  }
  
  .dark .input-group-sm .input-group-text {
    background-color: #444;
    color: #fff;
    border: none;
  }
  
  /* Макет информации */
  .dark .information-layoutlist {
    color: #fff;
  }
  
  .dark .information-layoutlist .title {
    color: #fff;
  }
  
  .dark .information-layoutlist .description {
    color: #ccc;
  }
  
  
  /* Пагинация */
  .dark .pagination .page-link {
    color: #fff;
    background-color: #333;
    border-color: #333;
  }
  
  .dark .pagination .page-link:hover {
    color: #fff;
    background-color: #444;
    border-color: #444;
  }
  
  .dark .pagination .page-link:focus {
    color: #fff;
    background-color: #444;
    border-color: #444;
  }
  
  .dark .pagination .page-item.active .page-link {
    color: #fff;
    background-color: #444;
    border-color: #444;
  }
  
  /* Элемент списка */
  .dark .list-group-item {
    background-color: #444;
    color: #fff;
    border-color: #333;
  }
  
  .dark .list-group-item:hover {
    background-color: #555;
    color: #fff;
    border-color: #444;
  }
  
  .dark .list-group-item.active {
    background-color: #555;
    color: #fff;
    border-color: #444;
  }
  
  /* Список товаров */
  .dark .product-layout {
    color: #fff;
  }
  
  .dark .product-layout .product-thumb {
    background-color: #333;
    color: #fff;
  }
  
  .dark .product-layout .product-thumb .image {
    border-color: #fff;
  }
  
  .dark .product-layout .caption {
    color: #fff;
  }
  
  .dark .product-layout .price {
    color: #fff;
  }
  
  .dark .product-grid .product-thumb {
    background-color: #444;
    color: #fff;
  }
  
  .dark .product-grid .product-thumb .image {
    border-color: #fff;
  }
  
  .dark .product-grid .caption {
    color: #fff;
  }
  
  .dark .product-grid .price {
    color: #fff;
  }
  /* Группа кнопок */
.dark .btn-group {
    background-color: #333;
  }
  
  .dark .btn-group .btn {
    color: #fff;
  }
  
  .dark .btn-group .btn:hover {
    background-color: #444;
    color: #fff;
  }
  
  .dark .btn-group .btn:focus {
    background-color: #444;
    color: #fff;
  }
  
  .dark .btn-group .btn.active {
    background-color: #444;
    color: #fff;
  }

  /* Кнопка по умолчанию */
  .dark .btn-default {
    color: #bbb;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
    background-color: #555; /* Совпадает с началом градиента */
    background-image: linear-gradient(to bottom, #555, #333);
    background-repeat: repeat-x;
    background-origin: border-box; /* Фон заполняет область с border */
    border: 1px solid #333; /* Упрощенный border вместо разных цветов */
  }

  .dark .btn-default:hover,
  .dark .btn-default:focus {
    color: #fff;
    background-color: #444; /* Совпадает с началом градиента hover */
    background-image: linear-gradient(to bottom, #444, #222);
    background-repeat: repeat-x;
    background-origin: border-box;
    border: 1px solid #222; /* Упрощенный border */
  }

  .dark .btn-default {
    color: #bbb;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
    background-color: #444;
    background-image: linear-gradient(to bottom, #555, #333);
    background-repeat: repeat-x;
    border-color: #333 #333 #111 #222;
  }
  
  .dark .btn-default:hover,
  .dark .btn-default:focus {
    color: #fff;
    background-color: #333;
    background-image: linear-gradient(to bottom, #444, #222);
    background-repeat: repeat-x;
    border-color: #222 #222 #000 #111;
  }

  .dark .product-thumb .button-group button {
    border: none;
    display: inline-block;
    float: left;
    background-color: #444;
    background-image: none; /* Убираем конфликтующие градиенты */
    color: #bbb;
    line-height: 38px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
  }

  .dark .product-thumb .button-group button:hover {
    color: #fff; /* Изменен с #444 для лучшей читаемости */
    background-color: #666; /* Изменен с #777 для плавного перехода */
    background-image: none;
    text-decoration: none;
    cursor: pointer;
    border: none; /* Убираем border-color */
  }

  .dark .product-thumb .button-group {
    border-top: 1px solid #666;
    background-color: #444;
    overflow: auto;
  }
  .dark .thumbnail {
    border: 1px solid #666;
    background-color: black;
    color: #bbb;
  }

  /* Стили для input-group-addon в темной теме */
.dark .input-group-addon {
    padding: 6px 6px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: #bbb;
    text-align: center;
    background-color: #444;
    border: 1px solid #666;
    border-right-color: rgb(102, 102, 102);
    border-right-style: solid;
    border-right-width: 1px;
    border-radius: 4px;
    width: 30px;
    height: auto!important;
  }
  
  .dark .input-group-addon:hover,
  .dark .input-group-addon:focus {
    background-color: #333;
    border-color: #999;
    color: #fff;
  }

  /* Стили для .well в темной теме */
.dark .well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #333;
    border: 1px solid #666;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(255,255,255,.05);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.05);
  }

  /* Стили для .panel.panel-default в темной теме */
.dark .panel.panel-default {
    border-color: #666;
    background-color: #444;
    color: #bbb;
  }
  
  .dark .panel.panel-default .panel-heading {
    border-color: #666;
    background-color: #333;
    color: #bbb;
  }
  
  .dark .panel.panel-default .panel-title {
    color: #bbb;
  }
  
  .dark .panel.panel-default .panel-body {
    color: #bbb;
  }
  /* Стили для .pagination в темной теме */
.dark .pagination {
    margin: 0;
  }
  
  .dark .pagination > li > a,
  .dark .pagination > li > span {
    color: #bbb;
    background-color: #444;
    border: 1px solid #666;
    border-radius: 4px;
  }
  
  .dark .pagination > li > a:hover,
  .dark .pagination > li > span:hover,
  .dark .pagination > li > a:focus,
  .dark .pagination > li > span:focus {
    background-color: #333;
    border-color: #999;
    color: #fff;
  }
  
  .dark .pagination > .active > a,
  .dark .pagination > .active > span,
  .dark .pagination > .active > a:hover,
  .dark .pagination > .active > span:hover,
  .dark .pagination > .active > a:focus,
  .dark .pagination > .active > span:focus {
    z-index: 2;
    color: #fff;
    background-color: #337ab7;
    border-color: #337ab7;
  }
  
  .dark .pagination > .disabled > span,
  .dark .pagination > .disabled > span:hover,
  .dark .pagination > .disabled > span:focus,
  .dark .pagination > .disabled > a,
  .dark .pagination > .disabled > a:hover,
  .dark .pagination > .disabled > a:focus {
    color: #bbb;
    background-color: #444;
    border-color: #666;
  }

  /* Стили для .dropdown-menu в темной теме */
.dark .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 160px;
    padding: 5px 0;
    padding-bottom: 5px;
    margin: 2px 0 0;
    margin-top: 2px;
    font-size: 14px;
    text-align: left;
    list-style: none;
    background-color: #444;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    border: 1px solid #666;
    border-radius: 4px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
    color: #777;
  }

  .dark .open > .dropdown-menu {
    display: block;
  }

  .dark .dropdown-menu > li > a,
  .dark .dropdown-menu > li > a:hover,
  .dark .dropdown-menu > li > a:focus {
    color: #777;
    background-color: transparent;
  }

  /* Стили для #menu .dropdown-inner a в темной теме */
.dark #menu .dropdown-inner a {
    min-width: 160px;
    display: block;
    padding: 3px 20px;
    clear: both;
    line-height: 20px;
    color: #bbb;
    font-size: 14px;
  }
  
  .dark #menu .dropdown-inner a:hover,
  .dark #menu .dropdown-inner a:focus {
    background-color: #333;
    color: #fff;
    outline: none;
  }
  
  .dark .dropdown-menu > .active > a,
  .dark .dropdown-menu > .active > a:hover,
  .dark .dropdown-menu > .active > a:focus {
    color: #fff;
    background-color: #337ab7;
    outline: none;
  }
  
  .dark .dropdown-menu > .divider {
    height: 1px;
    margin: 9px 0;
    overflow: hidden;
    background-color: #666;
  }
  
  .dark .dropdown-menu > li > a:hover,
  .dark .dropdown-menu > li > a:focus {
    background-color: #333;
    outline: none;
  }

  /* Стили для .modal-dialog в темной теме */
.dark .modal-dialog {
    width: 600px;
    margin: 30px auto;
  }
  
  .dark .modal-content {
    background-color: #444;
    border: 1px solid #666;
    border-radius: 4px;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
  }
  
  .dark .modal-header {
    border-bottom: 1px solid #666;
    background-color: #333;
    color: #bbb;
  }
  
  .dark .modal-title {
    color: #bbb;
  }
  
  .dark .modal-body {
    color: #bbb;
  }
  
  .dark .modal-footer {
    border-top: 1px solid #666;
    background-color: #333;
    color: #bbb;
  }
  
  .dark .modal-footer button {
    color: #bbb;
    background-color: #444;
    border: 1px solid #666;
    border-radius: 4px;
  }
  
  .dark .modal-footer button:hover,
  .dark .modal-footer button:focus {
    background-color: #333;
    border-color: #999;
    color: #fff;
  }

  .dark .product-thumb {
    border: 1px solid #444; /* замените #fff на цвет, который вы хотите использовать для обводки в темной теме */
  }

  .dark #menu {
    background-color: #f04940;
    background-image: linear-gradient(to bottom, #ae2720, #911e18);
    border-color: #911e18 #911e18 #3a1b1b;
  }
  
  .dark #menu a {
    color: #ffcccc;
  }
  
  .dark #menu a:hover {
    color: #ffffff;
  }

  .dark .dropdown-menu li > a:hover {
    text-decoration: none;
    color: #ffffff;
    background-color: #f04940;
    background-image: linear-gradient(to bottom, #ae2720, #911e18);
  }

  .dark .btn {
    background-color: #333;
    color: #fff;
    border: 1px solid #444; /* Добавляем border для консистентности */
  }

  .dark .btn:hover {
    background-color: #444;
    border-color: #555; /* Синхронизируем с фоном */
    color: #fff;
  }

  .dark .btn:focus {
    background-color: #444;
    border-color: #555;
    color: #fff;
    outline: none; /* Убираем стандартный outline */
  }

.dark .btn-primary {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  background-color: #ae2720; /* Совпадает с началом градиента */
  background-image: linear-gradient(to bottom, #ae2720, #911e18);
  background-repeat: repeat-x;
  background-origin: border-box;
  border: 1px solid #911e18; /* Унифицированный border */
}

.dark .btn-primary:hover,
.dark .btn-primary:focus,
.dark .btn-primary:active {
  color: #fff;
  background-color: #ae2720;
  background-image: linear-gradient(to bottom, #c52f28, #ae2720);
  background-origin: border-box;
  border: 1px solid #911e18;
}

#menu .btn-navbar{
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  background-color: #f04940;
  background-image: linear-gradient(to bottom, #ae2720, #911e18);
  background-repeat: repeat-x;
  border-color: #911e18 #911e18 #3a1b1b;
}

.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  color: #fff;
}

.dark footer{
    border-top: 0px;
}
.thumbnail .caption{
    color: white;
}
.dark a{
    color: white;
}
.dark a:focus, .dark  a:hover {
    color: #ccc;
    text-decoration: underline;
  }

  .dark #menu .see-all:hover,
.dark #menu .see-all:focus {
  text-decoration: none;
  color: #ffffff;
  background-color: #f04940;
  background-image: linear-gradient(to bottom, #ae2720, #911e18);
}

.caption a{
    color: #cdcdcd;
}


/* Исправленные цвета - более яркий красный как на скриншоте */
:root {
  --primary-red: #e53e3e;  /* Более яркий красный как на скриншоте */
  --primary-red-hover: #d32f2f;
  --primary-red-dark: #b71c1c;
}

/* WiFi OBD Container */
.wifi-obd-container {
  background-color: #1a1a1a;
  min-height: 100vh;
  padding: 0;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  margin-bottom: 20px;
}

.breadcrumb {
  background-color: #2a2a2a;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 8px 16px;
  font-size: 14px;
}

.breadcrumb li {
  display: inline-block;
  color: #999;
}


.breadcrumb li a {
  text-decoration: none;
}

.breadcrumb li a:hover {
  text-decoration: none;
}

/* Customer Info Card */
.customer-info-card {
  background-color: #2a2a2a;
  border: 1px solid var(--primary-red);
  border-radius: 3px;
  margin-bottom: 20px;
}

.customer-info-card .card-header {
  background-image: linear-gradient(to bottom, #ae2720, #911e18);
  background-color: var(--primary-red-dark);
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  text-align: center;
}

.customer-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}

/* Device sections */
.device-section {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #1a1a1a;
    border: 1px solid #333;
}

.device-header {
    padding: 15px 20px;
    background-color: var(--primary-red);
    border-bottom: 2px solid #a03d08;
}

.device-title {
    font-size: 18px;
    margin: 0;
    color: #ffffff;
    font-weight: 600;
}

.device-title i {
    margin-right: 10px;
}

.device-content {
    padding: 20px;
}


.device-header-mini {
  padding: 12px 16px;
  border-bottom: 1px solid #333;
}


/* Version Selector */
.version-selector {
  margin-bottom: 20px;
}

.version-selector label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.select-wrapper {
  position: relative;
}

.form-control {
  background-color: #1a1a1a;
  border: 1px solid #444;
  border-radius: 3px;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 14px;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.form-control:focus {
  border-color: var(--primary-red);
  outline: none;
  box-shadow: 0 0 0 1px var(--primary-red);
}

.form-control:hover {
  border-color: #666;
}

.select-wrapper::after {
  content: '▼';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-red);
  font-size: 12px;
  pointer-events: none;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  color: #ffffff;
  margin-bottom: 0;
  font-size: 14px;
}

.compatibility-table,
.device-table {
  border: 1px solid #444;
  border-radius: 3px;
  overflow: hidden;
}

.compatibility-table {
  margin-bottom: 20px;
}

.table thead {
  background-color: #333;
}

.table thead th {
  color: #ffffff;
  font-weight: 500;
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #444;
  font-size: 13px;
}

.table tbody tr {
  background-color: #2a2a2a;
  border-bottom: 1px solid #333;
}

.table tbody tr:hover {
  background-color: #333;
}

.table tbody td {
  padding: 12px;
  border-right: 1px solid #333;
  vertical-align: middle;
}

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

.serial-cell {
  font-family: 'Courier New', monospace;
  font-weight: 500;
  color: var(--primary-red);
  font-size: 13px;
  font-weight: bold;
}

.date-cell {
  color: #999;
  font-size: 13px;
}

.complect-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-top: 0px !important;
}

.complect-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 400;
}

.complect-badge.active {
  background-color: var(--primary-red);
  color: #ffffff;
}

.complect-badge.disabled {
  background-color: #444;
  color: #999;
}

.complect-badge i {
  font-size: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--primary-red);
  color: #ffffff;
  border-color: var(--primary-red);
}

.btn-primary:hover {
  background-color: var(--primary-red-hover);
  border-color: var(--primary-red-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: #444;
  color: #ffffff;
  border-color: #444;
}

.btn-secondary:hover {
  background-color: #555;
  border-color: #555;
  color: #ffffff;
}

.btn-info {
  background-color: #17a2b8;
  color: #ffffff;
  border-color: #17a2b8;
}

.btn-info:hover {
  background-color: #138496;
  border-color: #138496;
  color: #ffffff;
}

.btn-danger {
  background-color: #dc3545;
  color: #ffffff;
  border-color: #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #c82333;
  color: #ffffff;
}

.dark .btn-download {
  background-color: #28a745;
  color: #ffffff;
  border-color: #28a745;
}

.dark .btn-download:hover {
  background-color: #218838;
  border-color: #218838;
  color: #ffffff;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.device-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #333;
}

/* Input Group */
.input-group {
  display: flex;
  border: 1px solid #444;
  border-radius: 3px;
  overflow: hidden;
}

.input-group-addon {
  background-color: #333;
  border: none;
  padding: 8px 12px;
  color: var(--primary-red);
  display: flex;
  align-items: center;
  border-right: 1px solid #444;
}

.input-group .form-control {
  border: none;
  border-radius: 0;
  flex: 1;
}

.input-group .form-control:focus {
  box-shadow: none;
}

/* Token Search */
.token-search {
  margin-bottom: 20px;
}

.token-search label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.search-actions {
  text-align: right;
}

/* No Results / No Devices */
.no-results,
.no-devices {
  text-align: center;
  padding: 32px;
  color: #999;
  font-size: 14px;
}

.no-devices {
  background-color: #2a2a2a;
  border: 1px solid #333;
  border-radius: 3px;
  margin-top: 20px;
}

.no-devices i {
  font-size: 32px;
  color: var(--primary-red);
  margin-bottom: 12px;
}

.no-devices p {
  margin: 0;
}

.no-firmware {
  text-align: center;
  padding: 20px;
  background-color: #2a2a2a;
  border: 1px solid #ffc107;
  border-radius: 3px;
  color: #ffc107;
}

.no-firmware i {
  font-size: 24px;
  margin-bottom: 8px;
}

.no-firmware p {
  margin: 0;
  font-size: 14px;
}

.w-100{
  width: 100%;
}

/* Device name styling */
.device-name {
  color: #ffffff;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wifi-obd-container {
      padding: 10px 0;
  }
  
  .device-content {
      padding: 16px;
  }
  
  .action-buttons {
      flex-direction: column;
      gap: 8px;
  }
  
  .device-actions {
      flex-direction: column;
      gap: 12px;
  }
  
  .complect-cell {
      flex-direction: column;
      gap: 4px;
  }
  
  .table {
      font-size: 13px;
  }
  
  .table thead th,
  .table tbody td {
      padding: 8px;
  }
}

/* Focus states */
.btn:focus,
.form-control:focus {
  outline: none;
}

/* Transitions */
.btn,
.form-control {
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.table tbody tr {
  transition: background-color 0.15s ease;
}

/* Download links in compatibility table */
.compatibility-table a {
  color: var(--primary-red);
  text-decoration: none;
  font-size: 12px;
}

.compatibility-table a:hover {
  color: var(--primary-red-hover);
  text-decoration: underline;
}


.device-header-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.device-type {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


.device-serial {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: bold;
}

.device-serial code {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #495057;
  font-family: 'Courier New', monospace;
}

.device-comment {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-style: italic;
  margin-top: 4px;
}

.device-comment .text-muted {
  color: #6c757d !important;
}

.action-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-buttons .btn-sm {
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.2;
}

.device-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
}

.device-table tbody tr:hover {
  background-color: #4e4e4e;
}


.device-info {
  vertical-align: top;
  padding: 12px 8px;
}

/* Badge styles for different device types */
.badge-primary {
  background-color: #007bff;
  color: white;
}

.device-type.badge-primary {
  background-color: #007bff;
}

.navbar-toggle{
  display: none;
}

.mobile-header {
  display: none;
}
/* Responsive design for smaller screens */
@media (max-width: 768px) {
  .navbar-toggle{
    display: block;
  }
  .action-buttons {
    flex-direction: column;
    gap: 3px;
  }
  
  .action-buttons .btn-sm {
    width: 100%;
    margin-bottom: 2px;
  }
  
  .device-header-mini {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .device-table thead {
    display: none;
  }

  .device-table,
  .device-table tbody,
  .device-table tr,
  .device-table td {
    display: block;
    width: 100%;
  }

  .device-table tr {
    margin-bottom: 15px;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px;
    background-color: #2a2a2a;
    position: relative;
  }

  .device-table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
    border: none;
    padding-bottom: 12px;
    padding-top: 12px;
    border-bottom: 1px solid #333;
  }
  
  .device-table td:last-child {
    border-bottom: none;
  }

  /* Hide the data-label based headers - they weren't working properly */
  .device-table td::before {
    display: none;
  }
  
  /* Mobile headers styling - prominent and unmissable */
  .mobile-header {
    display: block;
    font-weight: bold;
    color: #ffffff;
    background-color: #636363;
    margin-bottom: 8px;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 3px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .text-nowrap{
    white-space: normal;
  }
}


/* Version selector */
.version-selector {
    margin-bottom: 20px;
}

.version-selector label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    display: block;
}

/* Compatibility table - desktop */
.compatibility-table {
    margin-bottom: 25px;
}

.compatibility-table table {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    overflow: hidden;
}

.compatibility-table thead th {
    background-color: #333;
    color: var(--primary-red);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 12px 15px;
    border: 1px solid #444;
    text-align: center;
}

.compatibility-table tbody td {
    padding: 12px 15px;
    border: 1px solid #444;
    color: #ffffff;
    vertical-align: middle;
}

.compatibility-table td.changes {
    text-align: left;
    line-height: 1.6;
    color: #ddd;
}

.compatibility-table td.text-center {
    text-align: center;
    font-weight: 600;
    display: table-cell;
}

.compatibility-table .download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #28a745;
    color: #ffffff;
    border-radius: 4px;
    margin-left: 8px;
    text-decoration: none;
}

.compatibility-table .download-link:hover {
    background-color: #218838;
}

/* Device list table - desktop */
.device-list table {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    overflow: hidden;
}

.device-list thead th {
    background-color: #333;
    color: var(--primary-red);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 12px 15px;
    border: 1px solid #444;
}

.device-list tbody td {
    padding: 12px 15px;
    color: #ffffff;
    vertical-align: middle;
}

.device-list .device-serial {
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-list .device-serial i {
    color: var(--primary-red);
}

.device-list .device-serial code {
    background-color: #1a1a1a;
    border: 1px solid #444;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--primary-red);
    font-family: 'Courier New', monospace;
}

.device-list .complect-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 5px;
}

.device-list .complect-badge.active {
    background-color: var(--primary-red);
    color: #ffffff;
}

.device-list .complect-badge.disabled {
    background-color: #3a3a3a;
    color: #777;
}

.device-list .btn-download {
    background-color: #28a745;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.device-list .btn-download:hover {
    background-color: #218838;
}

/* Device info in "Added Devices" section */
.device-list .device-info {
    padding: 12px 15px;
}

.device-list .device-type.badge {
    display: inline-block;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--primary-red);
    color: #ffffff;
    margin-right: 8px;
}

.device-list .device-name {
    font-weight: 600;
    color: #ffffff;
    margin-left: 8px;
}

.device-list .device-comment {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}

.device-list .device-comment i {
    color: var(--primary-red);
    margin-right: 6px;
}

.device-list .action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.device-list .action-buttons .btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.device-list .action-buttons .btn-primary {
    background-color: #007bff;
    color: #ffffff;
    border: none;
}

.device-list .action-buttons .btn-info {
    background-color: #17a2b8;
    color: #ffffff;
    border: none;
}

.device-list .action-buttons .btn-danger {
    background-color: #dc3545;
    color: #ffffff;
    border: none;
}

/* Device actions */
.device-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.device-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
}

/* Hide mobile-only elements on desktop */
.mobile-header {
    display: none;
}

/* ===================================
   MOBILE STYLES (max-width: 768px)
   =================================== */

@media (max-width: 768px) {
    
    /* Global container adjustments */
    .wifi-obd-container {
        padding: 0;
    }
    
    .wifi-obd-container .container {
        padding: 8px;
    }
    
    /* Device section adjustments */
    .device-section {
        margin-bottom: 20px;
    }
    
    .device-header {
        padding: 12px 15px;
    }
    
    .device-title {
        font-size: 16px;
    }
    
    .device-title i {
        margin-right: 8px;
    }
    
    .device-content {
        padding: 15px;
    }
    
    /* Version selector */
    .version-selector {
        margin-bottom: 15px;
    }
    
    .version-selector label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .version-selector .form-control {
        width: 100%;
        font-size: 14px;
        padding: 0px 12px;
        background-color: #2a2a2a;
        border: 1px solid #444;
        color: #ffffff;
    }
    
    /* ===================================
       COMPATIBILITY TABLE - CARD LAYOUT
       =================================== */
    
    .compatibility-table {
        margin-bottom: 20px;
    }
    
    /* Hide original table structure */
    .compatibility-table table {
        border: none;
        background: transparent;
    }
    
    .compatibility-table thead {
        display: none !important;
    }
    
    .compatibility-table tbody {
        display: block;
        width: 100%;
    }
    
    .compatibility-table tr {
        display: block;
        width: 100%;
        background-color: #2a2a2a;
        border: 1px solid #444;
        border-radius: 6px;
        padding: 0;
        margin-bottom: 0;
    }
    
    .compatibility-table td {
        display: block;
        width: 100%;
        border: none;
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid #333;
    }
    
    .compatibility-table td:last-child {
        border-bottom: none;
    }
    
    /* Changes cell */
    .compatibility-table td.changes {
        background-color: #333;
        font-size: 13px;
        line-height: 1.5;
        color: #ddd;
        padding: 15px;
    }
    
    .compatibility-table td.changes::before {
        content: "ИЗМЕНЕНИЯ";
        display: block;
        font-weight: 700;
        color: var(--primary-red);
        font-size: 11px;
        text-transform: uppercase;
        margin-bottom: 8px;
        letter-spacing: 0.5px;
    }

    .table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th{
      border-top:0px;
    }
    
    /* Compatibility cells with version numbers */
    .compatibility-table td.webinterface,
    .compatibility-table td.wifibridge,
    .compatibility-table td.wiobd,
    .compatibility-table td.wiafr,
    .compatibility-table td.text-center {
        background-color: #2a2a2a;
        font-size: 14px;
        font-weight: 600;
        color: #ffffff;
        display: flex!important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
    }
    
    .compatibility-table td.webinterface::before {
        content: "WEB INTERFACE";
        display: inline-block;
        font-weight: 700;
        color: var(--primary-red);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: auto;
        min-width: 120px;
    }
    
    .compatibility-table td.wifibridge::before {
        content: "WIFI-BRIDGE";
        display: inline-block;
        font-weight: 700;
        color: var(--primary-red);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: auto;
        min-width: 120px;
    }
    
    .compatibility-table td.wiobd::before {
        content: "WiOBD";
        display: inline-block;
        font-weight: 700;
        color: var(--primary-red);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: auto;
        min-width: 120px;
    }
    
    .compatibility-table td.wiafr::before {
        content: "WiAFR";
        display: inline-block;
        font-weight: 700;
        color: var(--primary-red);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: auto;
        min-width: 120px;
    }
    
    /* Download links in compatibility table */
    .compatibility-table .download-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background-color: #28a745;
        color: #ffffff;
        border-radius: 4px;
        margin-left: 12px;
        flex-shrink: 0;
    }
    
    .compatibility-table .download-link:hover {
        background-color: #218838;
        text-decoration: none;
    }
    
    .compatibility-table .download-link i {
        font-size: 16px;
    }
    
    /* ===================================
       DEVICE LIST TABLE - CARD LAYOUT
       =================================== */
    
    .device-list {
        margin-bottom: 20px;
    }
    
    /* Hide table headers */
    .device-list table thead {
        display: none !important;
    }
    
    .device-list table,
    .device-list tbody {
        display: block;
        width: 100%;
        background: none;
    }
    
    .device-list tr {
        display: block;
        width: 100%;
        background-color: #2a2a2a;
        border: 1px solid #444;
        border-radius: 6px;
        margin-bottom: 15px;
        padding: 0;
        overflow: hidden;
    }
    .device-list tr:last-child {
        margin-bottom: 0;
    }
    
    .device-list td {
        display: block;
        width: 100%;
        border: none;
        padding: 0;
        text-align: left;
    }
    
    /* Show mobile headers */
    .mobile-header {
        display: block;
        font-weight: 700;
        color: white;
        font-size: 10px;
        text-transform: uppercase;
        margin-bottom: 6px;
        letter-spacing: 0.5px;
    }
    
    /* Serial number cell */
    .device-list td.serial-cell {
        padding: 12px 15px;
    }
    
    .device-list .device-serial {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .device-list .device-serial i {
        color: var(--primary-red);
        font-size: 14px;
    }
    
    .device-list .device-serial code {
        background-color: #1a1a1a;
        border: 1px solid #444;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 12px;
        color: var(--primary-red);
        font-family: 'Courier New', monospace;
        font-weight: 600;
    }
    
    /* Date cell */
    .device-list td.date-cell {
        padding: 12px 15px;
        border-bottom: 1px solid #333;
        font-size: 13px;
        color: #999;
    }
    
    /* Complectation cell */
    .device-list td.complect-cell {
        padding: 12px 15px;
        border-bottom: 1px solid #333;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .device-list .complect-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 6px 10px;
        border-radius: 4px;
        font-size: 11px;
        font-weight: 600;
        margin: 0;
    }
    
    .device-list .complect-badge.active {
        background-color: var(--primary-red);
        color: #ffffff;
    }
    
    .device-list .complect-badge.active i {
        color: #ffffff;
    }
    
    .device-list .complect-badge.disabled {
        background-color: #3a3a3a;
        color: #777;
    }
    
    .device-list .complect-badge i {
        font-size: 10px;
    }
    
    /* Download button cell */
    .device-list td.text-right {
        padding: 12px 15px;
        text-align: center !important;
    }
    
    .device-list .btn-download {
        width: 100%;
        background-color: #28a745;
        color: #ffffff;
        border: none;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .device-list .btn-download:hover {
        background-color: #218838;
    }
    
    .device-list .btn-download i {
        font-size: 14px;
    }
    
    /* ===================================
       ADDED DEVICES TABLE - MOBILE
       =================================== */
    
    .device-list td.device-info {
        padding: 15px;
        background-color: #333;
        border-bottom: 2px solid var(--primary-red);
    }
    
    .device-details {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .device-header-mini {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .device-list .device-type.badge {
        display: inline-block;
        font-size: 10px;
        padding: 4px 10px;
        border-radius: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        background-color: var(--primary-red);
        color: #ffffff;
        align-self: flex-start;
        margin: 0;
    }
    
    .device-list .device-name {
        font-size: 15px;
        font-weight: 600;
        color: #ffffff;
        margin: 0;
    }
    
    .device-list .device-comment {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        margin: 0;
    }
    
    .device-list .device-comment i {
        color: var(--primary-red);
        font-size: 12px;
    }
    
    /* Action buttons for added devices */
    .device-list .action-buttons {
        padding: 12px 15px;
        background-color: #252525;
        display: flex;
        flex-direction: column;
        gap: 8px;
        justify-content: stretch;
    }
    
    .device-list .action-buttons .btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
        font-weight: 600;
        border: none;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .device-list .action-buttons .btn-primary {
        background-color: #007bff;
        color: #ffffff;
    }
    
    .device-list .action-buttons .btn-info {
        background-color: #17a2b8;
        color: #ffffff;
    }
    
    .device-list .action-buttons .btn-danger {
        background-color: #dc3545;
        color: #ffffff;
    }
    
    .device-list .action-buttons .btn i {
        font-size: 13px;
    }
    
    /* Device actions (bottom buttons) */
    .device-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }
    
    .device-actions .btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .device-actions .btn-secondary {
        background-color: #6c757d;
        color: #ffffff;
        border: none;
    }
    
    .device-actions .btn-primary {
        background-color: #007bff;
        color: #ffffff;
        border: none;
    }
    
    /* Token search section */
    .token-search {
        margin-bottom: 15px;
    }
    
    .token-search label {
        font-size: 13px;
        font-weight: 600;
        color: #ffffff;
        margin-bottom: 8px;
        display: block;
    }
    
    .token-search .input-group {
        display: flex;
        flex-direction: row;
        width: 100%;
    }
    
    .token-search .input-group-addon {
        background-color: #2a2a2a;
        border: 1px solid #444;
        border-right: none;
        padding: 10px 12px;
        display: flex;
        align-items: center;
        border-radius: 4px 0 0 4px;
    }
    
    .token-search .input-group-addon i {
        color: var(--primary-red);
        font-size: 14px;
    }
    
    .token-search .form-control {
        flex: 1;
        background-color: #2a2a2a;
        border: 1px solid #444;
        color: #ffffff;
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 0 4px 4px 0;
    }
    
    .search-actions {
        margin-top: 12px;
    }
    
    .search-actions .btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
        background-color: #007bff;
        color: #ffffff;
        border: none;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    /* No devices / No firmware messages */
    .no-devices,
    .no-firmware,
    .no-results {
        padding: 30px 20px;
        text-align: center;
        background-color: #2a2a2a;
        border: 1px solid #444;
        border-radius: 6px;
        margin: 20px 0;
    }
    
    .no-devices i,
    .no-firmware i,
    .no-results i {
        font-size: 32px;
        color: var(--primary-red);
        margin-bottom: 12px;
        display: block;
    }
    
    .no-devices p,
    .no-firmware p,
    .no-results p {
        font-size: 14px;
        color: #999;
        margin: 0;
    }
    
    /* Customer info card */
    .customer-info-card {
        margin-bottom: 20px;
    }
    
    .customer-info-card .card-header {
        padding: 15px;
    }
    
    .customer-title {
        font-size: 18px;
    }
    
    /* Breadcrumbs */
    .breadcrumb-nav {
        padding: 10px 15px;
    }
    
    .breadcrumb {
        font-size: 12px;
    }
}

/* Extra small devices (max-width: 480px) */
@media (max-width: 480px) {
    .device-title {
        font-size: 14px;
    }
    
    .device-list .device-serial code {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .device-list .complect-badge {
        font-size: 10px;
        padding: 5px 8px;
    }
    
    .compatibility-table td.webinterface::before,
    .compatibility-table td.wifibridge::before,
    .compatibility-table td.wiobd::before,
    .compatibility-table td.wiafr::before {
        min-width: 100px;
        font-size: 9px;
    }
}
