/* 能臣内容商学院 · 教务系统。VI：品牌红只做点缀，细线，表格不填底色 */
:root {
  --red: #D80C1E; --red-d: #AE0817; --red-bg: #FDF2F3;
  --ink: #2B2B2B; --ink2: #666; --mute: #A3A3A3; --rule: #EBC3A8;
  --hair: #EBEBEB; --line: #DADADA; --soft: #F6F6F6; --bg: #FAFAF9; --card: #fff;
  --blue: #1F4E9C; --ok: #2E7D4F; --warn: #C77700;
  --sans: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --num: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); font: 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.n { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* 布局 */
.shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--hair); padding: 22px 0 18px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { padding: 0 22px 18px; border-bottom: 1px solid var(--hair); }
.brand img { height: 26px; display: block; }
.brand .t { margin-top: 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.brand .s { font-size: 11px; color: var(--mute); letter-spacing: .14em; font-family: var(--num); margin-top: 2px; }
.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; color: var(--ink2); font-size: 14px; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a.on { background: var(--red-bg); color: var(--red); font-weight: 500; }
.nav a i { font-style: normal; font-family: var(--num); font-size: 11px; color: var(--mute); width: 18px; }
.nav a.on i { color: var(--red); }
.nav .grp { font-size: 11px; color: var(--mute); padding: 14px 12px 4px; letter-spacing: .12em; }
.me { margin: 0 12px; padding: 12px; border-top: 1px solid var(--hair); font-size: 13px; }
.me .who { display: flex; align-items: center; gap: 10px; }
.me .av { width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.me .r { font-size: 11px; color: var(--mute); }
.me .acts { margin-top: 8px; display: flex; gap: 12px; font-size: 12px; color: var(--ink2); }
.me .acts a:hover { color: var(--red); }

.main { min-width: 0; }
.top { height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 32px; border-bottom: 1px solid var(--hair); background: #fff; position: sticky; top: 0; z-index: 5; }
.top .crumb { font-size: 13px; color: var(--mute); }
.top .crumb b { color: var(--ink); font-weight: 500; }
.top .sp { flex: 1; }
.top select { border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; background: #fff; }
.today { font-size: 13px; color: var(--ink2); }
.today b { color: var(--red); font-family: var(--num); font-weight: 500; }
.wrap { padding: 28px 32px 60px; max-width: 1280px; }

/* 页眉 */
.ph { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.ph .k { font-family: var(--num); font-size: 11px; letter-spacing: .3em; color: var(--red); }
.ph h1 { font-size: 24px; font-weight: 600; letter-spacing: .04em; line-height: 1.3; margin-top: 2px; }
.ph .s { font-size: 13px; color: var(--ink2); margin-top: 2px; }
.ph .sp { flex: 1; }

/* 卡片与分区 */
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 10px; padding: 20px 22px; }
.card + .card, .grid + .card, .card + .grid { margin-top: 18px; }
.st { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.st .i { font-family: var(--num); color: var(--red); font-size: 13px; }
.st .t { font-size: 15px; font-weight: 600; }
.st small { margin-left: auto; font-size: 12px; color: var(--mute); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 2fr 1fr; }

/* 指标 */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border: 1px solid var(--hair); border-radius: 10px; }
.kpis.k4 { grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 18px 22px; }
.kpi + .kpi { border-left: 1px solid var(--hair); }
.kpi .a { font-size: 12px; color: var(--ink2); }
.kpi .v { font-family: var(--num); font-weight: 300; font-size: 34px; line-height: 1.15; margin-top: 4px; letter-spacing: -.01em; }
.kpi .v small { font-size: 13px; color: var(--mute); margin-left: 3px; }
.kpi .v.red { color: var(--red); }
.kpi .c { font-size: 12px; color: var(--mute); margin-top: 2px; }
.kpi .c b { color: var(--red); font-weight: 500; }

/* 12 天轨道 */
.track { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.track .c { height: 30px; border-radius: 4px; background: var(--soft); display: flex; align-items: center; justify-content: center; font-family: var(--num); font-size: 12px; color: var(--mute); position: relative; }
.track .c.done { background: var(--red); color: #fff; }
.track .c.now { background: #fff; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); font-weight: 600; }
.track .c.exam::after { content: ""; position: absolute; top: -6px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.track .l { font-size: 11px; color: var(--mute); text-align: center; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .d { font-size: 10px; color: var(--mute); text-align: center; font-family: var(--num); }
.track a:hover .c:not(.done) { background: #eee; }

/* 表格：不填底色，表头红线，行间细灰线 */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; font-weight: 500; color: var(--red); padding: 0 10px 9px 0; border-bottom: 1.5px solid var(--red); white-space: nowrap; }
table.t td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; vertical-align: middle; }
table.t tr.dim td { color: var(--mute); }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #FCFCFC; }
table.t td.r, table.t th.r { text-align: right; }
table.t td.c, table.t th.c { text-align: center; }
table.t .sub { font-size: 12px; color: var(--mute); }
table.t td:first-child, table.t td a { white-space: nowrap; }
.empty { text-align: center; color: var(--mute); padding: 36px 0; font-size: 13px; }

/* 标签 */
.chip { display: inline-block; font-size: 12px; line-height: 20px; padding: 0 8px; border-radius: 10px; background: var(--soft); color: var(--ink2); white-space: nowrap; }
.chip.在村 { background: #EEF3FB; color: var(--blue); }
.chip.提前出村, .chip.已出村 { background: var(--red-bg); color: var(--red); }
.chip.主管评估 { background: #FFF5E6; color: var(--warn); }
.chip.结束试用, .chip.叫停 { background: #F1F1F1; color: var(--mute); }
.chip.滞后 { background: #FFF5E6; color: var(--warn); }
.chip.不合格 { background: var(--red-bg); color: var(--red); }
.chip.迟到 { background: #F1F1F1; color: var(--ink2); }
.q { display: inline-block; width: 22px; height: 22px; line-height: 20px; border-radius: 50%; text-align: center; font-size: 12px; border: 1px solid var(--line); color: var(--ink2); }
.q.优 { background: var(--red); border-color: var(--red); color: #fff; }
.q.差 { border-style: dashed; color: var(--mute); }

/* 进度条 */
.bar { height: 6px; background: var(--soft); border-radius: 3px; position: relative; min-width: 60px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red); border-radius: 3px; }
.bar.gray i { background: #BBB; }
.pct { display: flex; align-items: center; gap: 8px; }
.pct .bar { flex: 1; }
.pct span { font-family: var(--num); font-size: 12.5px; width: 38px; text-align: right; }

/* 按钮与表单 */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13.5px; white-space: nowrap; }
.btn:hover { border-color: var(--ink2); }
.btn.pri { background: var(--red); border-color: var(--red); color: #fff; }
.btn.pri:hover { background: var(--red-d); }
.btn.ghost { border-color: transparent; color: var(--ink2); }
.btn.ghost:hover { color: var(--red); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
input.i, select.i, textarea.i { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; background: #fff; outline: none; }
textarea.i { height: auto; padding: 8px 10px; resize: vertical; }
input.i:focus, select.i:focus, textarea.i:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(216, 12, 30, .08); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form .full { grid-column: 1 / -1; }
.fl { font-size: 12.5px; color: var(--ink2); margin-bottom: 5px; display: block; }
.fl b { color: var(--red); font-weight: 400; }
.hint { font-size: 12px; color: var(--mute); margin-top: 4px; }
.err { color: var(--red); font-size: 13px; min-height: 20px; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--red); }

/* 分段选择（优良差 / 是否 / 状态） */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: none; background: #fff; padding: 0 9px; height: 28px; font-size: 12.5px; cursor: pointer; color: var(--ink2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--red); color: #fff; }
.seg button.on.w { background: var(--warn); }
.seg button.on.g { background: var(--ink2); }
.seg button:disabled { cursor: not-allowed; }

/* 每日录入表 */
.entry td { padding: 7px 8px 7px 0; }
.entry input.num { width: 46px; height: 28px; border: 1px solid var(--line); border-radius: 5px; text-align: center; font-family: var(--num); }
.entry input.num:focus, .entry input.note:focus { border-color: var(--red); outline: none; }
.entry input.note { width: 100%; min-width: 110px; height: 28px; border: 1px solid var(--line); border-radius: 5px; padding: 0 8px; font-size: 12.5px; }
.entry .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: inline-block; }
.entry .dot.saved { background: var(--ok); }
.entry .dot.saving { background: var(--warn); }
.entry .dot.bad { background: var(--red); }
.entry tr.off td { opacity: .45; }
.daybar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-bottom: 16px; }
.daybar a { border: 1px solid var(--hair); border-radius: 6px; padding: 6px 0; text-align: center; background: #fff; }
.daybar a .no { font-family: var(--num); font-size: 15px; }
.daybar a .nm { font-size: 11px; color: var(--mute); }
.daybar a.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.daybar a.on .no { color: var(--red); font-weight: 600; }
.daybar a.now .nm::after { content: " · 今天"; color: var(--red); }
.dayset { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 14px; }
.dayset input.num { width: 56px; height: 30px; border: 1px solid var(--line); border-radius: 5px; text-align: center; }

/* 弹窗与提示 */
.mask { position: fixed; inset: 0; background: rgba(20, 20, 20, .35); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow: auto; }
.dlg { background: #fff; border-radius: 12px; width: 640px; max-width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .18); }
.dlg.wide { width: 860px; }
.dlg .hd { padding: 18px 24px; border-bottom: 1px solid var(--hair); display: flex; align-items: center; }
.dlg .hd .k { font-family: var(--num); font-size: 11px; letter-spacing: .26em; color: var(--red); }
.dlg .hd h3 { font-size: 17px; font-weight: 600; }
.dlg .hd .x { margin-left: auto; cursor: pointer; color: var(--mute); font-size: 20px; line-height: 1; }
.dlg .bd { padding: 20px 24px; }
.dlg .ft { padding: 14px 24px; border-top: 1px solid var(--hair); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.dlg .ft .err { margin-right: auto; }
#toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 60; }
#toast div { background: var(--ink); color: #fff; font-size: 13px; padding: 9px 16px; border-radius: 8px; margin-top: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
#toast div.bad { background: var(--red); }

/* 出村条件核对 */
.cks { display: grid; gap: 0; }
.ck { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.ck .o { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
.ck .o.y { background: var(--red); color: #fff; }
.ck .o.x { border: 1px solid var(--mute); color: var(--mute); }
.ck .m { margin-left: auto; font-size: 12.5px; color: var(--ink2); font-family: var(--num); }
.total { display: flex; align-items: baseline; gap: 10px; padding: 12px 0 0; }
.total .v { font-family: var(--num); font-size: 30px; font-weight: 300; color: var(--red); }
.total .r { font-size: 13px; color: var(--ink2); }

/* 信息栏 */
.info { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--ink); }
.info > div { padding: 10px 0; border-bottom: 1px solid var(--hair); }
.info .a { font-size: 12px; color: var(--mute); }
.info .b { font-size: 14.5px; margin-top: 2px; }

/* 制表中心 */
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.doc { background: #fff; border: 1px solid var(--hair); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.doc .k { font-family: var(--num); font-size: 10.5px; letter-spacing: .26em; color: var(--red); }
.doc h3 { font-size: 16px; font-weight: 600; }
.doc p { font-size: 13px; color: var(--ink2); flex: 1; }
.doc .pv { height: 120px; border-radius: 6px; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.doc .pv span { width: 62px; height: 86px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.05); border-top: 3px solid var(--red); }
.doc .pv span.l { width: 96px; height: 66px; }

/* 登录页 */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art { background: #fff; position: relative; overflow: hidden; border-right: 1px solid var(--hair); padding: 48px 56px; display: flex; flex-direction: column; }
.login .art img { height: 36px; align-self: flex-start; }
.login .art .k { font-family: var(--num); letter-spacing: .4em; color: var(--red); font-size: 12px; margin-top: auto; }
.login .art h1 { font-size: 40px; font-weight: 600; color: var(--red); letter-spacing: .06em; line-height: 1.3; margin-top: 10px; }
.login .art .s { font-size: 18px; font-weight: 300; color: var(--red); letter-spacing: .14em; margin-top: 8px; }
.login .art .nums { display: flex; gap: 40px; margin-top: 42px; margin-bottom: auto; }
.login .art .nums div { border-top: 2px solid var(--red); padding-top: 8px; }
.login .art .nums b { display: block; font-family: var(--num); font-weight: 300; font-size: 30px; }
.login .art .nums span { font-size: 12px; color: var(--ink2); }
.login .art .foot { font-family: var(--num); font-size: 12px; color: var(--red); }
.login .box { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login form { width: 340px; }
.login form h2 { font-size: 22px; font-weight: 600; }
.login form p { font-size: 13px; color: var(--mute); margin: 4px 0 26px; }
.login form .row { margin-bottom: 16px; }
.login form .btn { width: 100%; justify-content: center; height: 40px; font-size: 15px; margin-top: 6px; }

@media (max-width: 1200px) { .g3 { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi + .kpi { border-left: none; }
  .g2, .g3, .docs, .form { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login .art { display: none; }
  .wrap { padding: 20px 16px; }
  .info { grid-template-columns: repeat(2, 1fr); }
  .table-scroll { overflow-x: auto; }
}
