/* ============================================================
   360度多元化教学评价系统 - PC 管理后台样式
   阳新县职业教育中心
   ============================================================ */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --sidebar-w: 232px;
  --header-h: 58px;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text2: #64748b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #38bdf8 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.login-wrap::before { width: 520px; height: 520px; left: -160px; top: -160px; }
.login-wrap::after { width: 360px; height: 360px; right: -120px; bottom: -120px; }
.login-box {
  width: 420px; background: #fff; border-radius: 16px; padding: 40px 44px 32px;
  box-shadow: 0 24px 60px rgba(2, 8, 29, .35); position: relative; z-index: 2;
}
.login-logo { text-align: center; margin-bottom: 8px; font-size: 46px; }
.login-title { text-align: center; font-size: 22px; font-weight: 700; color: var(--text); }
.login-sub { text-align: center; color: var(--text2); font-size: 13px; margin: 6px 0 28px; }
.login-box .field { margin-bottom: 18px; }
.login-box label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.login-box input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; outline: none; transition: .2s;
}
.login-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.login-btn {
  width: 100%; padding: 12px; border: none; border-radius: 8px; cursor: pointer;
  background: linear-gradient(90deg, var(--primary), #3b82f6); color: #fff;
  font-size: 15px; font-weight: 600; transition: .2s;
}
.login-btn:hover { opacity: .92; transform: translateY(-1px); }
.login-tip { margin-top: 22px; background: var(--primary-light); border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #1e40af; line-height: 1.8; }
.login-tip b { color: var(--primary-dark); }
.login-h5 {
  margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); text-align: center;
}
.login-h5 a {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(90deg, #0f766e, #14b8a6); color: #fff;
  padding: 10px 22px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  text-decoration: none; transition: .2s;
}
.login-h5 a:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20, 184, 166, .35); }
.login-h5-tip { font-size: 11px; color: var(--text2); margin-top: 7px; word-break: break-all; }

/* ---------- 主布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: #0f172a; color: #cbd5e1; position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 50; display: flex; flex-direction: column;
}
.sidebar-logo {
  height: var(--header-h); display: flex; align-items: center; gap: 10px;
  padding: 0 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
}
.sidebar-logo .logo-icon { font-size: 26px; }
.sidebar-logo .logo-text { font-size: 15px; font-weight: 700; line-height: 1.3; }
.sidebar-logo .logo-text small { display: block; font-size: 10px; color: #94a3b8; font-weight: 400; }
.sidebar-menu { flex: 1; overflow-y: auto; padding: 10px 0 20px; }
.menu-group-title { padding: 14px 20px 6px; font-size: 11px; color: #64748b; letter-spacing: 1px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px; cursor: pointer;
  color: #cbd5e1; font-size: 13.5px; transition: .15s; border-left: 3px solid transparent;
}
.menu-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.menu-item.active { background: rgba(37,99,235,.25); color: #fff; border-left-color: #3b82f6; }
.menu-item .mi { font-size: 16px; width: 20px; text-align: center; }
.menu-item .arrow { margin-left: auto; font-size: 10px; transition: .2s; }
.menu-item.open .arrow { transform: rotate(90deg); }
.menu-sub { display: none; }
.menu-sub.open { display: block; }
.menu-sub-item { padding: 8px 20px 8px 53px; font-size: 13px; color: #94a3b8; cursor: pointer; transition: .15s; }
.menu-sub-item:hover { color: #fff; }
.menu-sub-item.active { color: #60a5fa; font-weight: 600; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }
.header {
  height: var(--header-h); background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 16px; position: sticky; top: 0; z-index: 40;
}
.header-title { font-size: 16px; font-weight: 700; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.header-search input {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px 7px 32px; width: 240px;
  font-size: 13px; outline: none; background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 10px center;
}
.bell { position: relative; cursor: pointer; font-size: 18px; color: var(--text2); }
.bell .dot {
  position: absolute; top: -2px; right: -4px; min-width: 15px; height: 15px; border-radius: 8px;
  background: var(--danger); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px 10px; border-radius: 8px; transition: .15s; }
.user-chip:hover { background: var(--bg); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.user-chip .uname { font-size: 13px; font-weight: 600; }
.user-chip .urole { font-size: 11px; color: var(--text2); }

.content { flex: 1; padding: 22px 24px 40px; }

/* ---------- 组件 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.card-head .t { font-size: 15px; font-weight: 700; }
.card-head .d { font-size: 12px; color: var(--text2); }
.card-body { padding: 18px 20px; }

.page-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.page-toolbar .spacer { flex: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; font-size: 13px; cursor: pointer;
  color: var(--text); transition: .15s; font-weight: 500; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { opacity: .9; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; color: #fff; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-warning:hover { opacity: .9; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-link { border: none; background: none; color: var(--primary); padding: 2px 6px; font-size: 13px; cursor: pointer; }
.btn-link.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input[type=text], input[type=number], input[type=password], input[type=date], select, textarea {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px;
  outline: none; background: #fff; transition: .15s; font-family: inherit; color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
select { cursor: pointer; }
textarea { resize: vertical; min-height: 72px; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  background: #f8fafc; color: var(--text2); font-weight: 600; text-align: left;
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.data tbody tr:hover { background: #f8fafc; }
table.data tbody tr:last-child td { border-bottom: none; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 14px 4px 0; font-size: 13px; color: var(--text2); }
.pagination button {
  min-width: 30px; height: 30px; border: 1px solid var(--border); background: #fff; border-radius: 6px;
  cursor: pointer; font-size: 12px;
}
.pagination button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-orange { background: #fef3c7; color: #b45309; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-purple { background: #ede9fe; color: #6d28d9; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.stat-card .ic { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.stat-card .num { font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat-card .lbl { font-size: 12px; color: var(--text2); margin-top: 2px; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.chart-box h4 { font-size: 14px; margin-bottom: 10px; color: var(--text); }
.chart-box canvas { width: 100%; }

/* 六宫格打分 */
.grid6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.module-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: #fff; }
.module-card h4 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.module-card .score-now { color: var(--primary); font-weight: 700; font-size: 18px; }
.score-items { display: flex; flex-direction: column; gap: 8px; }
.score-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.score-item .name { flex: 1; }
.score-item input { width: 70px; text-align: center; }
.total-bar { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: linear-gradient(90deg, var(--primary-light), #f0f9ff); border-radius: 10px; margin-top: 16px; }
.total-bar .total-num { font-size: 34px; font-weight: 800; color: var(--primary); }
.total-bar .total-lbl { color: var(--text2); font-size: 13px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 100;
  display: flex; align-items: center; justify-content: center; animation: fadeIn .15s;
}
.modal { background: #fff; border-radius: 14px; width: 640px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(2,8,29,.3); animation: popIn .18s; }
.modal.wide { width: 860px; }
.modal.narrow { width: 460px; }
.modal-head { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-head .t { font-size: 15px; font-weight: 700; flex: 1; }
.modal-close { border: none; background: none; font-size: 20px; cursor: pointer; color: var(--text2); line-height: 1; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-item label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.form-item label .req { color: var(--danger); }
.form-item input, .form-item select, .form-item textarea { width: 100%; }
.form-item .hint { font-size: 11px; color: var(--text2); margin-top: 4px; }
.form-item .checkbox-group { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.checkbox-group label { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text); cursor: pointer; margin: 0; }
.checkbox-group input { width: auto; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* Toast */
#toast-box { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #0f172a; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 13px; box-shadow: 0 8px 24px rgba(2,8,29,.3); animation: popIn .2s; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* 空状态 */
.empty { text-align: center; padding: 50px 0; color: var(--text2); }
.empty .e-ic { font-size: 44px; margin-bottom: 10px; }

/* 进度条 / 环形 */
.ring { position: relative; width: 110px; height: 110px; }
.ring .ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .ring-text b { font-size: 24px; }
.ring .ring-text span { font-size: 11px; color: var(--text2); }

/* 权限树 */
.perm-tree { border: 1px solid var(--border); border-radius: 8px; padding: 12px; max-height: 300px; overflow-y: auto; }
.perm-tree .pt-group { margin-bottom: 10px; }
.perm-tree .pt-group > label { font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; cursor: pointer; }
.perm-tree .pt-children { padding-left: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.perm-tree label { display: flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }

/* 打分星标 */
.stars { display: inline-flex; gap: 4px; }
.stars span { cursor: pointer; font-size: 20px; color: #e2e8f0; transition: .1s; }
.stars span.on { color: #f59e0b; }

/* 详情页 */
.detail-grid { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.profile-card { text-align: center; padding: 24px 16px; }
.profile-card .big-avatar { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 12px; font-size: 34px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; display: flex; align-items: center; justify-content: center; }
.profile-card h3 { font-size: 17px; }
.profile-card .p-role { color: var(--primary); font-size: 12px; margin-top: 4px; }
.info-list { margin-top: 16px; text-align: left; }
.info-list .il { display: flex; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.info-list .il:last-child { border-bottom: none; }
.info-list .il b { width: 90px; color: var(--text2); font-weight: 500; }
.section-title { font-size: 14px; font-weight: 700; margin: 18px 0 10px; padding-left: 10px; border-left: 3px solid var(--primary); }

/* 步骤条 */
.steps { display: flex; align-items: center; margin: 6px 0 18px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); }
.step .dot { width: 26px; height: 26px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.step.done .dot { background: var(--success); color: #fff; }
.step.active .dot { background: var(--primary); color: #fff; }
.step-line { flex: 1; height: 2px; background: #e2e8f0; margin: 0 10px; min-width: 30px; }
.step-line.done { background: var(--success); }

/* 时间轴 */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 20px; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.tl-item.gray::before { border-color: var(--text2); }
.tl-item .tl-time { font-size: 12px; color: var(--text2); }
.tl-item .tl-text { font-size: 13.5px; margin-top: 2px; }

/* 勋章 */
.medal { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; min-width: 86px; }
.medal .m-icon { font-size: 30px; }
.medal .m-name { font-size: 12px; font-weight: 600; }
.medal-earned { border-color: #fbbf24; background: #fffbeb; }

/* 响应式 */
@media (max-width: 1100px) {
  .chart-grid { grid-template-columns: 1fr; }
  .grid6 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .grid6, .form-grid { grid-template-columns: 1fr; }
}
