/* 教师工作台 / OA 办公 样式 */
:root {
    --ws-primary: #1a3f7a;
    --ws-primary-2: #2b64b0;
    --ws-primary-soft: #eef3fb;
    --ws-accent: #c8a24a;
    --ws-bg: #f4f6fa;
    --ws-card: #ffffff;
    --ws-text: #1d2635;
    --ws-text-2: #5b6676;
    --ws-text-3: #8f99a8;
    --ws-line: #e8ecf2;
    --ws-line-soft: #f1f4f8;
    --ws-green: #2f9e6d;
    --ws-orange: #d08a2b;
    --ws-red: #c74a3c;
    --ws-radius: 14px;
    --ws-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
    --ws-shadow-hover: 0 4px 14px rgba(16, 24, 40, .09), 0 1px 3px rgba(16, 24, 40, .05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.ws-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--ws-bg);
    color: var(--ws-text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; }
button, input, select, textarea { font-family: inherit; }

/* ---------------- 顶栏 ---------------- */
.ws-top {
    height: 62px;
    background: linear-gradient(100deg, #16305c 0%, #1a3f7a 45%, #2b5ea8 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 60;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 6px 18px rgba(15, 32, 64, .16);
}

.ws-brand { display: flex; align-items: center; gap: 14px; }
.ws-brand img { height: 34px; width: auto; }
.ws-brand-divider { width: 1px; height: 22px; background: rgba(255, 255, 255, .28); }
.ws-brand-text { font-size: 15px; font-weight: 600; letter-spacing: .3px; display: flex; align-items: baseline; gap: 8px; }
.ws-brand-text em {
    font-style: normal;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .8px;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .16);
    color: #eaf1fb;
}

.ws-top-right { display: flex; align-items: center; gap: 18px; }
.ws-top-link { font-size: 13px; color: rgba(255, 255, 255, .82); }
.ws-top-link:hover { color: #fff; }
.ws-user { display: flex; align-items: center; gap: 9px; }
.ws-avatar {
    width: 32px; height: 32px; border-radius: 9px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
}
.ws-user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.ws-user-meta b { font-size: 13px; font-weight: 600; }
.ws-user-meta i { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .65); }
.ws-logout {
    font-size: 12.5px;
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, .26);
    color: rgba(255, 255, 255, .9);
}
.ws-logout:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------------- 主体框架 ---------------- */
.ws-shell { display: flex; align-items: flex-start; min-height: calc(100vh - 62px); }

.ws-side {
    width: 216px;
    flex: 0 0 216px;
    background: var(--ws-card);
    border-right: 1px solid var(--ws-line);
    padding: 16px 14px 20px;
    position: sticky;
    top: 62px;
    max-height: calc(100vh - 62px);
    overflow-y: auto;
}

.ws-nav { display: flex; flex-direction: column; gap: 3px; }
.ws-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 13.5px;
    color: var(--ws-text-2);
    position: relative;
    transition: background .18s, color .18s;
}
.ws-nav a:hover { background: var(--ws-line-soft); color: var(--ws-primary); }
.ws-nav a.active {
    background: var(--ws-primary-soft);
    color: var(--ws-primary);
    font-weight: 600;
}
.ws-nav a.active::before {
    content: "";
    position: absolute;
    left: 0; top: 9px; bottom: 9px;
    width: 3px;
    border-radius: 3px;
    background: var(--ws-primary-2);
}
.ws-ico {
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px;
    opacity: .75;
}
.ws-badge {
    margin-left: auto;
    font-style: normal;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px;
    background: #ef4a3d;
    color: #fff;
    font-size: 11px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center;
}

.ws-side-foot {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ws-line-soft);
    display: flex; flex-direction: column; gap: 2px;
}
.ws-side-foot a {
    font-size: 12.5px;
    color: var(--ws-text-3);
    padding: 7px 12px;
    border-radius: 7px;
}
.ws-side-foot a:hover { color: var(--ws-primary); background: var(--ws-line-soft); }

.ws-main { flex: 1; min-width: 0; padding: 26px 30px 60px; }

.ws-page-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
}
.ws-page-head h1 { font-size: 21px; font-weight: 700; letter-spacing: .2px; color: #16223a; }

.ws-flash {
    background: #edf7f1;
    border: 1px solid #c9e6d6;
    color: #1f6b49;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 16px;
}

/* ---------------- 通用卡片 ---------------- */
.card {
    background: var(--ws-card);
    border: 1px solid var(--ws-line);
    border-radius: var(--ws-radius);
    box-shadow: var(--ws-shadow);
    padding: 20px 22px;
    margin-bottom: 18px;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.card-head h3 { font-size: 15px; font-weight: 600; color: #1b2740; display: flex; align-items: center; gap: 8px; }
.card-head h3::before {
    content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--ws-primary-2);
}
.card-head .more { font-size: 12.5px; color: var(--ws-text-3); }
.card-head .more:hover { color: var(--ws-primary-2); }

/* ---------------- 数据卡 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
    background: var(--ws-card);
    border: 1px solid var(--ws-line);
    border-radius: var(--ws-radius);
    box-shadow: var(--ws-shadow);
    padding: 18px 20px 16px;
    position: relative;
    overflow: hidden;
    transition: box-shadow .22s, transform .22s;
}
.stat-card:hover { box-shadow: var(--ws-shadow-hover); transform: translateY(-2px); }
.stat-card .st-label { font-size: 12.5px; color: var(--ws-text-3); margin-bottom: 8px; }
.stat-card .st-num {
    font-size: 27px; font-weight: 700; line-height: 1.1;
    color: var(--ws-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.4px;
}
.stat-card .st-num small { font-size: 12px; font-weight: 500; color: var(--ws-text-3); margin-left: 4px; letter-spacing: 0; }
.stat-card .st-note { margin-top: 6px; font-size: 11.5px; color: var(--ws-text-3); }
.stat-card .st-ico {
    position: absolute; right: 16px; top: 16px;
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.stat-card.warn .st-num { color: var(--ws-orange); }
.stat-card.ok .st-num { color: var(--ws-green); }

/* ---------------- 双栏 ---------------- */
.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* ---------------- 列表 ---------------- */
.list-row {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--ws-line-soft);
}
.list-row:last-child { border-bottom: none; padding-bottom: 2px; }
.list-row:first-child { padding-top: 0; }
.list-main { flex: 1; min-width: 0; }
.list-title {
    font-size: 13.5px; color: #1c2739; font-weight: 500;
    display: block; margin-bottom: 4px;
}
.list-title:hover { color: var(--ws-primary-2); }
.list-sub { font-size: 12px; color: var(--ws-text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.type-chip {
    font-size: 11.5px; padding: 2px 8px; border-radius: 6px;
    white-space: nowrap; font-weight: 500;
}
.st-chip { font-size: 11.5px; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.st-doing { background: #fff5e6; color: #b5791a; }
.st-pass { background: #eaf7f0; color: #22835c; }
.st-reject { background: #fdedeb; color: #bb4132; }
.st-cancel { background: #f2f4f7; color: #798394; }

.empty {
    padding: 34px 0;
    text-align: center;
    color: var(--ws-text-3);
    font-size: 13px;
}
.empty-ico { font-size: 26px; display: block; margin-bottom: 8px; opacity: .5; }

/* ---------------- 表格 ---------------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
    text-align: left; font-size: 12px; font-weight: 600;
    color: var(--ws-text-3);
    padding: 9px 12px;
    background: #f8fafc;
    border-bottom: 1px solid var(--ws-line);
    white-space: nowrap;
}
.tbl th:first-child { border-top-left-radius: 8px; }
.tbl th:last-child { border-top-right-radius: 8px; }
.tbl td {
    padding: 13px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--ws-line-soft);
    vertical-align: top;
    color: var(--ws-text-2);
}
.tbl tr:hover td { background: #fafcfe; }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 12.5px; color: var(--ws-text-2); font-weight: 500; }
.form-group label i { color: var(--ws-red); font-style: normal; margin-left: 2px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dce2ea;
    border-radius: 9px;
    font-size: 13.5px;
    color: var(--ws-text);
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ws-primary-2);
    box-shadow: 0 0 0 3px rgba(43, 100, 176, .12);
}
.form-group textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
.form-hint { font-size: 11.5px; color: var(--ws-text-3); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px;
    border: none; border-radius: 9px;
    font-size: 13.5px; font-weight: 600;
    cursor: pointer;
    transition: background .18s, box-shadow .18s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, #1a3f7a, #2b64b0); color: #fff; box-shadow: 0 2px 8px rgba(30, 70, 130, .22); }
.btn-primary:hover { box-shadow: 0 4px 14px rgba(30, 70, 130, .3); }
.btn-ghost { background: #fff; border: 1px solid #dce2ea; color: var(--ws-text-2); }
.btn-ghost:hover { border-color: var(--ws-primary-2); color: var(--ws-primary-2); }
.btn-ok { background: #2f9e6d; color: #fff; }
.btn-no { background: #fff; border: 1px solid #f0c8c2; color: #bb4132; }

.type-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }
.type-opt {
    border: 1.5px solid var(--ws-line);
    border-radius: 11px;
    padding: 13px 10px;
    text-align: center;
    cursor: pointer;
    transition: all .18s;
    background: #fff;
}
.type-opt:hover { border-color: #c3d4ea; transform: translateY(-1px); }
.type-opt input { display: none; }
.type-opt span { display: block; font-size: 13px; font-weight: 600; color: var(--ws-text-2); }
.type-opt em { display: block; font-size: 11px; color: var(--ws-text-3); font-style: normal; margin-top: 2px; }
.type-opt.on { border-color: var(--ws-primary-2); background: var(--ws-primary-soft); }
.type-opt.on span { color: var(--ws-primary); }

/* ---------------- 审批时间线 ---------------- */
.flow { position: relative; padding-left: 22px; }
.flow::before {
    content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
    width: 2px; background: var(--ws-line);
}
.flow-item { position: relative; margin-bottom: 18px; }
.flow-item::before {
    content: ""; position: absolute; left: -22px; top: 4px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #fff; border: 2.5px solid var(--ws-primary-2);
}
.flow-item.no::before { border-color: var(--ws-red); }
.flow-item.pending::before { border-color: #cdd5e0; }
.flow-item b { font-size: 13px; display: block; }
.flow-item i { font-style: normal; font-size: 12px; color: var(--ws-text-3); }
.flow-item p { font-size: 12.5px; color: var(--ws-text-2); margin-top: 5px; background: #f8fafc; padding: 8px 11px; border-radius: 8px; }

/* ---------------- 课表 ---------------- */
.sch-wrap { overflow-x: auto; }
.sch { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 6px; }
.sch th { font-size: 12px; color: var(--ws-text-3); font-weight: 600; padding: 6px 8px; }
.sch td {
    vertical-align: top;
    height: 62px;
    border-radius: 10px;
    background: #f8fafc;
    padding: 7px 9px;
}
.sch td.has {
    background: linear-gradient(160deg, #eef3fb, #e3ecfa);
    border: 1px solid #c9dbf1;
}
.sch td.has b { font-size: 12.5px; display: block; color: var(--ws-primary); font-weight: 600; }
.sch td.has i { font-style: normal; font-size: 11px; color: var(--ws-text-2); display: block; margin-top: 2px; }
.sch td.has em { font-style: normal; font-size: 10.5px; color: var(--ws-text-3); display: block; margin-top: 3px; }
.sch td.now { background: linear-gradient(160deg, #fff8e8, #fdf1d8); border: 1px solid #ecd3a0; }
.sch .slot { font-size: 11.5px; color: var(--ws-text-3); text-align: left; white-space: nowrap; padding-right: 4px; }

/* ---------------- 详情 ---------------- */
.detail-hero {
    background: linear-gradient(135deg, #f7f9fd, #eef3fb);
    border: 1px solid #e2ebf7;
    border-radius: var(--ws-radius);
    padding: 20px 22px;
    margin-bottom: 18px;
}
.detail-hero .dh-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.detail-hero h2 { font-size: 19px; font-weight: 700; color: #16223a; }
.detail-hero .dh-meta { font-size: 12.5px; color: var(--ws-text-2); display: flex; gap: 16px; flex-wrap: wrap; }
.detail-hero .dh-no { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--ws-text-3); }

.kv-row { display: flex; padding: 9px 0; border-bottom: 1px dashed var(--ws-line); font-size: 13px; }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { width: 96px; flex: 0 0 96px; color: var(--ws-text-3); }
.kv-row .v { flex: 1; color: var(--ws-text); }

/* ---------------- 通知 ---------------- */
.notice-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ws-line-soft); }
.notice-item:last-child { border-bottom: none; }
.notice-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--ws-primary-2);
    margin-top: 8px; flex: 0 0 7px;
}
.notice-item.top .notice-dot { background: var(--ws-accent); box-shadow: 0 0 0 3px rgba(200, 162, 74, .18); }
.notice-body { flex: 1; }
.notice-body h4 { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; color: #1c2739; }
.notice-body p { font-size: 12.5px; color: var(--ws-text-2); line-height: 1.75; }
.notice-body time { font-size: 11.5px; color: var(--ws-text-3); }

/* ---------------- 登录页 ---------------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(1100px 500px at 12% 8%, rgba(43, 100, 176, .22), transparent),
        radial-gradient(900px 460px at 88% 92%, rgba(200, 162, 74, .16), transparent),
        linear-gradient(135deg, #0f1f38 0%, #16305c 55%, #1a3f7a 100%);
    padding: 30px 20px;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(6, 16, 34, .38);
    overflow: hidden;
}
.login-top { padding: 30px 34px 6px; text-align: center; }
.login-top img { height: 46px; margin: 0 auto 16px; }
.login-top h2 { font-size: 19px; font-weight: 700; color: #16223a; }
.login-top p { font-size: 12.5px; color: var(--ws-text-3); margin-top: 6px; }
.login-body { padding: 22px 34px 30px; }
.login-body .form-group { margin-bottom: 14px; }
.login-body input { padding: 12px 14px; font-size: 14px; }
.login-body .btn-primary { width: 100%; margin-top: 8px; padding: 13px; font-size: 14.5px; }
.login-err {
    background: #fdedeb; border: 1px solid #f6cdc7; color: #bb4132;
    font-size: 12.5px; padding: 10px 13px; border-radius: 9px; margin-bottom: 14px;
}
.login-tip { margin-top: 16px; font-size: 11.5px; color: var(--ws-text-3); text-align: center; line-height: 1.8; }
.login-links { text-align: center; margin-top: 14px; font-size: 12.5px; }
.login-links a { color: var(--ws-primary-2); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .grid-2-even { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .ws-side {
        position: fixed;
        left: 0; top: 62px; bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform .25s;
        box-shadow: 8px 0 30px rgba(10, 20, 40, .12);
        max-height: none;
    }
    .ws-side.open { transform: translateX(0); }
    .ws-main { padding: 20px 16px 50px; }
    .ws-brand-text { display: none; }
    .ws-user-meta { display: none; }
    .type-picker { grid-template-columns: repeat(3, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .ws-page-head h1 { font-size: 18px; }
}

@media (max-width: 560px) {
    .ws-top { padding: 0 14px; }
    .ws-top-link { display: none; }
    .ws-brand img { height: 26px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px 15px; }
    .stat-card .st-num { font-size: 22px; }
    .stat-card .st-ico { display: none; }
    .card { padding: 16px 15px; }
    .type-picker { grid-template-columns: repeat(2, 1fr); }
    .tbl th:nth-child(2), .tbl td:nth-child(2) { display: none; }
}
