/* ================= 布局骨架（对齐会话存档） ================= */
.center-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; color: var(--text-3); gap: 16px; }
.login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-card { width: 380px; padding: 36px 40px 40px; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.18); text-align: center; }
.login-logo { margin-bottom: 12px; }
.login-card h2 { margin: 0 0 28px; color: var(--text-1); font-size: 22px; font-weight: 600; }
.err-text { color: var(--red); font-size: 13px; margin: -14px 0 16px; }
.dev-login { margin-top: 4px; text-align: left; }
.login-hint { margin: 0 0 16px; padding: 10px 12px; background: #fff7e6; border: 1px solid #ffe0a3; border-radius: 6px; color: #ad6800; font-size: 13px; }
.pwd-login { margin-top: 4px; }

.layout { height: 100%; display: flex; flex-direction: column; }
.navbar {
  flex: 0 0 56px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; background: #fff;
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 4px rgba(0,21,41,.08);
  z-index: 10;
}
.logo-box { display: flex; align-items: center; gap: 10px; }
.logo { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); border-radius: 6px; }
.logo-text { font-size: 16px; font-weight: 600; color: var(--text-1); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.user { display: flex; align-items: center; gap: 8px; cursor: pointer; outline: none; }
.u-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.u-name { font-size: 14px; color: var(--text-1); }
.caret { font-size: 12px; color: var(--text-3); }

.main { flex: 1; min-height: 0; display: flex; }
.sidebar {
  flex: 0 0 180px; width: 180px;
  background: #f3f3f3; border-right: 1px solid var(--line-soft);
  overflow-y: auto; overflow-x: hidden;
}
.side-menu { border-right: none !important; background: transparent !important; padding: 8px 0; }
.side-menu .ant-menu-item { height: 36px; line-height: 36px; font-size: 14px; color: var(--text-2); margin-inline: 8px; border-radius: 3px; }
.side-menu .ant-menu-item-selected { background: var(--brand-light) !important; color: var(--brand) !important; font-weight: 500; }
.side-menu .ant-menu-item:not(.ant-menu-item-selected):hover { color: var(--brand); background: rgba(70,124,243,.06) !important; }
.content { flex: 1; min-width: 0; padding: 20px 24px; overflow-y: auto; background: var(--bg-page); }

/* ================= 页面通用 ================= */
.page-title { margin: 0 0 16px; font-size: 20px; font-weight: 600; color: var(--text-1); line-height: 1.4; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head .page-title { margin: 0; }
.muted { color: var(--text-3); font-size: 12px; }
.cell-title { font-weight: 500; color: var(--text-1); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pass { color: var(--green); }
.fail { color: var(--red); }
.tabular { font-variant-numeric: tabular-nums; }
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.grow { flex: 1; }
.hint { font-size: 12px; color: var(--text-3); }

.ant-table-wrapper .ant-table { font-size: 13px; }
.ant-table-thead > tr > th { font-weight: 500; color: var(--text-2); }
.ant-table-tbody > tr > td { color: var(--text-1); }
.ant-card { border-radius: 6px; }
.ant-modal-content { border-radius: 12px; }

/* ================= 工作台 ================= */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-item { text-align: center; padding: 8px 0; }
.stat-num { font-size: 28px; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ================= 题库 / 表单 ================= */
.opt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.form-label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--text-2); }

/* ================= 课程卡片 ================= */
.course-card { cursor: pointer; transition: transform .15s; }
.course-card:hover { transform: translateY(-3px); }
.course-cover { height: 120px; background: linear-gradient(135deg, #e0eafc, #cfdef3); display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px 6px 0 0; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-ph { font-size: 44px; }
.course-body { padding: 12px 4px 4px; }
.progress-line { margin-top: 10px; }
.mat-view { min-height: 300px; }
.doc-preview { text-align: center; padding: 40px 20px; border: 1px dashed #dcdfe6; border-radius: 8px; }
.doc-ph { font-size: 64px; }
.mat-footer { margin-top: 16px; text-align: right; border-top: 1px solid var(--line-soft); padding-top: 12px; }

/* ================= 考试 ================= */
.exam-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; color: var(--text-2); }
.timer { font-size: 16px; font-weight: 600; color: var(--brand); }
.timer.urgent { color: var(--red); }
.exam-scroll { max-height: 55vh; overflow-y: auto; padding-right: 6px; }
.q-block { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.q-title { font-weight: 500; line-height: 1.6; margin-bottom: 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.q-no { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; flex-shrink: 0; }
.q-opts { display: block; }
.q-opts label { display: block; margin: 8px 0; }

.rec-sum { display: flex; gap: 30px; padding: 12px 16px; background: #f8f9fb; border-radius: 6px; margin-bottom: 14px; }
.rec-sum b { color: var(--brand); font-size: 18px; }

/* ================= 员工首页 ================= */
.welcome-banner { background: linear-gradient(135deg, var(--brand), #79a6ff); color: #fff; padding: 32px 36px; border-radius: 8px; margin-bottom: 20px; }
.welcome-banner h2 { margin: 0 0 8px; font-size: 24px; font-weight: 600; }
.welcome-banner p { margin: 0; opacity: .9; }
.quick-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quick-card { cursor: pointer; text-align: center; padding: 20px; }
.qc-icon { font-size: 40px; }
.qc-title { font-size: 16px; font-weight: 600; margin: 12px 0 6px; }
.qc-sub { font-size: 12px; color: var(--text-3); }

/* ================= 轻量 loading ================= */
.v-loading-host { position: relative; }
.v-loading-mask { position: absolute; inset: 0; background: rgba(255,255,255,.6); z-index: 10; display: flex; align-items: center; justify-content: center; }
.v-loading-spinner { width: 24px; height: 24px; border: 2px solid var(--brand-light); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-cards { grid-template-columns: 1fr; }
  .sidebar { flex-basis: 160px; width: 160px; }
}
