:root {
  --teal: #0f9588;
  --teal-dark: #0b7d72;
  --teal-soft: #e6f3f1;
  --teal-softer: #f2f9f8;
  --bg: #f6faf9;
  --ink: #233038;
  --muted: #7a8b93;
  --line: #e3eeec;
  --white: #ffffff;
  --green: #2f9e6f;
  --red: #d9534f;
  --amber: #d9912f;
  --blue: #3d7d9e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 102, 93, .08);
  --shadow-sm: 0 4px 14px rgba(15, 102, 93, .06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { max-width: 100%; overflow-x: hidden; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; }
a { color: var(--teal); text-decoration: none; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部导航 ===== */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 2px 10px rgba(15,102,93,.04);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); flex: none; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, var(--teal), #4bc0b4);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; box-shadow: var(--shadow-sm); flex: none;
}
.brand-name { letter-spacing: .5px; white-space: nowrap; }
.main-nav { display: flex; gap: 4px; flex: none; }
.nav-link {
  padding: 8px 16px; border-radius: 10px; color: var(--muted); font-weight: 500;
  transition: all .2s; white-space: nowrap;
}
.nav-link:hover { color: var(--teal); background: var(--teal-softer); }
.nav-link.active { color: var(--teal); background: var(--teal-soft); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }

.user-drop { position: relative; }
.user-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px;
  border: 1px solid var(--line); border-radius: 30px; background: var(--white);
  cursor: pointer; font: inherit; color: var(--ink); transition: all .2s; flex: none;
}
.user-chip:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.chip-ghost { cursor: default; }
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.chev { color: var(--muted); font-size: 11px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.avatar-user { background: #5aa7c4; }
.avatar-admin { background: #b9853c; }
.avatar-super { background: linear-gradient(135deg, var(--teal), #4bc0b4); }
.avatar-unknown { background: #cbd6d3; }
.avatar-me { background: #b9853c; }

.drop-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 8px; z-index: 60;
}
.drop-title { font-size: 12px; color: var(--muted); padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.drop-item { display: block; padding: 9px 12px; border-radius: 9px; color: var(--ink); font-size: 14px; }
.drop-item:hover { background: var(--teal-softer); color: var(--teal); }
.drop-item.is-warn { color: var(--amber); }
.drop-btn { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit; }
.drop-btn:hover { background: #fdf0f0; color: var(--red); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 11px; cursor: pointer; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; transition: all .18s; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 13px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 6px 16px rgba(15,149,136,.28); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-ghost { background: var(--white); color: var(--teal); border-color: #bfe0db; }
.btn-ghost:hover { background: var(--teal-soft); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #258a5e; }
.btn-danger { background: #fff; color: var(--red); border-color: #f0c6c4; }
.btn-danger:hover { background: #fdf0f0; }

/* ===== 卡片 & 分区 ===== */
.page { padding-top: 28px; padding-bottom: 60px; min-height: 70vh; }
.page-head { margin-bottom: 18px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px 24px; margin-bottom: 20px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 17px; font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.sm { font-size: 12px; }
.link { color: var(--teal); font-weight: 500; }
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-title { font-size: 17px; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.empty.small { padding: 26px 16px; }

/* ===== 首页 hero / 统计 ===== */
.hero { text-align: center; padding: 64px 0 30px; }
.hero-title { font-size: 32px; font-weight: 800; letter-spacing: .5px; }
.hero-sub { color: var(--muted); margin-top: 12px; font-size: 16px; }
.hero-actions { margin-top: 26px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.stats-row, .stat-grid { display: grid; gap: 16px; margin-bottom: 22px; }
.stats-row { grid-template-columns: repeat(3, 1fr); }
.stat-grid { grid-template-columns: repeat(6, 1fr); }
.stat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-num { font-size: 30px; font-weight: 800; color: var(--teal); }
.stat-num-teal { color: var(--teal); }
.stat-label { color: var(--muted); margin-top: 4px; font-size: 13px; }
.stat-teal { border-top: 3px solid var(--teal); }
.stat-stroke { border-top: 3px solid var(--blue); }

/* ===== 列表 ===== */
.feed-list { display: flex; flex-direction: column; }
.feed-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 6px;
  border-bottom: 1px solid var(--line);
}
.feed-row:last-child { border-bottom: 0; }
.feed-title { font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.feed-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ===== 标签/徽标 ===== */
.tag { display: inline-block; padding: 2px 9px; border-radius: 8px; font-size: 12px; background: var(--teal-softer); color: var(--teal); flex: none; }
.tag-me { color: #fff; background: var(--teal); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-pending { background: #fdf1e0; color: var(--amber); }
.badge-processing { background: #e7f1fb; color: var(--blue); }
.badge-answered { background: #e7f3fb; color: #3d7d9e; }
.badge-completed { background: #e4f4ec; color: var(--green); }
.badge-closed { background: #eef1f0; color: #8b9895; }
.priority { display: inline-block; padding: 2px 9px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.pri-low { background: #eef1f0; color: #8b9895; }
.pri-normal { background: #e7f1fb; color: var(--blue); }
.pri-high { background: #fde9e7; color: var(--red); }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 13px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--teal-softer); }
.td-title { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.table td.mono { white-space: nowrap; }
.table .tag, .table .badge, .table .priority { white-space: nowrap; }
.td-user { display: flex; align-items: center; gap: 10px; }
.th-actions { width: 230px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.reset-pass { position: relative; display: inline-block; }
.reset-pass summary { list-style: none; }
.reset-pass summary::-webkit-details-marker { display: none; }
.reset-form { position: absolute; right: 0; top: 100%; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; box-shadow: var(--shadow); display: flex; gap: 6px; align-items: center; z-index: 20; }

/* ===== 表单 ===== */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { flex-direction: row; gap: 12px; }
.field-row .field { flex: 1; min-width: 0; }
.field-port { flex: 0 0 110px !important; }
.field-lg { flex: 1.4 !important; }
.label { font-size: 13px; font-weight: 600; color: #46545c; }
.input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 11px;
  font: inherit; color: var(--ink); background: var(--white); transition: border-color .18s, box-shadow .18s;
}
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,149,136,.12); }
.input:disabled { background: #f2f6f5; color: #9aa7ad; }
.input-sm { padding: 8px 12px; font-size: 14px; }
.textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.select { appearance: auto; }

.input-affix { position: relative; }
.input-affix .input { padding-right: 74px; }
.affix {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; min-width: 0; }
.input-group .btn { white-space: nowrap; }

.hint { background: var(--teal-softer); border: 1px dashed #bcdcd6; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #4a6b63; }
.field-text { font-size: 14px; }

/* ===== 自定义下拉（美化 select 弹窗） ===== */
.select-wrap { position: relative; width: 100%; }
.select-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 11px;
  background: var(--white); font: inherit; font-size: 15px; color: var(--ink);
  cursor: pointer; text-align: left; transition: border-color .18s, box-shadow .18s;
}
.select-btn.select-btn-sm { padding: 8px 12px; font-size: 14px; border-radius: 11px; }
.select-btn:focus-visible, .select-btn.open { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,149,136,.12); }
.select-btn .chev-down { color: var(--muted); font-size: 12px; transition: transform .18s; flex: none; }
.select-btn.open .chev-down { transform: rotate(180deg); }
.select-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; max-height: 260px; overflow-y: auto;
  opacity: 0; transform: translateY(-4px) scale(.98); pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.select-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.select-opt { padding: 10px 12px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--ink); }
.select-opt:hover { background: var(--teal-softer); }
.select-opt.active { color: var(--teal); font-weight: 600; background: var(--teal-soft); }
.select-opt:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
select.input[data-enhanced], select.input-sm[data-enhanced] { display: none; }

/* ===== 确认弹窗（美化系统 confirm） ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(18,38,35,.45); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity .18s;
}
.modal-mask.open { opacity: 1; }
.modal {
  width: 100%; max-width: 360px; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); padding: 22px;
  transform: scale(.94); transition: transform .18s;
}
.modal-mask.open .modal { transform: none; }
.modal-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.modal-msg { color: #46545c; font-size: 14px; line-height: 1.7; margin-bottom: 18px; white-space: pre-wrap; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== Toast 提示（美化系统 alert） ===== */
.toast-wrap {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 95; display: flex; flex-direction: column; gap: 10px;
  align-items: center; width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  background: #223c38; color: #fff; padding: 11px 18px; border-radius: 12px;
  font-size: 14px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px);
  transition: all .25s; max-width: 100%;
}
.toast.show { opacity: 1; transform: none; }
.toast-ok { background: var(--teal-dark); }
.toast-err { background: #a63d39; }

/* ===== 提示条 ===== */
.alert { padding: 12px 16px; border-radius: 11px; margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: #e4f4ec; color: var(--green); border-color: #c7e7d7; }
.alert-error { background: #fdf0f0; color: var(--red); border-color: #f3cfcd; }
.alert-warn { background: #fdf6e8; color: var(--amber); border-color: #f0e0bb; }

/* ===== 独立页面（登录/注册/初始化） ===== */
.plain-body {
  background: linear-gradient(160deg, #eaf6f4 0%, #f6faf9 45%);
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 16px;
}
.plain-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; margin-bottom: 22px; color: var(--ink); }
.plain-card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 30px 28px; }
.plain-foot { color: var(--muted); margin-top: 20px; font-size: 13px; }
.auth-brand-line { color: var(--teal); font-weight: 700; font-size: 13px; letter-spacing: 1px; }
.auth-title { font-size: 24px; font-weight: 800; margin-top: 6px; }
.auth-desc { color: var(--muted); margin: 8px 0 20px; font-size: 14px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.setup-step { display: inline-block; background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: 12px; padding: 4px 12px; border-radius: 20px; }

/* ===== 安装向导 ===== */
.install-step { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; background: #fff; }
.install-step-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 14px; }
.install-num { width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.env-list { display: flex; flex-direction: column; gap: 8px; }
.env-row { display: flex; align-items: center; gap: 10px; font-size: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.env-label { font-weight: 600; color: var(--ink); min-width: 150px; }
.env-detail { color: var(--muted); font-size: 13px; flex: 1; }
.env-state { padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; flex: none; }
.env-ok { background: #e4f4ec; color: var(--green); }
.env-err { background: #fdf0f0; color: var(--red); }
.install-db { display: flex; flex-direction: column; gap: 8px; }
.db-row { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; gap: 10px; }
.db-hint { font-size: 13px; color: var(--muted); margin: 10px 2px 0; line-height: 1.5; }
.db-hint code { background: var(--teal-soft); color: var(--teal-dark); padding: 1px 6px; border-radius: 6px; word-break: break-all; }

/* ===== 详情 / 聊天 ===== */
.detail-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.detail-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.detail-title { margin-top: 12px; }
.detail-content { white-space: pre-wrap; color: #37424a; font-size: 15px; word-break: break-word; }

.chat { display: flex; flex-direction: column; gap: 14px; }
.chat-item { display: flex; }
.chat-item.side-me { justify-content: flex-start; }
.chat-item.side-admin { justify-content: flex-end; }
.bubble { max-width: 82%; background: var(--teal-softer); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.side-admin .bubble { background: #fff; border: 1px solid var(--line); }
.bubble-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bubble-name { font-weight: 600; font-size: 13px; }
.bubble-time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.bubble-body { color: #37424a; white-space: pre-wrap; word-break: break-word; }

/* ===== 工具栏 / 操作 ===== */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline; }
.action-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col-stack { display: flex; flex-direction: column; gap: 20px; }

/* ===== 布局 ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.login-hint { display: flex; align-items: center; gap: 16px; }
.login-hint-icon { font-size: 26px; color: var(--teal); flex: none; }
.login-hint-actions { margin-left: auto; display: flex; gap: 10px; flex: none; }
.form-card { max-width: 520px; }

/* ===== 后台布局 ===== */
.admin-body { background: #f3f7f6; }
.admin-shell { display: flex; min-height: 100vh; }
.sidenav {
  width: 220px; background: var(--white); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh;
}
.sidenav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 4px 8px 18px; font-size: 15px; color: var(--ink); }
.sidenav-group { font-size: 11px; color: #a7b4b0; font-weight: 700; letter-spacing: 1px; margin: 16px 10px 6px; text-transform: uppercase; }
.sidenav-link { display: block; padding: 10px 12px; border-radius: 10px; color: #3d4c52; font-weight: 500; font-size: 14px; transition: all .18s; }
.sidenav-link:hover { color: var(--teal); background: var(--teal-softer); }
.sidenav-link.active { background: var(--teal); color: #fff; box-shadow: 0 6px 14px rgba(15,149,136,.25); }
.sidenav-back { margin-top: auto; padding: 12px; color: var(--muted); font-size: 13px; }
.sidenav-back:hover { color: var(--teal); }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { height: 66px; background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 26px; gap: 12px; }
.admin-title { font-weight: 700; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-content { padding: 26px; max-width: 1200px; }

/* ===== 提示块 ===== */
.tip-block { background: var(--teal-softer); border-radius: 12px; padding: 16px 18px; margin-top: 18px; }
.tip-title { font-size: 14px; font-weight: 700; color: var(--teal); margin-bottom: 8px; }
.tip-list { padding-left: 18px; font-size: 13px; color: #4a6b63; }
.tip-list li { margin: 6px 0; }

/* ===== 页脚 / 通用 ===== */
.footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: 13px; text-align: center; background: var(--white); }
.empty-page { text-align: center; }

/* =====================================================
   移动端适配（全局）
   ===================================================== */
@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .sidenav { width: 76px; }
  .sidenav-brand .brand-name, .sidenav-group { display: none; }
  .sidenav-link { text-align: center; font-size: 0; padding: 12px; }
  .sidenav-link::after { content: "◉"; font-size: 12px; }
  .sidenav-back { font-size: 0; text-align: center; }
  .sidenav-back::before { content: "←"; font-size: 16px; }
  .admin-content { padding: 18px; }
  .admin-topbar { padding: 0 16px; }
  .user-name { display: none; }
  .user-chip { padding: 5px; border-radius: 50%; gap: 0; }
  .user-chip .chev { display: none; }
  /* 首页统计卡三列紧凑 */
  .stats-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat-card { padding: 14px 8px; }
  .stat-num { font-size: 24px; }
  .stat-label { font-size: 12px; }
  /* 防 iOS 聚焦时自动放大页面 */
  .input, .select-btn, textarea.input { font-size: 16px; }
}

@media (max-width: 640px) {
  .container { padding: 0 14px; }

  /* 顶栏两行重排：品牌+操作一行，导航一行 */
  .topbar-inner { height: auto; flex-wrap: wrap; gap: 8px 12px; padding: 10px 0; }
  .main-nav { order: 3; width: 100%; gap: 2px; }
  .nav-link { padding: 8px 14px; }

  /* 登录提示卡：纵向堆叠 */
  .login-hint { flex-direction: column; align-items: flex-start; gap: 12px; }
  .login-hint-icon { display: none; }
  .login-hint-actions { margin-left: 0; width: 100%; }
  .login-hint-actions .btn { flex: 1; }

  /* 表单行堆叠 */
  .field-row { flex-direction: column; gap: 16px; }
  .field-port { flex: 0 0 auto !important; }
  .input-group { flex-wrap: wrap; }
  .input-group .btn { flex: none; }

  /* 首页 */
  .hero { padding: 40px 0 22px; }
  .hero-title { font-size: 24px; }
  .hero-sub { font-size: 15px; }

  .card { padding: 18px 16px; }

  /* 列表行允许换行 */
  .feed-row { flex-wrap: wrap; row-gap: 6px; }
  .feed-title { white-space: normal; flex: 1 1 100%; order: 3; }
  .feed-meta { margin-left: auto; }

  /* 表格 */
  .table { font-size: 13px; }
  .td-title { max-width: 170px; }

  /* 表格内重置密码浮层改为行内展开，避免被滚动容器裁剪 */
  .reset-form { position: static; margin-top: 6px; flex-wrap: wrap; box-shadow: none; }
  .reset-form .input { min-width: 130px; }

  /* 环境检测行 */
  .env-row { flex-wrap: wrap; }
  .env-label { min-width: 0; }

  .db-row { flex-wrap: wrap; }

  .plain-card { padding: 24px 20px; }
  .admin-content { padding: 14px; }
  .bubble { max-width: 92%; }
  .page { padding-top: 20px; }
}

@media (max-width: 480px) {
  /* 空间紧张：顶栏只留 logo 图标 */
  .brand-name { display: none; }
  .brand-logo { width: 32px; height: 32px; }
  .topbar-right { gap: 8px; }
  .topbar-right .btn { padding: 8px 13px; }
  .topbar .container { padding: 0 12px; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .form .btn-lg { width: 100%; }
  .login-hint-actions .btn { width: 100%; }

  .auth-title { font-size: 21px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .toolbar { gap: 10px; }
  .filters { width: 100%; }
  .filters .input-sm, .filters .select-btn-sm { flex: 1 1 130px; width: auto; }
  .filters .btn { flex: none; }
  .plain-body { padding: 18px 12px; }
  .plain-card { padding: 20px 16px; }
  .modal-actions .btn { flex: 1; }
  .admin-title { font-size: 15px; }
  .action-row .btn { padding: 8px 12px; }
}

/* 提交至处理专员 / 字段提示 / 转交 */
.req { color: #e0533d; margin-left: 2px; }
.field-hint { margin: 6px 0 0; font-size: 12px; color: #7b8a99; line-height: 1.5; }
.asg { color: #0f9588; font-weight: 600; }
.transfer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px dashed #e3eaef; }
.transfer-row .inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
