* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    color: #1f2937;
    background: #f3f7fb;
}

.page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.site-record-footer {
    padding: 12px 16px 18px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.site-record-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
}

.site-record-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    text-decoration: none;
}

.site-record-link:hover {
    color: #0f766e;
}

.site-record-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.site-record-divider {
    color: #94a3b8;
}

.practice-card {
    width: 100%;
    max-width: 760px;
    padding: 24px 32px;
    background: #ffffff;
    border: 1px solid #d9e7eb;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
}

.teacher-card {
    max-width: 1180px;
}

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

.question-bank-page {
    padding-right: 24px;
    padding-left: 24px;
}

.question-bank-card {
    max-width: min(1600px, calc(100vw - 48px));
}

.header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5eef1;
    padding-bottom: 16px;
}

.brand-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    max-width: 520px;
    margin-top: 0;
    margin-left: auto;
}

.header-menu {
    position: relative;
}

.header-menu summary {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    list-style: none;
    cursor: pointer;
}

.header-menu summary::-webkit-details-marker {
    display: none;
}

.header-menu summary::after {
    content: "∨";
    color: #64748b;
    font-size: 12px;
}

.header-menu[open] summary {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.header-menu-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 128px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.header-menu-item {
    display: block;
    padding: 8px 10px;
    color: #0f172a;
    border-radius: 5px;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.header-menu-item:hover {
    color: #0f766e;
    background: #e8f5f3;
}

.text-link {
    color: #0f766e;
    font-weight: bold;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.current-link {
    color: #0f172a;
    cursor: default;
}

.current-link:hover {
    text-decoration: none;
}

.user-badge {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 0 10px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.login-card {
    max-width: 420px;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    display: grid;
    gap: 8px;
    font-weight: bold;
}

.login-form input {
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
}

.login-form input:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.login-form button {
    height: 42px;
    color: #ffffff;
    background: #0f766e;
    border: 0;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.auth-message {
    margin-bottom: 16px;
    padding: 12px 14px;
    color: #991b1b;
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    border-radius: 6px;
}

.success-message {
    color: #166534;
    background: #f0fdf4;
    border-left-color: #16a34a;
}

.demo-data-notice {
    margin: 16px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.demo-accounts {
    display: grid;
    gap: 6px;
    margin-top: 20px;
    padding: 14px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
    font-size: 14px;
}

.demo-accounts p {
    margin: 0 0 4px;
    color: #0f766e;
    font-weight: bold;
}

.label {
    margin: 0 0 5px;
    color: #0f766e;
    font-size: 14px;
    font-weight: bold;
}

h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.28;
}

.student-box {
    margin-bottom: 24px;
}

.student-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.student-box input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
}

.student-box input:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.filter-box {
    margin-bottom: 24px;
}

.filter-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.filter-box select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 16px;
}

.filter-box select:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.mode-box {
    margin-bottom: 24px;
}

.practice-controls {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr) minmax(220px, 1fr);
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.compact-control {
    margin-bottom: 0;
}

.compact-control label,
.compact-control .mode-label {
    margin-bottom: 6px;
    color: #475569;
    font-size: 13px;
}

.mode-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mode-option {
    position: relative;
    display: block;
}

.mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-option span {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: #475569;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
}

.mode-option input:checked + span {
    color: #ffffff;
    background: #0f766e;
    border-color: #0f766e;
}

.mode-option input:focus + span {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.status-box {
    display: grid;
    grid-template-columns: minmax(150px, 1.25fr) minmax(104px, 0.9fr) minmax(96px, 0.85fr) minmax(96px, 0.85fr) minmax(112px, 0.95fr);
    gap: 8px;
    margin-bottom: 12px;
}

.teacher-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.student-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(180px, 1.35fr);
}

.teacher-filters {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(170px, 0.9fr) minmax(170px, 0.9fr) minmax(200px, 1.1fr) auto auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 24px;
}

.student-dashboard-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 24px;
}

.student-record-filter {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 150px 170px max-content;
    align-items: end;
    gap: 10px;
    margin-bottom: 18px;
}

.student-record-filter.wrong-record-filter {
    grid-template-columns: minmax(340px, 1fr) 140px 160px 145px 66px;
}

.student-record-filter-title,
.student-record-filter-compact,
.student-record-filter-snapshot {
    min-width: 0;
}

.student-record-filter-snapshot input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.student-record-filter-submit {
    width: 66px;
    min-width: 66px;
    padding: 0 12px;
}

.teacher-filters label,
.student-dashboard-filters label,
.student-record-filter label {
    display: grid;
    gap: 8px;
    font-weight: bold;
}

.teacher-filters input,
.teacher-filters select,
.student-dashboard-filters input,
.student-record-filter input,
.student-record-filter select {
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 15px;
}

.teacher-filters input:focus,
.teacher-filters select:focus,
.student-dashboard-filters input:focus,
.student-record-filter input:focus,
.student-record-filter select:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.teacher-filters button,
.student-dashboard-filters button,
.student-record-filter button,
.secondary-button {
    height: 42px;
    padding: 0 18px;
    color: #ffffff;
    background: #0f766e;
    border: 0;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

.teacher-filters .secondary-button,
.secondary-button {
    color: #0f766e;
    background: #e8f5f3;
    border: 1px solid #b8d9d4;
}

.secondary-button:hover {
    background: #d9eeeb;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.checkbox-group label {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-weight: 500;
}

.question-help-panel {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.retry-progress-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    margin-bottom: 16px;
    padding: 14px 16px;
    color: #334155;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 8px;
}

.retry-progress-panel strong {
    color: #0f766e;
}

.retry-complete-panel {
    padding: 24px;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.retry-complete-panel .form-actions {
    justify-content: center;
    margin-top: 18px;
}

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

.question-ask-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
}

.question-ask-box textarea {
    min-height: 74px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    resize: vertical;
    font-size: 14px;
}

.question-ask-box button {
    height: 42px;
    padding: 0 16px;
    color: #ffffff;
    background: #0f766e;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.ai-followup-answer {
    color: #334155;
    line-height: 1.7;
}

.table-action-button {
    display: inline-flex;
    min-width: 64px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: #0f766e;
    background: #e8f5f3;
    border: 1px solid #b8d9d4;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.link-button {
    text-decoration: none;
}

.table-action-button:hover {
    background: #d9eeeb;
}

.table-action-button.active,
.primary-action {
    color: #ffffff;
    background: #0f766e;
    border-color: #0f766e;
}

.danger-action {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.danger-action:hover {
    background: #fee2e2;
}

.disabled-link {
    color: #94a3b8;
    pointer-events: none;
    background: #f1f5f9;
    border-color: #dbe5ea;
}

.table-action-button:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #dbe5ea;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
    gap: 22px;
    align-items: start;
}

.admin-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5eef1;
}

.table-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.action-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.section-heading-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-heading-row h2 {
    margin: 0;
}

.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
}

.modal-panel {
    width: min(820px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}

.ai-provider-modal .question-form {
    max-width: none;
}

.feedback-modal-backdrop {
    z-index: 50;
}

.feedback-modal-panel {
    width: min(460px, 100%);
}

.feedback-modal-panel h2 {
    margin: 0 0 12px;
}

.feedback-modal-panel p {
    margin: 0 0 18px;
    line-height: 1.7;
}

.feedback-success-text {
    color: #166534;
}

.feedback-error-text {
    color: #b91c1c;
}

.student-management-layout {
    display: grid;
    gap: 26px;
}

.student-section {
    display: grid;
    gap: 14px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5eef1;
}

.section-heading h2 {
    margin: 0;
}

.section-heading .label {
    margin-bottom: 4px;
}

.student-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 18px;
}

.student-action-panel {
    padding: 18px;
    border: 1px solid #e5eef1;
    border-radius: 8px;
    background: #ffffff;
}

.student-action-panel h3 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 17px;
}

.student-filter-form {
    display: grid;
    grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1.2fr) minmax(140px, 0.7fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid #e5eef1;
    border-radius: 8px;
    background: #f8fafc;
}

.student-filter-form label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-weight: bold;
}

.student-filter-form input,
.student-filter-form select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
}

.student-filter-form input:focus,
.student-filter-form select:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.filter-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.filter-actions button {
    height: 38px;
    padding: 0 16px;
    color: #ffffff;
    background: #0f766e;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.filter-actions button:hover {
    background: #0b5f59;
}

.compact-panel {
    max-width: 560px;
}

.admin-form {
    display: grid;
    gap: 14px;
}

.admin-form label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-weight: bold;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 15px;
}

.admin-form textarea {
    min-height: 96px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.5;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.admin-form button {
    height: 42px;
    color: #ffffff;
    background: #0f766e;
    border: 0;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

.question-form {
    max-width: 760px;
}

.import-form {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5eef1;
}

.template-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.result-actions {
    margin-top: 10px;
}

.result-note {
    margin: 8px 0 0;
    color: #0f766e;
    font-size: 14px;
}

.loading-message {
    padding: 10px 12px;
    color: #0f766e;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.batch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 14px;
}

.batch-actions select {
    min-width: 180px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #cdd9df;
    border-radius: 6px;
    background: #ffffff;
}

.batch-actions button {
    height: 38px;
    padding: 0 14px;
    color: #ffffff;
    background: #0f766e;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.question-bank-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5eef1;
}

.question-bank-tab {
    min-height: 38px;
    padding: 0 14px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.question-bank-tab.active {
    color: #ffffff;
    background: #0f766e;
    border-color: #0f766e;
}

.question-bank-panel {
    display: none;
}

.question-bank-panel.active {
    display: block;
}

.question-bank-filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 1.25fr) repeat(6, minmax(110px, 1fr)) auto auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.question-bank-filter-form label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-weight: bold;
}

.question-bank-filter-form input,
.question-bank-filter-form select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
}

.question-bank-filter-form input:focus,
.question-bank-filter-form select:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.question-bank-filter-form button {
    height: 38px;
    padding: 0 14px;
    color: #ffffff;
    background: #0f766e;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.question-bank-batch-actions {
    justify-content: flex-end;
}

.knowledge-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.knowledge-filter-form,
.knowledge-create-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.knowledge-filter-form {
    flex: 1 1 420px;
}

.knowledge-create-form {
    flex: 1 1 420px;
    justify-content: flex-end;
}

.knowledge-toolbar label {
    display: grid;
    flex: 1 1 220px;
    gap: 7px;
    color: #334155;
    font-weight: bold;
}

.knowledge-toolbar input,
.knowledge-toolbar select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
}

.knowledge-toolbar button {
    height: 38px;
    padding: 0 14px;
    color: #ffffff;
    background: #0f766e;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.select-column {
    width: 64px;
    text-align: center;
}

.select-column input {
    width: 16px;
    height: 16px;
}

.question-bank-table {
    min-width: 1360px;
    table-layout: fixed;
}

.question-bank-table th:nth-child(2),
.question-bank-table td:nth-child(2) {
    width: 58px;
}

.question-bank-table th:nth-child(3),
.question-bank-table td:nth-child(3) {
    width: auto;
}

.question-bank-table th:nth-child(4),
.question-bank-table td:nth-child(4) {
    width: 96px;
    word-break: keep-all;
    overflow-wrap: normal;
}

.question-bank-table th:nth-child(5),
.question-bank-table td:nth-child(5) {
    width: 76px;
    word-break: keep-all;
}

.question-bank-table th:nth-child(6),
.question-bank-table td:nth-child(6) {
    width: 76px;
    word-break: keep-all;
}

.question-bank-table th:nth-child(7),
.question-bank-table td:nth-child(7) {
    width: 78px;
}

.question-bank-table th:nth-child(8),
.question-bank-table td:nth-child(8) {
    width: 78px;
}

.question-bank-table th:nth-child(9),
.question-bank-table td:nth-child(9) {
    width: 166px;
}

.question-bank-table th:nth-child(10),
.question-bank-table td:nth-child(10) {
    width: 86px;
}

.question-bank-table th:nth-child(11),
.question-bank-table td:nth-child(11) {
    width: 92px;
}

.question-bank-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.question-title-link {
    color: #0f172a;
    text-decoration: none;
}

.question-title-link:hover {
    color: #0f766e;
    text-decoration: underline;
}

.muted-text {
    color: #64748b;
}

.import-result {
    margin-bottom: 18px;
    padding: 12px 14px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
    line-height: 1.5;
}

.import-result strong {
    color: #0f766e;
}

.import-result ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 14px;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.table-actions-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.reset-password-form input {
    width: 118px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.reset-password-form input:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.student-edit-form {
    flex-wrap: wrap;
}

.student-edit-form input,
.student-edit-form select {
    width: 118px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
}

.student-edit-form select {
    width: 140px;
}

.student-edit-form input:focus,
.student-edit-form select:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.knowledge-delete-form {
    margin-left: 6px;
}

.compact-select {
    height: 34px;
    max-width: 102px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 13px;
}

.status-pill {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    color: #0f766e;
    background: #e8f5f3;
    border: 1px solid #b8d9d4;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.status-pill.disabled {
    color: #64748b;
    background: #f1f5f9;
    border-color: #dbe5ea;
}

.status-pill.review {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.status-pill.rejected {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.quality-pill {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.quality-pill.low {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.quality-pill.medium {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.quality-pill.high {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.quality-warnings {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.question-review-panel {
    margin-bottom: 18px;
}

.review-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.review-stat {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.review-stat span {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 13px;
}

.review-stat strong {
    color: #0f172a;
    font-size: 22px;
}

.compact-table-wrap {
    margin-top: 0;
}

.option-distribution-table td:nth-child(2) {
    min-width: 220px;
}

.correct-option-row {
    background: #f0fdf4;
}

.review-suggestions {
    margin-top: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.review-suggestions h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 16px;
}

.review-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.review-heading-row h2 {
    margin: 0;
}

.review-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.small-action-button {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 14px;
}

.review-suggestions ul {
    margin: 0;
    padding-left: 20px;
    color: #334155;
    line-height: 1.7;
}

.ai-review-result {
    background: #f0fdfa;
    border-color: #99f6e4;
}

.difficulty-calibration-result {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.ai-review-summary {
    margin: 0 0 8px;
    color: #0f172a;
    font-weight: 700;
}

.ai-review-summary span {
    margin-left: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
}

.calibration-reason {
    margin: 0 0 8px;
    color: #334155;
}

.class-report-panel {
    background: #f8fafc;
}

.class-report-panel h3 {
    margin: 8px 0;
    color: #0f172a;
    font-size: 15px;
}

.class-report-panel ol {
    margin: 0;
    padding-left: 20px;
    line-height: 1.7;
}

.report-grid {
    gap: 16px;
    margin: 8px 0 12px;
}

.danger-button {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.danger-button:hover {
    background: #fee2e2;
}

.status-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
}

.status-item span {
    display: inline;
    margin-bottom: 0;
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
}

.status-item strong {
    min-width: 0;
    color: #0f766e;
    font-size: 18px;
    line-height: 1.2;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mastery-status {
    cursor: help;
}

.mastery-status:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.status-item .status-tooltip {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 10;
    display: grid;
    gap: 6px;
    width: min(360px, calc(100vw - 32px));
    padding: 12px 14px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #b8d9d4;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
}

.status-item .status-tooltip p {
    margin: 0;
}

.status-item .status-tooltip::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 100%;
    border-width: 7px 7px 0;
    border-style: solid;
    border-color: #ffffff transparent transparent;
}

.mastery-status:hover .status-tooltip,
.mastery-status:focus .status-tooltip,
.mastery-status:focus-within .status-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.question-box {
    margin-bottom: 14px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

#question-title {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.question-detail-options {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.question-detail-option {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
}

.question-detail-option strong {
    color: #0f766e;
}

.question-detail-option.correct-option {
    background: #ecfdf5;
    border-color: #86efac;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 10px;
}

.question-number {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.source-text {
    margin: 0 0 6px;
    color: #475569;
    font-size: 14px;
}

.question-meta .source-text {
    margin: 0;
}

h2 {
    margin: 0 0 14px;
    font-size: 21px;
    line-height: 1.42;
}

.records-panel h2 {
    margin-bottom: 16px;
}

.records-panel {
    margin-bottom: 28px;
}

.student-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(560px, 1.15fr) minmax(360px, 0.85fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 28px;
}

.student-dashboard-grid .records-panel {
    margin-bottom: 0;
}

.student-mastery-panel {
    min-width: 0;
}

.student-detail-tabs {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.dashboard-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 10px;
    min-width: 300px;
}

.dashboard-entry-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    padding: 12px 14px;
    color: #0f172a;
    text-decoration: none;
    background: #f0fdfa;
    border: 1px solid #99d8d0;
    border-radius: 8px;
}

.dashboard-entry-card:hover {
    border-color: #0f766e;
    background: #e6f7f4;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.12);
}

.dashboard-entry-card span {
    color: #475569;
    font-size: 13px;
}

.dashboard-entry-card strong {
    color: #0f766e;
    font-size: 16px;
}

.dashboard-entry-card em {
    grid-row: 1 / span 2;
    grid-column: 2;
    display: inline-flex;
    min-width: 72px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: #ffffff;
    background: #0f766e;
    border-radius: 6px;
    font-style: normal;
    font-size: 14px;
    white-space: nowrap;
}

.student-detail-header {
    align-items: flex-end;
}

.wrong-preview-list {
    display: grid;
    gap: 12px;
}

.practice-preview-list {
    display: grid;
    gap: 12px;
}

.wrong-preview-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.practice-preview-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.wrong-preview-main {
    min-width: 0;
}

.wrong-preview-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 12px;
    align-items: center;
}

.retry-status-badge {
    display: inline-flex;
    width: fit-content;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.retry-status-not_retried {
    color: #475569;
    background: #f1f5f9;
}

.retry-status-mastered {
    color: #166534;
    background: #dcfce7;
}

.retry-status-needs_review {
    color: #9a3412;
    background: #ffedd5;
}

.wrong-title-link {
    display: block;
    width: 100%;
    padding: 0;
    color: #0f172a;
    background: transparent;
    border: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.55;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.wrong-title-link:hover {
    color: #0f766e;
    text-decoration: underline;
}

.wrong-preview-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.practice-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.practice-preview-meta .wrong-preview-meta-item {
    min-width: 72px;
}

.practice-preview-meta .wrong-preview-meta-item:last-child {
    min-width: 136px;
}

.wrong-preview-meta-item {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e5eef1;
    border-radius: 6px;
}

.wrong-preview-meta-item span {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.wrong-preview-meta-item strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.practice-preview-card .wrong-preview-meta-item:first-child strong {
    color: #0f766e;
}

.wrong-preview-actions {
    display: flex;
    justify-content: flex-end;
}

.wrong-book-preview-card .wrong-preview-actions {
    justify-content: flex-start;
}

.wrong-preview-empty {
    padding: 30px 16px;
    background: #ffffff;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.detail-modal[hidden] {
    display: none;
}

.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.detail-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
}

.detail-modal-panel {
    position: relative;
    width: min(820px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 22px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.detail-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.detail-modal-header h2 {
    margin: 0;
}

.icon-close-button {
    width: 34px;
    height: 34px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.wrong-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}

.wrong-detail-grid div {
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5eef1;
    border-radius: 6px;
}

.wrong-detail-grid dt {
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
}

.wrong-detail-grid dd {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.wrong-detail-section {
    margin-top: 16px;
}

.wrong-detail-section h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 16px;
}

.wrong-detail-section p {
    margin: 0;
    color: #334155;
    line-height: 1.75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.detail-option-list {
    display: grid;
    gap: 8px;
}

.detail-option-item {
    padding: 10px 12px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e5eef1;
    border-radius: 6px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.detail-option-item.correct-option {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.detail-option-item.selected-wrong-option {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.detail-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.subtab-list {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    gap: 4px;
    padding: 4px;
    background: #f1f5f9;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.subtab-button {
    min-width: 96px;
    height: 36px;
    padding: 0 14px;
    color: #475569;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.subtab-button.active {
    color: #ffffff;
    background: #0f766e;
}

.subtab-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.subtab-panel[hidden] {
    display: none;
}

.detail-placeholder {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

.suggestions-panel {
    margin-bottom: 28px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.suggestions-panel h2 {
    margin-bottom: 12px;
}

.suggestions-panel ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.7;
}

.suggestions-panel ol {
    margin: 8px 0 0;
    padding-left: 20px;
    line-height: 1.7;
}

.path-focus {
    margin: 0;
    color: #0f766e;
    font-weight: 700;
}

.empty-cell {
    color: #64748b;
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
}

.panel-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.panel-title-row h2 {
    margin-bottom: 0;
}

.pagination-summary {
    color: #64748b;
    font-size: 14px;
}

.pagination-footer {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 14px;
}

.pagination-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.pagination-bar button {
    min-width: 38px;
    height: 36px;
    padding: 0 12px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
}

.pagination-bar button.active {
    color: #ffffff;
    background: #2f559f;
    border-color: #2f559f;
}

.pagination-bar button:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    background: #f1f5f9;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 36px;
    color: #64748b;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5eef1;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    color: #475569;
    background: #f8fafc;
    white-space: nowrap;
}

.teacher-records-table {
    min-width: 1040px;
    table-layout: fixed;
}

.teacher-records-table .record-student-column {
    width: 120px;
}

.teacher-records-table .record-knowledge-column {
    width: 150px;
}

.teacher-records-table .record-title-column {
    width: auto;
}

.teacher-records-table .record-answer-column,
.teacher-records-table .record-result-column,
.teacher-records-table .record-difficulty-column {
    width: 86px;
}

.teacher-records-table .record-time-column {
    width: 160px;
}

.teacher-records-table th:nth-child(2),
.teacher-records-table td:nth-child(2) {
    word-break: keep-all;
    overflow-wrap: break-word;
}

.access-log-filters {
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(200px, 1.2fr) auto auto;
}

.access-log-table {
    min-width: 980px;
    table-layout: fixed;
}

.access-log-table th:nth-child(1) {
    width: 160px;
}

.access-log-table th:nth-child(2) {
    width: 130px;
}

.access-log-table th:nth-child(3) {
    width: 130px;
}

.access-log-table th:nth-child(4),
.access-log-table th:nth-child(5) {
    width: 76px;
}

.access-log-path,
.access-log-agent {
    overflow-wrap: anywhere;
}

.teacher-records-table th:nth-child(4),
.teacher-records-table td:nth-child(4),
.teacher-records-table th:nth-child(5),
.teacher-records-table td:nth-child(5),
.teacher-records-table th:nth-child(6),
.teacher-records-table td:nth-child(6),
.teacher-records-table th:nth-child(7),
.teacher-records-table td:nth-child(7) {
    white-space: nowrap;
}

.teacher-wrong-table {
    min-width: 860px;
    table-layout: fixed;
}

.teacher-wrong-table .wrong-id-column {
    width: 82px;
}

.teacher-wrong-table .wrong-title-column {
    width: auto;
}

.teacher-wrong-table .wrong-knowledge-column {
    width: 150px;
}

.teacher-wrong-table .wrong-count-column,
.teacher-wrong-table .wrong-rate-column {
    width: 76px;
}

.teacher-wrong-table th:nth-child(1),
.teacher-wrong-table td:nth-child(1),
.teacher-wrong-table th:nth-child(4),
.teacher-wrong-table td:nth-child(4),
.teacher-wrong-table th:nth-child(5),
.teacher-wrong-table td:nth-child(5),
.teacher-wrong-table th:nth-child(6),
.teacher-wrong-table td:nth-child(6) {
    white-space: nowrap;
}

.teacher-wrong-table th:nth-child(3),
.teacher-wrong-table td:nth-child(3) {
    word-break: keep-all;
    overflow-wrap: break-word;
}

.student-summary #last-submit {
    font-size: 15px;
    line-height: 1.35;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

.compact-table {
    max-width: 620px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.options {
    display: grid;
    gap: 10px;
}

.option-button {
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
    font-size: 16px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
    cursor: pointer;
}

.option-button:hover {
    background: #e8f5f3;
    border-color: #0f766e;
}

.option-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.result {
    min-height: 28px;
    margin-top: 14px;
    font-size: 18px;
    font-weight: bold;
}

.difficulty-message {
    min-height: 24px;
    margin-top: 8px;
    color: #0f766e;
    font-size: 15px;
    font-weight: bold;
}

.correct {
    color: #15803d;
}

.wrong {
    color: #b91c1c;
}

.explanation {
    margin-top: 10px;
    padding: 14px 16px;
    color: #334155;
    background: #f8fafc;
    border-left: 4px solid #0f766e;
    border-radius: 6px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.6;
}

.encouragement {
    min-height: 0;
    margin-top: 10px;
    padding: 0;
    color: #334155;
    white-space: pre-line;
    line-height: 1.7;
}

.encouragement:not(:empty) {
    padding: 14px 16px;
    background: #f0f9f4;
    border-left: 4px solid #15803d;
    border-radius: 6px;
}

.next-button {
    display: none;
    margin-top: 18px;
    padding: 12px 22px;
    color: #ffffff;
    background: #0f766e;
    border: 0;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.next-button:hover {
    background: #0b5f59;
}

@media (max-width: 820px) {
    .status-box {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    }

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

@media (max-width: 640px) {
    .page {
        align-items: stretch;
        padding: 12px;
    }

    .practice-card {
        padding: 16px;
    }

    .site-record-footer {
        padding-right: 12px;
        padding-left: 12px;
        font-size: 12px;
    }

    .site-record-content {
        gap: 4px 8px;
    }

    .header {
        display: grid;
        gap: 14px;
    }

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

    .header-actions {
        justify-content: flex-start;
        margin-left: 0;
    }

    h1 {
        font-size: 22px;
    }

    .practice-controls {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .mode-options {
        grid-template-columns: 1fr;
    }

    .status-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-summary {
        grid-template-columns: 1fr;
    }

    .student-summary {
        grid-template-columns: 1fr;
    }

    .teacher-filters {
        grid-template-columns: 1fr;
    }

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

    .student-record-filter {
        grid-template-columns: 1fr;
    }

    .student-record-filter.wrong-record-filter {
        grid-template-columns: 1fr;
    }

    .subtab-list {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .subtab-button {
        width: 100%;
        min-width: 0;
    }

    .dashboard-entry-grid {
        width: 100%;
        min-width: 0;
        grid-template-columns: 1fr;
    }

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

    .dashboard-entry-card em {
        grid-row: auto;
        grid-column: auto;
        width: fit-content;
    }

    .wrong-preview-card {
        grid-template-columns: 1fr;
    }

    .wrong-title-link {
        white-space: normal;
    }

    .wrong-preview-heading {
        grid-template-columns: minmax(0, 1fr) max-content;
    }

    .wrong-preview-meta {
        grid-template-columns: 1fr;
    }

    .wrong-preview-actions {
        justify-content: flex-start;
    }

    .wrong-detail-grid {
        grid-template-columns: 1fr;
    }

    .question-ask-box {
        grid-template-columns: 1fr;
    }

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

    .review-summary-grid {
        grid-template-columns: 1fr;
    }

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

    .student-action-grid {
        grid-template-columns: 1fr;
    }

    .student-filter-form {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        justify-content: flex-start;
    }

    .student-action-panel {
        padding: 14px;
    }

    .compact-panel {
        max-width: none;
    }

    .question-bank-filter-form {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .question-box {
        padding: 14px;
    }

    .option-button {
        min-height: 48px;
        padding: 12px 14px;
    }

    .pagination-bar {
        justify-content: center;
    }
}
