/* Опросы: каталог, прохождение, админка, результаты */

.form-grid .form-grid__full {
  grid-column: 1 / -1;
}

.poll-import-hint {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted, #567);
  margin: 0 0 1rem;
  max-width: 48rem;
}

.poll-import-form textarea {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
}

.poll-edit-export {
  white-space: normal;
}

.poll-edit-export-hint {
  font-size: 0.88rem;
  color: var(--text-muted, #678);
}

.poll-edit-export-hint code {
  font-size: 0.85em;
}

.polls-intro {
  max-width: none;
  width: 100%;
  margin: 0.75rem 0 1.25rem;
  color: #2f4d69;
  font-size: 0.95rem;
  line-height: 1.5;
}

body[data-theme="dark"] .polls-intro,
body.theme-dark .polls-intro {
  color: #cfe2f5;
}

/* Шапка каталога опросов */
.polls-page-heading {
  margin: 0 0 0.5rem;
}

.polls-page-heading__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 12px;
  border-bottom: 1px solid rgba(15, 70, 133, 0.15);
}

.polls-page-heading__icon {
  color: #0F4685;
  font-size: 1.2rem;
}

.polls-page-heading__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0F4685;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.polls-page-heading__stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.85rem 0 0.35rem;
}

.polls-stat-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
  border: 1px solid rgba(15, 70, 133, 0.12);
  border-radius: 10px;
  min-width: 0;
}

.polls-stat-card__icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
  font-size: 1.1rem;
  color: #0F4685;
}

.polls-stat-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.polls-stat-card__value {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.15;
  color: #0F4685;
}

.polls-stat-card__label {
  font-size: 0.78rem;
  line-height: 1.25;
  color: #567;
}

.polls-toolbar {
  border: 1px solid rgba(15, 70, 133, 0.14);
  border-radius: 10px;
  background: #f7fbff;
}

.polls-toolbar .card-body {
  padding: 1rem 1.15rem;
}

.polls-filter-form .form-label {
  color: #6a7f93;
  font-weight: 500;
}

.poll-card__category {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: #6a7f93;
}

.poll-card__cta {
  margin-top: auto;
  align-self: flex-start;
  pointer-events: none;
}

.poll-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

body[data-theme="dark"] .polls-page-heading__title,
body[data-theme="dark"] .polls-page-heading__icon,
body[data-theme="dark"] .polls-stat-card__value,
body[data-theme="dark"] .polls-stat-card__icon {
  color: #8eb9e0;
}

body[data-theme="dark"] .polls-stat-card {
  background: rgba(15, 70, 133, 0.22);
  border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .polls-stat-card__label {
  color: #a8b8c8;
}

body[data-theme="dark"] .polls-toolbar {
  background: rgba(21, 34, 56, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1100px) {
  .polls-page-heading__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .polls-page-heading__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Каталог опросов: карточки */
.poll-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.35rem;
  margin-top: 0.5rem;
}

.poll-card {
  margin: 0;
}

.poll-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: 0 6px 22px rgba(7, 72, 141, 0.1);
  border: 1px solid rgba(7, 72, 141, 0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}

.poll-card__link:hover {
  box-shadow: 0 12px 32px rgba(7, 72, 141, 0.16);
  transform: translateY(-2px);
}

.poll-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e8f0fa 0%, #d4e4f5 100%);
  overflow: hidden;
}

.poll-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #edf3fa;
  display: block;
}

.poll-card__placeholder {
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary, #07488d) 0%, #0a5aa8 100%);
  color: rgba(255, 255, 255, 0.35);
  font-size: 3rem;
}

.poll-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.poll-card__badge--open {
  background: #e8f8ef;
  color: #1e6b3a;
  border: 1px solid #b8e0c8;
}

.poll-card__badge--closed {
  background: #fff4e5;
  color: #a65c00;
  border: 1px solid #f0d4a8;
}

.poll-card__body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.poll-card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--primary-dark, #052a50);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}

.poll-card__link:hover .poll-card__title {
  color: var(--primary-light, #1a6fc4);
}

.poll-card__desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #445;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.poll-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem;
  margin: 0.35rem 0 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid #e8eef5;
}

.poll-card__stat dt {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8899aa;
  font-weight: 600;
}

.poll-card__stat dt i {
  margin-right: 0.25rem;
  opacity: 0.85;
}

.poll-card__stat dd {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary-dark, #052a50);
}

body.theme-dark .poll-card__link {
  background: #1a2838;
  border-color: #2a3f55;
  box-shadow: none;
}

body.theme-dark .poll-card__title {
  color: var(--accent-light, #9fd4ff);
}

body.theme-dark .poll-card__link:hover .poll-card__title {
  color: #c8e8ff;
}

body.theme-dark .poll-card__desc {
  color: var(--text-muted, #9aaabe);
}

body.theme-dark .poll-card__stats {
  border-color: #2a3f55;
}

body.theme-dark .poll-card__stat dt {
  color: #7a8fa8;
}

body.theme-dark .poll-card__stat dd {
  color: #e8f0f8;
}

body.theme-dark .poll-card__badge--open {
  background: rgba(40, 120, 80, 0.35);
  color: #a8f0c8;
  border-color: rgba(120, 200, 160, 0.4);
}

body.theme-dark .poll-card__badge--closed {
  background: rgba(160, 100, 40, 0.35);
  color: #ffd9a0;
  border-color: rgba(220, 160, 80, 0.4);
}

body.theme-dark .poll-card__media {
  background: #121e2a;
}

.poll-edit-cover-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.poll-edit-cover-preview__img-wrap {
  width: 200px;
  height: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #c8d8ea;
  background: #edf3fa;
}

.poll-edit-cover-preview__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pres-card--poll .pres-card__cover--poll {
  background: linear-gradient(135deg, #e8f2fc 0%, #d4e8f8 100%);
}

.pres-grid--polls {
  margin-top: 1rem;
}

.poll-catalog-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.poll-catalog-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  line-height: 1.2;
}

.poll-catalog-badge--open {
  background: #e8f8ef;
  color: #1e6b3a;
  border: 1px solid #b8e0c8;
}

.poll-catalog-badge--closed {
  background: #fff4e5;
  color: #a65c00;
  border: 1px solid #f0d4a8;
}

.poll-catalog-badge--ok {
  background: #e8f0ff;
  color: #1a4a8c;
  border: 1px solid #c8d8f0;
}

.poll-catalog-badge--blocked {
  background: #fdecec;
  color: #9a1c1c;
  border: 1px solid #f0b8b8;
}

.poll-card__passed-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  padding: 0.28rem 0.56rem;
  border-radius: 999px;
  background: #fff1f1;
  color: #b32626;
  border: 1px solid #efb1b1;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
}

.poll-card__passed-note i {
  font-size: 0.9rem;
}

body.theme-dark .poll-catalog-badge--open {
  background: rgba(40, 120, 80, 0.35);
  color: #a8f0c8;
  border-color: rgba(120, 200, 160, 0.4);
}

body.theme-dark .poll-catalog-badge--closed {
  background: rgba(160, 100, 40, 0.35);
  color: #ffd9a0;
  border-color: rgba(220, 160, 80, 0.4);
}

body.theme-dark .poll-catalog-badge--ok {
  background: rgba(60, 100, 180, 0.35);
  color: #b8d4ff;
  border-color: rgba(120, 160, 240, 0.35);
}

body.theme-dark .poll-catalog-badge--blocked {
  background: rgba(160, 50, 50, 0.35);
  color: #ffb8b8;
  border-color: rgba(220, 100, 100, 0.4);
}

body.theme-dark .poll-card__passed-note {
  background: rgba(155, 42, 42, 0.3);
  color: #ffb8b8;
  border-color: rgba(220, 100, 100, 0.45);
}

.poll-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.poll-admin-table th,
.poll-admin-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-soft, #d0e0f0);
  border-right: 1px solid var(--border-soft, #d0e0f0);
  text-align: left;
  vertical-align: top;
}

.poll-admin-table th.poll-admin-table__num,
.poll-admin-table td.poll-admin-table__num {
  text-align: center;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.poll-admin-table th.poll-admin-table__num {
  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 700;
}

.poll-admin-table td.poll-admin-table__num {
  white-space: nowrap;
}

.poll-admin-table th:last-child,
.poll-admin-table td:last-child {
  border-right: none;
}

.poll-admin-table__actions {
  white-space: normal;
}

.poll-admin-table__actions .action-group {
  flex-wrap: nowrap;
}

.poll-admin-table__actions .btn {
  margin: 0.15rem 0.35rem 0.15rem 0;
  display: inline-block;
}

.poll-inline-form {
  display: inline-block;
  margin: 0;
}

.poll-question-form .form-grid__full {
  grid-column: 1 / -1;
}

.poll-q-preview {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-soft, #e0e8f0);
}

.poll-q-preview:last-child {
  border-bottom: none;
}

.poll-q-preview__title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.poll-q-preview__meta {
  font-weight: 400;
  color: var(--text-muted, #678);
  font-size: 0.9rem;
}

.poll-q-preview__hint,
.poll-q-preview__opts {
  font-size: 0.88rem;
  color: var(--text-muted, #678);
  margin: 0.25rem 0;
}

.poll-q-preview__img {
  max-width: 200px;
  max-height: 120px;
  border-radius: 8px;
  vertical-align: middle;
  margin-top: 0.25rem;
}

.poll-results-note {
  font-size: 0.9rem;
  color: var(--text-muted, #678);
  max-width: 42rem;
}

.poll-result-block__q {
  margin-top: 0;
  font-size: 1.05rem;
}

.poll-result-block__hint {
  font-size: 0.88rem;
  color: var(--text-muted, #678);
}

.poll-result-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  margin-top: 0.35rem;
}

.poll-result-pct {
  color: var(--text-muted, #678);
}

.poll-progress {
  height: 8px;
  background: #e8eef5;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.25rem 0 0.75rem;
}

.poll-progress__bar {
  height: 100%;
  background: var(--accent, #1a6fc4);
  border-radius: 4px;
  min-width: 2px;
}

.poll-open-answer {
  font-size: 0.9rem;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.35rem;
  background: #f4f8fd;
  border-radius: 8px;
  border: 1px solid #e0e8f0;
}

/* Прохождение */
.poll-take-page {
  padding-bottom: 2rem;
}

.poll-take-wrap {
  max-width: 40rem;
  margin: 0 auto;
}

.poll-finish-notice {
  text-align: center;
}

.poll-finish-notice__msg {
  margin-bottom: 0.9rem;
}

.poll-finish-notice__actions {
  margin: 0;
}

.poll-take-back {
  margin-bottom: 1rem;
}

.poll-take-header .poll-take-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
}

.poll-take-title__icon {
  color: var(--primary, #07488d);
  font-size: 1.05em;
  opacity: 0.95;
}

.poll-take-desc {
  color: var(--text-muted, #567);
  margin-bottom: 0.75rem;
}

.poll-take-meta {
  font-size: 0.9rem;
  color: var(--text-muted, #678);
  margin: 0;
}

.poll-take-step__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.poll-take-step__num {
  font-weight: 600;
}

.poll-take-step__req {
  font-size: 0.85rem;
  color: var(--text-muted, #678);
}

.poll-take-timer {
  margin-left: auto;
  min-width: min(260px, 100%);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #eef7ff;
  border: 1px solid #c4ddf6;
}

.poll-take-timer__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.poll-take-timer__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #486987;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.poll-take-timer__value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #07488d;
  font-variant-numeric: tabular-nums;
}

.poll-take-timer__track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #d5e8fb;
  overflow: hidden;
}

.poll-take-timer__bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2d79bc 0%, #56a7df 100%);
  transition: width 0.35s ease;
}

.poll-take-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.poll-step-box {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bcd0e4;
  border-radius: 6px;
  background: #fff;
  color: #2c4f73;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  user-select: none;
}

.poll-step-box--answered {
  background: #dff5df;
  border-color: #9ed49e;
  color: #2d6d2d;
}

.poll-step-box--answered span {
  text-decoration: line-through;
}

.poll-step-box--current {
  box-shadow: 0 0 0 2px rgba(7, 72, 141, 0.2);
}

a.poll-step-box:hover {
  border-color: #6fa6dc;
  background: #eef5fd;
}

.poll-take-q__text {
  font-size: clamp(1.22rem, 1rem + 0.8vw, 1.55rem);
  margin-bottom: 0.9rem;
  line-height: 1.5;
  font-weight: 700;
  color: #0f355c;
  background: #eaf6ff;
  border: 1px solid #c8e3f7;
  border-left: 4px solid #6eaee0;
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.poll-take-q__img img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.poll-take-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.poll-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #d0e0f0;
  background: #fafcfe;
}

.poll-opt:hover {
  border-color: var(--accent-light, #6ca8e0);
}

.poll-opt input {
  margin-top: 0.2rem;
}

.poll-take-hint {
  font-size: 0.85rem;
  color: var(--text-muted, #678);
  margin-top: 0.5rem;
}

.poll-take-textarea {
  width: 100%;
  max-width: none;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #c8d8e8;
  font: inherit;
  resize: vertical;
  box-sizing: border-box;
  min-height: 130px;
}

.poll-take-open-label {
  display: block;
  width: 100%;
}

.poll-take-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.poll-avg-card .poll-avg-title {
  margin-top: 0;
  font-size: 1.1rem;
}

.poll-avg-item {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e8eef5;
}

.poll-avg-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.poll-avg-q {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.poll-avg-row {
  font-size: 0.92rem;
  color: var(--text-muted, #567);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.poll-result-question-text .poll-question-inline-img { max-height: 120px; object-fit: contain; }
.poll-result-open-answer { background: #fafbfc; }
body[data-theme="dark"] .poll-results-toolbar .card-body,
body[data-theme="dark"] .poll-result-card-head { background: rgba(30, 41, 59, 0.4); }
body[data-theme="dark"] .poll-result-open-answer { background: rgba(15, 23, 42, 0.5); }

/* Итоговая таблица опросов — админка */
.polls-admin-type-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0;
}
.polls-admin-type-legend__title { font-weight: 600; color: #495057; }
.polls-admin-type-legend__item strong {
    display: inline-block;
    min-width: 1.1rem;
    text-align: center;
    color: #0F4685;
}
.polls-admin-type-legend__hint { opacity: 0.85; }
.polls-admin-summary-table th,
.polls-admin-summary-table td {
    vertical-align: middle;
}
.polls-admin-type-cell {
    white-space: nowrap;
    letter-spacing: 0.02em;
}
body[data-theme="dark"] .polls-admin-type-legend__title { color: #cbd5e1; }
body[data-theme="dark"] .polls-admin-type-legend__item strong { color: #8eb9e0; }

/* Категории опросов — компактный блок в админке */
.poll-cat-admin-card .card-header { background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); }
.poll-cat-admin-hint { line-height: 1.35; }
.poll-cat-create {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.75rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}
.poll-cat-create-fields {
    display: flex;
    flex: 1 1 16rem;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}
.poll-cat-create-fields input[name="poll_cat_name"] { flex: 1 1 9rem; min-width: 7rem; max-width: 11rem; }
.poll-cat-create-fields input[name="poll_cat_description"] { flex: 2 1 12rem; min-width: 8rem; }
.poll-cat-create-fields .poll-cat-sort-input { width: 2.75rem; text-align: center; }
.poll-cat-create-btn { flex-shrink: 0; white-space: nowrap; }
.poll-cat-empty { padding: 0.5rem 0.25rem; }
.poll-cat-list {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.8125rem;
}
.poll-cat-list-head,
.poll-cat-row {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) 5.25rem 5.25rem;
    align-items: center;
    column-gap: 0.5rem;
    padding: 0.4rem 0.65rem;
}
.poll-cat-list-head {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}
.poll-cat-row {
    border-bottom: 1px solid #eef2f6;
    min-height: 2.35rem;
    transition: background 0.15s ease;
}
.poll-cat-row:last-child { border-bottom: none; }
.poll-cat-row:hover { background: #fafbfc; }
.poll-cat-row--hidden { background: #f8fafc; }
.poll-cat-col-id {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    line-height: 1;
}
.poll-cat-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
    border-radius: 4px;
}
.poll-cat-count {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 600;
}
.poll-cat-edit {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}
.poll-cat-in-name {
    flex: 0 1 10.5rem;
    min-width: 6rem;
    max-width: 12rem;
}
.poll-cat-in-desc {
    flex: 1 1 6rem;
    min-width: 0;
    color: #64748b;
}
.poll-cat-in-desc:focus,
.poll-cat-in-desc:not(:placeholder-shown) { color: inherit; }
.poll-cat-in-sort {
    width: 2.65rem;
    flex-shrink: 0;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
    text-align: center;
}
.poll-cat-save {
    flex-shrink: 0;
    padding: 0.2rem 0.45rem;
    line-height: 1.15;
}
.poll-cat-badge {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.22em 0.5em;
}
.poll-cat-badge--active { background: #dcfce7; color: #166534; }
.poll-cat-badge--hidden { background: #e2e8f0; color: #64748b; }
.poll-cat-col-status { text-align: center; }
.poll-cat-col-actions { display: flex; justify-content: flex-end; }
.poll-cat-actions .btn { padding: 0.2rem 0.42rem; }
@media (max-width: 767.98px) {
    .poll-cat-list-head { display: none; }
    .poll-cat-row {
        grid-template-columns: 2.5rem 1fr auto;
        grid-template-areas: "id form actions" "id status actions";
        row-gap: 0.3rem;
    }
    .poll-cat-col-id { grid-area: id; }
    .poll-cat-edit { grid-area: form; flex-wrap: wrap; }
    .poll-cat-in-name,
    .poll-cat-in-desc { flex: 1 1 100%; max-width: none; }
    .poll-cat-col-status { grid-area: status; text-align: left; }
    .poll-cat-col-actions { grid-area: actions; align-self: start; }
}
body[data-theme="dark"] .poll-cat-admin-card .card-header {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.6) 100%);
}
body[data-theme="dark"] .poll-cat-create {
    background: rgba(30, 41, 59, 0.35);
    border-color: rgba(100, 116, 139, 0.4);
}
body[data-theme="dark"] .poll-cat-list {
    border-color: rgba(100, 116, 139, 0.35);
}
body[data-theme="dark"] .poll-cat-list-head {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(100, 116, 139, 0.3);
}
body[data-theme="dark"] .poll-cat-row {
    border-color: rgba(100, 116, 139, 0.2);
}
body[data-theme="dark"] .poll-cat-row:hover { background: rgba(30, 41, 59, 0.35); }
body[data-theme="dark"] .poll-cat-row--hidden { background: rgba(15, 23, 42, 0.4); }
body[data-theme="dark"] .poll-cat-id {
    background: rgba(51, 65, 85, 0.8);
    color: #94a3b8;
}
body[data-theme="dark"] .poll-cat-badge--active {
    background: rgba(22, 101, 52, 0.35);
    color: #86efac;
}
body[data-theme="dark"] .poll-cat-badge--hidden {
    background: rgba(51, 65, 85, 0.5);
    color: #94a3b8;

/* Инструкции в админке (светло-зелёный блок) */
.profile-admin-instruction,
.polls-admin-instruction {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 1rem 1.15rem 1.1rem;
    color: #14532d;
}
.profile-admin-instruction-title,
.polls-admin-instruction-title {
    color: #166534;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.profile-admin-instruction-subtitle,
.polls-admin-instruction-subtitle {
    color: #15803d;
    font-weight: 600;
    margin-top: 0.5rem;
}
.profile-admin-instruction-body,
.polls-admin-instruction-body {
    line-height: 1.55;
}
.profile-admin-instruction-body ul,
.profile-admin-instruction-body ol,
.polls-admin-instruction-body ul,
.polls-admin-instruction-body ol {
    padding-left: 1.25rem;
}
.profile-admin-instruction-body a,
.polls-admin-instruction-body a {
    color: #047857;
    font-weight: 600;
}
.profile-admin-instruction-body a:hover,
.polls-admin-instruction-body a:hover {
    color: #065f46;
}
.profile-admin-instruction-body code,
.polls-admin-instruction-body code {
    background: rgba(255, 255, 255, 0.65);
    color: #166534;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.92em;
}
body[data-theme="dark"] .profile-admin-instruction,
body[data-theme="dark"] .polls-admin-instruction {
    background: rgba(6, 78, 59, 0.25);
    border-color: rgba(52, 211, 153, 0.35);
    color: #d1fae5;
}
body[data-theme="dark"] .profile-admin-instruction-title,
body[data-theme="dark"] .polls-admin-instruction-title {
    color: #6ee7b7;
}
body[data-theme="dark"] .profile-admin-instruction-subtitle,
body[data-theme="dark"] .polls-admin-instruction-subtitle {
    color: #86efac;
}
body[data-theme="dark"] .profile-admin-instruction-body a,
body[data-theme="dark"] .polls-admin-instruction-body a {
    color: #6ee7b7;
}
body[data-theme="dark"] .profile-admin-instruction-body code,
body[data-theme="dark"] .polls-admin-instruction-body code {
    background: rgba(0, 0, 0, 0.25);
    color: #a7f3d0;
}

.poll-admin-cover-preview,
.poll-admin-question-preview {
    object-fit: cover;
}

.charts-form-control {
    min-width: 200px;
}

