/* ============================================================
   翎目知觉 · 后台管理样式（基于 style.css 亮色变量）
   ============================================================ */

/* ---------- 登录页 ---------- */
.admin-login-body {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(27, 109, 255, 0.16), transparent 60%),
    radial-gradient(760px 480px at 100% 0%, rgba(8, 166, 233, 0.14), transparent 55%),
    radial-gradient(700px 560px at 85% 108%, rgba(79, 123, 255, 0.12), transparent 60%),
    var(--bg);
}

/* 背景漂浮光斑 */
.login-decor { position: fixed; inset: 0; pointer-events: none; }
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: loginOrb 16s ease-in-out infinite;
}
.login-orb-1 { width: 380px; height: 380px; left: -120px; top: -100px;
  background: radial-gradient(circle, rgba(27, 109, 255, 0.35), transparent 65%); }
.login-orb-2 { width: 320px; height: 320px; right: -90px; top: 12%;
  background: radial-gradient(circle, rgba(8, 166, 233, 0.30), transparent 65%); animation-delay: -5s; }
.login-orb-3 { width: 420px; height: 420px; left: 34%; bottom: -190px;
  background: radial-gradient(circle, rgba(79, 123, 255, 0.26), transparent 65%); animation-delay: -10s; }
@keyframes loginOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(26px, -20px) scale(1.06); }
  66% { transform: translate(-20px, 18px) scale(0.97); }
}

/* 分栏卡片 */
.login-card {
  position: relative;
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 34px 90px rgba(10, 46, 120, 0.22), 0 4px 18px rgba(10, 46, 120, 0.08);
  animation: loginIn 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}
@keyframes loginIn {
  from { opacity: 0; transform: translateY(26px) scale(0.98); }
}

/* 左侧品牌区 */
.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 40px 30px;
  color: #eaf4ff;
  background: linear-gradient(165deg, #0a2148 0%, #0b2c5e 58%, #071a39 100%);
  overflow: hidden;
}
.login-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 260px at 20% 12%, rgba(127, 212, 255, 0.14), transparent 65%);
  pointer-events: none;
}
.login-brand-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(127, 212, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 212, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.lb-logo { position: relative; display: flex; align-items: center; gap: 14px; }
.lb-logo b { display: block; font-size: 21px; letter-spacing: 0.14em; color: #fff; }
.lb-logo em {
  font-style: normal;
  display: block;
  font-size: 10px;
  letter-spacing: 0.34em;
  color: #7fd4ff;
  margin-top: 4px;
}
.lb-scene {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 180px;
  margin: 8px 0;
}
.lb-scene svg { width: 100%; max-width: 280px; }
.lb-drone { animation: lbFloat 5.5s ease-in-out infinite; }
@keyframes lbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.lb-blink { animation: lbBlink 2.4s ease-in-out infinite; }
.lb-blink.s2 { animation-delay: 1.2s; }
@keyframes lbBlink {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}
.lb-copy { position: relative; }
.lb-copy h2 { font-size: 19px; letter-spacing: 0.06em; color: #fff; }
.lb-copy ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 14px; }
.lb-copy li {
  font-size: 12.5px;
  padding: 5px 12px;
  border: 1px solid rgba(127, 212, 255, 0.3);
  border-radius: 999px;
  color: #cfe9ff;
  background: rgba(127, 212, 255, 0.08);
}
.lb-foot {
  position: relative;
  margin-top: 22px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(175, 208, 240, 0.6);
}

/* 右侧表单区 */
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px 44px 34px;
}
.login-panel header { margin-bottom: 26px; }
.login-panel header h1 { font-size: 26px; letter-spacing: 0.04em; }
.login-panel header p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}

.login-flash {
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  background: rgba(254, 226, 226, 0.75);
  color: #b91c1c;
  border: 1px solid rgba(248, 113, 113, 0.4);
}
.login-flash.ok {
  background: rgba(220, 252, 231, 0.8);
  color: #15803d;
  border-color: rgba(74, 222, 128, 0.45);
}

.login-form { display: flex; flex-direction: column; gap: 18px; }
.lf-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.lf-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.lf-box svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lf-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(27, 109, 255, 0.12);
}
.lf-box:focus-within svg { stroke: var(--blue); }
.lf-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  height: 46px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text);
}
.lf-box input::placeholder { color: var(--text-dim); }

.lf-captcha { display: flex; align-items: center; gap: 10px; }
.lf-captcha .lf-box { flex: 1; }
#captcha-img {
  height: 46px;
  width: 132px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #eaf1fb;
  cursor: pointer;
}
.lf-refresh {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.3s ease;
}
.lf-refresh:hover { color: var(--blue); border-color: var(--line-strong); transform: rotate(90deg); }
.lf-refresh svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-btn {
  margin-top: 6px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: #fff;
  background: var(--grad);
  background-size: 160% 100%;
  box-shadow: 0 10px 26px rgba(27, 109, 255, 0.35);
  transition: background-position 0.35s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.login-btn:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(27, 109, 255, 0.42);
}
.login-btn:active { transform: translateY(0); }

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--text-dim);
}
.login-foot a { color: var(--text-muted); }
.login-foot a:hover { color: var(--blue); }

@media (max-width: 860px) {
  .login-card { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { padding: 40px 30px 28px; }
}

/* ---------- 后台框架（Dify 风格：灰白 + 亮蓝） ---------- */
.admin-body {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
  background: #f2f4f7;
  color: #101828;
}

/* 浅色侧边栏 */
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #eaecf0;
  padding: 22px 16px;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 20px;
  border-bottom: 1px solid #eaecf0;
  margin-bottom: 18px;
}
.admin-brand span { display: flex; flex-direction: column; line-height: 1.3; }
.admin-brand b { font-size: 15px; letter-spacing: 0.08em; color: #101828; }
.admin-brand em { font-style: normal; font-size: 10px; letter-spacing: 0.28em; color: #667085; }

.admin-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #475467;
  transition: all 0.18s ease;
}
.admin-nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.admin-nav a:hover { color: #101828; background: #f2f4f7; }
.admin-nav a.active { color: #155eef; background: #eff4ff; }

.admin-sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #eaecf0;
  font-size: 13.5px;
}
.admin-user { color: #475467; }
.btn-logout { color: #f04438; font-size: 13.5px; }
.btn-logout:hover { text-decoration: underline; }

/* 桌面端：导航直接平铺；移动端 .admin-drawer 变为抽屉（见响应式） */
.admin-bar-row, .admin-drawer { display: contents; }
.admin-drawer-mask, .admin-menu-btn { display: none; }

.admin-main { padding: 0 32px 44px; min-width: 0; }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  margin-bottom: 22px;
  border-bottom: 1px solid #eaecf0;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.admin-topbar h1 { font-size: 20px; font-weight: 600; letter-spacing: 0.01em; }

.admin-flashes { margin-bottom: 18px; }
.admin-content { display: flex; flex-direction: column; gap: 20px; }

/* 按钮统一为 Dify 亮蓝（覆盖前台渐变主按钮） */
.admin-body .btn-primary {
  background: #155eef;
  border: 1px solid #155eef;
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
.admin-body .btn-primary:hover {
  background: #1243c8;
  border-color: #1243c8;
  transform: none;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.12);
}
.admin-body .btn-ghost {
  background: #fff;
  border: 1px solid #d0d5dd;
  color: #344054;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.admin-body .btn-ghost:hover {
  background: #f9fafb;
  border-color: #98a2b3;
  color: #101828;
  transform: none;
}
.admin-body .pagination a.active { background: #155eef; border-color: #155eef; color: #fff; }
.admin-body .pagination a:hover { color: #155eef; border-color: #c7d2f5; }

/* ---------- 仪表盘 ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}
.stat-card {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  border-color: #c7d2f5;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
}
.stat-card span { font-size: 13px; color: #475467; }
.stat-card b {
  display: block;
  font-size: 30px;
  font-weight: 700;
  margin: 6px 0 4px;
  color: #101828;
  font-variant-numeric: tabular-nums;
}
.stat-card i { font-style: normal; font-size: 12.5px; color: #667085; }
.stat-warn b { color: #d97706; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  align-items: start;
}

/* ---------- 面板 / 表格 ---------- */
.panel {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-head h3 { font-size: 16px; font-weight: 600; color: #101828; }
.panel-head a { font-size: 13.5px; color: #155eef; }
.panel-head a:hover { color: #1243c8; }
.panel-sub { font-size: 12.5px; color: #667085; }
.empty-panel { text-align: center; padding: 50px 20px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  color: #667085;
  font-weight: 500;
  font-size: 12.5px;
  border-bottom: 1px solid #eaecf0;
  white-space: nowrap;
  background: #fcfcfd;
}
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid #f2f4f7;
  vertical-align: middle;
  color: #344054;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: #f9fafb; }
.admin-table td a { color: #101828; }
.admin-table td a:hover { color: #155eef; }
.td-title a { font-weight: 600; }
.ta-right { text-align: right; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.td-actions { white-space: nowrap; }
.td-actions > *, .td-actions .inline { display: inline-flex; margin-left: 6px; }
.td-ip { font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; color: #101828; }
.td-dim { color: #98a2b3; }

.pin-badge {
  display: inline-block;
  font-size: 11px;
  color: #b54708;
  border: 1px solid #fedf89;
  background: #fffaeb;
  border-radius: 5px;
  padding: 0 5px;
  margin-right: 6px;
}

.status-badge {
  display: inline-block;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}
.status-on { color: #067647; background: #ecfdf3; border: 1px solid #abefc6; }
.status-off { color: #475467; background: #f2f4f7; border: 1px solid #e4e7ec; }
.status-fail { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; }

.link-btn {
  background: none;
  border: none;
  color: #155eef;
  font-size: 13.5px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.link-btn:hover { color: #1243c8; text-decoration: underline; }
.link-danger { color: #f04438; }
.link-danger:hover { color: #d92d20; }
.inline { display: inline; }

/* ---------- 迷你留言 / 日志列表 ---------- */
.mini-messages li, .mini-logs li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f2f4f7;
}
.mini-messages li:last-child, .mini-logs li:last-child { border-bottom: 0; }
.mm-head { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 4px; }
.mm-head time { color: #667085; }
.mini-messages p { font-size: 13px; color: #475467; flex: 1; }

.mini-logs p { flex: 1; font-size: 13.5px; color: #344054; }
.mini-logs p b { font-weight: 600; color: #101828; }
.mini-logs .ml-detail { color: #667085; }
.mini-logs time { flex: none; font-size: 12.5px; color: #98a2b3; }

.log-badge {
  display: inline-block;
  flex: none;
  font-size: 12px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  font-weight: 500;
}
.log-login { color: #155eef; background: #eff4ff; border: 1px solid #d1e0ff; }
.log-operation { color: #6938ef; background: #f4f3ff; border: 1px solid #ebe8fe; }
.log-visit { color: #0e9384; background: #ecfdf8; border: 1px solid #c5f4ec; }

/* ---------- 日志管理 ---------- */
.log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px;
}
.log-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.log-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #e4e7ec;
  font-size: 13.5px;
  font-weight: 500;
  color: #475467;
  background: #fff;
  transition: all 0.18s ease;
}
.log-tabs a:hover { color: #155eef; border-color: #c7d2f5; background: #f9fafb; }
.log-tabs a.active {
  color: #fff;
  background: #155eef;
  border-color: #155eef;
}
.log-tabs a i {
  font-style: normal;
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
}
.log-tabs a.active i { background: rgba(255, 255, 255, 0.22); color: #fff; }
.log-search { display: flex; gap: 10px; }
.log-search input {
  width: min(280px, 60vw);
  height: 38px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  font-size: 13.5px;
  font-family: inherit;
  color: #101828;
  outline: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.log-search input:focus {
  border-color: #155eef;
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.12);
}

.log-table .td-time { white-space: nowrap; font-size: 12.5px; color: #667085; font-variant-numeric: tabular-nums; }
.log-table .td-detail {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #667085;
  font-size: 13px;
}

/* ---------- 访问统计 ---------- */
.vis-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: stretch;
}
.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 200px;
  padding: 10px 4px 0;
}
.t-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  height: 100%;
  min-width: 0;
}
.t-val { font-size: 12px; color: #475467; font-weight: 600; font-variant-numeric: tabular-nums; }
.t-col {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, #84adff, #155eef);
  border-radius: 6px 6px 2px 2px;
  transition: opacity 0.2s ease;
}
.t-bar:hover .t-col { opacity: 0.82; }
.t-label { font-size: 11.5px; color: #98a2b3; white-space: nowrap; }

.hot-list { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.hot-list li { display: flex; align-items: center; gap: 12px; }
.hp-name {
  flex: 0 0 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #344054;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
}
.hp-track { flex: 1; height: 8px; border-radius: 999px; background: #f2f4f7; overflow: hidden; }
.hp-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #84adff, #155eef); }
.hot-list b {
  flex: none;
  min-width: 36px;
  text-align: right;
  font-size: 13px;
  color: #101828;
  font-variant-numeric: tabular-nums;
}

/* ---------- 新闻编辑 ---------- */
.news-form { max-width: 100%; }
.form-actions { padding-top: 6px; }
.admin-body .form-group input:focus,
.admin-body .form-group textarea:focus,
.admin-body .form-group select:focus {
  border-color: #155eef;
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.12);
}

/* ---------- 留言卡片 ---------- */
.message-list { display: grid; gap: 16px; }
.message-card.handled { opacity: 0.72; }
.msg-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.msg-head b { font-size: 15px; color: #101828; }
.msg-contact {
  margin-left: 10px;
  font-size: 13px;
  color: #155eef;
  background: #eff4ff;
  border: 1px solid #d1e0ff;
  border-radius: 7px;
  padding: 2px 9px;
}
.msg-side { display: flex; align-items: center; gap: 12px; }
.msg-side time { font-size: 13px; color: #667085; }
.msg-content {
  font-size: 14.5px;
  color: #344054;
  background: #f9fafb;
  border: 1px solid #eaecf0;
  border-radius: 10px;
  padding: 14px 18px;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-actions { margin-top: 12px; display: flex; gap: 18px; }

/* ---------- 后台响应式 ---------- */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .vis-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .admin-body { grid-template-columns: 1fr; }

  /* 顶栏 + 抽屉式导航 */
  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    padding: 8px 14px;
    border-right: 0;
    border-bottom: 1px solid #eaecf0;
  }
  .admin-bar-row { display: flex; align-items: center; gap: 10px; width: 100%; }
  .admin-menu-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    cursor: pointer;
  }
  .admin-menu-btn:active { background: #f2f4f7; }
  .admin-menu-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }
  .admin-brand { flex: 1; border-bottom: 0; padding: 4px 0; margin-bottom: 0; }
  .admin-brand svg { width: 26px; height: 26px; }
  .admin-brand b { font-size: 14px; }
  .admin-brand em { display: none; }

  .admin-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(78vw, 300px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    border-right: 1px solid #eaecf0;
    padding: 16px 12px 18px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 60;
    overflow-y: auto;
  }
  body.admin-nav-open .admin-drawer {
    transform: none;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.18);
  }
  .admin-drawer-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 55;
  }
  body.admin-nav-open .admin-drawer-mask { opacity: 1; pointer-events: auto; }
  .admin-nav a { padding: 12px 14px; }
  .admin-sidebar-foot {
    margin-top: auto;
    border-top: 1px solid #eaecf0;
    padding-top: 14px;
  }

  .admin-main { padding: 0 14px 30px; }
  .admin-topbar {
    position: static;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 14px 0;
    margin-bottom: 14px;
  }
  .admin-topbar h1 { font-size: 18px; }
  .admin-content { gap: 14px; }

  /* 统计卡两列 */
  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-card b { font-size: 24px; }

  .dashboard-grid, .vis-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; border-radius: 10px; }

  /* 表格在 .table-wrap 内横向滚动，保留全部列（含操作列） */
  .admin-table { font-size: 13px; }
  .admin-table th, .admin-table td { padding: 10px; }

  /* 输入 16px，防 iOS 聚焦时页面自动放大 */
  .admin-body .form-group input,
  .admin-body .form-group textarea,
  .admin-body .log-search input { font-size: 16px; }

  .log-toolbar { flex-direction: column; align-items: stretch; }
  .log-search input { width: 100%; }
  .hp-name { flex: 0 0 34%; }
  .trend-chart { gap: 6px; height: 170px; }
  .t-col { max-width: 28px; }
}

/* 手机竖屏再收紧 */
@media (max-width: 480px) {
  .lf-captcha { flex-wrap: wrap; }
  .lf-captcha .lf-box { flex-basis: 100%; }
  #captcha-img { width: 118px; }
  .login-panel { padding: 34px 22px 24px; }
  .panel { padding: 14px; }
  .t-val { display: none; }
}
