:root {
  --bg: #0b1120;
  --bg-soft: #020617;
  --card: #020617;
  --card-soft: #0f172a;
  --accent: #f97316;
  --accent-soft: #fed7aa;
  --text: #e5e7eb;
  --text-invert: #0f172a;
  --subtext: #9ca3af;
  --border: #1f2937;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 40%, #000 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px 96px;
  position: relative;
}

.hidden {
  display: none !important;
}

/* Header */

.app-header {
  margin-bottom: 12px;
}

.app-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.app-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 2px;
}

/* Filters */

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1 1 45%;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group-full {
  flex-basis: 100%;
}

.filter-group label {
  font-size: 11px;
  color: #9ca3af;
}

.filter-group select,
.filter-group input {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.95);
  color: #f9fafb;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--accent);
}

/* Cards */

.cards-wrapper {
  min-height: 200px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.card {
  background: radial-gradient(circle at top left, #111827 0, #020617 55%, #000 100%);
  border-radius: 18px;
  padding: 10px 10px 10px;
  border: 1px solid rgba(30, 64, 175, 0.6);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  color: #e5e7eb;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(248, 113, 113, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.18s ease-out;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  margin-bottom: 6px;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-emoji {
  font-size: 32px;
  margin-bottom: 2px;
}

/* Прячем emoji, т.к. используем фотку */
.card-emoji,
.detail-emoji {
  display: none;
}

.card-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.card-brand {
  font-size: 11px;
  color: var(--subtext);
}

.card-category {
  font-size: 11px;
  color: var(--subtext);
  margin-top: 2px;
}

.card-price {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 6px;
  color: #22c55e;
}

.card-add-btn {
  margin-top: auto;
  width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--accent);
  color: #111827;
  cursor: pointer;
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, background 0.15s;
  box-shadow: 0 10px 25px rgba(248, 150, 79, 0.55);
}

.card-add-btn:active {
  transform: scale(0.97);
  box-shadow: 0 6px 16px rgba(248, 150, 79, 0.4);
}

.card-add-btn--active {
  background: #22c55e;
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.5);
}

.card-add-btn--active:active {
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* Empty state */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
  color: #9ca3af;
  gap: 4px;
}

.empty-emoji {
  font-size: 32px;
  margin-bottom: 4px;
}

.empty-title {
  font-size: 15px;
  font-weight: 600;
}

.empty-subtitle {
  font-size: 13px;
}

/* Cart bar */

.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  border: none;
  border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(14px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(90deg, #f97316, #fb923c);
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 -14px 38px rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.cart-bar-title {
  font-size: 14px;
  font-weight: 700;
}

.cart-bar-subtitle {
  font-size: 12px;
  opacity: 0.9;
}

.cart-bar-action {
  font-size: 13px;
  font-weight: 600;
}

/* Cart modal */

.cart-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
}

.cart-modal-content {
  width: 100%;
  max-width: 520px;
  background: #020617;
  border-radius: 22px 22px 0 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.9);
  color: #e5e7eb;
}

.cart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cart-modal-title {
  font-size: 16px;
  font-weight: 700;
}

.cart-modal-subtitle {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

.icon-button {
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

.cart-items {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

.cart-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-emoji {
  display: none;
}

.cart-item-thumb {
  width: 34px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  background: #020617;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item-text {
  display: flex;
  flex-direction: column;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
}

.cart-item-brand {
  font-size: 11px;
  color: #9ca3af;
}

.cart-item-price {
  font-size: 12px;
  font-weight: 600;
  color: #22c55e;
}

.cart-remove-btn {
  border: none;
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.cart-empty {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  padding: 24px 0;
}

.cart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.cart-footer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #9ca3af;
}

.primary-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--accent);
  color: #111827;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(248, 150, 79, 0.6);
}

.primary-btn--secondary {
  background: #22c55e;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.6);
}

.secondary-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: transparent;
  color: #e5e7eb;
  padding: 8px 14px;
  font-size: 12px;
  cursor: pointer;
}

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

/* Detail modal */

.detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 25;
}

.detail-modal-content {
  width: 100%;
  max-width: 520px;
  background: radial-gradient(circle at top, #111827 0, #020617 40%, #000 100%);
  border-radius: 22px 22px 0 0;
  padding: 12px 16px calc(18px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 1);
  color: #e5e7eb;
}

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

.detail-title {
  font-size: 16px;
  font-weight: 700;
}

.detail-subtitle {
  font-size: 12px;
  color: #9ca3af;
}

.detail-media {
  width: 100%;
  margin: 8px 0 6px;
}

.detail-image {
  width: 100%;
  border-radius: 16px;
  display: block;
  object-fit: cover;
  max-height: 260px;
}

.detail-emoji {
  font-size: 52px;
  text-align: center;
  margin: 8px 0 6px;
}

.detail-description {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 12px;
}

.detail-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-price {
  font-size: 14px;
  font-weight: 700;
  color: #22c55e;
}

/* Admin */

.admin-app {
  padding-bottom: 24px;
}

.admin-section {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 18px;
  padding: 12px 12px 14px;
  border: 1px solid rgba(31, 41, 55, 0.9);
  margin-bottom: 12px;
}

.admin-form-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-field-full {
  grid-column: 1 / -1;
}

.admin-field label {
  font-size: 11px;
  color: #9ca3af;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #020617;
  color: #e5e7eb;
  padding: 7px 9px;
  font-size: 13px;
  outline: none;
  resize: vertical;
  width: 100%;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  border-color: var(--accent);
}

.admin-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.admin-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-list-title {
  font-size: 14px;
  font-weight: 600;
}

.admin-list-subtitle {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  font-size: 13px;
}

.admin-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.admin-card-main {
  display: flex;
  gap: 8px;
}

.admin-card-emoji {
  display: none;
}

.admin-card-thumb {
  width: 60px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: #020617;
}

.admin-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-card-name {
  font-weight: 600;
}

.admin-card-meta {
  font-size: 11px;
  color: #9ca3af;
}

.admin-card-file {
  font-size: 11px;
  color: #e5e7eb;
}

.admin-card-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.admin-empty {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  padding: 12px 0;
}

.admin-error {
  font-size: 13px;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.14);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 8px;
}

@media (max-width: 380px) {
  .filters {
    flex-direction: column;
  }

  .filter-group {
    min-width: 100%;
  }
}
/* --- ADMIN PANEL REFINEMENTS --- */

.admin-app {
  padding-top: 8px;
  padding-bottom: 32px;
}

/* Заголовок админки */
.admin-app h1 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Табы "Модели / Заявки" */
.admin-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
  margin-bottom: 12px;
}

.admin-tabs button,
.admin-tab {
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.admin-tabs button:hover,
.admin-tab:hover {
  background: rgba(15, 23, 42, 0.9);
}

.admin-tabs button.active,
.admin-tabs button[data-active="true"],
.admin-tab.admin-tab-active {
  background: linear-gradient(90deg, #f97316, #fb923c);
  color: #111827;
  box-shadow: 0 6px 16px rgba(248, 150, 79, 0.5);
}

/* Поля формы */
.admin-section {
  margin-top: 6px;
  backdrop-filter: blur(10px);
}

/* Кнопки в админке (Сохранить, Отменить, Редактировать, Удалить) */
.admin-app button:not(.card-add-btn):not(.cart-remove-btn):not(.primary-btn):not(.secondary-btn) {
  font-family: inherit;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease, transform 0.08s ease-out;
}

/* Не трогаем стандартные кнопки выбора файла */
.admin-app input[type="file"] {
  font-size: 12px;
}

/* Красивые кнопки для основного действия */
.admin-actions button:first-child,
.admin-card-actions button:first-child {
  background: linear-gradient(90deg, #f97316, #fb923c);
  border-color: transparent;
  color: #111827;
  box-shadow: 0 8px 22px rgba(248, 150, 79, 0.6);
}

/* Кнопка удаления – красная */
.admin-card-actions button:last-child {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

.admin-app button:active {
  transform: scale(0.97);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
}

/* Подписи и мелкие тексты */
.admin-form-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-form-title::after {
  content: "• Добавляйте машины и карты для Assetto Corsa";
  font-size: 11px;
  font-weight: 400;
  color: #6b7280;
}

/* Список моделек в админке */
.admin-list {
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #000 100%);
  border-radius: 14px;
  padding: 8px;
}

.admin-card {
  position: relative;
  overflow: hidden;
}

.admin-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(248, 150, 79, 0.15), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out;
}

.admin-card:hover::before {
  opacity: 1;
}

/* Мелкая инфа под названием */
.admin-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.admin-card-meta span {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

/* Скролл в списке моделек чуть аккуратнее */
.admin-list::-webkit-scrollbar {
  width: 4px;
}

.admin-list::-webkit-scrollbar-track {
  background: transparent;
}

.admin-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.7);
  border-radius: 999px;
}
/* --- Красивые поля формы в админке --- */

.admin-field input,
.admin-field select,
.admin-field textarea {
  font-family: inherit;
  font-size: 13px;
  color: #e5e7eb;
  background: radial-gradient(circle at top left, #020617 0, #020617 45%, #020617 100%);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    transform 0.08s ease-out;
}

/* Пилл-формы для инпутов и select */
.admin-field input,
.admin-field select {
  border-radius: 999px;
}

/* Текстовые области – более мягкие карточки */
.admin-field textarea {
  border-radius: 14px;
  min-height: 70px;
  resize: vertical;
}

/* Ховер и фокус */
.admin-field input:hover,
.admin-field select:hover,
.admin-field textarea:hover {
  border-color: rgba(248, 150, 79, 0.8);
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.6),
    0 10px 24px rgba(0, 0, 0, 0.7);
  background: radial-gradient(circle at top left, #020617 0, #020617 45%, #020617 100%);
}

/* Плейсхолдеры чуть мягче */
.admin-field input::placeholder,
.admin-field textarea::placeholder {
  color: #6b7280;
  opacity: 1;
}

/* Чуть компактнее select */
.admin-field select {
  padding-right: 26px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position: right 9px top 11px, right 5px top 11px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
/* ===== ADMIN PATCH (ничего не ломает, только дополняет) ===== */

/* Чуть больше места под список (чтобы “полноценно показывало”) */
.admin-app .admin-list {
  max-height: 70vh;
}

/* Увеличим превью в карточке чуть-чуть (не обязательно, но приятнее) */
.admin-app .admin-card-thumb {
  width: 84px;
  height: 60px;
}

/* Маленькие кнопки у файла (Открыть/Копировать) */
.admin-app .admin-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.admin-app .admin-mini-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.75);
  color: #e5e7eb;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}

.admin-app .admin-mini-btn:hover {
  border-color: rgba(249, 115, 22, 0.55);
}

/* Превью картинки в форме */
.admin-preview {
  margin-top: 10px;
}

.admin-preview-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.7);
  position: relative;
}

.admin-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.admin-preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 12px;
}

/* когда есть src — показываем */
#carImagePreview[src]:not([src=""]) {
  display: block !important;
}
#carImagePreview[src]:not([src=""]) + #carImagePreviewEmpty {
  display: none !important;
}
/* ===== FIX: чтобы все элементы карточки были видны и кнопки не прятались ===== */

.admin-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.admin-card-main {
  min-width: 0;              /* критично для Telegram */
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-card-text {
  min-width: 0;
  flex: 1;
}

.admin-card-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  min-width: 150px;          /* чтобы “Редактировать/Удалить” помещались */
}

.admin-card-actions .btn {
  width: 150px;
  justify-content: center;
}

/* чтобы пилюли-meta всегда красиво смотрелись */
.admin-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.admin-card-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 11px;
  color: #e5e7eb;
}

/* мобильный / узкий Telegram */
@media (max-width: 520px) {
  .admin-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-card-actions {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    min-width: 0;
  }

  .admin-card-actions .btn {
    width: auto;
  }
}
/* ===== MOBILE FIX: карточка целиком + кнопки всегда видны ===== */

html, body { overflow-x: hidden; }

/* На телефоне убираем вложенный скролл списка — пусть скроллится вся страница */
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .admin-list {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  /* Карточка становится вертикальной (1 колонка) */
  .admin-app .admin-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .admin-app .admin-card-main {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Текст не вылазит вправо */
  .admin-app .admin-card-text { min-width: 0 !important; }
  .admin-app .admin-card-name {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Кнопки вниз, большие и кликабельные */
  .admin-app .admin-card-actions {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .admin-app .admin-card-actions button {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
  }

  /* Превью не должно быть огромным и не должно ломать ширину */
  .admin-app .admin-card-thumb {
    width: 86px !important;
    height: 64px !important;
    flex: 0 0 auto !important;
  }
}
/* --- NEW: hp range + toggle in filters --- */
.filter-range{
  display:flex;
  gap:10px;
}
.filter-range input{
  width:100%;
}

.filter-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  user-select:none;
}

.filter-toggle input{
  width:18px;
  height:18px;
}

/* если фильтры в 2 колонки — на очень узких экранах пусть будет 1 колонка */
@media (max-width: 420px){
  .filter-range{ gap:8px; }
}
