/* ============================================================
   武术比赛报名系统 · 水墨灰 × 朱砂红 设计系统
   墨色为底，朱砂点睛；宣纸质感，柔和圆角
   ============================================================ */

:root {
  /* 墨色阶 */
  --ink-900: #2b2724;
  --ink-700: #4c4640;
  --ink-500: #79716a;
  --ink-300: #b5ada4;
  --ink-100: #e8e4de;

  /* 宣纸底色 */
  --paper: #f7f5f2;
  --paper-2: #efece7;
  --card: #ffffff;

  /* 朱砂红 */
  --zhu: #b03a35;
  --zhu-deep: #8e2c28;
  --zhu-bright: #c94a44;
  --zhu-tint: #f5eae8;
  --zhu-line: #e3c7c3;

  /* 辅助 */
  --ok: #5e8c61;
  --ok-bg: #eaf1ea;
  --warn: #b07d3a;
  --warn-bg: #f6efe4;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-card: 0 1px 3px rgba(43, 39, 36, .05), 0 6px 24px rgba(43, 39, 36, .06);
  --shadow-hover: 0 4px 10px rgba(43, 39, 36, .07), 0 12px 36px rgba(43, 39, 36, .10);

  --font-display: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--zhu); transition: color .2s; }
a:hover { color: var(--zhu-deep); }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--zhu-tint); color: var(--zhu-deep); }

/* ---------------- 顶栏 ---------------- */
.header {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  color: var(--ink-900);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--ink-100);
}
.header .brand {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
}
.header .brand img { height: 34px; }
.header .meta { font-size: 13px; text-align: right; color: var(--ink-500); }
.header .meta .team {
  color: var(--zhu);
  background: var(--zhu-tint);
  padding: 2px 10px;
  border-radius: 999px;
  margin-left: 8px;
}

/* 印章式 logo（朱红方章） */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--zhu);
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35), 0 2px 6px rgba(176, 58, 53, .35);
  user-select: none;
}

/* ---------------- 步骤导航 ---------------- */
.nav {
  background: var(--card);
  border-bottom: 1px solid var(--ink-100);
  padding: 10px 20px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a, .nav span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  color: var(--ink-500);
  white-space: nowrap;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
}
.nav a:hover, .nav span:hover { color: var(--ink-900); background: var(--paper-2); }
.nav a.active, .nav span.active {
  color: var(--zhu);
  background: var(--zhu-tint);
  border-color: var(--zhu-line);
  font-weight: 600;
}

/* ---------------- 布局与卡片 ---------------- */
.container { max-width: 1400px; margin: 0 auto; padding: 28px 24px 48px; }
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(232, 228, 222, .8);
  padding: 28px;
  margin-bottom: 20px;
}

.title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 22px;
  color: var(--ink-900);
  letter-spacing: 1px;
}
.subtitle {
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 14px;
  color: var(--ink-900);
  padding-left: 12px;
  border-left: 3px solid var(--zhu);
}

/* ---------------- 表单 ---------------- */
.form-row { display: flex; align-items: flex-start; margin-bottom: 18px; flex-wrap: wrap; }
.form-label { width: 140px; padding-top: 9px; color: var(--ink-500); text-align: right; padding-right: 16px; }
.form-input { flex: 1; min-width: 200px; }
.form-label .required { color: var(--zhu); margin-right: 4px; }

input[type=text], input[type=password], input[type=email], input[type=tel], input[type=date], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm);
  outline: none;
  background: #fff;
  color: var(--ink-700);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--ink-300); }
input:focus, select:focus, textarea:focus {
  border-color: var(--zhu);
  box-shadow: 0 0 0 3px var(--zhu-tint);
}
input.error, select.error { border-color: var(--zhu-bright); background: var(--zhu-tint); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 26px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 14px;
  letter-spacing: 2px;
  transition: all .2s;
  background: var(--paper-2);
  color: var(--ink-900);
  cursor: pointer;
}
.btn:hover { background: #e5e1da; }
.btn-primary {
  background: var(--zhu);
  color: #fff;
  box-shadow: 0 3px 10px rgba(176, 58, 53, .25);
}
.btn-primary:hover { background: var(--zhu-deep); transform: translateY(-1px); }
.btn-success { background: var(--ok); color: #fff; }
.btn-success:hover { filter: brightness(.92); }
.btn-danger { background: var(--zhu); color: #fff; }
.btn-default {
  background: var(--card);
  color: var(--ink-700);
  border: 1px solid var(--ink-100);
}
.btn-default:hover { border-color: var(--ink-300); color: var(--ink-900); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

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

/* ---------------- 表格（去硬边框，行线式） ---------------- */
.table-wrap { overflow-x: auto; margin-bottom: 14px; border-radius: var(--radius-md); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--card);
}
th, td {
  border: none;
  padding: 11px 10px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--paper-2);
}
th {
  background: var(--paper-2);
  color: var(--ink-500);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  white-space: normal;
  line-height: 1.45;
}
th.th-vertical {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  white-space: nowrap;
  padding: 11px 4px;
  min-width: 28px;
  max-width: 44px;
  letter-spacing: 2px;
}
.events-table td { white-space: nowrap; }
th:first-child { border-radius: var(--radius-sm) 0 0 0; }
th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #faf8f5; }
.cell-input { width: 100%; border: none; background: transparent; text-align: center; padding: 5px; font-size: 13px; border-radius: 6px; font-family: inherit; color: var(--ink-700); }
.cell-input:focus { outline: 2px solid var(--zhu); background: #fff; }
.cell-select { width: 100%; border: none; background: transparent; padding: 5px; font-size: 13px; font-family: inherit; color: var(--ink-700); }
.cell-select:focus { outline: 2px solid var(--zhu); }
.cell-empty { color: var(--ink-300); font-style: italic; }

.checkbox { width: 17px; height: 17px; cursor: pointer; accent-color: var(--zhu); }

/* ---------------- 徽章 / 提示 ---------------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.badge-success { background: var(--ok-bg); color: var(--ok); }
.badge-danger { background: var(--zhu-tint); color: var(--zhu); }

.alert { padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 18px; font-size: 13px; }
.alert-info { background: var(--paper-2); color: var(--ink-700); border: 1px solid var(--ink-100); }
.alert-success { background: var(--ok-bg); color: var(--ok); border: 1px solid #cfe0cf; }
.alert-danger { background: var(--zhu-tint); color: var(--zhu); border: 1px solid var(--zhu-line); }

/* ---------------- 汇总 / 检查 ---------------- */
.summary-block { margin-bottom: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.summary-item {
  background: var(--paper-2);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-100);
}
.summary-item label { display: block; color: var(--ink-500); font-size: 12px; margin-bottom: 5px; letter-spacing: 1px; }
.summary-item span { font-size: 16px; font-weight: 600; color: var(--ink-900); }

.check-item { display: flex; justify-content: space-between; align-items: center; padding: 13px 4px; border-bottom: 1px dashed var(--ink-100); }
.check-item:last-child { border-bottom: none; }

/* ---------------- 杂项 ---------------- */
.small { font-size: 12px; color: var(--ink-300); }
.link { color: var(--zhu); cursor: pointer; }
.link:hover { text-decoration: underline; }
.footer { text-align: center; padding: 24px; color: var(--ink-300); font-size: 14px; letter-spacing: 2px; }
.icp-footer { text-align: center; padding: 0 24px 20px; color: var(--ink-300); font-size: 12px; letter-spacing: 0.5px; }
.icp-footer a { color: var(--ink-300); text-decoration: none; }
.icp-footer a:hover { color: var(--zhu); text-decoration: underline; }
.admin-entry {
  margin-left: auto;
  color: var(--zhu);
  font-size: 13px;
  text-decoration: none;
  opacity: 1;
  transition: opacity .3s, color .15s;
}
.admin-entry.hidden { display: none; }
.admin-entry:hover { color: var(--zhu-deep); }

.tabs { display: flex; border-bottom: 1px solid var(--ink-100); margin-bottom: 18px; }
.tab { padding: 11px 18px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--ink-500); font-size: 14px; }
.tab.active { border-bottom-color: var(--zhu); color: var(--zhu); font-weight: 600; }

/* ============================================================
   首页 · 水墨风
   ============================================================ */
.home-bg {
  min-height: 100vh;
  background: var(--paper);
  padding: 0 0 60px;
}
.home-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  max-width: 960px;
  margin: 0 auto;
}
.home-topbar .site-name {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 4px;
  color: var(--ink-500);
}
.home-hero {
  max-width: 960px;
  margin: 30px auto 40px;
  padding: 0 28px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.home-hero .hero-seal {
  width: 64px; height: 64px;
  background: var(--zhu);
  color: #fff;
  font-family: var(--font-display);
  font-size: 34px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 6px 18px rgba(176, 58, 53, .3);
  flex-shrink: 0;
}
.home-hero .hero-text h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0;
  letter-spacing: 6px;
  line-height: 1.3;
}
.home-hero .hero-text p {
  margin: 6px 0 0;
  color: var(--ink-500);
  font-size: 14px;
  letter-spacing: 2px;
}
.home-hero .hero-ink {
  flex: 1;
  min-width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--ink-100), transparent);
  margin-bottom: 14px;
}

/* 赛事列表：横排条目 */
.competition-list {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.competition-entry {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(232, 228, 222, .8);
  box-shadow: var(--shadow-card);
  padding: 26px 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 22px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.competition-entry::before {
  content: '';
  position: absolute;
  left: 0; top: 22%; bottom: 22%;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--zhu);
  opacity: 0;
  transition: opacity .25s;
}
.competition-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--zhu-line);
}
.competition-entry:hover::before { opacity: 1; }
.competition-entry .icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--zhu-tint);
  color: var(--zhu);
  font-family: var(--font-display);
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.competition-entry .info { flex: 1; min-width: 0; }
.competition-entry .name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: 2px;
}
.competition-entry .desc { font-size: 13px; color: var(--ink-500); margin-top: 4px; }
.competition-entry .arrow {
  color: var(--ink-300);
  font-size: 22px;
  transition: all .25s;
  flex-shrink: 0;
}
.competition-entry:hover .arrow { color: var(--zhu); transform: translateX(4px); }

/* 兼容旧结构（卡片网格） */
.competition-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.competition-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(232, 228, 222, .8);
}
.competition-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.competition-card .icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: var(--zhu-tint); color: var(--zhu);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 26px; font-family: var(--font-display);
}
.competition-card .name { font-size: 16px; font-weight: 600; color: var(--ink-900); line-height: 1.5; font-family: var(--font-display); letter-spacing: 1px; }

.home-title {
  font-family: var(--font-display);
  text-align: center;
  color: var(--ink-900);
  font-size: 30px;
  letter-spacing: 8px;
  margin: 60px 0 40px;
}

/* ============================================================
   登录 / 注册 / 赛区选择
   ============================================================ */
.login-box { max-width: 440px; margin: 40px auto; }

/* 注册页隐私政策勾选 */
.privacy-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.7; color: var(--ink-600); }
.privacy-check input[type="checkbox"] { width: auto; margin-top: 4px; flex: none; accent-color: var(--zhu); cursor: pointer; }
.privacy-check a { color: var(--zhu); text-decoration: none; border-bottom: 1px dashed var(--zhu-100, var(--zhu)); }
.privacy-check a:hover { color: var(--zhu-deep); }

/* 隐私政策页 */
.policy-box { max-width: 760px; margin: 40px auto; }
.policy-box h3 { font-size: 16px; margin: 26px 0 10px; padding-left: 10px; border-left: 3px solid var(--zhu); }
.policy-box p, .policy-box li { font-size: 14px; line-height: 1.9; color: var(--ink-700); }
.policy-box ul { padding-left: 22px; margin: 8px 0; }
.policy-box .policy-meta { font-size: 13px; color: var(--ink-500); border-bottom: 1px solid var(--ink-100); padding-bottom: 14px; margin-bottom: 6px; }

.region-list { display: grid; gap: 12px; margin-bottom: 18px; }
.region-item {
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  transition: all .2s;
  color: var(--ink-900);
}
.region-item:hover {
  border-color: var(--zhu);
  background: var(--zhu-tint);
  transform: translateX(3px);
}
.region-item .date { color: var(--ink-300); font-size: 13px; letter-spacing: 1px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 640px) {
  .form-label { width: 100%; text-align: left; padding-bottom: 4px; }
  .form-input { width: 100%; }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; }
  .header { height: auto; flex-wrap: wrap; padding: 10px 16px; }
  .container { padding: 16px 14px 40px; }
  .card { padding: 20px 16px; }
  .home-hero { padding: 0 20px; }
  .home-hero .hero-text h1 { font-size: 26px; letter-spacing: 4px; }
  .competition-list { padding: 0 20px; }
  .competition-entry { padding: 20px; gap: 16px; }
  .competition-entry .arrow { display: none; }
}

/* ---------------- 报名表预览 / A4 横版导出 ---------------- */
.preview-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(43, 39, 36, 0.75);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  overflow: auto;
}

.preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 1001;
  background: var(--card);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
}

.a4-landscape {
  width: 297mm;
  min-height: 210mm;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  padding: 12mm;
  font-family: "SimSun", "Noto Serif SC", "Microsoft YaHei", sans-serif;
  color: #000;
  font-size: 10pt;
  line-height: 1.45;
  box-sizing: border-box;
}

.form-sheet-header {
  text-align: center;
  border-bottom: 2px solid #000;
  padding-bottom: 8pt;
  margin-bottom: 10pt;
}

.form-sheet-header h1 {
  font-size: 20pt;
  margin: 0 0 6pt 0;
  letter-spacing: 2pt;
}

.form-sheet-meta {
  display: flex;
  justify-content: center;
  gap: 24pt;
  font-size: 10pt;
}

.form-sheet-section {
  margin-bottom: 10pt;
}

.form-sheet-title {
  font-size: 11pt;
  font-weight: bold;
  margin-bottom: 4pt;
}

.form-sheet-table {
  width: 100%;
  border-collapse: collapse;
}

.form-sheet-table th,
.form-sheet-table td {
  border: 1px solid #333;
  padding: 4pt 5pt;
  text-align: left;
  vertical-align: top;
  font-size: 9.5pt;
}

.form-sheet-table th {
  background: #f2f2f2;
  font-weight: bold;
}

.form-sheet-footer {
  margin-top: 12pt;
  text-align: center;
  font-size: 8.5pt;
  color: #555;
}

/* 省市区县三级选择器 */
.area-picker { position: relative; width: 100%; }
.area-picker-input {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--ink-100); border-radius: 6px;
  background: var(--paper); padding: 8px 12px; min-height: 40px;
  cursor: pointer; user-select: none;
}
.area-picker-input:hover { border-color: var(--zhu); }
.area-picker.open .area-picker-input { border-color: var(--zhu); }
.area-picker-text { color: var(--ink-700); }
.area-picker-placeholder { color: var(--ink-300); }
.area-picker-arrow { color: var(--ink-400); font-size: 12px; transition: transform .2s; }
.area-picker.open .area-picker-arrow { transform: rotate(180deg); }
.area-picker-dropdown {
  display: none; position: absolute; left: 0; top: calc(100% + 4px); z-index: 100;
  width: 100%; min-width: 560px; max-width: 720px;
  background: #fff; border: 1px solid var(--ink-100); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 10px 0;
}
.area-picker.open .area-picker-dropdown { display: flex; }
.area-picker-col {
  flex: 1; min-width: 160px; max-height: 280px; overflow-y: auto;
  border-right: 1px solid #eee;
}
.area-picker-col:last-child { border-right: none; }
.area-picker-item {
  padding: 8px 14px; font-size: 14px; color: var(--ink-700);
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
}
.area-picker-item:hover { background: var(--paper-2); }
.area-picker-item.active { background: var(--zhu-tint); color: var(--zhu-deep); font-weight: 500; }
.area-picker-empty {
  padding: 20px 14px; font-size: 13px; color: var(--ink-300); text-align: center;
}
@media (max-width: 640px) {
  .area-picker-dropdown { min-width: 100%; flex-direction: column; max-height: 360px; }
  .area-picker-col { border-right: none; border-bottom: 1px solid #eee; max-height: 120px; }
}

@media screen and (max-width: 1200px) {
  .a4-landscape {
    transform: scale(0.72);
    transform-origin: top center;
  }
}

@media print {
  @page { size: A4 landscape; margin: 0; }
  body * { visibility: hidden; }
  .preview-overlay,
  .preview-overlay * { visibility: visible; }
  .preview-toolbar { display: none; }
  .a4-landscape {
    position: absolute;
    left: 0; top: 0;
    width: 297mm;
    min-height: 210mm;
    box-shadow: none;
    transform: none;
    padding: 12mm;
  }
}

/* ---------------- 头部菜单下拉 ---------------- */
.header-menu { position: relative; display: inline-block; }
.header-menu-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.header-menu-btn:hover {
  border-color: var(--zhu-line);
  background: var(--zhu-tint);
  color: var(--zhu-deep);
}
.header-menu-btn .caret {
  font-size: 10px;
  transition: transform .2s;
}
.header-menu.open .header-menu-btn .caret { transform: rotate(180deg); }
.header-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--ink-100);
  padding: 6px;
  display: none;
  z-index: 200;
}
.header-menu.open .header-menu-dropdown { display: block; }
.header-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-900);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}
.header-menu-item:hover {
  background: var(--zhu-tint);
  color: var(--zhu-deep);
}
.header-menu-item .icon {
  width: 18px; text-align: center;
  color: var(--zhu);
  font-size: 14px;
}

/* ---------------- 修改密码弹窗 ---------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(43, 39, 36, 0.55);
  z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 460px;
  padding: 28px;
}
.modal-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 20px;
  letter-spacing: 1px;
  padding-left: 12px;
  border-left: 3px solid var(--zhu);
}
.modal-row { margin-bottom: 14px; }
.modal-row label {
  display: block;
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 6px;
}
.modal-row input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm);
  outline: none;
  background: #fff;
  color: var(--ink-700);
  font-size: 14px;
  font-family: inherit;
}
.modal-row input:focus {
  border-color: var(--zhu);
  box-shadow: 0 0 0 3px var(--zhu-tint);
}
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 20px;
}

/* 修改密码弹窗 · 页内错误提示 */
.pwd-error {
  background: #fdf0ef;
  border: 1px solid var(--zhu-line);
  color: var(--zhu-deep);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.5;
}

/* 修改密码弹窗 · 成功视图 */
.pwd-success {
  text-align: center;
  padding: 16px 0 8px;
}
.pwd-success-icon {
  width: 68px; height: 68px;
  margin: 4px auto 18px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 34px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(94, 140, 97, .25);
}
.pwd-success-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 26px;
  letter-spacing: 1px;
}
.pwd-success .btn { min-width: 160px; padding: 12px 26px; font-size: 15px; }

/* 登录页 · 页内错误强提示 */
.login-error {
  display: none;
  align-items: center;
  gap: 10px;
  background: #fdf0ef;
  border: 1.5px solid var(--zhu);
  color: var(--zhu-deep);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  margin: 4px 0 16px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(176, 58, 53, .12);
}
.login-error-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--zhu);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-error.shake { animation: loginShake .45s ease; }
@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  15%, 55% { transform: translateX(-7px); }
  35%, 75% { transform: translateX(7px); }
}

/* ===== 全局页内提示 toast（替代浏览器 alert） ===== */
#toast-box {
  position: fixed;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
  max-width: 92vw;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 1.5px solid var(--ink-100, #e8e4de);
  border-left: 5px solid var(--ink-500, #79716a);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 8px 26px rgba(43, 39, 36, .16);
  padding: 13px 20px;
  font-size: 15px;
  color: var(--ink-900, #2b2724);
  cursor: pointer;
  max-width: 480px;
  animation: toastIn .28s cubic-bezier(.2, .9, .3, 1.2);
}
.toast-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ink-500, #79716a);
  color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.toast-text { line-height: 1.5; font-weight: 500; white-space: pre-line; }
.toast-error { border-color: var(--zhu-line, #e3c7c3); border-left-color: var(--zhu, #b03a35); }
.toast-error .toast-icon { background: var(--zhu, #b03a35); }
.toast-error .toast-text { color: var(--zhu-deep, #8e2c28); font-weight: 600; }
.toast-success { border-color: #cfe0cf; border-left-color: var(--ok, #5e8c61); }
.toast-success .toast-icon { background: var(--ok, #5e8c61); }
.toast-out { opacity: 0; transform: translateY(-12px); transition: opacity .2s ease, transform .2s ease; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
