/* 公安培训考核系统 - 政务警务风格 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --police-navy: #0b1f3a;
  --police-navy-2: #132b4d;
  --police-blue: #1a4b8c;
  --police-red: #1a4b8c;
  --police-gold: #c4a35a;
  --bg: #e8edf3;
  --panel: #ffffff;
  --text: #1a2332;
  --muted: #5c6b7a;
  --border: #cfd8e3;
  --line: #d9e2ec;
  --el-color-primary: #1a4b8c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

a { color: var(--police-blue); text-decoration: none; }

/* ========== 登录页：左右布局，整页同色蓝 ========== */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #0b1f3a;
}

.login-visual {
  position: relative;
  padding: 48px 56px;
  color: #fff;
  background: #0b1f3a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.login-visual .badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--police-gold);
  margin-bottom: 18px;
}

.login-visual .badge::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--police-red);
}

.login-visual h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.login-visual p {
  margin: 18px 0 0;
  max-width: 420px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.75;
}

.login-panel {
  background: #0b1f3a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login-box {
  width: 400px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 36px 32px 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.login-box .title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-box .crest {
  width: 42px;
  height: 42px;
  border: 2px solid var(--police-red);
  background: var(--police-navy);
  color: var(--police-gold);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.login-box h2 {
  margin: 0;
  font-size: 20px;
  color: var(--police-navy);
  letter-spacing: 0.06em;
  font-weight: 700;
}

.login-box .sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  padding-left: 54px;
}

.login-box .el-button--primary {
  width: 100%;
  height: 42px;
  border-radius: 2px;
  background: #0b1f3a;
  border-color: #0b1f3a;
  letter-spacing: 0.2em;
  font-weight: 600;
}

.login-box .el-button--primary:hover,
.login-box .el-button--primary:focus {
  background: #1a4b8c;
  border-color: #1a4b8c;
}

.login-foot {
  margin-top: 18px;
  text-align: center;
  color: #8a97a6;
  font-size: 12px;
}

/* ========== 主框架 ========== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  height: 56px;
  background: linear-gradient(90deg, #081628 0%, #0b1f3a 55%, #132b4d 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 0;
  border-bottom: 3px solid var(--police-red);
  flex-shrink: 0;
}

.app-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 100%;
  background: rgba(0, 0, 0, 0.18);
  min-width: 260px;
}

.app-header .crest-sm {
  width: 28px;
  height: 28px;
  border: 1px solid var(--police-gold);
  color: var(--police-gold);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

.app-header .brand-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.app-header .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.app-header .role-tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid rgba(196, 163, 90, 0.55);
  color: var(--police-gold);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.sider {
  width: 220px;
  background: var(--police-navy-2);
  color: #dce6f2;
  flex-shrink: 0;
  padding: 12px 0 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sider .menu-group {
  padding: 14px 18px 6px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(196, 163, 90, 0.85);
}

.sider .menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  padding: 11px 20px;
  font-size: 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
  font-family: inherit;
}

.sider .menu-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #b01c2e;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  font-weight: 600;
  flex-shrink: 0;
}

.sider .menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sider .menu-item.active {
  background: rgba(26, 75, 140, 0.45);
  color: #fff;
  border-left-color: var(--police-red);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.content {
  padding: 18px 20px 28px;
  flex: 1;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.page-title h3 {
  margin: 0;
  font-size: 18px;
  color: var(--police-navy);
  letter-spacing: 0.04em;
  font-weight: 600;
  padding-left: 10px;
  border-left: 3px solid var(--police-red);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stats.stats-compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stats.stats-compact .stat-card {
  padding: 10px 12px 10px 14px;
}

.stats.stats-compact .stat-card .value {
  margin-top: 4px;
  font-size: 22px;
}

.page-title.page-title-tight {
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.page-title.page-title-tight .el-button {
  margin-left: auto;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.stat-card.stat-card-link {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stat-card.stat-card-link:hover {
  border-color: var(--police-blue);
  box-shadow: 0 2px 10px rgba(15, 53, 110, 0.12);
}

.stat-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--police-blue);
}

.stat-card .label {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.stat-card .value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  color: var(--police-navy);
  font-variant-numeric: tabular-nums;
}

.exam-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exam-item {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.exam-item h4 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--police-navy);
}

.exam-item .meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* Element Plus 微调 */
.el-button {
  border-radius: 2px !important;
}

.el-input__wrapper,
.el-textarea__inner {
  border-radius: 2px !important;
}

.el-table {
  --el-table-header-bg-color: #f0f4f8;
  --el-table-header-text-color: #1a2332;
}

.el-alert {
  border-radius: 2px !important;
}

@media (max-width: 960px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-visual {
    display: none;
  }
  .app-body {
    flex-direction: column;
  }
  .sider {
    width: 100%;
    display: flex;
    overflow-x: auto;
    padding: 0;
  }
  .sider .menu-group { display: none; }
  .stats.stats-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sider .menu-item {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  .sider .menu-item.active {
    border-bottom-color: var(--police-red);
  }
  .app-header .brand {
    min-width: auto;
  }
}

.paper-preview-scroll {
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.proctor-preview,
.proctor-dock {
  background: #0b1f3a;
  object-fit: cover;
  transform: scaleX(-1);
}

.proctor-preview {
  display: block;
  width: 100%;
  height: 240px;
  margin: 10px 0;
}

.taking-wrap {
  position: relative;
}

.proctor-dock {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  width: 220px;
  height: 165px;
  border: 2px solid #1a4b8c;
}

.proctor-block {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(11, 31, 58, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.proctor-block p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.proctor-shot {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
}
