/* 税务系统公开遴选 · 网上报名服务平台 */
:root {
  --primary: #1890ff;
  --primary-hover: #40a9ff;
  --primary-dark: #096dd9;
  --primary-light: #e6f7ff;
  --danger: #ff4d4f;
  --success: #52c41a;
  --warning: #faad14;
  --text: #262626;
  --text-secondary: #8c8c8c;
  --text-muted: #bfbfbf;
  --border: #e8e8e8;
  --bg: #f0f2f5;
  --card: #ffffff;
  --footer: #1a1a1a;
  --header-h: 64px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --font: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ===== Header ===== */
.site-header {
  height: var(--header-h);
  background: linear-gradient(90deg, #1677ff 0%, #1890ff 50%, #36a3ff 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.25);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  flex-shrink: 0;
}

.brand:hover {
  color: #fff;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff7875, #cf1322);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text .sub {
  font-size: 11px;
  opacity: 0.85;
}

.brand-text .title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 14px;
  border-radius: 4px;
  position: relative;
  font-size: 15px;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-links a.active {
  color: #fff;
  font-weight: 600;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-user .login-link {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-user .login-link:hover {
  color: #fff;
  opacity: 0.9;
}

.user-name {
  color: #fff;
  font-size: 14px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.6);
  position: relative;
}

.user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 0 4px 8px;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% - 2px);
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 168px;
  padding: 8px 0;
  display: none;
  z-index: 200;
}

/* 填补头像与菜单之间的空隙，鼠标移入时可保持悬停 */
.dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 14px;
}

.user-dropdown:hover .dropdown-menu,
.user-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.bell {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  position: relative;
  font-size: 18px;
  transition: background 0.15s;
  text-decoration: none;
}

.bell:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.bell .dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1px solid #fff;
}

.bell-count {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  border: 1px solid #fff;
  font-weight: 700;
}

.notice-dropdown {
  position: relative;
}

.notice-panel {
  position: absolute;
  right: 0;
  top: calc(100% - 2px);
  width: 360px;
  max-width: min(360px, calc(100vw - 24px));
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 220;
  overflow: hidden;
  color: var(--text);
}

.notice-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 14px;
}

.notice-dropdown:hover .notice-panel,
.notice-dropdown.open .notice-panel {
  display: block;
}

.notice-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  background: #fafafa;
}

.notice-readall {
  border: none;
  background: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.notice-readall:hover {
  text-decoration: underline;
}

.notice-panel-list {
  max-height: 360px;
  overflow: auto;
}

.notice-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--text);
  transition: background 0.15s;
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-item:hover {
  background: #f5f9ff;
  color: var(--text);
}

.notice-item.unread {
  background: #f0f7ff;
}

.notice-item.unread .notice-item-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 6px;
  vertical-align: 2px;
}

.notice-item-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.notice-item-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notice-item-time {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.notice-empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.notice-panel-foot {
  display: block;
  text-align: center;
  padding: 12px;
  border-top: 1px solid var(--border);
  color: var(--primary);
  font-size: 13px;
  background: #fafafa;
}

.notice-panel-foot:hover {
  background: #f0f7ff;
}

.notice-panel-list {
  max-height: 280px;
  overflow: auto;
}

/* ===== Message center ===== */
.msg-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.msg-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.msg-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.msg-filter {
  border: 1px solid var(--border);
  background: #fff;
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
}

.msg-filter.active {
  background: var(--primary-light);
  border-color: #91d5ff;
  color: var(--primary-dark);
  font-weight: 600;
}

.msg-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  min-height: 420px;
}

.msg-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
  max-height: 560px;
  background: #fafafa;
}

.msg-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: #fff;
  transition: background 0.15s;
}

.msg-item:hover {
  background: #f5f9ff;
}

.msg-item.active {
  background: #e6f4ff;
  border-left: 3px solid var(--primary);
}

.msg-item.unread .msg-item-title {
  font-weight: 700;
}

.msg-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.msg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.msg-item-title {
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.msg-item-preview {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.msg-item-time {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.msg-empty,
.msg-detail-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.msg-detail {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  background: #fff;
  min-height: 360px;
}

.msg-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.msg-detail-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.msg-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.msg-detail-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.msg-detail-body {
  font-size: 15px;
  line-height: 1.8;
  color: #434343;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .msg-layout {
    grid-template-columns: 1fr;
  }

  .msg-list {
    max-height: 280px;
  }
}

/* ===== Position picker (apply) ===== */
.pos-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pos-toolbar .form-control {
  max-width: 360px;
}

.pos-count {
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}

.pos-selected {
  border: 1px solid #91d5ff;
  background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.pos-selected.empty {
  border-style: dashed;
  border-color: var(--border);
  background: #fafafa;
  color: var(--text-secondary);
  text-align: center;
}

.pos-selected-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.pos-selected-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  font-size: 13px;
}

.pos-selected-grid .k {
  color: var(--text-secondary);
  margin-right: 8px;
}

.pos-selected-grid .v {
  color: var(--text);
  font-weight: 500;
}

.pos-table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
  max-height: 420px;
}

.pos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pos-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fafafa;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.pos-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.pos-row {
  cursor: pointer;
  transition: background 0.15s;
}

.pos-row:hover {
  background: #f5f9ff;
}

.pos-row.is-selected {
  background: #e6f4ff;
}

.pos-row.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.pos-row.is-disabled:hover {
  background: transparent;
}

.pos-unit,
.pos-name {
  max-width: 200px;
  word-break: break-all;
}

.pos-radio-cell {
  text-align: center;
}

.pos-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pos-radio input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.pos-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 28px 12px !important;
}

.pos-group td {
  background: #f3f8ff;
  font-weight: 600;
  padding: 9px 12px;
  border-bottom: 1px solid #d6e8ff;
  color: #1d4f91;
}

.pos-group-code {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  background: #fff;
  border: 1px solid #91d5ff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary-dark);
}

.pos-group-n {
  float: right;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 12px;
}

@media (max-width: 900px) {
  .pos-selected-grid {
    grid-template-columns: 1fr;
  }

  .pos-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pos-toolbar .form-control {
    max-width: none;
  }
}

/* ===== Layout ===== */
.page-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.page-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  border: 1px solid var(--border);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.sub-tabs {
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  gap: 0;
  padding: 0 16px;
  margin-bottom: 0;
}

.sub-tabs a {
  padding: 14px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.sub-tabs a.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

.sub-tabs a:hover {
  color: var(--primary);
}

/* ===== Exam cards ===== */
.exam-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exam-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}

.exam-card:hover {
  border-color: #91d5ff;
  box-shadow: 0 4px 16px rgba(24, 144, 255, 0.12);
  transform: translateY(-1px);
}

.exam-card-body {
  flex: 1;
  min-width: 0;
}

.exam-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.45;
}

.exam-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.exam-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-tag.open {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}

.status-tag.closed {
  background: #fff1f0;
  color: #cf1322;
  border: 1px solid #ffa39e;
}

.status-tag.upcoming {
  background: #e6f7ff;
  color: #096dd9;
  border: 1px solid #91d5ff;
}

.exam-card-illust {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #e6f7ff, #bae7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

/* ===== Announcements ===== */
.announce-list {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.announce-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.announce-item:last-child {
  border-bottom: none;
}

.announce-item:hover {
  background: #fafafa;
}

.announce-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
}

.announce-item-title a {
  color: inherit;
  text-decoration: none;
}

.announce-item-title a:hover {
  color: var(--primary);
}

.announce-item-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

.announce-item-right {
  text-align: right;
  flex-shrink: 0;
}

.announce-item-right .time {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.announce-item-right .link {
  font-size: 14px;
}

.detail-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.5;
}

.detail-meta {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.detail-alert {
  color: var(--danger);
  margin-bottom: 20px;
  line-height: 1.7;
}

.detail-body {
  line-height: 1.8;
  color: #434343;
}

.rich-content {
  line-height: 1.85;
  color: #333;
  word-break: break-word;
}

.rich-content h2 {
  font-size: 18px;
  margin: 18px 0 10px;
  font-weight: 700;
  color: #1a1a1a;
}

.rich-content h3 {
  font-size: 16px;
  margin: 14px 0 8px;
  font-weight: 650;
}

.rich-content p {
  margin: 0 0 10px;
}

.rich-content ul,
.rich-content ol {
  margin: 0 0 12px;
  padding-left: 1.4em;
}

.rich-content li {
  margin: 4px 0;
}

.rich-content a {
  color: var(--primary);
  text-decoration: underline;
}

.rich-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px 0;
  border-radius: 4px;
}

.rich-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.rich-editor {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--border);
}

.rich-editor-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
}

.rich-editor-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.rich-editor-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 2px 4px;
}

.rich-editor-body {
  padding: 12px 14px;
  outline: none;
  line-height: 1.75;
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
}

.rich-editor-body:focus {
  box-shadow: inset 0 0 0 1px rgba(22, 119, 255, 0.25);
}

.rich-editor-body img {
  max-width: 100%;
  height: auto;
}

.rich-editor-hint {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 6px 12px 8px;
  background: #fafbfd;
  border-top: 1px dashed var(--border);
}

.modal.rich-modal {
  max-width: 860px;
  width: 100%;
}

.import-section {
  margin-bottom: 14px;
}

.import-section-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.review-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-timeline-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafbfd;
}

.review-timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.review-timeline-meta .muted,
.info-grid .muted {
  color: var(--text-secondary);
  font-size: 12px;
}

.review-timeline-body {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

.review-remark {
  margin-top: 6px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 4px;
  border: 1px dashed var(--border);
  color: var(--text);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: #fafafa;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.data-table tr:hover td {
  background: #fafafa;
}

/* ===== Forms ===== */
.form-card {
  max-width: 520px;
  margin: 0 auto;
}

.form-banner {
  background: var(--primary-light);
  border: 1px solid #91d5ff;
  border-radius: 6px;
  padding: 12px 16px;
  color: var(--primary-dark);
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.form-banner::before,
.cand-tip-ico::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='8' r='1.4'/%3E%3Crect x='11' y='11' width='2' height='6' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='8' r='1.4'/%3E%3Crect x='11' y='11' width='2' height='6' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
}

.form-banner-warn {
  background: #fff7e6;
  border-color: #ffd591;
  color: #ad6800;
}

.form-banner-warn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.2L2.8 20.2h18.4L12 3.2z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Crect x='11' y='9' width='2' height='6' rx='1'/%3E%3Ccircle cx='12' cy='17.4' r='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.2L2.8 20.2h18.4L12 3.2z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Crect x='11' y='9' width='2' height='6' rx='1'/%3E%3Ccircle cx='12' cy='17.4' r='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cand-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-size: 13px;
  line-height: 1.6;
}

.cand-tip-ico {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--primary-dark);
  font-size: 0;
  line-height: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 500;
}

.form-group label .req {
  color: var(--danger);
  margin-right: 4px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .icon-left {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrap .icon-right {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.form-control {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.input-wrap .form-control {
  padding-left: 40px;
  padding-right: 40px;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  height: auto;
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
}

.form-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-default {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn-default:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #ff7875;
  color: #fff;
}

.btn-block {
  width: 100%;
  height: 44px;
}

.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-lg {
  height: 46px;
  padding: 0 36px;
  font-size: 16px;
}

/* ===== Profile ===== */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 40px;
}

.info-item {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed #f0f0f0;
}

.info-item .label {
  color: var(--text-secondary);
  min-width: 110px;
  flex-shrink: 0;
}

.info-item .value {
  color: var(--text);
  word-break: break-all;
}

.info-section {
  margin-bottom: 32px;
}

.info-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-section h3::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
}

.profile-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.profile-main {
  flex: 1;
  min-width: 0;
}

.profile-side {
  width: 120px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 0;
}

.profile-side a {
  display: block;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  border-left: 3px solid transparent;
}

.profile-side a:hover,
.profile-side a.active {
  color: var(--primary);
  background: var(--primary-light);
  border-left-color: var(--primary);
}

.photo-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 16px;
}

.photo-preview {
  width: 100px;
  height: 120px;
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  overflow: hidden;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-illust {
  width: 180px;
  height: 140px;
  margin: 0 auto 24px;
  background: linear-gradient(160deg, #e6f7ff 0%, #bae7ff 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  position: relative;
  overflow: hidden;
}

.empty-illust::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  top: -20px;
  right: -10px;
}

.empty-text {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 15px;
}

/* ===== Auth pages ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #e6f4ff 0%, #f0f5ff 40%, #f5f7fa 100%);
}

.auth-page .site-header {
  box-shadow: none;
}

.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}

.auth-card h2 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 8px;
}

.auth-card .auth-desc {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 13px;
}

.auth-footer-link {
  text-align: center;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.captcha-row {
  display: flex;
  gap: 12px;
}

.captcha-box {
  width: 120px;
  height: 42px;
  border-radius: 6px;
  background: linear-gradient(45deg, #f0f0f0, #e6f7ff);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--primary-dark);
  cursor: pointer;
  user-select: none;
  font-size: 18px;
  flex-shrink: 0;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--footer);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 18px 20px;
  font-size: 12px;
  line-height: 1.8;
}

/* ===== Floating ===== */
.float-widget {
  position: fixed;
  right: 24px;
  bottom: 80px;
  width: 56px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
  padding: 10px 6px;
  z-index: 50;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.float-widget:hover {
  box-shadow: var(--shadow-lg);
}

.float-widget .qr {
  font-size: 22px;
  margin-bottom: 4px;
}

.float-widget .txt {
  writing-mode: vertical-rl;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 2px;
  margin: 0 auto;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination button {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text);
}

.pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px 4px 4px;
  border-top: 1px solid var(--border);
}

.admin-pager-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

.admin-pager-meta strong {
  color: var(--text);
  font-weight: 650;
}

.admin-pager-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-pager-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.admin-pager-size select {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.admin-pager-pages {
  margin: 0;
  gap: 4px;
}

.admin-pager-ellipsis {
  color: var(--text-secondary);
  padding: 0 2px;
  font-size: 13px;
}

/* ===== Toast ===== */
.toast-wrap {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  animation: fadeIn 0.25s ease;
  pointer-events: auto;
}

.toast.success {
  background: #389e0d;
}

.toast.warning {
  background: #d48806;
}

.toast.error {
  background: #cf1322;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Admin ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #f0f2f5;
}

.admin-sider {
  width: 220px;
  background: #001529;
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.admin-logo {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 15px;
}

.admin-menu {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}

.admin-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  transition: all 0.2s;
}

.admin-menu a:hover,
.admin-menu a.active {
  color: #fff;
  background: var(--primary);
}

.admin-menu-label {
  padding: 18px 24px 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.04em;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.perm-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

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

.admin-topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.admin-content {
  padding: 24px;
  flex: 1;
}

.admin-layout:has(.cand-page),
.admin-layout:has(.admin-list-page) {
  height: 100vh;
  overflow: hidden;
}

.admin-layout:has(.cand-page) .admin-content,
.admin-layout:has(.admin-list-page) .admin-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 12px;
}

.cand-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 10px;
}

.cand-page .toolbar,
.cand-page .venue-stats,
.cand-page .cand-work-bar {
  flex-shrink: 0;
  margin-bottom: 0;
}

.export-dd {
  position: relative;
  display: inline-block;
}

.export-dd-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 260px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.export-dd-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  line-height: 1.4;
}

.export-dd-item:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.export-dd-title {
  font-weight: 600;
  font-size: 13px;
}

.export-dd-desc {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

.export-dd-item:hover .export-dd-desc {
  color: var(--primary);
}

.cand-list-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
}

.cand-table-wrap {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.cand-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fafafa;
  box-shadow: 0 1px 0 var(--border);
}

.cand-table th,
.cand-table td {
  padding: 8px 10px;
}

.cand-table td.cand-col-pos {
  white-space: normal;
  min-width: 220px;
  max-width: 360px;
  vertical-align: middle;
}

.cand-pos-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cand-pos-item {
  line-height: 1.4;
}

.cand-pos-exam {
  font-size: 12px;
  color: var(--text-secondary);
}

.cand-pos-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-weight: 600;
}

.cand-pos-code {
  font-weight: 500;
  color: var(--primary, #1677ff);
  font-size: 12px;
}

.cand-pos-sub {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 12px;
}

.cand-pos-intend {
  white-space: normal;
  line-height: 1.45;
  color: var(--text-secondary);
}

.cand-pos-none {
  color: #bfbfbf;
}

.cand-pager {
  flex-shrink: 0;
  background: #fff;
  z-index: 3;
}

.cand-pager .admin-pager {
  margin-top: 0;
  padding: 10px 16px;
}

.admin-list-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 10px;
}

.admin-list-page > .toolbar,
.admin-list-page > .venue-stats,
.admin-list-page > .form-banner,
.admin-list-page > .form-hint,
.admin-list-page > .admin-page-tabs,
.admin-list-page > .page-card:not(.admin-list-card) {
  flex-shrink: 0;
  margin-bottom: 0;
}

.admin-list-page > .template-panel {
  max-height: 38vh;
  overflow: auto;
}

.admin-list-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.admin-list-card .admin-table-wrap,
.admin-list-scroll {
  flex: 1;
  overflow: auto;
  min-height: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.admin-list-card .admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fafafa;
  box-shadow: 0 1px 0 var(--border);
}

.admin-list-pager {
  flex-shrink: 0;
  background: #fff;
  z-index: 3;
}

.admin-list-pager .admin-pager {
  margin-top: 0;
  padding: 10px 16px;
}

.admin-list-card > .section-title {
  flex-shrink: 0;
}

.admin-list-card .exam-manage-list {
  padding: 12px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid var(--border);
}

.stat-card .label {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-card .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.stat-card .num.blue {
  color: var(--primary);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-table-wrap {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table th {
  background: #fafafa;
  font-weight: 600;
  color: var(--text-secondary);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #fafafa;
}

.admin-table td.cell-wrap {
  white-space: normal;
  max-width: 320px;
  line-height: 1.55;
}

.admin-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-ops .btn {
  margin: 0;
}

.pos-ratio {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.pos-ratio.is-hot {
  color: #d46b08;
}

.cand-table th:first-child,
.cand-table td.cand-col-photo {
  width: 72px;
  min-width: 72px;
  vertical-align: middle;
}

.cand-person-photo {
  position: relative;
  display: inline-flex;
  cursor: zoom-in;
}

.cand-avatar {
  width: 48px;
  height: 64px;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px;
  display: block;
  background: #f0f2f5;
  border: 1px solid var(--border);
}

.cand-avatar-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: #8c8c8c;
}

.cand-photo-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-sizing: content-box;
}

.cand-photo-dot.is-ok {
  background: #52c41a;
}

.cand-photo-dot.is-miss {
  background: #bfbfbf;
}

.cand-photo-float {
  position: fixed;
  z-index: 4200;
  width: 240px;
  height: 300px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.cand-photo-float.is-show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.cand-photo-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 4px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.tag-blue {
  background: #e6f7ff;
  color: #096dd9;
}

.tag-green {
  background: #f6ffed;
  color: #389e0d;
}

.tag-red {
  background: #fff1f0;
  color: #cf1322;
}

.tag-orange {
  background: #fff7e6;
  color: #d46b08;
}

.tag-gray {
  background: #f5f5f5;
  color: #8c8c8c;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  overflow: auto;
}

.modal-mask.show {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
}

.modal.modal-wide {
  flex: 0 0 auto;
  width: 66.666vw !important;
  max-width: 66.666vw !important;
  min-width: 0 !important;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal.modal-wide .modal-header,
.modal.modal-wide .modal-footer {
  flex-shrink: 0;
}

.modal.modal-wide .modal-body {
  flex: 1 1 auto;
  min-height: 360px;
  overflow: auto;
}

.modal.modal-wide .admin-table-wrap {
  max-height: none;
}

.modal.modal-wide .admin-table th,
.modal.modal-wide .admin-table td {
  white-space: normal;
  word-break: break-word;
}

.modal.modal-wide .admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.modal.modal-wide .admin-table td.cell-wrap {
  white-space: normal;
  word-break: break-word;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 12px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* 考生批量导入 / 批量传照片确认弹窗：固定标题栏与底部按钮，表头吸顶 */
.modal.cand-wide-modal {
  width: min(1100px, 96vw);
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal.cand-wide-modal .modal-header,
.modal.cand-wide-modal .modal-footer {
  flex-shrink: 0;
  background: #fff;
  z-index: 3;
}

.modal.cand-wide-modal .modal-header {
  border-bottom: 1px solid var(--border);
}

.modal.cand-wide-modal .modal-footer {
  border-top: 1px solid var(--border);
  padding: 12px 24px;
}

.modal.cand-wide-modal .modal-body,
.modal.cand-wide-modal .cand-wide-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 24px;
}

.modal.cand-wide-modal .admin-table-wrap {
  max-height: none;
  overflow: visible;
}

.modal.cand-wide-modal .admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fafafa;
  box-shadow: 0 1px 0 var(--border);
}

.modal.cand-wide-modal .admin-table th,
.modal.cand-wide-modal .admin-table td {
  white-space: nowrap;
}

.photo-imp-thumb {
  width: 40px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: block;
  background: #f5f5f5;
}

.photo-imp-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-imp-reason {
  white-space: normal !important;
  max-width: 240px;
  line-height: 1.45;
  color: var(--text-secondary);
  font-size: 12px;
}

/* 批量写入照片进度遮罩 */
.ksdd-progress-mask {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.ksdd-progress-mask.show {
  display: flex;
}

.ksdd-progress-card {
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 12px;
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.ksdd-progress-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border: 3px solid #e6f4ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: ksdd-spin 0.8s linear infinite;
}

@keyframes ksdd-spin {
  to {
    transform: rotate(360deg);
  }
}

.ksdd-progress-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.ksdd-progress-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.ksdd-progress-bar {
  height: 10px;
  background: #edf2f9;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.ksdd-progress-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1677ff, #36cfc9);
  border-radius: 999px;
  transition: width 0.15s linear;
}

.ksdd-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.ksdd-progress-meta strong {
  color: var(--primary);
  font-weight: 700;
}

.modal.cand-modal {
  width: min(960px, 96vw);
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cand-modal .modal-header,
.cand-modal .cand-modal-footer {
  flex-shrink: 0;
}

.cand-modal-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.cand-modal-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

.cand-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 20px;
}

.cand-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.cand-aside {
  width: 168px;
  min-width: 0;
}

.cand-avatar-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #fafafa;
  text-align: center;
}

.cand-avatar-lg {
  width: 120px;
  height: 160px;
  margin: 0 auto 10px;
  border-radius: 4px;
  overflow: hidden;
  background: #eef1f5;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cand-avatar-lg img {
  width: 120px;
  height: 160px;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.cand-avatar-lg span {
  font-size: 32px;
  font-weight: 600;
  color: #8c8c8c;
}

.cand-avatar-name {
  font-weight: 600;
  font-size: 14px;
  word-break: break-all;
}

.cand-avatar-tip {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.cand-aside-tips {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

.cand-main {
  min-width: 0;
}

.cand-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px 14px;
  margin-bottom: 12px;
  background: #fff;
}

.cand-panel-hd {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 12px;
  color: var(--text);
}

.cand-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.cand-fields-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 880px) {
  .cand-fields-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cand-field {
  min-width: 0;
}

.cand-field-full {
  grid-column: 1 / -1;
}

.cand-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.cand-field .form-control {
  height: 36px;
  padding: 0 10px;
}

.cand-field textarea.form-control {
  height: auto;
  padding: 8px 10px;
  min-height: 64px;
}

.cand-modal .region-cascade {
  min-width: 0;
}

.cand-modal .region-cascade .form-control {
  min-width: 0;
  width: 100%;
  height: 36px;
}

.cand-modal-footer {
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 12px 20px 16px;
}

.cand-footer-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

.req {
  color: #cf1322;
  margin-right: 2px;
}

@media (max-width: 760px) {
  .cand-layout {
    grid-template-columns: 1fr;
  }
  .cand-aside {
    width: auto;
  }
  .cand-avatar-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }
  .cand-avatar-lg {
    margin: 0;
    flex-shrink: 0;
  }
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group-full {
  grid-column: 1 / -1;
  margin-bottom: 20px;
}

.reg-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.reg-card-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.reg-card-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== Sub tabs panel ===== */
.tab-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 20px 24px 28px;
}

.section-block {
  margin-bottom: 28px;
}

.section-block .section-title {
  margin-bottom: 16px;
}

/* ===== Service cards (ticket / score list) ===== */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  border-color: #91d5ff;
  box-shadow: 0 4px 14px rgba(24, 144, 255, 0.1);
}

.service-card-main {
  flex: 1;
  min-width: 0;
}

.service-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.45;
}

.service-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 10px;
}

.service-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-card-actions {
  flex-shrink: 0;
}

/* ===== Score cards ===== */
.score-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #fff 0%, #fafcff 100%);
}

.score-card-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}

.score-total-box {
  text-align: center;
  min-width: 110px;
  padding: 12px 16px;
  background: var(--primary-light);
  border-radius: 8px;
  border: 1px solid #91d5ff;
}

.score-total-box .label {
  font-size: 12px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.score-total-box .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.score-subjects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-bottom: 16px;
}

.score-subject {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
}

.score-subject .name {
  color: var(--text-secondary);
}

.score-subject .val strong {
  font-size: 18px;
  color: var(--text);
  margin-right: 2px;
}

.score-extra {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 20px;
}

.score-result {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.score-result.result-pass {
  background: #f6ffed;
  color: #389e0d;
}

.score-result.result-fail {
  background: #fff1f0;
  color: #cf1322;
}

.score-result.result-info {
  background: #e6f7ff;
  color: #096dd9;
}

.score-remark {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 6px;
  color: #874d00;
  font-size: 13px;
  line-height: 1.6;
}

/* ===== Ticket print ===== */
.print-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ticket-sheet {
  /* 与打印纸张内容宽度一致（A4 210mm - 左右各 12mm 页边距），实现所见即所得 */
  width: 186mm;
  max-width: 100%;
  margin: 16px auto 0;
  background: #fff;
  border: 2px solid #1a1a1a;
  padding: 28px 32px 24px;
  color: #000;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.ticket-sheet.has-bg {
  border-color: #666;
}

.ticket-sheet.has-bg .ticket-sheet-inner {
  background: rgba(255, 255, 255, 0.92);
  padding: 16px;
  border-radius: 4px;
}

.ticket-sheet-inner {
  position: relative;
  z-index: 1;
}

.template-panel .template-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  padding: 12px 0 0;
}

.template-panel .template-summary .info-item {
  border-bottom: none;
  padding: 4px 0;
}

.tpl-guide {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
  padding: 14px 16px;
  background: #f5f8fc;
  border: 1px solid #dce6f2;
  border-radius: 6px;
}

.tpl-guide-hd {
  font-size: 13px;
  font-weight: 600;
  color: #1a3a5c;
  margin-bottom: 8px;
}

.tpl-guide-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: #4a5568;
}

.tpl-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tpl-chip {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  color: #2c5282;
  background: #ebf4ff;
  border-radius: 3px;
}

.tpl-chip-row code {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  font-family: Consolas, Monaco, monospace;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 3px;
  cursor: default;
}

.tpl-editor-modal {
  max-width: 1120px;
  width: 96vw;
}

.tpl-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 0;
  min-height: 520px;
}

.tpl-editor-main {
  padding: 0 20px 16px;
  border-right: 1px solid #e8ecf0;
  overflow: auto;
  max-height: 68vh;
}

.tpl-editor-preview {
  padding: 12px 14px 16px;
  background: #f0f3f7;
  overflow: auto;
  max-height: 68vh;
}

.tpl-editor-preview-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
}

.tpl-preview-hint {
  font-weight: 400;
  color: #718096;
}

.tpl-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tpl-preview-clickable {
  cursor: zoom-in;
  border-radius: 4px;
  outline: 1px solid transparent;
  transition: outline-color 0.15s;
}

.tpl-preview-clickable:hover {
  outline-color: #93c5fd;
}

.tpl-preview-sheet {
  transform: scale(0.78);
  transform-origin: top left;
  width: 128%;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.tpl-preview-sheet .ticket-sheet {
  margin: 0;
  width: 100%;
}

.tpl-preview-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tpl-preview-lightbox-dialog {
  background: #fff;
  border-radius: 8px;
  width: min(920px, 96vw);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.tpl-preview-lightbox-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 15px;
  font-weight: 600;
}

.tpl-preview-lightbox-hd .tpl-preview-hint {
  font-size: 12px;
  margin-left: 8px;
}

.tpl-preview-lightbox-body {
  padding: 20px 24px 28px;
  overflow: auto;
  background: #e8edf3;
  flex: 1;
}

.tpl-preview-lightbox-body .tpl-preview-sheet-full {
  max-width: 780px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.tpl-preview-lightbox-body .tpl-preview-sheet-full .ticket-sheet {
  margin: 0;
  width: 100%;
}

.tpl-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
  margin: 0 -20px 16px;
  padding: 0 12px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.tpl-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tpl-tab:hover {
  color: #1a3a5c;
}

.tpl-tab.active {
  color: #1a56db;
  font-weight: 600;
  border-bottom-color: #1a56db;
}

.tpl-pane {
  display: none;
}

.tpl-pane.active {
  display: block;
}

.tpl-var-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 12px;
  color: #78350f;
}

.tpl-var-bar .tpl-var-label {
  font-weight: 600;
  margin-right: 4px;
}

.tpl-var-btn {
  appearance: none;
  border: 1px solid #fbbf24;
  background: #fff;
  color: #92400e;
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  cursor: pointer;
}

.tpl-var-btn:hover {
  background: #fef3c7;
}

.tpl-field-tip {
  font-size: 12px;
  color: #718096;
  margin-top: 4px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .tpl-guide {
    grid-template-columns: 1fr;
  }
  .tpl-editor-layout {
    grid-template-columns: 1fr;
  }
  .tpl-editor-main {
    border-right: none;
    max-height: none;
  }
  .tpl-editor-preview {
    max-height: 360px;
    border-top: 1px solid #e8ecf0;
  }
}

.ticket-head {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 14px;
}

.ticket-org {
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.ticket-head h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.ticket-no {
  font-size: 14px;
  font-weight: 600;
}

.ticket-body {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
}

.ticket-info {
  flex: 1;
  min-width: 0;
}

.ticket-photo {
  width: 120px;
  height: 150px;
  border: 1px solid #333;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.ticket-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ticket-photo-placeholder {
  font-size: 42px;
  font-weight: 700;
  color: #bfbfbf;
}

.ticket-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ticket-table th,
.ticket-table td {
  border: 1px solid #333;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.ticket-table th {
  width: 88px;
  background: #f7f7f7;
  font-weight: 600;
  white-space: nowrap;
}

.ticket-sub-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
}

.ticket-subjects {
  margin-bottom: 16px;
}

.ticket-subject-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ticket-subject-table th,
.ticket-subject-table td {
  border: 1px solid #333;
  padding: 8px 10px;
  text-align: center;
}

.ticket-subject-table th {
  background: #f7f7f7;
}

.ticket-notice {
  margin-bottom: 16px;
}

.ticket-notice-body {
  font-size: 12px;
  line-height: 1.8;
  color: #333;
  border: 1px solid #333;
  padding: 10px 12px;
  min-height: 72px;
}

.ticket-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #555;
  border-top: 1px dashed #999;
  padding-top: 12px;
}

/* ---- 样张模型：公务员录用款 ---- */
.ticket-sheet.layout-gwy {
  border: 1px solid #222;
  padding: 22px 26px 18px;
  font-family: "SimSun", "Songti SC", "Noto Serif SC", serif;
}

.tk-gwy-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 18px;
  line-height: 1.4;
}

.tk-gwy-top {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.tk-gwy-fields {
  flex: 1;
  min-width: 0;
}

.tk-gwy-line {
  display: flex;
  gap: 12px;
  font-size: 13px;
  line-height: 1.85;
  border-bottom: 1px solid transparent;
}

.tk-gwy-line span {
  flex: 0 0 5em;
  color: #333;
}

.tk-gwy-photo {
  width: 108px;
  height: 144px;
  border: 1px solid #222;
  flex-shrink: 0;
  overflow: hidden;
  background: #fafafa;
}

.tk-gwy-photo img,
.tk-gwy-photo .ticket-photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #999;
}

.tk-gwy-schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 18px;
}

.tk-gwy-schedule th,
.tk-gwy-schedule td {
  border: 1px solid #222;
  padding: 7px 6px;
  text-align: center;
}

.tk-gwy-schedule th {
  font-weight: 700;
  background: #f7f7f7;
}

.tk-gwy-notice-title {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.tk-gwy-notice {
  font-size: 12px;
  line-height: 1.75;
  color: #222;
  margin-bottom: 16px;
}

.tk-gwy-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.tk-gwy-issuer {
  font-size: 13px;
  text-align: right;
  flex: 1;
  padding-bottom: 6px;
}

.tk-qr {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tk-qr-box {
  width: 72px;
  height: 72px;
  border: 1px solid #222;
  background:
    linear-gradient(#222 0 0) 0 0 / 30% 30%,
    linear-gradient(#222 0 0) 100% 0 / 30% 30%,
    linear-gradient(#222 0 0) 0 100% / 30% 30%,
    repeating-linear-gradient(
      90deg,
      #222 0 2px,
      transparent 2px 5px
    ),
    repeating-linear-gradient(
      0deg,
      #222 0 2px,
      transparent 2px 5px
    );
  background-repeat: no-repeat;
  background-color: #fff;
}

.tk-qr-tip {
  font-size: 11px;
  color: #444;
  line-height: 1.5;
}

/* ---- 样张模型：统考密表款 ---- */
.ticket-sheet.layout-tongkao {
  border: 1px solid #111;
  padding: 18px 20px;
  font-family: "SimSun", "Songti SC", serif;
}

.tk-tk-head {
  text-align: center;
  margin-bottom: 12px;
}

.tk-tk-exam {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tk-tk-cert {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
}

.tk-tk-main {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 14px;
}

.tk-tk-main th,
.tk-tk-main td {
  border: 1px solid #111;
  padding: 6px 8px;
  vertical-align: middle;
}

.tk-tk-main th {
  width: 88px;
  text-align: center;
  font-weight: 700;
  background: #fafafa;
  white-space: nowrap;
}

.tk-tk-photo {
  width: 110px;
  height: 145px;
  padding: 4px !important;
  text-align: center;
  vertical-align: middle !important;
}

.tk-tk-photo img,
.tk-tk-photo .ticket-photo-placeholder {
  width: 100px;
  height: 133px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 32px;
  color: #999;
  background: #f3f3f3;
}

.tk-tk-schedule-cell {
  width: 42%;
  vertical-align: top !important;
  padding: 6px !important;
}

.tk-tk-sch-title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 12px;
}

.tk-tk-sch {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.tk-tk-sch th,
.tk-tk-sch td {
  border: 1px solid #333;
  padding: 4px;
  text-align: center;
}

.tk-tk-seat {
  font-weight: 700;
  font-size: 14px;
  text-align: center !important;
}

.tk-tk-notice-title {
  text-align: center;
  font-weight: 700;
  margin: 10px 0 8px;
}

.tk-tk-notice {
  font-size: 12px;
  line-height: 1.7;
  border: 1px solid #ccc;
  padding: 10px 12px;
  min-height: 80px;
}

.tk-tk-foot {
  text-align: right;
  font-size: 12px;
  margin-top: 10px;
  color: #333;
}

/* ---- 样张模型：资格考试款 ---- */
.ticket-sheet.layout-zige {
  border: 1px solid #333;
  padding: 20px 22px;
  font-family: "SimSun", "Songti SC", serif;
}

.tk-zg-head {
  text-align: center;
  margin-bottom: 14px;
}

.tk-zg-exam {
  font-size: 16px;
  font-weight: 700;
}

.tk-zg-cert {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  margin-top: 4px;
}

.tk-zg-top {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.tk-zg-fields {
  flex: 1;
}

.tk-zg-line {
  font-size: 13px;
  line-height: 1.9;
}

.tk-zg-line label {
  display: inline-block;
  min-width: 5em;
  color: #444;
}

.tk-zg-line.twin {
  display: flex;
  gap: 24px;
}

.tk-zg-line.twin span {
  flex: 1;
}

.tk-zg-photo {
  width: 105px;
  height: 140px;
  border: 1px solid #333;
  flex-shrink: 0;
  overflow: hidden;
}

.tk-zg-photo img,
.tk-zg-photo .ticket-photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #999;
  background: #f5f5f5;
}

.tk-zg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}

.tk-zg-table th,
.tk-zg-table td {
  border: 1px solid #333;
  padding: 7px 8px;
  text-align: center;
}

.tk-zg-table th:first-child {
  width: 88px;
  background: #f7f7f7;
  white-space: nowrap;
}

.tk-zg-seat {
  white-space: nowrap;
  min-width: 88px;
}

.tk-zg-seat span {
  display: block;
  font-size: 11px;
  color: #555;
}

.tk-zg-seat b {
  font-size: 16px;
}

.tk-zg-tips {
  font-size: 12px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 12px;
}

.tk-zg-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #555;
  border-top: 1px dashed #999;
  padding-top: 10px;
}

/* 版式选择：样张分组 */
.tpl-layout-group-hd {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 600;
  color: #1a3a5c;
  margin: 4px 0 0;
  padding-top: 4px;
}

.tpl-layout-card .tpl-layout-tag {
  display: inline-block;
  font-size: 10px;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 2px;
  padding: 0 5px;
  margin-left: 6px;
  font-weight: 600;
  vertical-align: middle;
}

.tpl-layout-wire {
  height: 36px;
  margin: 6px 0 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 3px;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
}

.tpl-layout-wire::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #94a3b8;
  opacity: 0.5;
}

.tpl-layout-wire[data-wire="gwy"]::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 8px;
  width: 10px;
  height: 14px;
  border: 1px solid #64748b;
}

.tpl-layout-wire[data-wire="tongkao"]::after {
  content: "";
  position: absolute;
  inset: 8px 10px 8px 28%;
  border: 1px solid #64748b;
  background: repeating-linear-gradient(
    #e2e8f0 0 3px,
    transparent 3px 6px
  );
}

.tpl-layout-wire[data-wire="zige"]::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  height: 10px;
  border: 1px solid #64748b;
}
.ticket-sheet.layout-official {
  border: 1px solid #8b1e1e;
  padding: 22px 26px 20px;
}

.tk-off-banner {
  text-align: center;
  border-bottom: 3px double #8b1e1e;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.tk-off-org {
  font-size: 13px;
  letter-spacing: 3px;
  color: #5c1010;
  margin-bottom: 6px;
}

.tk-off-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 1px;
  margin: 0 0 10px;
  line-height: 1.35;
}

.tk-off-no {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #8b1e1e;
}

.tk-off-no span {
  font-weight: 500;
  color: #666;
  font-size: 12px;
}

.tk-off-body {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
}

.tk-off-meta {
  flex: 1;
  min-width: 0;
  border-top: 1px solid #d4d4d4;
}

.tk-off-row {
  display: grid;
  grid-template-columns: 72px 1fr 56px 1fr;
  gap: 0 10px;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  padding: 8px 0;
  font-size: 13px;
}

.tk-off-row span {
  color: #6b7280;
}

.tk-off-row b {
  font-weight: 600;
  color: #111;
}

.tk-off-row b.wide {
  grid-column: 2 / -1;
}

.tk-off-row b.seat {
  color: #8b1e1e;
  font-size: 15px;
}

.layout-official .ticket-photo {
  width: 110px;
  height: 140px;
  border: 1px solid #8b1e1e;
  flex-shrink: 0;
}

.layout-official .ticket-notice-body {
  border-color: #c4a8a8;
  background: #faf7f7;
}

.layout-official .ticket-subject-table th {
  background: #f8efef;
}

/* ---- 紧凑实用版 ---- */
.ticket-sheet.layout-compact {
  border: 1px solid #333;
  padding: 16px 18px;
}

.tk-cp-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid #222;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.tk-cp-org {
  font-size: 12px;
  color: #555;
  margin-bottom: 4px;
}

.tk-cp-head h1 {
  font-size: 16px;
  margin: 0;
  line-height: 1.3;
}

.tk-cp-no {
  text-align: right;
  font-size: 11px;
  color: #666;
  white-space: nowrap;
}

.tk-cp-no strong {
  font-size: 13px;
  color: #111;
}

.tk-cp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}

.tk-cp-table th,
.tk-cp-table td {
  border: 1px solid #444;
  padding: 5px 7px;
  vertical-align: middle;
}

.tk-cp-table th {
  background: #f3f3f3;
  width: 58px;
  font-weight: 600;
  white-space: nowrap;
}

.tk-cp-photo {
  width: 88px;
  padding: 4px !important;
  text-align: center;
}

.tk-cp-photo img,
.tk-cp-photo .ticket-photo-placeholder {
  width: 78px;
  height: 100px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.tk-cp-photo .ticket-photo-placeholder {
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #999;
}

/* ---- 简洁卡片版 ---- */
.ticket-sheet.layout-modern {
  border: none;
  box-shadow: 0 0 0 1px #dbe3ee;
  padding: 24px 26px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 48px);
}

.tk-md-head {
  text-align: center;
  margin-bottom: 18px;
}

.tk-md-org {
  font-size: 12px;
  color: #64748b;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.tk-md-head h1 {
  font-size: 18px;
  margin: 0 0 10px;
  color: #0f172a;
}

.tk-md-pill {
  display: inline-block;
  padding: 4px 12px;
  background: #e8eef7;
  color: #1e3a5f;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
}

.tk-md-body {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.tk-md-cards {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tk-md-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
}

.tk-md-card.span2 {
  grid-column: 1 / -1;
}

.tk-md-k {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.tk-md-v {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.tk-md-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.5;
}

.layout-modern .ticket-photo {
  border-radius: 6px;
  border-color: #cbd5e1;
  overflow: hidden;
}

.layout-modern .ticket-notice-body,
.layout-modern .ticket-subject-table th,
.layout-modern .ticket-subject-table td {
  border-color: #cbd5e1;
}

.layout-modern .ticket-subject-table th {
  background: #f1f5f9;
}

/* ---- 自定义 HTML 默认样式 ---- */
.ticket-custom .tk-c-head {
  text-align: center;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.ticket-custom .tk-c-org {
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.ticket-custom h1 {
  font-size: 18px;
  margin: 0 0 8px;
}

.ticket-custom .tk-c-no {
  font-weight: 700;
  font-size: 13px;
}

.ticket-custom .tk-c-main {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.ticket-custom .tk-c-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  font-size: 13px;
}

.ticket-custom .tk-c-grid .span2 {
  grid-column: 1 / -1;
}

.ticket-custom .tk-c-grid b {
  display: inline-block;
  min-width: 4.5em;
  color: #666;
  font-weight: 500;
  margin-right: 6px;
}

.ticket-custom .tk-c-notice {
  margin-bottom: 12px;
}

.ticket-custom .tk-c-sub {
  font-weight: 700;
  margin-bottom: 6px;
}

.ticket-custom .tk-c-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #555;
  border-top: 1px dashed #999;
  padding-top: 10px;
}

/* 版式选择器 */
.tpl-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.tpl-layout-card {
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  background: #fff;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tpl-layout-card:hover {
  border-color: #93c5fd;
}

.tpl-layout-card.active {
  border-color: #1a56db;
  box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.15);
  background: #f8fbff;
}

.tpl-layout-card strong {
  display: block;
  font-size: 13px;
  color: #1a3a5c;
  margin-bottom: 4px;
}

.tpl-layout-card span {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.tpl-custom-html-wrap {
  display: none;
}

.tpl-custom-html-wrap.show {
  display: block;
}

.subj-row {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px 4px;
  margin-bottom: 10px;
  background: #fafbfc;
}

.subj-row-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.subj-row-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  html,
  body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  .site-header,
  .site-footer,
  .float-widget,
  .no-print,
  .toast-wrap,
  .sub-tabs,
  .print-toolbar,
  .modal-mask,
  .assign-stage {
    display: none !important;
  }

  .page-main,
  .tab-panel,
  .site-body,
  .layout-main {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .ticket-sheet {
    position: static !important;
    left: auto !important;
    top: auto !important;
    /* 与屏幕预览同尺寸，避免打印时被拉满 A4 而导致行高、列宽变化 */
    width: 186mm !important;
    max-width: 186mm !important;
    margin: 0 auto !important;
    border-width: 1.5px !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* “表格在左、照片在右”是准考证的固定版式，纸张上必须与屏幕一致 */
  .ticket-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
  }

  .ticket-photo {
    width: 120px !important;
    height: 150px !important;
  }

  .ticket-sheet.has-bg .ticket-sheet-inner {
    background: rgba(255, 255, 255, 0.96) !important;
  }
}

@media screen and (max-width: 900px) {
  .score-subjects,
  .score-extra {
    grid-template-columns: 1fr;
  }

  .score-card-head {
    flex-direction: column;
  }

  .ticket-body {
    flex-direction: column-reverse;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .service-card {
    flex-direction: column;
    align-items: stretch;
  }

  .service-card-actions .btn {
    width: 100%;
  }

  .region-cascade {
    grid-template-columns: 1fr;
  }
}

/* ===== Region cascade ===== */
.region-cascade {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.region-cascade.is-disabled {
  opacity: 0.72;
  pointer-events: none;
}

.resume-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.resume-section-head h3::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: -2px;
}

.resume-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px 6px;
  margin-bottom: 12px;
  background: #fafcff;
}

.resume-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 900px) {
  .stat-cards {
    grid-template-columns: 1fr 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .profile-side {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .brand-text .sub {
    display: none;
  }
}

@media (max-width: 600px) {
  .stat-cards {
    grid-template-columns: 1fr;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .exam-card-illust {
    display: none;
  }

  .admin-sider {
    display: none;
  }
}

/* 管理页内 Tab */
.admin-page-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  border-radius: 8px 8px 0 0;
  padding: 0 8px;
}

.admin-page-tabs button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 12px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.admin-page-tabs button:hover {
  color: var(--primary);
}

.admin-page-tabs button.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* ---- 考场安排 ---- */
.venue-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.venue-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.venue-stat .label {
  font-size: 12px;
  color: var(--text-secondary);
}

.venue-stat .num {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.venue-stat.warn .num {
  color: #d46b08;
}

.venue-stat.ok .num {
  color: #389e0d;
}

.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.venue-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.venue-card-hd {
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0f5ff 0%, #fff 70%);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.venue-card-hd h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.venue-card-hd .addr {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.venue-card-bd {
  padding: 12px 16px 16px;
  flex: 1;
}

.room-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.room-row:last-child {
  border-bottom: none;
}

.room-row .name {
  font-weight: 600;
  font-size: 14px;
}

.room-row .meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.room-fill {
  min-width: 88px;
  text-align: right;
}

.room-fill .ratio {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.room-bar {
  margin-top: 6px;
  height: 6px;
  background: #eef2f8;
  border-radius: 999px;
  overflow: hidden;
}

.room-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1677ff, #69b1ff);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.room-bar.full > span {
  background: linear-gradient(90deg, #d46b08, #faad14);
}

.venue-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-secondary);
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.room-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-editor-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr auto;
  gap: 8px;
  align-items: center;
}

/* 随机分配动效层 */
.assign-stage {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8, 24, 48, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.assign-stage.show {
  opacity: 1;
  pointer-events: auto;
}

.assign-panel {
  width: min(920px, 100%);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s ease;
}

.assign-stage.show .assign-panel {
  transform: none;
}

.assign-panel-hd {
  padding: 18px 22px;
  background: linear-gradient(120deg, #0b3a75, #1677ff 55%, #4096ff);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.assign-panel-hd h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}

.assign-panel-hd .phase {
  font-size: 13px;
  opacity: 0.9;
}

.assign-panel-bd {
  padding: 20px 22px 24px;
}

.assign-progress {
  height: 10px;
  background: #edf2f9;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.assign-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1677ff, #36cfc9);
  border-radius: 999px;
  transition: width 0.12s linear;
}

.assign-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.assign-arena {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  min-height: 280px;
}

.assign-slot {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 30%, #e6f4ff, #f7faff 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.assign-slot::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(22, 119, 255, 0.12),
    transparent 40%
  );
  animation: assignSpin 2.4s linear infinite;
  opacity: 0;
}

.assign-slot.spinning::before {
  opacity: 1;
}

@keyframes assignSpin {
  to {
    transform: rotate(360deg);
  }
}

.assign-name {
  font-size: 28px;
  font-weight: 700;
  color: #0b3a75;
  letter-spacing: 0.08em;
  min-height: 1.2em;
  transition: transform 0.08s ease, opacity 0.08s ease;
}

.assign-name.flip {
  transform: translateY(-6px);
  opacity: 0.35;
}

.assign-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.assign-rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  align-content: start;
  max-height: 320px;
  overflow: auto;
}

.assign-room-chip {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.assign-room-chip.hit {
  border-color: #1677ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.18);
  transform: scale(1.03);
}

.assign-room-chip .t {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assign-room-chip .n {
  margin-top: 2px;
  font-weight: 650;
  font-size: 14px;
}

.assign-room-chip .c {
  margin-top: 6px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #1677ff;
  font-weight: 600;
}

.assign-feed {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 120px;
  overflow: auto;
  background: #fafbfd;
}

.assign-feed-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid #eef2f8;
  animation: feedIn 0.25s ease;
}

@keyframes feedIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.assign-feed-item:last-child {
  border-bottom: none;
}

.assign-feed-item .tag {
  color: #1677ff;
  font-weight: 600;
}

.assign-done {
  text-align: center;
  padding: 28px 12px 8px;
}

.assign-done .big {
  font-size: 42px;
  line-height: 1;
}

.assign-done h3 {
  margin: 10px 0 6px;
  font-size: 20px;
}

.assign-done p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ===== Upload attachments ===== */
.upload-items-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-item-row {
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fafafa;
}

.upload-item-row .form-row-2 {
  margin-bottom: 0;
}

.upload-item-row .row-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.upload-block {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}

.upload-block.need-fix {
  border-color: #ffd591;
  background: #fffbe6;
}

.upload-block-title {
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.upload-block-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.upload-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 4px;
}

.upload-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 6px 10px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  background: #fafafa;
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  position: relative;
}

.upload-file-chip img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.upload-file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}

.upload-file-chip small {
  display: block;
  color: #999;
  font-size: 11px;
}

.upload-file-ico {
  font-size: 20px;
  line-height: 1;
}

.upload-file-chip .chip-remove {
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}

.upload-file-chip .chip-remove:hover {
  color: var(--danger);
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-actions .form-hint {
  margin: 0;
}

.attach-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.attach-review-item {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fafafa;
}

.attach-review-item.returned {
  border-color: #ffd591;
  background: #fffbe6;
}

.attach-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.attach-review-head label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  margin: 0;
  cursor: pointer;
}

@media (max-width: 900px) {
  .venue-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assign-arena {
    grid-template-columns: 1fr;
  }

  .exam-manage-grid {
    grid-template-columns: 1fr;
  }

  .exam-list-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===== Admin exam list ===== */
.exam-list-toolbar {
  align-items: center;
  gap: 12px;
}

.exam-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.filter-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.4;
}

.filter-chip.on {
  border-color: var(--primary);
  color: var(--primary);
  background: #e6f7ff;
  font-weight: 600;
}

.filter-split {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
}

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

.exam-manage-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px 14px;
}

.exam-manage-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.exam-manage-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.exam-manage-sub {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 12px;
}

.exam-manage-tags {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.exam-type-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.exam-type-lx {
  background: #f0f5ff;
  color: #2f54eb;
  border: 1px solid #adc6ff;
}

.exam-type-dd {
  background: #fff7e6;
  color: #d46b08;
  border: 1px solid #ffd591;
}

.exam-manage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 14px 0 12px;
  padding: 12px 14px;
  background: #fafafa;
  border-radius: 8px;
}

.exam-manage-cell .k {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.exam-manage-cell .v {
  font-size: 13px;
  line-height: 1.45;
}

.exam-manage-cell .v.muted {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.exam-manage-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.exam-manage-stats {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}

.exam-manage-stats b {
  color: var(--text);
  font-size: 16px;
  margin-right: 4px;
}

.exam-manage-actions {
  display: flex;
  gap: 8px;
}
