:root {
  --primary: #0A4F9E;
  --primary-2: #1680CD;
  --grad: linear-gradient(135deg, #0A4F9E 0%, #1680CD 100%);
  --ink: #1f2a3a;
  --ink-2: #56657f;
  --muted: #8a98ad;
  --line: #e4ebf4;
  --bg: #f2f6fc;
  --card: #ffffff;
  --ok: #1f8a57;
  --warn: #c98a0b;
  --danger: #d14343;
  --shadow: 0 10px 30px rgba(10,79,158,.07);
  --shadow-lg: 0 24px 60px rgba(10,79,158,.14);
  --radius: 16px;
  --radius-sm: 10px;
}
/* 字体方案：中文 微软雅黑（不加粗）；数字/英文 Times New Roman（加粗） */
:root {
  --font-cn: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "Noto Sans SC", "WenQuanYi Micro Hei", "Heiti SC", sans-serif;
  --font-num: "Times New Roman", Times, "Liberation Serif", serif;
}
h1, h2, h3, .page-title, .order-card .course, .portal h3, .dash-title, .stat-card .stat-v, .auth-box h2, .noti b {
  font-family: var(--font-cn);
  letter-spacing: .3px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: clip; }
body {
  font-family: var(--font-cn);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 8% -8%, #eef2f7 0%, transparent 55%),
    radial-gradient(900px 460px at 100% 0%, #e8f1fb 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
.loading { padding: 80px; text-align: center; color: var(--muted); }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-size: 14px; font-weight: 600;
  padding: 11px 18px; border-radius: var(--radius-sm); transition: .18s ease;
  font-family: inherit; color: #fff; background: var(--grad);
  box-shadow: 0 8px 18px rgba(10,79,158,.25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(10,79,158,.32); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--primary); }
.btn.soft { background: #e8edf4; color: var(--primary); box-shadow: none; }
.btn.ok { background: linear-gradient(135deg,#1f8a57,#2d9d68); box-shadow: 0 8px 18px rgba(31,122,77,.25); }
.btn.warn { background: linear-gradient(135deg,#c98a0b,#d9a03a); box-shadow: none; color:#fff; }
.btn.danger { background: linear-gradient(135deg,#d14343,#d9534f); box-shadow: none; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.input, select, textarea {
  width: 100%; max-width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--ink); background: #fff; transition: .15s;
  outline: none;
}
.input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(10,79,158,.12); }
textarea { resize: vertical; min-height: 84px; }
label.field { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 7px; }
label.field .req { color: var(--danger); margin-left: 2px; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: #e8edf4; color: var(--primary); }
.badge.gray { background: #eef2f8; color: var(--ink-2); }
.badge.green { background: #e6f3ec; color: var(--ok); }
.badge.amber { background: #f8efdc; color: var(--warn); }
.badge.red { background: #f9e8e6; color: var(--danger); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.tag { display:inline-flex; align-items:center; gap:5px; font-size:12px; padding:3px 9px; border-radius:8px; background:#eef2f8; color:var(--ink-2); font-weight:600; }
.tag.blue { background:#e8edf4; color:var(--primary); }
.tag.purple { background:#efe9f2; color:#6b4e8e; }
.tag.amber { background:#f8efdc; color:var(--warn); }

/* ---------- 认证（登录/注册）分屏 ---------- */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-hero {
  position: relative; overflow: hidden; color: #fff; padding: 56px 54px;
  background: linear-gradient(150deg, #0A3f87 0%, #0A4F9E 55%, #1f6fb8 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); border-radius: 50%;
}
.auth-hero .brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.auth-hero h1 { font-size: 26px; margin: 0; letter-spacing: 1px; }
.auth-hero .sub { opacity: .85; font-size: 13px; margin-top: 4px; }
.auth-hero .feats { position: relative; z-index: 2; margin-top: 40px; }
.auth-hero .feat { display: flex; gap: 14px; align-items: flex-start; margin: 20px 0; }
.auth-hero .feat .ic { width: 38px; height: 38px; border-radius: 11px; background: rgba(22,128,205,.22); border: 1px solid rgba(22,128,205,.45);
  display: grid; place-items: center; font-size: 18px; flex: none; }
.auth-hero .feat b { font-size: 15px; }
.auth-hero .feat p { margin: 4px 0 0; opacity: .82; font-size: 13px; line-height: 1.6; }
.auth-hero .foot { position: relative; z-index: 2; font-size: 12px; opacity: .75; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-tabs { display: flex; gap: 6px; background: #f1f2f7; padding: 5px; border-radius: 12px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; border: none; background: transparent; padding: 10px; border-radius: 9px; cursor: pointer;
  font-weight: 600; color: var(--ink-2); font-size: 14px; font-family: inherit; }
.auth-tabs button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.auth-box h2 { margin: 6px 0 4px; font-size: 22px; }
.auth-box .hint { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-group { display: flex; gap: 10px; }
.radio-group label { flex: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px; text-align: center;
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.radio-group input { display: none; }
.radio-group input:checked + span { color: var(--primary); }
.radio-group label:has(input:checked) { border-color: var(--primary); background: #e8edf4; color: var(--primary); }
.auth-foot { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-tabs { border: 1px solid var(--line); }

/* 移动端品牌标头（桌面隐藏） */
.auth-brand-m { display: none; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-brand-m b { font-size: 20px; letter-spacing: 1px; }
.auth-brand-m span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 顶栏 + 仪表盘 ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: rgba(255,253,248,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); }
.topbar .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar .brand .name { font-weight: 800; font-size: 18px; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar .brand .name small { font-weight: 600; color: var(--muted); font-size: 12px; margin-left: 6px; }
.topbar .right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bell { position: relative; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; display: grid; place-items: center; font-size: 18px; }
.bell .dot { position: absolute; top: 6px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.avatar { height: 38px; padding: 0 12px; border-radius: 11px; background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  font-weight: 400; font-size: 15px; letter-spacing: 1px; flex: none; }
.topbar .right { gap: 10px; }
.portal-switch button { padding: 7px 13px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 28px; }
.page-title { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.page-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

/* 门户选择 */
.portals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 10px; }
.portal { position: relative; padding: 28px; border-radius: var(--radius); cursor: pointer; overflow: hidden;
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); transition: .2s; }
.portal:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.portal .pic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; color: #fff;
  background: var(--grad); margin-bottom: 16px; }
.portal.purple .pic { background: linear-gradient(135deg,#5d4479,#7c5fa0); }
.portal.amber .pic { background: linear-gradient(135deg,#b98a1c,#d9a83a); }
.portal h3 { margin: 0 0 8px; font-size: 18px; }
.portal p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.portal .arrow { position: absolute; right: 22px; bottom: 20px; font-size: 22px; color: var(--muted); }
.portal.admin { border: 1px dashed #a9cdf0; }

/* 子标签 */
.subtabs { display: flex; gap: 8px; margin: 6px 0 22px; flex-wrap: wrap; }
.subtabs button { border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 13.5px; color: var(--ink-2); font-family: inherit; }
.subtabs button.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 16px rgba(10,79,158,.25); }

/* 网格/列表 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.list { display: flex; flex-direction: column; gap: 14px; }

.order-card { padding: 18px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); }
.order-card .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.order-card .course { font-size: 17px; font-weight: 800; }
.order-card .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
/* 课程信息：多行键值排版 */
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 7px 22px; margin: 8px 0 12px; }
.req-item { display: flex; align-items: baseline; gap: 6px; font-size: 13.5px; min-width: 0; }
.req-k { color: var(--muted); flex: 0 0 auto; white-space: nowrap; }
.req-k::after { content: "："; }
.req-v { font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.detail-sep { height: 1px; background: var(--line); margin: 14px 0; }
.order-card .line { font-size: 13.5px; color: var(--ink-2); margin: 5px 0; display: flex; gap: 8px; }
.order-card .line b { color: var(--ink); font-weight: 700; flex: none; }
.order-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px;
  padding-top: 12px; border-top: 1px dashed var(--line); }
.order-card .orderer { font-size: 12.5px; color: var(--muted); }
.order-card .orderer b { color: var(--ink-2); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ic { opacity: .55; display: grid; place-items: center; }
.empty .ic svg { width: 46px; height: 46px; }

/* SVG 图标尺寸 */
.bell svg { width: 20px; height: 20px; }
.auth-hero .feat .ic svg { width: 20px; height: 20px; }
.portal .pic svg { width: 28px; height: 28px; }
.noti .ic svg { width: 18px; height: 18px; }
.empty p { margin: 10px 0 0; }

/* 表单面板 */
.panel { max-width: 720px; }
.form-card { padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.check-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 4px; }
.check { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); background:#fff; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.check:has(input:checked) { border-color: var(--primary); background: #e8edf4; color: var(--primary); }
.sub-in { margin-top: 12px; padding: 14px; border-radius: var(--radius-sm); background: #f3f7fd; border: 1px dashed #c6d8ec; }

/* 管理员表格 */
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.table th, .table td { padding: 12px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--line); }
.table th { background: #eef3fb; color: var(--ink-2); font-weight: 700; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f3f7fd; }

/* 通知 */
.noti { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 12px; }
.noti .ic { width: 40px; height: 40px; border-radius: 11px; background: #e8edf4; color: var(--primary); display: grid; place-items: center; font-size: 18px; flex: none; }
.noti.unread .ic { background: var(--grad); color: #fff; }
.noti b { font-size: 14.5px; }
.noti p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.noti .t { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(20,24,45,.45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal { width: 100%; max-width: 460px; background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 14px; font-size: 18px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 38px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast-item { padding: 12px 20px; border-radius: 12px; background: #1f2a3a; color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: pop .25s ease; }
.toast-item.ok { background: linear-gradient(135deg,#1f8a57,#2d9d68); }
.toast-item.err { background: linear-gradient(135deg,#d14343,#d9534f); }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.muted { color: var(--muted); }
.spacer { height: 8px; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }

/* 价格/金额样式 */
.tag.gold { background: #f8efdc; color: var(--warn); }
.gold-text { color: var(--warn); font-weight: 700; }

/* 服务费明细（接单端可见） */
.fee-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 10px; padding: 10px 12px;
  border-radius: 10px; background: #eef4fc; border: 1px solid #cfe0f3; font-size: 12.5px; color: var(--ink-2); }
.fee-item b { color: var(--ink); margin-left: 2px; }
.fee-item.net b { color: var(--warn); font-size: 14px; }
.fee-item + .fee-item { border-left: 1px dashed #bcd4ec; padding-left: 10px; }
.order-card .line svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--primary); }

/* 登录身份下拉 + 顶栏端切换 */
.login-role-select { position: relative; }
#login-portal { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235b6276' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; font-weight: 600; }
.portal-switch { display: inline-flex; background: #f1f2f7; border-radius: 999px; padding: 4px; gap: 4px; }
.portal-switch button { border: none; background: transparent; padding: 7px 16px; border-radius: 999px; cursor: pointer;
  font-weight: 600; color: var(--ink-2); font-size: 13.5px; font-family: inherit; }
.portal-switch button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }

/* 管理员数据看板 */
.dash { display: flex; flex-direction: column; gap: 26px; }
.dash-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; margin-bottom: 14px; color: var(--ink); }
.dash-title svg { width: 20px; height: 20px; color: var(--primary); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(162px, 1fr)); gap: 14px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-card .stat-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px; }
.stat-card .stat-ic svg { width: 18px; height: 18px; }
.stat-card .stat-v { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat-card .stat-l { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat-card.blue .stat-ic { background: #e8edf4; color: var(--primary); }
.stat-card.purple .stat-ic { background: #efe9f2; color: #6b4e8e; }
.stat-card.green .stat-ic { background: #e6f3ec; color: var(--ok); }
.stat-card.amber .stat-ic { background: #f8efdc; color: var(--warn); }
.stat-card.gold .stat-ic { background: #f8efdc; color: var(--warn); }
.stat-card.gold .stat-v { color: var(--warn); }
.stat-card.red .stat-ic { background: #f9e8e6; color: var(--danger); }
.stat-card.gray .stat-ic { background: #eef2f8; color: var(--ink-2); }

/* 审核 / 转单行 */
.req-row { align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; margin: 6px 0; background: #f3f7fd; }

/* 管理员账号管理 */
.manage-card { padding: 18px 20px 22px; }
.mg-details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f3f7fd; overflow: hidden; }
.mg-details > summary { cursor: pointer; padding: 14px 16px; font-weight: 700; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 8px; user-select: none; }
.mg-details > summary::-webkit-details-marker { display: none; }
.mg-details > summary svg { width: 18px; height: 18px; color: var(--primary); }
.mg-details > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: .2s; }
.mg-details[open] > summary::after { transform: rotate(180deg); }
.mg-body { padding: 4px 16px 18px; border-top: 1px solid var(--line); }
.mg-tabs { display: flex; gap: 6px; margin: 14px 0 12px; background: #eef2f8; padding: 5px; border-radius: 11px; width: fit-content; }
.mg-tabs button { border: none; background: transparent; padding: 8px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 13.5px; font-family: inherit; }
.mg-tabs button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.table-tools { display: flex; align-items: center; gap: 14px; margin: 16px 0 10px; }
.table-tools .check { margin: 0; }

/* ==================== 响应式自适应 ==================== */
@media (max-width: 1024px) {
  .portals { grid-template-columns: repeat(2, 1fr); }
  .wrap { padding: 24px 20px; }
}

@media (max-width: 880px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-brand-m { display: flex; }
  .auth-panel { padding: 26px 18px; }
  .auth-box { max-width: 460px; }
  .portals { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .wrap { padding: 18px 14px; }
  .topbar { padding: 8px 8px; flex-wrap: nowrap; gap: 4px; white-space: nowrap; }
  .topbar .brand { gap: 5px; }
  .topbar .brand .name { font-size: 13px; }
  .topbar .brand .name small { display: none; }
  .topbar .brand svg, .topbar .brand img { width: 24px; height: 24px; }
  .logout-btn .lo-ic { display: inline !important; }
  .logout-btn .lo-tx { display: none; }
  .logout-btn { padding: 7px 7px !important; }
  .topbar .right { gap: 4px; margin-left: auto; min-width: 0; }
  .topbar .user-meta { min-width: 0; }
  .topbar .user-meta b { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .avatar { height: 30px; padding: 0 6px; font-size: 11.5px; letter-spacing: 0; }
  .bell { width: 30px; height: 30px; font-size: 14px; }
  .bell .dot { top: 3px; right: 3px; min-width: 14px; height: 14px; font-size: 9px; }
  .portal-switch { padding: 2.5px; gap: 2px; }
  .portal-switch button { padding: 5px 6px; font-size: 11px; }
  .btn.ghost.sm { padding: 6px 7px; font-size: 11.5px; }
  .page-title { font-size: 19px; }
  .user-meta b { font-size: 13px; }
  .user-meta span { font-size: 10.5px; }
  .row2 { grid-template-columns: 1fr; }
  .dash-title { font-size: 15px; }
  .table-tools input.input { flex: 1 1 200px; min-width: 0; max-width: 100%; }
  .subtabs button { padding: 7px 11px; font-size: 12.5px; }
}

@media (max-width: 768px) {
  .wrap { padding: 20px 16px; }
  .page-title { font-size: 20px; }
  .portals { grid-template-columns: 1fr; }
  .table-tools { flex-wrap: wrap; gap: 10px; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .topbar .right { gap: 8px; }
  .portal-switch { padding: 3px; }
  .portal-switch button { padding: 6px 11px; font-size: 12.5px; }
  .subtabs { gap: 6px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .subtabs button { white-space: nowrap; padding: 8px 13px; font-size: 12.5px; }
  .order-card { padding: 15px 14px; }
  .order-card .course { font-size: 15.5px; }
  .order-card .foot { flex-wrap: wrap; gap: 8px; }
  .order-card .req-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .order-card .req-row > span:last-child { align-self: flex-end; }
  .form-card { padding: 18px 14px; }
  .check-row { gap: 8px; }
  .check { padding: 9px 11px; font-size: 13px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-v { font-size: 20px; }
  .stat-card .stat-l { font-size: 12px; }
  .modal { padding: 20px 16px; width: calc(100% - 24px); max-height: calc(100vh - 32px); overflow-y: auto; }
  .modal .actions { flex-wrap: wrap; }
  .table { font-size: 12px; min-width: 760px; }
  .table th, .table td { padding: 9px 8px; white-space: nowrap; }
  .manage-card { padding: 12px; }
  .mg-details > summary { padding: 12px; font-size: 14px; }
  .mg-body { padding: 2px 12px 14px; }
  .mg-tabs button { padding: 7px 12px; font-size: 12.5px; }
  .table-tools { flex-wrap: wrap; gap: 10px; }
  .table-tools .input { flex: 1 1 100%; max-width: 100%; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .btn { padding: 10px 15px; font-size: 13.5px; }
  .btn.sm { padding: 6px 10px; font-size: 12.5px; }
  .empty { padding: 44px 14px; }
  .noti { padding: 13px 13px; gap: 10px; }
  #toast { width: calc(100% - 32px); }
  .toast-item { font-size: 13px; padding: 11px 14px; }
}

@media (max-width: 380px) {
  .stat-grid { grid-template-columns: 1fr; }
  .portal-switch button { padding: 6px 9px; font-size: 12px; }
}


/* ---------- 注册设置页 ---------- */
.settings-wrap { max-width: 760px; margin: 0 auto; }
.settings-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 16px; padding: 20px 24px; margin-bottom: 16px; color: #fff;
  background: linear-gradient(135deg, #2e7d5b, #3d9e75);
  box-shadow: 0 6px 18px rgba(46, 125, 91, .25);
}
.settings-hero.closed { background: linear-gradient(135deg, #8a5a2b, #b5793a); box-shadow: 0 6px 18px rgba(138, 90, 43, .25); }
.sh-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sh-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; flex: none; }
.sh-icon svg { width: 24px; height: 24px; }
.sh-title { font-size: 18px; font-weight: 700; font-family: var(--serif, serif); }
.sh-sub { font-size: 13px; opacity: .85; margin-top: 2px; }
.sh-readonly { font-size: 12px; background: rgba(255,255,255,.2); padding: 5px 12px; border-radius: 20px; white-space: nowrap; }

/* 开关 */
.switch { position: relative; width: 52px; height: 28px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: rgba(255,255,255,.35); border-radius: 28px; cursor: pointer; transition: .25s; }
.switch .slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.switch input:checked + .slider { background: #ffd766; }
.switch input:checked + .slider::before { transform: translateX(24px); }

.st-field-head { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.st-preview { margin-top: 12px; }
.st-preview-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.st-preview-box {
  background: #eaf3fe; border: 1px dashed #a9c4e0; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; color: #3a557a; line-height: 1.6;
}

@media (max-width: 600px) {
  .settings-hero { flex-direction: column; align-items: flex-start; padding: 16px 18px; }
  .settings-hero .switch { align-self: flex-end; margin-top: -6px; }
}

/* ---------- 注册关闭提示 ---------- */
.reg-closed {
  background: #eaf3fe; border: 1px solid #bcd9f2; border-radius: 14px;
  padding: 26px 22px; text-align: center; margin-bottom: 4px;
}
.reg-closed .rc-icon {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%;
  background: #e2eefb; color: #4a6b9c; display: flex; align-items: center; justify-content: center;
}
.reg-closed .rc-icon svg { width: 26px; height: 26px; }
.reg-closed .rc-title { font-size: 17px; font-weight: 700; color: #4a5e80; font-family: var(--serif, serif); }
.reg-closed .rc-text { font-size: 14px; color: #3a557a; line-height: 1.7; margin-top: 8px; }

/* ---------- 三列 / 支付弹窗 / 余额 ---------- */
.row3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; max-width: 500px; }
.row2 > *, .row3 > *, [class*="row"] > * { min-width: 0; max-width: 100%; }
input[type="date"], input[type="number"], input[type="text"], input[type="tel"], input[type="password"] { min-width: 0; }
@media (max-width: 640px) { .row3 { grid-template-columns: 1fr; } }

.pay-modal { max-width: 480px; }
.modal-mask { overflow-y: auto; }
.pay-modal { max-height: calc(100vh - 40px); overflow-y: auto; }
.pay-amount {
  background: linear-gradient(135deg, #0A4F9E, #1680CD); color: #fff;
  border-radius: 12px; padding: 14px 18px; font-size: 15px; display: flex; justify-content: space-between; align-items: center;
}
.pay-amount b { font-size: 24px; color: #ffd766; }
.pay-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 4px; }
.pay-ch {
  border: 2px solid var(--line, #e4ebf4); background: #fff; border-radius: 14px; padding: 16px 8px;
  cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; transition: .15s;
}
.pay-ch-name { font-size: 20px; font-weight: 800; }
.pay-ch-name.ali { color: #1677ff; }
.pay-ch-name.wx { color: #07c160; }
.pay-ch-sub { font-size: 12px; color: var(--muted, #888); letter-spacing: 2px; }
.pay-ch:hover { border-color: var(--brand); }
.pay-ch.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(10,79,158,.15); }
.pay-qr-box { background: #fff; border: 1px solid var(--line, #e4ebf4); border-radius: 14px; padding: 12px; text-align: center; }
.pay-qr-box img { max-width: 100%; max-height: 300px; border-radius: 10px; }

.balance-hero {
  background: linear-gradient(135deg, #0A4F9E, #1680CD); color: #fff;
  border-radius: 16px; padding: 22px 26px; margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(10,79,158,.3);
}
.bh-label { font-size: 13px; opacity: .8; }
.bh-value { font-size: 40px; font-weight: 800; color: #ffd766; margin: 4px 0; font-variant-numeric: tabular-nums; }
.bh-sub { font-size: 12.5px; opacity: .8; line-height: 1.6; }

/* ---------- 订单详情联系方式 ---------- */
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 480px) { .ct-grid { grid-template-columns: 1fr; } }
.ct-person { background: #f3f7fd; border: 1px solid #dde8f5; border-radius: 12px; padding: 14px; }
.ct-role { font-size: 12px; color: var(--brand); font-weight: 700; margin-bottom: 6px; }
.ct-line { font-size: 14px; line-height: 1.9; word-break: break-all; }

/* 双账户卡栅格 */
.bal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 880px) { .bal-grid { grid-template-columns: 1fr; } }
.balance-hero.vol { background: linear-gradient(135deg, #2f6f4f, #3f8f66); }
.balance-hero.vol-off { background: linear-gradient(135deg, #8a8578, #a09a8c); }
.balance-hero.dep { background: linear-gradient(135deg, #0e6b5c, #1f8a57); }
.balance-hero.dep-off { background: linear-gradient(135deg, #8a8578, #a09a8c); }
.bh-sub { font-size: 13px; opacity: .9; margin-top: 6px; }

/* ==================== 数字 / 英文：Times New Roman 加粗 ==================== */
.num-en, .table td .num-en, .table th .num-en {
  font-family: var(--font-num);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0;
}
/* 中文标题类不加粗 */
h1, h2, h3, .page-title, .order-card .course, .portal h3, .dash-title, .auth-box h2, .noti b { font-weight: 400; }
.brand .name, .auth-box h1, .auth-brand-m b { font-weight: 400; }
.stat-card .stat-l, .stat-card .stat-v { font-weight: 400; }
.stat-card .stat-v .num-en { font-weight: 700; }
button, .btn, .input, select, textarea, input { font-family: var(--font-cn); }
button .num-en, .btn .num-en, .badge .num-en, .tag .num-en, .fee-item .num-en { font-weight: 700; }

/* ---------- 签到码（志愿时长提现发放） ---------- */
.sc-chip {
  display: inline-block;
  font-family: "Times New Roman", Times, monospace;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: 14px;
  color: #0A4F9E;
  background: linear-gradient(180deg, #eaf3fe 0%, #d4e6fb 100%);
  border: 1px dashed #1680CD;
  border-radius: 7px;
  padding: 2px 10px;
  line-height: 1.5;
  user-select: all;
  word-break: break-all;
}
.sc-inline { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0; }
.noti .sc-chip { font-size: 15px; padding: 3px 12px; }
#sc-code { letter-spacing: 2px; font-family: "Times New Roman", Times, monospace; font-weight: 700; text-transform: uppercase; }

/* ==================== 全局字体规范（中文：微软雅黑 · 不加粗） ==================== */
/* 中文相关元素统一使用微软雅黑 */
body, .topbar, .wrap, h1, h2, h3, h4, h5, h6, p, span, div, button, input, select, textarea,
label, a, td, th, li, .badge, .tag, .btn, .modal, .noti, .order-card, .portal, .card,
.mg-details, .stat-card, .dash-title, .subtabs, .auth-hero, .reg-closed, .settings-hero,
.pay-ch, .kefu-float, .manual-float, .float-btn, .float-btn span, .balance-hero, .fee-item, .ct-line, .ct-role, .sh-title, .rc-title {
  font-family: var(--font-cn) !important;
}
/* 中文统一不加粗（数字 / 英文保持 Times New Roman 加粗） */
h1, h2, h3, .page-title, .auth-box h2, .auth-hero h1, .auth-brand-m b, .dash-title,
.stat-card .stat-l, .stat-card .stat-v,
.topbar .brand .name, .brand-name, .user-meta b, .user-meta span,
.btn, .badge, .tag, label.field, .auth-tabs button, .radio-group label,
.subtabs button, .order-card .course, .order-card .line b, .order-card .meta b, .check,
.table th, .toast-item, .portal-switch button, .mg-details > summary, .mg-tabs button,
.sh-title, .st-field-head, .reg-closed .rc-title, .pay-ch-name, .kefu-float, .manual-float, .float-btn span,
.modal h3, .section-head, .auth-hero .feat b, .noti b {
  font-weight: 400 !important;
}
/* 数字 / 英文：保持 Times New Roman 加粗（价格、计数、签到码等） */
.num-en, .sc-chip, .bell .dot, .gold-text, .bh-value, #sc-code,
.stat-card .stat-v .num-en, button .num-en, .btn .num-en,
.badge .num-en, .tag .num-en, .fee-item .num-en {
  font-family: var(--font-num) !important; font-weight: 700 !important;
}

/* ==================== 所有终端内容单行呈现（不换行） ==================== */
/* 表格单元格不换行，表格随内容拉宽，外层容器横向滚动 */
.table { width: max-content; min-width: 100%; }
.table th, .table td { white-space: nowrap; }
.order-card .meta { margin: 6px 0 12px; }
/* 顶栏：第一行用户名（大），第二行身份（小） */
.user-meta { white-space: nowrap; line-height: 1.25; text-align: right; }
.user-meta b { font-size: 15px; color: var(--ink); font-weight: 400; }
.user-meta span { font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: .3px; }

/* ---------- 启动加载动画：展示 5 秒 + 退场 2 秒 ---------- */
#splash { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: radial-gradient(1400px 780px at 50% 26%, #2179c9 0%, #0A4F9E 42%, #06356b 100%); }
/* 细腻网格提升质感 */
.sp-grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 72%);
  animation: sp-drift 14s linear infinite; }
@keyframes sp-drift { to { background-position: 46px 46px, 46px 46px; } }
#splash::before { content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(120,190,255,.30), transparent 62%); filter: blur(18px);
  animation: sp-breathe 5s ease-in-out infinite; }
.splash-box { position: relative; text-align: center; color: #fff; padding: 0 24px; }
.splash-emblem { position: relative; width: 136px; height: 136px; margin: 0 auto 26px; display: flex; align-items: center; justify-content: center; }
.sp-logo { position: relative; width: 94px; height: 94px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, rgba(255,255,255,.30), rgba(255,255,255,.09) 62%, rgba(255,255,255,.02));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.38), 0 16px 36px rgba(0,0,0,.36);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: sp-pop 5s ease-in-out infinite; }
.sp-logo svg { width: 62px; height: 62px; display: block; filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }
.sp-halo { position: absolute; inset: 2px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.30), rgba(255,255,255,0) 68%);
  animation: sp-breathe 5s ease-in-out infinite; }
.sp-ring { position: absolute; border-radius: 50%; border: 2px solid transparent; }
.sp-ring.r1 { inset: 0; border-top-color: #ffd766; border-right-color: rgba(255,215,102,.30); animation: sp-spin 1.9s linear infinite; }
.sp-ring.r2 { inset: 18px; border-bottom-color: rgba(255,255,255,.88); border-left-color: rgba(78,240,224,.38); animation: sp-spin-rev 2.8s linear infinite; }
/* 品牌名：书法字体（华文新魏 · 魏碑风），与其他界面字体区分（需覆盖全局雅黑规范） */
.splash-name { font-family: "STXinwei", "华文新魏", "FZShuTi", "方正舒体", "STLiti", "华文隶书",
    "STXingkai", "华文行楷", "KaiTi", "楷体", "cwTeX 楷書", "AR PL UKai CN",
    "FZXiaoBiaoSong-B05S", "方正小标宋简体", "Noto Serif SC", serif !important;
  font-size: 46px; letter-spacing: 16px; padding-left: 16px; font-weight: 700; line-height: 1.25;
  text-shadow: 0 8px 28px rgba(0,0,0,.38); animation: sp-fade 1.35s .18s ease both; }
.splash-sub { font-size: 13.5px; opacity: .86; margin-top: 12px; letter-spacing: 5px; animation: sp-fade 1.45s .38s ease both; }
/* 启动页品牌名：后台可选字体（自定义上传字体优先） */
.splash-name.sp-custom-font { font-family: "SplashCustomFont", "STXinwei", "华文新魏", KaiTi, "楷体", serif !important; }
.splash-name[data-font="kai"] { font-family: KaiTi, "楷体", "STKaiti", "华文楷体", serif !important; }
.splash-name[data-font="xinwei"] { font-family: "STXinwei", "华文新魏", "FZShuTi", serif !important; }
.splash-name[data-font="lishu"] { font-family: "STLiti", "华文隶书", "LiSu", "隶书", serif !important; }
.splash-name[data-font="xingkai"] { font-family: "STXingkai", "华文行楷", "Xingkai SC", cursive !important; }
.splash-name[data-font="xiaobiaosong"] { font-family: "FZXiaoBiaoSong-B05S", "方正小标宋简体", "Songti SC", serif !important; }
.splash-name[data-font="songti"] { font-family: "Songti SC", SimSun, "宋体", serif !important; }
.splash-name[data-font="heiti"] { font-family: "Heiti SC", SimHei, "黑体", sans-serif !important; }
.splash-name[data-font="yahei"] { font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif !important; }
.splash-bar { width: 230px; height: 4px; margin: 28px auto 0; background: rgba(255,255,255,.16); border-radius: 4px; overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 42%; border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,215,102,0), #ffd766 38%, #fff6cf 58%, rgba(255,215,102,0));
  animation: sp-slide 1.9s cubic-bezier(.5,0,.2,1) infinite; }
.splash-tip { margin-top: 16px; font-size: 12px; opacity: .68; letter-spacing: 2px; animation: sp-pulse 2.4s ease-in-out infinite; }

/* 退场：光晕扩散 + 徽标放大 + 整体模糊淡出（约 2 秒） */
.sp-flash { position: absolute; width: 150px; height: 150px; border-radius: 50%; opacity: 0; transform: scale(.4);
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(160,205,255,.35) 45%, rgba(255,255,255,0) 72%); }
#splash.out { animation: sp-out 2s cubic-bezier(.5,0,.2,1) forwards; }
@keyframes sp-out { 0% { opacity: 1; filter: blur(0); transform: scale(1); }
  55% { opacity: .92; } 100% { opacity: 0; filter: blur(16px); transform: scale(1.14); visibility: hidden; } }
#splash.out .sp-flash { animation: sp-flash 1.7s ease-out forwards; }
@keyframes sp-flash { 0% { opacity: .9; transform: scale(.35); } 55% { opacity: .4; } 100% { opacity: 0; transform: scale(7); } }
#splash.out .splash-box { animation: sp-box-out 1.15s cubic-bezier(.5,0,.2,1) forwards; }
@keyframes sp-box-out { 30% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-28px) scale(1.08); filter: blur(6px); } }
#splash.out .splash-emblem { animation: sp-emblem-out 1.5s cubic-bezier(.5,0,.2,1) forwards; }
@keyframes sp-emblem-out { 30% { transform: scale(1) rotate(0); } 100% { transform: scale(1.75) rotate(10deg); opacity: 0; } }
#splash.out .sp-ring { animation: sp-spin .55s linear infinite; }

@keyframes sp-spin { to { transform: rotate(360deg); } }
@keyframes sp-spin-rev { to { transform: rotate(-360deg); } }
@keyframes sp-pop { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.05); } }
@keyframes sp-breathe { 0%,100% { transform: scale(.85); opacity: .55; } 50% { transform: scale(1.1); opacity: .9; } }
@keyframes sp-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sp-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(340%); } }
@keyframes sp-pulse { 0%,100% { opacity: .45; } 50% { opacity: .85; } }

/* ---------- 双方联系方式提示 ---------- */
.contact-notice { background: #eef5fe; border: 1px solid #d6e6fa; color: #0A4F9E; border-radius: 10px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.75; margin-bottom: 12px; }
.contact-btn-line { justify-content: flex-start; margin: 10px 0 2px; }
.contact-expired { color: var(--muted); font-size: 12.5px; }

/* ---------- 押金扣除告知 ---------- */
.ded-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #f8fbff; }
.ded-amt { color: var(--danger); font-weight: 800; font-size: 16px; }
.ack-badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 8px; }
.ack-yes { background: #e8f5ee; color: #1f8a57; }
.ack-no { background: #fdecec; color: var(--danger); }

@media (max-width: 600px) {
  .contact-btn-line { justify-content: center; }
  .contact-btn-line .btn { width: 100%; max-width: 280px; justify-content: center; }
}

/* ==================== 顶部滚动公告 ==================== */
.top-wrap { position: sticky; top: 0; z-index: 30; background: rgba(255,253,248,.9); backdrop-filter: blur(12px); }
.topbar { position: static; }
.marquee { display: flex; align-items: center; gap: 8px; padding: 7px 20px; overflow: hidden;
  border-bottom: 1px solid #f3c7c2; background: linear-gradient(90deg, #fff6f5 0%, #ffe4e1 55%, #fff6f5 100%); }
.marquee .mq-tag { flex: none; font-size: 11.5px; line-height: 1; padding: 4px 8px; border-radius: 6px;
  background: var(--danger, #d14343); color: #fff; letter-spacing: .5px; }
.mq-view { flex: 1; min-width: 0; overflow: hidden; height: 22px; position: relative; }
.mq-track { display: inline-flex; align-items: center; height: 100%; white-space: nowrap; animation: mq-scroll 32s linear infinite; }
.mq-seq { display: inline-flex; align-items: center; gap: 48px; padding-right: 48px; }
.mq-item { font-size: 13px; color: #8e2b26; }
.mq-sep { color: #d08b84; opacity: .9; font-size: 12px; }
@keyframes mq-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .mq-track { animation-play-state: paused; }
.marquee.preview { border: 1px solid #f3c7c2; border-radius: 10px; padding: 6px 12px; }

/* ==================== 登录后强制公告 ==================== */
.notice-modal .nm-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.notice-modal .nm-ic { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--grad); color: #fff; }
.notice-modal .nm-ic svg { width: 22px; height: 22px; }
.notice-modal .nm-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.notice-modal .nm-body { max-height: 52vh; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font-size: 13.5px; line-height: 1.85; color: var(--ink-2); background: #f7f9fc;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }

/* ==================== 消息中心（分栏 / 完整内容） ==================== */
.nt-unread { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 8px 0 2px;
  background: #fff6e8; border: 1px solid #f2dcb6; color: #96650f; border-radius: 10px; font-size: 13px; }
.nt-unread svg { width: 16px; height: 16px; flex: none; }
.nt-tabs { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.nt-tabs button { padding: 7px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  font-size: 13px; color: var(--ink-2); cursor: pointer; }
.nt-tabs button.active { background: var(--grad); color: #fff; border-color: transparent; }
.nt-list { max-height: 58vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.noti-main { flex: 1; min-width: 0; }
.noti-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nt-new { font-size: 11px; background: var(--danger); color: #fff; border-radius: 6px; padding: 1px 6px; }
.noti-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.noti-text { margin-top: 6px; font-size: 13px; line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }

/* ==================== 管理员端：分组导航与公告管理 ==================== */
.adm-groups { display: inline-flex; gap: 4px; margin: 0 0 12px; padding: 4px; flex-wrap: wrap;
  background: #eef2f7; border: 1px solid var(--line); border-radius: 12px; }
.adm-groups button { padding: 8px 18px; border: none; border-radius: 9px; background: transparent;
  font-size: 13.5px; color: var(--ink-2); cursor: pointer; transition: .15s; }
.adm-groups button:hover { color: var(--brand); }
.adm-groups button.active { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(10,79,158,.14); }
.nt-manage .st-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #f6f8fb; border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.nt-form .field { display: block; margin-top: 10px; }
.nt-manage { display: flex; flex-direction: column; gap: 16px; }
.nt-manage .card { margin-top: 0; }
.mc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.mc-ic { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; }
.mc-ic svg { width: 20px; height: 20px; }
.mc-ic.amber { background: #fff2dc; color: #c47a00; }
.mc-ic.blue { background: #e9f1fb; color: var(--brand); }
.mc-ic.green { background: #e7f6ee; color: #1f8a57; }
.mc-ic.gray { background: #eef1f6; color: #5b6577; }
.mc-txt { flex: 1; min-width: 0; }
.mc-txt h4 { margin: 0; font-size: 15.5px; font-weight: 400; color: var(--ink); }
.mc-txt p b, .mc-txt p strong { font-weight: 400; color: var(--brand); }
.mc-txt p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.mc-state { flex: none; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.mc-state.on { background: #e7f6ee; color: #1f8a57; }
.mc-state.off { background: #f0f2f5; color: #8b94a3; }
.mc-body { padding-top: 14px; }
.mc-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding-top: 14px; margin-top: 4px; }
.mc-foot .btn { display: inline-flex; align-items: center; gap: 6px; }
.mc-foot .btn svg { width: 15px; height: 15px; }
.an-list { display: flex; flex-direction: column; gap: 10px; }
.an-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfcfe; }
.an-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-title { font-size: 14px; color: var(--ink); }
.an-meta { font-size: 12px; color: var(--muted); margin-top: 5px; }
.an-del { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; flex: none; }
.an-del svg { width: 14px; height: 14px; }
.an-metrics { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.an-metrics span { background: #f2f5fa; border-radius: 7px; padding: 3px 9px; }
.an-text { margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }

@media (max-width: 640px) {
  .marquee { padding: 6px 12px; gap: 6px; }
  .marquee .mq-tag { padding: 3px 6px; font-size: 11px; }
  .mq-item { font-size: 12px; }
  .mq-seq { gap: 32px; padding-right: 32px; }
  .adm-groups { display: flex; width: 100%; }
  .adm-groups button { flex: 1; padding: 7px 8px; font-size: 12.5px; }
  .nt-tabs button { padding: 6px 12px; font-size: 12.5px; }
  .nt-list { max-height: 54vh; }
  .mc-head { gap: 10px; }
  .mc-ic { width: 34px; height: 34px; }
  .mc-txt h4 { font-size: 14.5px; }
  .mc-foot { justify-content: stretch; }
  .mc-foot .btn { width: 100%; justify-content: center; }
  .an-del { margin-left: 0; }
}

/* ==================== 平台福利（平台补贴） ==================== */
.sb-tip { border: 1px solid #f2d9a0; background: linear-gradient(180deg, #fff8ea, #fff3dc);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.sb-tip-head { display: flex; align-items: center; gap: 6px; color: #a86a00; font-size: 13.5px; margin-bottom: 8px; }
.sb-tip-head svg { width: 17px; height: 17px; }
.sb-tip-line { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: #7d4a05; line-height: 1.7; }
.sb-tip-line svg { width: 15px; height: 15px; flex: none; margin-top: 3px; color: #c47a00; }
.sb-tip-foot { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.sb-badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 7px;
  background: #fff2dc; color: #a86a00; border: 1px solid #f2d9a0; margin-left: 4px; }
.sb-list { display: flex; flex-direction: column; gap: 10px; }
.sb-rule { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfcfe; }
.sb-rule.off { background: #f7f8fa; opacity: .85; }
.sb-rule-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.sb-rule-line { font-size: 13px; color: var(--ink-2); margin-top: 5px; line-height: 1.6; }
.sb-rule-line.muted { color: var(--muted); font-size: 12px; }
.sb-ops { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.sb-chks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 4px 0 10px; }
.sb-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.sb-chk input { width: 15px; height: 15px; }
.sb-app { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfcfe; }
.sb-app .an-top { margin-bottom: 2px; }
@media (max-width: 640px) {
  .sb-ops { flex-wrap: wrap; }
  .sb-ops .btn { flex: 1; justify-content: center; }
}

/* ==================== 手册与客服（后台维护） ==================== */
.rs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #f6f8fb; border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.rs-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.rs-link { font-size: 13px; color: var(--brand); word-break: break-all; }
.rs-file { padding: 8px 10px; }
.rs-file::file-selector-button { border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 8px; padding: 5px 12px; margin-right: 10px; cursor: pointer; font-size: 13px; }
@media (max-width: 640px) {
  .rs-row { flex-direction: column; align-items: stretch; }
}

/* ==================== 短信通知配置 ==================== */
.sms-tpl-list { display: flex; flex-direction: column; gap: 8px; }
.sms-tpl-row { display: flex; align-items: center; gap: 12px; }
.sms-tpl-label { flex: none; width: 168px; font-size: 13px; color: var(--ink-2); }
.sms-tpl-input { flex: 1; }
table.sms-log { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.sms-log th, table.sms-log td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
table.sms-log th { background: #f2f5fa; text-align: center; }
table.sms-log td.center { text-align: center; }
@media (max-width: 640px) {
  .sms-tpl-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .sms-tpl-label { width: auto; }
}

.sms-tpl-label { display: flex; flex-direction: column; gap: 2px; }
.sms-tpl-vars { font-size: 11px; color: var(--muted); letter-spacing: .2px; }

/* ==================== 校区与教室配置 ==================== */
.cm-list { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 4px; }
.cm-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfcfe; }
.cm-ops { display: flex; justify-content: flex-end; margin-top: 8px; }

.sb-banner { background: #fff7e8; border: 1px solid #f5d9a8; border-radius: 12px; padding: 10px 14px; margin: 8px 0 10px; font-size: 13px; color: #8a5a00; }
.sb-banner .sb-line { margin-top: 4px; }

/* ==================== 找回密码（重新排版） ==================== */
.fp-wrap { max-width: 460px; margin: 0 auto; }
.fp-head { text-align: center; margin-bottom: 14px; }
.fp-title { font-size: 20px; font-weight: 700; }
.fp-steps { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.fp-step { color: var(--muted); background: #f2f5fa; border-radius: 999px; padding: 4px 12px; }
.fp-step.active { color: #fff; background: var(--brand, #3b6ef5); font-weight: 600; }
.fp-arrow { color: var(--muted); }
.fp-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 6px 24px rgba(20, 40, 80, .06); }

/* ==================== 短信通知页（新版排版） ==================== */
.sms-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, #2b5fd9 0%, #3b78e7 55%, #5a94f2 100%); color: #fff;
  border-radius: 16px; padding: 18px 22px; margin-bottom: 14px; box-shadow: 0 8px 24px rgba(43, 95, 217, .25); }
.sms-hero-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sms-hero-title svg { width: 20px; height: 20px; fill: currentColor; }
.sms-hero-sub { font-size: 12.5px; opacity: .85; margin-top: 4px; }
.sms-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.sms-stat { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 12px;
  padding: 8px 14px; min-width: 96px; text-align: center; }
.sms-stat-num { font-size: 17px; font-weight: 700; }
.sms-stat-num .tag { font-size: 12px; }
.sms-stat-dim { font-size: 12px; font-weight: 400; opacity: .75; }
.sms-stat-txt { font-size: 14px; }
.sms-stat-label { font-size: 11px; opacity: .8; margin-top: 2px; }

.sms-cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: end; }
.sms-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; padding: 6px 0; }
.sms-toggle.disabled { opacity: .55; cursor: not-allowed; }
.sms-toggle input { display: none; }
.sms-toggle-track { flex: none; width: 44px; height: 24px; border-radius: 999px; background: #cfd8e6; position: relative; transition: background .2s; }
.sms-toggle-track .sms-toggle-dot { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.sms-toggle input:checked + .sms-toggle-track { background: var(--brand, #3b6ef5); }
.sms-toggle input:checked + .sms-toggle-track .sms-toggle-dot { left: 23px; }
.sms-toggle-txt { display: flex; flex-direction: column; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.sms-toggle-txt small { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.sms-field { display: flex; flex-direction: column; gap: 4px; }
.sms-field label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }

.sms-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sms-tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfcfe;
  display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s; }
.sms-tile.set { border-color: #bfe3cd; background: #f6fcf8; }
.sms-tile-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sms-tile-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.sms-tile-vars { display: flex; flex-wrap: wrap; gap: 4px; }
.sms-tile-vars code { font-size: 11px; background: #eef3fb; color: #2b5fd9; border-radius: 6px; padding: 2px 7px; }
.sms-tile-vars code.none { background: #f1f3f7; color: var(--muted); }
.sms-tile-body { margin-top: 2px; }
.sms-tile-body-label { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; letter-spacing: .2px; }
.sms-tile-pre {
  margin: 0 0 6px; padding: 9px 11px; background: #fff; border: 1px dashed #d3deec; border-radius: 8px;
  font: 12.5px/1.6 ui-monospace, Menlo, Consolas, monospace; color: #41566f; white-space: pre-wrap; word-break: break-word;
}
.sms-tile-body .btn.soft.xs { padding: 3px 10px; font-size: 11.5px; align-self: flex-start; }
.sms-tile .input { font-size: 12.5px; }

.sms-test-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sms-test-row .input { flex: 1; min-width: 180px; }
.sms-test-row .btn { flex: none; }
table.sms-log td.sms-code { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--muted); }
@media (max-width: 760px) {
  .sms-cfg-grid { grid-template-columns: 1fr; }
  .sms-hero { flex-direction: column; align-items: stretch; }
}
.sms-test-row .btn { white-space: nowrap; min-width: 128px; justify-content: center; }


/* ==================== 悬浮客服/手册（Speed-dial 风格） ==================== */
.fab-wrap {
  position: fixed; right: 18px; bottom: 22px; z-index: 90;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  pointer-events: none;
}
.fab-main {
  position: relative; width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #2f93e0), var(--brand, #0A4F9E));
  color: #fff; border: none; cursor: pointer;
  box-shadow: 0 8px 22px rgba(10,79,158,.42);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s cubic-bezier(.34,1.4,.64,1), box-shadow .2s;
  pointer-events: auto;
}
.fab-main:hover { transform: scale(1.07); box-shadow: 0 12px 28px rgba(10,79,158,.5); }
.fab-main:active { transform: scale(.94); }
.fab-ic, .fab-x {
  display: flex; align-items: center; justify-content: center;
  transition: opacity .22s ease, transform .3s cubic-bezier(.4,0,.2,1);
}
.fab-main svg { width: 24px; height: 24px; }
.fab-x { position: absolute; inset: 0; font-size: 28px; font-weight: 600; line-height: 1; opacity: 0; transform: rotate(-90deg) scale(.5); }
.fab-wrap.open .fab-ic { opacity: 0; transform: rotate(90deg) scale(.5); }
.fab-wrap.open .fab-x { opacity: 1; transform: none; }
.fab-wrap.open .fab-main { transform: rotate(0deg); }
.fab-menu {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.fab-item {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #e3eaf2; border-radius: 16px;
  padding: 10px 16px 10px 12px; cursor: pointer; text-align: left;
  box-shadow: 0 8px 24px rgba(10,79,158,.14);
  opacity: 0; transform: translateY(16px) scale(.9);
  transition: opacity .26s ease, transform .3s cubic-bezier(.34,1.35,.64,1), box-shadow .2s;
}
.fab-item:hover { box-shadow: 0 12px 28px rgba(10,79,158,.24); transform: translateY(-2px) scale(1.02); }
.fab-item svg { width: 20px; height: 20px; color: var(--brand, #0A4F9E); flex: none; }
.fab-txt { display: flex; flex-direction: column; line-height: 1.25; }
.fab-txt b { font-size: 14px; color: #1c2b3a; }
.fab-txt i { font-style: normal; font-size: 12px; color: #7c8ba1; }
.fab-wrap.open .fab-item { opacity: 1; transform: none; pointer-events: auto; }
.fab-wrap:not(.open) .fab-item {
  visibility: hidden;
  transition: opacity .22s ease, transform .26s ease, box-shadow .2s, visibility 0s linear .3s;
}
.fab-wrap.open .fab-item:nth-last-child(1) { transition-delay: .04s; }
.fab-wrap.open .fab-item:nth-last-child(2) { transition-delay: .1s; }
@media (max-width: 640px) {
  .fab-wrap { right: 12px; bottom: 14px; }
  .fab-main { width: 50px; height: 50px; }
  .fab-main svg { width: 21px; height: 21px; }
  .fab-item { padding: 8px 13px 8px 10px; }
  .fab-txt b { font-size: 13px; }
}

/* ==================== 富文本工具栏与富文本内容 ==================== */
.rt-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: #f6f8fb; border: 1px solid #e3eaf2; border-bottom: none;
  border-radius: 10px 10px 0 0; padding: 6px 10px; margin-top: 8px;
}
.rt-bar + .input, .rt-bar + textarea, .rt-bar + textarea.input { border-top-left-radius: 0; border-top-right-radius: 0; margin-top: 0; }
.rt-label { font-size: 12px; color: var(--muted, #7c8ba1); }
.rt-btn {
  min-width: 30px; height: 28px; padding: 0 8px; border-radius: 8px;
  border: 1px solid #dbe4ee; background: #fff; cursor: pointer;
  font-size: 13px; color: #2c3e50; transition: .15s;
}
.rt-btn:hover { background: #eef4fb; border-color: var(--brand, #0A4F9E); }
.rt-color { width: 34px; height: 28px; padding: 2px; border: 1px solid #dbe4ee; border-radius: 8px; background: #fff; cursor: pointer; }
.rt-sep { width: 1px; height: 18px; background: #dbe4ee; }
.rt-content { line-height: inherit; }
.rt-content b { font-weight: 700; }
.rt-content i { font-style: italic; }
.rt-content p, .rt-content div, .rt-content span { line-height: inherit; margin: 0; }

/* ==================== 公告与设置：各终端自适应 ==================== */
@media (max-width: 640px) {
  /* —— 注册设置页 —— */
  .settings-wrap { max-width: 100%; }
  .settings-hero { padding: 14px 16px; border-radius: 14px; gap: 10px; }
  .sh-icon { width: 38px; height: 38px; border-radius: 10px; }
  .sh-icon svg { width: 20px; height: 20px; }
  .sh-title { font-size: 16px; }
  .sh-sub { font-size: 12px; }
  /* 内联写的横向排布行（开关行 / 危险操作行 / 保存按钮行）允许换行，不再横向挤压 */
  .settings-wrap [style*="justify-content:space-between"] { flex-wrap: wrap; gap: 8px; }
  .settings-wrap [style*="justify-content: flex-end"] { flex-direction: column-reverse; }
  .settings-wrap [style*="justify-content: flex-end"] .btn { width: 100%; }
  .manage-card { max-width: 100% !important; padding: 16px 14px !important; }

  /* —— 公告管理页 —— */
  .nt-manage { gap: 12px; }
  .nt-manage .card { padding: 14px 13px; }
  .nt-manage .st-row { flex-wrap: wrap; padding: 11px 13px; }
  .nt-manage .st-row > div { flex: 1; min-width: 0; }
  .nt-form .row2 { grid-template-columns: 1fr; }
  .mc-head { align-items: flex-start; }
  .mc-txt p { font-size: 12px; }
  .mc-foot { justify-content: stretch; }
  .mc-foot .btn { width: 100%; justify-content: center; }
  /* 富文本工具栏可换行 */
  .rt-bar { flex-wrap: wrap; gap: 5px; }
  .rt-bar .rt-btn { padding: 6px 8px; }
  /* 已发布通知卡片 */
  .an-item { padding: 11px 12px; }
  .an-top .an-title { flex: 1 1 100%; order: 3; }
  .an-del { margin-left: 0; }
  .an-del span { display: none; } /* 撤回按钮窄屏只留图标 */
  .an-metrics { flex-wrap: wrap; gap: 8px; }
  textarea { min-height: 72px; }
}

@media (max-width: 380px) {
  .settings-hero { padding: 13px 14px; }
  .sh-title { font-size: 15px; }
  .sh-sub { font-size: 11.5px; }
  .mc-txt h4 { font-size: 14px; }
  .st-field-head { font-size: 14px; }
}

/* ==================== 短信通知页：手机端排版 ==================== */
/* 滚动公告轨道不参与页面宽度计算（原先长文本会把整页撑出横向滚动） */
.mq-track { contain: layout style; }
.mq-view { contain: layout paint; }

@media (max-width: 760px) {
  .sms-hero { padding: 15px 16px; border-radius: 14px; }
  .sms-hero-title { font-size: 15.5px; }
  .sms-hero-sub { font-size: 12px; line-height: 1.5; }
  /* 概览小卡：两列自适应，不再 4 个挤一行 */
  .sms-hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sms-stat { min-width: 0; padding: 9px 8px; }
  .sms-stat-num { font-size: 15px; }
  .sms-stat-txt { font-size: 12.5px; line-height: 1.35; word-break: break-all; }
  .sms-stat-label { font-size: 10.5px; }
  /* 配置项单列 */
  .sms-cfg-grid { gap: 10px; }
  .sms-toggle-txt { font-size: 13px; }
  .sms-toggle-txt small { font-size: 11px; }
  /* 场景模板瓦片：单列 + 输入框不撑破 */
  .sms-tiles { grid-template-columns: 1fr; gap: 10px; }
  .sms-tile { padding: 11px 12px; }
  .sms-tile-name { font-size: 12.5px; line-height: 1.35; }
  .sms-tile-vars code { font-size: 10.5px; padding: 2px 6px; }
  .sms-tile .input { font-size: 12px; }
  /* 测试行：竖排，按钮全宽 */
  .sms-test-row { flex-direction: column; gap: 8px; }
  .sms-test-row .input { min-width: 0; width: 100%; }
  .sms-test-row .btn { width: 100%; min-width: 0; justify-content: center; }
}

/* ==================== 短信测试按钮与日志导出 ==================== */
/* 发送测试短信按钮：固定高度，图标不再被拉伸放大 */
.sms-test-row .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 16px; font-size: 14px; min-height: 46px; box-sizing: border-box; }
.sms-test-row .btn svg { width: 16px; height: 16px; flex: none; }
.sms-export-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.sms-export-row .btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.sms-export-row .btn svg { width: 15px; height: 15px; flex: none; }
.sms-export-row .muted { line-height: 1.5; }
@media (max-width: 760px) {
  .sms-test-row .btn { width: 100%; }
  .sms-export-row { flex-direction: column; align-items: stretch; }
  .sms-export-row .btn { justify-content: center; }
}

/* ==================== 交互提速：按钮即时反馈，去掉多余阴影 ==================== */
/* 按钮：去掉位移+大投影的 hover 效果，改为 0.08s 的轻量颜色反馈，按下即刻响应 */
.btn { transition: background-color .08s linear, filter .08s linear; box-shadow: none; }
.btn:hover { transform: none; box-shadow: none; filter: brightness(1.06); }
.btn:active { transform: none; filter: brightness(.94); }
.btn.ok, .btn.warn, .btn.danger, .btn.soft, .btn.ghost { box-shadow: none; }
.btn.ok:hover, .btn.warn:hover, .btn.danger:hover { box-shadow: none; }

/* 次级/灰底按钮与页签：不加重投影 */
.btn.soft:hover { background: #dde6f1; }
.subtabs button.active { box-shadow: none; }
.mg-tabs button.active, .adm-groups button.active, .portal-switch button.active, .auth-tabs button.active { box-shadow: none; }
.subtabs button, .mg-tabs button, .adm-groups button, .portal-switch button { transition: background-color .08s linear, color .08s linear; }

/* 卡片类：只保留一层很淡的边框感，去掉投影（设置/公告/短信/设置页卡片） */
.manage-card, .form-card, .fp-card, .an-item, .sb-rule, .sb-app, .sms-tile, .rs-row, .nt-manage .card,
.settings-wrap .card, .stat-card, .card { box-shadow: none; }
.card:hover, .manage-card:hover, .sms-tile:hover, .an-item:hover { box-shadow: none; }
.sms-tile { transition: border-color .08s linear, background-color .08s linear; }

/* 顶部蓝色条/绿色状态条：去掉彩色外发光，保留纯色渐变 */
.sms-hero, .settings-hero, .settings-hero.closed { box-shadow: none; }
.sms-stat, .balance-hero { box-shadow: none; }

/* 悬浮按钮只保留必要的一层柔和投影（便于与内容区分），去掉 hover 加大阴影 */
.fab-main:hover { transform: scale(1.04); box-shadow: 0 6px 16px rgba(10,79,158,.34); }
.fab-item:hover { box-shadow: 0 4px 12px rgba(10,79,158,.12); transform: none; }

/* 触屏：去掉 300ms 点击延迟、去掉点击高亮块 */
button, .btn, a, [data-act], .subtabs button, label.switch, .sms-toggle, .check,
input[type="checkbox"], select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
* { -webkit-tap-highlight-color: transparent; }

/* ==================== 订单卡「下单者」信息：手机端拆三行 ==================== */
.ord-mobile { display: none; }
@media (max-width: 640px) {
  .ord-desktop { display: none; }
  .ord-mobile { display: block; }
}
.order-card .ord-mobile, .list .ord-mobile { display: none; }
@media (max-width: 640px) {
  .order-card .ord-desktop, .list .ord-desktop { display: none !important; }
  .order-card .ord-mobile, .list .ord-mobile { display: block !important; }
}
/* 手机端申请人拆行：左信息块自适应宽度，行距收紧 */
@media (max-width: 640px) {
  .app-mob { flex: 1; min-width: 0; }
  .app-mob .line { margin: 3px 0; }
}

/* ==================== 订单留言（按钮 + 对话框） ==================== */
/* 订单卡上的入口按钮：轻量、无阴影，与其它 secondary 按钮一致 */
.msg-btn-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 2px; }
.msg-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 14px; }
.msg-btn svg { width: 15px; height: 15px; flex: none; }
.msg-btn-tip { font-size: 11.5px; color: var(--muted); }

/* 对话框 */
.msg-modal { width: 100%; max-width: 520px; padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: min(84vh, 640px); }
.msg-modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.msg-modal-head > svg { width: 20px; height: 20px; color: var(--primary); flex: none; }
.msg-modal-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msg-modal-title b { font-size: 16px; color: var(--ink); }
.msg-modal-title span { font-size: 11.5px; color: var(--muted); }
.msg-close { margin-left: auto; flex: none; width: 30px; height: 30px; border: none; border-radius: 8px; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; transition: background-color .08s linear, color .08s linear; touch-action: manipulation; }
.msg-close:hover { background: #eaeef5; color: var(--ink); }
.msg-modal-hint { padding: 8px 16px; font-size: 11.5px; color: var(--muted); background: #fbfcfe; border-bottom: 1px solid #eef1f6; }

.msg-list { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 120px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.msg-empty { font-size: 12.5px; color: var(--muted); text-align: center; padding: 20px 0; }
.msg-item { max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.65; word-break: break-word; }
.msg-item.other { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg-item.mine { align-self: flex-end; background: #e6f0fc; border: 1px solid #cfe0f6; border-top-right-radius: 4px; }
.msg-who { font-size: 11px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 8px; align-items: center; }
.msg-time { color: #a9b2c0; }
.msg-text { color: var(--ink); white-space: pre-wrap; }
/* 删除按钮：仅在可删除的留言上出现，默认淡出、悬停/聚焦时清晰 */
.msg-del { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: none; background: transparent; color: #b6bfcc; border-radius: 6px; cursor: pointer; opacity: .5; transition: background-color .08s linear, color .08s linear, opacity .08s linear; touch-action: manipulation; }
.msg-del svg { width: 13px; height: 13px; }
.msg-del:hover, .msg-del:focus-visible { opacity: 1; color: #d64545; background: #fdecec; }
.msg-badge { font-size: 10px; padding: 0 5px; border-radius: 4px; background: var(--primary); color: #fff; line-height: 15px; }
/* 已删除的留言：保留占位，提示内容已移除 */
.msg-item.deleted { opacity: .72; background: #f6f7f9 !important; border: 1px dashed #dfe3ea !important; }
.msg-item.deleted .msg-text { color: var(--muted); font-style: italic; }

/* 输入区 */
.msg-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px 16px 14px; border-top: 1px solid var(--line); background: #fff; }
.msg-input textarea { flex: 1; min-height: 60px; max-height: 140px; font-size: 13.5px; line-height: 1.6; padding: 9px 11px; resize: none; }
.msg-input .btn { flex: none; min-height: 42px; padding: 0 20px; }
.msg-closed-bar { padding: 14px 16px; border-top: 1px solid var(--line); background: #f7f8fa; font-size: 12.5px; color: var(--muted); text-align: center; }

/* 管理员视图：中性色调区分 */
.msg-modal-admin .msg-modal-head { background: #eef1f6; }

@media (max-width: 640px) {
  .msg-btn-line { gap: 8px; }
  .msg-btn { flex: 1; justify-content: center; }
  .msg-btn-tip { display: none; }
  /* 手机端对话框：底部抽屉式，撑满宽度，适配安全区 */
  .modal-mask:has(.msg-modal) { padding: 0; align-items: flex-end; }
  .msg-modal { max-width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; }
  .msg-modal-head { padding: 13px 14px 11px; }
  .msg-modal-hint { padding: 7px 14px; font-size: 11px; }
  .msg-list { padding: 12px 14px; gap: 9px; min-height: 160px; }
  .msg-item { max-width: 88%; font-size: 13px; }
  .msg-del { opacity: .8; width: 24px; height: 24px; }
  .msg-del svg { width: 14px; height: 14px; }
  .msg-input { flex-direction: column; align-items: stretch; padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); }
  .msg-input .btn { width: 100%; }
}

/* ==================== 访问限制（IP 识别） ==================== */
.ip-wrap { display: flex; flex-direction: column; gap: 16px; }
/* 总开关横幅 */
.ip-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: #f7f9fc; }
.ip-hero.on { border-color: #bcd9f2; background: linear-gradient(180deg, #f2f8ff, #eaf3fd); }
.ip-hero.off { background: #f8f9fb; }
.ip-hero-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ip-hero-ic { width: 44px; height: 44px; border-radius: 12px; background: #e3eefb; color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.ip-hero-ic svg { width: 22px; height: 22px; }
.ip-hero.off .ip-hero-ic { background: #eceff4; color: #8a97a8; }
.ip-hero-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.ip-hero-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.ip-self { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); padding: 0 4px; }
.ip-self b { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--primary); font-size: 13.5px; }
.ip-self .muted { font-size: 12px; }

/* 表单 */
.ip-form-card .mc-body { padding-top: 4px; }
.ip-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }
.ip-chips span { font-size: 11.5px; padding: 4px 10px; border-radius: 20px; background: #eef3fa; color: var(--primary); cursor: pointer; font-family: ui-monospace, Menlo, Consolas, monospace; transition: background-color .08s linear; touch-action: manipulation; }
.ip-chips span:hover { background: #e0ebf9; }
.ip-radios { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ip-radios label { flex: 1; min-width: 170px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; background: #fff; }
.ip-radios label:has(input:checked) { border-color: var(--primary); background: #f4f9ff; }
.ip-radios label b { font-weight: 600; }
.ip-radios label span { font-size: 11.5px; color: var(--muted); }
.ip-opts { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 14px; }
.ip-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.ip-check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* 规则列表 */
.ip-rules { display: flex; flex-direction: column; gap: 10px; }
.ip-rule { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.ip-rule.off { opacity: .6; background: #fafbfc; }
.ip-rule-main { min-width: 0; flex: 1; }
.ip-rule-ip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ip-tag { font-family: -apple-system, sans-serif; font-size: 10.5px; font-weight: 500; padding: 1px 8px; border-radius: 20px; line-height: 17px; }
.ip-tag.danger { background: #fdecec; color: #d14343; }
.ip-tag.warn { background: #fff6e5; color: #c9871a; }
.ip-tag.gray { background: #eef0f4; color: #8a97a8; }
.ip-rule-txt { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.6; word-break: break-word; }
.ip-rule-remark { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.ip-rule-acts { display: flex; gap: 6px; flex: none; flex-wrap: wrap; }
.btn.xs { padding: 5px 10px; font-size: 12px; border-radius: 8px; min-height: 30px; }
.ip-empty { font-size: 12.5px; color: var(--muted); text-align: center; padding: 18px 0; }

/* 拦截日志 */
.ip-logs { display: flex; flex-direction: column; gap: 1px; }
.ip-log { display: flex; align-items: center; gap: 12px; padding: 8px 10px; font-size: 12.5px; border-radius: 8px; }
.ip-log:nth-child(odd) { background: #f8fafc; }
.ip-log-ip { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ink); min-width: 118px; }
.ip-log-route { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-log-time { color: #a9b2c0; flex: none; }

/* 联系方式 */
.ip-contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }

/* 自测 */
.ip-test-row { display: flex; gap: 10px; align-items: center; }
.ip-test-row .input { flex: 1; }
.ip-test-out:not(:empty) { margin-top: 12px; }
.ip-test-ok { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #1f8a57; background: #eefaf3; border: 1px solid #c8ecda; border-radius: 10px; padding: 10px 12px; }
.ip-test-ok svg { width: 16px; height: 16px; flex: none; }
.ip-test-hit { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #d14343; background: #fdf1f1; border: 1px solid #f5d3d3; border-radius: 10px; padding: 10px 12px; }
.ip-test-hit.warn { color: #c9871a; background: #fff9ee; border-color: #f6e3bd; }
.ip-test-hit span { font-size: 12px; color: var(--ink-2); }
.ip-test-bad { font-size: 13px; color: #d14343; }

@media (max-width: 640px) {
  .ip-hero { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .ip-hero .switch { align-self: flex-end; }
  .ip-rule { flex-direction: column; }
  .ip-rule-acts { width: 100%; }
  .ip-rule-acts .btn { flex: 1; justify-content: center; }
  .ip-contact-grid { grid-template-columns: 1fr; }
  .ip-radios label { min-width: 100%; }
  .ip-test-row { flex-direction: column; align-items: stretch; }
  .ip-test-row .btn { width: 100%; }
  .ip-log { flex-wrap: wrap; gap: 6px 10px; }
  .ip-log-route { flex-basis: 100%; }
}

/* 仅提示型规则的温馨提示弹窗 */
.ip-notice-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ip-notice-head svg { width: 22px; height: 22px; color: #c9871a; flex: none; }
.ip-notice-head h3 { margin: 0; font-size: 17px; }
.ip-notice-body { font-size: 14px; line-height: 1.85; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.ip-notice-meta { margin-top: 14px; font-size: 12px; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }

/* 访问预检期间：不展示启动动画与页面内容，避免受限访客先闪一下加载页 */
.ip-check #splash, .ip-check #app { display: none !important; }

/* 识别来源标注与说明条 */
.ip-self { flex-wrap: wrap; row-gap: 6px; }
.ip-src { font-size: 12px; color: var(--muted); background: #f4f6fa; border-radius: 6px; padding: 3px 9px; }
.ip-note { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
  background: #f6f9fd; border: 1px solid #e3ecf7; border-radius: 10px; padding: 10px 12px; }
.ip-note svg { width: 15px; height: 15px; flex: none; color: var(--primary); margin-top: 2px; }
.ip-note b { color: var(--ink); }

/* 识别结果诊断提示 */
.ip-diag { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.7;
  border-radius: 10px; padding: 10px 12px; }
.ip-diag svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.ip-diag.ok { background: #eefaf3; border: 1px solid #c8ecda; color: #1c7a4d; }
.ip-diag.ok svg { color: #1f8a57; }
.ip-diag.warn { background: #fff9ee; border: 1px solid #f6e3bd; color: #9a6a10; }
.ip-diag.warn svg { color: #c9871a; }

/* 访客识别结果列表 */
.ip-visits { display: flex; flex-direction: column; gap: 1px; }
.ip-visit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px;
  font-size: 12.5px; border-radius: 8px; border-left: 3px solid transparent; }
.ip-visit:nth-child(odd) { background: #f8fafc; }
.ip-visit.hit { background: #fdf3f3; border-left-color: #d14343; }
.ip-visit-ip { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; color: var(--ink); min-width: 110px; }
.ip-visit-tag { font-size: 10.5px; padding: 1px 8px; border-radius: 20px; line-height: 17px; }
.ip-visit-tag.danger { background: #fdecec; color: #d14343; }
.ip-visit-tag.warn { background: #fff6e5; color: #c9871a; }
.ip-visit-tag.gray { background: #eef0f4; color: #8a97a8; }
.ip-visit-src { color: var(--muted); flex: 1; min-width: 0; font-size: 11.5px; }
.ip-visit-time { color: #a9b2c0; font-size: 11.5px; flex: none; }
@media (max-width: 640px) {
  .ip-visit { gap: 6px 8px; }
  .ip-visit-src { flex-basis: 100%; }
}

/* ================= 站点页脚（政府机关风格） ================= */
.site-footer {
  position: relative;
  max-width: 1200px; margin: 36px auto 96px; padding: 26px 28px 28px;
  text-align: center; color: #6b7a90; font-size: 13px; line-height: 2;
  border-top: 3px solid var(--primary);
}
/* 顶部主题色带：政务蓝 + 中国红，营造机关气质 */
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 3px;
  background: linear-gradient(90deg, var(--primary) 0 72%, #c8161d 72% 100%);
}
.site-footer[hidden] { display: none !important; }
.site-footer .sf-main {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; color: #56657f; font-size: 14px;
}
.site-footer .sf-brand { font-weight: 800; color: var(--primary); font-size: 15px; letter-spacing: .5px; }
.site-footer .sf-ver {
  font-family: var(--font-num); font-size: 12px; font-weight: 700;
  background: var(--primary); color: #fff; border-radius: 4px; padding: 2px 10px; letter-spacing: .4px;
}
.site-footer .sf-sep { color: #c3cfde; }
.site-footer .sf-copy { color: #4a5a72; font-weight: 600; }
.site-footer .sf-sub { color: #7c8ba0; font-size: 12.5px; margin-top: 4px; }
.site-footer .sf-links {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0 16px; margin-top: 8px; font-size: 12.5px;
}
/* 备案号之间以「｜」分隔，形式更正式 */
.site-footer .sf-links > * { position: relative; padding-left: 16px; }
.site-footer .sf-links > *:first-child { padding-left: 0; }
.site-footer .sf-links > *:not(:first-child)::before { content: "｜"; position: absolute; left: 5px; color: #b3c0d2; }
.site-footer .sf-links a { color: var(--primary); text-decoration: none; }
.site-footer .sf-links a:hover { text-decoration: underline; }
.site-footer .sf-contact { color: #7c8ba0; }
.site-footer .sf-links:empty { display: none; }
@media (max-width: 640px) {
  .site-footer { margin: 24px 12px 92px; padding: 20px 16px 22px; font-size: 12px; }
  .site-footer .sf-main { gap: 6px; font-size: 13px; }
  /* 窄屏下备案号竖排居中，去掉分隔竖线，避免换行到行首 */
  .site-footer .sf-links { flex-direction: column; gap: 5px; }
  .site-footer .sf-links > * { padding-left: 0; }
  .site-footer .sf-links > *:not(:first-child)::before { content: none; }
}

/* ================= 站点信息管理（后台，政府机关风格） ================= */
.gov-card { max-width: 1120px; padding: 24px 26px 26px; }
/* 政务栏目标题条：浅蓝渐变底 + 左侧深蓝竖条，正式大气 */
.gov-head {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px; padding: 13px 16px;
  font-size: 16px; font-weight: 800; color: var(--primary); letter-spacing: .5px;
  background: linear-gradient(90deg, #eef4fb 0%, #f6f9fd 60%, #ffffff 100%);
  border-left: 5px solid var(--primary); border-radius: 8px;
}
.site-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.site-grid .field.wide { grid-column: 1 / -1; }
/* 站点页表单：标签加粗、输入框放大留白，更大气 */
.gov-card .site-grid label.field, .gov-card .sg-grid label.field { font-size: 14px; color: var(--ink-2); font-weight: 700; margin: 0 0 8px; }
.gov-card .site-grid .field input, .gov-card .sg-grid .field input {
  display: block; width: 100%; margin-top: 0; box-sizing: border-box;
  padding: 13px 14px; font-size: 15px; border-radius: 10px;
}
.gov-card .site-grid .field input:focus, .gov-card .sg-grid .field input:focus { box-shadow: 0 0 0 4px rgba(10,79,158,.12); }
.site-hint { font-size: 12.5px; color: var(--muted); line-height: 1.8; margin: -4px 0 16px; }
.site-hint b { color: var(--primary); }
/* 表单分组：小节标题 + 细线 + 说明 */
.gov-card .sg-block + .sg-block { margin-top: 22px; }
.gov-card .sg-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; }
.gov-card .sg-title b {
  font-size: 13.5px; color: #33517a; letter-spacing: 1.5px; white-space: nowrap;
  padding-left: 10px; border-left: 3px solid var(--primary); line-height: 1.2;
}
.gov-card .sg-title i { flex: 1; height: 1px; background: #e8eef6; align-self: center; }
.gov-card .sg-title em { font-size: 11.5px; color: #93a5ba; font-style: normal; white-space: nowrap; }
.sg-grid { display: grid; gap: 18px 20px; }
.sg-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.sg-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.sg-grid .field.wide { grid-column: 1 / -1; }
@media (max-width: 860px) { .sg-grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .sg-grid.cols-2, .sg-grid.cols-3 { grid-template-columns: 1fr; } }
/* 页脚预览：仿真政府页脚，带顶部色带，标签做浮标 */
.site-preview {
  position: relative;
  margin-top: 24px; padding: 24px 18px 20px; border-radius: 12px;
  background: #fff; border: 1px solid #e3eaf3; border-top: 3px solid var(--primary);
  text-align: center; color: #6b7a90; font-size: 13px; line-height: 2;
  box-shadow: 0 6px 18px rgba(10,79,158,.05);
}
.site-preview .st-preview-label {
  position: absolute; top: -11px; left: 18px;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 600;
  padding: 2px 12px; border-radius: 11px; letter-spacing: 1px;
}
.site-preview .sp-main { color: #56657f; font-size: 14px; }
.site-preview .sp-brand { font-weight: 800; color: var(--primary); font-size: 15px; }
.site-preview .sp-copy { color: #4a5a72; font-weight: 600; }
.site-preview .sp-ver { font-family: var(--font-num); font-weight: 700; background: var(--primary); color: #fff; border-radius: 4px; padding: 2px 10px; }
.site-preview .sp-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; margin-top: 8px; color: #7c8ba0; font-size: 12.5px; }
.site-preview .sp-links > span { position: relative; padding-left: 16px; }
.site-preview .sp-links > span:first-child { padding-left: 0; }
.site-preview .sp-links > span:not(:first-child)::before { content: "｜"; position: absolute; left: 5px; color: #b3c0d2; }
.ipv6-badge { font-size: 10px; color: #8a97a8; background: #eef0f4; border-radius: 4px; padding: 0 4px; margin-left: 4px; }
@media (max-width: 640px) { .site-grid { grid-template-columns: 1fr; gap: 14px; } }
/* 站点信息页：开关行排版（与公告管理保持一致） */
.site-grid + .st-row, .site-grid ~ .st-row, .brand-grid ~ .st-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0; border-top: 1px solid #eef2f7;
}
.site-grid ~ .st-row .switch, .brand-grid ~ .st-row .switch { flex: none; }
.site-grid ~ .st-row > div:first-child, .brand-grid ~ .st-row > div:first-child { flex: 1; min-width: 0; }
.site-grid ~ .st-row b, .brand-grid ~ .st-row b { font-size: 15px; }
/* 站点信息页：输入框占满栅格列（非 gov 卡片兜底） */
.site-grid .field { margin: 0; }
.site-grid .field input {
  display: block; width: 100%; margin-top: 6px; box-sizing: border-box;
  font-weight: 400;
}
@media (max-width: 640px) {
  .site-grid { gap: 10px; }
  .site-grid .field input { font-size: 13px; }
}

/* ================= 品牌与图标（后台上传 LOGO / 标签页图标） ================= */
.brand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* 站点信息页（gov-card）内的品牌区更大气：卡片化、放大预览、深蓝标题 */
.gov-card .brand-grid { gap: 16px; }
.gov-card .brand-tile {
  border: 1px solid #e3eaf3; border-radius: 12px; background: #fff; padding: 16px;
  box-shadow: 0 4px 14px rgba(10,79,158,.05);
}
.gov-card .brand-tile .bt-head { margin-bottom: 14px; }
.gov-card .brand-tile .bt-head b { font-size: 15px; color: var(--primary); }
.gov-card .brand-tile .bt-prev { width: 72px; height: 72px; border-radius: 12px; border: 1px solid #e3eaf3; }
.gov-card .brand-tile .bt-desc { font-size: 12.5px; line-height: 1.6; }
.gov-card .brand-tile .bt-url { font-size: 12px; padding: 6px 9px; }
.gov-card .site-size-box { margin-top: 4px; }
.brand-tile {
  border: 1px solid #e6ecf5; border-radius: 12px; background: #fbfcfe; padding: 12px;
  transition: border-color .18s, box-shadow .18s;
}
.brand-tile:hover { border-color: #cfe0f2; box-shadow: 0 4px 14px rgba(47, 147, 224, .07); }
.brand-tile .bt-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.brand-tile .bt-head b { font-size: 13.5px; color: #22384f; }
.brand-tile .bt-tag {
  font-size: 10.5px; color: #6b8bab; background: #eaf2fb; border-radius: 4px;
  padding: 1px 6px; letter-spacing: .2px; white-space: nowrap;
}
.brand-tile .bt-body { display: flex; gap: 10px; align-items: flex-start; }
.brand-tile .bt-prev {
  flex: none; width: 62px; height: 62px; border-radius: 10px; background: #fff;
  border: 1px dashed #d6e2f0; display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 4px; box-sizing: border-box;
}
.brand-tile .bt-prev img { display: block; }
/* 预览图直接上传：hover 出遮罩，点击即弹文件选择 */
.brand-tile .bt-pick { position: relative; cursor: pointer; }
.brand-tile .bt-pick .bt-mask {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10,79,158,.58); color: #fff; font-size: 11px; font-weight: 600;
  border-radius: inherit; opacity: 0; transition: opacity .16s; pointer-events: none;
  letter-spacing: 1px;
}
.brand-tile .bt-pick:hover .bt-mask, .brand-tile.dragover .bt-pick .bt-mask { opacity: 1; }
.brand-tile.dragover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,79,158,.16); }
.brand-tile.dragover .bt-prev { border-style: solid; border-color: var(--primary); }
.brand-tile .bt-default { display: flex; align-items: center; justify-content: center; opacity: .95; }
.brand-tile .bt-main { flex: 1; min-width: 0; }
.brand-tile .bt-desc { font-size: 11.5px; color: #8b9cb1; line-height: 1.5; margin-bottom: 6px; }
.brand-tile .bt-url {
  width: 100%; box-sizing: border-box; font-size: 11.5px; color: #4a5f78;
  border: 1px solid #dfe8f3; border-radius: 8px; padding: 5px 8px; background: #fff;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.brand-tile .bt-url:focus { outline: none; border-color: #8ec2ec; box-shadow: 0 0 0 3px rgba(47,147,224,.1); }
.brand-tile .bt-url:disabled { background: #f3f6fa; color: #9aa8ba; }
.brand-tile .bt-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.site-size-box { display: flex; align-items: center; gap: 6px; flex: none; }
.site-size-box .input { width: 74px; text-align: center; }
.site-size-box span { font-size: 12px; color: #93a1b3; }
/* ===== 启动动画字体设置 ===== */
.gov-card select#site-splash-font {
  display: block; width: 100%; box-sizing: border-box; margin-top: 8px;
  padding: 13px 14px; font-size: 15px; border-radius: 10px;
  border: 1px solid #dfe8f3; background: #fff; color: var(--ink-2);
  appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237c8ba0' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.gov-card select#site-splash-font:focus { outline: none; box-shadow: 0 0 0 4px rgba(10,79,158,.12); }
.font-file-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.font-file-name {
  flex: 1; min-width: 120px; padding: 12px 12px; border: 1px dashed #d6e2f0; border-radius: 10px;
  font-size: 12.5px; color: #6b7f99; background: #fafcff; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}
.splash-preview {
  margin-top: 18px; padding: 22px 16px; border-radius: 12px; text-align: center;
  background: linear-gradient(135deg, #0a4f9e 0%, #1268c4 55%, #0a4f9e 100%);
  border-top: 3px solid #d8b25a; box-shadow: inset 0 0 60px rgba(255,255,255,.06);
}
.splash-preview-label { font-size: 11px; color: rgba(255,255,255,.62); letter-spacing: 2px; margin-bottom: 10px; }
.splash-preview .splash-name {
  display: inline-block; color: #fff; font-size: 40px; letter-spacing: 14px; padding-left: 14px;
  animation: none; text-shadow: 0 6px 22px rgba(0,0,0,.35);
}
/* 预设字体映射（与启动页 CSS 保持一致） */
.splash-name.f-default { font-family: "STXinwei", "华文新魏", "STLiti", "华文隶书", KaiTi, "楷体", serif !important; }
.splash-name.f-kai { font-family: KaiTi, "楷体", "STKaiti", "华文楷体", serif !important; }
.splash-name.f-xinwei { font-family: "STXinwei", "华文新魏", "FZShuTi", serif !important; }
.splash-name.f-lishu { font-family: "STLiti", "华文隶书", "LiSu", "隶书", serif !important; }
.splash-name.f-xingkai { font-family: "STXingkai", "华文行楷", "Xingkai SC", cursive !important; }
.splash-name.f-xiaobiaosong { font-family: "FZXiaoBiaoSong-B05S", "方正小标宋简体", "Songti SC", serif !important; }
.splash-name.f-songti { font-family: "Songti SC", SimSun, "宋体", serif !important; }
.splash-name.f-heiti { font-family: "Heiti SC", SimHei, "黑体", sans-serif !important; }
.splash-name.f-yahei { font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif !important; }
.brand-img { display: block; object-fit: contain; border-radius: 8px; }
.sp-logo .sp-logo-img {
  width: 62px; height: 62px; object-fit: contain; display: block;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); border-radius: 14px;
}
/* 顶栏 LOGO 在手机上按设计缩小，避免挤压右侧用户信息 */
@media (max-width: 640px) {
  .topbar .brand img.brand-img { width: 24px !important; height: 24px !important; border-radius: 6px; }
}
@media (max-width: 640px) {
  .brand-grid { grid-template-columns: 1fr; gap: 10px; }
  .brand-tile { padding: 10px; }
  .brand-tile .bt-prev { width: 54px; height: 54px; }
  .brand-tile .bt-url { font-size: 11px; }
}
