/* archive.css —— 学生档案模块样式（莫兰迪配色） */

.archive{ max-width:1200px; margin:0 auto; }

/* 页面标题与操作按钮 */
.page-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
  gap:12px;
  flex-wrap:wrap;
}
.page-header h2{ font-size:18px; font-weight:600; color:var(--ink); }
.page-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.page-actions .btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 14px;
  border-radius:8px;
  font-size:13px;
  white-space:nowrap;
  transition:background .15s, box-shadow .15s;
}
.page-actions .btn.primary{
  background:var(--brand);
  color:#fff;
  box-shadow:0 2px 6px rgba(147,166,156,.28);
}
.page-actions .btn.primary:hover{ background:var(--brand-deep); }
.page-actions .btn.ghost{
  background:#fff;
  border:1px solid var(--line);
  color:var(--ink);
}
.page-actions .btn.ghost:hover{ background:var(--brand-soft); }
.page-actions .btn.danger{ color:var(--alert-3); border-color:#ecd6d0; background:#f7efed; }
.page-actions .btn.danger:hover{ background:#f1e3df; }
.page-actions .btn .icon{ display:inline-flex; align-items:center; }
.page-actions .btn .icon svg{ width:16px; height:16px; }
.page-actions .batch-delete.disabled{ opacity:.5; cursor:not-allowed; }
.page-actions .btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* 二次确认弹窗（一键升学 / 批量毕业） */
.confirm-box p{ margin:0 0 10px; font-size:14px; color:var(--ink); line-height:1.7; }
.confirm-box p:last-child{ margin-bottom:0; }
.confirm-box b{ color:var(--brand-deep); }
.confirm-box .hint{ font-size:12px; color:var(--muted); }

/* 表格卡片 */
.table-card{
  background:var(--panel);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.data-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.data-table th, .data-table td{
  padding:10px 12px;
  text-align:left;
  border-bottom:1px solid var(--line);
  vertical-align:middle;
}
.data-table thead th{
  background:#f1efe9;
  font-weight:600;
  color:var(--ink);
  font-size:13px;
}
.data-table .filter-row td{
  background:#f1efe9;
  padding:6px 12px;
  border-bottom:1px solid var(--line);
}
.data-table .filter-row select,
.data-table .filter-row input{
  padding:5px 8px;
  border-radius:6px;
  font-size:12px;
  border:1px solid var(--line);
  background:#fff;
}
.data-table tbody tr:hover{ background:#f3f1ec; }
.data-table tbody tr.selected{ background:#e8ede9; }
.data-table tbody .empty{
  text-align:center;
  color:var(--muted);
  padding:40px;
}

.col-check{ width:40px; text-align:center; }
.col-check input{ width:16px; height:16px; cursor:pointer; }
.col-op{ width:80px; text-align:center; }

.name-link{
  color:var(--brand-deep);
  cursor:pointer;
  font-weight:500;
}
.name-link:hover{ text-decoration:underline; }

.level-tag{
  color:#fff;
  padding:2px 8px;
  border-radius:10px;
  font-size:12px;
  display:inline-block;
}

.data-table .btn.op{
  padding:4px 10px;
  border-radius:6px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--brand-deep);
  font-size:12px;
}
.data-table .btn.op:hover{ background:var(--brand-soft); }

/* 底部状态栏 */
.status-bar{
  margin-top:12px;
  padding:10px 14px;
  background:#f1efe9;
  border-radius:8px;
  color:var(--muted);
  font-size:13px;
}

/* 详情面板（弹窗内） */
.dt-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}
.dt-head b{ font-size:16px; }
.dt-head .lv{
  color:#fff;
  padding:1px 8px;
  border-radius:8px;
  font-size:12px;
}
.dt-group{ margin-bottom:14px; }
.dt-group h4{
  font-size:13px;
  color:var(--muted);
  margin-bottom:6px;
  border-bottom:1px dashed var(--line);
  padding-bottom:4px;
}
.dt{ display:flex; gap:10px; padding:3px 0; }
.dt span{ width:120px; color:var(--muted); flex:none; }
.dt b{ font-weight:500; }

/* 详情弹窗内可点击的记录条目（咨询历史 / 危机历史） */
.rec-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  margin:4px 0;
  border:1px solid var(--line);
  border-radius:8px;
  background:#faf9f6;
  cursor:pointer;
  transition:background .15s, border-color .15s;
}
.rec-link:hover{ background:var(--brand-soft); border-color:var(--brand); }
.rec-link .rec-date{ flex:none; width:88px; color:var(--muted); font-size:12px; }
.rec-link .rec-title{ flex:1; font-weight:500; color:var(--ink); }
.rec-link .rec-sub{ flex:none; max-width:42%; color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rec-link .rec-go{ flex:none; color:var(--brand-deep); font-size:18px; line-height:1; }

/* 弹窗 */
.modal-mask{
  position:fixed;
  inset:0;
  background:rgba(60,52,75,.38);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:60;
}
.modal{
  background:#fff;
  border-radius:12px;
  width:min(620px,92vw);
  max-height:88vh;
  overflow:auto;
  box-shadow:0 12px 40px rgba(60,52,75,.16);
}
.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  font-weight:600;
  color:var(--ink);
}
.modal-body{ padding:18px; }
.modal-foot{
  padding:12px 18px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* 按钮 */
.btn{ padding:8px 14px; border-radius:8px; transition:background .15s; }
.btn.primary{ background:var(--brand); color:#fff; }
.btn.primary:hover{ background:var(--brand-deep); }
.btn.ghost{ background:#fff; border:1px solid var(--line); }
.btn.ghost:hover{ background:var(--brand-soft); }
.btn.danger{ color:var(--alert-3); }
.btn.link{ background:none; border:none; color:var(--brand-deep); padding:0; }

/* 提示 toast */
.toast{
  position:fixed;
  top:16px;
  left:50%;
  transform:translateX(-50%);
  background:#6b655d;
  color:#fff;
  padding:8px 16px;
  border-radius:8px;
  z-index:80;
  box-shadow:0 4px 14px rgba(60,55,48,.2);
}

/* 表单：两列网格 */
.stu-form{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.fld{ display:flex; flex-direction:column; gap:4px; }
.fld label{ font-size:12px; color:var(--muted); }
.chips{ display:flex; flex-wrap:wrap; gap:6px; }
.chip{
  padding:4px 10px;
  border:1px solid var(--line);
  border-radius:14px;
  font-size:12px;
  cursor:pointer;
  user-select:none;
  transition:background .15s;
}
.chip:hover{ background:var(--brand-soft); }
.chip.on{ background:var(--brand); color:#fff; border-color:var(--brand); }

/* 详情弹窗底部操作区 */
.dt-actions{ display:flex; gap:10px; margin-top:16px; }

/* 占位模块 */
.ph{ display:flex; align-items:center; justify-content:center; height:60vh; }
.ph-card{
  background:var(--panel);
  border-radius:var(--radius);
  padding:32px 40px;
  text-align:center;
  box-shadow:var(--shadow);
  max-width:420px;
}
.ph-card .tag{
  display:inline-block;
  background:var(--brand-soft);
  color:var(--brand-deep);
  padding:2px 10px;
  border-radius:10px;
  font-size:12px;
  margin:8px 0;
}
.ph-card .hint{ color:var(--muted); font-size:12px; margin-top:8px; }

/* 响应式 */
@media(max-width:1100px){
  .page-header{ flex-direction:column; align-items:flex-start; }
}
@media(max-width:820px){
  .data-table{ min-width:800px; }
  .table-card{ overflow-x:auto; }
  .stu-form{ grid-template-columns:1fr; }
}
@media(max-width:560px){
  .page-actions{ width:100%; }
  .page-actions .btn{ flex:1; justify-content:center; }
}

/* 班级管理弹窗 */
.cm-add-row{ display:flex; gap:8px; margin-bottom:12px; }
.cm-add-row .cm-input{ flex:1; }
.cm-table-wrap{ max-height:54vh; overflow:auto; border:1px solid var(--line); border-radius:8px; }
.cm-table{ width:100%; border-collapse:collapse; background:var(--panel); }
.cm-table th, .cm-table td{ padding:6px 10px; border-bottom:1px solid var(--line); font-size:13px; text-align:left; vertical-align:top; }
.cm-table th{ background:var(--brand-soft); color:var(--brand-deep); font-weight:600; position:sticky; top:0; }
.cm-table td{ color:var(--ink); }
.cm-input{
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:6px;
  font-size:13px;
  width:100%;
  box-sizing:border-box;
  background:#fff;
  color:var(--ink);
}
.cm-deputies-cell{ min-width:180px; }
.cm-deputies{ display:flex; flex-direction:column; gap:6px; }
.cm-deputy{ display:flex; align-items:center; gap:6px; }
.cm-deputy .cm-input{ width:90px; }
.cm-deputy .cm-x{ padding:4px 8px; line-height:1; flex:none; }
.cm-add-dep{ margin-top:6px; font-size:12px; padding:4px 10px; }
.cm-dep-max{ display:inline-block; margin-top:6px; font-size:12px; color:var(--muted); }


/* ===== 拼音检索：自动生成 + 多音字确认 ===== */
.fld-name, .fld-py{ grid-column:1 / -1; }
.py-row{ display:flex; gap:8px; align-items:stretch; }
.py-row input{ flex:1; min-width:0; }
.py-regen{
  flex:none;
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:6px 12px;
  font-size:12px;
  white-space:nowrap;
  color:var(--brand-deep);
}
.py-regen .icon{ display:inline-flex; align-items:center; }
.py-regen .icon svg{ width:14px; height:14px; }
.py-hint{ font-size:12px; line-height:1.7; color:var(--muted); }
.py-hint b{ color:var(--brand-deep); font-weight:600; }
.py-ok{ color:#6f8c7d; }
.py-warn{ color:#c08b7e; }
.py-muted{ color:var(--muted); }

/* 状态栏：缺少拼音检索时的补全入口 */
.py-fill-tip{ margin-left:12px; color:var(--brand-deep); }
.py-fill-tip .btn.link{ margin-left:6px; font-size:13px; text-decoration:underline; }

/* 多音字确认弹窗 */
.poly-box{ font-size:14px; }
.poly-tip{ margin-bottom:12px; line-height:1.7; color:var(--ink); }
.poly-tip b{ color:var(--brand-deep); }
.poly-name{ display:flex; gap:6px; justify-content:center; flex-wrap:wrap; margin-bottom:14px; }
.poly-name span{
  min-width:38px;
  padding:0 10px;
  height:44px;
  line-height:44px;
  text-align:center;
  background:var(--brand-soft);
  border-radius:8px;
  font-size:20px;
  color:var(--ink);
}
.poly-name span.hot{ background:var(--brand); color:#fff; font-weight:600; }
.poly-list{ display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.poly-item{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  padding:8px 10px;
  background:#f6f4fa;
  border-radius:8px;
}
.poly-char{
  width:26px; height:26px; line-height:26px; text-align:center;
  background:var(--brand); color:#fff; border-radius:6px; font-size:14px; flex:none;
}
.poly-pos{ font-size:12px; color:var(--muted); flex:none; }
.poly-item .chips{ flex:1; min-width:120px; }
.poly-note{ font-size:12px; color:var(--brand-deep); flex:none; }
.poly-preview{ background:var(--brand-soft); border-radius:8px; padding:10px 12px; margin-bottom:10px; }
.poly-pv-row{ display:flex; gap:10px; padding:2px 0; }
.poly-pv-row span{ width:56px; flex:none; font-size:13px; color:var(--muted); }
.poly-pv-row b{ color:var(--brand-deep); font-weight:600; letter-spacing:.4px; word-break:break-all; }
.poly-hint{ font-size:12px; color:var(--muted); line-height:1.75; }

/* 弹窗内通用提示 */
.modal-body .confirm-msg{ margin-bottom:10px; line-height:1.7; }
.modal-body .hint{ font-size:12px; color:var(--muted); margin-top:8px; }
.poly-name-list{
  background:#f6f4fa;
  border-radius:8px;
  padding:8px 12px;
  font-size:13px;
  line-height:1.9;
  color:var(--ink);
  word-break:break-all;
}

/* 窄屏：拼音行改为纵向，避免输入框被挤压 */
@media(max-width:560px){
  .py-row{ flex-direction:column; }
  .py-regen{ justify-content:center; }
  .poly-name span{ font-size:18px; height:40px; line-height:40px; }
}

/* 列设置弹窗 */
.col-set{ padding:4px 2px; }
.col-set-tip{ font-size:13px; color:var(--ink-2,#6b7280); margin:0 0 14px; line-height:1.6; }
.col-set-tip b{ color:var(--brand,#93a69c); }
.col-set-list{ display:flex; flex-wrap:wrap; gap:10px 18px; margin-bottom:18px; }
.col-set-item{ display:inline-flex; align-items:center; gap:8px; font-size:14px; color:var(--ink,#1f2933); cursor:pointer; min-width:120px; }
.col-set-item input{ width:16px; height:16px; accent-color:var(--brand,#93a69c); cursor:pointer; }
.col-set-actions{ display:flex; gap:10px; justify-content:flex-end; }
.col-set-actions .btn{ padding:7px 16px; font-size:13px; border-radius:8px; }

/* 列设置：必显列（禁用勾选） */
.col-set-item.fixed{ opacity:.55; cursor:default; }

/* 预警等级配色徽标：绿(待评估) / 黄(一类) / 橙(二类) / 红(三类) */
.lv-badge{
  display:inline-block;
  padding:2px 9px;
  border-radius:11px;
  font-size:12px;
  line-height:1.7;
  font-weight:600;
  white-space:nowrap;
}
.col-set-item.fixed input{ cursor:default; }
