/* 辅导员工作台 · 浅色办公风 + 深蓝侧栏 + 金色点缀 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --ink: #24303e;
    --ink2: #5a6a7d;
    --line: #e4e9f0;
    --bg: #f5f7fa;
    --card: #ffffff;
    --blue: #2c5f9e;
    --blue-d: #16324f;
    --gold: #b98a3c;
    --red: #c0392b;
    --orange: #d97b29;
    --green: #2e8b57;
    --radius: 10px;
    --shadow: 0 1px 4px rgba(22, 50, 79, .07);
}
html, body { height: 100%; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
    background: var(--bg); color: var(--ink);
    font-size: 14px; line-height: 1.6;
    display: flex; min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }

/* ---------- 侧边栏 ---------- */
.sidebar {
    width: 218px; flex-shrink: 0;
    background: linear-gradient(180deg, #14243a 0%, #0f1c30 100%);
    color: #e8e4d8; display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0;
    background: linear-gradient(135deg, #c9a253, #a8792e);
    color: #fff; font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.brand-text b { display: block; font-size: 15px; color: #f4f1e6; letter-spacing: .5px; }
.brand-text span { font-size: 11px; color: #8fa0b5; }
nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-group { margin-top: 14px; padding: 0 8px 4px; }
.nav-grouplabel { font-size: 11px; color: #7d8ea3; letter-spacing: 2px; }
.nav-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px; margin: 2px 0; border-radius: 8px;
    color: #cfd8e3; font-size: 13.5px; transition: all .15s;
    border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
    background: rgba(201,162,83,.14); color: #f0d9a8;
    border-left-color: var(--gold); font-weight: 600;
}
.nav-badge {
    background: var(--red); color: #fff; border-radius: 9px;
    font-size: 11px; padding: 0 7px; line-height: 17px; min-width: 18px; text-align: center;
}
.sidebar-foot { padding: 14px 16px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.term-progress { margin-bottom: 10px; }
.tp-row { display: flex; justify-content: space-between; font-size: 11px; color: #8fa0b5; margin-bottom: 5px; }
.tp-bar { height: 5px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; }
.tp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c9a253, #e0c078); border-radius: 3px; }
.logout-link { font-size: 12px; color: #7d8ea3; display: inline-block; }
.logout-link:hover { color: #c9a253; }

/* ---------- 主区 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 14px 24px; display: flex; align-items: center; gap: 14px;
    position: sticky; top: 0; z-index: 40;
}
.menu-btn { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--ink2); }
.page-title { font-size: 17px; font-weight: 600; color: var(--blue-d); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-date { font-size: 12.5px; color: var(--ink2); }
.content { padding: 22px 24px 10px; flex: 1; }
.footer { padding: 12px 24px 18px; font-size: 11.5px; color: #9aa8b8; }

/* ---------- 卡片 ---------- */
.card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); border: 1px solid var(--line);
    padding: 18px 20px; margin-bottom: 18px;
}
.card-title { font-size: 14.5px; font-weight: 600; color: var(--blue-d); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title .more { margin-left: auto; font-size: 12px; color: var(--blue); font-weight: 400; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }
.g23 { grid-template-columns: 2fr 1fr; }
.g32 { grid-template-columns: 1fr 2fr; }

/* ---------- 统计卡 ---------- */
.stat {
    background: var(--card); border-radius: var(--radius); border: 1px solid var(--line);
    padding: 16px 18px; box-shadow: var(--shadow);
    border-top: 3px solid var(--blue);
}
.stat.red { border-top-color: var(--red); }
.stat.orange { border-top-color: var(--orange); }
.stat.gold { border-top-color: var(--gold); }
.stat.green { border-top-color: var(--green); }
.stat .num { font-size: 26px; font-weight: 700; color: var(--blue-d); line-height: 1.2; }
.stat .label { font-size: 12.5px; color: var(--ink2); margin-top: 3px; }
.stat .sub { font-size: 11.5px; color: #9aa8b8; margin-top: 2px; }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
    text-align: left; padding: 9px 10px; font-size: 12.5px; color: var(--ink2);
    border-bottom: 1.5px solid var(--line); font-weight: 600; white-space: nowrap;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.tbl tr:hover td { background: #f8fafc; }
.tbl tr.done td { color: #9aa8b8; }
.tbl .link { color: var(--blue); cursor: pointer; font-weight: 500; }
.tbl .link:hover { text-decoration: underline; }
.tbl-wrap { overflow-x: auto; }

/* ---------- 徽标 ---------- */
.tag {
    display: inline-block; font-size: 11.5px; padding: 1.5px 9px;
    border-radius: 20px; background: #eef2f7; color: var(--ink2); white-space: nowrap;
}
.tag.blue { background: #e3edf9; color: var(--blue); }
.tag.red { background: #fbeae7; color: var(--red); }
.tag.orange { background: #fdf0e3; color: var(--orange); }
.tag.gold { background: #f7efdf; color: #96702a; }
.tag.green { background: #e6f3eb; color: var(--green); }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: #fff; border: 1px solid #cfd8e3; color: var(--ink);
    border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer;
    transition: all .15s; text-decoration: none;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: #24507f; color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: #a8792e; color: #fff; }
.btn-danger { background: #fff; border-color: #e5b6b0; color: var(--red); }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-xs { padding: 2px 9px; font-size: 12px; border-radius: 6px; }

/* ---------- 表单 ---------- */
.input, select.input, textarea.input {
    width: 100%; border: 1px solid #cfd8e3; border-radius: 8px;
    padding: 8px 12px; font-size: 13.5px; font-family: inherit; color: var(--ink);
    background: #fff; outline: none; transition: border .15s;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 2.5px rgba(44,95,158,.1); }
textarea.input { resize: vertical; }
.form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 140px; }
.field label { display: block; font-size: 12.5px; color: var(--ink2); margin-bottom: 5px; }
.filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.filters .input, .filters select.input { width: auto; min-width: 120px; }
.filters .spacer { flex: 1; }

/* ---------- 弹窗 ---------- */
.modal-mask {
    display: none; position: fixed; inset: 0; z-index: 100;
    background: rgba(15, 28, 48, .45); backdrop-filter: blur(2px);
    align-items: flex-start; justify-content: center; padding: 60px 16px 30px;
    overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal {
    background: #fff; border-radius: 14px; width: 520px; max-width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: pop .18s ease;
}
.modal.lg { width: 680px; }
@keyframes pop { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 20px; border-bottom: 1px solid var(--line);
    font-size: 15px; color: var(--blue-d);
}
.modal-x { background: none; border: none; font-size: 22px; cursor: pointer; color: #9aa8b8; line-height: 1; }
.modal-x:hover { color: var(--ink); }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); text-align: right; display: flex; gap: 10px; justify-content: flex-end; }
.hint { font-size: 12.5px; color: var(--ink2); margin-bottom: 10px; }

/* ---------- 快捷记录 ---------- */
.quick-actions { display: flex; gap: 10px; margin: 12px 0; }
.quick-item {
    border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px;
    margin-bottom: 9px; display: flex; align-items: center; gap: 10px; font-size: 13px;
    background: #fafcfe;
}
.quick-item .qi-main { flex: 1; }
.quick-item .qi-type { flex-shrink: 0; }
.quick-item input { flex-shrink: 0; width: 130px; }
.quick-confirmed { border-left: 3px solid var(--green); }
.quick-item .qi-date { width: 108px; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
    content: ''; position: absolute; left: -17.5px; top: 6px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--gold); border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--gold);
}
.tl-item.tl-blue::before { background: var(--blue); box-shadow: 0 0 0 1.5px var(--blue); }
.tl-item.tl-red::before { background: var(--red); box-shadow: 0 0 0 1.5px var(--red); }
.tl-time { font-size: 11.5px; color: #9aa8b8; }
.tl-body { font-size: 13.5px; margin-top: 2px; }

/* ---------- 待办列表 ---------- */
.todo-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 4px; border-bottom: 1px solid #eef1f5; }
.todo-item:last-child { border-bottom: none; }
.todo-check {
    width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #b9c6d5;
    margin-top: 3px; cursor: pointer; flex-shrink: 0; display: flex;
    align-items: center; justify-content: center; color: transparent; font-size: 11px;
    transition: all .15s; background: #fff;
}
.todo-check:hover { border-color: var(--green); }
.todo-item.done .todo-check { background: var(--green); border-color: var(--green); color: #fff; }
.todo-item.done .todo-title { color: #9aa8b8; text-decoration: line-through; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 13.5px; font-weight: 500; }
.todo-meta { font-size: 11.5px; color: #9aa8b8; margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.todo-item.overdue .todo-meta .due { color: var(--red); font-weight: 600; }

/* ---------- 日历 ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { text-align: center; font-size: 12px; color: var(--ink2); padding: 4px 0; font-weight: 600; }
.cal-cell {
    min-height: 62px; border: 1px solid #eef1f5; border-radius: 7px;
    padding: 4px 6px; font-size: 12px; background: #fff; position: relative;
}
.cal-cell.out { background: #f7f9fb; color: #b6c2cf; }
.cal-cell.today { border-color: var(--gold); box-shadow: 0 0 0 1.5px rgba(185,138,60,.25); }
.cal-cell .d { font-weight: 600; font-size: 12.5px; }
.cal-cell .ev { font-size: 10.5px; color: #fff; border-radius: 4px; padding: 0 4px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cell .ev.todo-ev { background: var(--blue); }
.cal-cell .ev.ev-ev { background: var(--gold); }
.cal-cell .ev.birth-ev { background: var(--orange); }

/* ---------- 学生详情 ---------- */
.stu-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar {
    width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #2c5f9e, #16324f);
}
.avatar.f { background: linear-gradient(135deg, #b06a96, #7d4468); }
.stu-info h2 { font-size: 18px; color: var(--blue-d); }
.stu-info .meta { font-size: 12.5px; color: var(--ink2); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; margin-top: 12px; }
.kv .k { font-size: 11.5px; color: #9aa8b8; }
.kv .v { font-size: 13.5px; margin-top: 1px; }

/* ---------- 提示条 ---------- */
.notice {
    background: #fdf6e8; border: 1px solid #ecd9b0; border-radius: 9px;
    padding: 10px 14px; font-size: 13px; color: #7a5c1e; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.empty { text-align: center; color: #9aa8b8; padding: 30px 0; font-size: 13px; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: #16324f; color: #fff; padding: 10px 22px; border-radius: 10px;
    font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 登录页 ---------- */
.login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, #14243a 0%, #1d3a5f 55%, #16324f 100%);
    padding: 20px;
}
.login-card {
    background: #fff; border-radius: 16px; padding: 38px 36px;
    width: 380px; max-width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.login-card .brand-mini { text-align: center; margin-bottom: 24px; }
.login-card .brand-mini .bm {
    width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 12px;
    background: linear-gradient(135deg, #c9a253, #a8792e);
    color: #fff; font-size: 26px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.login-card h1 { font-size: 19px; color: var(--blue-d); text-align: center; }
.login-card .sub { text-align: center; font-size: 12px; color: #9aa8b8; margin-top: 4px; margin-bottom: 22px; }
.login-card .input { margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; padding: 10px; font-size: 14.5px; }
.login-tip { font-size: 12px; color: #9aa8b8; text-align: center; margin-top: 14px; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 6px; justify-content: flex-end; margin-top: 12px; }
.pager a, .pager span {
    padding: 4px 11px; border-radius: 7px; font-size: 12.5px;
    border: 1px solid var(--line); color: var(--ink2);
}
.pager .cur { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
    .g5 { grid-template-columns: repeat(3, 1fr); }
    .g4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s; position: fixed; left: 0; top: 0; }
    .sidebar.open { transform: none; }
    .sidebar-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 45; }
    .sidebar-mask.show { display: block; }
    .menu-btn { display: block; }
    .content { padding: 16px 14px 8px; }
    .topbar { padding: 12px 14px; }
    .topbar-date { display: none; }
    .g2, .g3, .g23, .g32 { grid-template-columns: 1fr; }
    .g5, .g4 { grid-template-columns: repeat(2, 1fr); }
    .modal-mask { padding: 24px 10px; }
}
