/* Платформа для байеров — тёмная тема */
:root {
  --bg: #14141a;
  --surface: #1a1a1f;
  --surface-header: #25252d;
  --border: #2d2d35;
  --border-hover: #3d3d48;
  --text: #e8e8ed;
  --text-muted: #8888a0;
  --accent: #6c5ce7;
  --accent-hover: #7d6ef7;
  --accent-alpha-10: rgba(108, 92, 231, 0.1);
  --accent-alpha-15: rgba(108, 92, 231, 0.15);
  --green: #22c55e;
  --orange: #ff9800;
  --red: #f44336;
  --link: #7d9eff;
  --link-hover: #9ab5ff;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --transition: 0.15s ease;
  /* Слои: выпадающие панели всегда поверх карточек, таблиц и скролла */
  --z-dropdown: 500;
  --z-dropdown-row: 520;
  --z-modal: 1000;
  --z-modal-nested: 1050;
  --z-lightbox: 12050;
  /* Ритм отступов (8px-сетка) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  /* Админ-панели (4 / 8 / 16 / 24) + единая высота контролов */
  --adm-gap-1: 4px;
  --adm-gap-2: 8px;
  --adm-gap-3: 16px;
  --adm-gap-4: 24px;
  --adm-control-min-h: 36px;
  --adm-font-ui: 0.8125rem;
  --adm-font-caption: 0.75rem;
  /* Тест-хаб: шкала шрифтов (5 ступеней) */
  --th-font-xs: 0.6875rem;   /* 11px — подписи, бейджи */
  --th-font-sm: 0.75rem;     /* 12px — ячейки таблиц */
  --th-font-md: 0.8125rem;   /* 13px — UI-текст, лейблы */
  --th-font-base: 0.875rem;  /* 14px — тело, инпуты */
  --th-font-lg: 1rem;        /* 16px — заголовки */
  /* Тест-хаб: единая высота контролов */
  --th-control-h: 32px;
  --th-control-h-lg: 36px;
  /* Скроллбары — единый вид (Firefox scrollbar-* + WebKit) */
  --scrollbar-size: 8px;
  --scrollbar-track: rgba(0, 0, 0, 0.28);
  --scrollbar-thumb: #3d3d48;
  --scrollbar-thumb-hover: #4e4e5c;
  --scrollbar-thumb-active: #5c5c6e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Единые скроллбары по всему приложению (страница, сайдбар, таблицы, модалки) */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}
*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}
*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: var(--radius-sm);
}
*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}
*::-webkit-scrollbar-thumb:active {
  background: var(--scrollbar-thumb-active);
}

.hidden {
  display: none !important;
}

/* ——— Экран входа ——— */
#screen-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.login-title {
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.login-form .field {
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.login-form input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-alpha-15);
}

.login-form input::placeholder {
  color: var(--text-muted);
}

.error-msg {
  color: var(--red);
  font-size: 0.875rem;
  margin: 0 0 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  line-height: 1.25;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* ——— Приложение: сетка колонок (сайдбар + контент) ——— */
#screen-app {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  min-height: 100vh;
  align-items: stretch;
  /* На мобильной версии поднимается в @media — высота .tasks-page учитывает верхнюю панель */
  --mobile-app-bar-offset: 0px;
}

.mobile-app-bar,
.mobile-nav-backdrop {
  display: none;
}

.sidebar {
  width: auto;
  min-width: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-head {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.sidebar-nick {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.btn-icon:hover {
  background: var(--accent-alpha-10);
  color: var(--accent);
}

.sidebar-nav {
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#sidebar-main-nav > * + *,
#sidebar-main-nav > .sidebar-main-details > .sidebar-main-details__group,
#sidebar-settings > .sidebar-nav > * + * {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
  padding: 10px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
}

.nav-link:hover {
  color: var(--text);
  background: var(--accent-alpha-10);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-alpha-10);
  border-left-color: var(--accent);
}

.nav-link.hidden-by-role {
  display: none;
}

.sidebar-admin {
  margin-top: auto;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.sidebar-admin-title {
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.sidebar-admin .nav-link {
  padding-left: 16px;
}

/* Кнопка «Назад» в настройках */
.btn-back {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.btn-back:hover {
  color: var(--accent);
  background: var(--accent-alpha-10);
}

.sidebar--settings .sidebar-head {
  flex-wrap: wrap;
}

.sidebar-settings-details {
  margin: 0;
  padding: 0;
  border: none;
}
.sidebar-settings-details > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition);
}
.sidebar-settings-details > summary::-webkit-details-marker {
  display: none;
}
.sidebar-settings-details > summary::marker {
  content: "";
}
.sidebar-settings-details > summary:hover {
  color: var(--text);
  background: var(--accent-alpha-10);
}
.sidebar-settings-details[open] > summary {
  color: var(--text);
}
.sidebar-settings-details:has(.nav-link.active) > summary {
  color: var(--accent);
  background: var(--accent-alpha-10);
  border-left-color: var(--accent);
}
.sidebar-settings-group-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 4px;
}
.sidebar-settings-divider {
  margin: 10px 16px 12px;
  height: 0;
  border: 0;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  list-style: none;
}
.nav-link--sub {
  padding-left: 28px;
  font-size: 0.85rem;
}

/* ——— Основное меню: раскрывающийся «Тест-хаб» ——— */
.sidebar-main-details {
  margin: 0;
  padding: 0;
  border: none;
}
.sidebar-main-details > summary {
  list-style: none;
}
.sidebar-main-details > summary::-webkit-details-marker {
  display: none;
}
.sidebar-main-details > summary::marker {
  content: "";
}
.sidebar-main-details > summary.nav-link--summary {
  cursor: pointer;
}
.sidebar-main-details__group {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 2px;
}
.sidebar-main-details__group .nav-link--sub + .nav-link--sub {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-main-details__group .nav-link--sub {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-main-details__group .nav-link--sub::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.55;
  flex-shrink: 0;
}
.sidebar-main-details__group .nav-link--sub.active::before {
  opacity: 0.9;
}
.section-settings-subtitle--first {
  margin-top: 0;
}

/* ——— Контент ——— */
.content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: var(--space-5);
  overflow: auto;
  background: var(--bg);
}

/* Мобильная навигация: выезжающее меню; десктоп без изменений (см. .mobile-app-bar { display:none } выше) */
@media (max-width: 900px) {
  #screen-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: stretch;
    --mobile-app-bar-offset: 52px;
  }

  .mobile-app-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-left: calc(12px + env(safe-area-inset-left, 0px));
    padding-right: calc(12px + env(safe-area-inset-right, 0px));
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .btn-mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
  }

  .btn-mobile-menu:hover {
    background: var(--accent-alpha-10);
    color: var(--accent);
  }

  .btn-mobile-menu:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .mobile-app-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.25;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }

  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  body.mobile-drawer-open .mobile-nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #sidebar-main,
  #sidebar-settings {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(288px, 88vw);
    max-width: 100%;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.mobile-drawer-open #sidebar-main:not(.hidden),
  body.mobile-drawer-open #sidebar-settings:not(.hidden) {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  .content {
    flex: 1;
    min-height: 0;
  }

  body.mobile-drawer-open {
    overflow: hidden;
  }

  /* iOS Safari: не масштабировать весь viewport при фокусе на полях с шрифтом < 16px */
  html {
    touch-action: manipulation;
  }

  #app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="file"]):not([type="color"]),
  #app select,
  #app textarea,
  #app [contenteditable="true"] {
    font-size: max(16px, 1em) !important;
  }
}

.content-placeholder,
.content-page {
  max-width: 900px;
}

.content-page--fullwidth {
  max-width: none;
  width: 100%;
}

.content-page-loading {
  margin: 0;
  padding: 8px 0;
  font-size: 0.9rem;
}

.settings-profile-page {
  max-width: 420px;
}
.settings-profile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  background: var(--surface);
  box-sizing: border-box;
}
.settings-profile-card--emoji-corner {
  position: relative;
  padding-top: 56px;
  padding-right: 64px;
}
/* Составной селектор: иначе .settings-emoji-wrap { position: relative } ниже по файлу
   перебивает position:absolute и кнопка смайла остаётся в потоке слева */
.settings-emoji-wrap.settings-emoji-wrap--corner {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  bottom: auto;
  z-index: 2;
  margin: 0;
  flex: none;
}
.settings-emoji-wrap--corner .settings-emoji-popover {
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  width: min(320px, 88vw);
  max-height: min(340px, 52vh);
  overflow: hidden;
}
.settings-emoji-wrap--corner .settings-emoji-grid {
  grid-template-columns: repeat(8, 1fr);
  max-height: min(300px, 48vh);
  overflow-y: auto;
}
.settings-emoji-wrap--corner .settings-emoji-picker-el {
  display: block;
  width: min(360px, calc(100vw - 48px));
  height: min(320px, 52vh);
  max-height: 52vh;
}
.settings-emoji-loading {
  margin: 0;
  font-size: 0.85rem;
}
.settings-profile-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
}
.settings-profile-field:last-of-type {
  margin-bottom: 0;
}
.settings-profile-field--name {
  align-items: flex-start;
}
.settings-profile-label {
  flex: 0 0 88px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.settings-profile-value {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  color: var(--text);
  word-break: break-word;
}
.settings-emoji-wrap {
  position: relative;
  flex: 0 0 auto;
}
.settings-emoji-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  transition: background var(--transition), border-color var(--transition);
}
.settings-emoji-btn:hover {
  border-color: var(--border-hover);
  background: var(--surface-header);
}
.settings-emoji-popover {
  position: absolute;
  z-index: var(--z-dropdown);
  right: 0;
  top: calc(100% + 8px);
  width: min(280px, 85vw);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.settings-emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.settings-emoji-pick {
  width: 100%;
  aspect-ratio: 1;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  transition: background var(--transition);
}
.settings-emoji-pick:hover {
  background: var(--accent-alpha-15);
}
.settings-profile-actions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.settings-profile-emoji {
  margin-bottom: 20px;
  max-width: 560px;
}
.settings-profile-emoji-hint {
  font-size: 0.875rem;
  margin: 4px 0 10px;
}
.settings-profile-emoji-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.settings-profile-emoji-input {
  max-width: 220px;
  padding: 8px 10px;
  font-size: 1.1rem;
  line-height: 1.3;
}
.settings-profile-msg {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.settings-admin-badge {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--accent-alpha-10);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-alpha-15);
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}
.badge--admin {
  background: var(--accent);
  color: white;
}

.content-page h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.content-muted {
  color: var(--text-muted);
  margin: 0;
}

/* ——— Админка: таблица и формы ——— */
.admin-toolbar {
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  width: 100%;
}

.admin-table--grid {
  border-collapse: separate;
  border-spacing: 0;
}
.admin-table--grid th,
.admin-table--grid td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.admin-table--grid thead th {
  border-top: 1px solid var(--border);
}
.admin-table--grid th:first-child,
.admin-table--grid td:first-child {
  border-left: 1px solid var(--border);
}

.admin-user-name-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.admin-user-name-text {
  min-width: 0;
}
.admin-online-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}
.admin-online-dot--on {
  background: #22c55e;
}
.admin-online-dot--off {
  background: #64748b;
}

.admin-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  vertical-align: middle;
}
.admin-icon-btn:hover {
  background: var(--accent-alpha-10);
  color: var(--text);
}
.admin-icon-btn--danger {
  color: #f87171;
}
.admin-icon-btn--danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.admin-table .td-actions--icons {
  white-space: nowrap;
  text-align: center;
  width: 1%;
}
.admin-table .td-actions--del {
  text-align: center;
  width: 48px;
}

.modal-tabs-bar {
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--border);
}
.modal-tab-btn {
  padding: 10px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: -1px;
}
.modal-tab-btn:hover {
  color: var(--text);
}
.modal-tab-btn--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.modal--user-settings .modal-actions--tab {
  justify-content: flex-start;
  margin-top: 8px;
}

.admin-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.2;
}

.admin-table th {
  background: var(--surface-header);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table--grid tr:last-child td {
  border-bottom: 1px solid var(--border);
}

.admin-table tr:hover td {
  background: var(--accent-alpha-10);
}

.admin-table .role-admin {
  color: var(--accent);
}

.admin-table .status-online {
  color: var(--green);
}

.admin-table .status-offline {
  color: var(--text-muted);
}

.admin-table .btn-sm {
  padding: 4px 8px;
  font-size: 0.75rem;
  margin-right: 4px;
}

.td-permissions {
  max-width: 280px;
}
.perm-chip {
  display: inline-block;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  background: var(--accent-alpha-10);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}
.perm-chip--group {
  background: rgba(108, 92, 231, 0.12);
  border: 1px dashed rgba(108, 92, 231, 0.35);
}
.admin-section {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.admin-section__title {
  margin: 0 0 var(--space-2);
  font-size: 1.125rem;
  font-weight: 600;
}
.admin-section__hint {
  margin: 0 0 var(--space-3);
  font-size: 0.875rem;
  max-width: 52rem;
  line-height: 1.45;
}
.admin-groups-list {
  margin-top: var(--space-3);
}
.admin-access-groups__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}
.admin-access-groups__intro {
  flex: 1 1 280px;
  min-width: 0;
}
.admin-access-groups__title {
  margin: 0 0 6px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.admin-access-groups__lede {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 42rem;
}
.admin-access-groups__cta {
  flex-shrink: 0;
  align-self: flex-start;
}
.admin-access-groups__empty {
  padding: var(--space-4) var(--space-3);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-header);
}
.admin-access-groups__empty-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.admin-access-groups__empty-text {
  margin: 0;
  font-size: 0.85rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}
.admin-access-groups__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-access-group-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-access-group-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.admin-access-group-card__accent {
  width: 4px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(108, 92, 231, 0.45) 100%);
}
.admin-access-group-card__body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px 14px;
}
.admin-access-group-card__name {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}
.admin-access-group-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.admin-access-group-card__empty-chips {
  font-size: 0.8125rem;
}
.admin-access-group-card__toolbar {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-left: 1px solid var(--border);
  background: var(--surface-header);
}
@media (max-width: 520px) {
  .admin-access-group-card {
    flex-wrap: wrap;
  }
  .admin-access-group-card__toolbar {
    flex: 1 1 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
  }
}
.perm-chip--inline {
  font-size: 0.7rem;
  padding: 2px 7px;
}
.admin-group-pages-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: var(--space-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.perms-all {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.td-actions {
  white-space: nowrap;
}
.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--accent-alpha-10);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary {
  background: var(--surface-header);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border-hover);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}

.btn-danger:hover {
  background: rgba(244, 67, 54, 0.15);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  max-width: 420px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.modal h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.modal .field {
  margin-bottom: 12px;
}

.modal .field label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.modal .field input,
.modal .field select,
.modal .field textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}
.modal .field textarea {
  resize: vertical;
  min-height: 72px;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-actions .btn-primary {
  width: auto;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

.checkbox-group input {
  width: auto;
}

/* Сетка прав — компактно */
.permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.permission-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  transition: border-color var(--transition);
}
.permission-card:hover {
  border-color: var(--accent);
}
.permission-card input {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}
.permission-card input:checked + span {
  color: var(--accent);
  font-weight: 600;
}
.modal--permissions {
  max-width: 400px;
  padding: 16px 18px;
}
.modal--permissions h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.modal--permissions .field {
  margin-bottom: 10px;
}
.modal--permissions .modal-actions {
  margin-top: 14px;
}

/* Поп-ап визитов */
.visits-modal-overlay .visits-modal {
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}
.visits-popup-body {
  margin-bottom: 16px;
}
.visits-popup-section {
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.visits-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
}
.visits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.visits-table th,
.visits-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.visits-table th {
  color: var(--text-muted);
  font-weight: 600;
}
.visit-date { font-weight: 500; }
.visit-date--today { color: var(--green); }
.visit-date--yesterday { color: var(--orange); }
.visit-date--older { color: var(--red); }
.visits-list {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.visits-list li {
  margin-bottom: 4px;
}
.visits-page {
  color: var(--text);
  font-weight: 500;
}

/* ——— Уникализатор ——— */
.uniquizer-page-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.uniquizer-shell {
  max-width: 560px;
  margin-top: 12px;
}
.uniquizer-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.uniquizer-drop {
  position: relative;
  min-height: 200px;
  padding: 32px 24px;
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(26, 26, 31, 0.6) 100%);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.uniquizer-drop:hover,
.uniquizer-drop:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-alpha-15);
}
.uniquizer-drop--hover {
  border-color: var(--accent);
  background: var(--accent-alpha-10);
}
.uniquizer-drop--has-file {
  border-style: solid;
  border-color: var(--green);
}
.uniquizer-drop-icon {
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0.9;
}
.uniquizer-drop-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.uniquizer-drop-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.uniquizer-filename {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--green);
  font-weight: 500;
  word-break: break-all;
}
.uniquizer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.uniquizer-row label {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.uniquizer-count-input {
  min-width: 92px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
}
.uniquizer-run-btn {
  margin-left: auto;
}
.uniquizer-progress-wrap {
  margin-top: 20px;
}
.uniquizer-progress-bar {
  height: 10px;
  background: var(--surface);
  border-radius: 5px;
  overflow: hidden;
}
.uniquizer-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  transition: width 0.2s ease;
}
.uniquizer-progress-text {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.uniquizer-download-wrap {
  margin-top: 16px;
}
.uniquizer-ready-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: 280px;
}
.uniquizer-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.uniquizer-download-btn__icon {
  display: inline-flex;
  line-height: 0;
  flex-shrink: 0;
}
.uniquizer-download-btn__icon svg {
  display: block;
}
.uniquizer-new-file-btn {
  width: 100%;
}
.uniquizer-error {
  margin-top: 12px;
  color: var(--red);
  font-size: 0.875rem;
}

.admin-menu-order {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.admin-menu-order h4 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}
.menu-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.menu-order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: grab;
}
.menu-order-item:active {
  cursor: grabbing;
}
.menu-order-item.drag-over {
  outline: 1px dashed var(--accent);
  outline-offset: 2px;
}
.menu-order-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.menu-order-item-ic {
  width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.menu-order-item-title {
  font-weight: 500;
}
.menu-order-icon-btn {
  flex-shrink: 0;
  font-size: 0.8rem;
  padding: 6px 10px;
}
.menu-order-modal-wide {
  max-width: 520px;
}
.menu-order-hint {
  margin: 0 0 12px;
  font-size: 0.85rem;
}
.menu-order-hint a {
  color: var(--accent);
}
.menu-icon-picker-stack {
  z-index: 12000;
}
.menu-icon-picker .menu-icon-search {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  background: var(--bg);
  color: inherit;
}
.menu-icon-results {
  max-height: 280px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.menu-icon-pick,
.item-x3 {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  font-size: 0.82rem;
  color: inherit;
}
.menu-icon-pick:hover,
.item-x3:hover {
  border-color: var(--accent);
  background: var(--accent-alpha-10);
}
.menu-icon-pick span,
.item-x3 span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-icon-pick-img,
.menu-order-item-ic-img {
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.nav-link--with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-link__icon--mask {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-block;
  background-color: currentColor;
  opacity: 0.92;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.menu-order-item-ic-mask {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex-shrink: 0;
  background-color: var(--text-muted);
  opacity: 0.88;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.menu-settings-page {
  padding-bottom: 24px;
}
.menu-settings-shell {
  max-width: 520px;
}
.menu-settings-title {
  margin: 0 0 18px;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.menu-settings-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.menu-settings-page .menu-settings-order-list {
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
}
.menu-settings-card .menu-settings-order-row {
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 12px 14px;
  gap: 10px;
}
.menu-settings-card .menu-settings-order-row:last-child {
  border-bottom: none;
}
.menu-settings-card .menu-settings-order-row:hover {
  background: var(--accent-alpha-10);
}
.menu-settings-card .menu-settings-order-row.drag-over {
  background: var(--accent-alpha-10);
}
.menu-settings-order-row .menu-settings-section-gear {
  flex-shrink: 0;
  padding: 6px 10px;
  min-width: 40px;
}
.menu-settings-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.menu-settings-status {
  margin: 0;
  min-height: 1.25em;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}
.menu-settings-save-btn {
  flex-shrink: 0;
  min-width: 140px;
}
.tasks-creo-gallery-hero-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}
.tasks-creo-gallery-vid-loading-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.settings-buyer-files-card .tasks-library-card-thumb {
  position: relative;
}
.settings-buyer-files-vid-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  pointer-events: none;
  z-index: 2;
}
.sessions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 8px;
}
.sessions-table th,
.sessions-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.sessions-table th {
  color: var(--text-muted);
  font-weight: 600;
}
.sessions-row--inactive {
  opacity: 0.45;
}
.sessions-row--active {
  opacity: 1;
}
.session-state-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1.2;
  font-weight: 600;
  vertical-align: middle;
}
.session-state-badge--active {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.35);
}
.session-state-badge--inactive {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
}
.admin-table .td-sessions {
  white-space: nowrap;
}

.a-link {
  color: var(--link);
  text-decoration: none;
}

.a-link:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ——— Тест-хаб (tasks.html) ——— */
#content-tasks.content-page,
#content-tests.content-page {
  max-width: none;
  width: 100%;
  padding: 0;
}
.tasks-page {
  max-width: none;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  height: calc(100dvh - 48px - var(--mobile-app-bar-offset, 0px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tasks-split-view {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.tasks-page--all-pours .tasks-split-view {
  display: none;
}
.tasks-all-pours-inline {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: none;
  flex-direction: column;
  gap: 8px;
}
.tasks-all-pours-inline:not(.hidden) {
  display: flex;
}
.tasks-all-pours-inline-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: 0 var(--space-1);
}
.tasks-all-pours-inline-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}
.tasks-page--all-pours .tasks-all-pours-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.tasks-page--all-pours {
  overflow: hidden;
}
.tasks-workspace {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.tasks-hub-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.tasks-hub-subnav__link {
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--card-border, #333);
  color: var(--text-muted, #aaa);
  text-decoration: none;
}
.tasks-hub-subnav__link:hover {
  color: var(--text, #eee);
  border-color: var(--text-muted, #666);
}
.tasks-hub-subnav__link--active {
  background: var(--card-bg-elevated, #2a2a2a);
  color: var(--text, #eee);
  border-color: var(--accent, #5b9);
  font-weight: 600;
}

.tasks-ideas-view {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 var(--space-2, 8px) var(--space-2, 8px);
  overflow: hidden;
}
.tasks-ideas-view.hidden {
  display: none;
}
.tasks-ideas-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.tasks-ideas-head #tasks-ideas-add-btn {
  margin-left: 0;
}
.tasks-ideas-table-wrap {
  flex: 1 1 auto;
  min-height: 120px;
}
#tasks-ideas-table.tasks-table thead th,
#tasks-ideas-table.tasks-table tbody td {
  text-align: center;
  vertical-align: middle;
}
#tasks-ideas-table.tasks-table tbody td.tasks-idea-text {
  word-break: break-word;
}
.tasks-ideas-th-done {
  width: 44px;
  text-align: center;
}
.tasks-ideas-th-del {
  width: 40px;
  text-align: center;
}
.tasks-ideas-td-del {
  text-align: center;
  vertical-align: middle;
  width: 1%;
  padding: 2px 4px !important;
}
.tasks-idea-row--done .tasks-idea-date,
.tasks-idea-row--done .tasks-idea-text,
.tasks-idea-row--done .tasks-idea-buyer {
  text-decoration: line-through;
  opacity: 0.65;
}
.tasks-modal--ideas-add .tasks-modal-title--ideas-add {
  text-align: center;
}
.tasks-modal--ideas-add .field {
  margin-bottom: 0;
}
.tasks-modal--ideas-add .field label {
  text-align: center;
}
.tasks-modal--ideas-add .field textarea {
  min-height: 120px;
  margin-bottom: 0;
  background: var(--bg) !important;
  border: 1px solid var(--border);
  color: var(--text);
}
.tasks-idea-done-label {
  display: flex;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}

.tasks-workspace-grid {
  display: grid;
  grid-template-columns: minmax(160px, 260px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0 var(--space-3);
  align-items: stretch;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.tasks-main-toolbar-row .tasks-task-hero {
  margin-bottom: 0;
}
.tasks-task-hero {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.tasks-task-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: nowrap;
  margin: 0;
  width: 100%;
}
.tasks-task-hero-title {
  margin: 0;
  font-size: var(--th-font-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  flex: 1 1 0;
  min-width: 0;
  line-height: 1.35;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-task-hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}
.tasks-page--all-pours .tasks-task-hero {
  display: none !important;
}
.tasks-col-left {
  min-width: 0;
  max-height: none;
  height: 100%;
  min-height: 0;
  border-right: 1px solid var(--border);
  padding-right: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  align-self: stretch;
  box-sizing: border-box;
  overflow: hidden;
}
@media (max-width: 900px) {
  .tasks-workspace-grid {
    grid-template-columns: 1fr;
  }
  .tasks-col-left {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-1);
    max-height: 35vh;
  }
}
.tasks-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
  flex-shrink: 0;
}
.tasks-toolbar-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  width: 100%;
}
.tasks-toolbar-title-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-left: auto;
}
.tasks-toolbar-ideas-btn {
  width: auto;
  flex-shrink: 0;
  border: 1px solid var(--border);
  font-weight: 500;
  box-sizing: border-box;
}
.tasks-toolbar-ideas-btn--active {
  color: var(--accent, #5b9) !important;
  border-color: var(--accent, #5b9) !important;
  background: var(--accent-alpha-10, rgba(91, 153, 153, 0.12)) !important;
  font-weight: 600;
}
.tasks-main-toolbar-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
  flex-shrink: 0;
}
.tasks-toolbar-hint-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-right: var(--space-2);
  min-height: var(--th-control-h);
}
.tasks-toolbar-placeholder {
  margin: 0;
  font-size: var(--th-font-md);
  line-height: 1.35;
}
.tasks-main-toolbar-row:has(.tasks-task-hero:not(.hidden)) .tasks-toolbar-hint-wrap {
  display: none;
}
.tasks-main-toolbar-row:has(.tasks-task-hero:not(.hidden)) {
  justify-content: stretch;
}
.tasks-main-toolbar-row:has(.tasks-task-hero:not(.hidden)) .tasks-task-hero {
  flex: 1 1 0;
  min-width: 0;
}
.tasks-main-toolbar-row:has(.tasks-task-hero:not(.hidden)) .tasks-main-toolbar-actions {
  flex: 0 0 auto;
}
.tasks-main-toolbar-row:not(:has(.tasks-task-hero:not(.hidden))) .tasks-main-toolbar-actions {
  flex: 0 0 auto;
}
/* Панель без выбранной задачи: компактнее (~40% по высоте), меньше зазор между подсказкой и кнопками */
.tasks-main-toolbar-row:not(:has(.tasks-task-hero:not(.hidden))) {
  gap: var(--space-1);
  margin-bottom: var(--space-1);
  align-items: center;
}
.tasks-main-toolbar-row:not(:has(.tasks-task-hero:not(.hidden))) .tasks-toolbar-hint-wrap {
  min-height: 0;
  padding-right: var(--space-1);
}
.tasks-main-toolbar-row:not(:has(.tasks-task-hero:not(.hidden))) .tasks-toolbar-placeholder {
  font-size: var(--th-font-sm);
  line-height: 1.25;
}
.tasks-main-toolbar-row:not(:has(.tasks-task-hero:not(.hidden))) .tasks-main-toolbar-actions .btn.btn--tasks-new {
  white-space: nowrap;
  min-height: 0;
  height: auto;
  padding: 4px 10px;
  font-size: var(--th-font-sm);
  line-height: 1.2;
}
.tasks-main-toolbar-actions {
  display: flex;
  align-items: stretch;
  gap: var(--space-3);
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .tasks-main-toolbar-row {
    flex-wrap: wrap;
  }
  .tasks-main-toolbar-row:has(.tasks-task-hero:not(.hidden)) .tasks-task-hero,
  .tasks-main-toolbar-row:has(.tasks-task-hero:not(.hidden)) .tasks-main-toolbar-actions {
    flex: 1 1 100%;
  }
}
.tasks-task-hero--placeholder {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
}
.tasks-task-hero--placeholder .tasks-toolbar-placeholder {
  margin: 0;
}
.tasks-page--all-pours .tasks-toolbar {
  width: 100%;
}
.tasks-all-pours-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 8px;
  align-items: stretch;
  margin-bottom: var(--space-1);
  flex-shrink: 0;
}
.tasks-all-pours-filters .tasks-filter-select--solo {
  min-height: 0;
  height: 34px;
  padding: 0 22px 0 8px;
  font-size: var(--th-font-sm);
  background-position: right 6px center;
}
@media (max-width: 1000px) {
  .tasks-all-pours-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .tasks-all-pours-filters {
    grid-template-columns: 1fr;
  }
}
.tasks-toolbar-title-actions .btn.btn--tasks-all-table {
  white-space: nowrap;
}
#tasks-all-pours-table th,
#tasks-all-pours-table td {
  text-align: center;
}
#tasks-all-pours-table .tasks-td-wrap,
#tasks-all-pours-table .tasks-td-wrap__inner {
  text-align: center;
}
#tasks-pours-table th,
#tasks-pours-table td {
  text-align: center;
}
#tasks-pours-table .tasks-td-wrap,
#tasks-pours-table .tasks-td-wrap__inner {
  text-align: center;
}
.tasks-category-combo {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.tasks-category-single {
  width: 100%;
  min-width: 0;
}
.tasks-category-field-inner {
  position: relative;
  width: 100%;
  min-width: 0;
}
.tasks-category-trigger {
  width: 100%;
  min-height: var(--th-control-h);
  height: var(--th-control-h);
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: var(--th-font-sm);
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
}
.tasks-category-trigger--placeholder {
  color: var(--text-muted);
}
.tasks-category-type-input {
  width: 100%;
  min-height: var(--th-control-h);
  height: var(--th-control-h);
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: var(--th-font-sm);
  line-height: 1.35;
}
.tasks-category-panel-add,
.tasks-category-panel-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: var(--th-font-sm);
  cursor: pointer;
}
.tasks-category-panel-add {
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  margin-bottom: 4px;
}
.tasks-category-panel-opt:hover,
.tasks-category-panel-add:hover {
  background: var(--accent-alpha-10);
}
.tasks-category-panel--floating {
  position: fixed;
  z-index: 1200;
  max-height: min(50vh, 360px);
  overflow-y: auto;
  padding: 4px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.tasks-category-label {
  display: block;
  font-size: var(--th-font-sm);
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.tasks-category-new-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.tasks-category-input {
  flex: 1 1 180px;
  min-width: 0;
}
.tasks-filter-buyer-wrap {
  width: 100%;
  min-width: 0;
}
.tasks-filter-buyer-wrap .tasks-filter-buyer-btn {
  width: 100%;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-p-creative-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.tasks-single-tile--library {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  background: var(--surface-header);
  border: 1px dashed var(--border);
}
.tasks-library-tile-caption {
  font-size: var(--th-font-xs);
  text-align: center;
  padding: 4px;
  word-break: break-word;
}
.tasks-modal--library .tasks-library-body {
  overflow: auto;
  max-height: min(60vh, 480px);
  margin-bottom: var(--space-2);
  text-align: left;
}
.tasks-library-hint {
  margin: 0 0 var(--space-2);
  font-size: 0.85rem;
}
.tasks-library-day-title {
  font-weight: 600;
  font-size: var(--th-font-sm);
  margin: var(--space-2) 0 var(--space-1);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.tasks-library-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-2);
}
.tasks-library-card {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  font-size: var(--th-font-xs);
  color: var(--text);
  overflow: hidden;
}
.tasks-library-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  flex: 0 0 auto;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tasks-library-card-thumb--err {
  font-size: 1.25rem;
  color: var(--text-muted);
}
.tasks-library-card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tasks-library-card .tasks-library-card-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}
.tasks-library-card:hover {
  border-color: var(--accent);
}
.tasks-library-card--on {
  border-color: var(--accent);
  background: var(--accent-alpha-10);
}
.tasks-library-card-name {
  display: block;
  padding: 6px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  flex-shrink: 0;
}
.tasks-main-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.tasks-main-body .tasks-detail {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tasks-main-body .tasks-detail-pours-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tasks-main-body .tasks-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.tasks-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tasks-filter-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.tasks-filter-select {
  min-width: 0;
  max-width: 100%;
  height: var(--th-control-h);
  padding: 0 var(--space-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--th-font-md);
}
.tasks-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tasks-toolbar .btn-primary {
  width: auto;
  min-width: 120px;
}
.tasks-filter-row {
  margin-bottom: var(--space-2);
  max-width: none;
  width: 100%;
}
.tasks-filter-row--dual {
  margin-bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
  align-items: stretch;
  padding: var(--space-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-sizing: border-box;
}
.tasks-filter-row--triple {
  position: relative;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: var(--space-1);
  align-items: stretch;
  padding: var(--space-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-sizing: border-box;
}
.tasks-filter-row--triple .geo-picker-mount {
  min-width: 0;
}
.tasks-filter-row--triple .tasks-filter-category-wrap .tasks-filter-category-btn.tasks-filter-more-btn {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}
.tasks-filter-row--dual .tasks-filter-select--solo,
.tasks-filter-row--triple .tasks-filter-select--solo {
  min-width: 0;
  max-width: 100%;
}
.tasks-filter-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: var(--th-control-h);
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tasks-filter-more-btn:hover {
  border-color: var(--border-hover);
}
.tasks-filter-more-btn:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-alpha-15);
}
.tasks-filter-dd-btn {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1.12;
  padding-left: 4px;
  padding-right: 4px;
  color: var(--text);
}
.tasks-filter-category-btn.tasks-filter-more-btn {
  padding-left: 6px;
  padding-right: 6px;
}
.tasks-filter-dd-panel.geo-picker-panel .geo-picker-panel-scroll {
  max-height: min(38vh, 260px);
}
.tasks-filter-dd-panel.geo-picker-panel .geo-picker-panel-head .geo-picker-search {
  padding: 6px 8px;
  font-size: 0.8125rem;
}
.tasks-filter-dd-panel.geo-picker-panel .filter-check-label {
  padding: 0.35rem 0.45rem;
  min-height: 0;
}
.tasks-filter-dd-panel.geo-picker-panel .filter-check-text {
  font-size: 0.8125rem;
  line-height: 1.25;
}
.tasks-filter-dd-panel.geo-picker-panel .cell-creo-hint {
  font-size: 0.78rem;
  padding: 0.35rem 0.45rem;
}
.tasks-filter-panel-footer {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface-header);
}
.tasks-filter-panel-footer-btn {
  flex: 1;
  padding: 5px 6px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.tasks-filter-panel-footer-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tasks-filter-panel-footer--solo {
  justify-content: stretch;
}
.tasks-filter-panel-footer--solo .tasks-filter-panel-footer-btn {
  flex: 1;
  max-width: 100%;
}
.tasks-modal--creo-mode {
  position: relative;
  max-width: 400px;
  padding: 2rem 1.5rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 3px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 6px 6px 0 var(--accent);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-header) 100%);
}
.tasks-creo-mode-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.tasks-creo-mode-close:hover {
  color: var(--text);
  background: var(--accent-alpha-10);
}
.tasks-creo-mode-label {
  margin: 0 2rem 1rem 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.tasks-creo-mode-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tasks-creo-mode-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 3px solid #1a1a1a;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tasks-creo-mode-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #1a1a1a;
}
.tasks-creo-mode-btn--sep {
  background: linear-gradient(180deg, #fde047 0%, #eab308 100%);
  color: #1a1a1a;
}
.tasks-creo-mode-btn--car {
  background: linear-gradient(180deg, #e879f9 0%, #c026d3 100%);
  color: #fff;
}
.settings-buyer-files-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0 var(--space-4);
}
.settings-buyer-files-head {
  margin-bottom: var(--space-3);
}
.settings-buyer-files-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}
.settings-buyer-files-sub {
  margin: 0;
  font-size: 0.92rem;
}
.settings-buyer-files-controls {
  margin-bottom: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: var(--space-3);
}
.settings-buyer-files-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr) auto;
  gap: var(--space-2);
  align-items: end;
}
.settings-buyer-files-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  position: relative;
}
.settings-buyer-files-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settings-buyer-files-select,
.settings-buyer-files-date,
.settings-buyer-files-date-trigger {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  box-sizing: border-box;
}
.settings-buyer-files-date-trigger {
  text-align: left;
  cursor: pointer;
}
.settings-buyer-files-select:focus,
.settings-buyer-files-date:focus,
.settings-buyer-files-date-trigger:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-alpha-15);
}
.settings-buyer-files-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.settings-buyer-files-date-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(420px, 92vw);
  z-index: 60;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  padding: 10px;
}
.settings-buyer-files-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.settings-buyer-files-date-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.settings-buyer-files-status {
  margin: 10px 0 0;
  font-size: 0.85rem;
}
.settings-buyer-files-card {
  flex-direction: column;
  align-items: stretch;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.settings-buyer-files-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.settings-buyer-files-buyer-line {
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--text-muted);
  padding: 4px 8px 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-buyer-files-card-download {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  padding: 0;
}
.settings-buyer-files-card-download:hover {
  background: rgba(0, 0, 0, 0.62);
}
.settings-buyer-files-video-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 58px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.settings-buyer-files-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}
.settings-buyer-files-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}
.settings-buyer-files-modal-dialog {
  position: relative;
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: 12px auto;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.settings-buyer-files-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.settings-buyer-files-modal-title {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.3;
  word-break: break-word;
}
.settings-buyer-files-modal-meta {
  margin: 0;
  font-size: 0.8rem;
}
.settings-buyer-files-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.settings-buyer-files-modal-close:hover {
  background: var(--accent-alpha-10);
  color: var(--text);
}
.settings-buyer-files-modal-body {
  padding: 10px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0c0f;
}
.settings-buyer-files-modal-media {
  max-width: 100%;
  max-height: min(70dvh, 780px);
  display: block;
  border-radius: var(--radius-sm);
}
.settings-buyer-files-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding: 10px 12px;
}
.settings-backup-page {
  max-width: 860px;
  margin: 0 auto;
}
.settings-backup-page--compact .settings-backup-title {
  margin: 0 0 12px;
  font-size: 1.2rem;
  font-weight: 700;
}
.settings-backup-head {
  margin-bottom: var(--space-3);
}
.settings-backup-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}
.settings-backup-sub {
  margin: 0;
}
.settings-backup-actions--row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.settings-backup-field--narrow {
  max-width: 180px;
}
.settings-backup-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: var(--space-3);
}
.settings-backup-kpi {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 10px 12px;
}
.settings-backup-kpi-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.settings-backup-kpi-value {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}
.settings-backup-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: var(--space-3);
}
.settings-backup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-2);
}
.settings-backup-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-backup-field label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.settings-backup-field input[type="text"],
.settings-backup-field input[type="number"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  padding: 8px 10px;
  box-sizing: border-box;
}
.settings-backup-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-alpha-15);
}
.settings-backup-check {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}
.settings-backup-hint {
  margin: 0;
  font-size: 0.78rem;
}
.settings-backup-actions {
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.settings-backup-state {
  margin: 10px 0 0;
  font-size: 0.88rem;
}
.settings-backup-status {
  margin: 12px 0 0;
  font-size: 0.9rem;
}
.settings-backup-status--error {
  color: #ef4444;
}
.settings-backup-env-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #b91c1c;
  font-size: 0.9rem;
  line-height: 1.45;
}
@media (max-width: 720px) {
  .settings-backup-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-backup-grid {
    grid-template-columns: 1fr;
  }
  .settings-backup-check {
    grid-column: 1;
  }
  .settings-backup-actions .btn {
    flex: 1 1 100%;
  }
}
@media (max-width: 900px) {
  .settings-buyer-files-filters {
    grid-template-columns: 1fr;
  }
  .settings-buyer-files-date-grid {
    grid-template-columns: 1fr;
  }
  .settings-buyer-files-actions .btn {
    flex: 1 1 0;
  }
}
.tasks-filter-category-wrap {
  width: 100%;
  min-width: 0;
}
.tasks-filter-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 240px;
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.tasks-filter-popover__field {
  margin-bottom: var(--space-2);
}
.tasks-filter-popover__field:last-child {
  margin-bottom: 0;
}
.tasks-filter-popover__label {
  display: block;
  font-size: var(--th-font-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.tasks-filter-status-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tasks-filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--th-font-sm);
  cursor: pointer;
}
.tasks-category-select-dropdown {
  width: 100%;
  min-height: var(--th-control-h);
  height: var(--th-control-h);
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: var(--th-font-sm);
  line-height: 1.35;
  box-sizing: border-box;
}
@media (max-width: 420px) {
  .tasks-filter-row--dual {
    grid-template-columns: 1fr;
  }
  .tasks-filter-row--triple {
    grid-template-columns: 1fr;
  }
  .tasks-filter-more-btn {
    width: 100%;
  }
}
.tasks-filter-select--solo {
  width: 100%;
  max-width: none;
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tasks-filter-select--solo:hover {
  border-color: var(--border-hover);
}
.tasks-filter-select--solo:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-alpha-15);
}
.tasks-shell {
  display: grid;
  grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
  gap: 20px 24px;
  align-items: start;
  width: 100%;
  min-width: 0;
}
@media (max-width: 900px) {
  .tasks-shell {
    grid-template-columns: 1fr;
  }
}
.tasks-sidebar {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  min-width: 0;
  width: 100%;
  box-shadow: none;
}
.tasks-sidebar-placeholder {
  margin: 0;
  font-size: var(--th-font-md);
  padding: var(--space-2) 0;
}
.tasks-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tasks-list-item {
  margin-bottom: var(--space-1);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
}
.tasks-list-item--st-new {
  border-color: rgba(133, 161, 227, 0.55);
}
.tasks-list-item--st-work {
  border-color: rgba(234, 179, 8, 0.5);
}
.tasks-list-item--st-done {
  border-color: rgba(34, 197, 94, 0.5);
}
.tasks-list-item--active.tasks-list-item--st-new {
  border-color: rgba(168, 184, 237, 0.75);
}
.tasks-list-item--active.tasks-list-item--st-work {
  border-color: rgba(234, 179, 8, 0.65);
}
.tasks-list-item--active.tasks-list-item--st-done {
  border-color: rgba(74, 222, 128, 0.65);
}
.tasks-list-btn {
  width: 100%;
  text-align: left;
  padding: 6px var(--space-2);
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text);
  cursor: pointer;
  font-size: var(--th-font-md);
  transition: background var(--transition);
}
.tasks-list-btn:hover {
  background: var(--accent-alpha-10);
}
.tasks-list-item--active .tasks-list-btn {
  background: var(--accent-alpha-15);
}
.tasks-list-btn-title {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-list-btn-assign {
  display: block;
  font-size: 0.78rem;
  color: var(--text);
  opacity: 0.92;
  margin-bottom: 4px;
  line-height: 1.3;
}
.tasks-list-btn-desc {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--th-font-xs);
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 2px;
}
.tasks-list-btn-meta {
  display: block;
  font-size: var(--th-font-xs);
  color: var(--text-muted);
}
.tasks-list-btn-who {
  display: block;
  font-size: var(--th-font-sm);
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-main {
  min-width: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tasks-main-placeholder {
  flex: 0 0 auto;
  padding: var(--space-5) var(--space-4);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--th-font-md);
}
.tasks-detail {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 0 var(--space-2);
  box-sizing: border-box;
}
.tasks-detail-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  margin-bottom: 0;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.tasks-detail-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.tasks-detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tasks-detail-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex: 1 1 auto;
  min-width: 0;
}
.tasks-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: var(--space-2);
  align-items: stretch;
}
@media (max-width: 720px) {
  .tasks-detail-grid {
    grid-template-columns: 1fr;
  }
}
.tasks-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-self: stretch;
}
.tasks-detail-card-label {
  font-size: var(--th-font-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}
.tasks-detail-meta-inner {
  font-size: var(--th-font-md);
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1 1 auto;
  min-height: 0;
}
.tasks-detail-meta-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
}
@media (max-width: 720px) {
  .tasks-detail-meta-row {
    flex-wrap: wrap;
  }
  .tasks-detail-meta-col {
    flex: 1 1 100% !important;
    max-width: none !important;
    padding-right: 0 !important;
    border-right: none !important;
  }
  .tasks-detail-body--inline {
    flex: 1 1 100% !important;
    max-width: none !important;
    border-left: none !important;
    padding-left: 0 !important;
    padding-top: 12px !important;
    border-top: 1px solid var(--border);
  }
}
.tasks-detail-meta-col {
  flex: 0 0 33.333%;
  max-width: 33.333%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.tasks-detail-meta {
  margin: 0;
  font-size: var(--th-font-md);
  color: var(--text-muted);
  line-height: 1.5;
}
.tasks-detail-status-select {
  margin-left: 0;
  padding: 0;
  font-size: var(--th-font-md);
  line-height: 1.5;
  border: none;
  border-radius: 0;
  cursor: pointer;
  vertical-align: baseline;
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  background-image: none;
  font-weight: 600;
  color: var(--text);
  box-sizing: content-box;
}
.tasks-detail-status-select.tasks-list-item--st-new {
  color: #93a8e0;
}
.tasks-detail-status-select.tasks-list-item--st-work {
  color: #fbbf24;
}
.tasks-detail-status-select.tasks-list-item--st-done {
  color: #4ade80;
}
.tasks-detail-status-select option {
  color: var(--text);
  background: var(--surface);
}
.tasks-detail-status-text.tasks-list-item--st-new {
  color: #93a8e0;
  border: 1px solid rgba(147, 168, 224, 0.4);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  background: rgba(147, 168, 224, 0.08);
  font-size: var(--th-font-sm);
}
.tasks-detail-status-text.tasks-list-item--st-work {
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  background: rgba(251, 191, 36, 0.08);
  font-size: var(--th-font-sm);
}
.tasks-detail-status-text.tasks-list-item--st-done {
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  background: rgba(74, 222, 128, 0.08);
  font-size: var(--th-font-sm);
}
.tasks-detail-kv {
  margin-bottom: 2px;
  font-size: var(--th-font-md);
}
.tasks-detail-kv--status {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding-left: 0;
  margin-left: 0;
}
.tasks-detail-kv--status .tasks-detail-status-wrap {
  flex: 0 0 auto;
  max-width: max-content;
}
.tasks-detail-kv:last-child {
  margin-bottom: 0;
}
.tasks-detail-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
  opacity: 0.85;
}
.tasks-detail-divider--strong {
  margin: 18px 0;
  opacity: 1;
}
.tasks-detail-body {
  white-space: pre-wrap;
  margin-bottom: 0;
  padding: 0;
  font-size: var(--th-font-md);
  line-height: 1.5;
  color: var(--text);
}
.tasks-detail-body--inline {
  flex: 1 1 auto;
  max-width: 66.666%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  align-self: stretch;
  border-left: none;
  box-sizing: border-box;
}
.tasks-detail-body--empty {
  display: none;
}
.tasks-detail-pours-section {
  padding-top: var(--space-3);
  margin-top: 0;
  border-top: none;
}
.tasks-pours-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
}
.tasks-pours-title {
  margin: 0;
  font-size: var(--th-font-base);
  font-weight: 600;
}
.tasks-table-wrap,
.tasks-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
  max-width: 100%;
  background: var(--surface);
}
.tasks-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: var(--th-font-sm);
  table-layout: auto;
}
.tasks-table--ruled {
  border: 1px solid var(--border);
}
.tasks-table--ruled th,
.tasks-table--ruled td {
  border-right: 1px solid rgba(128, 128, 128, 0.15);
  border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}
.tasks-table--ruled th:last-child,
.tasks-table--ruled td:last-child {
  border-right: none;
}
.tasks-table--ruled thead th {
  border-bottom: 1px solid rgba(128, 128, 128, 0.3);
  background: var(--surface-header);
}
.tasks-table th,
.tasks-table td {
  padding: 6px var(--space-2);
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tasks-table tbody tr.tasks-pour-row--tone-passed > td {
  background: rgba(34, 197, 94, 0.16);
}
.tasks-table tbody tr.tasks-pour-row--tone-disapprove > td {
  background: rgba(245, 158, 11, 0.18);
}
.tasks-table tbody tr.tasks-pour-row--tone-ban > td {
  background: rgba(239, 68, 68, 0.18);
}
.tasks-table tbody tr.tasks-pour-row--tone-pause > td {
  background: rgba(148, 163, 184, 0.2);
}
.tasks-table th {
  color: var(--text-muted);
  font-weight: 600;
  white-space: normal;
  text-align: center;
  font-size: var(--th-font-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}
.tasks-td-wrap {
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: middle;
  padding: 6px var(--space-2);
  max-width: none;
}
.tasks-td-wrap__inner {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  overflow: visible;
  text-align: left;
  max-height: none;
  line-height: 1.45;
  white-space: normal;
}
.tasks-table--fixed {
  table-layout: fixed;
}
#tasks-pours-table .tasks-creo-view-btn--icon {
  margin-left: auto;
  margin-right: auto;
}
.tasks-creo-view-btn {
  padding: 2px 6px;
  font-size: var(--th-font-xs);
  line-height: 1.15;
  min-height: 0;
  border-radius: var(--radius-sm);
}
.tasks-creo-view-btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.tasks-creo-view-btn--icon:hover {
  background: var(--accent-alpha-10);
  border-color: var(--accent);
  color: var(--accent);
}
.tasks-creo-view-btn--icon svg {
  display: block;
  width: 14px;
  height: 14px;
}
.tasks-date-input {
  min-height: 2.25rem;
  cursor: pointer;
  position: relative;
  z-index: 2;
  appearance: auto;
  -webkit-appearance: auto;
}
.tasks-td-actions {
  white-space: nowrap;
  vertical-align: middle;
  width: 1%;
  max-width: 100%;
  overflow: hidden;
  padding: 4px var(--space-1) !important;
  text-align: right;
  box-sizing: border-box;
}
.tasks-td-actions-inner {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  justify-content: flex-end;
  max-width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}
.tasks-icon-btn--pour {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
}
.tasks-icon-btn--pour svg {
  width: 12px;
  height: 12px;
}
.tasks-icon-btn--task {
  width: 28px;
  height: 28px;
}
.tasks-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tasks-icon-btn:hover {
  background: var(--accent-alpha-10);
  color: var(--text);
}
.tasks-icon-btn--danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.tasks-icon-btn svg {
  display: block;
}
.tasks-creative-link {
  color: var(--link);
  cursor: pointer;
  text-decoration: underline;
}
.tasks-creo-gr {
  display: inline-block;
  max-width: 100%;
  line-height: 1.35;
  vertical-align: top;
}
.tasks-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--th-font-xs);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.45;
}
.tasks-badge--st-pass {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}
.tasks-badge--st-dis {
  background: rgba(234, 179, 8, 0.18);
  color: #fbbf24;
}
.tasks-badge--st-ban {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}
.tasks-badge--fin-pause {
  background: rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}
.tasks-badge--fin-dis {
  background: rgba(234, 179, 8, 0.18);
  color: #fbbf24;
}
.tasks-badge--fin-ban {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}
.tasks-pour-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.875rem;
}
#tasks-p-campaign-type option[data-separator] {
  color: rgba(160, 160, 160, 0.75);
  font-size: 0.72rem;
}
.tasks-p-blocks-list {
  margin-top: 4px;
}
.tasks-p-blocks-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.tasks-p-blocks-add-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.tasks-media-block {
  margin-bottom: 12px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.tasks-media-block-title {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.tasks-vdrop {
  padding: 14px;
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tasks-vdrop:hover,
.tasks-vdrop--hover {
  border-color: var(--accent);
  background: var(--accent-alpha-10);
}
.tasks-vfiles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tasks-vfile-tag {
  font-size: 0.72rem;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.tasks-vfile-rm {
  margin-left: 4px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 1rem;
  line-height: 1;
}
.tasks-carousel-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.tasks-carousel-tile {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: var(--bg);
}
.tasks-carousel-tile--add {
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
}
.tasks-carousel-tile--add-first {
  flex-shrink: 0;
}
.tasks-p-creative-tiles--empty {
  margin-bottom: 0;
}
.tasks-carousel-tile-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}
.section-settings-controls .field {
  margin-bottom: 12px;
}
.section-settings-controls--narrow {
  max-width: 380px;
  width: 100%;
}
.section-settings-controls--narrow .section-settings-vis-scroll {
  width: 100%;
  overflow-x: auto;
}
.section-settings-select-wide {
  min-width: 280px;
  max-width: 100%;
}
.section-settings-check-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.section-settings-all-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}
.section-settings-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.section-settings-check-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
}
.section-settings-check-card input {
  margin-top: 2px;
}
.tasks-modal.tasks-modal--pour .tasks-pour-grid {
  display: flex;
  flex-direction: column;
  gap: 8px 12px;
}
.tasks-modal.tasks-modal--pour .field--full {
  width: 100%;
}
.tasks-pour-row {
  display: grid;
  gap: 8px 12px;
  width: 100%;
}
.tasks-pour-row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tasks-pour-row--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tasks-pour-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 560px) {
  .tasks-pour-row--4 {
    grid-template-columns: 1fr;
  }
  .tasks-pour-row--3 {
    grid-template-columns: 1fr;
  }
  .tasks-pour-row--2 {
    grid-template-columns: 1fr;
  }
}
.tasks-check {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.tasks-pour-divider {
  height: 0;
  border-top: 1px solid var(--border);
  margin: 4px 0 6px;
}
.tasks-p-textarea-lg {
  min-height: 4.5rem !important;
}
.tasks-modal--pour .tasks-age-dd .geo-picker-panel .filter-check-label {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 4px;
  background: var(--bg);
}
.tasks-pour-hint {
  margin: 6px 0 0;
  font-size: 0.75rem;
}
.tasks-modal-overlay {
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px 40px;
  box-sizing: border-box;
}
.tasks-modal-overlay .modal {
  max-width: 520px;
  flex-shrink: 0;
  margin-bottom: 24px;
}
.tasks-modal-overlay .modal.tasks-modal--wide {
  max-width: min(1200px, 96vw);
  width: 100%;
}
.tasks-all-pours-scroll {
  max-height: min(70vh, 560px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.tasks-modal--pour.modal {
  max-width: 560px;
  max-height: none;
  padding: 16px 18px;
  overflow-y: auto;
  max-height: min(92vh, 880px);
}
.tasks-modal--pour .tasks-modal-title {
  margin-bottom: 10px;
  font-size: 1.05rem;
}
.tasks-modal--pour .field {
  margin-bottom: 8px;
}
.tasks-modal--pour .field label {
  font-size: 0.8rem;
}
.tasks-modal--pour .modal-actions {
  margin-top: 14px;
}
.tasks-modal--pour .tasks-pour-grid {
  gap: 8px 12px;
}
.tasks-pour-row--single {
  grid-template-columns: 1fr !important;
}
.tasks-modal--pour textarea {
  min-height: 52px;
}
.tasks-modal--pour-compact.modal {
  padding: var(--space-3) var(--space-4) var(--space-3);
  max-width: min(608px, 96vw);
  max-height: min(92vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tasks-modal--pour-compact .tasks-pour-grid {
  gap: var(--space-1) var(--space-2);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.tasks-modal--pour-compact .field {
  margin-bottom: var(--space-1);
}
.tasks-modal--pour-compact .field label {
  font-size: var(--th-font-xs);
}
.tasks-modal--pour-compact .modal-actions {
  margin-top: var(--space-2);
  flex-shrink: 0;
}
.tasks-modal--pour-compact .tasks-modal-title {
  margin-bottom: var(--space-2);
  flex-shrink: 0;
}
.tasks-pour-progress-text {
  margin: 6px 0 0;
  font-size: 0.75rem;
}
.tasks-p-creative-groups {
  margin-top: 6px;
  max-height: 36vh;
  overflow-y: auto;
}
.tasks-p-creative-group {
  margin-bottom: 12px;
}
.tasks-p-creative-group-title {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.tasks-p-creative-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.tasks-p-add-creative {
  margin-top: 4px;
}
.tasks-creo-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.85rem;
}
.tasks-creo-mode label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin: 0;
  color: var(--text);
}
.tasks-field-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.tasks-carousel-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  min-height: 0;
}
.tasks-carousel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin-bottom: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: grab;
}
.tasks-carousel-item:active {
  cursor: grabbing;
}
.tasks-carousel-item .tasks-carousel-drag {
  color: var(--text-muted);
  user-select: none;
}
.tasks-carousel-item .tasks-carousel-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-carousel-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 1rem;
  line-height: 1;
}
.section-settings-pages {
  max-width: 100%;
}

/* Админ: отдельные страницы настроек Тест-хаб / Уникализатор
   Ритм: --space-2…--space-5; кнопки — width:auto (перебивает глобальный .btn-primary { width:100% }) */
.admin-settings-page {
  padding: 0 0 var(--space-5);
  box-sizing: border-box;
  width: 100%;
}
.admin-settings-page--wide {
  max-width: none;
}
.admin-settings-page .btn-primary {
  width: auto;
}
.admin-settings-page-head {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.admin-settings-h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.admin-settings-card {
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  overflow: visible;
}
.admin-settings-card:last-child {
  margin-bottom: 0;
}
.admin-settings-card--solo {
  margin-bottom: 0;
}
.admin-settings-card-head {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-3);
}
.admin-settings-step {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-alpha-15);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1;
}
.admin-settings-card-title {
  margin: 0 0 var(--space-1);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.admin-settings-card-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 62ch;
}
.admin-settings-card-footer {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.admin-settings-msg {
  margin: 0;
  font-size: 0.8125rem;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.4;
}
.admin-settings-matrix {
  border-radius: var(--radius-md);
}
.admin-settings-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  align-items: stretch;
  margin-bottom: var(--space-3);
}
@media (max-width: 960px) {
  .admin-settings-two-col {
    grid-template-columns: 1fr;
  }
}
.admin-settings-pour-footer .btn {
  width: auto;
}
.admin-settings-matrix-outer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.admin-settings-page--wide .section-settings-controls--matrix {
  max-width: none;
  width: 100%;
}
.admin-settings-pour-footer {
  margin-top: var(--space-3);
}
.admin-settings-pour-preview {
  max-width: min(960px, 100%);
  margin-top: var(--space-1);
}
.admin-settings-games-add {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--space-2);
  width: 100%;
  max-width: none;
}
.admin-settings-page--wide .admin-settings-games-add .tests-games-input {
  flex: 1 1 160px;
  min-width: 0;
  max-width: none;
}
.admin-settings-games-list {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.section-settings-page-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 600;
}
.section-settings-block--menu {
  padding-top: 8px;
}
.section-settings-lead {
  margin-bottom: 20px;
}
.section-settings-block {
  margin-bottom: 32px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.section-settings-block h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.section-settings-desc {
  font-size: 0.875rem;
  margin-bottom: 12px;
}
.section-settings-subtitle {
  margin: 28px 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.pour-layout-editor {
  margin-top: var(--space-2);
}
.pour-layout-editor-toolbar {
  margin-bottom: var(--space-2);
}
.pour-layout-preview-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 0 0 12px;
  background: var(--surface);
}
.pour-layout-preview-table {
  min-width: 0;
  width: 100%;
  font-size: 0.68rem;
  margin: 0;
}
.pour-layout-preview-table th {
  position: relative;
  padding: 6px 4px 6px 4px;
  font-size: 0.62rem;
  vertical-align: bottom;
  white-space: normal;
  line-height: 1.25;
}
.pour-layout-th-inner {
  display: block;
  position: relative;
  padding-right: 8px;
  min-height: 1.2em;
}
.pour-layout-resizer {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: col-resize;
  z-index: 2;
  user-select: none;
  touch-action: none;
}
.pour-layout-resizer:hover,
.pour-layout-resizer:focus {
  background: rgba(59, 130, 246, 0.18);
  outline: none;
}
.pour-layout-preview-table .tasks-td-wrap__inner {
  text-align: center;
}
.section-settings-actions {
  margin-top: 16px;
}
.section-settings-msg {
  margin-top: 10px;
}
.section-settings-role {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Админ: матрица видимости байеров (задачи) */
.section-settings-matrix-wrap {
  width: 100%;
  min-width: 0;
}
.section-settings-matrix-scroll {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.section-settings-matrix {
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 100%;
}
.section-settings-matrix th,
.section-settings-matrix td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.section-settings-matrix thead th {
  color: var(--text-muted);
  font-weight: 600;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.section-settings-corner {
  text-align: left !important;
  min-width: 140px;
}
.section-settings-matrix th[scope="row"] {
  text-align: left;
  color: var(--text);
  font-weight: 500;
}
.section-settings-diag {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}
.section-settings-check {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.section-settings-vis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  table-layout: fixed;
}
.section-settings-vis-table th,
.section-settings-vis-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.section-settings-vis-table thead th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.section-settings-vis-table tbody tr:last-child td {
  border-bottom: none;
}
.section-settings-user-cell {
  font-weight: 500;
  min-width: 0;
  width: 38%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.section-settings-access-cell {
  min-width: 0;
  width: 62%;
}
.section-settings-pick {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(240px, 40vh);
  overflow-y: auto;
}
.section-settings-check-inline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  line-height: 1.35;
}
.section-settings-check-inline input {
  margin-top: 3px;
  flex-shrink: 0;
}
.section-settings-role-tag {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.section-settings-vis-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}
.section-settings-dd {
  position: relative;
  z-index: 1;
  max-width: 100%;
  min-width: 0;
}
.section-settings-dd.section-settings-dd--open {
  z-index: var(--z-dropdown-row);
}
.section-settings-dd-btn {
  width: 100%;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  min-height: 2.5rem;
}
.section-settings-dd-btn:hover,
.section-settings-dd--open .section-settings-dd-btn {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}
.section-settings-dd-pop {
  position: absolute;
  z-index: var(--z-dropdown);
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  max-height: min(480px, 70vh);
  overflow-y: auto;
}
.section-settings-dd-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 4px 0;
  line-height: 1.35;
  min-width: 0;
}
.section-settings-dd-row input {
  margin-top: 3px;
  flex-shrink: 0;
}
.section-settings-dd-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.section-settings-dd-sep {
  height: 1px;
  background: var(--border);
  margin: var(--space-2) 0;
  opacity: 0.7;
}
.section-settings-dd-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Админ: доступ к разделам — выпадающий список с чекбоксами */
.admin-pages-dd {
  position: relative;
  z-index: 1;
  max-width: 360px;
}
.admin-pages-dd:has(.admin-pages-dd-pop:not(.hidden)) {
  z-index: var(--z-modal-nested);
}
.admin-pages-dd-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-pages-dd-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}
.admin-pages-dd-pop {
  position: absolute;
  z-index: var(--z-modal-nested);
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  max-height: min(360px, 55vh);
  overflow-y: auto;
}
.admin-pages-dd-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 0;
  line-height: 1.35;
}
.admin-pages-dd-row input {
  margin-top: 3px;
  flex-shrink: 0;
}

.tasks-p-single-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
  min-height: 0;
}
.tasks-single-tile {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
.tasks-single-tile img,
.tasks-single-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tasks-single-tile-rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1;
}

.tasks-creo-view-overlay {
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}
.tests-games-page .tests-games-add {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.tests-games-input {
  flex: 1 1 200px;
  min-width: 160px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8125rem;
}
.tests-games-list > li.content-muted {
  padding: var(--space-2) 0;
  margin: 0;
  border: none;
  font-size: 0.8125rem;
}
.tests-games-list {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 0;
}
.tests-games-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  min-width: 0;
}
.tests-games-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.tests-games-name {
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
  flex: 1 1 auto;
}
.admin-settings-games-list .tests-games-item .btn {
  flex-shrink: 0;
}

.tasks-creo-view-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: min(1100px, 98vw);
  max-height: min(94vh, 920px);
  overflow: hidden;
}
.tasks-creo-view-modal .tasks-modal-title {
  flex-shrink: 0;
}
.tasks-creo-view-modal .tasks-creo-view-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(82vh, 780px);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
.tasks-creo-view-modal .modal-actions {
  flex-shrink: 0;
  margin-top: auto;
}
.tasks-creo-view-lightbox {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: var(--radius-lg);
  box-sizing: border-box;
}
.tasks-creo-view-lightbox.tasks-creo-view-lightbox--root {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  border-radius: 0;
  padding: 12px;
}
.tasks-creo-view-lightbox--root .tasks-creo-view-lightbox-inner {
  max-height: min(92vh, 900px);
  width: 100%;
  max-width: min(1100px, 100%);
}
.tasks-creo-view-lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: min(78vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px 36px;
  box-sizing: border-box;
}
.tasks-creo-view-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.tasks-creo-view-lightbox-counter {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
}
.tasks-creo-view-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.tasks-creo-view-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
.tasks-creo-view-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.tasks-creo-view-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.tasks-creo-view-lightbox-nav--prev {
  left: 8px;
}
.tasks-creo-view-lightbox-nav--next {
  right: 8px;
}
.tasks-creo-view-body {
  margin: 0 0 8px;
}
.tasks-creo-gallery-split {
  display: flex;
  flex: 0 1 auto;
  min-height: 0;
  gap: 0;
  align-items: stretch;
  flex-direction: row;
  overflow: visible;
}
.tasks-creo-gallery-rail {
  flex: 0 0 38%;
  max-width: 420px;
  min-width: 200px;
  overflow: visible;
  padding: 0 12px 8px 0;
  border-right: 1px solid var(--border);
  box-sizing: border-box;
}
.tasks-creo-gallery-rail-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
  padding-right: 4px;
}
.tasks-creo-gallery-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tasks-creo-gallery-frame--hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: min(62vh, 520px);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.tasks-creo-gallery-stage--hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 10px 44px;
  box-sizing: border-box;
  max-width: 100%;
}
.tasks-creo-gallery-img {
  max-width: 100%;
  max-height: min(62vh, 560px);
  object-fit: contain;
  cursor: zoom-in;
  border-radius: var(--radius-sm);
}
.tasks-creo-gallery-video {
  max-width: 100%;
  max-height: min(62vh, 560px);
}
.tasks-creo-gallery-video-poster {
  max-width: 100%;
  max-height: min(62vh, 560px);
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.tasks-creo-gallery-thumb-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.tasks-creo-gallery-vid-thumb-placeholder {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
@media (max-width: 720px) {
  .tasks-creo-gallery-split {
    flex-direction: column-reverse;
  }
  .tasks-creo-gallery-rail {
    flex: 0 0 auto;
    max-width: none;
    max-height: none;
    border-right: none;
    border-top: 1px solid var(--border);
    padding: 10px 0 0;
  }
}
.tasks-creo-gallery-top {
  margin-bottom: 4px;
}
.tasks-creo-gallery-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(48vh, 420px);
  max-height: min(52vh, 500px);
  background: rgba(0, 0, 0, 0.28);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.tasks-creo-gallery-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 12px 44px;
  box-sizing: border-box;
  max-width: 100%;
}
.tasks-creo-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.tasks-creo-gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}
.tasks-creo-gallery-arrow--prev {
  left: 8px;
}
.tasks-creo-gallery-arrow--next {
  right: 8px;
}
.tasks-creo-gallery-bottom {
  margin-top: 10px;
  max-height: 42vh;
  overflow-y: auto;
  padding-right: 4px;
}
.tasks-creo-gallery-sep {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}
.tasks-creo-gallery-group-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.tasks-creo-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.tasks-creo-gallery-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 92px;
  padding: 6px 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  color: inherit;
  font: inherit;
  box-sizing: border-box;
}
.tasks-creo-gallery-cell--active {
  border-color: var(--accent);
  background: var(--accent-alpha-10);
}
.tasks-creo-gallery-num {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.tasks-creo-gallery-cell--active .tasks-creo-gallery-num {
  color: var(--accent);
}
.tasks-creo-gallery-cell-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.tasks-creo-gallery-cell-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tasks-creo-gallery-caption {
  font-size: 0.6rem;
  line-height: 1.25;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.tasks-creo-view-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  flex: 1 1 auto;
  min-width: 0;
}
.tasks-creo-stage {
  flex: 1 1 auto;
  min-height: 160px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.tasks-creo-bundle-strip {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.tasks-creo-bundle-tab {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.tasks-creo-bundle-tab:hover {
  border-color: var(--border-hover);
  color: var(--text);
}
.tasks-creo-bundle-tab--active {
  border-color: var(--accent);
  background: var(--accent-alpha-15);
  color: var(--text);
}
.tasks-creo-stage-carousel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.tasks-creo-stage-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  max-height: min(52vh, 480px);
  width: 100%;
  overflow: hidden;
}
.tasks-creo-stage-mainimg {
  max-width: 100%;
  max-height: min(52vh, 480px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #000;
}
.tasks-creo-stage-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.tasks-creo-stage-thumb {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 8px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.tasks-creo-stage-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tasks-creo-stage-thumb--active {
  border-color: var(--accent);
}
.tasks-creo-view-video-wrap--stage {
  width: 100%;
  align-items: center;
}
.tasks-creo-view-block {
  margin-bottom: 20px;
}
.tasks-creo-view-block-title {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.tasks-creo-view-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.tasks-creo-view-numcell {
  min-width: 72px;
  text-align: center;
}
.tasks-creo-view-crow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.tasks-creo-view-cimg {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #000;
}
.tasks-creo-lightbox-overlay {
  z-index: var(--z-lightbox);
  padding: 20px;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}
.tasks-creo-lightbox-overlay img {
  max-width: min(96vw, 1100px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  cursor: default;
}
.tasks-creo-view-video-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.tasks-creo-view-mainvideo {
  width: 100%;
  max-width: min(560px, 100%);
  max-height: min(50vh, 420px);
  border-radius: var(--radius-md);
  background: #000;
  object-fit: contain;
}
.tasks-creo-view-vthumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tasks-creo-view-vthumb {
  min-width: 36px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
}
.tasks-creo-view-vthumb--active {
  border-color: var(--accent);
  background: var(--accent-alpha-15);
}

.tasks-modal-actions-bordered {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 10px;
}
.modal.tasks-modal .modal-actions.tasks-modal-actions-bordered {
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 24px;
  padding-right: 24px;
  width: auto;
  box-sizing: border-box;
}
.modal.tasks-modal--pour-compact .modal-actions.tasks-modal-actions-bordered {
  margin-left: -14px;
  margin-right: -14px;
  padding-left: 14px;
  padding-right: 14px;
}
.tasks-pour-advanced-only.hidden {
  display: none !important;
}
.tasks-pour-advanced-only {
  display: contents;
}

.tasks-creo-gallery-frame--hero {
  min-height: min(76vh, 640px);
}
.tasks-creo-gallery-stage--hero {
  min-height: min(70vh, 580px);
}
.tasks-creo-gallery-cell-thumb {
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}
.tasks-creo-gallery-thumb-video {
  width: 100%;
  height: 100%;
  min-height: 72px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
  pointer-events: none;
}
.tasks-creo-gallery-vid-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  font-size: 1.2rem;
  color: var(--text-muted);
}
.tasks-creo-gallery-vid-loading {
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Статус: select + отдельная стрелка (flex gap) — без налезания на текст */
.tasks-detail-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  vertical-align: middle;
  max-width: 100%;
  cursor: pointer;
  margin: 0;
  padding: 0;
}
.tasks-detail-status-wrap--new {
  --tasks-st-caret: #85a1e3;
}
.tasks-detail-status-wrap--work {
  --tasks-st-caret: #eab308;
}
.tasks-detail-status-wrap--done {
  --tasks-st-caret: #16a34a;
}
.tasks-detail-status-caret {
  display: block;
  flex-shrink: 0;
  width: 0;
  height: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border-left: 4.25px solid transparent;
  border-right: 4.25px solid transparent;
  border-top: 5.1px solid var(--tasks-st-caret);
  border-bottom: 0;
  transform: translateY(1px);
  cursor: pointer;
  pointer-events: auto;
  appearance: none;
  -webkit-appearance: none;
}
.tasks-detail-status-wrap .tasks-detail-status-select {
  background-image: none !important;
  padding: 0;
  margin: 0;
  max-width: 100%;
  cursor: pointer;
}
.tasks-modal .field select,
.tasks-modal select#tasks-m-status {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 30px 8px 10px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888a0' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 10px;
}

/* Фокус полей в задачах: без «ореола», курсор виден */
.tasks-workspace input:focus,
.tasks-workspace input:focus-visible,
.tasks-workspace textarea:focus,
.tasks-workspace textarea:focus-visible,
.tasks-workspace select:focus,
.tasks-workspace select:focus-visible,
.tasks-modal input:focus,
.tasks-modal input:focus-visible,
.tasks-modal textarea:focus,
.tasks-modal textarea:focus-visible,
.tasks-modal select:focus,
.tasks-modal select:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Гео — кнопка + fixed-панель (как cell-creo / мультиселект в ячейке) */
.geo-picker-mount {
  width: 100%;
  max-width: 100%;
}
.geo-picker.cell-creo-wrap {
  position: relative;
  width: 100%;
}
/* Кнопка в форме (модалка залива): поле в одну строку, chevron, ellipsis */
.geo-picker-mount .geo-picker-cell-btn.cell-creo-btn,
.geo-picker.cell-creo-wrap .geo-picker-cell-btn.cell-creo-btn {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: var(--th-control-h);
  margin: 0;
  padding: 6px 28px 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: var(--th-font-md);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--transition), background-color var(--transition);
}
.geo-picker-mount .geo-picker-cell-btn.cell-creo-btn:hover,
.geo-picker.cell-creo-wrap .geo-picker-cell-btn.cell-creo-btn:hover {
  border-color: var(--border-hover);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.geo-picker--open .geo-picker-cell-btn.cell-creo-btn {
  border-color: var(--accent);
}
/* Панель: fixed на body, выше модалок */
.cell-creo-panel.geo-picker-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  max-height: min(360px, 70vh);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}
.cell-creo-panel-fixed.geo-picker-panel {
  position: fixed;
  z-index: 1100;
  max-height: min(360px, 70vh);
}
.geo-picker-panel-head {
  flex-shrink: 0;
  padding: 4px 2px 4px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.geo-picker-panel-head .geo-picker-search {
  width: 100%;
  padding: 10px 12px;
  margin: 0;
  font-size: var(--th-font-md);
  line-height: 1.35;
  border: none;
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
}
.geo-picker-panel-head .geo-picker-search::placeholder {
  color: var(--text-muted);
  font-size: var(--th-font-sm);
}
.geo-picker-panel-head .geo-picker-search:focus {
  outline: none;
}
.geo-picker-panel-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
/* Строки мультиселекта — как в спецификации */
.cell-creo-panel.geo-picker-panel .filter-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 0;
  font-size: 1rem;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  box-sizing: border-box;
}
.cell-creo-panel.geo-picker-panel .filter-check-label:last-child {
  border-bottom: none;
}
.cell-creo-panel.geo-picker-panel .filter-check-label:hover {
  background: rgba(255, 255, 255, 0.06);
}
.cell-creo-panel.geo-picker-panel .filter-check-label input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.cell-creo-panel.geo-picker-panel .filter-check-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-creo-panel.geo-picker-panel .cell-creo-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 10px 14px;
  margin: 0;
  line-height: 1.3;
}
.cell-creo-panel.geo-picker-panel:has(.cell-creo-hint) {
  min-height: 0;
}

/* Доступы: боковая панель + контент */
.section-settings-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 24px 28px;
  align-items: start;
  max-width: 100%;
}
@media (max-width: 720px) {
  .section-settings-layout {
    grid-template-columns: 1fr;
  }
}
.section-settings-sidenav {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  position: sticky;
  top: 12px;
}
.section-settings-sidenav__link {
  display: block;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}
.section-settings-sidenav__link:last-child {
  border-bottom: none;
}
.section-settings-sidenav__link:hover {
  background: var(--surface-header);
  text-decoration: none;
}
.section-settings-sidenav__link--active {
  color: var(--text);
  font-weight: 600;
  background: var(--bg);
}
.section-settings-main--stack .section-settings-block:not(:first-child) {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.section-settings-main,
.section-settings-hub-main {
  min-width: 0;
}
.section-settings-hub .section-settings-page-title {
  margin-top: 0;
}
.section-settings-hub .section-settings-lead {
  margin-bottom: 0;
}
.section-settings-controls--matrix {
  max-width: none;
  width: 100%;
}
.section-settings-controls--matrix .section-settings-vis-scroll {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
}
.section-settings-vis-table tbody tr:has(.section-settings-dd--open) {
  position: relative;
  z-index: var(--z-dropdown-row);
}

.settings-emoji-wrap--corner .settings-emoji-popover {
  padding: 0;
  overflow: hidden;
  max-height: min(380px, 72vh);
  width: min(340px, 92vw);
}
.settings-emoji-wrap--corner .settings-emoji-grid {
  max-height: none;
  overflow: visible;
}
.settings-emoji-wrap--corner .settings-emoji-picker-el {
  display: block;
  width: 100%;
  height: min(360px, 68vh);
  max-height: 68vh;
  --emoji-picker-border-size: 0;
  --emoji-picker-bg: var(--surface);
}

/* Уникализатор: история */
.uniquizer-history-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.uniquizer-history-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}
.uniquizer-history-hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
}
.uniquizer-history-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 12px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.uniquizer-history-card {
  flex: 0 0 auto;
  width: 112px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.uniquizer-history-card:hover {
  border-color: var(--accent);
}
.uniquizer-history-card--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-alpha-15);
}
.uniquizer-history-preview {
  width: 100%;
  height: 72px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.uniquizer-history-preview img,
.uniquizer-history-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.uniquizer-history-caption {
  font-size: 0.65rem;
  line-height: 1.25;
  color: var(--text-muted);
  padding: 6px 6px 8px;
  max-height: 3.1em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.uniquizer-history-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.uniquizer-history-picked {
  font-size: 0.82rem;
  color: var(--text);
  flex: 1 1 140px;
  min-width: 0;
  word-break: break-word;
}
.uniquizer-history-empty {
  margin: 0;
  font-size: 0.85rem;
}

/* ========= «Тест-хаб» — настройки раздела (полная панель) ========= */
.adm-tasks-page {
  width: 100%;
  min-width: 0;
  padding: 0 0 var(--adm-gap-4);
  box-sizing: border-box;
}
.adm-tasks-page__header {
  margin-bottom: var(--adm-gap-3);
  padding-bottom: var(--adm-gap-3);
  border-bottom: 1px solid var(--border);
}
.adm-tasks-page__title {
  margin: 0 0 var(--adm-gap-1);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}
.adm-tasks-page__lead {
  margin: 0;
  font-size: var(--adm-font-ui);
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 68ch;
}
.adm-tasks-page__sections {
  display: flex;
  flex-direction: column;
  gap: var(--adm-gap-3);
  min-width: 0;
}

.adm-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.adm-panel--compact {
  max-width: min(560px, 100%);
}
.adm-panel--wide {
  width: 100%;
}
.adm-panel__head {
  padding: var(--adm-gap-2) var(--adm-gap-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-header);
}
.adm-panel__title {
  margin: 0 0 var(--adm-gap-1);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.adm-panel__desc {
  margin: 0;
  font-size: var(--adm-font-caption);
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 72ch;
}
.adm-panel__body {
  padding: var(--adm-gap-3);
  min-width: 0;
  flex: 1 1 auto;
}
.adm-panel__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--adm-gap-2) var(--adm-gap-3);
  padding: var(--adm-gap-2) var(--adm-gap-3);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  min-height: calc(var(--adm-control-min-h) + var(--adm-gap-2) * 2);
  box-sizing: border-box;
}
.adm-panel__msg {
  margin: 0;
  font-size: var(--adm-font-caption);
  line-height: 1.4;
  flex: 1 1 auto;
  min-width: 0;
}
.adm-panel__msg--inline {
  margin-top: var(--adm-gap-2);
  flex: none;
  width: 100%;
}

/* Единые контролы панели */
.btn--adm {
  width: auto !important;
  min-height: var(--adm-control-min-h);
  padding: 0 14px;
  font-size: var(--adm-font-ui);
  font-weight: 500;
}
.input--adm {
  width: 100%;
  min-width: 0;
  min-height: var(--adm-control-min-h);
  padding: 0 12px;
  font-size: var(--adm-font-ui);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input--adm:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-alpha-15);
}
.input--adm::placeholder {
  color: var(--text-muted);
}

.adm-tasks-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--adm-gap-2);
  align-items: stretch;
  max-width: 28rem;
}
@media (max-width: 420px) {
  .adm-tasks-inline-form {
    grid-template-columns: 1fr;
  }
  .adm-tasks-inline-form .btn--adm {
    width: 100% !important;
  }
}

.adm-tasks-scroll--matrix {
  max-height: min(420px, 52vh);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}
.adm-tasks-page .adm-tasks-scroll--matrix .section-settings-vis-scroll {
  border: none;
  border-radius: 0;
  background: transparent;
}
.adm-tasks-matrix-outer {
  width: 100%;
  min-width: 0;
}
.adm-tasks-page .section-settings-controls--matrix {
  width: 100%;
  margin: 0;
}
.adm-tasks-placeholder {
  margin: 0;
  padding: var(--adm-gap-3);
  font-size: var(--adm-font-ui);
}

.adm-tasks-scroll--hub-groups {
  max-height: none;
  overflow: visible;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.task-hub-groups-toolbar {
  margin-bottom: var(--adm-gap-2);
}
.task-hub-groups-root {
  min-height: 200px;
}
.task-hub-empty {
  padding: var(--adm-gap-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

/* ——— Тест-хаб: группы (компактно: вкладки) ——— */
.task-hub-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 320px;
  max-height: min(64vh, 560px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg);
}
.task-hub-sidebar {
  width: 200px;
  min-width: 160px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
}
.task-hub-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.task-hub-sidebar__title {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.task-hub-btn-add {
  min-width: 2rem !important;
  padding: 4px 8px !important;
  font-size: 0.875rem !important;
  line-height: 1.2 !important;
}
.task-hub-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  -webkit-overflow-scrolling: touch;
}
.task-hub-nav__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 7px 9px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  transition: background 0.1s ease;
}
.task-hub-nav__item:hover {
  background: rgba(108, 92, 231, 0.07);
}
.task-hub-nav__item--active {
  background: rgba(108, 92, 231, 0.12);
  box-shadow: inset 0 0 0 1px rgba(108, 92, 231, 0.22);
}
.task-hub-nav__item--drop {
  outline: 2px dashed rgba(108, 92, 231, 0.55);
  outline-offset: 1px;
}
.task-hub-nav__name {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-hub-nav__item--active .task-hub-nav__name {
  font-weight: 600;
}
.task-hub-nav__badge {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.07);
  padding: 1px 6px;
  border-radius: 999px;
}

.task-hub-detail {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.task-hub-detail__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.task-hub-detail__kicker {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.task-hub-detail__onehint {
  margin: 0;
  font-size: 0.65rem;
  color: var(--muted);
}

.task-hub-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 0;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.02);
}
.task-hub-tab {
  padding: 8px 12px;
  margin-bottom: -1px;
  font-size: 0.72rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  border-radius: 0;
}
.task-hub-tab:hover {
  color: var(--text);
}
.task-hub-tab--active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: rgba(108, 92, 231, 0.75);
}
.task-hub-tab__n {
  font-weight: 500;
  opacity: 0.85;
}

.task-hub-panels {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px 14px;
  -webkit-overflow-scrolling: touch;
}
.task-hub-panel {
  display: none;
}
.task-hub-panel--active {
  display: block;
}

.task-hub-grid2 {
  display: grid;
  grid-template-columns: 1fr minmax(132px, 0.85fr);
  gap: 8px 14px;
  align-items: start;
}
.task-hub-field--tight .input--adm {
  min-height: 32px;
  font-size: 0.78rem;
}
@media (max-width: 560px) {
  .task-hub-grid2 {
    grid-template-columns: 1fr;
  }
}
.task-hub-field--tight {
  margin-bottom: 0;
}
.task-hub-field__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.task-hub-field__hint {
  margin: 4px 0 0;
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.3;
}
.task-hub-inline-perms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.74rem;
}
.task-hub-inline-perms__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  margin: 0;
  color: var(--text);
}
.task-hub-inline-perms__item input {
  flex-shrink: 0;
}

.task-hub-panel-hint {
  margin: 0 0 8px;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--muted);
}

.task-hub-vis-head {
  margin-bottom: 8px;
}
.task-hub-vis-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
}
.task-hub-vis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 4px 10px;
  max-height: 160px;
  overflow-y: auto;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.02);
}
.task-hub-vis-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  margin: 0;
  cursor: pointer;
  min-width: 0;
}
.task-hub-vis-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-hub-table-wrap {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
}
.task-hub-members {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}
.task-hub-members thead th {
  text-align: left;
  padding: 5px 10px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.04);
  border-bottom: 1px solid var(--border);
}
.task-hub-members tbody td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.task-hub-members tbody tr:last-child td {
  border-bottom: none;
}
.task-hub-members tbody tr:hover td {
  background: rgba(108, 92, 231, 0.04);
}
.task-hub-cell-name {
  font-weight: 500;
}
.task-hub-cell-move {
  width: 44%;
  max-width: 220px;
}
.task-hub-user-move {
  width: 100%;
  min-height: 30px;
  font-size: 0.72rem;
  padding: 4px 6px;
}
.task-hub-member-row {
  cursor: grab;
}
.task-hub-member-row:active {
  cursor: grabbing;
}
.task-hub-empty-cell {
  padding: 12px 10px !important;
  font-size: 0.74rem !important;
  line-height: 1.4 !important;
}

@media (max-width: 900px) {
  .task-hub-shell {
    flex-direction: column;
    max-height: none;
  }
  .task-hub-sidebar {
    width: 100%;
    max-height: 160px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .task-hub-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .task-hub-nav__item {
    flex: 1 1 auto;
    min-width: 120px;
  }
  .task-hub-vis-grid {
    grid-template-columns: 1fr;
  }
}

.adm-tasks-scroll--pour {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  margin-bottom: 0;
  padding-bottom: var(--adm-gap-1);
  -webkit-overflow-scrolling: touch;
}
.adm-pour-editor {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.adm-pour-editor__toolbar {
  margin-bottom: var(--adm-gap-2);
}
.adm-tasks-page .pour-layout-preview-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg);
  max-width: 100%;
}
.adm-tasks-page .pour-layout-preview-table {
  font-size: 0.65rem;
}
.adm-tasks-page .pour-layout-preview-table th {
  position: relative;
  padding: 6px 4px;
  font-size: 0.6rem;
}

.adm-tasks-games-list {
  list-style: none;
  margin: var(--adm-gap-3) 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: min(260px, 38vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}
.adm-tasks-page .adm-tasks-games-list .tests-games-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--adm-gap-2);
  margin: 0;
  padding: var(--adm-gap-2) var(--adm-gap-3);
  border-bottom: 1px solid var(--border);
  font-size: var(--adm-font-ui);
  min-height: calc(var(--adm-control-min-h) + 4px);
  min-width: 0;
}
.adm-tasks-page .adm-tasks-games-list .tests-games-item:last-child {
  border-bottom: none;
}
.adm-tasks-page .adm-tasks-games-list .tests-games-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.adm-tasks-page .adm-tasks-games-list .tests-games-item .btn {
  flex-shrink: 0;
  width: auto !important;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 0.75rem;
}
.adm-tasks-page .adm-tasks-games-list > li.content-muted {
  margin: 0;
  padding: var(--adm-gap-3);
  border: none;
  font-size: var(--adm-font-caption);
  line-height: 1.4;
}

/* Матрица внутри adm: плотная таблица и выпадающие списки */
.adm-tasks-page .section-settings-vis-table {
  font-size: var(--adm-font-ui);
}
.adm-tasks-page .section-settings-vis-table th,
.adm-tasks-page .section-settings-vis-table td {
  padding: var(--adm-gap-2) var(--adm-gap-3);
  vertical-align: middle;
}
.adm-tasks-page .section-settings-vis-table thead th {
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
}
.adm-tasks-page .section-settings-dd-btn {
  min-height: var(--adm-control-min-h);
  padding: var(--adm-gap-2) 10px;
}

/* ——— Тест-хаб: доп. унификация контролов (кнопки, скролл) ——— */
.tasks-page .btn {
  font-size: var(--th-font-md);
  padding: 6px var(--space-3);
}
.tasks-page .btn-xs {
  padding: 3px var(--space-2);
  font-size: var(--th-font-xs);
}
.tasks-page .btn-xs.tasks-btn-add-pour {
  min-height: calc((6px + 1.25em) * 1.35 * 1.35);
  padding-top: 5px;
  padding-bottom: 5px;
}
/* Таблица заливов: горизонтальная полоса чуть ниже; вертикальная — как везде */
.tasks-table-scroll::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: 6px;
}
.tasks-table tr:hover td {
  background: rgba(108, 92, 231, 0.04);
}
.tasks-detail-kv strong {
  color: var(--text);
}

/* ——— Статистика (ROMI) ——— */
.statistics-page__header {
  margin-bottom: var(--space-3);
}
.statistics-page__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}
.statistics-page__title--inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.statistics-refresh-btn.statistics-refresh-btn--inline {
  width: 28px;
  height: 28px;
  margin-top: 0;
  margin-left: 0;
}
.statistics-refresh-btn--inline svg {
  width: 16px;
  height: 16px;
}
/* Блок: таблица слева, панель формулы справа (без переноса строки; узкий экран — горизонтальный скролл) */
.statistics-table-block {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--space-4);
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.statistics-formula-panel {
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: var(--space-4) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(108, 92, 231, 0.06) 55%,
    rgba(255, 255, 255, 0.03) 100%
  );
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.statistics-formula-panel__title {
  margin: 0 0 var(--space-3);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  white-space: nowrap;
}
.statistics-formula-panel__formula-intro {
  margin: 0 0 var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  white-space: nowrap;
}
.statistics-formula-panel__equation {
  margin: 0;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
}
.statistics-formula-panel__mul {
  color: var(--accent);
  font-weight: 700;
  margin: 0 2px;
}
.statistics-formula-panel__list {
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.statistics-formula-panel__weight {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.statistics-formula-panel__item {
  position: relative;
  padding-left: var(--space-4);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: nowrap;
}
.statistics-formula-panel__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 3px;
  height: calc(100% - 0.35em);
  min-height: 2.5em;
  border-radius: 2px;
  background: var(--border);
}
.statistics-formula-panel__item--profit::before {
  background: linear-gradient(180deg, #4ade80, rgba(74, 222, 128, 0.35));
}
.statistics-formula-panel__item--romi::before {
  background: linear-gradient(180deg, #a78bfa, rgba(167, 139, 250, 0.35));
}
.statistics-formula-panel__item--stab::before {
  background: linear-gradient(180deg, #38bdf8, rgba(56, 189, 248, 0.35));
}
.statistics-page .statistics-table-inner.admin-table-wrap {
  overflow: visible;
  width: auto;
  max-width: none;
  display: inline-block;
  vertical-align: top;
  flex: 0 0 auto;
}
.statistics-page .statistics-table-inner .admin-table.statistics-table {
  min-width: 0;
  width: max-content;
  max-width: none;
  table-layout: auto;
}
.statistics-page .statistics-table-inner .admin-table th,
.statistics-page .statistics-table-inner .admin-table td {
  width: auto;
  white-space: nowrap;
  text-align: center;
}
.statistics-refresh-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  color: #efefef;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.statistics-refresh-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}
.statistics-refresh-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.statistics-refresh-btn--busy svg {
  animation: statistics-spin 0.75s linear infinite;
}
@keyframes statistics-spin {
  to {
    transform: rotate(360deg);
  }
}
.statistics-loading-msg {
  margin: 0 0 var(--space-2);
  min-height: 1.25em;
}
.statistics-detail-loading {
  margin: 0 0 var(--space-2);
  font-size: 0.8125rem;
}
.statistics-banner {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.statistics-banner--error {
  background: rgba(220, 53, 69, 0.12);
  color: var(--text);
  border: 1px solid rgba(220, 53, 69, 0.35);
}
.statistics-table.statistics-table--compact th,
.statistics-table.statistics-table--compact td {
  padding: 6px 10px;
  font-size: 0.8125rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
  text-align: center;
}
.statistics-table.statistics-table--compact th:last-child,
.statistics-table.statistics-table--compact td:last-child {
  border-right: none;
}
.statistics-table.statistics-table--compact thead th {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: center;
}
.statistics-table td.statistics-score-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}
.statistics-table td.statistics-total-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 700;
}
/* Перекрывает базовый .admin-table { text-align: left } у рейтинга */
#content-statistics .admin-table.statistics-table th,
#content-statistics .admin-table.statistics-table td {
  text-align: center !important;
}
.statistics-visibility-root {
  margin: var(--space-4) 0;
}
.statistics-visibility-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 50vh;
  overflow: auto;
  padding: var(--space-2) 0;
}
.statistics-visibility-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: 0.9375rem;
}
.statistics-visibility-item input {
  flex-shrink: 0;
}
.statistics-visibility-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

.settings-logs-page {
  max-width: none;
}
.settings-logs-title {
  margin: 0 0 var(--space-2);
}
.settings-logs-subtitle {
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.settings-logs-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.settings-logs-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.settings-logs-select {
  min-width: 130px;
}
.settings-logs-status {
  margin-left: var(--space-2);
}
.settings-logs-console-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #0b0f14;
  overflow: hidden;
}
.settings-logs-console {
  margin: 0;
  padding: 12px 14px;
  max-height: 68vh;
  overflow: auto;
  color: #d1d5db;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre;
}

/* Push-редактор: высота как у тест-хаба, отступы как у контента / общей таблицы */
.content:has(#content-push-editor) {
  padding: var(--space-5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-self: stretch;
}

.content:has(#content-push-editor) #content-area {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#content-push-editor.content-page {
  flex: 1 1 auto;
  min-height: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.push-editor-embed {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.push-editor-embed__frame {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  display: block;
}
