/* =========================================================
   作业系统 - 学生端公共样式
   ========================================================= */


/* ---------- 基础样式 ---------- */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;

    background: #f5f7fa;
    color: #1f2937;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Microsoft YaHei",
        sans-serif;

    line-height: 1.6;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* ---------- 通用页面容器 ---------- */

.page-container {
    width: 100%;
    max-width: 1000px;

    margin: 0 auto;
    padding: 40px 24px 60px;
}


/* ---------- 顶部导航 ---------- */

.navbar {
    width: 100%;

    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.navbar-inner {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;
    padding: 14px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.navbar-brand {
    color: #111827;

    font-size: 18px;
    font-weight: 700;

    text-decoration: none;
}

.navbar-brand:hover {
    text-decoration: none;
}

.navbar-user {
    display: flex;
    align-items: center;

    gap: 16px;

    color: #6b7280;
    font-size: 14px;
}

.navbar-user strong {
    color: #374151;
    font-weight: 600;
}

.navbar-logout {
    color: #4b5563;
    font-size: 14px;
}

.navbar-logout:hover {
    color: #111827;
}


/* ---------- 页面标题 ---------- */

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

.page-title {
    margin: 0 0 6px;

    color: #111827;

    font-size: 28px;
    line-height: 1.35;
    font-weight: 700;
}

.page-subtitle {
    margin: 0;

    color: #6b7280;

    font-size: 14px;
    line-height: 1.6;
}


/* ---------- 通用卡片 ---------- */

.card {
    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-body {
    padding: 24px;
}

.card + .card {
    margin-top: 20px;
}

.card-title {
    margin: 0 0 16px;

    color: #111827;

    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
}


/* ---------- 按钮 ---------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 9px 16px;

    border: 1px solid transparent;
    border-radius: 7px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;

    cursor: pointer;

    text-decoration: none;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

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

.button-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.button-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.button-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.button-secondary {
    background: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

.button-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}


/* ---------- 状态标签 ---------- */

.badge {
    display: inline-flex;
    align-items: center;

    padding: 4px 9px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.badge-success {
    background: #ecfdf3;
    color: #027a48;
}

.badge-neutral {
    background: #f3f4f6;
    color: #4b5563;
}

.badge-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.badge-warning {
    background: #fff7ed;
    color: #c2410c;
}


/* ---------- 表单 ---------- */

.form-group {
    margin-bottom: 20px;
}

.form-label,
.form-group label {
    display: block;

    margin-bottom: 7px;

    color: #374151;

    font-size: 14px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-control {
    display: block;

    width: 100%;

    padding: 10px 12px;

    background: #ffffff;
    color: #111827;

    border: 1px solid #d1d5db;
    border-radius: 7px;

    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.form-group textarea {
    min-height: 220px;
    resize: vertical;
}

.form-help {
    margin-top: 6px;

    color: #6b7280;

    font-size: 13px;
    line-height: 1.5;
}


/* ---------- 错误信息 ---------- */

.error-message {
    margin-bottom: 22px;
    padding: 12px 14px;

    background: #fef2f2;

    border: 1px solid #fecaca;
    border-radius: 8px;

    color: #b91c1c;

    font-size: 14px;
    line-height: 1.6;
}

.field-errors {
    margin-top: 6px;

    color: #b91c1c;

    font-size: 13px;
    line-height: 1.5;
}


/* ---------- 提示框 ---------- */

.notice {
    margin-bottom: 20px;
    padding: 12px 14px;

    border: 1px solid;
    border-radius: 8px;

    font-size: 14px;
    line-height: 1.6;
}

.notice-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.notice-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.notice-neutral {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #4b5563;
}


/* ---------- Markdown 内容 ---------- */

.markdown-body {
    color: #374151;

    font-size: 15px;
    line-height: 1.75;

    overflow-wrap: break-word;
}

.markdown-body > :first-child {
    margin-top: 0;
}

.markdown-body > :last-child {
    margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    color: #111827;

    line-height: 1.4;
}

.markdown-body h1 {
    font-size: 24px;
}

.markdown-body h2 {
    font-size: 21px;
}

.markdown-body h3 {
    font-size: 18px;
}

.markdown-body p {
    margin: 0 0 14px;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 24px;
}

.markdown-body blockquote {
    margin: 16px 0;
    padding: 8px 16px;

    background: #f9fafb;

    border-left: 4px solid #d1d5db;

    color: #4b5563;
}

.markdown-body code {
    padding: 2px 5px;

    background: #f3f4f6;

    border-radius: 4px;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.9em;
}

.markdown-body pre {
    padding: 16px;

    overflow-x: auto;

    background: #111827;
    color: #f9fafb;

    border-radius: 8px;
}

.markdown-body pre code {
    padding: 0;

    background: transparent;
    color: inherit;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
}


/* ---------- 返回链接 ---------- */

.back-link {
    display: inline-block;

    margin-bottom: 20px;

    color: #4b5563;

    font-size: 14px;
    font-weight: 500;
}

.back-link:hover {
    color: #2563eb;
}


/* ---------- 登录 / 注册页面 ---------- */

.auth-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 32px 16px;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-brand {
    margin-bottom: 24px;

    text-align: center;

    color: #111827;

    font-size: 22px;
    font-weight: 700;
}

.auth-card {
    width: 100%;

    padding: 36px 38px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.auth-title {
    margin: 0 0 8px;

    text-align: center;

    color: #111827;

    font-size: 26px;
    line-height: 1.3;
    font-weight: 700;
}

.auth-subtitle {
    margin: 0 0 30px;

    text-align: center;

    color: #6b7280;

    font-size: 14px;
    line-height: 1.6;
}

.auth-button {
    width: 100%;

    margin-top: 4px;
}

.auth-link {
    margin: 24px 0 0;

    text-align: center;

    color: #6b7280;

    font-size: 14px;
}

.auth-link a {
    color: #2563eb;
    font-weight: 500;
}

.auth-note {
    margin: 24px 0 0;

    text-align: center;

    color: #9ca3af;

    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   作业列表
   ========================================================= */

.assignment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* ---------- 作业卡片 ---------- */

.assignment-card {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 32px;

    padding: 22px 24px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.assignment-card:hover {
    border-color: #d1d5db;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.05);

    transform: translateY(-1px);
}


/* ---------- 左侧作业信息 ---------- */

.assignment-main {
    flex: 1;
    min-width: 0;
}

.assignment-title {
    margin: 0 0 12px;

    color: #111827;

    font-size: 18px;
    line-height: 1.4;
    font-weight: 650;
}

.assignment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 8px 10px;

    color: #6b7280;

    font-size: 13px;
}

.deadline {
    margin-right: 4px;
}


/* ---------- 右侧操作区域 ---------- */

.assignment-action {
    min-width: 130px;
    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    gap: 10px;
}


/* ---------- 成绩 ---------- */

.grade {
    color: #4b5563;

    font-size: 13px;
    line-height: 1.4;
}

.grade-score {
    margin-left: 3px;

    color: #111827;

    font-size: 18px;
    font-weight: 700;
}

.grade-waiting {
    color: #9ca3af;

    font-size: 13px;
}


/* ---------- 查看 / 修改按钮 ---------- */

.view-button {
    min-width: 96px;

    white-space: nowrap;
}


/* ---------- 退出按钮 ---------- */

.logout-form {
    margin: 0;
}

.logout-button {
    min-height: auto;

    padding: 7px 13px;

    font-size: 13px;
    font-weight: 500;
}


/* ---------- 空状态 ---------- */

.empty-state {
    padding: 64px 24px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    text-align: center;
}

.empty-title {
    margin: 0 0 8px;

    color: #374151;

    font-size: 18px;
    font-weight: 600;
}

.empty-description {
    margin: 0;

    color: #9ca3af;

    font-size: 14px;
}


/* ---------- 作业列表移动端 ---------- */

@media (max-width: 640px) {

    .user-label {
        display: none;
    }

    .assignment-card {
        padding: 18px;

        flex-direction: column;
        align-items: stretch;

        gap: 18px;
    }

    .assignment-action {
        min-width: 0;

        align-items: stretch;
    }

    .grade,
    .grade-waiting {
        text-align: left;
    }

    .view-button {
        width: 100%;
    }
}

/* ---------- 实时预览 ---------- */

.preview-box {
    margin-top: 16px;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    overflow: hidden;
}

.preview-header {
    padding: 9px 14px;

    background: #f9fafb;

    border-bottom: 1px solid #e5e7eb;

    color: #6b7280;

    font-size: 12px;
    font-weight: 600;
}

.preview-content {
    min-height: 120px;
    padding: 18px;
}


/* ---------- 小型工具类 ---------- */

.text-muted {
    color: #6b7280;
}

.text-small {
    font-size: 13px;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}


/* ---------- 移动端 ---------- */

@media (max-width: 640px) {

    .page-container {
        padding: 24px 16px 40px;
    }

    .navbar-inner {
        padding: 12px 16px;
    }

    .navbar-user {
        gap: 10px;
    }

    .page-title {
        font-size: 24px;
    }

    .card-body {
        padding: 20px;
    }

    .auth-page {
        align-items: flex-start;
        padding-top: 40px;
    }

    .auth-brand {
        margin-bottom: 20px;
        font-size: 20px;
    }

    .auth-card {
        padding: 28px 22px;
    }

    .auth-title {
        font-size: 24px;
    }
}


/* =========================================================
   作业详情
   ========================================================= */


/* ---------- 作业头部 ---------- */

.assignment-header {
    margin-bottom: 24px;
}

.detail-assignment-title {
    margin: 0 0 14px;

    color: #111827;

    font-size: 30px;
    line-height: 1.3;
    font-weight: 700;
}


/* ---------- 详情页卡片 ---------- */

.detail-card {
    margin-bottom: 20px;
}

.detail-card .card-body {
    padding: 26px 28px;
}

.section-title {
    margin: 0 0 20px;

    color: #111827;

    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
}

.section-description {
    margin: -10px 0 20px;

    color: #6b7280;

    font-size: 14px;
}


/* ---------- 提交时间 ---------- */

.submission-times {
    margin-bottom: 22px;

    color: #6b7280;

    font-size: 14px;
}

.submission-times p {
    margin: 4px 0;
}


/* ---------- 答案编辑器 ---------- */

.submission-form {
    margin: 0;
}

.submission-form textarea {
    display: block;

    width: 100%;
    min-height: 260px;

    resize: vertical;

    padding: 14px 16px;

    background: #ffffff;
    color: #111827;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 14px;
    line-height: 1.65;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.submission-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.field-label {
    display: block;

    margin-bottom: 8px;

    color: #374151;

    font-size: 14px;
    font-weight: 600;
}

.form-errors {
    margin: 10px 0;

    color: #b91c1c;

    font-size: 14px;
}


/* ---------- 实时预览 ---------- */

.detail-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 26px;
    margin-bottom: 10px;
}

.preview-title {
    margin: 0;

    color: #374151;

    font-size: 16px;
    font-weight: 600;
}

.preview-label {
    color: #9ca3af;

    font-size: 12px;
}

.submission-preview {
    min-height: 130px;

    padding: 18px;

    background: #f9fafb;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    overflow-wrap: anywhere;
}

.submission-preview > :first-child {
    margin-top: 0;
}

.submission-preview > :last-child {
    margin-bottom: 0;
}

.submission-preview pre {
    padding: 14px;

    overflow-x: auto;

    background: #eeeeee;

    border-radius: 8px;
}

.submission-preview img {
    max-width: 100%;
    height: auto;
}

.form-actions {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-top: 22px;
}


/* ---------- 成绩 ---------- */

.grade-layout {
    display: flex;
    align-items: flex-start;

    gap: 32px;
}

.score-box {
    min-width: 130px;
    flex-shrink: 0;

    padding: 18px;

    background: #f9fafb;

    border-radius: 10px;

    text-align: center;
}

.score-label {
    margin-bottom: 4px;

    color: #6b7280;

    font-size: 13px;
}

.score-value {
    color: #111827;

    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}

.feedback-box {
    flex: 1;
    min-width: 0;
}

.feedback-title {
    margin: 0 0 10px;

    color: #374151;

    font-size: 16px;
    font-weight: 600;
}


/* ---------- 详情页 Markdown ---------- */

.detail-markdown {
    overflow-wrap: anywhere;
}

.detail-markdown pre {
    padding: 14px;

    overflow-x: auto;

    background: #f3f4f6;
    color: #1f2937;

    border-radius: 8px;
}

.detail-markdown pre code {
    color: inherit;
}


/* ---------- 手机端 ---------- */

@media (max-width: 640px) {

    .detail-assignment-title {
        font-size: 25px;
    }

    .detail-card .card-body {
        padding: 20px 18px;
    }

    .grade-layout {
        flex-direction: column;

        gap: 20px;
    }

    .score-box {
        width: 100%;
    }

    .form-actions .button {
        width: 100%;
    }
}


/* =========================
   Teacher Dashboard
   ========================= */


/* ---------- 教师工作台统计 ---------- */

.teacher-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.teacher-stat-card {
    display: block;
    min-width: 0;
    padding: 22px 24px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);

    color: inherit;
    text-decoration: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.teacher-stat-card:hover {
    border-color: #d1d5db;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);

    transform: translateY(-1px);

    text-decoration: none;
}

.teacher-stat-value {
    color: #111827;

    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.teacher-stat-label {
    margin-top: 6px;

    color: #6b7280;

    font-size: 13px;
    font-weight: 500;
}

.teacher-stat-link {
    cursor: pointer;
}


/* ---------- 教师工作台标题区域 ---------- */

.teacher-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}


/* ---------- 最近提交筛选 ---------- */

.recent-submission-filters {
    display: flex;
    align-items: center;

    gap: 10px;
}


/* ---------- 最近提交列表 ---------- */

.recent-submission-list {
    display: flex;
    flex-direction: column;
}

.recent-submission-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;

    gap: 20px;

    padding: 16px 0;

    border-bottom: 1px solid #e5e7eb;
}

.recent-submission-item:last-child {
    border-bottom: none;
}

.recent-submission-main {
    min-width: 0;
}

.recent-submission-student {
    color: #111827;

    font-size: 14px;
    font-weight: 600;
}

.recent-submission-assignment {
    margin-top: 2px;

    color: #6b7280;

    font-size: 13px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-submission-time {
    color: #6b7280;

    font-size: 13px;

    white-space: nowrap;
}

.recent-submission-status {
    white-space: nowrap;
}

.recent-submission-action {
    flex-shrink: 0;
}


/* ---------- Teacher Dashboard 手机端 ---------- */

@media (max-width: 640px) {

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

    .teacher-stat-card {
        padding: 18px 20px;
    }

    .teacher-stat-value {
        font-size: 24px;
    }

    .teacher-dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }

    .recent-submission-filters {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .recent-submission-filters .button {
        width: 100%;
    }

    .recent-submission-item {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 18px 0;
    }

    .recent-submission-assignment {
        white-space: normal;
    }

    .recent-submission-action .button {
        width: 100%;
    }

}

/* ---------- 公布成绩选项 ---------- */

.publish-grade-option {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    width: auto !important;
    gap: 8px;

    color: #374151;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;
    user-select: none;
}

.publish-grade-option span {
    display: inline;
}

.publish-grade-checkbox {
    display: inline-block;
    flex: 0 0 auto;

    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    padding: 0;

    accent-color: #2563eb;

    cursor: pointer;
}

/* ---------- 系统提示 ---------- */

.message {
    margin: 16px 0 20px;
    padding: 12px 16px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 500;
}

.message-success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

/* =========================
   教师端：批改进度
   ========================= */

.grading-progress-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.grading-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
}

.grading-progress-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 5px;
}

.grading-progress-count {
    font-size: 14px;
    color: #64748b;
}

.grading-progress-count strong {
    color: #0f172a;
    font-weight: 700;
}

.grading-progress-status {
    font-size: 14px;
    color: #64748b;
    white-space: nowrap;
}

.grading-progress-status strong {
    color: #0f172a;
    font-weight: 700;
}

.grading-complete {
    font-weight: 600;
    color: #15803d;
}

.grading-progress-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.grading-progress-bar {
    height: 100%;
    background: #2563eb;
    border-radius: 999px;
    transition: width 0.25s ease;
}

/* 小屏幕适配 */

@media (max-width: 640px) {
    .grading-progress-card {
        padding: 18px;
    }

    .grading-progress-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}


/* =========================
   教师端：提交浏览导航
   ========================= */

.submission-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.submission-navigation-side {
    display: flex;
    align-items: center;
}

.submission-navigation-right {
    justify-content: flex-end;
}

.submission-navigation-current {
    text-align: center;
    color: #0f172a;
    white-space: nowrap;
}

.submission-navigation-current strong {
    font-weight: 700;
}

.submission-navigation-current span {
    color: #64748b;
}

.submission-navigation-disabled {
    color: #94a3b8;
    font-size: 14px;
}

/* 小屏幕 */

@media (max-width: 640px) {
    .submission-navigation {
        grid-template-columns: 1fr 1fr;
    }

    .submission-navigation-current {
        grid-column: 1 / -1;
        grid-row: 1;
    }
}

/* =========================
   教师端：批改任务分发
   ========================= */


/* ---------- 提交列表复选框 ---------- */

.teacher-page .recent-submission-item:has(
    .grading-assignment-checkbox
) {
    grid-template-columns:
        24px
        minmax(0, 1fr)
        auto
        auto
        auto;
}

.grading-assignment-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grading-assignment-checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;

    cursor: pointer;

    accent-color: #2563eb;
}


/* ---------- 批改任务分配区域 ---------- */

.grading-assignment-controls {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 20px;
    padding-top: 20px;

    border-top: 1px solid #e5e7eb;
}

.grading-assignment-controls label {
    color: #374151;

    font-size: 14px;
    font-weight: 600;

    white-space: nowrap;
}

.grading-assignment-controls select {
    min-width: 180px;
    height: 40px;

    padding: 0 36px 0 12px;

    background: #ffffff;
    color: #374151;

    border: 1px solid #d1d5db;
    border-radius: 7px;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    cursor: pointer;
}

.grading-assignment-controls select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}


/* ---------- 移动端 ---------- */

@media (max-width: 640px) {

    .teacher-page .recent-submission-item:has(
        .grading-assignment-checkbox
    ) {
        grid-template-columns: 24px minmax(0, 1fr);
        gap: 10px 12px;
    }

    .grading-assignment-checkbox {
        align-self: start;
        padding-top: 3px;
    }

    .grading-assignment-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .grading-assignment-controls select,
    .grading-assignment-controls .button {
        width: 100%;
    }
}

/* =========================
   教师端：评分权限状态
   ========================= */


/* ---------- 评分区域标题 ---------- */

.grading-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 24px;
}

.grading-section-header .section-title {
    margin-bottom: 6px;
}


/* ---------- 只读评分区域 ---------- */

.readonly-grading {
    margin-top: 8px;
}

.readonly-grading-value {
    min-height: 44px;

    display: flex;
    align-items: center;

    padding: 10px 12px;

    background: #f8fafc;
    color: #374151;

    border: 1px solid #e5e7eb;
    border-radius: 7px;

    font-size: 15px;
    line-height: 1.6;
}

.readonly-grading-feedback {
    min-height: 120px;

    padding: 14px 16px;

    background: #f8fafc;
    color: #374151;

    border: 1px solid #e5e7eb;
    border-radius: 7px;

    font-size: 15px;
    line-height: 1.7;
}

.readonly-grading-feedback p {
    margin-top: 0;
}

.readonly-grading-feedback p:last-child {
    margin-bottom: 0;
}


/* ---------- 移动端 ---------- */

@media (max-width: 640px) {

    .grading-section-header {
        gap: 12px;
    }

    .readonly-grading-feedback {
        min-height: 100px;
    }
}