/* -------------------------------------------------------------
   Переменные и общие параметры страницы каталога
   ------------------------------------------------------------- */
:root {
  --border-cyan: rgba(56, 189, 248, 0.35);
  --border-subtle: rgba(56, 189, 248, 0.2);
  --accent-cyan: #38bdf8;
  --accent-purple: #a855f7;
  --accent-teal: #14b8a6;
}

.page-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* -------------------------------------------------------------
   Тестовая сессия пользователя
   ------------------------------------------------------------- */
.test-login-strip {
  background: rgba(14, 21, 36, 0.65);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.test-login-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.test-login-label svg {
  color: var(--accent-cyan);
}

.test-login-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 480px;
}

.test-login-input {
  flex: 1;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.test-login-input:focus {
  border-color: var(--accent-cyan);
}

.btn-test-login-save {
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.35);
  color: #e0e7ff;
  border: 1px solid rgba(99, 102, 241, 0.5);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-test-login-save:hover {
  background: var(--primary);
  color: #fff;
}

.test-user-badge {
  font-size: 0.8rem;
  color: var(--accent-green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
}

/* -------------------------------------------------------------
   МОНОЛИТНЫЙ ДОК ПОИСКА + ПЛАВНЫЙ СТЫК С ДРОВЕРОМ
   ------------------------------------------------------------- */
.search-dock-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.search-glass-dock {
  display: flex;
  align-items: stretch;
  background: rgba(14, 21, 36, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: border-radius 0.2s ease, border-color 0.22s ease;
  position: relative;
  z-index: 10;
}

.search-dock-wrapper.is-drawer-open .search-glass-dock {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.search-glass-dock:focus-within {
  border-color: rgba(56, 189, 248, 0.65);
}

.dock-input-group {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  min-width: 240px;
}

.dock-input-group svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.dock-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.95rem;
  padding: 13px 0;
}

.dock-search-input::placeholder {
  color: #64748b;
}

.dock-buttons-group {
  display: flex;
  align-items: stretch;
  border-left: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(11, 15, 25, 0.4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  overflow: hidden;
}

.search-dock-wrapper.is-drawer-open .dock-buttons-group {
  border-bottom-right-radius: 0;
}

.dock-btn {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--text-main);
  padding: 0;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: stretch;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  height: 100%;
}

.dock-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
}

.dock-btn.active-panel {
  background: rgba(99, 102, 241, 0.28);
  color: #c7d2fe;
}

.dock-btn .chip-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 100%;
}

.chip-count-sep {
  width: 1px;
  background: rgba(11, 15, 25, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  align-self: stretch;
  flex-shrink: 0;
}

.chip-count-num {
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.25);
  font-variant-numeric: tabular-nums;
  align-self: stretch;
  min-width: 24px;
  flex-shrink: 0;
  transition: var(--transition);
}

.dock-btn:hover .chip-count-num {
  color: #fff;
}

.dock-btn.btn-submit {
  background: rgba(99, 102, 241, 0.35);
  color: #e0e7ff;
  border-right: none;
  font-weight: 700;
  padding: 0 20px;
  align-items: center;
  gap: 8px;
}

.dock-btn.btn-submit:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

/* -------------------------------------------------------------
   ВСТРОЕННЫЙ ДРОВЕР ФИЛЬТРОВ
   ------------------------------------------------------------- */
.filter-drawer {
  display: none;
  background: rgba(14, 21, 36, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-cyan);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 14px 0 12px 0;
  margin-top: -1px;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 9;
  animation: expandDrawer 0.2s ease forwards;
}

.filter-drawer.open {
  display: flex;
}

@keyframes expandDrawer {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-master-top-bar {
  padding: 0 20px 10px 20px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.master-tabs-wrap {
  display: inline-flex;
  align-items: stretch;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.master-tab-btn {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(56, 189, 248, 0.22);
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
  user-select: none;
}

.master-tab-btn:last-child {
  border-right: none;
}

.master-tab-btn:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.12);
}

.master-tab-btn.active {
  background: rgba(99, 102, 241, 0.32);
  color: #e0e7ff;
  border-bottom: 2px solid var(--primary);
}

.master-actions-wrap {
  display: flex;
  align-items: stretch;
  margin-left: auto;
  background: rgba(11, 15, 25, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.master-dock-btn {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(56, 189, 248, 0.2);
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  white-space: nowrap;
}

.master-dock-btn:last-child {
  border-right: none;
}

.master-dock-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
}

.master-dock-btn.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Секции категорий внутри дровера */
.filter-group-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group-header {
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  user-select: none;
}

.filter-group-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.filter-group-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.filter-group-title-wrap:hover .filter-group-label {
  color: #fff;
}

.filter-header-divider {
  color: rgba(148, 163, 184, 0.35);
  font-size: 0.8rem;
}

.filter-group-counter {
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748b;
  transition: var(--transition);
}

.filter-group-counter.has-selection {
  color: var(--accent-cyan);
  font-weight: 700;
}

.filter-collapsible-content {
  display: none;
  flex-direction: column;
}

.filter-collapsible-content.open {
  display: flex;
}

.group-inline-toolbar {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.inline-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.inline-search-ico {
  position: absolute;
  left: 8px;
  color: #64748b;
  pointer-events: none;
}

.inline-search-input {
  background: rgba(11, 15, 25, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-sm);
  padding: 4px 22px 4px 26px;
  font-size: 0.72rem;
  color: #f1f5f9;
  outline: none;
  width: 130px;
  transition: var(--transition);
}

.inline-search-input:focus {
  border-color: var(--accent-cyan);
  width: 160px;
}

.inline-search-clear {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.segmented-dock {
  display: inline-flex;
  align-items: stretch;
  background: rgba(11, 15, 25, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.dock-pill-btn {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(56, 189, 248, 0.2);
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
}

.dock-pill-btn:last-child {
  border-right: none;
}

.dock-pill-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
}

.dock-pill-btn.active {
  background: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

.dock-pill-btn.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.expand-icon {
  transition: transform 0.2s ease;
}

.dock-pill-btn.expanded .expand-icon {
  transform: rotate(180deg);
}

/* Ленты чипов фильтра */
.filter-chips-dock {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  background: rgba(11, 15, 25, 0.45);
  border-top: 1px solid rgba(56, 189, 248, 0.28);
  border-bottom: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.filter-badge-chip {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(56, 189, 248, 0.22);
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  font-size: 0.74rem;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: stretch;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
  height: 31px;
}

.filter-badge-chip .chip-main {
  padding: 0 10px 0 12px;
}

.chip-checkbox-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  background: rgba(11, 15, 25, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.chip-checkbox-box svg {
  opacity: 0;
  transform: scale(0.6);
  transition: var(--transition);
  color: #0b0f19;
  width: 10px;
  height: 10px;
}

.filter-badge-chip:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
}

.filter-badge-chip.active {
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.25);
}

.filter-badge-chip.active .chip-checkbox-box {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.filter-badge-chip.active .chip-checkbox-box svg {
  opacity: 1;
  transform: scale(1);
}

.chip-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(11, 15, 25, 0.5);
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 800;
  font-style: italic;
  font-family: serif;
  margin: auto 8px auto 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.chip-info-btn:hover {
  color: #fff;
  border-color: var(--accent-cyan);
}

/* Годы выхода */
.years-unified-dock {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.year-range-dock-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 20px;
  background: rgba(11, 15, 25, 0.4);
  border-bottom: 1px solid rgba(56, 189, 248, 0.28);
  flex-wrap: wrap;
}

.year-range-lbl {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.year-range-inputs-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.year-input-num {
  width: 110px;
  background: rgba(11, 15, 25, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
}

.year-input-num:focus {
  border-color: var(--accent-cyan);
}

.btn-year-add {
  background: rgba(14, 21, 36, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #64748b;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0.45;
}

.btn-year-add.ready {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(99, 102, 241, 0.55);
  color: #e0e7ff;
  cursor: pointer;
  opacity: 1;
}

.btn-year-add.ready:hover {
  background: var(--primary);
  color: #fff;
}

/* Источники и переводы */
.translations-section-card {
  background: rgba(11, 15, 25, 0.35);
  border-top: 1px solid rgba(56, 189, 248, 0.28);
  border-bottom: 1px solid rgba(56, 189, 248, 0.28);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0 6px 0;
}

.trans-sub-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trans-sub-header {
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trans-sub-title {
  font-size: 0.73rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.trans-sub-title:hover {
  color: #fff;
}

.trans-search-strip {
  padding: 6px 20px 6px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.translations-scroll-area {
  width: 100%;
  border-top: 1px solid rgba(56, 189, 248, 0.24);
  border-bottom: 1px solid rgba(56, 189, 248, 0.24);
  background: rgba(11, 15, 25, 0.45);
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.trans-item-row {
  background: rgba(11, 15, 25, 0.5);
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  display: flex;
  align-items: stretch;
  cursor: pointer;
  transition: var(--transition);
}

.trans-item-row:last-child {
  border-bottom: none;
}

.trans-item-row:hover {
  background: rgba(56, 189, 248, 0.1);
}

.trans-item-row.active {
  background: rgba(56, 189, 248, 0.18);
}

.trans-row-main {
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
}

.trans-left-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  background: rgba(11, 15, 25, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.custom-checkbox svg {
  opacity: 0;
  transform: scale(0.6);
  color: #0b0f19;
}

.trans-item-row.active .custom-checkbox {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.trans-item-row.active .custom-checkbox svg {
  opacity: 1;
  transform: scale(1);
}

.trans-name-text {
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f1f5f9;
}

.trans-desc-text {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Сохранение пресета */
.preset-save-strip {
  padding: 10px 20px;
  background: rgba(11, 15, 25, 0.45);
  border-top: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.preset-save-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.preset-save-dock {
  display: inline-flex;
  align-items: stretch;
  background: rgba(11, 15, 25, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.preset-save-input {
  background: transparent;
  border: none;
  outline: none;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: var(--text-main);
  width: 260px;
}

.btn-preset-save {
  background: rgba(99, 102, 241, 0.28);
  border: none;
  border-left: 1px solid rgba(56, 189, 248, 0.25);
  color: #e0e7ff;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-preset-save:hover {
  background: var(--primary);
  color: #fff;
}

.filter-drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px 0 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-reset-filters {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-reset-filters:hover {
  color: var(--accent-red);
}

/* -------------------------------------------------------------
   Свои настройки (Пресеты)
   ------------------------------------------------------------- */
.presets-monolith-block {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.custom-presets-scroll-area {
  width: 100%;
  border-top: 1px solid rgba(56, 189, 248, 0.28);
  border-bottom: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(11, 15, 25, 0.45);
  max-height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.preset-item-row {
  background: rgba(11, 15, 25, 0.5);
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  display: flex;
  align-items: center;
  padding: 10px 18px;
  gap: 14px;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}

.preset-item-row:hover {
  background: rgba(56, 189, 248, 0.1);
}

.preset-item-row.active {
  background: rgba(56, 189, 248, 0.18);
}

.preset-left-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.btn-default-star-check {
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-size: 0.69rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
}

.btn-default-star-check.is-default {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #fff;
}

.preset-name-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #f1f5f9;
}

.preset-desc-line {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.preset-bulk-strip {
  display: none;
  padding: 9px 20px;
  background: linear-gradient(90deg, rgba(14, 25, 48, 0.95) 0%, rgba(19, 32, 60, 0.9) 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.preset-bulk-strip.is-visible {
  display: flex;
}

.bulk-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #cbd5e1;
  text-transform: uppercase;
}

.bulk-count-badge {
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.bulk-actions-dock {
  display: inline-flex;
  align-items: stretch;
  background: rgba(11, 15, 25, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.bulk-dock-btn {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(56, 189, 248, 0.22);
  color: #cbd5e1;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.bulk-dock-btn:last-child {
  border-right: none;
}

.bulk-dock-btn:hover {
  background: rgba(56, 189, 248, 0.16);
  color: #fff;
}

.bulk-dock-btn.btn-bulk-default {
  color: #fcd34d;
}

.bulk-dock-btn.btn-bulk-danger {
  color: #fca5a5;
}

.bulk-dock-btn.btn-bulk-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fff;
}

/* Книжная закладка-бейдж снизу справа */
.filter-bookmark-row {
  display: none;
  justify-content: flex-end;
  margin-top: -1px;
  position: relative;
  z-index: 10;
}

.search-dock-wrapper.is-drawer-open .filter-bookmark-row {
  display: flex;
}

.media-total-dock {
  display: inline-flex;
  align-items: stretch;
  background: rgba(14, 21, 36, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-cyan);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  height: 31px;
  overflow: hidden;
}

.bookmark-label {
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbd5e1;
  border-right: 1px solid rgba(56, 189, 248, 0.24);
}

.bookmark-count {
  background: rgba(11, 15, 25, 0.4);
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  border-right: 1px solid rgba(56, 189, 248, 0.24);
}

.custom-default-count {
  color: #fcd34d;
}

.media-total-count {
  color: var(--accent-cyan);
  border-right: none;
}

/* -------------------------------------------------------------
   МОНОЛИТНАЯ ПАГИНАЦИЯ
   ------------------------------------------------------------- */
.catalog-bar-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0;
  padding: 20px 0 6px 0;
}

.catalog-bar-row-bottom {
  margin-top: 10px;
  padding-bottom: 24px;
}

.page-nav-monolith {
  display: inline-flex;
  align-items: stretch;
  background: rgba(14, 21, 36, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  height: 32px;
  user-select: none;
  position: relative;
  overflow: visible;
}

.monolith-divider {
  width: 2px;
  background: rgba(8, 12, 20, 0.95);
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  border-left: 1px solid rgba(0, 0, 0, 0.6);
  align-self: stretch;
  flex-shrink: 0;
}

.nav-arrow-btn {
  background: rgba(11, 15, 25, 0.45);
  border: none;
  border-right: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-arrow-btn.btn-prev {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.nav-arrow-btn.btn-next {
  border-right: none;
}

.nav-arrow-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.18);
  color: #fff;
}

.nav-arrow-btn:disabled {
  color: #475569;
  cursor: not-allowed;
  opacity: 0.45;
}

.page-numbers-strip {
  display: inline-flex;
  align-items: stretch;
  background: rgba(11, 15, 25, 0.45);
}

.nav-page-num-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-subtle);
  color: var(--text-muted);
  min-width: 32px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-variant-numeric: tabular-nums;
}

.nav-page-num-btn:hover:not(.active) {
  background: rgba(56, 189, 248, 0.14);
  color: #fff;
}

.nav-page-num-btn.active {
  background: rgba(56, 189, 248, 0.32);
  color: #ffffff;
  font-weight: 800;
  box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.38);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
  cursor: default;
}

/* Блок прямого ввода */
.page-direct-cell {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  background: rgba(19, 28, 48, 0.7);
  transition: var(--transition);
}

.page-direct-tab {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 19px;
  background: rgba(19, 28, 48, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-cyan);
  border-bottom: 1px solid rgba(19, 28, 48, 0.95);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-cyan);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.3);
  z-index: 5;
  margin-bottom: -1px;
  transition: var(--transition);
}

.page-direct-tab:hover {
  background: rgba(25, 38, 66, 0.98);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.7);
}

.page-direct-cell:focus-within {
  background: rgba(25, 38, 66, 0.9);
}

.page-direct-cell:focus-within .page-direct-tab {
  background: rgba(25, 38, 66, 0.98);
  border-color: rgba(56, 189, 248, 0.7);
  border-bottom-color: rgba(25, 38, 66, 0.98);
  color: #fff;
}

.page-direct-label {
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #cbd5e1;
  border-right: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(11, 15, 25, 0.45);
  white-space: nowrap;
}

.page-direct-label svg {
  color: var(--accent-cyan);
}

.page-direct-input {
  width: 48px;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  text-align: center;
  padding: 0 4px;
  transition: var(--transition);
  -moz-appearance: textfield;
}

.page-direct-input::-webkit-outer-spin-button,
.page-direct-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.page-direct-input:focus {
  background: rgba(56, 189, 248, 0.15);
}

.page-direct-countdown-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent-cyan);
  width: 0%;
  opacity: 0;
  box-shadow: 0 0 6px var(--accent-cyan);
  transition: width 2.5s linear, opacity 0.2s ease;
}

.page-direct-countdown-bar.running {
  width: 100%;
  opacity: 1;
}

.page-info-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(11, 15, 25, 0.38);
  white-space: nowrap;
}

.page-info-cell b {
  color: var(--accent-cyan);
  font-weight: 700;
}

.page-info-cell .total-pages-num {
  color: #f1f5f9;
  font-weight: 600;
}

.total-media-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(14, 21, 36, 0.6);
  white-space: nowrap;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.total-media-cell b {
  color: #f1f5f9;
  font-weight: 700;
}

/* -------------------------------------------------------------
   СЕТКА КАРТОЧЕК
   ------------------------------------------------------------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 20px;
  min-height: 420px;
}

.media-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.media-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(56, 189, 248, 0.2);
}

.card-poster-wrap {
  width: 100%;
  height: 290px;
  background: #0d1424;
  position: relative;
  overflow: hidden;
}

.card-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-card:hover .card-poster-wrap img {
  transform: scale(1.04);
}

.card-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #131b2e 0%, #060911 100%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.card-user-status-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.card-user-status-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.card-minimal-footer {
  padding: 10px 12px;
  background: rgba(14, 21, 36, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  flex: 1;
}

.media-title-anchor {
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.media-card:hover .media-title-anchor {
  color: var(--accent-cyan);
}

/* Пустое состояние */
.empty-search-state {
  display: none;
  background: rgba(14, 21, 36, 0.5);
  border: 1px dashed var(--border-cyan);
  border-radius: var(--radius-md);
  padding: 50px 20px;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.empty-search-state.visible {
  display: flex;
}

.empty-state-title {
  font-size: 1.2rem;
  color: var(--text-main);
}

.empty-state-text {
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .page-nav-monolith {
    flex-wrap: wrap;
    height: auto;
  }
  .page-nav-monolith > * {
    height: 32px;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 16px;
  }
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }
  .card-poster-wrap {
    height: 220px;
  }
  .dock-buttons-group .dock-btn span:not(.chip-count-num) {
    display: none;
  }
}