/* ============================================================
   智会问答 · 管理后台样式
   ============================================================ */
:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #6b7a90;
    --line: #e6eaf2;
    --line-strong: #d8dfeb;
    --brand: #5b6cf9;
    --brand-2: #8b5cf6;
    --brand-soft: #eef1ff;
    --green: #0f9f6e;
    --green-soft: #e7f8f0;
    --amber: #b45309;
    --amber-soft: #fdf3e3;
    --red: #dc2626;
    --red-soft: #fdecec;
    --blue: #2563eb;
    --blue-soft: #eaf1ff;
    --violet: #7c3aed;
    --violet-soft: #f2ecff;
    --radius: 18px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 34px -22px rgba(15, 23, 42, .22);
    --sidebar-w: 252px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink);
    background:
        radial-gradient(1100px 520px at 100% -12%, #e9edff 0%, transparent 62%),
        radial-gradient(900px 480px at -12% 100%, #f1eaff 0%, transparent 58%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
.icon { flex: none; vertical-align: -2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dash { color: var(--line-strong); margin: 0 2px; }
::selection { background: #cdd6ff; }

/* ---------- 布局 ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    padding: 22px 16px 16px;
    color: #cbd5e1;
    background:
        radial-gradient(520px 280px at 0% 0%, rgba(99, 116, 255, .30), transparent 70%),
        radial-gradient(420px 320px at 100% 100%, rgba(139, 92, 246, .18), transparent 70%),
        linear-gradient(180deg, #0d1526 0%, #0b1322 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; color: #fff; }
.brand-mark { display: inline-flex; filter: drop-shadow(0 6px 14px rgba(91, 108, 249, .45)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16.5px; letter-spacing: .02em; }
.brand-text small { margin-top: 3px; font-size: 9.5px; letter-spacing: .18em; color: #7f8db0; }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.nav-label {
    margin: 8px 10px 8px;
    font-size: 10.5px;
    letter-spacing: .16em;
    color: #5c6a8a;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 14px;
    color: #a9b6d0;
    border: 1px solid transparent;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item .icon { color: #7d8db3; transition: color .18s ease; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-item.is-active {
    color: #fff;
    background: linear-gradient(120deg, rgba(91, 108, 249, .34), rgba(139, 92, 246, .20));
    border-color: rgba(139, 160, 255, .22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.nav-item.is-active .icon { color: #aebcff; }

.sidebar-note {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding: 13px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .07);
}
.note-orb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(139, 160, 255, .16);
    color: #b9c6ff;
}
.sidebar-note strong { display: block; font-size: 12.5px; color: #e6ecff; }
.sidebar-note p { margin: 4px 0 0; font-size: 11.5px; line-height: 1.55; color: #7f8db0; }

.sidebar-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 13px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.user-chip { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6d8bff, #a06bff);
    box-shadow: 0 4px 12px rgba(109, 139, 255, .35);
}
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-meta strong { font-size: 12.5px; color: #eef2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { margin-top: 2px; font-size: 10.5px; color: #7f8db0; }
.sidebar-foot .icon-btn { color: #8c9ab9; background: rgba(255, 255, 255, .05); border-color: transparent; }
.sidebar-foot .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .12); }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 62px;
    padding: 0 30px;
    background: rgba(255, 255, 255, .76);
    border-bottom: 1px solid rgba(230, 234, 242, .9);
    backdrop-filter: saturate(160%) blur(12px);
}
.topbar-crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.topbar-crumb .icon { color: #b6c0d2; }
.topbar-crumb strong { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.topbar-side { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar-date { font-size: 12.5px; color: var(--muted); }
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 27px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 11.5px;
    color: #0b7a55;
    background: var(--green-soft);
    border: 1px solid #c8efdf;
}
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
.menu-btn { display: none; }

.content { width: 100%; max-width: 1380px; margin: 0 auto; padding: 28px 32px 64px; }

/* ---------- 通用 ---------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.page-head h1 { margin: 2px 0 6px; font-size: 25px; letter-spacing: -.02em; font-weight: 700; }
.eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .18em;
    color: #8a95ad;
}
.crumb-link:hover { color: var(--brand); }
.page-head .sub { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 720px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex: none; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid rgba(91, 108, 249, .45);
    outline-offset: 1px;
}
.btn-primary {
    color: #fff;
    background: linear-gradient(120deg, #5b6cf9, #7c5cff);
    box-shadow: 0 8px 18px -8px rgba(91, 108, 249, .65), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { box-shadow: 0 10px 22px -8px rgba(91, 108, 249, .8); }
.btn-ghost { color: var(--ink-2); background: #fff; border-color: var(--line-strong); }
.btn-ghost:hover { border-color: #b9c6e0; background: #fbfcff; }
.btn-soft { color: #4c5bd4; background: var(--brand-soft); border-color: #dde3ff; }
.btn-soft:hover { background: #e3e8ff; }
.btn-danger { color: #b91c1c; background: var(--red-soft); border-color: #f6cccc; }
.btn-danger:hover { background: #fbdada; }
.btn-block { width: 100%; }
.btn-lg { height: 44px; font-size: 14.5px; border-radius: 11px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-xs { height: 27px; padding: 0 9px; font-size: 11.5px; border-radius: 8px; }
.btn[disabled], .btn.is-disabled { opacity: .6; pointer-events: none; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: none;
    padding: 0;
    border-radius: 9px;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.icon-btn:hover { color: var(--brand); border-color: #c9d2f8; background: #f8f9ff; }
.icon-btn.danger:hover { color: var(--red); border-color: #f3c4c4; background: var(--red-soft); }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: visible;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}
.card-head h2 { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.card-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.card-foot-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 22px 18px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--brand);
}
.card-foot-link:hover { gap: 8px; }
.card-foot-actions {
    display: flex;
    justify-content: center;
    padding: 12px 22px 18px;
    border-top: 1px dashed var(--line);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}
.tag .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag-green { color: #067a52; background: var(--green-soft); border: 1px solid #c9efdf; }
.tag-amber { color: #9a5706; background: var(--amber-soft); border: 1px solid #f4e0bd; }
.tag-red { color: #b3261e; background: var(--red-soft); border: 1px solid #f6cccc; }
.tag-blue { color: #1d4ed8; background: var(--blue-soft); border: 1px solid #d6e3ff; }
.tag-violet { color: #6d28d9; background: var(--violet-soft); border: 1px solid #e3d5ff; }
.tag-slate { color: #4a5a73; background: #f0f3f8; border: 1px solid #e0e6f0; }

/* ---------- 概览 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
    position: relative;
    padding: 18px 20px 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.stat-card::after {
    content: "";
    position: absolute;
    right: -28px;
    top: -32px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--tone-soft, #f0f3ff);
    opacity: .8;
}
.stat-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: var(--tone, var(--brand));
    background: var(--tone-soft, var(--brand-soft));
}
.stat-label { position: relative; z-index: 1; margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.stat-value { position: relative; z-index: 1; margin: 5px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.stat-value small { margin-left: 4px; font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat-meta { position: relative; z-index: 1; margin: 7px 0 0; font-size: 11.5px; color: #8a95ad; }
.tone-violet { --tone: #7c3aed; --tone-soft: #f2ecff; }
.tone-green { --tone: #0f9f6e; --tone-soft: #e7f8f0; }
.tone-blue { --tone: #2563eb; --tone-soft: #eaf1ff; }
.tone-amber { --tone: #b45309; --tone-soft: #fdf3e3; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .9fr); gap: 20px; align-items: start; }
.grid-main .card { margin-bottom: 20px; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid-two .card { margin-bottom: 0; }

.trend-chart { display: flex; align-items: flex-end; gap: 10px; height: 206px; padding: 22px 22px 16px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.trend-value { font-size: 11.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.trend-track { flex: 1; width: 100%; max-width: 42px; display: flex; align-items: flex-end; justify-content: center; }
.trend-bar {
    width: 100%;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #8290ff, #5b6cf9);
    box-shadow: 0 6px 14px -8px rgba(91, 108, 249, .7);
    min-height: 3px;
    transition: height .3s ease;
}
.trend-col:nth-child(7) .trend-bar { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
.trend-label { margin-top: 9px; font-size: 11px; color: var(--muted); }
.trend-week { margin-top: 1px; font-size: 10px; color: #b0b9ca; }

.health-list { padding: 10px 22px 4px; }
.health-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 12.5px;
}
.health-row:last-child { border-bottom: 0; }
.health-name { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.health-name .icon { color: #98a4ba; }
.health-state { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; font-size: 12px; }
.health-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.health-state.is-ok { color: var(--green); }
.health-state.is-bad { color: var(--red); }
.inline-alert {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 4px 22px 12px;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 12px;
    color: #9a5706;
    background: var(--amber-soft);
    border: 1px solid #f4e0bd;
}

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .03em;
    color: #8491a7;
    background: #f9fafd;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table th:first-child { padding-left: 22px; }
.table th:last-child { padding-right: 22px; }
.table td { padding: 13px 14px; border-bottom: 1px solid #f0f3f8; vertical-align: middle; }
.table td:first-child { padding-left: 22px; }
.table td:last-child { padding-right: 22px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbff; }
.cell-strong { font-weight: 550; color: var(--ink); }
.cell-sub {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cell-error { margin: 4px 0 0; font-size: 11.5px; color: var(--red); }
.cell-activity { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.cell-activity small { display: block; margin-top: 3px; font-size: 11px; }
.cell-activity .activity-avatar { width: 32px; height: 32px; font-size: 13px; border-radius: 10px; }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 52px 20px; text-align: center; color: var(--muted); }
.empty-state p { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.empty-state span { font-size: 12.5px; }
.empty-state .btn { margin-top: 6px; }
.empty-state.compact { padding: 30px 20px; }
.empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #8b98b2;
    background: #f2f5fb;
    border: 1px solid var(--line);
}

/* ---------- 活动速览 / 时间线 ---------- */
.activity-list { list-style: none; margin: 0; padding: 8px 14px 14px; }
.activity-item { display: flex; align-items: center; gap: 11px; padding: 9px 8px; border-radius: 11px; transition: background .15s ease; }
.activity-item:hover { background: #f8faff; }
.activity-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6d8bff, #8b5cf6);
}
.activity-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.activity-main strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-main small { margin-top: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.timeline { list-style: none; margin: 0; padding: 16px 22px 18px 24px; }
.timeline li { position: relative; display: flex; gap: 12px; padding: 0 0 16px 2px; }
.timeline li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 12px;
    bottom: -2px;
    width: 1px;
    background: var(--line);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline-dot {
    position: relative;
    z-index: 1;
    width: 9px;
    height: 9px;
    margin-top: 5px;
    flex: none;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #8b9bff;
}
.timeline-body strong { display: block; font-size: 12.5px; font-weight: 600; }
.timeline-body p { margin: 2px 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.timeline-body small { font-size: 11px; color: #a2acbf; }

/* ---------- 活动列表 ---------- */
.mini-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; }
.mini-stats span {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 6px 11px;
    border-radius: 9px;
    font-size: 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, .7);
    border: 1px solid var(--line);
}
.mini-stats strong { font-size: 14px; color: var(--ink); }
.search-input {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 11px;
    border-radius: 9px;
    background: #f8fafd;
    border: 1px solid var(--line);
    color: #9aa5b9;
}
.search-input input { width: 190px; border: 0; background: transparent; outline: none; }
.search-input:focus-within { border-color: #c3cdf7; background: #fff; }

.row-actions { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
#activityTable { min-width: 1030px; }
.table-logs { min-width: 880px; }
.row-actions form { display: inline-flex; }
.mini-menu { position: relative; }
.mini-menu summary { list-style: none; cursor: pointer; }
.mini-menu summary::-webkit-details-marker { display: none; }
.more-dots { font-size: 15px; font-weight: 700; letter-spacing: 1px; line-height: 1; color: var(--muted); }
.mini-menu[open] summary { color: var(--brand); border-color: #c9d2f8; }
.mini-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    width: 244px;
    padding: 13px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .28);
}
.mini-menu-title { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; }
.mini-menu-desc { margin: 0 0 10px; font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.checkbox { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.checkbox input { width: 14px; height: 14px; accent-color: var(--brand); }

.tips-card { background: linear-gradient(180deg, #fff, #fbfcff); }
.tips-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.tip { padding: 18px 22px; border-right: 1px dashed var(--line); }
.tip:last-child { border-right: 0; }
.tip-num { font-family: var(--mono); font-size: 11px; color: var(--brand); }
.tip strong { display: block; margin: 6px 0 5px; font-size: 13px; }
.tip p { margin: 0; font-size: 12px; line-height: 1.65; color: var(--muted); }

/* ---------- 表单 ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 20px; align-items: start; }
.form-main > .card:last-child, .form-side > .card:last-child { margin-bottom: 18px; }
.form-body { padding: 20px 22px 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.field-label i { color: var(--red); font-style: normal; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 9px 12px;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input, .field select { height: 40px; }
.field textarea { resize: vertical; min-height: 62px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: #a9b6f8;
    box-shadow: 0 0 0 3px rgba(91, 108, 249, .12);
}
.field input[readonly] { background: #f6f8fc; color: var(--muted); cursor: not-allowed; }
.field-hint { font-size: 11.5px; color: #8a95ad; line-height: 1.5; }
.form-alert {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 11px;
    background: var(--red-soft);
    border: 1px solid #f6cccc;
    color: #9f1c1c;
    font-size: 12.5px;
}
.form-alert strong { display: block; margin-bottom: 4px; }
.form-alert ul { margin: 0; padding-left: 17px; line-height: 1.7; }

.faq-list { padding: 16px 22px 4px; display: flex; flex-direction: column; gap: 12px; }
.faq-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px;
    border-radius: 13px;
    background: #fbfcff;
    border: 1px solid var(--line);
}
.faq-no {
    flex: none;
    width: 32px;
    height: 32px;
    margin-top: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: #6b7bd8;
    background: var(--brand-soft);
}
.faq-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.faq-fields input, .faq-fields textarea {
    width: 100%;
    padding: 8px 11px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    outline: none;
    background: #fff;
}
.faq-fields input { height: 36px; font-weight: 500; }
.faq-fields textarea { resize: vertical; min-height: 54px; line-height: 1.6; font-size: 13px; }
.faq-fields input:focus, .faq-fields textarea:focus { border-color: #a9b6f8; box-shadow: 0 0 0 3px rgba(91, 108, 249, .1); }
.faq-side { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; }
.sort-field { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--muted); }
.sort-field input { width: 58px; height: 30px; padding: 0 6px; text-align: center; border: 1px solid var(--line-strong); border-radius: 7px; outline: none; }
.faq-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 12.5px; }
.form-foot-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 10px 22px 16px;
    font-size: 11.5px;
    color: #8a95ad;
}

.side-card { margin-bottom: 16px; }
.checklist { list-style: none; margin: 0; padding: 14px 20px 16px; display: flex; flex-direction: column; gap: 9px; }
.checklist li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.checklist .icon { color: var(--green); margin-top: 1px; }
.mode-card {
    display: flex;
    gap: 9px;
    margin: 0 16px 16px;
    padding: 11px 12px;
    border-radius: 11px;
    background: var(--amber-soft);
    border: 1px solid #f4e0bd;
}
.mode-card.is-live { background: var(--green-soft); border-color: #c9efdf; }
.mode-dot { width: 7px; height: 7px; margin-top: 5px; flex: none; border-radius: 50%; background: #c47a12; }
.mode-card.is-live .mode-dot { background: var(--green); }
.mode-card strong { display: block; font-size: 12px; color: #8a4d05; }
.mode-card.is-live strong { color: #067a52; }
.mode-card p { margin: 3px 0 0; font-size: 11.5px; line-height: 1.5; color: #9a7320; }
.mode-card.is-live p { color: #2a7a5f; }
.link-box { margin: 14px 16px; padding: 10px 12px; border-radius: 9px; background: #f7f9fd; border: 1px dashed var(--line-strong); font-size: 11.5px; color: var(--ink-2); word-break: break-all; }
.side-actions { display: flex; gap: 8px; padding: 0 16px 16px; }
.side-tip { display: flex; gap: 10px; padding: 16px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.side-tip .icon { color: var(--brand); margin-top: 1px; }
.side-tip strong { display: block; color: var(--ink-2); font-size: 12.5px; margin-bottom: 2px; }
.side-tip p { margin: 0; }

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}
.form-actions > div { display: flex; gap: 9px; }
.form-actions .muted { font-size: 12px; }

/* ---------- 日志 ---------- */
.tab-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.tab-bar a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 15px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--muted);
    border: 1px solid transparent;
    transition: all .15s ease;
}
.tab-bar a:hover { color: var(--ink-2); background: rgba(255, 255, 255, .7); }
.tab-bar a.is-active { color: #4c5bd4; background: #fff; border-color: var(--line); box-shadow: var(--shadow); font-weight: 550; }
.tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 6px; font-size: 10.5px; color: #fff; background: var(--brand); }

.filter-card { margin-bottom: 16px; }
.filter-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px 20px; }
.filter-field { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); }
.filter-field.grow { flex: 1; min-width: 190px; }
.filter-field select, .filter-field > input {
    height: 34px;
    min-width: 118px;
    padding: 0 9px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: #fff;
    outline: none;
    font-size: 12.5px;
}
.filter-input { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: #9aa5b9; }
.filter-input input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 12.5px; }
.filter-field select:focus, .filter-field > input:focus, .filter-input:focus-within { border-color: #a9b6f8; box-shadow: 0 0 0 3px rgba(91, 108, 249, .1); }
.filter-actions { display: flex; gap: 7px; margin-left: auto; }

.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.metric-strip > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--line);
}
.metric-strip span { font-size: 11.5px; color: var(--muted); }
.metric-strip strong { font-size: 18px; letter-spacing: -.02em; }

.miss-card { border-color: #f3e2c6; background: linear-gradient(180deg, #fffdf9, #fff); }
.miss-list { list-style: none; margin: 0; padding: 8px 18px 14px; }
.miss-list li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed #f2e7d5; font-size: 12.5px; }
.miss-list li:last-child { border-bottom: 0; }
.miss-rank { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: none; border-radius: 7px; font-family: var(--mono); font-size: 11px; color: #9a5706; background: var(--amber-soft); }
.miss-question { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.miss-list small { flex: none; font-size: 11px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); }
.pager-info { font-size: 11.5px; color: var(--muted); }
.pager-links { display: flex; align-items: center; gap: 4px; }
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--ink-2);
    border: 1px solid transparent;
}
.pager-btn:hover { background: #f5f7fc; border-color: var(--line); }
.pager-btn.is-active { color: #fff; background: var(--brand); border-color: var(--brand); }
.pager-btn.is-disabled { color: #c4ccda; pointer-events: none; }

/* ---------- 联调测试 ---------- */
.test-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.test-side .card { margin-bottom: 0; }
.test-side .form-body { display: flex; flex-direction: column; gap: 14px; }
.test-meta { display: flex; flex-direction: column; gap: 0; border-radius: 11px; background: #f8fafd; border: 1px solid var(--line); padding: 4px 12px; }
.test-meta > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 11.5px; }
.test-meta > div:last-child { border-bottom: 0; }
.test-meta span { color: var(--muted); }
.test-meta strong { font-size: 11.5px; font-weight: 550; text-align: right; }
.suggest-block { display: flex; flex-direction: column; gap: 7px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 11.5px;
    color: #4c5bd4;
    background: var(--brand-soft);
    border: 1px solid #dde3ff;
    cursor: pointer;
    transition: background .15s ease;
}
.chip:hover { background: #e2e8ff; }

.tester-card { display: flex; flex-direction: column; min-height: 560px; overflow: hidden; }
.tester-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.tester-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.tester-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #6d8bff, #8b5cf6); }
.tester-id strong { display: block; font-size: 14px; }
.tester-id small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.tester-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
    max-height: 540px;
    overflow-y: auto;
    background:
        radial-gradient(600px 300px at 100% 0%, #f5f3ff 0%, transparent 60%),
        radial-gradient(500px 280px at 0% 100%, #f2f6ff 0%, transparent 55%),
        #fbfcff;
}
.msg { display: flex; gap: 9px; max-width: 88%; }
.msg-user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: none;
    margin-top: 2px;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, #6d8bff, #8b5cf6);
}
.msg-user .msg-avatar { background: #e8ecf7; color: #64748b; }
.msg-content { min-width: 0; }
.msg-bubble {
    padding: 11px 14px;
    border-radius: 13px 13px 13px 4px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 13px;
    line-height: 1.68;
    color: var(--ink-2);
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: 0 4px 14px -10px rgba(15, 23, 42, .25);
}
.msg-user .msg-bubble {
    border-radius: 13px 13px 4px 13px;
    color: #fff;
    background: linear-gradient(120deg, #5b6cf9, #7c5cff);
    border-color: transparent;
}
.msg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.msg-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-loading .msg-bubble { display: inline-flex; align-items: center; gap: 4px; }
.typing-dot { width: 5px; height: 5px; border-radius: 50%; background: #a3aec3; animation: typing 1.1s infinite ease-in-out; }
.typing-dot:nth-child(2) { animation-delay: .16s; }
.typing-dot:nth-child(3) { animation-delay: .32s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.tester-composer { display: flex; align-items: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fff; }
.tester-composer textarea {
    flex: 1;
    min-height: 42px;
    max-height: 132px;
    padding: 11px 13px;
    border-radius: 11px;
    border: 1px solid var(--line-strong);
    outline: none;
    resize: none;
    line-height: 1.45;
    background: #fbfcff;
}
.tester-composer textarea:focus { border-color: #a9b6f8; box-shadow: 0 0 0 3px rgba(91, 108, 249, .1); background: #fff; }

/* ---------- 登录 ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 32px 20px; background: #0b1120; overflow-x: hidden; }
.auth-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(20px); opacity: .55; }
.blob-1 { width: 560px; height: 560px; left: -140px; top: -160px; background: radial-gradient(circle, rgba(91, 108, 249, .5), transparent 65%); }
.blob-2 { width: 620px; height: 620px; right: -180px; bottom: -220px; background: radial-gradient(circle, rgba(139, 92, 246, .4), transparent 65%); }
.blob-3 { width: 420px; height: 420px; right: 24%; top: -180px; background: radial-gradient(circle, rgba(34, 211, 238, .18), transparent 65%); }
.auth-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    width: min(1020px, 100%);
    min-height: 600px;
    border-radius: 26px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 40px 90px -30px rgba(2, 6, 23, .75), 0 0 0 1px rgba(255, 255, 255, .08);
}
.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 34px 38px 30px;
    color: #e8edff;
    background:
        radial-gradient(600px 320px at 0% 0%, rgba(109, 139, 255, .34), transparent 65%),
        radial-gradient(520px 380px at 100% 100%, rgba(139, 92, 246, .30), transparent 65%),
        linear-gradient(155deg, #101a33 0%, #0c1326 100%);
    overflow: hidden;
}
.auth-visual::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: 70px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 0 0 40px rgba(255, 255, 255, .025), 0 0 0 88px rgba(255, 255, 255, .018);
}
.auth-brand { display: flex; align-items: center; gap: 11px; }
.auth-brand .brand-text strong { color: #fff; }
.auth-visual-body { position: relative; z-index: 1; margin: auto 0; padding: 34px 0; }
.auth-eyebrow { margin: 0 0 14px; font-size: 10px; letter-spacing: .22em; color: #7f92c8; }
.auth-visual h1 { margin: 0; font-size: 34px; line-height: 1.32; letter-spacing: -.02em; font-weight: 700; color: #fff; }
.auth-lead { margin: 16px 0 0; font-size: 13px; line-height: 1.85; color: #93a2c8; max-width: 360px; }
.auth-points { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.auth-points li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #b9c5e6; }
.auth-points span { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); color: #9fb2ff; }
.auth-visual-foot { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.auth-visual-foot div { display: flex; flex-direction: column; gap: 3px; }
.auth-visual-foot strong { font-family: var(--mono); font-size: 13px; color: #c7d2ff; letter-spacing: .08em; }
.auth-visual-foot span { font-size: 10.5px; color: #6f7fa6; }

.auth-form-panel { display: flex; flex-direction: column; justify-content: center; padding: 46px 46px 38px; background: #fff; }
.auth-form-head { margin-bottom: 24px; }
.auth-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; margin-bottom: 14px; border-radius: 7px; font-size: 10.5px; font-weight: 550; color: #4c5bd4; background: var(--brand-soft); border: 1px solid #dde3ff; }
.auth-form-head h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.auth-form-head p { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.auth-alert { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; color: #a0271f; background: var(--red-soft); border: 1px solid #f6cccc; line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 12px;
    border-radius: 11px;
    border: 1px solid var(--line-strong);
    background: #fbfcff;
    color: #98a4ba;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input-wrap:focus-within { border-color: #a9b6f8; background: #fff; box-shadow: 0 0 0 3px rgba(91, 108, 249, .12); }
.input-wrap input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; }
/* 焦点样式由 .input-wrap:focus-within 统一呈现，抑制内部输入框自身的焦点环，避免双层描边重叠 */
.input-wrap input:focus,
.input-wrap input:focus-visible { border-color: transparent; box-shadow: none; outline: none; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row .input-wrap { flex: 1; min-width: 0; }
.captcha-img {
    flex: none;
    width: 108px;
    height: 44px;
    border-radius: 11px;
    border: 1px solid var(--line-strong);
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease;
}
.captcha-img:hover { border-color: #a9b6f8; }
.pw-toggle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #98a4ba; cursor: pointer; }
.pw-toggle:hover { color: var(--brand); background: var(--brand-soft); }
.auth-tip { display: flex; align-items: center; gap: 6px; margin: 18px 0 0; font-size: 11.5px; color: #8a95ad; }
.auth-copy { margin: 26px 0 0; font-size: 10.5px; color: #b3bccd; letter-spacing: .02em; }

/* ---------- Flash ---------- */
.flash-stack { position: fixed; right: 22px; top: 76px; z-index: 80; display: flex; flex-direction: column; gap: 9px; width: min(360px, calc(100vw - 32px)); }
.flash {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 13px;
    border-radius: 12px;
    font-size: 12.5px;
    line-height: 1.55;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px -18px rgba(15, 23, 42, .35);
    animation: flash-in .25s ease;
}
.flash span { flex: 1; }
.flash-success { border-color: #c9efdf; background: #f7fefb; color: #08634a; }
.flash-error { border-color: #f6cccc; background: #fffafa; color: #a0271f; }
.flash-close { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; opacity: .6; cursor: pointer; }
.flash-close:hover { opacity: 1; background: rgba(0, 0, 0, .05); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 移动端卡片列表 ---------- */
.mobile-only { display: none; }
.mobile-list {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 18px;
}
.mobile-card {
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
}
.mobile-card[hidden] { display: none; }
.mobile-card-head { display: flex; align-items: center; gap: 10px; }
.mobile-card-head .activity-avatar { width: 36px; height: 36px; font-size: 14px; border-radius: 11px; }
.mobile-card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mobile-card-title strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-card-title small { font-size: 11px; }
.mobile-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}
.mobile-meta > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mobile-meta span { font-size: 10.5px; color: var(--muted); }
.mobile-meta strong { font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.mobile-actions form { display: inline-flex; margin: 0; }
.mobile-actions .mini-menu { margin-left: auto; }
.mobile-log-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mobile-log-time { font-size: 11px; color: var(--muted); }
.mobile-log-q { margin: 10px 0 0; font-size: 13.5px; font-weight: 600; line-height: 1.55; word-break: break-word; }
.mobile-log-a {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.mobile-log-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-layout { grid-template-columns: minmax(0, 1fr) 286px; }
    .content { padding: 24px 24px 56px; }
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-104%); transition: transform .24s ease; box-shadow: 20px 0 60px -30px rgba(2, 6, 23, .6); }
    .sidebar.is-open { transform: none; }
    .sidebar-mask { position: fixed; inset: 0; z-index: 35; background: rgba(9, 14, 26, .45); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
    .sidebar-mask.is-open { opacity: 1; visibility: visible; }
    .main { margin-left: 0; }
    .menu-btn { display: inline-flex; }
    .topbar { padding: 0 18px; }
    .grid-main { grid-template-columns: minmax(0, 1fr); }
    .form-layout { grid-template-columns: minmax(0, 1fr); }
    .form-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .form-side .card { margin-bottom: 0; }
    .test-layout { grid-template-columns: minmax(0, 1fr); }
    .test-side .card { margin-bottom: 0; }
    .auth-card { grid-template-columns: 1fr; width: min(520px, 100%); min-height: 0; }
    .auth-visual { display: none; }
}

@media (max-width: 960px) {
    .desktop-only { display: none; }
    .mobile-only { display: flex; }
    .mobile-list { display: flex; }
}

@media (max-width: 768px) {
    .content { padding: 20px 16px 48px; }
    .topbar-date { display: none; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .page-head h1 { font-size: 22px; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .stat-grid { gap: 12px; }
    .stat-card { padding: 15px 16px 14px; }
    .stat-value { font-size: 24px; }
    .grid-two { grid-template-columns: minmax(0, 1fr); }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .span-2 { grid-column: span 1; }
    .form-side { grid-template-columns: minmax(0, 1fr); }
    .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-form { gap: 10px; }
    .filter-field.grow { min-width: 100%; }
    .filter-actions { width: 100%; margin-left: 0; }
    .filter-actions .btn { flex: 1; }
    .pager { flex-direction: column; align-items: flex-start; }
    .form-actions { flex-direction: column; align-items: stretch; }
    .form-actions > div { justify-content: flex-end; }
    .tester-body { max-height: 60vh; padding: 16px; }
    .msg { max-width: 100%; }
    .tester-composer { padding: 12px; }
    .tester-composer .btn { padding: 0 12px; }
    .auth-form-panel { padding: 34px 26px 28px; }
    .auth-form-head h2 { font-size: 22px; }
    .faq-list { padding: 14px 14px 4px; gap: 10px; }
    .faq-row { flex-wrap: wrap; padding: 12px; }
    .faq-fields { flex-basis: calc(100% - 46px); }
    .faq-side { flex-direction: row; align-items: center; margin-left: 0; width: 100%; justify-content: flex-end; padding-top: 8px; border-top: 1px dashed var(--line); }
    .tips-grid { grid-template-columns: minmax(0, 1fr); }
    .tip { border-right: 0; border-bottom: 1px dashed var(--line); }
    .tip:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-card { padding: 14px 13px 13px; }
    .stat-icon { width: 32px; height: 32px; border-radius: 9px; }
    .stat-label { margin-top: 10px; font-size: 11.5px; }
    .stat-value { font-size: 22px; }
    .stat-meta { font-size: 10.5px; }
    .page-actions { flex-wrap: wrap; }
    .page-actions .btn { flex: 1 1 calc(50% - 5px); }
    .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .metric-strip > div:last-child:nth-child(odd) { grid-column: span 2; }
    .metric-strip > div { flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 13px; }
    .metric-strip strong { font-size: 17px; }
    .topbar { height: 56px; }
    .topbar-crumb span, .topbar-crumb .icon { display: none; }
    .card-head { padding: 15px 16px; flex-wrap: wrap; }
    .card-head .search-input { width: 100%; }
    .search-input input { width: 100%; }
    .table th:first-child, .table td:first-child { padding-left: 16px; }
    .table th:last-child, .table td:last-child { padding-right: 16px; }
    .mobile-list { padding: 12px 12px 14px; }
    .filter-field { flex: 1 1 calc(50% - 5px); min-width: 0; }
    .filter-field select, .filter-field > input { width: 100%; min-width: 0; }
    .filter-field.grow { flex-basis: 100%; }
    .miss-list li { flex-wrap: wrap; }
    .miss-question { flex-basis: 100%; white-space: normal; }
    .auth-body { padding: 18px 12px; }
    .auth-card { border-radius: 20px; }
    .auth-form-panel { padding: 28px 20px 24px; }
    .flash-stack { right: 16px; top: 68px; }
    .trend-chart { gap: 6px; padding: 18px 16px 14px; }
    .trend-week { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   图片库与活动封面
   ============================================================ */
.activity-avatar--img { padding: 0; overflow: hidden; background: var(--surface-2); }
.activity-avatar--img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cover-uploader { display: flex; flex-direction: column; gap: 12px; }
.cover-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 7;
    max-height: 300px;
    border-radius: 16px;
    border: 1.5px dashed var(--line-strong);
    background: linear-gradient(140deg, #f8faff, #f4f6fd);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.cover-frame:hover { border-color: #b9c6f5; background: linear-gradient(140deg, #f5f8ff, #eef2fd); }
.cover-frame:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91, 108, 249, .12); }
.cover-frame.is-dragover { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 4px rgba(91, 108, 249, .10); }
.cover-frame.has-image { border-style: solid; border-color: var(--line); background: #0d1526; }
.cover-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; text-align: center; color: var(--muted); }
.cover-empty strong { font-size: 13.5px; color: var(--ink-2); }
.cover-empty span { font-size: 12px; }
.cover-empty-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; margin-bottom: 4px;
    border-radius: 13px; background: #fff; color: var(--brand);
    border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cover-frame.is-uploading img, .cover-frame.is-uploading .cover-empty { opacity: .35; }
.cover-loading {
    position: absolute; inset: 0; z-index: 2;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(255, 255, 255, .72); color: var(--ink-2); font-size: 13px;
    backdrop-filter: blur(2px);
}
.cover-spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(91, 108, 249, .22); border-top-color: var(--brand);
    animation: cover-spin .7s linear infinite;
}
@keyframes cover-spin { to { transform: rotate(360deg); } }
.cover-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cover-tip { font-size: 11.5px; color: var(--muted); }

.image-drop {
    margin: 18px;
    padding: 22px;
    display: flex; align-items: center; gap: 16px;
    border-radius: 16px; border: 1.5px dashed var(--line-strong);
    background: linear-gradient(140deg, #f8faff, #f4f6fd);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}
.image-drop:hover, .image-drop.is-dragover { border-color: var(--brand); background: var(--brand-soft); }
.image-drop-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; flex: none; border-radius: 13px;
    background: #fff; color: var(--brand); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.image-drop-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.image-drop-text strong { font-size: 13.5px; color: var(--ink); }
.image-drop-text span { font-size: 12px; color: var(--muted); }
.image-drop-status { font-size: 12px; color: var(--green); }
.image-drop-status.is-error { color: var(--red); }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 18px; }
.image-card {
    border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.image-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 16px 34px -24px rgba(15, 23, 42, .35); }
.image-thumb { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-used {
    position: absolute; top: 8px; right: 8px;
    padding: 3px 8px; border-radius: 7px;
    background: rgba(15, 23, 42, .72); color: #fff; font-size: 10.5px; letter-spacing: .04em;
    backdrop-filter: blur(4px);
}
.image-meta { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 3px; }
.image-path { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-sub { font-size: 11px; color: var(--muted); }
.image-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px 10px; }
.image-actions .btn { padding: 0 8px; height: 26px; font-size: 11.5px; }
.image-delete { color: var(--red); }
.image-delete:hover { background: var(--red-soft); }

@media (max-width: 768px) {
    .image-drop { flex-wrap: wrap; padding: 16px; margin: 14px; }
    .image-drop-text { flex-basis: calc(100% - 62px); }
    .image-drop .btn { width: 100%; justify-content: center; }
    .image-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 12px; }
    .cover-frame { aspect-ratio: 16 / 9; }
}

/* ---------- V1.5 单窗口 / 标签 / 资料管理 ---------- */
.param-grid {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 10px;
}
.doc-summary {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px 16px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 12px;
    background: var(--surface-soft, #f8fafc);
}
.doc-summary > div { display: flex; flex-direction: column; gap: 2px; }
.doc-summary strong { font-size: 18px; }
.doc-summary span, .doc-summary .muted { font-size: 12.5px; color: var(--muted, #64748b); }
.doc-layout {
    display: grid;
    grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.15fr);
    gap: 18px;
    align-items: start;
}
.filter-grid {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}
.filter-grid .field { min-width: 260px; }
.upload-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 168px;
    padding: 22px;
    border: 1.5px dashed var(--line-strong, #cbd5e1);
    border-radius: 14px;
    background: var(--surface-soft, #f8fafc);
    cursor: pointer;
    text-align: center;
    transition: border-color .18s ease, background .18s ease;
}
.upload-drop:hover, .upload-drop.is-drag { border-color: var(--primary, #6366f1); background: #eef2ff; }
.upload-drop input[type="file"] { display: none; }
.upload-drop .upload-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 50%;
    background: #eef2ff; color: var(--primary, #6366f1);
}
.upload-drop strong { font-size: 14px; }
.upload-drop small { color: var(--muted, #64748b); font-size: 12.5px; }
.form-actions-inline {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin-top: 16px;
}
.msg-sources {
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--muted, #64748b);
}
.msg-sources summary { cursor: pointer; color: var(--primary, #6366f1); }
.msg-source-item {
    margin-top: 8px; padding: 8px 10px;
    border-left: 2px solid var(--line-strong, #cbd5e1);
    background: var(--surface-soft, #f8fafc);
    border-radius: 0 8px 8px 0;
}
.msg-source-item strong { display: block; color: var(--text, #0f172a); margin-bottom: 3px; }
.msg-source-item p { margin: 0; line-height: 1.55; }
@media (max-width: 1080px) {
    .doc-layout { grid-template-columns: 1fr; }
    .param-grid { grid-template-columns: 1fr; }
}
