/* AI-RAG WP SaaS 后台设计系统 */
:root {
  --bg: #f4f6fb;
  --bg-soft: #eef2f9;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #06b6d4;
  --success: #12b76a;
  --success-soft: #e8f8f0;
  --warn: #f79009;
  --warn-soft: #fef4e6;
  --danger: #f04438;
  --danger-soft: #feeceb;
  --info: #2e90fa;
  --info-soft: #e8f2fe;
  --sidebar: #0b1220;
  --sidebar-soft: #131c2f;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 20px 48px rgba(16, 24, 40, .16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 246px; flex: 0 0 246px; background: var(--sidebar); color: #cbd5e1;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 18px 14px 12px; z-index: 40; overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .35);
}
.brand-name { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .2px; line-height: 1.2; }
.brand-sub { font-size: 11px; color: #7c8aa5; letter-spacing: .4px; }
.nav-group { margin-bottom: 6px; }
.nav-label { font-size: 11px; color: #6d7c96; letter-spacing: 1px; padding: 10px 12px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  color: #a9b6cc; font-size: 13.5px; cursor: pointer; transition: .15s; margin-bottom: 2px;
  border: none; background: transparent; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--sidebar-soft); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(99, 102, 241, .22), rgba(6, 182, 212, .10)); color: #fff; }
.nav-item.active .nav-icon { color: #a5b4fc; }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; color: #8494ad; }
.nav-badge { margin-left: auto; font-size: 10.5px; background: rgba(239, 68, 68, .16); color: #fca5a5; padding: 1px 7px; border-radius: 20px; }
.sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #22d3ee); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.sidebar-user-name { color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; }
.sidebar-user-role { color: #8494ad; font-size: 11px; }
.logout-btn { margin-left: auto; background: transparent; border: none; color: #8494ad; cursor: pointer; padding: 4px; border-radius: 6px; }
.logout-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
  padding: 0 26px; position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 700; }
.topbar .crumbs { color: var(--muted); font-size: 12.5px; }
.topbar-spacer { flex: 1; }
.topbar-meta { font-size: 12px; color: var(--muted); display: flex; gap: 14px; align-items: center; }
.tenant-badge { background: var(--primary-soft); color: var(--primary); border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.page { padding: 24px 26px 48px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ---------- 通用 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 750; margin: 0 0 4px; letter-spacing: -.2px; }
.page-sub { color: var(--muted); font-size: 13px; margin: 0; }
.page-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.section-title { font-size: 15px; font-weight: 700; margin: 0 0 2px; }
.section-sub { font-size: 12.5px; color: var(--muted); margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.flex1 { flex: 1; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text); font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 10px;
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #b8c0cc; box-shadow: var(--shadow-sm); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #4f46e5, #4338ca); border-color: #4f46e5; color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .22); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-accent { background: linear-gradient(135deg, #06b6d4, #0891b2); border-color: #06b6d4; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-danger { color: var(--danger); border-color: #fecdca; background: var(--danger-soft); }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.icon { width: 16px; height: 16px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 徽章 / 标签 ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 20px; line-height: 1.6; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.badgeless::before { display: none; }
.badge-success { background: var(--success-soft); color: #087443; }
.badge-warn { background: var(--warn-soft); color: #b54708; }
.badge-error { background: var(--danger-soft); color: #b42318; }
.badge-info { background: var(--info-soft); color: #175cd3; }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-neutral { background: var(--bg-soft); color: #475467; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--muted); cursor: pointer; transition: .15s; }
.chip.active { background: var(--primary-soft); color: var(--primary); border-color: #c7d2fe; font-weight: 600; }
.chip:hover { border-color: #c7d2fe; }

/* ---------- 统计卡 ---------- */
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--line); }
.stat.blue::after { background: linear-gradient(#6366f1, #818cf8); }
.stat.cyan::after { background: linear-gradient(#06b6d4, #67e8f9); }
.stat.green::after { background: linear-gradient(#12b76a, #6ce9a6); }
.stat.orange::after { background: linear-gradient(#f79009, #fdb022); }
.stat.red::after { background: linear-gradient(#f04438, #fda29b); }
.stat.purple::after { background: linear-gradient(#9333ea, #d8b4fe); }
.stat-top { display: flex; align-items: center; gap: 10px; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat-icon { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-soft); color: var(--primary); }
.stat-value { font-size: 27px; font-weight: 750; letter-spacing: -.6px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.trend-up { color: var(--success); font-weight: 650; }
.trend-down { color: var(--danger); font-weight: 650; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: #667085;
  font-weight: 650; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap;
}
table.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.table tr:last-child td { border-bottom: none; }
table.table tr:hover td { background: #fafbff; }
.table-empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.table-empty .icon { width: 40px; height: 40px; color: #c3cad5; margin-bottom: 10px; }
.cell-title { font-weight: 650; }
.cell-sub { font-size: 12px; color: var(--muted); }
.link-cell { color: var(--primary); font-weight: 600; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 4px 0; color: var(--muted); font-size: 12.5px; }
.pagination button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.span2 { grid-column: span 2; }
.field label { font-size: 12.5px; font-weight: 600; color: #344054; }
.field label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=email], select, textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 11px; font-size: 13px;
  background: #fff; color: var(--text); font-family: inherit; transition: .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
textarea { resize: vertical; min-height: 90px; }
.switch { position: relative; display: inline-flex; width: 40px; height: 22px; flex: 0 0 40px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d0d5dd; border-radius: 20px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(18px); }

/* ---------- 模态 / 抽屉 ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, .42); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 24px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 560px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; animation: pop .18s ease; }
.modal.wide { width: 860px; }
.modal.xwide { width: 1040px; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.modal-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-close { margin-left: auto; width: 30px; height: 30px; border: none; background: var(--bg-soft); border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #fcfcfd; border-radius: 0 0 16px 16px; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, .35); z-index: 80; animation: fade .18s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 94vw; background: #fff; box-shadow: var(--shadow-lg); z-index: 81; display: flex; flex-direction: column; animation: slide .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.drawer-head h3 { margin: 0; font-size: 17px; }
.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- 提示 ---------- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 11px; font-size: 13px; margin-bottom: 10px; border: 1px solid transparent; }
.alert.error { background: var(--danger-soft); color: #912018; border-color: #fecdca; }
.alert.warn { background: var(--warn-soft); color: #93370d; border-color: #fedf89; }
.alert.info { background: var(--info-soft); color: #194185; border-color: #d1e9ff; }
.alert .icon { flex: 0 0 16px; margin-top: 2px; }
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #101828; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow-lg); animation: toastIn .22s ease; display: flex; align-items: center; gap: 8px; max-width: 360px; }
.toast.success { background: #05603a; } .toast.error { background: #912018; } .toast.warn { background: #93370d; }
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } }

/* ---------- 进度 ---------- */
.progress { height: 6px; background: #eef2f9; border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #6366f1, #22d3ee); transition: width .4s; }
.progress.sm { height: 4px; }
.progress > i.green { background: linear-gradient(90deg, #12b76a, #6ce9a6); }
.progress > i.orange { background: linear-gradient(90deg, #f79009, #fdb022); }
.progress > i.red { background: linear-gradient(90deg, #f04438, #fda29b); }

/* ---------- 图表 ---------- */
.chart-card { padding: 20px; }
.chart-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-svg { width: 100%; height: auto; display: block; }
.sparkline { width: 84px; height: 26px; opacity: .9; }
.ring-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 12px; padding: 10px; }
.ring-value { font-size: 26px; font-weight: 750; }

/* ---------- 登录页 ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: #0b1220; }
.login-hero {
  position: relative; overflow: hidden; padding: 56px 60px; color: #fff; display: flex; flex-direction: column;
  background: radial-gradient(900px 600px at 10% 10%, rgba(99, 102, 241, .35), transparent 60%),
              radial-gradient(700px 500px at 90% 100%, rgba(6, 182, 212, .22), transparent 60%),
              #0b1220;
}
.login-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at 30% 30%, #000, transparent 75%); }
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-brand .brand-logo { width: 42px; height: 42px; font-size: 17px; }
.login-hero h1 { position: relative; z-index: 1; font-size: 42px; line-height: 1.15; letter-spacing: -1px; margin: 64px 0 16px; font-weight: 800; }
.login-hero h1 em { font-style: normal; background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero p { position: relative; z-index: 1; color: #a9b6cc; font-size: 15px; max-width: 540px; line-height: 1.75; }
.login-features { position: relative; z-index: 1; margin-top: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 560px; }
.login-feature { display: flex; gap: 10px; align-items: flex-start; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 12px; font-size: 12.5px; color: #cbd5e1; }
.login-feature b { color: #fff; display: block; font-size: 13px; margin-bottom: 2px; }
.login-stats { position: relative; z-index: 1; margin-top: auto; padding-top: 40px; display: flex; gap: 36px; }
.login-stat b { font-size: 28px; font-weight: 800; display: block; color: #fff; }
.login-stat span { color: #8494ad; font-size: 12px; }
.login-panel { background: #fff; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 370px; max-width: 100%; }
.login-card h2 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.4px; }
.login-card p { color: var(--muted); font-size: 13px; margin: 0 0 26px; }
.login-form .field { margin-bottom: 16px; }
.login-btn { width: 100%; padding: 12px; font-size: 14px; margin-top: 6px; }
.demo-box { margin-top: 22px; background: var(--bg-soft); border-radius: 12px; padding: 12px 14px; }
.demo-box .small { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.demo-chips { display: flex; gap: 8px; }
.demo-chip { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px; font-size: 11.5px; cursor: pointer; text-align: center; line-height: 1.35; color: #475467; }
.demo-chip b { display: block; color: var(--text); font-size: 12px; }
.login-error { background: var(--danger-soft); color: #b42318; border-radius: 9px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 12px; display: none; }

/* ---------- 内容预览 ---------- */
.prose { font-size: 14.5px; line-height: 1.85; color: #344054; }
.prose h2 { font-size: 19px; margin: 26px 0 10px; color: var(--text); }
.prose h3 { font-size: 16px; margin: 20px 0 8px; color: var(--text); }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 16px; padding-left: 20px; }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--text); }
.prose a { color: var(--primary); }
.cover-preview { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0b1220; }
.cover-preview img { display: block; width: 100%; }

/* ---------- 其它 ---------- */
.site-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px; transition: .15s; }
.site-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.site-head { display: flex; gap: 12px; align-items: flex-start; }
.site-favicon { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, #eef2ff, #e0f2fe); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: 0 0 40px; }
.site-name { font-weight: 700; font-size: 15px; }
.site-domain { color: var(--muted); font-size: 12px; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #98a2b3; }
.health-dot.ok { background: var(--success); box-shadow: 0 0 0 3px rgba(18, 183, 106, .14); }
.health-dot.fail { background: var(--danger); box-shadow: 0 0 0 3px rgba(240, 68, 56, .14); }
.site-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.site-metric { background: #fafbfd; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.site-metric b { font-size: 16px; display: block; font-variant-numeric: tabular-nums; }
.site-metric span { font-size: 11px; color: var(--muted); }
.site-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--bg-soft); color: var(--muted); }
.flag.on { background: var(--success-soft); color: #087443; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.plan-card.hot { border-color: #c7d2fe; box-shadow: 0 10px 30px rgba(79, 70, 229, .12); }
.plan-tag { position: absolute; top: 0; right: 22px; transform: translateY(-50%); background: linear-gradient(135deg, #4f46e5, #06b6d4); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 650; }
.plan-price { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.plan-price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.plan-quotas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12.5px; color: #475467; }
.plan-quotas span { display: flex; justify-content: space-between; gap: 8px; padding: 6px 9px; background: #fafbfd; border-radius: 8px; }
.plan-quotas b { color: var(--text); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { padding: 9px 14px; font-size: 13px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; font-weight: 600; background: none; border-top: none; border-left: none; border-right: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 14px; }
.timeline-item::before { content: ""; position: absolute; left: -19px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; }
.timeline-item.error::before { background: var(--danger); }
.timeline-item.warn::before { background: var(--warn); }
.timeline-item.info::before { background: var(--success); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 13px; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--text); word-break: break-all; }
.mini-list { display: flex; flex-direction: column; gap: 2px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mini-row:last-child { border-bottom: none; }
.queue-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.queue-card b { font-size: 13px; }
.queue-card .row { margin-top: 8px; }
.banner { background: linear-gradient(120deg, #101828, #1d2939); color: #fff; border-radius: 16px; padding: 22px 26px; display: flex; align-items: center; gap: 20px; overflow: hidden; position: relative; }
.banner::after { content: ""; position: absolute; right: -40px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(6, 182, 212, .35), transparent 70%); }
.banner h2 { margin: 0 0 4px; font-size: 20px; }
.banner p { margin: 0; color: #98a2b3; font-size: 13px; }
.banner .btn { position: relative; z-index: 1; }
.searchbox { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 11px; background: #fff; height: 38px; }
.searchbox .icon { color: #98a2b3; }
.searchbox input { border: none; box-shadow: none; padding: 0; height: 100%; background: transparent; }
.searchbox input:focus { box-shadow: none; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar select { width: auto; min-width: 130px; height: 38px; }
.skeleton { background: linear-gradient(90deg, #eef2f9 25%, #f6f8fc 37%, #eef2f9 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 响应式 ---------- */
.mobile-toggle { display: none; }
@media (max-width: 1180px) {
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .login-features { grid-template-columns: 1fr; }
  .login-hero h1 { font-size: 34px; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -260px; transition: left .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .mobile-toggle { display: inline-flex; }
  .page { padding: 18px 16px 40px; }
  .topbar { padding: 0 16px; }
  .grid-3, .grid-2, .grid-6, .grid-4 { grid-template-columns: 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .modal.wide, .modal.xwide { width: 100%; }
  .drawer { width: 100%; }
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .page-actions { margin-left: 0; }
}
@media (max-width: 620px) {
  .stat-value { font-size: 22px; }
  .topbar-meta { display: none; }
  .page-title { font-size: 19px; }
}
