@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&family=Noto+Serif+SC:wght@600;700;900&display=swap');

/* =============================================================
   真菌学作业提交平台 · 森林秘境主题
   ============================================================= */

:root {
    /* 松林绿 */
    --pine-950: #0e2118;
    --pine-900: #122a20;
    --pine-800: #1b3a2e;
    --pine-700: #234d3c;
    --pine-600: #2f634d;
    --moss-500: #3f7d5b;
    --moss-400: #5b9c77;
    --sage: #93b39a;
    /* 纸张 / 大地 */
    --cream: #f5f1e6;
    --paper: #fdfbf3;
    --sand: #ece4d0;
    --line: #e0d9c4;
    /* 点缀 */
    --amber: #dd8f2c;
    --amber-soft: #f3c878;
    --chanterelle: #efb35c;
    --rust: #c05a38;
    --grape: #7e5ba0;
    /* 文字 */
    --ink: #223028;
    --ink-soft: #58665c;
    --ink-faint: #8b968c;
    /* 几何 */
    --r-lg: 22px;
    --r-md: 14px;
    --r-sm: 10px;
    --shadow-sm: 0 2px 8px rgba(18, 42, 32, .07);
    --shadow-md: 0 10px 30px -8px rgba(18, 42, 32, .18);
    --shadow-lg: 0 26px 60px -18px rgba(14, 33, 24, .35);
    --shadow-glow: 0 0 0 4px rgba(63, 125, 91, .14);
    --ease: cubic-bezier(.22, .9, .3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Noto Sans SC', -apple-system, 'Segoe UI', 'PingFang SC',
                 'Microsoft YaHei', sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Noto Serif SC', 'Noto Sans SC', serif;
    line-height: 1.3;
    margin: 0 0 .5em;
    color: var(--pine-900);
    font-weight: 700;
}

a { color: var(--pine-600); text-decoration: none; transition: color .2s; }
a:hover { color: var(--moss-500); }

p { margin: 0 0 .8em; }

::selection { background: var(--amber-soft); color: var(--pine-950); }

.container {
    width: min(1140px, calc(100% - 40px));
    margin-inline: auto;
}

/* -------------------------------------------------------------
   导航
   ------------------------------------------------------------- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(245, 241, 230, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(224, 217, 196, .8);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: 'Noto Serif SC', serif;
    font-weight: 900;
    font-size: 19px;
    color: var(--pine-900);
}
.brand:hover { color: var(--pine-900); }

.brand .logo-badge {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: linear-gradient(140deg, var(--pine-700), var(--moss-500));
    box-shadow: var(--shadow-sm);
    flex: none;
}
.brand .logo-badge svg { width: 24px; height: 24px; }

.brand small {
    display: block;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 2.5px;
    color: var(--ink-faint);
    margin-top: -2px;
}

.nav-links {
    display: flex;
    gap: 4px;
    margin-left: auto;
    align-items: center;
}
.nav-links a {
    padding: 8px 15px;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 14.5px;
    font-weight: 500;
}
.nav-links a:hover { background: rgba(63, 125, 91, .1); color: var(--pine-700); }
.nav-links a.active { background: var(--pine-800); color: #f4f0e2; }

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

.btn {
    --btn-bg: var(--pine-800);
    --btn-fg: #f6f2e6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    transition: transform .18s var(--ease), box-shadow .18s, background .18s;
    white-space: nowrap;
    line-height: 1.2;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }

.btn-lg { padding: 14px 30px; font-size: 15.5px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.btn-accent { --btn-bg: linear-gradient(135deg, var(--amber), #e9a94c); --btn-fg: #3a2205; }
.btn-accent:hover { --btn-fg: #3a2205; }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--pine-700); border-color: var(--line); }
.btn-ghost:hover { --btn-fg: var(--pine-800); background: rgba(63, 125, 91, .07); }
.btn-soft { --btn-bg: rgba(63, 125, 91, .12); --btn-fg: var(--pine-700); }
.btn-soft:hover { --btn-fg: var(--pine-800); }
.btn-danger { --btn-bg: #f6e4dd; --btn-fg: var(--rust); }
.btn-danger:hover { --btn-fg: #fff; --btn-bg: var(--rust); }
.btn-outline-danger { --btn-bg: transparent; --btn-fg: var(--rust); border-color: #e3bbb0; }
.btn-outline-danger:hover { --btn-bg: var(--rust); --btn-fg: #fff; }

.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* -------------------------------------------------------------
   英雄区
   ------------------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1100px 520px at 85% -20%, rgba(240, 179, 92, .28), transparent 60%),
        radial-gradient(900px 600px at -10% 110%, rgba(126, 97, 160, .22), transparent 55%),
        linear-gradient(150deg, var(--pine-950) 0%, var(--pine-800) 55%, var(--pine-700) 100%);
    color: #efe9d8;
    padding: 88px 0 100px;
}

.hero .container { position: relative; z-index: 2; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(243, 200, 120, .14);
    border: 1px solid rgba(243, 200, 120, .35);
    color: var(--amber-soft);
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 24px;
}
.hero-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber-soft); }

.hero h1 {
    color: #fbf7ea;
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 18px;
    max-width: 760px;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--chanterelle), var(--amber-soft));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.lead {
    font-size: 17px;
    font-weight: 300;
    color: rgba(239, 233, 216, .82);
    max-width: 600px;
    margin-bottom: 34px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-accent { box-shadow: 0 12px 30px -8px rgba(221, 143, 44, .55); }
.hero .btn-ghost {
    --btn-fg: #efe9d8;
    border-color: rgba(239, 233, 216, .35);
}
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .08); }

.hero-stats {
    display: flex;
    gap: 42px;
    margin-top: 54px;
    flex-wrap: wrap;
}
.hero-stats .num {
    font-family: 'Noto Serif SC', serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--amber-soft);
}
.hero-stats .cap { font-size: 13px; color: rgba(239, 233, 216, .6); letter-spacing: 1px; }

/* 漂浮装饰 */
.hero-decor { position: absolute; inset: 0; pointer-events: none; }
.spore {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(243, 200, 120, .8), rgba(243, 200, 120, 0) 70%);
    opacity: .5;
    animation: floaty 9s ease-in-out infinite;
}
.spore.s1 { width: 14px; height: 14px; top: 22%; left: 64%; }
.spore.s2 { width: 9px; height: 9px; top: 60%; left: 78%; animation-delay: -3s; }
.spore.s3 { width: 20px; height: 20px; top: 34%; left: 90%; animation-delay: -5s; }
.spore.s4 { width: 8px; height: 8px; top: 72%; left: 58%; animation-delay: -1.5s; }

.hero-mushroom {
    position: absolute;
    right: -30px;
    bottom: -70px;
    width: 380px;
    opacity: .13;
    transform: rotate(-12deg);
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

/* -------------------------------------------------------------
   区块与标题
   ------------------------------------------------------------- */

.section { padding: 74px 0; }
.section-tight { padding: 46px 0; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 34px;
    flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(25px, 3vw, 33px); margin: 0; }
.section-head .sub {
    color: var(--ink-soft);
    font-size: 14.5px;
    margin-top: 6px;
}

.kicker {
    display: inline-block;
    font-size: 12.5px;
    letter-spacing: 3px;
    font-weight: 700;
    color: var(--moss-500);
    margin-bottom: 10px;
}

/* -------------------------------------------------------------
   卡片 / 课程网格
   ------------------------------------------------------------- */

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}

.course-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #cfc6aa;
}

.course-cover {
    position: relative;
    height: 126px;
    padding: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--pine-700), var(--moss-500));
    color: #f3eedd;
    overflow: hidden;
}
.course-cover::after {
    content: '';
    position: absolute;
    right: -40px; bottom: -55px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243, 200, 120, .35), transparent 70%);
}
.course-cover .cc-icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
}
.course-cover .cc-icon svg { width: 26px; height: 26px; }

.course-cover .cc-term {
    font-size: 12.5px;
    letter-spacing: 1.5px;
    background: rgba(0, 0, 0, .22);
    padding: 5px 12px;
    border-radius: 999px;
}

.course-body { padding: 22px 22px 18px; flex: 1; display: flex; flex-direction: column; }
.course-body h3 { font-size: 26px; margin-bottom: 4px; color: var(--rust); }
.course-code { font-size: 12.5px; color: var(--ink-faint); letter-spacing: 1px; margin-bottom: 12px; }
.course-desc {
    font-size: 13.5px;
    color: var(--ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 18px;
}

.course-meta {
    display: flex;
    gap: 16px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
}
.course-meta .m {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ink-soft);
}
.course-meta .m svg { width: 15px; height: 15px; color: var(--moss-500); }

.course-foot { padding: 0 22px 22px; }
.course-foot .btn { width: 100%; }

/* -------------------------------------------------------------
   作业行 / 状态
   ------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.5;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-open { background: rgba(63, 125, 91, .13); color: var(--moss-500); }
.badge-upcoming { background: rgba(221, 143, 44, .14); color: #b5741f; }
.badge-closed { background: rgba(120, 130, 122, .14); color: #77807a; }
.badge-done { background: rgba(63, 125, 91, .13); color: var(--moss-500); }
.badge-todo { background: rgba(192, 90, 56, .12); color: var(--rust); }
.badge-off { background: rgba(120, 130, 122, .14); color: #77807a; }
.badge-type { background: rgba(126, 97, 160, .12); color: var(--grape); }
.badge-grade { background: rgba(221, 143, 44, .16); color: #a86612; }

.assignment-list { display: grid; gap: 16px; }

.assignment-row {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px 24px;
}
.assignment-row:hover { border-color: #c9c0a4; box-shadow: var(--shadow-md); transform: translateY(-2px); }

.ar-icon {
    width: 52px; height: 52px;
    flex: none;
    display: grid; place-items: center;
    border-radius: 15px;
    background: linear-gradient(140deg, rgba(63, 125, 91, .12), rgba(221, 143, 44, .13));
    color: var(--pine-700);
}
.ar-icon svg { width: 26px; height: 26px; }

.ar-main { flex: 1; min-width: 0; }
.ar-main h3 { font-size: 17.5px; margin-bottom: 6px; }
.ar-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.ar-meta {
    font-size: 12.8px;
    color: var(--ink-faint);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 9px;
}
.ar-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ar-meta svg { width: 13.5px; height: 13.5px; }

.ar-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: none; }

.progress-mini {
    width: 130px;
    height: 6px;
    border-radius: 999px;
    background: var(--sand);
    overflow: hidden;
}
.progress-mini b {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--moss-500), var(--moss-400));
}

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

.input,
.select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: #fffdf6;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { resize: vertical; min-height: 90px; }

.input:focus, .select:focus {
    outline: none;
    border-color: var(--moss-400);
    box-shadow: var(--shadow-glow);
    background: #fff;
}
.input::placeholder { color: #a9b1a6; }

.select { appearance: none; background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2358665c' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }

.field { margin-bottom: 18px; }
.field > label {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--pine-800);
    margin-bottom: 7px;
}
.field .help { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }

.field.has-errors .input,
.field.has-errors .select { border-color: #d98b72; background: #fdf5f1; }
.errorlist {
    list-style: none;
    padding: 0;
    margin: 7px 0 0;
    color: var(--rust);
    font-size: 12.5px;
}
.errorlist li { display: flex; gap: 6px; align-items: center; }
.errorlist li::before { content: '!'; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--rust); color: #fff; font-size: 10px; font-weight: 700; flex: none; }

/* 开关复选框 */
.switch-field { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.switch-input { width: 18px; height: 18px; accent-color: var(--moss-500); cursor: pointer; }
.switch-field label { font-size: 14.5px; font-weight: 500; cursor: pointer; }

.form-card { padding: 30px 32px; }
.form-card.form-narrow { max-width: 720px; margin-inline: auto; }

/* -------------------------------------------------------------
   上传页
   ------------------------------------------------------------- */

.upload-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 26px;
    align-items: start;
}

.info-panel { overflow: hidden; }
.info-head {
    padding: 26px 28px 20px;
    background: linear-gradient(135deg, var(--pine-800), var(--pine-600));
    color: #f2eddd;
}
.info-head h2 { color: #fbf7ea; font-size: 23px; }
.info-head .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.info-head .tags .badge { background: rgba(255, 255, 255, .13); color: #f4efdd; }
.info-head .tags .badge i { background: var(--amber-soft); }
.info-body { padding: 24px 28px 28px; }
.info-body h4 { font-size: 15px; margin: 18px 0 8px; }
.info-body h4:first-child { margin-top: 0; }
.info-body p, .info-body li { font-size: 13.8px; color: var(--ink-soft); }
.info-body ul { padding-left: 20px; margin: 6px 0; }

.time-line { display: grid; gap: 10px; margin: 8px 0 4px; }
.time-line .t {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13.5px;
    color: var(--ink-soft);
}
.time-line svg { width: 16px; height: 16px; color: var(--moss-500); flex: none; }

.student-verified {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: rgba(63, 125, 91, .09);
    border: 1px solid rgba(63, 125, 91, .25);
    margin-bottom: 20px;
    font-size: 14px;
}
.student-verified .v-ico {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--moss-500);
    color: #fff;
    flex: none;
}
.student-verified .v-ico svg { width: 18px; height: 18px; }

.dropzone {
    border: 2px dashed #c8c0a6;
    border-radius: var(--r-md);
    background: #fffdf6;
    padding: 38px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
}
.dropzone:hover, .dropzone.dragover {
    border-color: var(--moss-500);
    background: rgba(63, 125, 91, .05);
}
.dropzone.dragover { transform: scale(1.01); }
.dropzone .dz-ico {
    width: 60px; height: 60px;
    margin: 0 auto 14px;
    border-radius: 18px;
    display: grid; place-items: center;
    background: linear-gradient(140deg, rgba(63, 125, 91, .14), rgba(221, 143, 44, .16));
    color: var(--pine-700);
}
.dropzone .dz-ico svg { width: 30px; height: 30px; }
.dropzone strong { display: block; font-size: 15.5px; color: var(--pine-800); margin-bottom: 4px; }
.dropzone .dz-hint { font-size: 12.5px; color: var(--ink-faint); }

.file-chip {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: var(--r-md);
    background: var(--pine-900);
    color: #efe9d8;
    font-size: 13.5px;
}
.file-chip.show { display: flex; }
.file-chip .fc-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(243, 200, 120, .2); color: var(--amber-soft); flex: none; }
.file-chip .fc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .fc-size { color: var(--amber-soft); font-size: 12px; flex: none; }

.current-box {
    margin-top: 22px;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--sand);
    padding: 18px 20px;
}
.current-box h4 { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.current-box .cb-file {
    display: flex; align-items: center; gap: 10px;
    font-size: 13.5px; color: var(--ink-soft);
}
.current-box .cb-file svg { width: 16px; height: 16px; color: var(--rust); }
.current-box .cb-warn {
    margin-top: 10px; font-size: 12.3px; color: #925512;
    display: flex; gap: 7px; align-items: flex-start;
}
.current-box .cb-warn svg { width: 14px; height: 14px; flex: none; margin-top: 3px; }

.score-line { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-size: 13.5px; flex-wrap: wrap; }

/* -------------------------------------------------------------
   页头（内页）
   ------------------------------------------------------------- */

.page-hero {
    background:
        radial-gradient(700px 300px at 90% -60%, rgba(240, 179, 92, .25), transparent 60%),
        linear-gradient(140deg, var(--pine-900), var(--pine-700));
    color: #efe9d8;
    padding: 52px 0 46px;
}
.page-hero h1 { color: #fbf7ea; font-size: clamp(26px, 3.5vw, 38px); margin-bottom: 8px; }
.page-hero p { color: rgba(239, 233, 216, .75); margin: 0; font-size: 15px; font-weight: 300; }
.page-hero .crumbs { font-size: 12.8px; color: rgba(239, 233, 216, .55); margin-bottom: 14px; }
.page-hero .crumbs a { color: var(--amber-soft); }

/* -------------------------------------------------------------
   空状态 / 查询条
   ------------------------------------------------------------- */

.empty-state {
    text-align: center;
    padding: 70px 24px;
    color: var(--ink-faint);
}
.empty-state .es-ico {
    width: 76px; height: 76px; margin: 0 auto 18px;
    display: grid; place-items: center;
    border-radius: 24px;
    background: var(--sand);
    color: var(--sage);
}
.empty-state .es-ico svg { width: 38px; height: 38px; }
.empty-state h3 { font-size: 18px; color: var(--ink-soft); }

.lookup-bar {
    display: flex;
    gap: 10px;
    max-width: 520px;
}
.lookup-bar .input { flex: 1; }

.panel-light { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 28px; box-shadow: var(--shadow-sm); }

/* -------------------------------------------------------------
   表格
   ------------------------------------------------------------- */

.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--paper); }
table.table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.table th {
    text-align: left;
    font-size: 12.5px;
    letter-spacing: .5px;
    color: var(--ink-faint);
    font-weight: 500;
    background: #faf7ee;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 13px 18px; border-bottom: 1px solid #eee8d8; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #faf7ee; }
.table .cell-main { font-weight: 500; color: var(--pine-900); }
.table .cell-sub { font-size: 12px; color: var(--ink-faint); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table .actions .btn { padding: 6px 11px; }

/* -------------------------------------------------------------
   管理端布局
   ------------------------------------------------------------- */

.shell {
    display: grid;
    grid-template-columns: 264px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, var(--pine-950), var(--pine-900) 40%, var(--pine-800));
    color: #cfd8cd;
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.side-brand {
    display: flex; gap: 11px; align-items: center;
    padding: 4px 10px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 18px;
}
.side-brand .logo-badge {
    width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center;
    background: linear-gradient(140deg, var(--moss-500), var(--pine-600));
}
.side-brand .logo-badge svg { width: 22px; height: 22px; }
.side-brand b { font-family: 'Noto Serif SC', serif; color: #f2eddd; font-size: 15.5px; display: block; }
.side-brand small { font-size: 10.5px; letter-spacing: 2px; color: rgba(207, 216, 205, .5); }

.side-nav { display: grid; gap: 3px; }
.side-nav .nav-label {
    font-size: 11px; letter-spacing: 2px;
    color: rgba(207, 216, 205, .4);
    padding: 14px 12px 5px;
}
.side-nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 13px;
    border-radius: 11px;
    color: rgba(207, 216, 205, .82);
    font-size: 13.8px;
    font-weight: 500;
}
.side-nav a svg { width: 17px; height: 17px; opacity: .85; }
.side-nav a:hover { background: rgba(255, 255, 255, .07); color: #f6f2e6; }
.side-nav a.active { background: linear-gradient(95deg, rgba(63, 125, 91, .9), rgba(47, 99, 77, .9)); color: #f7f3e6; box-shadow: var(--shadow-sm); }

.side-foot { margin-top: auto; display: grid; gap: 12px; }
.user-chip { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--amber), var(--chanterelle));
    color: #3a2205; font-weight: 700; font-size: 14px; flex: none;
}
.user-chip .u-name { font-size: 13.3px; color: #efe9d8; font-weight: 500; }
.user-chip .u-role { font-size: 11px; color: rgba(207, 216, 205, .55); }

.main { padding: 34px 40px 60px; min-width: 0; }

.page-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px; margin-bottom: 28px; flex-wrap: wrap;
}
.page-head h1 { font-size: 27px; margin: 0; }
.page-head .sub { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 32px; }
.stat-card {
    position: relative;
    padding: 22px 24px;
    overflow: hidden;
}
.stat-card .sc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-card .sc-value { font-family: 'Noto Serif SC', serif; font-size: 32px; font-weight: 700; color: var(--pine-900); line-height: 1.1; }
.stat-card .sc-label { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.stat-card .sc-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.stat-card .sc-ico svg { width: 21px; height: 21px; }
.sc-green .sc-ico { background: rgba(63, 125, 91, .13); color: var(--moss-500); }
.sc-amber .sc-ico { background: rgba(221, 143, 44, .14); color: var(--amber); }
.sc-grape .sc-ico { background: rgba(126, 97, 160, .13); color: var(--grape); }
.sc-rust .sc-ico { background: rgba(192, 90, 56, .12); color: var(--rust); }

.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.block-head h2 { font-size: 18px; margin: 0; }

.manage-card { padding: 24px 26px; margin-bottom: 22px; }

/* 课程管理页 - 操作图标按钮组 */
.icon-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.toggle-pill {
    font-size: 12.5px;
    padding: 5px 13px;
}

/* 统计页进度环 */
.stats-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 28px;
}
.ring {
    width: 150px; height: 150px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: conic-gradient(var(--moss-500) calc(var(--p) * 1%), var(--sand) 0);
}
.ring .ring-inner {
    width: 112px; height: 112px;
    border-radius: 50%;
    background: var(--paper);
    display: grid; place-items: center;
    text-align: center;
}
.ring .ring-inner b { font-family: 'Noto Serif SC', serif; font-size: 26px; color: var(--pine-900); display: block; line-height: 1.1; }
.ring .ring-inner span { font-size: 11px; color: var(--ink-faint); }

.stats-nums { display: flex; gap: 14px; flex-wrap: wrap; }
.stats-nums .sn {
    padding: 14px 22px;
    border-radius: var(--r-md);
    background: var(--paper);
    border: 1px solid var(--line);
}
.stats-nums .sn b { font-family: 'Noto Serif SC', serif; font-size: 22px; display: block; }
.stats-nums .sn span { font-size: 12px; color: var(--ink-soft); }
.sn.sn-done b { color: var(--moss-500); }
.sn.sn-todo b { color: var(--rust); }
.sn.sn-total b { color: var(--pine-800); }

/* 评分行内表单 */
.grade-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grade-form .input { width: auto; }
.grade-form .g-score { width: 86px; }
.grade-form .g-comment { width: 220px; }
.grade-form .btn { padding: 9px 14px; }

/* -------------------------------------------------------------
   登录页
   ------------------------------------------------------------- */

.auth-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: var(--pine-950);
}

.auth-aside {
    position: relative;
    overflow: hidden;
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(800px 420px at 120% 0%, rgba(240, 179, 92, .25), transparent 55%),
        radial-gradient(700px 500px at -20% 110%, rgba(126, 97, 160, .3), transparent 55%),
        linear-gradient(160deg, var(--pine-800), var(--pine-950));
    color: #e9e3d1;
}
.auth-aside .brand { color: #f6f2e6; }
.auth-aside h2 {
    color: #fbf7ea;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.45;
}
.auth-aside h2 em { font-style: normal; color: var(--amber-soft); }
.auth-aside p { color: rgba(233, 227, 209, .65); font-size: 14.5px; font-weight: 300; max-width: 420px; }
.auth-aside .aside-foot { font-size: 12px; color: rgba(233, 227, 209, .45); letter-spacing: 1px; }
.auth-mushroom { position: absolute; right: -60px; bottom: -60px; width: 340px; opacity: .15; pointer-events: none; }
.auth-spores .spore { opacity: .8; }
.auth-spores .s1 { top: 20%; left: 70%; }
.auth-spores .s2 { top: 55%; left: 85%; }
.auth-spores .s3 { top: 70%; left: 60%; }

.auth-main {
    display: grid;
    place-items: center;
    background: var(--cream);
    padding: 40px;
}
.auth-card {
    width: min(420px, 100%);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 38px;
}
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .ac-sub { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 28px; }
.auth-card .btn { width: 100%; margin-top: 6px; }
.auth-back {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 22px; font-size: 13px; color: var(--ink-faint);
}
.auth-back:hover { color: var(--pine-700); }

/* -------------------------------------------------------------
   消息提示
   ------------------------------------------------------------- */

.toasts {
    position: fixed;
    top: 84px;
    right: 22px;
    z-index: 200;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 40px));
}
.toast {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 17px;
    border-radius: var(--r-md);
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    font-size: 13.6px;
    animation: toast-in .35s var(--ease);
    position: relative;
    overflow: hidden;
}
.toast .t-ico { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.toast .t-close {
    margin-left: auto;
    border: none; background: none; color: var(--ink-faint);
    cursor: pointer; font-size: 16px; padding: 0 2px; flex: none;
}
.toast-success { border-left: 4px solid var(--moss-500); }
.toast-error { border-left: 4px solid var(--rust); }
.toast-warning { border-left: 4px solid var(--amber); }
.toast-info { border-left: 4px solid var(--sage); }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
.toast.closing { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-out {
    to { opacity: 0; transform: translateX(30px); }
}

/* -------------------------------------------------------------
   页脚
   ------------------------------------------------------------- */

.site-footer {
    background: var(--pine-950);
    color: rgba(207, 216, 205, .6);
    padding: 46px 0 34px;
    font-size: 13px;
}
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: center; }
.site-footer .brand { color: #f2eddd; }
.site-footer .brand small { color: rgba(207, 216, 205, .5); }
.footer-note { text-align: right; }
.footer-note span { display: block; }

/* -------------------------------------------------------------
   动效工具类
   ------------------------------------------------------------- */

.fade-up { opacity: 0; animation: fade-up .7s var(--ease) forwards; }
.d-1 { animation-delay: .08s; }
.d-2 { animation-delay: .16s; }
.d-3 { animation-delay: .24s; }
.d-4 { animation-delay: .32s; }
.d-5 { animation-delay: .40s; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* -------------------------------------------------------------
   响应式
   ------------------------------------------------------------- */

@media (max-width: 980px) {
    .upload-layout { grid-template-columns: 1fr; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-aside { display: none; }

    .shell { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height: auto;
        flex-direction: column;
        gap: 14px;
        padding: 16px;
    }
    .side-brand { padding-bottom: 12px; margin-bottom: 4px; }
    .side-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
    .side-nav .nav-label { display: none; }
    .side-foot { margin-top: 0; }
    .main { padding: 24px 18px 40px; }
    .stats-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

@media (max-width: 720px) {
    .nav-inner { height: 60px; gap: 10px; }
    .nav-links a { padding: 7px 10px; font-size: 13px; }
    .brand { font-size: 16px; }
    .brand .logo-badge { width: 34px; height: 34px; }
    .hero { padding: 60px 0 70px; }
    .section { padding: 52px 0; }
    .assignment-row { flex-direction: column; align-items: stretch; }
    .ar-side { align-items: stretch; }
    .progress-mini { width: 100%; }
    .grade-form .g-comment { width: 100%; }
}
