/* ============================================================
   AI 广告推广系统 · 布局 / 组件 / 动画
   ============================================================ */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

a { color: var(--brand-1); text-decoration: none; }

/* ---------- 背景装饰光斑 ---------- */
.orbs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.75; }
.orb.a { width: 520px; height: 520px; left: -140px; top: -160px; background: var(--orb-1); animation: drift 22s ease-in-out infinite; }
.orb.b { width: 460px; height: 460px; right: -120px; top: 8%; background: var(--orb-2); animation: drift 26s ease-in-out infinite reverse; }
.orb.c { width: 420px; height: 420px; left: 32%; bottom: -180px; background: var(--orb-3); animation: drift 30s ease-in-out infinite; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(60px, 40px, 0) scale(1.08); }
  66% { transform: translate3d(-40px, 30px, 0) scale(0.95); }
}

/* ============================================================
   登录页
   ============================================================ */
.auth-wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  height: 100vh;
}
.auth-hero {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px 72px;
  color: #fff;
  background: var(--brand-grad);
  overflow: hidden;
}
.auth-hero::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.22), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.16), transparent 40%);
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero h1 {
  font-size: 40px; line-height: 1.25; margin: 0 0 16px; font-weight: 800; letter-spacing: -0.5px;
}
.auth-hero p { font-size: 16px; opacity: 0.92; margin: 0 0 36px; max-width: 430px; }
.auth-hero ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.auth-hero li { display: flex; align-items: center; gap: 12px; font-size: 15px; opacity: 0; animation: slideInLeft 0.6s ease forwards; }
.auth-hero li:nth-child(1) { animation-delay: 0.15s; }
.auth-hero li:nth-child(2) { animation-delay: 0.28s; }
.auth-hero li:nth-child(3) { animation-delay: 0.41s; }
.auth-hero li:nth-child(4) { animation-delay: 0.54s; }
.auth-hero li:nth-child(5) { animation-delay: 0.67s; }
.auth-hero li i {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: rgba(255,255,255,0.22); font-style: normal; font-size: 13px; flex: none;
}
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

.auth-panel {
  display: grid; place-items: center; padding: 40px;
  background: var(--bg-app); position: relative;
}
.auth-card {
  width: 100%; max-width: 398px;
  background: var(--bg-surface); border: 1px solid var(--border-1);
  border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 34px 32px;
  animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(22px) scale(0.97); } to { opacity: 1; transform: none; } }
.auth-card h2 { margin: 0 0 6px; font-size: 22px; }
.auth-card .sub { color: var(--text-3); margin: 0 0 24px; font-size: 13px; }
.auth-tabs { display: flex; gap: 6px; background: var(--bg-surface-3); padding: 4px; border-radius: 12px; margin-bottom: 22px; }
.auth-tabs button {
  flex: 1; border: 0; background: transparent; color: var(--text-2);
  padding: 9px 0; border-radius: 9px; cursor: pointer; font-size: 13.5px; font-weight: 600;
  transition: all 0.25s ease;
}
.auth-tabs button.active { background: var(--bg-surface); color: var(--brand-1); box-shadow: var(--shadow-sm); }
.demo-hint {
  margin-top: 18px; padding: 12px 14px; border-radius: 12px; font-size: 12.5px;
  background: var(--brand-grad-soft); color: var(--text-2); line-height: 1.9;
  border: 1px dashed var(--border-2);
}
.demo-hint b { color: var(--text-1); }
.demo-hint code {
  background: var(--bg-surface); padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--border-1); cursor: pointer; font-size: 12px;
}
.demo-hint code:hover { border-color: var(--brand-1); color: var(--brand-1); }

/* ============================================================
   表单控件
   ============================================================ */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 13px; font-size: 13.5px; font-family: inherit;
  color: var(--text-1); background: var(--bg-surface-2);
  border: 1px solid var(--border-1); border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 0; border-color: var(--brand-1); background: var(--bg-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 18%, transparent);
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.65; }
.select { cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px;
}
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.checkbox-row input { accent-color: var(--brand-1); width: 15px; height: 15px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 600; font-family: inherit;
  border: 1px solid transparent; border-radius: 10px; cursor: pointer;
  background: var(--bg-surface-3); color: var(--text-1);
  transition: transform 0.16s ease, box-shadow 0.22s ease, background 0.22s ease, opacity 0.2s;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-primary { background: var(--brand-grad); color: #fff; }
.btn-primary:hover { box-shadow: var(--shadow-glow); }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--brand-1); color: var(--brand-1); background: var(--bg-hover); }
.btn-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn .spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn-ghost .spinner { border-color: var(--border-2); border-top-color: var(--brand-1); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   主框架
   ============================================================ */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 232px 1fr; height: 100vh; }

.sidebar {
  background: var(--bg-sidebar); border-right: 1px solid var(--border-1);
  display: flex; flex-direction: column; overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px; background: var(--brand-grad);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: var(--shadow-glow); flex: none;
}
.brand-txt b { display: block; font-size: 14.5px; letter-spacing: -0.2px; }
.brand-txt span { font-size: 11px; color: var(--text-3); letter-spacing: 0.4px; }

.nav { flex: 1; overflow-y: auto; padding: 6px 12px 18px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  border-radius: 11px; color: var(--text-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; margin-bottom: 3px; position: relative;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-1); transform: translateX(3px); }
.nav-item.active { background: var(--bg-active); color: var(--brand-1); font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--brand-grad);
}
.nav-ico { width: 18px; text-align: center; font-size: 15px; flex: none; }

.main { display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 62px; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 22px; border-bottom: 1px solid var(--border-1);
  background: var(--bg-glass); backdrop-filter: blur(14px);
}
.page-title { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.page-sub { font-size: 12px; color: var(--text-3); margin-left: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px;
  border-radius: 99px; border: 1px solid var(--border-1); background: var(--bg-surface);
  cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
}
.user-chip:hover { border-color: var(--brand-1); box-shadow: var(--shadow-sm); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand-grad);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none;
}
.user-meta b { display: block; font-size: 12.5px; line-height: 1.3; }
.user-meta span { font-size: 10.5px; color: var(--text-3); }

/* 主题切换按钮 */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  border: 1px solid var(--border-1); background: var(--bg-surface);
  cursor: pointer; display: grid; place-items: center; font-size: 16px;
  color: var(--text-2); position: relative; overflow: hidden;
  transition: border-color 0.2s, color 0.2s, transform 0.25s;
}
.theme-toggle:hover { border-color: var(--brand-1); color: var(--brand-1); transform: rotate(-12deg); }
.theme-toggle .ico { position: absolute; transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s; }
html[data-theme='light'] .theme-toggle .ico-moon { transform: translateY(0) rotate(0); opacity: 1; }
html[data-theme='light'] .theme-toggle .ico-sun { transform: translateY(140%) rotate(-90deg); opacity: 0; }
html[data-theme='dark'] .theme-toggle .ico-sun { transform: translateY(0) rotate(0); opacity: 1; }
html[data-theme='dark'] .theme-toggle .ico-moon { transform: translateY(-140%) rotate(90deg); opacity: 0; }

.content { flex: 1; overflow-y: auto; padding: 22px; scroll-behavior: smooth; }
.view-enter { animation: viewIn 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 错峰入场 */
.stagger > * { opacity: 0; animation: riseIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.stagger > *:nth-child(1) { animation-delay: 0.03s; }
.stagger > *:nth-child(2) { animation-delay: 0.09s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.21s; }
.stagger > *:nth-child(5) { animation-delay: 0.27s; }
.stagger > *:nth-child(6) { animation-delay: 0.33s; }
.stagger > *:nth-child(7) { animation-delay: 0.39s; }
.stagger > *:nth-child(8) { animation-delay: 0.45s; }

/* ============================================================
   卡片 / 栅格
   ============================================================ */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
.mb16 { margin-bottom: 16px; }
.mt16 { margin-top: 16px; }

.card {
  background: var(--bg-surface); border: 1px solid var(--border-1);
  border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
}
.card.hoverable:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--border-2); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card-head .desc { font-size: 12px; color: var(--text-3); }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* KPI 卡 */
.kpi { position: relative; overflow: hidden; }
.kpi::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
  border-radius: 50%; background: var(--brand-grad-soft); opacity: 0.7;
}
.kpi-label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 27px; font-weight: 800; letter-spacing: -0.8px; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; font-weight: 600; color: var(--text-3); margin-left: 3px; }
.kpi-foot { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.trend-up { color: var(--success); font-weight: 700; }
.trend-down { color: var(--danger); font-weight: 700; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px;
  border-radius: 99px; font-size: 11.5px; font-weight: 600; line-height: 1.7;
  background: var(--bg-surface-3); color: var(--text-2); white-space: nowrap;
}
.badge.ok { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.badge.warn { background: color-mix(in srgb, var(--warning) 18%, transparent); color: color-mix(in srgb, var(--warning) 82%, var(--text-1)); }
.badge.err { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.badge.info { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.badge.brand { background: var(--brand-grad-soft); color: var(--brand-1); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(1.35); } }

/* ============================================================
   表格
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border-1); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--bg-surface); }
.tbl th {
  text-align: left; padding: 11px 14px; font-size: 12px; font-weight: 700;
  color: var(--text-3); background: var(--bg-surface-2); white-space: nowrap;
  border-bottom: 1px solid var(--border-1); letter-spacing: 0.2px;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border-1); color: var(--text-2); vertical-align: middle; }
.tbl tbody tr { transition: background 0.18s ease; }
.tbl tbody tr:hover { background: var(--bg-hover); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.strong { color: var(--text-1); font-weight: 600; }
.tbl .num { font-variant-numeric: tabular-nums; text-align: right; }
.tbl .empty { text-align: center; color: var(--text-3); padding: 40px 0; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 14px; font-size: 12.5px; color: var(--text-3); }
.pager button {
  min-width: 32px; height: 32px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--border-1); background: var(--bg-surface);
  color: var(--text-2); cursor: pointer; font-family: inherit; font-size: 12.5px;
  transition: all 0.2s ease;
}
.pager button:hover:not([disabled]) { border-color: var(--brand-1); color: var(--brand-1); }
.pager button.active { background: var(--brand-grad); color: #fff; border-color: transparent; }
.pager button[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   骨架屏 / 空态 / 加载
   ============================================================ */
.skeleton {
  background: var(--skeleton); background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-line { height: 12px; margin-bottom: 10px; }
.sk-card { height: 92px; border-radius: 14px; }
.sk-chart { height: 260px; border-radius: 14px; }

.empty { text-align: center; padding: 46px 20px; color: var(--text-3); }
.empty .ico { font-size: 40px; opacity: 0.5; margin-bottom: 10px; }
.empty p { margin: 0; font-size: 13px; }

.loading-line {
  position: fixed; top: 0; left: 0; height: 2.5px; width: 100%; z-index: 9999;
  background: var(--brand-grad); transform-origin: left; transform: scaleX(0);
  transition: transform 0.3s ease, opacity 0.35s ease; opacity: 0;
}
.loading-line.on { transform: scaleX(0.85); opacity: 1; transition: transform 8s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s; }
.loading-line.done { transform: scaleX(1); opacity: 0; transition: transform 0.25s ease, opacity 0.4s ease 0.15s; }

/* ============================================================
   Toast
   ============================================================ */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 380px;
  padding: 13px 16px; border-radius: 13px; font-size: 13px;
  background: var(--bg-surface); border: 1px solid var(--border-1);
  box-shadow: var(--shadow-lg); color: var(--text-1);
  animation: toastIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(0.94); } }
.toast .bar { width: 3px; border-radius: 2px; align-self: stretch; flex: none; }
.toast.ok .bar { background: var(--success); }
.toast.err .bar { background: var(--danger); }
.toast.warn .bar { background: var(--warning); }
.toast.info .bar { background: var(--info); }

/* ============================================================
   弹窗
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center;
  background: rgba(8, 12, 24, 0.5); backdrop-filter: blur(4px); padding: 22px;
  animation: fadeIn 0.22s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 560px; max-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg-surface); border: 1px solid var(--border-1);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  animation: modalIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal.wide { max-width: 780px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(26px) scale(0.96); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border-1); }
.modal-head h3 { margin: 0; font-size: 15.5px; }
.modal-head .x { margin-left: auto; border: 0; background: transparent; font-size: 20px; color: var(--text-3); cursor: pointer; line-height: 1; padding: 0 4px; }
.modal-head .x:hover { color: var(--danger); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 22px; border-top: 1px solid var(--border-1); background: var(--bg-surface-2); }

/* ============================================================
   杂项组件
   ============================================================ */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.search-box { position: relative; }
.search-box .input { padding-left: 32px; }
.search-box::before { content: '⌕'; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 15px; }

.chart { width: 100%; height: 280px; }
.chart.sm { height: 210px; }
.legend-inline { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend-inline i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

.bar-track { height: 7px; border-radius: 99px; background: var(--bg-surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--brand-grad); width: 0; transition: width 1s cubic-bezier(0.22, 1, 0.36, 1); }

.progress-ring { position: relative; display: grid; place-items: center; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.progress-ring .track { stroke: var(--bg-surface-3); }
.progress-ring .val { stroke: url(#ringGrad); transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1); }
.progress-ring .center { position: absolute; text-align: center; }
.progress-ring .center b { font-size: 20px; font-weight: 800; }
.progress-ring .center span { font-size: 11px; color: var(--text-3); display: block; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--border-1); }
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item::before {
  content: ''; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--brand-grad); border: 2px solid var(--bg-surface);
}
.timeline-item .t { font-size: 13px; font-weight: 600; }
.timeline-item .d { font-size: 11.5px; color: var(--text-3); }

.alert-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  border-radius: 11px; background: var(--bg-surface-2); border: 1px solid var(--border-1);
  margin-bottom: 9px; font-size: 13px; transition: transform 0.2s, border-color 0.2s;
}
.alert-row:hover { transform: translateX(3px); border-color: var(--border-2); }
.alert-row .ico { font-size: 17px; flex: none; }
.alert-row .grow { flex: 1; min-width: 0; }
.alert-row .txt { color: var(--text-3); font-size: 12px; }

.chip-list { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px; border-radius: 99px; font-size: 12.5px; cursor: pointer;
  border: 1px solid var(--border-1); background: var(--bg-surface); color: var(--text-2);
  transition: all 0.22s ease;
}
.chip:hover { border-color: var(--brand-1); color: var(--brand-1); }
.chip.on { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }

.material-preview {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border-1);
  background: var(--bg-surface-2); aspect-ratio: 4/3; display: grid; place-items: center;
}
.material-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.copy-item {
  padding: 12px 14px; border-radius: 11px; background: var(--bg-surface-2);
  border: 1px solid var(--border-1); margin-bottom: 9px; font-size: 13px; line-height: 1.7;
  transition: border-color 0.2s, transform 0.2s;
}
.copy-item:hover { border-color: var(--brand-1); transform: translateY(-2px); }
.copy-item .tag { margin-top: 7px; display: flex; gap: 6px; flex-wrap: wrap; }

.stat-mini { display: flex; gap: 18px; flex-wrap: wrap; }
.stat-mini > div { font-size: 12.5px; color: var(--text-3); }
.stat-mini b { display: block; font-size: 17px; color: var(--text-1); font-weight: 700; font-variant-numeric: tabular-nums; }

.sec-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 0 0 11px; display: flex; align-items: center; gap: 8px; }
.sec-title::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--brand-grad); }

.muted { color: var(--text-3); font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.mla { margin-left: auto; }

/* 菜单（下拉） */
.menu {
  position: absolute; z-index: 8000; min-width: 158px; padding: 6px;
  background: var(--bg-surface); border: 1px solid var(--border-1);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  animation: menuIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: none; } }
.menu .mi { padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; transition: background 0.16s, color 0.16s; }
.menu .mi:hover { background: var(--bg-hover); color: var(--text-1); }
.menu .mi.danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.menu .sep { height: 1px; background: var(--border-1); margin: 5px 8px; }

/* 响应式 */
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) {
  .app { grid-template-columns: 66px 1fr; }
  .brand-txt, .nav-item span:not(.nav-ico), .user-meta { display: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .g-2-1, .g-1-2, .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .g2, .g4 { grid-template-columns: 1fr; }
  .content { padding: 14px; }
}
