:root {
  --blue-950: #0b2f50;
  --blue-900: #103d67;
  --blue-800: #124b7a;
  --blue-700: #145b91;
  --blue-600: #1769aa;
  --blue-100: #eaf3f9;
  --blue-50: #f5f9fc;
  --surface: #ffffff;
  --surface-muted: #f7fafc;
  --line: #d5e0e9;
  --line-strong: #aebfcd;
  --text: #1d2d3d;
  --text-muted: #607386;
  --shadow-panel: 0 18px 48px rgb(20 75 122 / 10%), 0 2px 8px rgb(15 45 70 / 5%);
  color: #1f2937;
  background: #f3f5f7;
  font-family: SimSun, "宋体", "Microsoft YaHei", "微软雅黑", serif;
}

* { box-sizing: border-box; }
body { position: relative; min-height: 100vh; margin: 0; color: var(--text); background: #f1f6fa; }
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 15% 18%, rgb(255 255 255 / 86%) 0 11%, transparent 35%),
    linear-gradient(rgb(18 75 122 / 2.2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(18 75 122 / 2.2%) 1px, transparent 1px),
    linear-gradient(145deg, #f7fafc 0%, #eef5f9 52%, #f7fafc 100%);
  background-size: auto, 36px 36px, 36px 36px, auto;
  content: "";
  pointer-events: none;
}
.container { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.site-header { padding: 18px 0; color: #fff; background: #124b7a; }
.site-header-inner { width: min(1180px, calc(100% - 96px)); min-height: 70px; display: flex; align-items: center; justify-content: flex-start; gap: 20px; }
.brand-logo-panel { display: flex; flex: 0 0 180px; align-items: center; justify-content: flex-start; width: 180px; min-height: 70px; }
.brand-logo-panel img { display: block; width: auto; height: auto; max-width: 100%; max-height: 76px; object-fit: contain; mix-blend-mode: multiply; filter: brightness(1.25) contrast(1.05); }
.brand-titles { min-width: 0; text-align: left; }
.company-name { margin: 0 0 7px; font-size: 23px; font-weight: 800; letter-spacing: 1px; }
.system-name { margin: 0; font-size: 17px; opacity: .96; }
.page-content { padding: 48px 0; }
.auth-card, .panel {
  margin: 0 auto;
  padding: 32px;
  border: 1px solid #dbe2e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 30px rgb(15 23 42 / 7%);
}
.auth-card { max-width: 440px; }
h1 { margin-top: 0; color: #17324d; }
.muted { color: #667085; }
label { display: block; margin: 18px 0 7px; font-weight: 600; }
input, textarea { width: 100%; padding: 11px 12px; border: 1px solid #aebbc7; border-radius: 6px; font: inherit; }
button, .primary-button { cursor: pointer; font: inherit; }
.primary-button, .secondary-button { padding: 11px 18px; border-radius: 6px; font-weight: 700; }
.primary-button { width: 100%; margin-top: 24px; border: 0; color: #fff; background: #1769aa; }
.secondary-button { border: 1px solid #9aa9b7; color: #25445f; background: #fff; }
.secondary-link-button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border: 1px solid #9aa9b7; border-radius: 6px; color: #25445f; background: #fff; font-weight: 700; text-decoration: none; }
.primary-link-button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; border-radius: 6px; color: #fff; background: #1769aa; font-weight: 700; text-decoration: none; }
.alert { margin-bottom: 18px; padding: 12px 14px; border-radius: 6px; }
.alert-error { color: #8a1c1c; background: #fde8e8; }
.alert-success { color: #166534; background: #e7f7ec; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.narrow-panel { max-width: 680px; }
.text-link { color: #1769aa; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.dashboard-links { display: flex; gap: 20px; flex-wrap: wrap; }
.search-form { margin: 28px 0 20px; }
.list-actions { display: flex; justify-content: flex-end; gap: 10px; margin: -4px 0 18px; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; }
.compact-button, .danger-button { padding: 10px 18px; border-radius: 6px; font-weight: 700; cursor: pointer; }
.compact-button { border: 0; color: #fff; background: #1769aa; }
.danger-button { border: 1px solid #b42318; color: #9b1c1c; background: #fff5f4; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 13px 12px; border-bottom: 1px solid #dce4ea; text-align: left; vertical-align: top; }
.data-table th { color: #334e68; background: #eef3f7; white-space: nowrap; }
.empty-cell { padding: 36px !important; color: #667085; text-align: center !important; }
.pagination { display: flex; justify-content: center; gap: 18px; margin-top: 24px; }
.pagination a { color: #1769aa; font-weight: 700; }
.detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 24px 0; border: 1px solid #dce4ea; background: #dce4ea; }
.detail-summary div { display: grid; gap: 7px; padding: 16px; background: #f8fafc; }
.detail-summary span { color: #667085; font-size: 13px; }
.detail-summary strong { overflow-wrap: anywhere; color: #17324d; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 22px; align-items: start; }
.subpanel { padding: 22px; border: 1px solid #dce4ea; border-radius: 8px; background: #fff; }
.subpanel h2 { margin: 0 0 16px; color: #17324d; font-size: 19px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.management-stack { display: grid; gap: 16px; }
.check-label { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.check-label input { width: auto; }
.secret-value { padding: 12px; border: 1px dashed #a66b00; border-radius: 6px; background: #fff8e6; font-family: Consolas, monospace; font-size: 17px; overflow-wrap: anywhere; }
.warning-text { color: #8a5a00; font-size: 13px; }
.field-error { margin: 7px 0 0; color: #9b1c1c; font-size: 14px; }
input[type="file"] { padding: 14px; background: #f8fafc; }
.exam-schedule { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; padding: 18px 20px; border-left: 4px solid #1769aa; background: #eef5fa; }
.exam-schedule div { display: grid; gap: 5px; }
.exam-schedule span { color: #5f7181; font-size: 13px; }
.exam-schedule strong { color: #17324d; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.stat-card { padding: 22px; border: 1px solid #dce4ea; border-radius: 8px; background: #f8fafc; }
.stat-label { margin: 0; color: #4b6073; font-size: 14px; font-weight: 700; }
.stat-value { margin: 12px 0 8px; color: #124b7a; font-size: 34px; font-weight: 800; line-height: 1.1; }
.stat-value-time { min-height: 37px; font-size: 18px; line-height: 1.5; }
.stat-note { margin: 0; color: #718096; font-size: 13px; }
.login-layout { max-width: 920px; margin: 0 auto; }
.login-layout-centered { display: flex; justify-content: center; }
.candidate-auth-card { width: 100%; }
.login-layout-centered .candidate-auth-card { max-width: 440px; }
.notice-card { padding: 32px; border: 1px solid #cddbe6; border-radius: 10px; background: #eef5fa; }
.notice-card h2 { margin-top: 0; color: #17324d; }
.notice-card ol { margin: 0; padding-left: 22px; color: #3f5366; line-height: 1.9; }
.notice-trigger-row { margin-top: 18px; padding-bottom: 14px; border-bottom: 1px solid #d5dee6; text-align: right; }
.notice-trigger { padding: 0; border: 0; color: #1769aa; background: transparent; font-weight: 700; cursor: pointer; }
.notice-trigger:hover { text-decoration: underline; }
.query-notice-dialog { width: min(520px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 10px; color: #1f2937; background: #fff; box-shadow: 0 24px 60px rgb(15 23 42 / 28%); }
.query-notice-dialog::backdrop { background: rgb(15 23 42 / 58%); }
.query-notice-content { padding: 30px 32px; }
.query-notice-content h2 { margin: 0 0 18px; border: 0; color: #17324d; text-align: center; }
.query-notice-content ol { margin: 0; padding-left: 24px; color: #3f5366; line-height: 1.9; }
.query-notice-close { margin-top: 22px; }
.password-rules { display: grid; gap: 5px; margin: 22px 0; padding: 14px; border-left: 4px solid #2d79b7; background: #eef5fa; color: #3f5366; font-size: 14px; }
.standalone-logout { margin-top: 12px; text-align: center; }
.result-page { max-width: 920px; margin: 0 auto; }
.result-toolbar { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.result-heading { margin-bottom: 20px; text-align: center; }
.result-heading h1 { margin: 0; color: #17324d; font-size: 30px; line-height: 1.35; letter-spacing: 1px; }
.result-heading p { margin: 9px 0 0; color: #17324d; font-size: 24px; font-weight: 800; }
.result-notice { margin: 0 0 18px; padding: 14px 16px; border-left: 4px solid #1769aa; color: #40566a; background: #eef5fa; line-height: 1.75; }
.result-card { display: grid; grid-template-columns: minmax(0, 1fr) 210px; overflow: hidden; border: 1px solid #9aa9b7; border-radius: 8px; background: #fff; box-shadow: 0 8px 30px rgb(15 23 42 / 7%); }
.result-details { margin: 0; }
.result-details div { display: grid; grid-template-columns: 120px minmax(0, 1fr); min-height: 54px; border-bottom: 1px solid #cbd5dd; }
.result-details div:last-child { border-bottom: 0; }
.result-details dt, .result-details dd { display: flex; align-items: center; margin: 0; padding: 12px 15px; }
.result-details dt { justify-content: center; border-right: 1px solid #cbd5dd; color: #27445e; background: #f0f4f7; font-weight: 700; }
.result-details dd { overflow-wrap: anywhere; color: #1f2937; }
.result-media { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 18px; padding: 24px 22px; border-left: 1px solid #9aa9b7; background: #f8fafc; }
.result-photo { display: flex; align-items: center; justify-content: center; width: 150px; height: 200px; margin: 0 auto; border: 1px solid #8999a7; color: #667085; background: #fff; }
.result-photo img { width: 100%; height: 100%; object-fit: cover; }
.result-download { width: 100%; text-align: center; }
.ticket-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; max-width: 860px; margin: 0 auto 18px; }
.ticket-action-buttons { display: flex; gap: 10px; }
.ticket-sheet { max-width: 860px; min-height: 1040px; margin: 0 auto; padding: 54px; border: 1px solid #b8c3cc; background: #fff; box-shadow: 0 8px 30px rgb(15 23 42 / 8%); }
.ticket-heading { padding-bottom: 24px; border-bottom: 3px double #20384d; text-align: center; }
.ticket-heading p { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.ticket-heading h1 { margin: 0; font-size: 30px; letter-spacing: 2px; }
.ticket-body { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 32px; padding: 36px 0; }
.ticket-details { margin: 0; border-top: 1px solid #aeb9c3; border-left: 1px solid #aeb9c3; }
.ticket-details div { display: grid; grid-template-columns: 110px minmax(0, 1fr); }
.ticket-details dt, .ticket-details dd { margin: 0; padding: 12px 14px; border-right: 1px solid #aeb9c3; border-bottom: 1px solid #aeb9c3; }
.ticket-details dt { background: #f0f3f5; font-weight: 700; text-align: center; }
.ticket-number { font-weight: 800; letter-spacing: 1px; }
.ticket-photo { display: flex; align-items: center; justify-content: center; width: 150px; height: 200px; border: 1px solid #8999a7; color: #667085; background: #f8fafc; }
.ticket-photo img { width: 100%; height: 100%; object-fit: cover; }
.ticket-footer { margin-top: 20px; padding: 18px 20px; border: 1px solid #c8d1d8; background: #f8fafc; line-height: 1.7; }
.ticket-footer p { margin: 7px 0 0; }

/* 上线前轻量视觉优化：仅调整共享视觉层，不改变页面行为。 */
.site-header {
  position: relative;
  padding: 17px 0;
  background: linear-gradient(112deg, var(--blue-950) 0%, var(--blue-800) 58%, #176394 100%);
  box-shadow: 0 5px 18px rgb(11 47 80 / 18%);
}
.site-header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #80bdd9 0%, #d8eef8 28%, rgb(255 255 255 / 18%) 72%, transparent 100%);
  content: "";
}
.site-header-inner { gap: 24px; }
.brand-logo-panel { padding: 5px 0; }
.brand-logo-panel img { filter: brightness(1.34) contrast(1.06); }
.brand-titles { padding-left: 22px; border-left: 1px solid rgb(255 255 255 / 28%); }
.company-name { margin-bottom: 6px; font-size: 24px; letter-spacing: 1.5px; text-shadow: 0 1px 1px rgb(0 0 0 / 15%); }
.system-name { color: #f4f9fc; font-size: 17px; letter-spacing: .4px; }
.page-content { padding-top: 52px; padding-bottom: 56px; }

.auth-card, .panel {
  border-color: var(--line);
  background: rgb(255 255 255 / 97%);
  box-shadow: var(--shadow-panel);
}
.auth-card {
  position: relative;
  overflow: hidden;
  padding: 36px 38px 38px;
  border-radius: 12px;
}
.auth-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-900), var(--blue-600), #74b2d1);
  content: "";
}
.auth-card h1, .panel h1 { margin-bottom: 10px; color: var(--blue-950); letter-spacing: .5px; }
.auth-card h1 { font-size: 27px; }
.muted { color: var(--text-muted); line-height: 1.65; }
label { color: #243f58; letter-spacing: .2px; }
input, textarea {
  min-height: 44px;
  border-color: var(--line-strong);
  background: #fbfdfe;
  color: var(--text);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:hover, textarea:hover { border-color: #7f9caf; background: #fff; }
input:focus, textarea:focus {
  outline: 0;
  border-color: var(--blue-600);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(23 105 170 / 13%);
}
.primary-button, .primary-link-button, .compact-button {
  border: 1px solid #0f5e9c;
  background: linear-gradient(180deg, #247bb8 0%, #1769aa 100%);
  box-shadow: 0 4px 12px rgb(23 105 170 / 18%);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.primary-button:hover, .primary-link-button:hover, .compact-button:hover {
  background: linear-gradient(180deg, #1c70ae 0%, #105b96 100%);
  box-shadow: 0 6px 16px rgb(23 105 170 / 24%);
  transform: translateY(-1px);
}
.primary-button:active, .primary-link-button:active, .compact-button:active { transform: translateY(0); }
.secondary-button, .secondary-link-button {
  border-color: #9eb1c0;
  color: #294a64;
  background: #fbfdfe;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.secondary-button:hover, .secondary-link-button:hover { border-color: #6589a4; color: var(--blue-800); background: var(--blue-50); }
.alert { border: 1px solid transparent; box-shadow: 0 4px 12px rgb(15 45 70 / 4%); }
.alert-error { border-color: #f1c7c7; }
.alert-success { border-color: #bde3c8; }

.panel { border-radius: 12px; }
.panel-heading { padding-bottom: 20px; border-bottom: 1px solid #e1e9ef; }
.dashboard-links { margin-bottom: 0; }
.text-link { text-underline-offset: 3px; }
.search-form { padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--blue-50); }
.search-form > label { margin-top: 0; }
.list-actions { flex-wrap: wrap; }
.table-wrap { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.data-table th, .data-table td { padding: 14px 13px; border-bottom-color: #dfe7ed; }
.data-table th { border-bottom: 1px solid #c4d3de; color: #24445f; background: linear-gradient(180deg, #edf4f8 0%, #e4eef4 100%); letter-spacing: .2px; }
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover { background: #f5f9fc; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.detail-summary { border-color: #cad8e2; background: #cad8e2; box-shadow: 0 3px 10px rgb(15 45 70 / 4%); }
.detail-summary div { background: #f8fbfd; }
.detail-summary span { color: var(--text-muted); }
.subpanel { border-color: var(--line); border-radius: 9px; box-shadow: 0 6px 18px rgb(20 75 122 / 5%); }
.subpanel h2 { padding-bottom: 10px; border-bottom: 1px solid #e1e9ef; }
.exam-schedule { border: 1px solid #cbdde9; border-left: 4px solid var(--blue-600); border-radius: 0 8px 8px 0; background: linear-gradient(90deg, #eaf4fa 0%, #f5f9fc 100%); }
.stat-card {
  position: relative;
  overflow: hidden;
  border-color: var(--line);
  background: linear-gradient(145deg, #fff 0%, #f4f8fb 100%);
  box-shadow: 0 7px 20px rgb(20 75 122 / 6%);
}
.stat-card::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: #6da8c9; content: ""; }
.stat-value { color: var(--blue-800); }

.notice-trigger-row { border-bottom-color: #cddbe5; text-align: left; }
.notice-trigger { color: var(--blue-700); text-underline-offset: 3px; }
.query-notice-dialog { overflow: hidden; border: 1px solid #b9cbd8; border-radius: 12px; box-shadow: 0 28px 80px rgb(11 47 80 / 30%); }
.query-notice-dialog::backdrop { background: rgb(10 31 49 / 62%); backdrop-filter: blur(2px); }
.query-notice-content { position: relative; padding: 34px 36px 36px; }
.query-notice-content::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--blue-700); content: ""; }
.query-notice-content h2 { font-size: 25px; }
.query-notice-content ol { padding: 17px 18px 17px 44px; border: 1px solid #d8e4ec; border-radius: 7px; background: var(--blue-50); }
.password-rules { padding: 16px 18px; border: 1px solid #cbdde9; border-left: 4px solid var(--blue-600); border-radius: 0 7px 7px 0; background: linear-gradient(90deg, #eaf4fa, #f7fafc); }

.result-toolbar { margin-bottom: 15px; }
.result-heading { margin-bottom: 24px; }
.result-heading h1 { color: var(--blue-950); text-shadow: 0 1px #fff; }
.result-heading p { color: var(--blue-800); }
.result-notice {
  padding: 15px 18px;
  border: 1px solid #c7dce9;
  border-left: 4px solid var(--blue-600);
  border-radius: 0 8px 8px 0;
  color: #334f66;
  background: linear-gradient(90deg, #eaf4fa 0%, #f7fbfd 100%);
  box-shadow: 0 5px 14px rgb(20 75 122 / 5%);
}
.result-card { border-color: #8ca5b8; border-radius: 10px; box-shadow: var(--shadow-panel); }
.result-details div { border-bottom-color: #cbd9e3; }
.result-details dt { border-right-color: #c4d5e0; color: #1f4665; background: linear-gradient(90deg, #e8f1f6 0%, #f1f6f9 100%); }
.result-details dd { background: rgb(255 255 255 / 92%); }
.result-media { border-left-color: #9cb2c2; background: linear-gradient(180deg, #f4f8fb 0%, #eaf2f7 100%); }
.result-photo { padding: 4px; border: 1px solid #7f97a9; background: #fff; box-shadow: 0 5px 15px rgb(15 45 70 / 10%); }
.result-download { min-height: 46px; border-radius: 7px; letter-spacing: .5px; }
.standalone-logout .secondary-button { min-width: 110px; }

@media (max-width: 1300px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .site-header-inner { width: calc(100% - 48px); min-height: 66px; }
  .brand-logo-panel { flex-basis: 140px; width: 140px; min-height: 58px; }
  .company-name { font-size: 21px; }
  .system-name { font-size: 15px; line-height: 1.5; }
  .exam-schedule { grid-template-columns: 1fr; }
  .ticket-sheet { min-height: 0; padding: 28px; }
  .ticket-body { grid-template-columns: 1fr; }
  .ticket-photo { grid-row: 1; margin: 0 auto; }
  .detail-summary { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 1fr; }
  .result-media { grid-row: 1; border-bottom: 1px solid #9aa9b7; border-left: 0; }
  .list-actions { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .container { width: min(100% - 24px, 1080px); }
  .site-header { padding: 14px 0; }
  .site-header-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .brand-logo-panel { position: static; flex: 0 0 auto; width: 125px; min-height: 44px; }
  .brand-logo-panel img { max-height: 54px; }
  .brand-titles { padding: 10px 0 0; border-top: 1px solid rgb(255 255 255 / 24%); border-left: 0; text-align: left; }
  .company-name { font-size: 20px; }
  .system-name { font-size: 14px; }
  .page-content { padding: 28px 0; }
  .auth-card, .panel { padding: 24px 20px; border-radius: 9px; }
  .auth-card h1 { font-size: 24px; }
  .panel-heading { align-items: stretch; flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr; }
  .ticket-actions { align-items: stretch; flex-direction: column; }
  .ticket-action-buttons { flex-direction: column; width: 100%; }
  .ticket-details div { grid-template-columns: 92px minmax(0, 1fr); }
  .ticket-details dt, .ticket-details dd { padding: 10px; }
  .search-row, .form-grid, .detail-summary { grid-template-columns: 1fr; }
  .result-heading h1 { font-size: 23px; }
  .result-heading p { font-size: 20px; }
  .result-details div { grid-template-columns: 96px minmax(0, 1fr); }
  .result-details dt, .result-details dd { padding: 10px; }
  .query-notice-content { padding: 28px 20px 24px; }
  .query-notice-content ol { padding-left: 38px; }
  .result-media { padding: 20px; }
  .list-actions > *, .list-actions form, .list-actions button, .list-actions a { width: 100%; }
}

@media print {
  :root, body { background: #fff; }
  .site-header, .no-print { display: none !important; }
  .page-content { padding: 0; }
  .container { width: 100%; }
  .ticket-sheet { width: 190mm; min-height: 277mm; margin: 0 auto; padding: 14mm; border: 0; box-shadow: none; }
}
