body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, .14), transparent 34%),
        linear-gradient(135deg, #f8fbff 0%, #eef5ff 45%, #f8fafc 100%);
    color: #172033;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.layout-shell {
    display: flex;
    min-height: 100vh;
}

.mobile-admin-bar,
.mobile-menu-backdrop,
.mobile-menu-close {
    display: none;
}

.sidebar {
    position: sticky;
    top: 0;
    width: 248px;
    height: 100vh;
    background:
        linear-gradient(180deg, rgba(30, 64, 175, .94) 0%, rgba(15, 23, 42, .98) 72%),
        #0f172a;
    color: #fff;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(147, 197, 253, .24);
    box-shadow: 10px 0 35px rgba(15, 23, 42, .12);
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
}

.sidebar-brand-text {
    min-width: 0;
}

.sidebar-brand-text span {
    overflow-wrap: normal;
}

.sidebar-brand-text span,
.sidebar-brand-text small {
    display: block;
    white-space: nowrap;
}

.sidebar-brand-text small {
    margin-top: 2px;
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-logo,
.site-logo {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px;
    max-height: 30px;
    border-radius: 7px;
    flex: 0 0 auto;
    object-fit: contain;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    color: #dbeafe;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 700;
    line-height: 1.2;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.sidebar .nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(191, 219, 254, .58);
    flex: 0 0 auto;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(191, 219, 254, .22);
    color: #fff;
}

.sidebar .nav-link:hover {
    transform: translateX(2px);
}

.sidebar .nav-link.active .nav-dot {
    background: #38bdf8;
    box-shadow: 0 0 0 5px rgba(56, 189, 248, .16);
}

.sidebar-logout {
    margin-top: auto;
}

.main-content,
.public-shell {
    flex: 1;
    padding: 28px;
    min-width: 0;
}

.public-shell:has(.site-home) {
    padding: 0;
}

.public-shell:has(.admin-login-page) {
    padding: 0;
}

.login-card,
.password-card {
    max-width: 460px;
    margin: 70px auto 0;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 22px;
}

.page-heading h1 {
    color: #0f172a;
    font-weight: 900;
    letter-spacing: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 14px;
}

.stat-card {
    overflow: hidden;
}

.stat-card .card-body {
    position: relative;
    padding: 18px;
}

.stat-card .card-body::after {
    content: "";
    position: absolute;
    right: -22px;
    top: -24px;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .09);
}

.stat-card:nth-child(2) .card-body::after {
    background: rgba(16, 185, 129, .1);
}

.stat-card:nth-child(3) .card-body::after {
    background: rgba(245, 158, 11, .12);
}

.stat-card:nth-child(4) .card-body::after {
    background: rgba(139, 92, 246, .1);
}

.stat-card:nth-child(5) .card-body::after {
    background: rgba(6, 182, 212, .12);
}

.stat-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.stat-value {
    margin-top: 8px;
    color: #0f172a;
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
}

.table-actions {
    white-space: nowrap;
}

.table-actions,
.card-header .table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-loading {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    background: rgba(248, 250, 252, .62);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.page-loading.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.page-loading-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 168px;
    padding: 14px 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(148, 163, 184, .3);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
    color: #1e293b;
    font-weight: 800;
}

.page-loading-spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    animation: page-loading-spin .75s linear infinite;
}

.page-loading-text {
    font-size: 14px;
}

@keyframes page-loading-spin {
    to { transform: rotate(360deg); }
}

.table-actions form {
    display: inline-flex;
    margin: 0 4px 0 0;
    vertical-align: middle;
}

.table-actions form:last-child {
    margin-right: 0;
}

.table-actions .btn {
    margin-right: 4px;
    padding: 0.25rem 0.65rem;
    font-size: 0.8125rem;
}

.table-actions .btn:last-child {
    margin-right: 0;
}

.table-responsive {
    border-radius: 0 0 8px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
    min-width: max-content;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.card {
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    border-color: rgba(147, 197, 253, .78);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
}

.card-header {
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    border-bottom: 1px solid #e8eef7;
    font-weight: 800;
    color: #172033;
    padding: 16px 20px;
}

.card-body {
    padding: 20px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #dbe4f0;
    font-weight: 800;
    color: #475569;
    font-size: 0.875rem;
    letter-spacing: 0;
    padding: 14px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    word-break: keep-all;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #2563eb;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn {
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
}

/* 旧的alert样式已删除 */

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.625rem 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-check-label {
    color: #4b5563;
}

.alert {
    border-radius: 8px;
    border: none;
    padding: 14px 20px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

.app-toast {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 10050;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: min(420px, calc(100vw - 32px));
    padding: 14px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
    animation: appToastIn .22s ease-out;
    user-select: none;
}

.app-toast[data-copyable="1"] {
    cursor: pointer;
}

.app-toast.is-hiding {
    animation: appToastOut .24s ease-in forwards;
}

.app-toast-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.app-toast-text {
    min-width: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.app-toast-close {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 6px;
}

.app-toast-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.app-toast.is-copied {
    border-color: #38bdf8;
}

.app-toast-success .app-toast-icon {
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34,197,94,.14);
}

.app-toast-success {
    background: #f0fdf4;
    border-color: #86efac;
}

.app-toast-success .app-toast-text {
    color: #166534;
}

.app-toast-danger .app-toast-icon {
    background: #ef4444;
    box-shadow: 0 0 0 5px rgba(239,68,68,.14);
}

.app-toast-danger {
    background: #fef2f2;
    border-color: #fca5a5;
}

.app-toast-danger .app-toast-text {
    color: #991b1b;
}

.app-toast-warning .app-toast-icon {
    background: #f59e0b;
    box-shadow: 0 0 0 5px rgba(245,158,11,.14);
}

.app-toast-warning {
    background: #fffbeb;
    border-color: #fcd34d;
}

.app-toast-warning .app-toast-text {
    color: #92400e;
}

.app-toast-info .app-toast-icon {
    background: #3b82f6;
    box-shadow: 0 0 0 5px rgba(59,130,246,.14);
}

.app-toast-info {
    background: #eff6ff;
    border-color: #93c5fd;
}

.app-toast-info .app-toast-text {
    color: #1e40af;
}

@keyframes appToastIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes appToastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

body.modal-open {
    overflow: hidden;
}

.border-bottom {
    border-bottom: 1px solid #e5e7eb;
}

.simple-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    overflow: hidden;
}

.simple-modal.show {
    display: flex;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.simple-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.simple-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 1;
}

.h-100 {
    height: 100%;
}

.btn-outline-secondary {
    border-color: #94a3b8;
    color: #475569;
    background: #fff;
}

.semester-toolbar .card-body {
    padding-top: 14px;
    padding-bottom: 14px;
}

.semester-toolbar {
    background: rgba(255, 255, 255, .88);
}

.semester-toolbar .small {
    color: #64748b !important;
    font-weight: 800;
}

.semester-toolbar form {
    min-width: min(100%, 260px);
}

.semester-select {
    min-width: 260px;
}

.fw-bold {
    font-weight: 700;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-2 {
    gap: .5rem;
}

.evaluate-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 32px;
    width: 100%;
    box-sizing: border-box;
    container-type: inline-size;
}

.evaluate-card {
    overflow: hidden;
    width: 100%;
}

.evaluate-card-body {
    padding: 28px;
    width: 100%;
    min-width: 0;
}

.evaluate-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.evaluate-header h1,
.evaluate-header p {
    overflow-wrap: anywhere;
}

.evaluate-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.dimension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 22px;
    margin-bottom: 20px;
}

.dimension-card {
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    min-width: 0;
}

.dimension-title {
    font-size: 16px;
    font-weight: 700;
}

.rating-group {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.rating-option {
    position: relative;
    cursor: pointer;
}

.rating-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    padding: 12px 6px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-weight: 600;
    white-space: nowrap;
    transition: all .2s ease;
}

.rating-option input:checked + span {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.rating-option:hover span {
    border-color: #2563eb;
}

.evaluate-submit {
    min-width: 160px;
}

.teacher-evaluation-area {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.teacher-empty-state {
    padding: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
}

.evaluate-notice {
    max-width: 720px;
    margin: min(12vh, 90px) auto 0;
    padding: 34px;
    border-radius: 8px;
    border: 1px solid rgba(191, 219, 254, .9);
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .96), rgba(255, 255, 255, .98));
    box-shadow: 0 22px 55px rgba(15, 23, 42, .12);
    text-align: center;
}

.evaluate-notice-mark {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 28px;
    font-weight: 900;
}

.evaluate-notice-danger .evaluate-notice-mark {
    background: #fee2e2;
    color: #dc2626;
}

.evaluate-notice h1 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    letter-spacing: 0;
}

.evaluate-notice p {
    max-width: 560px;
    margin: 0 auto;
    color: #475569;
    font-size: 16px;
    line-height: 1.7;
}

.evaluate-notice-code {
    display: inline-flex;
    max-width: 100%;
    margin-top: 18px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.evaluate-notice-actions {
    margin-top: 24px;
}

.teacher-evaluation-summary {
    padding: 12px 14px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

.teacher-evaluation-card {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    min-width: 0;
}

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

.teacher-evaluation-kicker {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 4px;
}

.teacher-evaluation-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.teacher-evaluation-meta {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.site-home {
    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow: hidden;
    container-type: inline-size;
    background:
        linear-gradient(90deg, rgba(11, 31, 63, .88), rgba(11, 31, 63, .58)),
        url("home-hero.png");
    background-size: cover;
    background-position: center;
}

.admin-login-page {
    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow: hidden;
    container-type: inline-size;
    background:
        linear-gradient(90deg, rgba(11, 31, 63, .9), rgba(11, 31, 63, .62)),
        url("home-hero.png");
    background-size: cover;
    background-position: center;
}

@container (max-width: 620px) {
    .evaluate-shell {
        padding: 0;
    }

    .evaluate-card-body {
        padding: 18px;
    }

    .evaluate-notice {
        margin-top: 20px;
        padding: 24px 18px;
    }

    .evaluate-header {
        display: block;
    }

    .evaluate-header h1 {
        font-size: 22px;
        line-height: 1.35;
    }

    .dimension-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .teacher-evaluation-card {
        padding: 16px;
    }

    .teacher-evaluation-head {
        display: block;
    }

    .teacher-evaluation-meta {
        display: inline-flex;
        margin-top: 10px;
        white-space: normal;
    }

    .rating-group {
        gap: 8px;
    }

    .rating-option span {
        padding: 10px 4px;
        font-size: 13px;
    }

    .evaluate-submit {
        width: 100%;
    }
}

.site-home-nav {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px clamp(18px, 5vw, 72px);
}

.site-home-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
}

.site-home-brand:hover {
    color: #fff;
}

.site-admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.28);
    backdrop-filter: blur(8px);
    font-weight: 700;
}

.site-admin-link:hover {
    color: #fff;
    background: rgba(255,255,255,.22);
}

.site-home-hero {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 98px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
    padding: 28px clamp(18px, 5vw, 72px) 72px;
}

.site-home-copy {
    max-width: 660px;
    color: #fff;
}

.site-home-kicker {
    display: inline-flex;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.site-home-copy h1 {
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.04;
    font-weight: 900;
    margin: 0 0 22px;
    letter-spacing: 0;
}

.site-home-copy p {
    max-width: 560px;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255,255,255,.84);
    margin: 0;
}

.student-entry-panel {
    width: 100%;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(255,255,255,.52);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.admin-login-hero {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 98px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
    padding: 28px clamp(18px, 5vw, 72px) 72px;
}

.admin-login-copy {
    max-width: 660px;
    color: #fff;
}

.admin-login-copy h1 {
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.08;
    font-weight: 900;
    margin: 0 0 22px;
    letter-spacing: 0;
}

.admin-login-copy p {
    max-width: 560px;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255,255,255,.84);
    margin: 0;
}

.admin-login-panel {
    width: 100%;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.admin-login-panel h2 {
    font-size: 26px;
    font-weight: 900;
    margin: 0 0 22px;
    color: #0f172a;
}

.admin-login-panel .form-control {
    height: 48px;
}

.admin-login-panel .btn {
    height: 48px;
}

.admin-login-hint {
    margin-top: 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}

.entry-panel-label {
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 10px;
}

.student-entry-panel h2 {
    font-size: 26px;
    font-weight: 900;
    margin: 0 0 20px;
    color: #0f172a;
}

.student-code-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.student-code-form .form-control {
    height: 48px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.student-code-form .btn {
    min-width: 118px;
}

.entry-hint {
    margin-top: 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}

@container (max-width: 760px) {
    .site-home-nav {
        padding: 18px;
    }

    .site-home-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 44px 18px 46px;
    }

    .site-home-copy h1 {
        font-size: 40px;
    }

    .site-home-copy p {
        font-size: 16px;
    }

    .student-entry-panel {
        padding: 22px;
    }

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

    .student-code-form .btn {
        width: 100%;
        height: 46px;
    }
}

@media (max-width: 768px) {
    body {
        background: #f8fbff;
    }

    .layout-shell {
        display: block;
        min-height: 100vh;
        padding-top: 64px;
    }

    .mobile-admin-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 64px;
        padding: 10px 14px;
        background:
            linear-gradient(135deg, rgba(30, 64, 175, .96), rgba(15, 23, 42, .98)),
            #0f172a;
        color: #fff;
        border-bottom: 1px solid rgba(147, 197, 253, .28);
        box-shadow: 0 10px 26px rgba(15, 23, 42, .16);
    }

    .mobile-admin-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .mobile-menu-toggle,
    .mobile-menu-close {
        appearance: none;
        border: 1px solid rgba(255, 255, 255, .22);
        background: rgba(255, 255, 255, .12);
        color: #fff;
        border-radius: 8px;
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
    }

    .mobile-menu-toggle {
        flex-direction: column;
        gap: 5px;
    }

    .mobile-menu-toggle span {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #fff;
    }

    .mobile-menu-close {
        margin-left: auto;
        font-size: 24px;
        line-height: 1;
    }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1035;
        display: block;
        border: 0;
        padding: 0;
        background: rgba(15, 23, 42, .48);
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1040;
        width: min(86vw, 320px);
        height: 100vh;
        min-height: 100vh;
        padding: 14px;
        border-right: 1px solid rgba(147, 197, 253, .24);
        border-bottom: 0;
        box-shadow: 18px 0 40px rgba(15, 23, 42, .22);
        transform: translateX(-105%);
        transition: transform .24s ease;
    }

    .sidebar-brand {
        min-height: 48px;
        margin-bottom: 14px;
    }

    .sidebar-nav {
        display: grid;
        gap: 6px;
        overflow: visible;
        padding-bottom: 0;
    }

    .sidebar .nav-link {
        min-height: 42px;
        width: 100%;
        white-space: normal;
        flex: none;
        padding: 10px 12px;
    }

    .sidebar .nav-link:hover {
        transform: none;
    }

    .sidebar-logout {
        margin-top: 8px;
        width: 100%;
        justify-content: flex-start;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    body.mobile-menu-open .sidebar {
        transform: translateX(0);
    }

    body.mobile-menu-open .mobile-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .page-heading {
        display: flex;
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 16px;
    }

    .page-heading .table-actions,
    .page-heading form,
    .page-heading .btn {
        width: 100%;
    }

    .card-header {
        padding: 14px;
    }

    .card-header.d-flex {
        align-items: stretch !important;
        flex-direction: column;
        gap: 10px;
    }

    .card-header .table-actions,
    .table-actions {
        width: 100%;
        white-space: normal;
    }

    .table-actions .btn,
    .table-actions button,
    .table-actions a {
        flex: 1 1 auto;
        min-width: 0;
    }

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

    .stat-card .card-body {
        padding: 14px;
    }

    .stat-value {
        font-size: 28px;
    }

    .semester-select {
        min-width: 0;
        width: 100%;
    }

    .semester-toolbar .card-body,
    .semester-toolbar form {
        width: 100%;
    }

    .semester-toolbar form {
        align-items: stretch !important;
    }

    .table thead th,
    .table tbody td {
        padding: 12px;
        max-width: 260px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .table thead th {
        white-space: nowrap;
    }

    .simple-modal {
        align-items: flex-start;
        padding: 12px;
    }

    .simple-modal-dialog {
        max-width: none !important;
        max-height: calc(100vh - 24px);
    }

    .simple-modal-dialog .card-header {
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .copy-link-group {
        min-width: 0;
        width: 100%;
        flex-wrap: wrap;
    }

    .copy-link-group .form-control,
    .copy-link-group .btn {
        width: 100% !important;
    }

    .app-toast {
        top: 12px;
        left: 12px;
        right: 12px;
        width: auto;
    }

    .main-content,
    .public-shell {
        padding: 12px;
    }

    .evaluate-shell {
        padding: 0;
    }

    .evaluate-card-body {
        padding: 18px;
    }

    .evaluate-notice {
        margin-top: 10px;
        padding: 22px 16px;
    }

    .evaluate-header {
        display: block;
    }

    .evaluate-header h1 {
        font-size: 22px;
        line-height: 1.35;
    }

    .dimension-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .rating-group {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }

    .rating-option span {
        width: 100%;
        min-width: 0;
        padding: 10px 4px;
        font-size: 13px;
    }

    .evaluate-submit {
        width: 100%;
    }

    .site-home {
        min-height: 100vh;
    }

    .admin-login-page {
        min-height: 100vh;
    }

    .site-home-nav {
        padding: 18px;
    }

    .site-home-brand {
        font-size: 16px;
    }

    .site-admin-link {
        min-height: 36px;
        padding: 0 13px;
        font-size: 13px;
    }

    .site-home-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 44px 18px 46px;
    }

    .admin-login-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 44px 18px 46px;
    }

    .site-home-copy h1 {
        font-size: 40px;
    }

    .admin-login-copy h1 {
        font-size: 38px;
    }

    .site-home-copy p {
        font-size: 16px;
    }

    .admin-login-copy p {
        font-size: 16px;
    }

    .student-entry-panel {
        padding: 22px;
    }

    .admin-login-panel {
        padding: 22px;
    }

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

    .student-code-form .btn {
        width: 100%;
        height: 46px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-brand-text small {
        display: none;
    }

    .sidebar .nav-link {
        font-size: 13px;
        padding: 10px 12px;
    }

    .evaluate-shell {
        padding: 0;
    }

    .rating-group {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .dimension-card {
        padding: 14px;
    }

    .dimension-title {
        font-size: 15px;
    }
}

.analysis-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.analysis-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #dbe3f0;
    border-radius: 999px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
}

.analysis-tab.active,
.analysis-tab:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.analysis-panel {
    display: none;
}

.analysis-panel.active {
    display: block;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.chart-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 12px;
}

.chart-legend-label {
    color: #475569;
    line-height: 1.6;
    word-break: break-all;
}

.chart-helper-text {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.analysis-filter-form {
    margin: 0;
}

.analysis-filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.analysis-selected-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.copy-link-group {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 280px;
    max-width: 100%;
}

.import-panel {
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.import-panel .form-control {
    background: #fff;
}

.import-panel-hint {
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}

.import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 14px 0;
    margin: 4px 0 14px;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
}

.import-inline-options {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.import-inline-status {
    flex: 1 1 160px;
}

.import-inline-status .form-label {
    display: block;
    font-size: 13px;
}

.import-inline-status .form-select {
    width: auto;
    min-width: 120px;
}

.import-manual-title {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.import-cards {
    display: grid;
    gap: 12px;
}

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

.import-card-grid.cols-4 {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) 100px 96px;
}

@media (max-width: 640px) {
    .import-card-grid,
    .import-card-grid.cols-4 {
        grid-template-columns: 1fr;
    }

    .import-actions .btn {
        width: 100%;
    }

    .import-inline-options {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .import-inline-status,
    .import-inline-status .form-select {
        width: 100%;
    }
}

.copy-link-group .form-control {
    min-width: 0;
}

.batch-link-input {
    width: 180px;
    max-width: 100%;
}

.setup-guide-card {
    border-color: rgba(37, 99, 235, .28);
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.setup-wizard-flow {
    min-width: 0;
}

.setup-wizard-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.setup-wizard-steps {
    position: sticky;
    top: 14px;
    display: grid;
    gap: 10px;
}

.setup-step-button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas:
        "num title"
        "num note";
    align-items: center;
    gap: 2px 10px;
    min-height: 68px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    text-align: left;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.setup-step-button span {
    grid-area: num;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 900;
}

.setup-step-button strong {
    grid-area: title;
    font-size: 14px;
    color: #0f172a;
}

.setup-step-button small {
    grid-area: note;
    color: #64748b;
    line-height: 1.35;
}

.setup-step-button.is-active {
    border-color: #2563eb;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.setup-step-button.is-active span,
.setup-step-button.is-done span {
    background: #2563eb;
    color: #fff;
}

.setup-wizard-main {
    min-width: 0;
}

.wizard-card {
    display: none;
    min-width: 0;
}

.wizard-card.is-active {
    display: block;
}

.wizard-card .card-header {
    align-items: center;
}

.wizard-step-kicker {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 2px;
}

.wizard-step-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.wizard-section-title {
    margin: 12px 0 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.wizard-grade-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.wizard-grade-strip strong,
.wizard-grade-strip span {
    display: block;
}

.wizard-grade-strip strong {
    color: #0f172a;
    font-size: 13px;
    margin-bottom: 4px;
}

.wizard-grade-strip span {
    color: #475569;
    font-size: 13px;
}

.wizard-grade-table-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.wizard-grade-table th,
.wizard-grade-table td {
    vertical-align: middle;
}

.wizard-grade-table th:first-child,
.wizard-grade-table td:first-child {
    width: 120px;
}

.wizard-grade-table th:nth-child(3),
.wizard-grade-table td:nth-child(3) {
    width: 140px;
}

.wizard-grade-table th:last-child,
.wizard-grade-table td:last-child {
    width: 90px;
}

.wizard-dimension-check {
    display: flex;
    gap: 10px;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}

.wizard-dimension-check .form-check-label strong,
.wizard-dimension-check .form-check-label small {
    display: block;
}

.wizard-dimension-check .form-check-label small {
    color: #64748b;
    margin-top: 4px;
}

.wizard-footer-card .card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wizard-footer-title {
    color: #0f172a;
    font-weight: 900;
    margin-bottom: 4px;
}

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

.wizard-card .batch-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
}

.wizard-card .batch-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.wizard-card .batch-card-num {
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
}

.wizard-card .btn-remove-card {
    border: 0;
    background: #fff;
    color: #64748b;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    line-height: 1;
}

.wizard-card .btn-remove-card:hover {
    background: #fee2e2;
    color: #dc2626;
}

@media (max-width: 768px) {
    .analysis-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .setup-wizard-shell {
        grid-template-columns: 1fr;
    }

    .setup-wizard-steps {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        padding-bottom: 0;
    }

    .setup-step-button {
        min-width: 0;
        width: 100%;
        min-height: 64px;
        padding: 10px;
    }

    .setup-step-button small {
        display: none;
    }

    .wizard-grade-strip,
    .wizard-footer-card .card-body {
        align-items: stretch;
        flex-direction: column;
    }

    .wizard-grade-strip .btn,
    .wizard-footer-actions,
    .wizard-footer-actions .btn {
        width: 100%;
    }

    .copy-link-group {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .setup-wizard-steps {
        grid-template-columns: 1fr;
    }
}
