* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background: #f4f7fb;
    color: #18212f;
}

a {
    color: inherit;
    text-decoration: none;
}

.layout {
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #182338, #0f1728);
    color: #fff;
    min-height: 72px;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 8px 24px rgba(15, 23, 40, 0.18);
}

.header-title {
    font-size: 20px;
    font-weight: 700;
}

.header-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.header-nav a {
    color: #dbe6ff;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    transition: 0.2s ease;
}

.header-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.header-nav a.active {
    background: #2563eb;
    color: #fff;
}

.main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.page-head {
    margin-bottom: 20px;
}

.page-head h1 {
    margin: 0 0 8px 0;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    min-width: 0;
}

.form-card {
    max-width: 700px;
}

.auth-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-card {
    width: 100%;
    max-width: 460px;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-weight: bold;
}

.form-row input,
.form-row select,
.form-row textarea {
    padding: 12px 14px;
    border: 1px solid #cfd6df;
    border-radius: 10px;
    font-size: 14px;
}

.checkbox-row {
    flex-direction: row;
    align-items: center;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border: none;
    cursor: pointer;
    background: #2563eb;
    color: white;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn-light {
    background: #eef1f5;
    color: #3c4858;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:not(.btn-light):hover {
    background: #1d4ed8;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.btn-light:hover {
    background: #e2e6ec;
}

.btn:disabled,
.btn.btn-light:disabled,
button.btn:disabled,
button.btn.btn-light:disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}



.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.table th,
.table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table th {
    background: #f9fafb;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    min-height: 120px;
    min-width: 0;
}

.stat-title {
    color: #6b7280;
    margin-bottom: 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.stat-value {
    font-size: 34px;
    font-weight: bold;
    line-height: 1.15;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    margin: 0 0 8px;
    font-size: 40px;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

.page-header p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 18px;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.modern-table thead th {
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    background: #f8fbff;
    padding: 16px 14px;
    border-bottom: 1px solid #e8eef7;
}

.modern-table tbody td {
    padding: 18px 14px;
    border-bottom: 1px solid #eef2f7;
    font-size: 15px;
    color: #1e293b;
}

.modern-table tbody tr:hover {
    background: #f8fbff;
}

.panel {
    background: #fff;
    border-radius: 22px;
    padding: 24px 26px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid #e8eef7;
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background: #eef4ff;
    color: #1d4ed8;
}

.btn-secondary:hover {
    background: #dfeaff;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-progress {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-failed {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-allow {
    background: #e8f1ff;
    color: #2f6fed;
}

.admin-dashboard .admin-stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.admin-dashboard .stat-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 22px 22px 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid #e8eef7;
    min-height: auto;
}

.admin-dashboard .stat-card::before {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: #2563eb;
    margin-bottom: 18px;
}

.admin-dashboard .stat-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 14px;
}

.admin-dashboard .stat-value {
    font-size: 42px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.admin-theme .main {
    position: relative;
    z-index: 0;
}

.admin-theme .main::before {
    content: "";
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("/static/images/forest.png") center bottom / 100vw auto no-repeat;
    z-index: -1;
    pointer-events: none;
}

.admin-theme .main > * {
    position: relative;
    z-index: 1;
}

.page-head p,
.card p,
.card h1,
.card h2,
.card h3 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.flash-list {
    margin-bottom: 16px;
}

.flash {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
}

.pfo-editor-card {
    padding: 18px 18px 20px;
}

.pfo-editor-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.pfo-editor-side {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #475467;
    font-size: 15px;
    line-height: 1.35;
    padding: 18px 0 0;
}

.pfo-editor-shell {
    border: 1px solid #bfc7d2;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.pfo-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #f3f4f6;
    border-bottom: 1px solid #cfd6df;
    flex-wrap: wrap;
}

.pfo-editor-tool {
    min-width: 32px;
    height: 28px;
    border: 1px solid #c6ccd7;
    border-radius: 4px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 0 8px;
}

.pfo-editor-tool:hover {
    background: #eef2ff;
    border-color: #9fb2e9;
}

.pfo-editor-tool-accent.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.pfo-editor-textarea {
    width: 100%;
    min-height: 520px;
    border: 0;
    border-radius: 0;
    resize: vertical;
    padding: 14px 16px;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.5;
}

.pfo-editor-textarea:focus {
    outline: none;
}

.pfo-editor-preview {
    width: 100%;
    min-height: 720px;
    border: 0;
    background: #fff;
}

@media (max-width: 900px) {
    .pfo-editor-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pfo-editor-side {
        padding-top: 0;
    }
}

.bt5-info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 18px;
}

.bt5-grid {
    display: grid;
    gap: 10px;
    justify-content: center;
    margin: 0 auto;
}

.bt5-cell {
    width: 70px;
    height: 70px;
    font-size: 24px;
    font-weight: bold;
    border: 1px solid #cfd6df;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: 0.15s ease;
}

.bt5-cell:hover {
    transform: scale(1.03);
}

.bt5-correct {
    background: #ffffff;
    border-color: #cfd6df;
}

.bt5-error {
    background: #fee2e2;
    border-color: #fca5a5;
}
.face-preview-card,
.face-test-card {
    text-align: center;
}

.face-preview-image,
.face-test-image {
    max-width: 420px;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid #d1d5db;
    background: #fff;
}

.raven-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 20px;
}

.raven-calc-wrap {
  margin-top: 20px;
  overflow-x: auto;
}

.raven-calc-table {
  width: 100%;
  border-collapse: collapse;
}

.raven-calc-table td {
  border: 1px solid #d8dee6;
  padding: 10px 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.raven-calc-table .label {
  background: #f3f5f7;
  font-weight: 600;
  white-space: nowrap;
}

.raven-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.raven-chart-card {
  padding: 16px;
}

.raven-chart-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.raven-bars-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 18px;
  height: 280px;
  padding-top: 10px;
}

.raven-bar-item {
  flex: 1;
  max-width: 90px;
  text-align: center;
}

.raven-bar-stage {
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.raven-bar-fill {
  width: 48px;
  min-height: 8px;
  background: #6c757d;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding-top: 6px;
  box-sizing: border-box;
}

.raven-bar-label {
  margin-top: 10px;
  font-weight: 600;
  font-size: 13px;
  color: #444;
}

@media (max-width: 1200px) {
  .raven-stats-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (max-width: 900px) {
  .raven-charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .raven-stats-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}
.attestation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.attestation-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.attestation-card h2 {
  margin-top: 0;
  margin-bottom: 18px;
}

.attestation-card p {
  margin: 0 0 12px 0;
  font-size: 16px;
}

.attestation-card-footer {
  margin-top: 24px;
}

.attestation-card button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .attestation-grid {
    grid-template-columns: 1fr;
  }
}
.attestation-card button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.attestation-card button:hover {
    background: #1e4fd6;
}

.attestation-card button:disabled {
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.attestation-card-footer {
    margin-top: 20px;
}
.attestation-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.time-limit-box {
    margin-top: 15px;
    padding: 10px 14px;
    background: #f3f4f6;
    border-left: 4px solid #2563eb;
    border-radius: 6px;
    font-size: 14px;
}
.timer-box {
    position: sticky;
    top: 10px;
    background: #111827;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 20px;
}

.user-page-head p {
    margin: 0;
    color: #6b7280;
}

.user-summary-card {
    margin-bottom: 24px;
}

.user-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.user-summary-label,
.test-stat-label,
.instruction-meta-label,
.attestation-status-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.user-summary-value,
.test-stat-value,
.instruction-meta-value,
.attestation-status-value {
    font-size: 16px;
    font-weight: 700;
}

.user-test-card {
    overflow: hidden;
}

.btn-wide {
    min-width: 220px;
    text-align: center;
}

.attestation-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
}

.attestation-badge-muted {
    background: #e5e7eb;
    color: #4b5563;
}

.attestation-description {
    color: #4b5563;
    line-height: 1.6;
}

.attestation-status-row {
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.instruction-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
}

.instruction-main h3 {
    margin-top: 0;
}

.instruction-main p {
    line-height: 1.7;
}

.instruction-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.instruction-meta-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

.instruction-meta-time {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.question-progress-row {
    margin-bottom: 20px;
}

.question-progress-text {
    margin-bottom: 10px;
    font-size: 14px;
    color: #4b5563;
}

.question-progress-track {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.question-progress-bar {
    height: 10px;
    background: #2563eb;
    border-radius: 999px;
}

.question-title-box {
    font-size: 20px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.question-options-grid{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.question-options-grid-double {
    grid-template-columns: repeat(2, minmax(180px, 260px));
    justify-content: center;
}

.question-options-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(90px, 110px));
    justify-content: center;
}

.btn-option {
    width: 100%;
    min-height: 0;
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: left;
    justify-content: flex-start;
    align-items: flex-start;
}

.btn-option-compact {
    min-width: 80px;
}

.test-container {
    max-width: 800px;
    margin: 0 auto;
}

.zun-test-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.zun-test-head {
    margin-bottom: 0;
}

.zun-test-head h1 {
    margin-bottom: 8px;
}

.zun-test-head p {
    margin: 0;
    color: #64748b;
    font-size: 17px;
}

.progress-bar {
    height: 8px;
    background: #e9edf5;
    border-radius: 999px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: #3b6eea;
    border-radius: inherit;
}

.zun-progress-bar {
    margin-bottom: 6px;
}

.zun-question-card {
    padding: 28px;
    border-radius: 18px;
}

.zun-question-text {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.55;
    margin-bottom: 24px;
    color: #0f172a;
}

.zun-answer-list {
    gap: 10px;
}

.answer-btn {
    width: 100%;
    min-height: 0;
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #e3e6ee;
    background: #ffffff;
    color: #1f2d3d;
    font-size: 16px;
    margin-bottom: 0;
    white-space: normal;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.answer-btn:hover {
    background: #f5f7ff;
    border-color: #3b6eea;
    box-shadow: 0 8px 20px rgba(59, 110, 234, 0.12);
}

.btn.answer-btn:hover,
.btn.btn-option.answer-btn:hover {
    background: #f5f7ff;
    color: #1f2d3d;
}

.answer-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    background: #3b6eea;
    color: #ffffff;
    border-radius: 6px;
    text-align: center;
    line-height: 28px;
    font-weight: 700;
    font-size: 13px;
    margin-top: 1px;
}

.answer-btn__text {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.test-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.test-stat-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

.question-card-inner {
    margin-bottom: 0;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    box-shadow: none;
}

.timer-box {
    z-index: 5;
}

@media (max-width: 900px) {
    .instruction-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .question-options-grid-double {
        grid-template-columns: 1fr;
    }

    .btn-wide {
        width: 100%;
    }

    .zun-question-card {
        padding: 22px 18px;
    }

    .zun-question-text {
        font-size: 18px;
    }

    .answer-btn {
        padding: 14px 16px;
    }
}




.btn-equal {
    width: 205px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
}

.admin-users-details {
    margin: 0;
    padding: 0;
    border: 0;
}

.admin-users-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    margin: 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f3f4f6;
    outline: none;
}

.admin-users-summary-hint {
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
}

.admin-users-summary-icon {
    display: inline-block;
    transition: transform 0.18s ease;
}

.admin-users-details[open] > .admin-users-summary {
    margin-bottom: 16px;
}

.admin-users-details[open] .admin-users-summary-icon {
    transform: rotate(180deg);
}


.admin-users-summary::-webkit-details-marker {
    display: none;
}

.admin-users-summary::marker {
    content: "";
}


.admin-staff-card {
    padding-top: 20px;
    padding-bottom: 20px;
}


/* Hard reset for top gap above header */
html,
body,
.layout {
    margin: 0 !important;
    padding: 0 !important;
}

.header {
    margin-top: 0 !important;
    border-top: 0 !important;
}





.profile-intro-card {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
}

.profile-intro-card h1 {
    margin: 0 0 10px 0;
}

.profile-intro-card p {
    margin: 0;
    max-width: 760px;
    line-height: 1.7;
    color: #475569;
}

.profile-form-card {
    max-width: 760px;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.profile-form-field {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.profile-form-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.profile-form-field input,
.profile-form-field select {
    width: 100%;
    min-height: 48px;
    background: #fff;
}

.profile-field-note {
    margin: 0 0 12px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.profile-actions {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-actions-note {
    font-size: 13px;
    color: #6b7280;
}

.zun-loaded-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.zun-loaded-question {
    border-top: 1px dashed #c5b69a;
    padding-top: 8px;
}

.zun-loaded-question-title {
    font-size: 14px;
    font-weight: 800;
    color: #2c2c2c;
    text-transform: uppercase;
}

.zun-loaded-question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.question-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 22px;
    padding: 22px 24px;
    box-shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(31, 41, 55, 0.12);
}

.question-card__top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: start;
}

.question-badge {
    min-width: 52px;
    height: 52px;
    padding: 0 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2f6fed, #4f8cff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 8px 20px rgba(47, 111, 237, 0.25);
}

.question-main {
    min-width: 0;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef3ff;
    color: #3559a8;
    font-size: 13px;
    font-weight: 600;
}

.question-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 800;
    color: #1f2937;
}

.question-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.btn-edit:hover {
    background: #e8edf7;
    border-color: #d7dfef;
    color: #1f2937;
}

.question-body {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.question-section-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 12px;
}

.answers-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}

.answer-item--correct {
  background: linear-gradient(180deg, #eefaf1, #f7fcf8);
  border: 1px solid #bfe7ca;
}

.answer-item--wrong {
  background: linear-gradient(180deg, #fff1f2, #fff7f7);
  border: 1px solid #fecaca;
}

.answer-index {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e5e7eb;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.answer-item--correct .answer-index {
  background: #22c55e;
  color: #fff;
}

.answer-item--wrong .answer-index {
  background: #ef4444;
  color: #fff;
}

.answer-text {
    color: #374151;
    line-height: 1.5;
    font-size: 15px;
}

.answer-status {
    align-self: center;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
}

.zun-loaded-editor {
    position: relative;
    margin-bottom: 10px;
    padding: 8px 52px 8px 10px;
    border: 1px dotted #c8c8c8;
    background: #fff;
}

.zun-loaded-option-editor {
    margin-bottom: 0;
}

.zun-loaded-editor-hint {
    display: inline-block;
    margin-bottom: 4px;
    padding: 1px 4px;
    font-size: 10px;
    line-height: 1.2;
    color: #5a4a2d;
    background: #d8c095;
    text-transform: lowercase;
}

.zun-loaded-editor-value {
    font-size: 14px;
    line-height: 1.4;
    color: #2c2c2c;
    white-space: pre-wrap;
}

.zun-loaded-option-row {
    display: grid;
    grid-template-columns: 26px 64px minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
}

.zun-loaded-option-index {
    padding-top: 10px;
    font-size: 20px;
    line-height: 1;
    color: #6b5e4f;
}

.zun-loaded-option-score {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    background: #fff;
    font-size: 24px;
    line-height: 1;
    color: #6c7a89;
    text-align: center;
}

.zun-loaded-chevron {
    min-height: 34px;
    margin-top: 1px;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    background: #fff;
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
    cursor: default;
}

.btn-prominent {
    min-width: 220px;
    min-height: 48px;
    font-size: 15px;
    font-weight: 700;
}

@media (max-width: 700px) {
    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        align-items: stretch;
    }

    .btn-prominent {
        width: 100%;
    }
}
.profile-date-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.profile-date-icon {
    flex: 0 0 auto;
    min-width: 62px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #e0ecff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.profile-date-input {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 44px !important;
    font-size: 16px !important;
    font-weight: 600;
    color: #0f172a;
}

.profile-date-input:focus {
    outline: none;
}

.profile-date-tip {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
}

@media (max-width: 700px) {
    .profile-date-box {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-date-icon {
        width: 100%;
    }
}
.profile-gender-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.profile-gender-icon {
    flex: 0 0 auto;
    min-width: 62px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #e0ecff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.profile-gender-select {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 44px !important;
    font-size: 16px !important;
    font-weight: 600;
    color: #0f172a;
    background: #fff;
}

.profile-gender-select:focus {
    outline: none;
}

.profile-gender-tip {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
}

@media (max-width: 700px) {
    .profile-gender-box {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-gender-icon {
        width: 100%;
    }
}

.face-timer-box {
    background: transparent;
    color: #4b5563;
    padding: 0;
    border-radius: 0;
    font-weight: 500;
    width: auto;
    margin-bottom: 14px;
    box-shadow: none;
}
.face-answer-grid {
    grid-template-columns: repeat(2, 150px);
    justify-content: center;
    gap: 10px;
}

.face-answer-btn {
    width: 150px;
    min-width: 150px;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 14px;
    text-align: center;
    justify-content: center;
    align-items: center;
}

@media (max-width: 640px) {
    .face-answer-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .face-answer-btn {
        width: 100%;
        min-width: 0;
    }
}
.face-answer-grid {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center;
    gap: 10px;
}

@media (max-width: 640px) {
    .face-answer-grid {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
    }
}

.face-answer-grid {
    margin-top: 18px;
}


.instruction-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.instruction-side-top {
    align-self: flex-end;
    width: min(320px, 100%);
}

.instruction-main-wide {
    width: 100%;
}

.instruction-main-wide p {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .instruction-side-top {
        align-self: stretch;
        width: 100%;
    }
}

.browin-question-title {
    max-width: 760px;
    margin: 0 auto 24px auto;
    text-align: center;
}

.raven-question-title {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 18px;
}
.raven-options-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.raven-option-btn {
    width: 52px;
    min-width: 52px;
    min-height: 42px;
    padding: 8px 10px;
    text-align: center;
    justify-content: center;
    align-items: center;
}

@media (max-width: 640px) {
    .raven-options-row {
        overflow-x: auto;
        justify-content: flex-start !important;
        padding-bottom: 4px;
    }
}
.instruction-text {
    white-space: pre-line;
}

.analogies-question-title {
    max-width: 820px;
    margin: 0 auto 24px auto;
    text-align: center;
}

.analogies-answer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.analogies-answer-btn {
    min-width: 110px;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 14px;
}

.analogies-answer-btn {
    width: auto !important;
    min-width: 110px;
    flex: 0 0 auto;
}

.analogies-answer-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px;
    margin-top: 18px;
}

.analogies-answer-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: fit-content !important;
    min-width: 320px;
    max-width: 720px;
    flex: 0 0 auto !important;
    white-space: normal;
    text-align: center;
}

@media (max-width: 640px) {
    .analogies-answer-btn {
        min-width: 0;
        width: 100% !important;
    }
}

.usc-question-title {
    max-width: 820px;
    margin: 0 auto 24px auto;
    text-align: center;
}

.usc-answer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.usc-answer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 90px;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 13px;
    flex: 0 0 auto;
}

.usc-answer-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px;
    margin-top: 18px;
}

.usc-answer-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: fit-content !important;
    min-width: 320px;
    max-width: 720px;
    flex: 0 0 auto !important;
    white-space: normal;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .usc-answer-btn {
        min-width: 0;
        width: 100% !important;
    }
}

.supervisor-page-head {
    margin-bottom: 18px;
}

.supervisor-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.supervisor-head-row p {
    margin: 0;
}

.supervisor-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.supervisor-frame {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid #d8dee8;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.supervisor-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.supervisor-tab-btn {
    border: none;
    border-radius: 8px;
    background: #eef1f6;
    color: #3c4858;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.supervisor-tab-btn.active {
    background: #2f6fed;
    color: #fff;
}

.supervisor-select-page {
    max-width: 980px;
    margin: 0 auto;
}

.supervisor-select-head {
    position: relative;
    overflow: hidden;
    padding: 30px 32px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.supervisor-select-head::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.03) 48%, transparent 72%);
    pointer-events: none;
}

.supervisor-select-head__content {
    position: relative;
    z-index: 1;
}

.supervisor-select-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.supervisor-select-head h1 {
    margin: 0 0 14px;
    font-size: 38px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: #0f172a;
}

.supervisor-select-head p {
    margin: 0;
    max-width: 680px;
    color: #475569;
    font-size: 16px;
    line-height: 1.6;
}

.supervisor-select-card {
    padding: 28px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.supervisor-select-card__intro {
    margin-bottom: 22px;
}

.supervisor-select-card__intro h2 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.15;
    font-weight: 800;
    color: #0f172a;
}

.supervisor-select-card__intro p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.supervisor-select-error {
    margin-bottom: 20px;
}

.supervisor-select-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.supervisor-select-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-height: 168px;
    padding: 22px 20px;
    border: 1px solid #dbe5f1;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.supervisor-select-option:hover {
    transform: translateY(-2px);
    border-color: #bfd2f7;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.12);
}

.supervisor-select-option.active {
    border-color: #2563eb;
    background: linear-gradient(180deg, #f2f7ff 0%, #eaf1ff 100%);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.16);
}

.supervisor-select-option__title {
    font-size: 22px;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

.supervisor-select-option__text {
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.supervisor-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border: 1px solid #edf0f5;
}

.supervisor-card:last-child {
    margin-bottom: 0;
}

.supervisor-card-soft {
    border: 1px solid #d8dee8;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.supervisor-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.supervisor-card-head .section-title {
    margin-bottom: 0;
}

.section-subtitle {
    font-size: 12px;
    color: #607089;
    margin-top: 4px;
}

.supervisor-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.supervisor-table th {
    text-align: left;
    font-size: 13px;
    color: #7a869a;
    padding: 12px;
    border-bottom: 1px solid #edf0f5;
    background: transparent;
}

.supervisor-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f2f4f8;
    font-size: 14px;
    vertical-align: middle;
}

.supervisor-table tr:hover {
    background: #f8fafc;
}

.supervisor-table tbody tr:last-child td {
    border-bottom: none;
}

.supervisor-table-cards {
    border-collapse: separate;
    border-spacing: 0 10px;
}

.supervisor-table-cards thead th {
    border-bottom: 1px solid #edf0f5;
    padding-bottom: 14px;
}

.supervisor-table-cards tbody td {
    background: #f8fafc;
    border-top: 1px solid #edf0f5;
    border-bottom: 1px solid #edf0f5;
}

.supervisor-table-cards tbody td:first-child {
    border-left: 1px solid #edf0f5;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.supervisor-table-cards tbody td:last-child {
    border-right: 1px solid #edf0f5;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-success {
    background: #e8f8f0;
    color: #1a9b5d;
}

.status-process {
    background: #fff4e5;
    color: #d48a00;
}

.status-allow {
    background: #e8f1ff;
    color: #2f6fed;
}

.status-danger {
    background: #fdecec;
    color: #cf3f3f;
}

.status-blocked {
    background: #eef1f5;
    color: #6b7280;
}

.status-neutral {
    background: #f3f4f6;
    color: #677489;
}

.supervisor-actions {
    width: 1%;
    white-space: nowrap;
}

.supervisor-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
}

.supervisor-shell .btn,
.supervisor-shell .btn-light,
.supervisor-shell .btn-primary,
.supervisor-shell .btn-disabled {
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.supervisor-shell .btn-primary,
.supervisor-shell a.btn-primary,
.supervisor-shell button.btn-primary,
.supervisor-shell .btn:not(.btn-light):not(.btn-disabled) {
    background: #2f6fed;
    color: #fff;
}

.supervisor-shell .btn-primary:hover,
.supervisor-shell a.btn-primary:hover,
.supervisor-shell button.btn-primary:hover,
.supervisor-shell .btn:not(.btn-light):not(.btn-disabled):hover {
    background: #1f5dd1;
}

.supervisor-shell .btn-light,
.supervisor-shell a.btn-light,
.supervisor-shell button.btn-light {
    background: #eef1f5;
    color: #3c4858;
}

.supervisor-shell .btn-light:hover,
.supervisor-shell a.btn-light:hover,
.supervisor-shell button.btn-light:hover {
    background: #e2e6ec;
}

.supervisor-shell .btn-disabled,
.supervisor-shell .btn:disabled,
.supervisor-shell .btn-light:disabled,
.supervisor-shell .btn-primary:disabled {
    background: #e5e7eb;
    color: #9aa4b2;
    cursor: not-allowed;
    opacity: 1;
}

.supervisor-dashboard-page {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-soft: #f9fafb;
    --border: #e5e7eb;
    --border-strong: #d8dee8;
    --text: #1f2937;
    --text-soft: #6b7280;
    --text-faint: #94a3b8;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --success-bg: #eaf7ee;
    --success-text: #1f7a4c;
    --danger-bg: #fef2f2;
    --danger-text: #b91c1c;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    padding-top: 34px;
    padding-bottom: 40px;
    color: var(--text);
    background: #f6f8fb;
}

.supervisor-dashboard-page .page-container {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.supervisor-dashboard-page .page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.supervisor-dashboard-page .page-head-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.supervisor-dashboard-page h1 {
    font-size: 42px;
    line-height: 1.12;
    margin: 0 0 10px;
    color: #14213d;
    letter-spacing: -0.03em;
}

.supervisor-dashboard-page .page-subtitle {
    color: var(--text-soft);
}

.supervisor-dashboard-page .supervisor-frame {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 22px;
}

.supervisor-dashboard-page .supervisor-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 4px;
    background: #f1f3f7;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 18px;
}

.supervisor-dashboard-page .supervisor-tab-btn {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: #475569;
    font-weight: 600;
    border: none;
    background: transparent;
    transition: 0.18s ease;
}

.supervisor-dashboard-page .supervisor-tab-btn:hover {
    background: rgba(255,255,255,0.75);
    color: var(--text);
}

.supervisor-dashboard-page .supervisor-tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.supervisor-dashboard-page .supervisor-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 18px;
}

.supervisor-dashboard-page .supervisor-card:last-child {
    margin-bottom: 0;
}

.supervisor-dashboard-page .supervisor-card-soft {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
}

.supervisor-dashboard-page .supervisor-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.supervisor-dashboard-page .section-title {
    font-size: 28px;
    margin: 0 0 8px;
    color: #1e293b;
    font-weight: 700;
}

.supervisor-dashboard-page #fp-tab .section-title,
.supervisor-dashboard-page #zun-tab .section-title,
.supervisor-dashboard-page #pfo-tab .section-title {
    font-size: 28px;
}

.supervisor-dashboard-page .section-subtitle {
    color: var(--text-soft);
    font-size: 14px;
    margin-top: 0;
}

.supervisor-dashboard-page .table-wrap {
    width: 100%;
    overflow-x: auto;
}

.supervisor-dashboard-page .supervisor-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.supervisor-dashboard-page .supervisor-table thead th {
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    background: #f9fafb;
    padding: 14px 14px;
    border-bottom: 1px solid var(--border);
}

.supervisor-dashboard-page .supervisor-table thead th:first-child {
    border-top-left-radius: 12px;
}

.supervisor-dashboard-page .supervisor-table thead th:last-child {
    border-top-right-radius: 12px;
}

.supervisor-dashboard-page .supervisor-table tbody td {
    padding: 14px 14px;
    border-bottom: 1px solid #f1f3f7;
    color: var(--text);
    vertical-align: middle;
    background: #fff;
}

.supervisor-dashboard-page .supervisor-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.supervisor-dashboard-page .supervisor-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.supervisor-dashboard-page .supervisor-table tbody tr:hover td {
    background: #fafbfd;
}

.supervisor-dashboard-page .status,
.supervisor-dashboard-page .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.supervisor-dashboard-page .status-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.supervisor-dashboard-page .status-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.supervisor-dashboard-page .status-allow {
    background: var(--primary-soft);
    color: var(--primary);
}

.supervisor-dashboard-page .status-process,
.supervisor-dashboard-page .status-neutral,
.supervisor-dashboard-page .status-blocked {
    background: #f1f5f9;
    color: #64748b;
}

.supervisor-dashboard-page .supervisor-actions-row,
.supervisor-dashboard-page .table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.supervisor-dashboard-page .btn,
.supervisor-dashboard-page a.btn,
.supervisor-dashboard-page button {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none;
}

.supervisor-dashboard-page .btn:hover,
.supervisor-dashboard-page a.btn:hover,
.supervisor-dashboard-page button:hover {
    transform: translateY(-1px);
}

.supervisor-dashboard-page .btn-primary,
.supervisor-dashboard-page button.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.supervisor-dashboard-page .btn-primary:hover,
.supervisor-dashboard-page button.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.supervisor-dashboard-page .btn-light,
.supervisor-dashboard-page .btn-secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
}

.supervisor-dashboard-page .btn-light:hover,
.supervisor-dashboard-page .btn-secondary:hover {
    background: var(--surface-soft);
}

.supervisor-dashboard-page .btn-disabled,
.supervisor-dashboard-page .btn:disabled,
.supervisor-dashboard-page .btn-primary:disabled,
.supervisor-dashboard-page .btn-light:disabled {
    background: #f3f4f6;
    color: #475569;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

@media (max-width: 900px) {
    .supervisor-head-row {
        align-items: flex-start;
    }

    .supervisor-dashboard-page .page-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .supervisor-dashboard-page h1 {
        font-size: 32px;
    }

    .supervisor-dashboard-page .page-head {
        flex-direction: column;
        align-items: stretch;
    }

    .supervisor-dashboard-page .supervisor-actions-row {
        justify-content: flex-start;
    }

    .supervisor-select-head {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .supervisor-select-head h1 {
        font-size: 30px;
    }

    .supervisor-select-card {
        padding: 20px;
        border-radius: 20px;
    }

    .supervisor-select-grid {
        grid-template-columns: 1fr;
    }

    .supervisor-select-option {
        min-height: auto;
    }

    .supervisor-frame {
        padding: 14px;
    }

    .supervisor-card {
        padding: 18px;
    }

    .supervisor-actions-row {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .question-card__top {
        grid-template-columns: 1fr;
    }

    .question-actions {
        justify-content: flex-start;
    }

    .question-title {
        font-size: 19px;
    }

    .answer-item {
        grid-template-columns: 32px 1fr;
    }

    .answer-status {
        grid-column: 2;
        justify-self: start;
        margin-top: 6px;
    }
}

.psychologist-detail-page {
    --bg: #f4f7fb;
    --bg-soft: #f8fbff;
    --card: #ffffff;
    --line: #e2e8f0;
    --line-soft: #edf2f7;
    --text: #0f172a;
    --muted: #64748b;
    --blue: #2563eb;
    --blue-soft: #eaf1ff;
    --green: #15803d;
    --green-soft: #eaf8ef;
    --red: #b42318;
    --red-soft: #fdecec;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.05);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.psychologist-detail-page.page,
.main.page .psychologist-detail-page {
    background: radial-gradient(circle at top left, #fafdff 0%, #f4f7fb 45%, #eef3f9 100%);
}

.psychologist-detail-page .page-head {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 28px 30px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: var(--shadow);
}

.psychologist-detail-page .page-head::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.03) 45%, transparent 70%);
    pointer-events: none;
}

.psychologist-detail-page .page-head h1 {
    margin: 0 0 16px;
    font-size: 36px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.psychologist-detail-page .page-head p {
    margin: 8px 0 0;
    color: #334155;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.psychologist-detail-page .page-head p strong {
    color: var(--muted);
    font-weight: 700;
    margin-right: 8px;
}

.psychologist-detail-page .card {
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    margin-bottom: 18px;
}

.psychologist-detail-page .card h2 {
    margin: 0 0 18px;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: var(--text);
}

.psychologist-detail-page .card h3 {
    margin: 0 0 14px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 750;
    color: var(--text);
}

.psychologist-detail-page .card .card {
    margin-bottom: 0;
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: none;
    border: 1px solid var(--line-soft);
}

.psychologist-detail-page .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: #fff;
}

.psychologist-detail-page .table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.psychologist-detail-page .table tbody td {
    padding: 15px 16px;
    font-size: 14px;
    line-height: 1.45;
    color: #1e293b;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}

.psychologist-detail-page .table tbody tr:last-child td {
    border-bottom: none;
}

.psychologist-detail-page .table tbody tr:hover td {
    background: #f8fbff;
}

.psychologist-detail-page .table tbody td:first-child {
    font-weight: 600;
    color: #0f172a;
}

.psychologist-detail-page .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.psychologist-detail-page .stat-card {
    padding: 18px 18px 16px !important;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #e7eef8 !important;
    box-shadow: none !important;
    position: relative;
    overflow: hidden;
}

.psychologist-detail-page .stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #3772ff 0%, #2563eb 100%);
    opacity: 0.9;
}

.psychologist-detail-page .stat-title {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    margin-bottom: 10px;
    font-weight: 700;
}

.psychologist-detail-page .stat-value {
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.psychologist-detail-page details {
    margin-top: 20px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: #fbfdff;
    overflow: hidden;
}

.psychologist-detail-page details[open] {
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.psychologist-detail-page details summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 700;
    color: #1e293b;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
    border-bottom: 1px solid transparent;
    transition: background .2s ease;
}

.psychologist-detail-page details[open] summary {
    border-bottom-color: var(--line-soft);
}

.psychologist-detail-page details summary:hover {
    background: #eef5ff;
}

.psychologist-detail-page details summary::-webkit-details-marker {
    display: none;
}

.psychologist-detail-page details summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 10px;
    color: var(--blue);
    transition: transform .18s ease;
}

.psychologist-detail-page details[open] summary::before {
    transform: rotate(90deg);
}

.psychologist-detail-page details > .card,
.psychologist-detail-page details > div {
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.psychologist-detail-page .progress-shell {
    margin: 20px 0 12px;
}

.psychologist-detail-page .progress-track {
    height: 18px;
    border-radius: 999px;
    background: #e9eef5;
    overflow: hidden;
    position: relative;
}

.psychologist-detail-page .progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #94a3b8 0%, #64748b 100%);
}

.psychologist-detail-page .progress-threshold {
    position: absolute;
    top: -6px;
    width: 2px;
    height: 30px;
    background: #b42318;
}

.psychologist-detail-page .progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.psychologist-detail-page .psych-table-scroll,
.psychologist-detail-page .psych-table-gap {
    margin-top: 16px;
}

.psychologist-detail-page .scale-chart {
    display: grid;
    grid-template-columns: repeat(13, minmax(0, 1fr));
    align-items: flex-end;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    height: 280px;
    padding: 24px 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: linear-gradient(to top, #ffffff 0%, #fcfdff 100%);
    overflow: hidden;
    position: relative;
}

.psychologist-detail-page .scale-chart::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 46px;
    border-bottom: 1px solid var(--line);
    pointer-events: none;
}

.psychologist-detail-page .scale-col {
    min-width: 0;
    text-align: center;
    width: 100%;
}

.psychologist-detail-page .scale-col-bar-wrap {
    height: 210px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.psychologist-detail-page .scale-col-bar {
    width: min(100%, 38px);
    min-height: 10px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, #4f7cff 0%, #2563eb 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 800;
    padding-top: 6px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
}

.psychologist-detail-page .scale-col-name {
    margin-top: 10px;
    font-weight: 700;
    color: var(--text);
    font-size: 12px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.psychologist-detail-page .scale-col-percent {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.psychologist-detail-page .psych-text-block {
    color: #334155;
    line-height: 1.7;
    margin-top: 16px;
}

.psychologist-detail-page .psych-text-block p {
    margin: 10px 0 0;
}

.psychologist-detail-page .psych-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.psychologist-detail-page .psych-card-note {
    font-size: 12px;
    color: #64748b;
    text-align: right;
    white-space: nowrap;
}

.psychologist-detail-page .psych-section-card {
    margin-top: 20px;
}

.psychologist-detail-page .psych-detail-inner-card {
    margin-top: 12px !important;
}

.psychologist-detail-page .psych-score-col {
    width: 140px;
    white-space: nowrap;
}

.psychologist-detail-page .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.psychologist-detail-page .status-badge.success {
    background: var(--green-soft);
    color: var(--green);
}

.psychologist-detail-page .status-badge.error {
    background: var(--red-soft);
    color: var(--red);
}

.psychologist-detail-page .status-badge.info {
    background: var(--blue-soft);
    color: var(--blue);
}

.psychologist-detail-page .psych-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.psychologist-detail-page .psych-detail-head-main {
    min-width: 0;
}

.psychologist-detail-page .psych-detail-head-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .psychologist-detail-page .page-head {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .psychologist-detail-page .page-head h1 {
        font-size: 28px;
    }

    .psychologist-detail-page .card {
        padding: 18px;
        border-radius: 18px;
    }

    .psychologist-detail-page .card h2 {
        font-size: 21px;
    }

    .psychologist-detail-page .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .psychologist-detail-page .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .psychologist-detail-page .psych-card-head {
        flex-direction: column;
    }

    .psychologist-detail-page .psych-card-note {
        text-align: left;
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .supervisor-dashboard-page h1 {
        font-size: 28px;
    }

    .supervisor-dashboard-page .supervisor-frame,
    .supervisor-dashboard-page .supervisor-card {
        padding: 16px;
    }

    .supervisor-dashboard-page .supervisor-tabs {
        display: flex;
        width: 100%;
    }

    .supervisor-dashboard-page .supervisor-tab-btn {
        flex: 1 1 0;
        text-align: center;
    }

    .supervisor-dashboard-page .supervisor-actions-row > *,
    .supervisor-dashboard-page .table-actions > * {
        width: 100%;
    }

    .psychologist-detail-page .stats-grid {
        grid-template-columns: 1fr;
    }

    .psychologist-detail-page .stat-value {
        font-size: 24px;
    }
}



/* --- Full-width режим основной области --- */
.main.main-fullwidth {
    max-width: none;
    width: 100%;
    padding-left: 32px;
    padding-right: 32px;
}

.main.main-fullwidth .page-container,
.main.main-fullwidth .supervisor-dashboard-page .page-container {
    max-width: none;
}

/* --- PFO-вопросы: адаптивная высота карточки и текста вопросов --- */
.pfo-question-card {
    display: flex;
    flex-direction: column;
    min-height: 280px;
    overflow: visible;
}

.pfo-question-body {
    flex: 1 1 auto;
    min-height: 90px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: visible;
    padding: 10px 4px;
    font-size: 19px;
    line-height: 1.55;
    word-break: normal;
    overflow-wrap: break-word;
}

.pfo-question-form {
    margin-top: auto;
    flex: 0 0 auto;
}

.pfo-question-options {
    margin-top: 18px;
}

@media (max-width: 640px) {
    .pfo-question-card {
        min-height: auto;
        padding: 16px 12px;
    }
    .pfo-question-body {
        flex: 1 1 auto;
        min-height: 70px;
        height: auto;
        font-size: 16px;
        line-height: 1.45;
        margin-bottom: 14px;
        padding: 6px 2px;
    }
    .browin-question-title,
    .usc-question-title {
        max-width: 100%;
        margin-bottom: 14px;
    }
}
