.teacher-page-section {
    padding: 40px 0;
}

.teacher-page-container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 20px;
}

.teacher-back-row {
    margin-bottom: 24px;
}

.teacher-back-link {
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
}

.teacher-page-header {
    margin-bottom: 28px;
}

.teacher-page-actions {
    margin-bottom: 24px;
}

.teacher-page-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #111827;
}

.teacher-page-subtext {
    font-size: 1.08rem;
    color: #555;
    margin-bottom: 8px;
}

.teacher-page-text {
    color: #666;
    margin: 0;
}

.teacher-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.teacher-stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.teacher-stat-label {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.teacher-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
}

.teacher-stat-detail {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 8px;
}

.teacher-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.teacher-card-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.teacher-card-header--split {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.teacher-card-title {
    margin: 0;
    font-size: 1.2rem;
    color: #111827;
}

.teacher-table-wrap {
    overflow-x: auto;
}

.teacher-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.teacher-table thead tr {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.teacher-table th,
.teacher-table td {
    text-align: left;
    padding: 16px;
}

.teacher-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.teacher-student-name {
    font-weight: 600;
    color: #111827;
}

.teacher-muted {
    color: #444;
}

.teacher-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.teacher-actions-cell {
    text-align: right;
}

.teacher-table th.teacher-actions-cell,
.teacher-table td.teacher-actions-cell {
    text-align: right;
}

.teacher-table th.teacher-actions-header {
    text-align: right;
}

.teacher-action-row--right {
    justify-content: flex-end;
}

.teacher-pop-quiz-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 108px 102px 96px;
    margin-left: auto;
    width: max-content;
}

.teacher-pop-quiz-actions .teacher-primary-btn,
.teacher-pop-quiz-actions .teacher-danger-btn,
.teacher-pop-quiz-actions form {
    width: 100%;
}

.teacher-pop-quiz-actions .teacher-primary-btn,
.teacher-pop-quiz-actions .teacher-danger-btn {
    text-align: left;
}

.teacher-pop-quiz-actions--header {
    font-weight: 700;
    text-align: left;
}

.teacher-btn,
.teacher-primary-btn,
.teacher-secondary-btn,
.teacher-danger-btn {
    display: inline-block;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button.teacher-btn,
button.teacher-primary-btn,
button.teacher-secondary-btn,
button.teacher-danger-btn,
a.teacher-btn,
a.teacher-primary-btn,
a.teacher-secondary-btn,
a.teacher-danger-btn {
    cursor: pointer;
}

.teacher-btn-primary,
.teacher-primary-btn {
    background: #2563eb;
    border: 1px solid #2563eb;
    color: white;
}

.teacher-btn-primary:hover,
.teacher-primary-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
    transform: translateY(-1px);
}

.teacher-btn-secondary,
.teacher-secondary-btn {
    background: white;
    color: #1d4ed8;
    border: 1px solid #cbd5e1;
}

.teacher-btn-secondary:hover,
.teacher-secondary-btn:hover {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.teacher-danger-btn {
    background: #dc2626;
    border: 1px solid #dc2626;
    color: #ffffff;
}

.teacher-danger-btn:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.24);
    transform: translateY(-1px);
}

.teacher-empty-state {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.teacher-empty-title {
    margin-top: 0;
    margin-bottom: 10px;
    color: #111827;
}

.teacher-empty-text {
    margin: 0;
    color: #666;
}
.teacher-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.teacher-card-body {
    padding: 24px;
}

.teacher-detail-list {
    display: grid;
    gap: 14px;
}

.teacher-detail-item {
    display: block;
}

.teacher-detail-label {
    font-size: 0.92rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.teacher-detail-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.teacher-stat-value-small {
    font-size: 1.25rem;
}

.teacher-status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.teacher-status-active {
    background: #dcfce7;
    color: #166534;
}

.teacher-status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.teacher-form {
    display: grid;
    gap: 20px;
}

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

.teacher-form-grid--three {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.teacher-form-field {
    display: grid;
    gap: 8px;
}

.teacher-form-field label,
.teacher-checkbox {
    color: #374151;
    font-weight: 700;
}

.teacher-form-field input,
.teacher-form-field select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    padding: 10px 12px;
    width: 100%;
}

.teacher-form-field textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    padding: 10px 12px;
    width: 100%;
}

.teacher-form-section-title {
    color: #111827;
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: 4px;
}

.teacher-checkbox {
    align-items: center;
    display: flex;
    gap: 10px;
}
.teacher-student-picker {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}

.teacher-student-picker--empty {
    color: #6b7280;
    padding: 14px 16px;
}

.teacher-student-picker__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.teacher-mini-link {
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

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

.teacher-student-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 16px;
}

.teacher-student-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    color: #111827;
    font-weight: 500;
}

.teacher-student-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.teacher-analytics-container {
    max-width: 1280px;
}

.teacher-analytics-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.teacher-analytics-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.teacher-analytics-filter-card,
.teacher-analytics-saved-card,
.teacher-analytics-column-card {
    margin-bottom: 28px;
}

.teacher-analytics-filter-card {
    background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
    border-color: #dbe7ff;
}

.teacher-analytics-help-card {
    background: linear-gradient(180deg, #ffffff 0%, #eefcf3 100%);
    border-color: #cdebd7;
}

.teacher-analytics-column-card {
    background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
    border-color: #cfe2ff;
}

.teacher-analytics-entry-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    border-color: #d8e8f8;
}

.teacher-advanced-setup-card {
    background: linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
    border-color: #dfe6fb;
    margin-bottom: 28px;
}

.teacher-advanced-question-card {
    background: linear-gradient(180deg, #ffffff 0%, #eefcf3 100%);
    border-color: #cdebd7;
    margin-bottom: 28px;
}

.teacher-advanced-entry-card {
    background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
    border-color: #cfe2ff;
    margin-bottom: 28px;
}

.teacher-advanced-readonly-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
    border-color: #dfe6f2;
    margin-bottom: 28px;
}

.teacher-advanced-ai-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%);
    border-color: #e1def8;
    margin-top: 22px;
}

.teacher-advanced-chart-grid {
    align-items: stretch;
}

.teacher-chart-canvas-wrap {
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 8px;
    height: 310px;
    overflow-x: auto;
    padding: 14px 14px 8px;
}

.teacher-chart-canvas-wrap canvas {
    min-width: 520px;
}

.teacher-chart-canvas-wrap--wide canvas {
    min-width: 680px;
}

.teacher-chart-canvas-wrap--compact canvas {
    min-width: 0;
}

.teacher-chart-canvas-wrap--compact {
    width: 100%;
}

.teacher-ai-section-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.teacher-ai-section-grid--print {
    display: block;
}

.teacher-ai-section-card {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 8px;
    padding: 16px;
}

.teacher-ai-section-grid--print .teacher-ai-section-card {
    margin-bottom: 12px;
}

.teacher-ai-section-card h4 {
    color: #111827;
    font-size: 1.02rem;
    letter-spacing: 0;
    margin: 0 0 10px;
}

.teacher-ai-section-card p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 8px 0 0;
}

.teacher-unsaved-modal {
    align-items: center;
    background: rgba(15, 23, 42, 0.46);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 24px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

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

.teacher-unsaved-dialog {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    max-width: 520px;
    padding: 24px;
    width: min(100%, 520px);
}

.teacher-unsaved-dialog h2 {
    color: #111827;
    font-size: 1.35rem;
    letter-spacing: 0;
    margin: 0 0 10px;
}

.teacher-unsaved-dialog p {
    color: #475569;
    line-height: 1.55;
    margin: 0 0 18px;
}

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

.teacher-advanced-meta-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.teacher-advanced-meta-grid div {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
}

.teacher-advanced-meta-grid span {
    color: #64748b;
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.teacher-advanced-meta-grid strong {
    color: #111827;
}

.teacher-question-max-input {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: 0.82rem;
    padding: 6px 8px;
    width: 86px;
}

.teacher-advanced-mark-table {
    min-width: 980px;
}

.teacher-analytics-markbook-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
    border-color: #dfe6f2;
    margin-top: 34px;
}

.teacher-analytics-saved-card {
    background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%);
    border-color: #e3ddf4;
}

.teacher-analytics-help-card,
.teacher-analytics-entry-card {
    margin-bottom: 28px;
}

.teacher-form-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.teacher-analytics-help-list {
    color: #374151;
    margin: 12px 0 0;
    padding-left: 22px;
}

.teacher-analytics-help-list li {
    margin-bottom: 8px;
}

.teacher-analytics-context-note {
    margin-bottom: 16px;
}

.teacher-collapse-card {
    overflow: hidden;
}

.teacher-collapse-summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 18px 22px;
}

.teacher-collapse-summary::-webkit-details-marker,
.teacher-saved-report-item summary::-webkit-details-marker {
    display: none;
}

.teacher-collapse-summary strong {
    color: #111827;
    display: block;
    font-size: 1.2rem;
}

.teacher-collapse-summary small {
    color: #6b7280;
    display: block;
    font-weight: 600;
    margin-top: 4px;
}

.teacher-collapse-icon {
    align-items: center;
    background: #e0ecff;
    border-radius: 999px;
    color: #2563eb;
    display: inline-flex;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

details[open] > summary .teacher-collapse-icon {
    transform: rotate(45deg);
}

.teacher-saved-report-form {
    margin-bottom: 18px;
}

.teacher-saved-report-list {
    display: grid;
    gap: 12px;
}

.teacher-saved-report-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

.teacher-saved-report-item summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    list-style: none;
}

.teacher-saved-report-item small {
    color: #6b7280;
    display: block;
    font-size: 0.9rem;
    margin-top: 4px;
}

.teacher-saved-report-details {
    border-top: 1px solid #e5e7eb;
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
}

.teacher-saved-report-actions {
    align-items: center;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.teacher-saved-report-actions form {
    margin: 0;
}

.teacher-saved-action {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    min-width: 86px;
    padding: 10px 22px;
    text-decoration: none;
}

.teacher-saved-action--open {
    background: #2563eb;
    border-color: #1d4ed8;
}

.teacher-saved-action--edit {
    background: #16a34a;
    border-color: #15803d;
}

.teacher-saved-action--delete {
    background: #dc2626;
    border-color: #b91c1c;
}

.teacher-saved-action--collapse {
    background: #64748b;
    border-color: #475569;
}

.teacher-analytics-table {
    min-width: 980px;
}

.teacher-analytics-column-head {
    display: grid;
    gap: 4px;
}

.teacher-analytics-column-head small {
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 600;
}

.teacher-analytics-column-head a {
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.teacher-analytics-entry-table {
    min-width: 520px;
}

.teacher-analytics-average-row {
    background: #f8fafc;
    color: #111827;
    font-weight: 800;
}

.teacher-analytics-average-row span {
    color: #6b7280;
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 4px;
}

.teacher-mark-input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    max-width: 100px;
    padding: 8px 10px;
    width: 100%;
}

.teacher-mark-input::-webkit-outer-spin-button,
.teacher-mark-input::-webkit-inner-spin-button,
.teacher-question-max-input::-webkit-outer-spin-button,
.teacher-question-max-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.teacher-mark-input,
.teacher-question-max-input {
    appearance: textfield;
    -moz-appearance: textfield;
}

.teacher-analytics-save-row {
    border-top: 1px solid #e5e7eb;
}

.teacher-empty-state--inside {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.teacher-analytics-edit-card {
    margin-top: 28px;
}

.teacher-analytics-edit-list {
    display: grid;
    gap: 14px;
}

.teacher-analytics-edit-row {
    align-items: end;
    display: grid;
    grid-template-columns: minmax(160px, 1.4fr) repeat(7, minmax(110px, 1fr)) auto;
    gap: 10px;
}

.teacher-analytics-edit-row input,
.teacher-analytics-edit-row select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    min-width: 0;
    padding: 9px 10px;
    width: 100%;
}

.teacher-analytics-report-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    margin-top: 44px;
    margin-bottom: 34px;
}

.teacher-analytics-report-grid--wide {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 0;
}

.teacher-analytics-chart-card {
    border-radius: 12px;
    overflow: hidden;
}

.teacher-analytics-chart-card--marks {
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
    border-color: #d9e8ff;
}

.teacher-analytics-chart-card--distribution {
    background: linear-gradient(180deg, #ffffff 0%, #f2faf7 100%);
    border-color: #d7eee7;
}

.teacher-analytics-chart-card--trend {
    background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%);
    border-color: #e1def8;
}

.teacher-analytics-chart-card--assignment {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
    border-color: #dfe6f8;
}

.teacher-analytics-chart-card .teacher-card-header {
    background: rgba(255, 255, 255, 0.62);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.teacher-analytics-stats-grid {
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 42px;
    margin-bottom: 18px;
}

.teacher-analytics-selector-row {
    margin-top: 26px;
}

.teacher-analytics-selector-form {
    display: inline-block;
}

.teacher-analytics-selector-field {
    display: inline-grid;
    gap: 8px;
}

.teacher-analytics-selector-field label {
    color: #374151;
    font-weight: 700;
}

.teacher-analytics-selector-field select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    padding: 10px 12px;
    width: 360px;
    max-width: 100%;
}

.teacher-analytics-stats-grid .teacher-stat-card {
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border-color: #d8e7ff;
    border-radius: 10px;
    padding: 12px 14px;
}

.teacher-analytics-stats-grid .teacher-stat-card:nth-child(2) {
    background: linear-gradient(180deg, #f8fffd 0%, #e8f7f4 100%);
    border-color: #cfece6;
}

.teacher-analytics-stats-grid .teacher-stat-card:nth-child(3) {
    background: linear-gradient(180deg, #fffdf7 0%, #f7efd9 100%);
    border-color: #eadfbf;
}

.teacher-analytics-stats-grid .teacher-stat-card:nth-child(4) {
    background: linear-gradient(180deg, #fffafa 0%, #f8eeee 100%);
    border-color: #ead4d4;
}

.teacher-analytics-stats-grid .teacher-stat-label {
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.teacher-analytics-stats-grid .teacher-stat-value {
    font-size: 1.28rem;
    line-height: 1.1;
}

.teacher-analytics-stats-grid .teacher-stat-detail {
    font-size: 0.78rem;
    margin-top: 6px;
}

.teacher-analytics-bars {
    display: grid;
    gap: 14px;
}

.teacher-chart-row {
    align-items: center;
    display: grid;
    grid-template-columns: 70px 1fr 64px;
    gap: 12px;
}

.teacher-chart-row--wide-label {
    grid-template-columns: minmax(140px, 220px) 1fr minmax(90px, auto);
}

.teacher-chart-label {
    color: #111827;
    font-weight: 800;
}

.teacher-chart-track {
    background: #e5e7eb;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.teacher-chart-fill {
    background: #2563eb;
    height: 100%;
}

.teacher-chart-value {
    color: #4b5563;
    font-weight: 700;
    text-align: right;
}

.teacher-vertical-chart {
    align-items: end;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(241, 247, 255, 0.96)),
        linear-gradient(to top, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        linear-gradient(to right, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
    background-size: 100% 100%, 100% 25%, 72px 100%;
    border: 1px solid #dbe7f6;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    display: flex;
    gap: 14px;
    min-height: 260px;
    overflow-x: auto;
    padding: 28px 18px 14px;
}

.teacher-vertical-chart--distribution {
    background:
        linear-gradient(180deg, rgba(248, 255, 253, 0.96), rgba(236, 248, 245, 0.96)),
        linear-gradient(to top, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        linear-gradient(to right, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
    min-height: 230px;
}

.teacher-vertical-bar-item {
    align-items: center;
    display: grid;
    flex: 1 0 70px;
    gap: 8px;
    grid-template-rows: auto 1fr auto;
    min-width: 70px;
    text-align: center;
}

.teacher-vertical-bar-value {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
}

.teacher-vertical-bar-track {
    align-items: end;
    background: #eef2f7;
    border-radius: 8px 8px 4px 4px;
    display: flex;
    height: 170px;
    overflow: hidden;
}

.teacher-vertical-chart--distribution .teacher-vertical-bar-track {
    height: 150px;
}

.teacher-vertical-bar-fill {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
    border-radius: 8px 8px 4px 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    min-height: 3px;
    width: 100%;
}

.teacher-vertical-bar-fill--green {
    background: linear-gradient(180deg, #5eead4 0%, #0f766e 100%);
}

.teacher-vertical-bar-label {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-chart-panel {
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(241, 247, 255, 0.98)),
        repeating-linear-gradient(to top, transparent 0, transparent 49px, rgba(100, 116, 139, 0.16) 50px),
        repeating-linear-gradient(to right, transparent 0, transparent 79px, rgba(100, 116, 139, 0.08) 80px);
    border: 1px solid #d8e5f6;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 300px;
    padding: 18px 18px 16px 12px;
}

.teacher-chart-panel--distribution {
    background:
        linear-gradient(180deg, rgba(248, 255, 253, 0.98), rgba(236, 248, 245, 0.98)),
        repeating-linear-gradient(to top, transparent 0, transparent 49px, rgba(100, 116, 139, 0.16) 50px),
        repeating-linear-gradient(to right, transparent 0, transparent 79px, rgba(100, 116, 139, 0.08) 80px);
}

.teacher-chart-panel--assignment {
    background:
        linear-gradient(180deg, rgba(249, 250, 255, 0.98), rgba(241, 244, 255, 0.98)),
        repeating-linear-gradient(to top, transparent 0, transparent 49px, rgba(100, 116, 139, 0.16) 50px),
        repeating-linear-gradient(to right, transparent 0, transparent 79px, rgba(100, 116, 139, 0.08) 80px);
}

.teacher-chart-panel--comparison {
    background:
        linear-gradient(180deg, rgba(250, 249, 255, 0.98), rgba(243, 242, 255, 0.98)),
        repeating-linear-gradient(to top, transparent 0, transparent 49px, rgba(100, 116, 139, 0.16) 50px),
        repeating-linear-gradient(to right, transparent 0, transparent 79px, rgba(100, 116, 139, 0.08) 80px);
}

.teacher-chart-y-axis {
    color: #64748b;
    display: flex;
    flex-direction: column;
    font-size: 0.72rem;
    font-weight: 800;
    height: 218px;
    justify-content: space-between;
    padding-right: 10px;
    text-align: right;
}

.teacher-bar-plot {
    align-items: end;
    border-bottom: 2px solid #94a3b8;
    border-left: 2px solid #cbd5e1;
    display: flex;
    gap: 8px;
    min-height: 248px;
    overflow-x: auto;
    padding: 0 8px 0 16px;
    position: relative;
}

.teacher-bar-column {
    align-items: center;
    display: grid;
    flex: 1 0 56px;
    gap: 7px;
    grid-template-rows: 22px 190px 28px;
    justify-items: center;
    min-width: 56px;
}

.teacher-bar-value {
    color: #1f2937;
    font-size: 0.8rem;
    font-weight: 900;
}

.teacher-bar-shell {
    align-items: end;
    display: flex;
    height: 190px;
    justify-content: center;
    width: 100%;
}

.teacher-bar-fill {
    background: linear-gradient(180deg, #7db7f8 0%, #2563eb 100%);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 7px 7px 3px 3px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
    min-height: 4px;
    transition: height 160ms ease;
    width: min(42px, 90%);
}

.teacher-bar-fill--green {
    background: linear-gradient(180deg, #6ee7d8 0%, #0f766e 100%);
    border-color: rgba(15, 118, 110, 0.18);
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
}

.teacher-bar-fill--violet {
    background: linear-gradient(180deg, #a5b4fc 0%, #4f46e5 100%);
    border-color: rgba(79, 70, 229, 0.18);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.15);
}

.teacher-bar-fill--indigo {
    background: linear-gradient(180deg, #93c5fd 0%, #4338ca 100%);
    border-color: rgba(67, 56, 202, 0.18);
    box-shadow: 0 8px 18px rgba(67, 56, 202, 0.15);
}

.teacher-bar-plot--average-line {
    position: relative;
}

.teacher-average-line {
    border-top: 2px dashed #be123c;
    left: 12px;
    pointer-events: none;
    position: absolute;
    right: 12px;
    z-index: 3;
}

.teacher-average-line span {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    color: #9f1239;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 3px 8px;
    position: absolute;
    right: 0;
    top: -13px;
}

.teacher-point-chart {
    background:
        linear-gradient(180deg, rgba(250, 249, 255, 0.98), rgba(243, 242, 255, 0.98)),
        repeating-linear-gradient(to top, transparent 0, transparent 49px, rgba(100, 116, 139, 0.15) 50px),
        repeating-linear-gradient(to right, transparent 0, transparent 79px, rgba(100, 116, 139, 0.08) 80px);
    border: 1px solid #dedbf6;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 300px;
    padding: 18px 18px 16px 12px;
}

.teacher-point-chart-plot {
    border-bottom: 2px solid #94a3b8;
    border-left: 2px solid #cbd5e1;
    height: 220px;
    min-width: 360px;
    overflow: visible;
    position: relative;
}

.teacher-point-average-line {
    border-top: 2px dashed #be123c;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    z-index: 2;
}

.teacher-point-average-line span {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    color: #9f1239;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 3px 8px;
    position: absolute;
    right: 8px;
    top: -13px;
}

.teacher-point-dot {
    align-items: center;
    background: #4f46e5;
    border: 3px solid #ffffff;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
    display: inline-flex;
    height: 16px;
    justify-content: center;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 16px;
    z-index: 3;
}

.teacher-point-dot span {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    color: #312e81;
    font-size: 0.68rem;
    font-weight: 900;
    opacity: 0;
    padding: 2px 6px;
    position: absolute;
    top: -28px;
    transition: opacity 120ms ease;
    white-space: nowrap;
}

.teacher-point-dot:hover span {
    opacity: 1;
}

.teacher-point-labels {
    bottom: -34px;
    color: #334155;
    display: flex;
    font-size: 0.74rem;
    font-weight: 900;
    justify-content: space-between;
    left: 0;
    position: absolute;
    right: 0;
}

.teacher-point-labels span {
    max-width: 72px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-bar-label {
    color: #334155;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1.15;
    max-width: 86px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-chart-caption {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 10px;
}

.teacher-line-chart {
    background:
        linear-gradient(180deg, rgba(250, 249, 255, 0.98), rgba(243, 242, 255, 0.98)),
        repeating-linear-gradient(to top, transparent 0, transparent 49px, rgba(100, 116, 139, 0.15) 50px);
    border: 1px solid #dedbf6;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 300px;
    padding: 18px 18px 16px 12px;
}

.teacher-line-chart-y {
    color: #64748b;
    display: flex;
    flex-direction: column;
    font-size: 0.72rem;
    font-weight: 800;
    height: 218px;
    justify-content: space-between;
    padding-right: 10px;
    text-align: right;
}

.teacher-line-chart-plot {
    border-bottom: 2px solid #94a3b8;
    border-left: 2px solid #cbd5e1;
    min-height: 248px;
    overflow-x: auto;
    padding: 0 10px;
}

.teacher-line-chart-plot svg {
    display: block;
    height: 210px;
    min-width: 360px;
    overflow: visible;
    width: 100%;
}

.teacher-line-chart-plot polyline {
    fill: none;
    stroke: #4f46e5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.6;
    vector-effect: non-scaling-stroke;
}

.teacher-line-chart-plot circle {
    fill: #ffffff;
    stroke: #4f46e5;
    stroke-width: 1.8;
    vector-effect: non-scaling-stroke;
}

.teacher-line-chart-labels {
    color: #334155;
    display: flex;
    font-size: 0.76rem;
    font-weight: 900;
    justify-content: space-between;
    min-width: 360px;
    padding-top: 8px;
}

.teacher-line-chart-labels span {
    max-width: 78px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-print-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.teacher-print-header {
    margin-bottom: 28px;
}

.teacher-print-header h1 {
    color: #111827;
    font-size: 2.4rem;
    margin: 0 0 8px;
}

.teacher-print-header p {
    color: #4b5563;
    margin: 0;
}

.teacher-print-section {
    margin-bottom: 24px;
}

.teacher-print-table th span {
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
}

@media print {
    .navbar,
    .teacher-print-actions,
    script {
        display: none !important;
    }

    .main-container {
        max-width: none;
        padding: 0;
    }

    .teacher-page-section {
        padding: 0;
    }

    .teacher-page-container {
        max-width: none;
        padding: 0;
    }

    .teacher-card,
    .teacher-stat-card {
        box-shadow: none;
        break-inside: avoid;
    }
}

@media (max-width: 900px) {
    .teacher-analytics-header {
        display: grid;
    }

    .teacher-analytics-edit-row {
        grid-template-columns: 1fr;
    }
}
.teacher-student-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-top: 22px;
    margin-bottom: 10px;
}

.teacher-student-card__header {
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.teacher-student-card__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
}

.teacher-student-card__body {
    padding: 18px 22px 22px;
}

.teacher-student-picker {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}

.teacher-student-picker--empty {
    color: #6b7280;
    background: #f8fafc;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    padding: 16px;
}

.teacher-student-picker__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.teacher-student-picker__header strong {
    font-size: 1rem;
    color: #111827;
}

.teacher-mini-link {
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

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

.teacher-student-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 16px;
}

.teacher-student-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    color: #111827;
    font-weight: 600;
}

.teacher-student-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.teacher-workflow-section {
    margin-bottom: 32px;
}

.teacher-workflow-section__header {
    margin-bottom: 18px;
}

.teacher-workflow-section__eyebrow {
    border-bottom: 2px solid #2563eb;
    color: #2563eb;
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    padding-bottom: 6px;
    width: 100%;
    text-transform: uppercase;
}

.teacher-workflow-section__title {
    color: #0f172a;
    font-size: 1.95rem;
    margin: 0 0 8px;
}

.teacher-workflow-section__text {
    color: #475569;
    margin: 0;
    max-width: 760px;
}
