:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2937;
  background: #f6f7f9;
}

body {
  margin: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  background: #ffffff;
  border-bottom: 1px solid #d8dee6;
}

.brand {
  font-weight: 700;
  color: #111827;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 12px;
}

.nav a,
a {
  color: #1d4ed8;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand-logo {
  width: auto;
  height: 36px;
  color: #111827;
  flex: 0 0 auto;
}

.period-switcher {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.period-switcher select {
  min-width: 220px;
}

.shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 32px 48px;
}

h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
}

p {
  margin: 0;
  font-size: 18px;
  color: #4b5563;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.dashboard-sections {
  display: grid;
  gap: 24px;
}

.dashboard-domain-sections {
  display: grid;
  gap: 28px;
}

.dashboard-domain {
  display: grid;
  gap: 14px;
}

.dashboard-domain h2 {
  margin: 0;
  padding: 10px 14px;
  border-left: 5px solid #15803d;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.dashboard-domain-students h2 {
  border-left-color: #0f766e;
}

.dashboard-domain-staff h2 {
  border-left-color: #7c3aed;
}

.dashboard-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-section {
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.dashboard-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
}

.dashboard-section h3 {
  margin: -2px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}

.dashboard-directories-section {
  margin-top: 8px;
  border-color: #d1d5db;
}

.btn-domain-pgs {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #15803d;
  --bs-btn-border-color: #15803d;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #166534;
  --bs-btn-hover-border-color: #166534;
}

.btn-domain-pgs-outline {
  --bs-btn-color: #15803d;
  --bs-btn-border-color: #15803d;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #15803d;
  --bs-btn-hover-border-color: #15803d;
}

.btn-domain-students {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #0f766e;
  --bs-btn-border-color: #0f766e;
}

.btn-domain-students-outline {
  --bs-btn-color: #0f766e;
  --bs-btn-border-color: #0f766e;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #0f766e;
  --bs-btn-hover-border-color: #0f766e;
}

.btn-domain-staff {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #7c3aed;
  --bs-btn-border-color: #7c3aed;
}

.btn-domain-staff-outline {
  --bs-btn-color: #7c3aed;
  --bs-btn-border-color: #7c3aed;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #7c3aed;
  --bs-btn-hover-border-color: #7c3aed;
}

button:not(.btn):not(.btn-close),
.button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #1d4ed8;
  border-radius: 6px;
  background: #1d4ed8;
  color: #ffffff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.modal-close {
  width: 1em;
  height: 1em;
  min-height: 0;
  padding: 0.25em;
  border: 0;
  background-color: transparent;
  border-radius: 0.375rem;
}

.button.secondary {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #1f2937;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

select,
input,
textarea {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
}

.table {
  width: 100%;
  background: #ffffff;
}

.table-fluid {
  width: 100%;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.form {
  max-width: 720px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.form p {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 16px;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  box-sizing: border-box;
}

.form .form-check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.form .form-check-row input[type="checkbox"] {
  width: auto;
  min-height: 0;
  padding: 0;
}

.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0 0 28px;
}

.details dt {
  color: #6b7280;
}

.details dd {
  margin: 0;
}

.notice,
.message {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
}

.import-table input[type="text"] {
  width: 100%;
}

.import-table input.import-exact-match,
.import-table input.import-exact-match:focus {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 0 0 0.15rem rgba(22, 163, 74, 0.16);
}

.import-suggestions {
  display: grid;
  gap: 3px;
  margin-top: 6px;
}

.import-suggestions-title {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.import-suggestions .btn {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  padding: 0;
  color: #1d4ed8;
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
}

.import-table .btn {
  min-width: 34px;
  justify-content: center;
}

.import-table .import-suggestions .btn {
  min-width: 0;
  justify-content: flex-start;
}

.btn-disabled-action {
  opacity: 0.55;
}

.modal-close {
  min-height: auto;
  padding: 0.5em;
  border: 0;
  background-color: transparent;
}

.key-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.key-summary div {
  position: relative;
  overflow: hidden;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.key-summary .key-progress-card::before,
.key-percent-pill::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress, 0%);
  background: var(--progress-bg, #fecaca);
  z-index: 0;
}

.key-summary span {
  position: relative;
  z-index: 1;
  display: block;
  color: #64748b;
  font-size: 14px;
}

.key-summary strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.key-progress-success {
  --progress-bg: #bbf7d0;
  color: #166534;
}

.key-progress-warning {
  --progress-bg: #fef3c7;
  color: #92400e;
}

.key-progress-danger {
  --progress-bg: #fecaca;
  color: #991b1b;
}

.key-percent-pill {
  position: relative;
  display: inline-flex;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  padding: 0.25rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  font-weight: 700;
}

.key-stat-table > :not(caption) > * > * {
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
}

.key-stat-table .key-percent-pill {
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
  min-height: 24px;
  align-items: center;
  font-size: 0.85rem;
}

.key-percent-pill span {
  position: relative;
  z-index: 1;
}

.key-row-active > * {
  background-color: #fff7d6 !important;
}

.key-row-completed > * {
  background-color: #dcfce7 !important;
}

.key-code {
  font-family: "Cascadia Mono", "Consolas", "Menlo", monospace;
  font-size: 0.95em;
  letter-spacing: 0;
}

.key-table-compact > :not(caption) > * > * {
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.modal-table-compact > :not(caption) > * > * {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.modal-table-compact .form-check-input {
  width: 1em;
  height: 1em;
  min-height: 0;
  padding: 0;
}

.modal-table-compact .form-control-sm {
  min-height: 28px;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

.questionnaire-table .question-score-input {
  width: 72px;
  max-width: 72px;
}

.questionnaire-table th:first-child,
.questionnaire-table th:nth-child(2),
.questionnaire-table th:nth-child(3),
.questionnaire-table th:last-child,
.questionnaire-table td:first-child,
.questionnaire-table td:nth-child(2),
.questionnaire-table td:nth-child(3),
.questionnaire-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

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

.questionnaire-table th:nth-child(4),
.questionnaire-table td:nth-child(4) {
  width: auto;
  white-space: normal;
}

.questionnaire-table td:nth-child(4) input {
  width: 100%;
}

.form-list-table th:not(.form-list-title-column),
.form-list-table td:not(.form-list-title-column) {
  width: 1%;
  white-space: nowrap;
}

.form-list-table .form-list-title-column {
  width: auto;
  white-space: normal;
}

.staff-faculty-access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 24px;
  max-width: 820px;
}

.staff-faculty-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin: 0;
}

.staff-faculty-check .form-check-input {
  flex: 0 0 auto;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  margin: 0;
  padding: 0;
}

.staff-faculty-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  background-color: #fff;
  color: #495057;
}

.staff-faculty-chip:hover {
  border-color: #adb5bd;
  color: #212529;
}

.staff-faculty-chip--active {
  background-color: #e9ecef;
  border-color: #ced4da;
  color: #212529;
}

.staff-faculty-chip--active:hover {
  background-color: #dee2e6;
  border-color: #adb5bd;
  color: #212529;
}

.staff-faculty-chip--loading {
  opacity: 0.6;
  pointer-events: none;
}

.staff-program-add-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-program-add-form select {
  max-width: 520px;
}

.select2-container--bootstrap-5 .select2-selection {
  min-height: 34px;
}

.faculty-filter-modal .form-check-input,
.faculty-filter-modal input[type="checkbox"] {
  width: 1em;
  height: 1em;
  min-height: 0;
  padding: 0;
  aspect-ratio: 1 / 1;
}

.questionnaire-footer {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.questionnaire-footer p {
  font-size: 15px;
}

.questionnaire-child-block {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}

.questionnaire-child-block h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.questionnaire-child-toggle {
  display: inline-flex;
  align-items: center;
  color: #475569;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.questionnaire-child-toggle:hover,
.questionnaire-child-toggle:focus {
  color: #1d4ed8;
  text-decoration: none;
}

.questionnaire-child-toggle::before {
  content: "▾";
  display: inline-block;
  width: 14px;
}

.questionnaire-child-block.is-collapsed .questionnaire-child-toggle::before {
  content: "▸";
}

.questionnaire-child-block.is-collapsed .questionnaire-child-content {
  display: none;
}

.questionnaire-child-content {
  margin-top: 10px;
}

.questionnaire-child-list {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.questionnaire-child-list p {
  margin: 0;
  color: #64748b;
}

.questionnaire-child-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.questionnaire-child-edit-form {
  display: grid;
  grid-template-columns: 72px minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
}

.questionnaire-child-form {
  display: grid;
  grid-template-columns: 72px minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.questionnaire-matrix-config .questionnaire-child-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.questionnaire-matrix-config .questionnaire-child-edit-form,
.questionnaire-matrix-config .questionnaire-child-form {
  grid-template-columns: 72px minmax(180px, 1fr) auto;
}

.stud-poll-order-input,
.staff-poll-order-input {
  width: 72px;
  max-width: 72px;
}

.stud-poll-question-type-icon,
.staff-poll-question-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #475569;
}

.stud-poll-question-type-icon .bi,
.staff-poll-question-type-icon .bi {
  font-size: 18px;
  line-height: 1;
}

.stud-poll-question-type-cell .form-select,
.staff-poll-question-type-cell .form-select {
  min-width: 180px;
}

#stud-poll-constructor .form-check,
#staff-poll-constructor .form-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  margin: 0;
  padding-left: 0;
}

#stud-poll-constructor .form-check-input,
#staff-poll-constructor .form-check-input,
.form .stud-poll-inline-checkbox input[type="checkbox"],
.form .staff-poll-inline-checkbox input[type="checkbox"] {
  width: 1em;
  height: 1em;
  min-width: 1em;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.stud-poll-inline-checkbox,
.staff-poll-inline-checkbox {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.stud-poll-inline-checkbox label,
.staff-poll-inline-checkbox label {
  margin: 0;
}

.directory-table .form-control-sm,
.directory-table .form-select-sm {
  min-width: 140px;
}

.directory-table .directory-actions {
  width: 1%;
}

.directory-table .directory-actions .btn {
  justify-content: center;
  width: 34px;
  min-height: 31px;
}

.key-count-input {
  max-width: 90px;
}

.print-key-table > :not(caption) > * > * {
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  border-bottom-style: dashed;
}

.print-key-document {
  break-after: page;
  page-break-after: always;
}

.print-key-document:last-child {
  break-after: auto;
  page-break-after: auto;
}

.pgs-key-report-print {
  font-size: 12px;
}

.pgs-key-report-print h1 {
  margin-bottom: 4px;
  font-size: 20px;
}

.pgs-key-report-print h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.pgs-key-report-print table {
  width: 100%;
  margin-bottom: 12px;
  border-collapse: collapse;
}

.pgs-key-report-print th,
.pgs-key-report-print td {
  padding: 3px 5px;
  border: 1px solid #cbd5e1;
  font-size: 11px;
  line-height: 1.2;
}

.pgs-key-report-print tfoot td {
  background: #f1f5f9;
  font-weight: 700;
}

.report-period {
  margin-bottom: 12px;
  font-size: 12px;
}

.pgs-summary-help {
  margin-bottom: 16px;
  padding: 0;
  background: #ffffff;
  color: #475569;
  font-size: 15px;
  text-align: right;
}

.pgs-report-questionnaire p {
  font-size: 16px;
}

.pgs-report-questionnaire-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pgs-report-questionnaire-form label {
  color: #64748b;
  font-size: 16px;
  white-space: nowrap;
}

.pgs-report-questionnaire-form select {
  min-width: 280px;
}

@media (max-width: 900px) {
  .dashboard-section-grid {
    grid-template-columns: 1fr;
  }
}

.pgs-summary-scroll {
  max-height: calc(100vh - 220px);
  overflow: auto;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.pgs-summary-table {
  min-width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.pgs-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f8fafc;
  border-bottom: 1px solid #cbd5e1;
}

.pgs-summary-table th,
.pgs-summary-table td {
  border-right: 1px solid #e5e7eb;
}

.pgs-summary-sticky {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #ffffff;
}

.pgs-summary-table thead .pgs-summary-sticky {
  z-index: 5;
  background: #f8fafc;
}

.pgs-summary-question-col {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
}

.pgs-summary-teacher-col {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  vertical-align: top;
}

.pgs-summary-teacher-col strong,
.pgs-summary-teacher-col span {
  display: block;
}

.pgs-summary-teacher-col span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
}

.pgs-summary-score-cell {
  min-width: 240px;
}

.pgs-summary-table .pgs-summary-question-text {
  font-weight: 400;
}

.pgs-summary-score-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pgs-summary-count {
  flex: 0 0 auto;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: left;
}

.pgs-summary-score-bar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  width: 100%;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  background: #f8fafc;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.pgs-summary-score-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress, 0%);
  background: var(--progress-bg, #e2e8f0);
}

.pgs-summary-score-bar span {
  position: relative;
  z-index: 1;
}

.pgs-summary-score-excellent {
  --progress-bg: #86efac;
}

.pgs-summary-score-good {
  --progress-bg: #bbf7d0;
}

.pgs-summary-score-weak {
  --progress-bg: #fecaca;
}

.pgs-summary-score-bad {
  --progress-bg: #fca5a5;
}

.pgs-summary-comments-cell {
  min-width: 240px;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}

.pgs-summary-comments-cell div + div {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #cbd5e1;
}

.pgs-summary-rating-row th,
.pgs-summary-rating-row td {
  font-weight: 700;
}

.pgs-summary-rating-row .pgs-summary-sticky {
  background: #f8fafc;
}

.table td.pgs-summary-rating-cell {
  min-width: 240px;
  vertical-align: middle;
  text-align: center;
}

.pgs-summary-rating-excellent {
  background: #86efac !important;
}

.pgs-summary-rating-good {
  background: #bbf7d0 !important;
}

.pgs-summary-rating-weak {
  background: #fecaca !important;
}

.pgs-summary-rating-bad {
  background: #fca5a5 !important;
}

.pgs-teacher-rating-table th,
.pgs-teacher-rating-table td {
  vertical-align: middle;
}

.pgs-teacher-rating-table th, .pgs-teacher-rating-table td.normal {
  font-size: 15px;
}

.pgs-teacher-rating-table td.respondents_count {
  text-align: center;
  font-size: 15px;
}

.pgs-teacher-rating-table td {
  font-size: 13px;
}

.pgs-teacher-rating-table th:nth-child(n+4),
.pgs-teacher-rating-table td:nth-child(n+4) {
  text-align: center;
}

.pgs-rating-question-head {
  cursor: help;
}

.pgs-teacher-rating-table th:first-child,
.pgs-teacher-rating-table td:first-child,
.pgs-teacher-rating-table th:nth-child(3),
.pgs-teacher-rating-table td:nth-child(3),
.pgs-teacher-rating-table th:last-child,
.pgs-teacher-rating-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.pgs-rating-teacher strong,
.pgs-rating-teacher span {
  display: block;
}

.pgs-rating-teacher strong {
  font-weight: 700;
}

.pgs-rating-teacher span {
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
}

.pgs-rating-number {
  min-width: 42px;
  font-weight: 700;
  text-align: center !important;
}

.pgs-rating-number-excellent {
  background: #86efac !important;
}

.pgs-rating-number-good {
  background: #bbf7d0 !important;
}

.pgs-rating-number-weak {
  background: #fecaca !important;
}

.pgs-rating-number-bad {
  background: #fca5a5 !important;
}

.pgs-rating-score {
  font-weight: 700;
  font-size: 18px !important;
  text-align: center !important;
}


@media print {
  .navbar,
  .page-head,
  .modal-footer,
  .breadcrumb,
  .messages {
    display: none !important;
  }

  .shell {
    max-width: none;
    padding: 0;
  }

  .print-key-table {
    font-size: 12px;
  }

  .pgs-key-report-print {
    font-size: 10px;
  }
}

.dt-paging .pagination {
  gap: 6px;
}

.dt-paging .page-link {
  border-radius: 6px;
}

.dt-container .dt-length label {
  display: inline-flex;
  align-items: center;
  padding-right: 8px;
}

/* Результаты анкетирований опросов студентов */
.poll-result-summary {
  margin-bottom: 24px;
}

.poll-summary-card {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 22px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-left: 5px solid #0f766e;
  border-radius: 8px;
}

.poll-summary-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: #0f766e;
}

.poll-summary-label {
  font-size: 14px;
  color: #475569;
}

.poll-block {
  margin-bottom: 32px;
}

.poll-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px;
  padding: 10px 14px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  border-left: 4px solid #0f766e;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}

.poll-block-title:hover {
  background: #e8eef6;
}

.poll-block-arrow {
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.poll-block-title[aria-expanded="true"] .poll-block-arrow {
  transform: rotate(180deg);
}

.poll-univ-col {
  color: #64748b;
}

.poll-question {
  padding: 18px 20px;
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.poll-question-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.poll-question-number {
  flex: none;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: #0f766e;
  border-radius: 50%;
}

.poll-question-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.poll-question-meta {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: #64748b;
}

.poll-dist + .poll-dist {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
}

.poll-dist-label {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.poll-dist-body {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.poll-dist-table {
  flex: 1 1 320px;
  min-width: 280px;
  margin-bottom: 0;
}

.poll-dist-table th.num,
.poll-dist-table td.num {
  width: 80px;
  text-align: right;
  white-space: nowrap;
}

.poll-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 8px;
  border-radius: 2px;
  vertical-align: baseline;
  background: #cbd5e1;
}

.poll-dist-table tbody tr:nth-child(15n + 1) .poll-swatch { background: #0f766e; }
.poll-dist-table tbody tr:nth-child(15n + 2) .poll-swatch { background: #2563eb; }
.poll-dist-table tbody tr:nth-child(15n + 3) .poll-swatch { background: #f59e0b; }
.poll-dist-table tbody tr:nth-child(15n + 4) .poll-swatch { background: #dc2626; }
.poll-dist-table tbody tr:nth-child(15n + 5) .poll-swatch { background: #7c3aed; }
.poll-dist-table tbody tr:nth-child(15n + 6) .poll-swatch { background: #0891b2; }
.poll-dist-table tbody tr:nth-child(15n + 7) .poll-swatch { background: #65a30d; }
.poll-dist-table tbody tr:nth-child(15n + 8) .poll-swatch { background: #db2777; }
.poll-dist-table tbody tr:nth-child(15n + 9) .poll-swatch { background: #ea580c; }
.poll-dist-table tbody tr:nth-child(15n + 10) .poll-swatch { background: #475569; }
.poll-dist-table tbody tr:nth-child(15n + 11) .poll-swatch { background: #16a34a; }
.poll-dist-table tbody tr:nth-child(15n + 12) .poll-swatch { background: #9333ea; }
.poll-dist-table tbody tr:nth-child(15n + 13) .poll-swatch { background: #ca8a04; }
.poll-dist-table tbody tr:nth-child(15n + 14) .poll-swatch { background: #0369a1; }
.poll-dist-table tbody tr:nth-child(15n) .poll-swatch { background: #be123c; }

.poll-dist-chart {
  flex: none;
  width: 190px;
  height: 190px;
}

.poll-free-text {
  margin-top: 12px;
}

.poll-free-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  text-decoration: none;
}

.poll-free-toggle:hover {
  text-decoration: underline;
}

.poll-free-list {
  margin: 10px 0 0;
  padding: 12px 16px 12px 32px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.poll-free-list li + li {
  margin-top: 6px;
}

.poll-free-empty {
  margin: 8px 0 0;
  color: #64748b;
}

.public-home,
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #f8fafc;
}

.public-home {
  align-content: center;
  gap: 28px;
}

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

.public-home__logo {
  width: 120px;
  height: auto;
  display: inline-block;
  margin-bottom: 18px;
  color: #0f172a;
}

.public-home__brand h1 {
  margin: 0 0 8px;
  font-size: 36px;
}

.public-home__brand p {
  margin: 0;
  color: #475569;
}

.public-home__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.public-home__link {
  padding: 12px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
}

.public-home__link:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.public-home__signin {
  color: #64748b;
  font-size: 13px;
}

.auth-card {
  width: min(100%, 380px);
  padding: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgb(15 23 42 / 8%);
}

.auth-card h1 {
  margin: 0 0 20px;
  font-size: 24px;
}

.auth-card input {
  width: 100%;
  display: block;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.auth-back {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 14px;
}

.navbar-user__name {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #334155;
}

.navbar-user__logout {
  color: #64748b;
}

.readonly-questionnaire {
  display: grid;
  gap: 16px;
}

.readonly-questionnaire__item {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.readonly-questionnaire__item h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.public-key-list-page {
  min-height: 100vh;
  background: #f8fafc;
}

.public-key-list {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.public-key-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.public-key-list-head h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.public-key-list-head p {
  margin: 2px 0;
  color: #475569;
}

.public-key-progress {
  position: relative;
  min-width: 180px;
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--progress-soft) var(--progress), #f1f5f9 var(--progress));
  text-align: center;
}

.public-key-progress span,
.public-key-progress strong {
  position: relative;
  display: block;
}

.public-key-progress span {
  color: #64748b;
  font-size: 12px;
}

.public-key-progress strong {
  color: var(--progress-strong);
  font-size: 22px;
  line-height: 1.1;
}

.public-key-table {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.public-key-table th,
.public-key-table td {
  padding-top: 7px;
  padding-bottom: 7px;
  text-align: center;
  vertical-align: middle;
}

.public-key-table .public-key-col-index,
.public-key-table .public-key-col-progress {
  width: 1%;
  white-space: nowrap;
}

.public-key-table .key-code {
  font-family: Consolas, "Liberation Mono", monospace;
  font-weight: 700;
  text-decoration: none;
}

.public-key-table .key-code-completed {
  font-weight: 500;
}

.key-progress-success {
  --progress-soft: #bbf7d0;
  --progress-strong: #166534;
}

.key-progress-warning {
  --progress-soft: #fde68a;
  --progress-strong: #92400e;
}

.key-progress-danger {
  --progress-soft: #fecaca;
  --progress-strong: #991b1b;
}

@media (max-width: 720px) {
  .public-key-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .public-key-progress {
    text-align: left;
  }
}

@media (max-width: 640px) and (orientation: portrait) {
  .public-key-table .public-key-col-mobile-hidden {
    display: none;
  }

  .public-key-table th,
  .public-key-table td {
    padding-right: 6px;
    padding-left: 6px;
  }

  .public-key-table .key-code {
    font-size: 13px;
  }
}

.table-fit th,
.table-fit td {
  width: 1%;
  white-space: nowrap;
}

.table-fit .col-fluid {
  width: auto;
  white-space: normal;
}