:root {
  color-scheme: light;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --brand-navy: #1e3a8a;
  --brand-sky: #2563eb;
  --brand-sky-light: #3b82f6;
  --accent-mint: #0ea5e9;
  --surface: #ffffff;
  --surface-muted: #f1f5ff;
  --background: #f6f8fc;
  --border: #dbe3f5;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --shadow-tiny: 0 4px 20px rgba(37, 99, 235, 0.15);
  --text-primary: #1f2937;
  --text-secondary: #334155;
  --text-muted: #64748b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: var(--brand-sky);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus {
  color: var(--brand-navy);
}

.site-body {
  min-height: 100vh;
  background: var(--background);
  color: var(--text-primary);
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1120px, 100% - 3rem);
  margin: 0 auto;
}

.container--wide {
  width: min(100%, 100% - 1.5rem);
}

.container--narrow {
  width: min(760px, 100% - 3rem);
}

.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(219, 227, 245, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-navy);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-link--plain {
  padding: 0;
  font-weight: 600;
  color: var(--brand-navy);
}

.nav-link--plain:hover,
.nav-link--plain:focus {
  background: transparent;
  border-color: transparent;
  color: var(--brand-sky);
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--brand-navy);
  border-color: rgba(37, 99, 235, 0.15);
  background: rgba(37, 99, 235, 0.08);
  outline: none;
}

.site-main {
  flex: 1;
}

.site-footer {
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(219, 227, 245, 0.9);
}

.footer-bar {
  padding: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card {
  background: var(--surface);
  border-radius: 22px;
  border: 1px solid rgba(219, 227, 245, 0.9);
  box-shadow: var(--shadow-soft);
  padding: 2.5rem;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.card-compact {
  padding: 1.75rem 1.5rem;
  border-radius: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-sky);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-sky-light), var(--brand-navy));
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-tiny);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.25);
  outline: none;
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(29, 78, 216, 0.2);
  padding: 0.8rem 1.6rem;
  color: var(--brand-navy);
  background: rgba(37, 99, 235, 0.08);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: rgba(29, 78, 216, 0.35);
  background: rgba(37, 99, 235, 0.12);
  outline: none;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(180, 198, 238, 0.8);
  background: #fff;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-sky);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.form-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 3rem 2.75rem;
  border-radius: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label,
.label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}


.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.table th,
.table td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(219, 227, 245, 0.9);
  font-size: 0.9rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.table thead {
  background: rgba(30, 64, 175, 0.8);
}

.table thead th {
  background: inherit;
  border-top: none;
  color: #ffffff;
  font-weight: 600;
}

.table thead th.sticky {
  color: #000000;
}

.table thead th:first-child {
  border-top-left-radius: 0;
}

.table thead th:last-child {
  border-top-right-radius: 0;
}

.table tbody td {
  background: #ffffff;
}

.table tbody tr:nth-child(even) td {
  background: #f0f7ff;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 0;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.data-table thead {
  background: rgba(30, 64, 175, 0.8);
}

.data-table th,
.data-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(219, 227, 245, 0.8);
  font-size: 0.92rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.data-table th {
  background: inherit;
  color: #ffffff;
  font-weight: 600;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-empty {
  text-align: center;
  padding: 1.2rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.form-group--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.form-group--checkbox .form-label {
  margin-bottom: 0;
}

.form-group--checkbox input[type='checkbox'] {
  width: auto;
  height: 1.1rem;
}

.badge--success {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.badge--muted {
  background: rgba(148, 163, 184, 0.2);
  color: #334155;
}

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

/* Современная финальная таблица */
#final-table {
  table-layout: fixed;
  width: auto;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

#final-table th,
#final-table td {
  padding: 1.2rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  transition: background-color 0.2s ease;
}

#final-table th {
  background: rgba(30, 64, 175, 0.8);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
}

#final-table th:first-child,
#final-table td:first-child {
  width: 80px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

#final-table th:last-child,
#final-table td:last-child {
  width: 100px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

#final-table th:nth-child(2),
#final-table td:nth-child(2) {
  text-align: left;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  width: auto;
  min-width: 400px;
  font-weight: 500;
}

/* Современные стили для призовых мест - только цветовой акцент */
#final-table tbody tr.place-1 td:first-child {
  color: #f59e0b;
  font-weight: 700;
}

#final-table tbody tr.place-1 td {
  color: rgba(30, 64, 175, 0.7);
  font-weight: 600;
}

#final-table tbody tr.place-2 td:first-child {
  color: #6b7280;
  font-weight: 700;
}

#final-table tbody tr.place-2 td {
  color: rgba(30, 64, 175, 0.7);
  font-weight: 600;
}

#final-table tbody tr.place-3 td:first-child {
  color: #ea580c;
  font-weight: 700;
}

#final-table tbody tr.place-3 td {
  color: rgba(30, 64, 175, 0.7);
  font-weight: 600;
}

/* Современные hover эффекты */
#final-table tbody tr:hover {
  background: #f8fafc;
}

/* Современная таблица summary */
#summary-table {
  table-layout: fixed;
  width: auto;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

#summary-table th,
#summary-table td {
  padding: 1.2rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  transition: background-color 0.2s ease;
}

#summary-table th {
  background: rgba(30, 64, 175, 0.8);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
}

#summary-table th:first-child,
#summary-table td:first-child {
  text-align: left;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  width: auto;
  min-width: 300px;
  font-weight: 500;
  color: #ffffff;
  background: rgba(30, 64, 175, 0.8);
}

#summary-table th:not(:first-child),
#summary-table td:not(:first-child) {
  width: 100px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding-left: 1rem;
  padding-right: 1rem;
  font-size: 1rem;
  color: #ffffff;
  background: rgba(30, 64, 175, 0.8);
}

#summary-table th:last-child,
#summary-table td:last-child {
  width: 120px;
  font-weight: 700;
  font-size: 1rem;
  background: rgba(30, 64, 175, 0.8);
}

/* Современные hover эффекты для summary таблицы */
#summary-table tbody tr:hover {
  background: #f8fafc;
}

.table .sticky {
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 1;
  box-shadow: none;
  border-right: 1px solid rgba(148, 163, 184, 0.35);
}

.score-matrix {
  table-layout: fixed;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
  border: 0.5px solid rgba(37, 99, 235, 0.2);
  background: #ffffff;
}

.score-matrix th,
.score-matrix td {
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  word-break: keep-all;
  overflow-wrap: anywhere;
  padding: 1rem 0.8rem;
  line-height: 1.5;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.score-matrix thead {
  background: #f8fafc !important;
}

.score-matrix thead th {
  background: #f8fafc !important;
  color: #1e40af;
  border-bottom: 0.5px solid rgba(37, 99, 235, 0.15);
  /* Sticky хедер */
  position: sticky;
  z-index: 10;
  /* Непрозрачный фон для липкого элемента */
  background-color: #ffffff !important;
  /* Кросс-браузерность для iOS Safari */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
  padding: 1rem 0.8rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Первая строка заголовка */
.score-matrix thead tr:first-child th {
  top: 0;
  z-index: 20;
}

/* Вторая строка заголовка - подгоняем под высоту первой строки */
.score-matrix thead tr:nth-child(2) th {
  top: 3.6rem; /* Примерная высота первой строки, подгоните под свою верстку */
  z-index: 15;
}

.score-matrix thead th:not(.participant-header-cell) {
  background: #f8fafc;
}

.score-matrix thead tr:first-child th:not(.participant-header-cell) {
  border: 0.5px solid rgba(37, 99, 235, 0.2);
  border-collapse: separate;
}

.score-matrix thead tr:nth-child(2) th:not(.participant-header-cell) {
  border: 0.5px solid rgba(37, 99, 235, 0.2);
  border-collapse: separate;
}

.score-matrix .sticky {
  position: sticky;
  left: 0;
  z-index: 15;
  background: #ffffff;
  text-align: left;
  white-space: normal;
  box-shadow: none;
  border-right: 0.5px solid rgba(37, 99, 235, 0.2);
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* Непрозрачный фон для липкого элемента */
  background-color: #ffffff !important;
  /* Кросс-браузерность для iOS Safari */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}

.score-matrix thead .sticky {
  position: sticky;
  left: 0;
  z-index: 25;
  background: #f8fafc;
  overflow: visible;
  background-clip: padding-box;
  border-bottom: 0.5px solid rgba(37, 99, 235, 0.15);
  /* Непрозрачный фон для угловой ячейки */
  background-color: #f8fafc !important;
  /* Кросс-браузерность для iOS Safari */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}

/* Sticky ячейки в первой строке */
.score-matrix thead tr:first-child .sticky {
  top: 0;
  z-index: 30;
}

/* Sticky ячейки во второй строке */
.score-matrix thead tr:nth-child(2) .sticky {
  top: 3.6rem; /* Та же высота, что и для второй строки */
  z-index: 25;
}

.score-matrix .participant-header-cell {
  background: #f8fafc !important;
  color: #1e40af;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  vertical-align: middle;
  min-width: 200px;
  max-width: 200px;
  width: 200px;
  white-space: nowrap;
  overflow: visible;
  /* Угловая ячейка - максимальный z-index */
  position: sticky;
  left: 0;
  z-index: 30;
  background-color: #ffffff !important;
  /* Кросс-браузерность для iOS Safari */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
  font-size: 0.875rem;
  padding: 1.2rem 1rem;
}

/* Угловая ячейка в первой строке */
.score-matrix thead tr:first-child .participant-header-cell {
  top: 0;
  z-index: 35;
}

/* Угловая ячейка во второй строке */
.score-matrix thead tr:nth-child(2) .participant-header-cell {
  top: 3.6rem; /* Та же высота, что и для второй строки */
  z-index: 30;
}

.score-matrix .sticky-header {
  top: 0;
}

.score-matrix .participant-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 500;
  min-width: 200px;
  max-width: 200px;
  width: 200px;
  white-space: nowrap;
  overflow: visible;
  padding: 1rem 1.2rem;
  background: #ffffff;
  border-right: 0.5px solid rgba(37, 99, 235, 0.2);
}


.score-matrix .participant-number {
  font-size: 0.875rem;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  background: #dbeafe;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  display: inline-block;
  width: fit-content;
  border: 0.5px solid rgba(37, 99, 235, 0.2);
}

.score-matrix .participant-name {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 1rem;
  line-height: 1.4;
  color: #1e40af;
  overflow: visible;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  word-break: keep-all;
  overflow-wrap: anywhere;
  padding: 0.3rem 0;
  font-weight: 500;
}

.score-matrix .participant-name span {
  display: block;
}

.score-matrix tbody tr {
  background-color: #ffffff;
}

.score-matrix tbody tr td {
  background-color: #ffffff;
}

.score-matrix tbody .sticky {
  background-color: #ffffff;
  color: inherit;
  /* Непрозрачный фон для липкого элемента в tbody */
  background-color: #ffffff !important;
}

.score-matrix tbody tr td:not(.sticky) {
  background-color: #ffffff;
}

.score-matrix tbody tr:last-child .sticky {
  border-bottom-left-radius: 0;
}

.score-matrix .expert-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1e40af;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.3;
  margin-top: 0.3rem;
  padding: 0.2rem 0;
  text-transform: none;
  letter-spacing: 0.01em;
}

.score-matrix .score-cell {
  min-width: 4.5rem;
  font-variant-numeric: tabular-nums;
  padding: 1rem 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  border: 0.5px solid rgba(37, 99, 235, 0.15);
  transition: all 0.2s ease;
  color: #1e40af;
  background: #ffffff;
}

.score-matrix .score-cell:hover {
  background: #f0f9ff;
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.score-matrix .score-cell--empty {
  color: #64748b;
  font-style: italic;
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.1);
}

.score-matrix .score-cell--updated {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 700;
  border-color: rgba(37, 99, 235, 0.4);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.top-one {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.2), rgba(37, 99, 235, 0.08));
}

.score-input {
  border-radius: 14px;
  border: 1px solid rgba(180, 198, 238, 0.9);
  padding: 0.65rem 0.75rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.score-input:focus {
  border-color: var(--brand-sky);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: none;
}

.ring-2 {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
}

.ring-sky-400 {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

.ring-red-400 {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25) !important;
}

.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  min-width: 280px;
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
  color: var(--text-primary);
}

.toast--success {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(240, 249, 255, 0.95);
}

.toast--error {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(255, 241, 242, 0.95);
}

.toast__title {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.toast__message {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-secondary);
}

.page-section {
  padding: 4rem 0;
}

.landing-basic {
  padding: 3rem 0 4rem;
}

.page-title {
  font-size: 2.15rem;
  margin: 0 0 0.75rem;
  color: var(--brand-navy);
}

.page-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
}

.hero-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: flex-start;
  border-left: 6px solid var(--brand-sky);
}

.hero-card--simple {
  border-left: none;
  padding: 2.25rem;
}

.hero-card__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-meta {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-meta .badge {
  background: rgba(14, 165, 233, 0.18);
  color: var(--brand-sky);
}

.matrix-page,
.results-page {
  position: relative;
  padding: 3rem 0 4rem;
  /* Убираем конфликтующие свойства для sticky */
  transform: none;
  filter: none;
  perspective: none;
  overflow: visible;
}

.matrix-page__head,
.results-page__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.matrix-page__heading,
.results-page__heading {
  max-width: 840px;
}

.matrix-page__head .page-actions,
.results-page__head .page-actions {
  margin: 0;
  gap: 0.5rem;
}

.matrix-page__head .page-actions .btn-secondary,
.results-page__head .page-actions .btn-secondary {
  padding-inline: 1.25rem;
}

.table-wrapper--full {
  width: 100%;
  overflow: auto;
  max-height: calc(100vh - 240px);
  /* Убираем конфликтующие свойства для sticky */
  transform: none;
  filter: none;
  perspective: none;
}

/* Компактные таблицы - общие стили */
.table-wrapper--compact {
  width: auto;
  max-width: 100%;
  display: flex;
  justify-content: center;
}

.table-wrapper--compact .table {
  width: auto;
  min-width: auto;
}

.table-wrapper--full .table {
  min-width: 100%;
}

.floating-home {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-navy);
  font-weight: 600;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.floating-home:hover,
.floating-home:focus {
  background: rgba(37, 99, 235, 0.18);
  color: var(--brand-navy);
}

.dashboard-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.section-head {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.section-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--brand-navy);
}

.section-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.control-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.control-stack {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 2rem;
}

.admin-layout .control-stack .control-card {
  width: 100%;
}

.management-stack .control-card {
  width: 100%;
}

.management-stack .table-wrapper {
  max-height: 460px;
  overflow: auto;
}

.stack-title {
  margin: 3rem 0 1.25rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--brand-navy);
}

.control-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.control-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.control-card__eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.control-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.control-card__description {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.control-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.control-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.control-actions--form {
  justify-content: space-between;
}

.control-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.control-hints {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.control-meta {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.control-meta__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.control-meta__label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.control-meta__value {
  font-weight: 600;
  color: var(--brand-navy);
}

.control-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-navy);
  background: rgba(37, 99, 235, 0.12);
}

.control-status::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--brand-sky);
}

.control-status--ok {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.14);
}

.control-status--ok::before {
  background: #16a34a;
}

.control-status--warning {
  color: #f97316;
  background: rgba(249, 115, 22, 0.16);
}

.control-status--warning::before {
  background: #f97316;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: transparent;
  color: var(--brand-sky);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost:hover,
.btn-ghost:focus {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.08);
  outline: none;
}

.btn-ghost:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.6);
  padding: 0.75rem 1.5rem;
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.65);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-danger:hover,
.btn-danger:focus {
  border-color: rgba(248, 113, 113, 0.85);
  background: rgba(254, 202, 202, 0.75);
  outline: none;
}

.btn-danger:disabled {
  opacity: 0.6;
  cursor: default;
}

[x-cloak] {
  display: none !important;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-card__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-card__value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-card__hint {
  font-size: 0.93rem;
  color: var(--text-muted);
}

.action-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.action-list__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.action-list__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.86), rgba(14, 165, 233, 0.86));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-list__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.action-list__description {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.inline-code,
code {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  background: rgba(37, 99, 235, 0.08);
  padding: 0.2rem 0.45rem;
  border-radius: 0.5rem;
  color: var(--brand-navy);
}

.expert-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 1rem;
}

.expert-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(219, 227, 245, 0.9);
  background: var(--surface);
  box-shadow: var(--shadow-tiny);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.expert-card:hover,
.expert-card:focus-within {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 20px 36px rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
}

.expert-card:has(input[type='radio']:checked) {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 24px 44px rgba(37, 99, 235, 0.25);
  transform: translateY(-3px);
}

.expert-card input[type='radio'] {
  display: none;
}

.expert-card__title {
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.expert-card__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.18);
}

.status-dot--online {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.list-disc {
  list-style: disc;
}

.list-inside {
  padding-left: 1rem;
}

.text-sm {
  font-size: 0.9rem;
}

.text-xs {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.text-lg {
  font-size: 1.1rem;
}

.text-2xl {
  font-size: 1.6rem;
  line-height: 1.25;
}

.text-3xl {
  font-size: 2rem;
  line-height: 1.15;
}

.text-sky-200,
.text-sky-300,
.text-slate-100 {
  color: var(--brand-navy);
}

.text-slate-300 {
  color: var(--text-secondary);
}

.text-slate-400 {
  color: var(--text-muted);
}

.text-slate-500 {
  color: rgba(100, 116, 139, 0.9);
}

.text-rose-300 {
  color: #f87171;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-wider {
  letter-spacing: 0.08em;
}

.font-medium {
  font-weight: 600;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.rounded-xl {
  border-radius: 20px;
}

.rounded-full {
  border-radius: 999px;
}

.rounded-lg {
  border-radius: 16px;
}

.rounded-md {
  border-radius: 12px;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.pt-4 {
  padding-top: 1rem;
}

.py-10 {
  padding: 3rem 0;
}

.py-14 {
  padding: 3.5rem 0;
}

.py-16 {
  padding: 4rem 0;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-10 {
  margin-top: 2.5rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.overflow-x-auto {
  overflow-x: auto;
}

.hidden {
  display: none !important;
}

.cursor-pointer {
  cursor: pointer;
}

.transition {
  transition: all 0.2s ease;
}

.text-center {
  text-align: center;
}

.min-h-full {
  min-height: 100%;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.max-w-md {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.max-w-4xl {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.max-w-5xl {
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
}

.max-w-6xl {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.h-3,
.w-3 {
  width: 0.75rem;
  height: 0.75rem;
}

.border {
  border: 1px solid rgba(219, 227, 245, 0.9);
}

.border-b,
.border-t {
  border-color: rgba(219, 227, 245, 0.9) !important;
}

.border-slate-900,
.border-slate-800,
.border-slate-700 {
  border-color: rgba(219, 227, 245, 0.9) !important;
}

.border-sky-400 {
  border-color: rgba(14, 165, 233, 0.45) !important;
}

.bg-slate-950,
.bg-slate-950\/80,
.bg-slate-900\/90,
.bg-slate-900\/60,
.bg-slate-900\/40 {
  background: var(--surface);
}

.bg-emerald-400 {
  background: #22c55e;
}

.bg-slate-600 {
  background: #94a3b8;
}

.left-0 {
  left: 0;
}

.sticky {
  position: sticky;
}

.uppercase {
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100%, 100% - 2rem);
  }

  .header-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .card {
    padding: 2rem;
  }

  .form-card {
    padding: 2.5rem 2rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    border-left-width: 4px;
  }

  .hero-card--simple {
    padding: 2rem;
  }

  .table-wrapper--full {
    max-height: none;
  }

  .floating-home {
    right: 1rem;
    bottom: 1rem;
  }

  /* Адаптивные стили для таблиц */
  #final-table {
    max-width: 100%;
    font-size: 0.875rem;
  }

  #final-table th,
  #final-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  #final-table th:first-child,
  #final-table td:first-child {
    width: 60px;
    font-size: 0.875rem;
  }

  #final-table th:last-child,
  #final-table td:last-child {
    width: 80px;
    font-size: 0.875rem;
  }

  #final-table th:nth-child(2),
  #final-table td:nth-child(2) {
    min-width: 200px;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  #summary-table {
    max-width: 100%;
    font-size: 0.875rem;
  }

  #summary-table th,
  #summary-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  #summary-table th:first-child,
  #summary-table td:first-child {
    min-width: 200px;
  }

  #summary-table th:not(:first-child),
  #summary-table td:not(:first-child) {
    width: 70px;
    font-size: 0.875rem;
  }

  /* Адаптивные стили для матричной таблицы */
  .score-matrix .participant-cell {
    min-width: 150px;
    max-width: 150px;
    width: 150px;
    padding: 0.75rem 1rem;
  }

  .score-matrix .participant-header-cell {
    min-width: 150px;
    max-width: 150px;
    width: 150px;
    padding: 1rem 0.75rem;
    font-size: 0.75rem;
  }

  .score-matrix .participant-number {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
  }

  .score-matrix .participant-name {
    font-size: 0.875rem;
  }

  .score-matrix .score-cell {
    min-width: 3.5rem;
    padding: 0.75rem 0.6rem;
    font-size: 0.875rem;
  }

  .score-matrix th,
  .score-matrix td {
    padding: 0.75rem 0.6rem;
    font-size: 0.75rem;
  }

  .score-matrix .expert-name {
    font-size: 0.625rem;
  }
}
