:root {
    --bg: #f5f6f7;
    --card: #ffffff;
    --line: #e6e8eb;
    --text: #1f2329;
    --muted: #6b7280;
    --primary: #009688;
    --primary-dark: #00897b;
    --ok: #16a34a;
    --ok-bg: #ecfdf3;
    --warn: #b45309;
    --warn-bg: #fffbeb;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --info: #0369a1;
    --info-bg: #f0f9ff;
    --sidebar: #1f2430;
    --sidebar-2: #272e3b;
    --radius: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }

body {
    background: var(--bg);
    color: var(--text);
    font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    background: #f3f4f6;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1px 5px;
    word-break: break-all;
}

pre.code {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px 18px;
    border-radius: var(--radius);
    overflow: auto;
    font-size: 12px;
    line-height: 1.7;
    border: 1px solid #1e293b;
}

pre.code code {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
}

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

.sidebar {
    width: 216px;
    flex: 0 0 216px;
    background: var(--sidebar);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 14px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #0f766e;
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex: 0 0 auto;
}

.brand > span:last-child { min-width: 0; }
.brand strong { display: block; font-size: 15px; color: #f9fafb; letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { display: block; font-size: 11px; color: #9ca3af; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav {
    padding: 4px 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 3px; }
.nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .3); }

.nav-group { display: block; }
.nav-group + .nav-group { margin-top: 6px; }
.nav-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 12px 4px;
    color: #8b95a7;
    font-size: 11px;
    letter-spacing: .8px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.nav-group-title::-webkit-details-marker { display: none; }
.nav-group-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.nav-group-icon { width: 14px; height: 14px; flex: 0 0 auto; color: #8b95a7; }
.nav-group[open] .nav-group-icon { color: #6ee7d8; }
.nav-group-title::after {
    content: "›";
    font-size: 15px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform .15s;
}
.nav-group[open] > .nav-group-title::after { transform: rotate(90deg); }
.nav-group-title:hover { color: #cbd5e1; }
.nav-group-body { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }

.nav-item {
    color: #cbd5e1;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.35;
    transition: background .15s, color .15s;
}

.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(0, 150, 136, .22); color: #fff; font-weight: 600; }

.sidebar-foot {
    margin-top: auto;
    padding: 12px 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 0 0 auto;
    background: var(--sidebar);
}

.sidebar-foot .me { font-size: 12.5px; color: #9ca3af; overflow: hidden; text-overflow: ellipsis; }
.link-btn {
    background: none;
    border: 0;
    color: #cbd5e1;
    font-size: 12.5px;
    cursor: pointer;
    padding: 0;
}
.link-btn:hover { color: #fff; }

.main {
    flex: 1;
    min-width: 0;
    padding: 26px 30px 60px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.topbar h1 { font-size: 20px; margin: 0; letter-spacing: .2px; }
.topbar-sub { color: var(--muted); font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

/* ---------- 卡片 ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 18px;
}

.card.narrow { max-width: 460px; }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.card-head h2 { font-size: 15px; margin: 0; }

/* ---------- 统计 ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px 16px;
}

.stat span { display: block; color: var(--muted); font-size: 12px; }
.stat strong { display: block; font-size: 24px; line-height: 1.4; letter-spacing: .3px; }
.stat small { color: var(--muted); font-size: 11.5px; }
.text-ok { color: var(--ok); font-size: 20px !important; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    text-align: left;
    color: #5c6370;
    font-weight: 600;
    font-size: 12.5px;
    padding: 9px 10px;
    background: #f7f8fa;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table td {
    padding: 11px 10px;
    border-bottom: 1px solid #f1f3f9;
    vertical-align: top;
}

.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fafbff; }

.content-cell { max-width: 420px; word-break: break-word; }
.nowrap { white-space: nowrap; }
.sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
.error-text { color: var(--danger); }

/* ---------- 徽标 ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    border: 1px solid transparent;
    white-space: nowrap;
    background: #f3f4f6;
    color: #4b5563;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: #bae6fd; }
.badge.muted { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.4;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
    font-family: inherit;
}
.btn:hover { background: #f8fafc; border-color: #d5dbe8; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.danger { color: var(--danger); border-color: #fecaca; background: #fff; }
.btn.danger:hover { background: var(--danger-bg); }
.btn.small { padding: 5px 11px; font-size: 12.5px; }
.btn.tiny { padding: 3px 9px; font-size: 12px; border-radius: 6px; }
.btn.block { width: 100%; }

.row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
form.inline { display: inline; margin: 0; }

/* ---------- 表单 ---------- */
.stack { display: flex; flex-direction: column; gap: 13px; }
.stack.mt { margin-top: 16px; }

.form-grid { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12.5px; color: #374151; font-weight: 600; }
.field small { color: var(--muted); font-size: 11.5px; }

input[type="text"], input[type="password"], input[type="number"], input[type="email"],
input[type="url"], input[type="search"], input[type="tel"], input[type="date"],
input[type="file"], select, textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

textarea { resize: vertical; line-height: 1.65; }

input:focus, select:focus, textarea:focus {
    border-color: #7cd3c8;
    box-shadow: 0 0 0 3px rgba(0, 150, 136, .12);
}

.checks { flex-direction: row; gap: 18px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #374151; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--primary); }
.check.small { font-size: 12px; }
.qa-recall-delay { flex: 0 0 auto; white-space: nowrap; }
.check .qa-recall-seconds {
    flex: 0 0 76px;
    width: 76px;
    height: 30px;
    padding: 4px 8px;
    font-size: 13px;
}

.form-actions { display: flex; gap: 10px; padding-top: 2px; }

.hint { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; line-height: 1.7; }
.muted { color: var(--muted); }

/* ---------- 提示 ---------- */
.alert {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    background: #f8fafc;
    transition: opacity .4s;
}
.alert.ok { background: var(--ok-bg); color: #166534; border-color: #bbf7d0; }
.alert.error { background: var(--danger-bg); color: #991b1b; border-color: #fecaca; }
.alert.warning { background: var(--warn-bg); color: #92400e; border-color: #fde68a; }
.alert.info { background: var(--info-bg); color: #075985; border-color: #bae6fd; }
.alert.fade { opacity: 0; }

/* 全站 Toast */
.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px 11px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 3px solid #94a3b8;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
    pointer-events: auto;
    animation: toast-in .18s ease-out;
}
.toast-success { border-left-color: var(--ok); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: #d97706; }
.toast-info { border-left-color: #0284c7; }
.toast-mark { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; margin-top: 6px; flex: 0 0 auto; }
.toast-success .toast-mark { background: var(--ok); }
.toast-error .toast-mark { background: var(--danger); }
.toast-warning .toast-mark { background: #d97706; }
.toast-info .toast-mark { background: #0284c7; }
.toast-msg { flex: 1; color: #374151; font-size: 12.5px; line-height: 1.6; word-break: break-word; }
.toast-close { border: 0; background: none; color: #98a2b3; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.toast-close:hover { color: #475467; }
.toast.hide { opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
    .toast-stack { top: 12px; right: 12px; left: 12px; width: auto; }
}

.empty { text-align: center; padding: 34px 12px; color: var(--muted); }
.empty p { margin: 0 0 14px; }

.copy-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.copy-line code { max-width: 100%; }
.copy-line.compact { gap: 6px; margin-top: 4px; }

/* ---------- 登录 ---------- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6fb;
    padding: 30px 16px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(30, 41, 59, .08);
    padding: 30px 28px;
}

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand h1 { font-size: 18px; margin: 0; }
.auth-brand p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.auth-tip { color: var(--muted); font-size: 12px; margin: 18px 0 0; line-height: 1.7; }
.auth-switch { text-align: center; color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.invite-buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafbfc;
}
.invite-buy-copy { min-width: 0; }
.invite-buy-copy strong { display: block; font-size: 13px; margin-bottom: 3px; }
.invite-buy-copy span { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.invite-buy .btn { flex: 0 0 auto; }

/* ---------- 安装页 ---------- */
.setup-body { background: var(--bg); padding: 36px 16px 70px; }
.setup-wrap { max-width: 880px; margin: 0 auto; }
.setup-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.setup-head h1 { font-size: 20px; margin: 0; }
.setup-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.tips { margin: 0; padding-left: 18px; color: #374151; font-size: 13px; line-height: 1.9; }
.tips li { margin: 2px 0; }

/* ---------- 会话 ---------- */
.page-actions { margin-bottom: 14px; }

.chat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.chat-name { font-size: 18px; margin: 0 0 8px; word-break: break-all; }
.chat-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; }
.chat-meta form { margin: 0; }

.chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}

.messages-card { display: flex; flex-direction: column; padding-bottom: 16px; }

.messages {
    max-height: 560px;
    overflow-y: auto;
    padding: 4px 2px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 12px;
    max-width: 92%;
    background: #fbfcff;
}
.msg.out { align-self: flex-end; background: #e8f5f3; border-color: #cbe8e2; }
.msg.in { align-self: flex-start; }

.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; }
.msg-head form { margin: 0; }
.msg-body { margin-top: 6px; font-size: 13.5px; word-break: break-word; white-space: pre-wrap; }
.msg-media { margin-top: 6px; }
.msg-media img {
    display: block;
    max-width: 220px;
    max-height: 220px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}
.msg-status { margin-top: 5px; font-size: 11px; color: var(--muted); }

.send-form { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.send-form textarea { margin-bottom: 10px; }
.send-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.side-col { display: flex; flex-direction: column; }

.join-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #fbfcff;
}
.join-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.join-msg { margin: 6px 0; font-size: 12.5px; color: #374151; word-break: break-word; }
.decline-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.decline-form input[type="text"] { width: 130px; padding: 4px 8px; font-size: 12px; }

/* ---------- 群管模块 ---------- */
.module-botbar { justify-content: flex-end; margin-bottom: 12px; }
.module-botbar select {
    width: auto;
    max-width: 240px;
    padding: 5px 9px;
    font-size: 12.5px;
}
.guard-enable { margin: 4px 0 10px; }
.guard-section { margin: 12px 0 4px; }
.guard-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #0f9d8a;
    font-weight: 700;
    font-size: 13px;
    padding: 6px 0 8px;
    border-bottom: 1px solid var(--line);
}
.guard-tools { display: flex; gap: 6px; font-weight: 400; }
.guard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px 18px;
    padding: 12px 2px 4px;
}
.guard-item.disabled { opacity: .45; cursor: not-allowed; }
.guard-fields { margin-top: 16px; }

/* ---------- 问答系统 ---------- */
.page-keywords .topbar h1 { font-size: 18px; font-weight: 700; }
.page-keywords .topbar-sub { display: none; }

.qa-tabline {
    height: 2px;
    border-bottom: 1px solid var(--line);
    margin: -14px 0 16px;
}
.qa-tabline span {
    display: block;
    width: 82px;
    height: 2px;
    background: #009688;
    margin-bottom: -1px;
}

.qa-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.qa-filter-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.qa-filter-label { font-size: 13px; color: #424b5a; white-space: nowrap; }
.qa-filter-form select {
    width: auto;
    min-width: 150px;
    max-width: 200px;
    padding: 6px 10px;
    font-size: 13px;
}
.qa-filter-q {
    width: 180px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
}
.qa-pager-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-right: auto; }
.qa-pager-side form { margin: 0; }
.qa-pager-side .btn[hidden] { display: none; }
.qa-clear { color: #e74c3c; border-color: #f6c6c0; }

.qa-card { padding: 0; overflow: hidden; border-radius: 8px; box-shadow: none; }

.btn.blue { background: #009688; border-color: #009688; color: #fff; }
.btn.blue:hover { background: #00897b; border-color: #00897b; }
.btn.green { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.green:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.red { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.btn.red:hover { background: #d63d2e; border-color: #d63d2e; }

.qa-switch-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.qa-switch-label { font-size: 12.5px; color: #374151; }
.qa-switch {
    width: 44px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}
.qa-switch span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .2);
    transition: transform .2s;
}
.qa-switch.on { background: #009688; }
.qa-switch.on span { transform: translateX(20px); }
.qa-row-toggle { display: inline-flex; margin: 0; }
.qa-row-toggle .qa-switch { width: 34px; height: 18px; }
.qa-row-toggle .qa-switch span { width: 14px; height: 14px; top: 2px; left: 2px; }
.qa-row-toggle .qa-switch.on span { transform: translateX(16px); }

.qa-table { width: 100%; min-width: 980px; table-layout: fixed; }
.qa-table th {
    color: #8b93a7;
    font-weight: 600;
    font-size: 12.5px;
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.qa-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #f0f2f7;
    vertical-align: middle;
    color: #424b5a;
    white-space: nowrap;
}
.qa-table .qa-col-check { width: 36px; text-align: center; }
.qa-table .qa-col-check input { width: 15px; height: 15px; accent-color: #009688; cursor: pointer; }
.qa-table .qa-col-id { width: 64px; color: #606266; }
.qa-table .qa-col-keyword { width: 112px; }
.qa-table .qa-col-type { width: 70px; }
.qa-table .qa-col-match { width: 66px; }
.qa-table .qa-col-scene { width: 64px; }
.qa-table .qa-col-groups { width: 100px; }
.qa-table .qa-col-offgroups { width: 84px; }
.qa-table .qa-col-priority { width: 68px; }
.qa-table .qa-col-status { width: 62px; }
.qa-table .qa-col-op { width: 92px; }
.qa-table .qa-question,
.qa-table .qa-content,
.qa-table .qa-group { overflow: hidden; text-overflow: ellipsis; }
.qa-table .qa-question { font-weight: 600; color: #1f2937; }
.qa-table .qa-content { color: #606266; }

.qa-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.8;
    background: #f5f6f8;
    color: #606266;
    white-space: nowrap;
}
.qa-tag.purple { background: #eef0ff; color: #6b5cff; }

.qa-match {
    display: inline-flex;
    align-items: center;
    padding: 1px 9px;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.8;
    background: #e6f4f1;
    color: #009688;
    white-space: nowrap;
}

.qa-row-actions { display: flex; align-items: center; gap: 14px; }
.qa-row-actions form { margin: 0; }
.qa-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 13px;
    color: #009688;
    cursor: pointer;
    text-decoration: none;
}
.qa-link:hover { text-decoration: underline; }
.qa-link.danger { color: #f56c6c; }

.qa-empty { text-align: center !important; padding: 42px 12px !important; color: var(--muted); }
.qa-item-off { opacity: .55; }

.qa-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    padding: 14px 18px;
    color: #8b93a7;
    font-size: 12.5px;
}
.qa-pager form { margin: 0 0 0 6px; }
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: #c0c4cc;
    font-size: 16px;
    text-decoration: none;
}
.pager-btn:hover { color: #009688; text-decoration: none; }
.pager-btn.disabled { color: #dcdfe6; cursor: not-allowed; }
.pager-btn.disabled:hover { color: #dcdfe6; }
.pager-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #009688;
    border-radius: 4px;
    background: #fff;
    color: #009688;
}
.pager-size select {
    width: auto;
    padding: 5px 10px;
    font-size: 12.5px;
}

.modal-mask {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.modal-card {
    width: min(760px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .3);
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-close {
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    text-decoration: none;
    padding: 0 4px;
}
.modal-close:hover { color: #475569; text-decoration: none; }

.qa-form-row { display: flex; border-bottom: 1px solid var(--line); }
.qa-form-row > label {
    flex: 0 0 118px;
    padding: 12px 14px;
    background: #fafafa;
    border-right: 1px solid var(--line);
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
}
.qa-form-row > input,
.qa-form-row > select,
.qa-form-row > textarea {
    flex: 1;
    min-width: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 11px 14px;
    background: #fff;
    font-size: 13px;
}
.qa-form-row > textarea { min-height: 190px; resize: vertical; }
.qa-form-row > input:focus,
.qa-form-row > select:focus,
.qa-form-row > textarea:focus {
    box-shadow: inset 0 0 0 2px rgba(0, 150, 136, .18);
}
.qa-enable { margin: 12px 16px; font-size: 12.5px; color: #374151; }
.qa-modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px;
}
.qa-import-modal { width: min(480px, 100%); }
.qa-import-body { padding: 20px 22px 0; }
.qa-import-pick { display: block; }
.qa-import-pick input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fafbff;
    font-size: 12.5px;
}
.qa-import-body .hint { margin: 12px 0 0; }
.qa-import-body .qa-modal-actions { padding: 18px 0 22px; }

.qa-cool-modal { width: min(460px, 100%); }
.qa-cool-body { padding: 22px 22px 0; }
.qa-cool-input { width: 100%; font-size: 14px; }
.qa-opt-row { display: block; margin-bottom: 16px; }
.qa-opt-row > span { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.qa-opt-row > small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.qa-opt-check { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.qa-cool-body .qa-modal-actions { padding: 18px 0 22px; }

@media (max-width: 640px) {
    .qa-form-row { flex-direction: column; }
    .qa-form-row > label {
        flex: none;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 8px 12px;
    }
    .qa-form-row > input, .qa-form-row > select, .qa-form-row > textarea { padding: 10px 12px; }
    .qa-pager { gap: 8px; }
}


@media (max-width: 1000px) {
    .chat-layout { grid-template-columns: 1fr; }
    .chat-meta { align-items: flex-start; }
}

.nav-toggle { display: none; }
.nav-mobile-foot { display: none; }

@media (max-width: 820px) {
    .shell { flex-direction: column; width: 100%; max-width: 100vw; }
    .sidebar {
        width: 100%;
        max-width: 100vw;
        flex: none;
        height: auto;
        position: sticky;
        top: 0;
        z-index: 50;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        overflow: visible;
    }
    .brand { padding: 2px 4px; flex: 0 1 auto; min-width: 0; max-width: calc(100vw - 110px); }
    .brand small { display: none; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        height: 32px;
        padding: 0 12px;
        border: 1px solid #3a4252;
        border-radius: 6px;
        background: var(--sidebar-2);
        color: #e5e7eb;
        font-size: 13px;
        font-family: inherit;
        cursor: pointer;
    }
    .nav { display: none; }
    .sidebar.open .nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        max-height: calc(100vh - 56px);
        overflow: auto;
        padding: 6px 10px 16px;
        background: var(--sidebar);
        border-top: 1px solid #343b49;
        box-shadow: 0 16px 30px rgba(0, 0, 0, .22);
    }
    .nav-group { display: block; }
    .nav-group-title { display: flex; padding: 10px 10px 4px; }
    .nav-group-body { padding-top: 2px; }
    .nav-item { display: block; white-space: nowrap; padding: 8px 10px; font-size: 13px; }
    .sidebar-foot { display: none; }
    .nav-mobile-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 8px;
        padding: 12px 10px 4px;
        border-top: 1px solid rgba(255, 255, 255, .08);
        color: #9ca3af;
        font-size: 12.5px;
    }
    .nav-mobile-foot form { margin: 0; }
    .table-wrap > .table { min-width: 680px; }
    .table-wrap > .table.table-fluid { min-width: 0; }
    .main { padding: 18px 14px calc(50px + env(safe-area-inset-bottom)); width: 100%; max-width: 100vw; overflow-x: hidden; }
    .grid-2 { grid-template-columns: 1fr; }
    .topbar { flex-wrap: wrap; gap: 4px; }
    .topbar h1 { font-size: 18px; }
    .topbar-sub { display: none; }
}

/* ---------------- 黑白名单 / 全局名单 ---------------- */
.crumb {
    padding: 2px 2px 12px;
    font-size: 13px;
    color: #8b93a7;
}
.crumb a { color: #8b93a7; }
.crumb a:hover { color: #009688; }

.list-card { padding: 0; overflow: hidden; }
.list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}
.list-head h2 { font-size: 15px; font-weight: 700; color: #333; margin: 0; }

.list-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.inline-form { display: inline-flex; margin: 0; }
.inline-form button { font-family: inherit; }

.btn-add,
.btn-clear,
.btn-export,
.list-search button,
.switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.btn-add { background: #2f9cf4; border-color: #2f9cf4; color: #fff; }
.btn-add:hover { background: #218be0; color: #fff; }
.btn-clear { background: #ff5b4f; border-color: #ff5b4f; color: #fff; }
.btn-clear:hover { background: #ef4a3e; }
.btn-export { background: #f5b400; border-color: #f5b400; color: #fff; }
.btn-export:hover { background: #e0a400; color: #fff; }

.list-search { display: inline-flex; align-items: center; gap: 0; }
.list-search input[type="text"] {
    width: 140px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-right: 0;
    border-radius: 3px 0 0 3px;
    font-size: 13px;
    outline: none;
}
.list-search input[type="text"]:focus { border-color: #2f9cf4; }
.list-search button {
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 0 3px 3px 0;
    color: #555;
}
.list-search button:hover { color: #2f9cf4; border-color: #2f9cf4; }

.list-toggles { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.list-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #555;
}
.list-opt select,
.list-opt input {
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0 8px;
    background: #fff;
    font-size: 12.5px;
}
.list-opt input[type="number"] { width: 74px; }
.switch-btn {
    gap: 8px;
    background: #c9ced6;
    border-color: #c9ced6;
    color: #fff;
    cursor: default;
}
.switch-btn.on { background: #2fbe5f; border-color: #2fbe5f; }
.switch-btn input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #fff;
    cursor: pointer;
}

.list-table th {
    background: #f7f8fa;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    padding: 11px 16px;
    border-bottom: 1px solid #eceef2;
}
.list-table td {
    padding: 11px 16px;
    font-size: 13.5px;
    color: #333;
}
.list-table tr:hover td { background: #fafbfd; }
.list-empty {
    text-align: center;
    color: #9aa3b2;
    padding: 42px 0 !important;
}

.list-actions { display: inline-flex; align-items: center; gap: 6px; }
.act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    min-width: 42px;
    padding: 0 8px;
    border: 0;
    border-radius: 2px;
    font-size: 12px;
    font-family: inherit;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}
.act:hover { color: #fff; opacity: .88; }
.act-edit { background: #2f9cf4; }
.act-del { background: #ff5b4f; }

.pager-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 18px;
    font-size: 13px;
    color: #666;
    border-top: 1px solid var(--line);
}
.pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 3px;
    color: #555;
    text-decoration: none;
}
.pg:hover { background: #f0f2f5; color: #333; }
.pg.on { background: #12a08a; color: #fff; }
.pg.on:hover { background: #0e8c78; color: #fff; }
.pg-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #999;
    text-decoration: none;
    font-size: 16px;
}
.pg-nav:hover { color: #12a08a; }
.pg-nav.disabled { color: #dcdfe6; pointer-events: none; }

.pager-jump { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 8px; }
.pager-jump input {
    width: 48px;
    height: 28px;
    padding: 0 6px;
    text-align: center;
    border: 1px solid #dcdfe6;
    border-radius: 3px;
    font-size: 13px;
}
.pager-jump button {
    height: 28px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 3px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
}
.pager-jump button:hover { color: #12a08a; border-color: #12a08a; }
.pager-count { margin-left: 8px; color: #888; }
.pager-size { margin: 0 0 0 auto; }
.pager-size select {
    height: 28px;
    padding: 0 8px;
    border: 1px solid #dcdfe6;
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
}

/* ================= 经典面板（刷屏检测 / 审核系统 / 广告检测） ================= */
body.page-spam,
body.page-join,
body.page-adfilter { background: var(--bg); }

body.page-spam .topbar,
body.page-join .topbar,
body.page-adfilter .topbar { display: none; }

body.page-spam .main,
body.page-join .main,
body.page-adfilter .main { padding: 16px 24px 60px; }

.panel-crumb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.panel-crumb .crumb { padding: 0; color: #999; font-size: 13px; }
.panel-crumb .module-botbar { margin: 0; }
.panel-crumb .module-botbar select { height: 28px; padding: 0 8px; font-size: 12.5px; }

.panel-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0;
    margin-bottom: 14px;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 13px 16px 10px;
}
.panel-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    letter-spacing: .2px;
}
.panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.panel-body { padding: 4px 16px 18px; }

.pbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 30px;
    padding: 0 14px;
    border: 1px solid #dcdfe6;
    border-radius: 2px;
    background: #f7f7f7;
    color: #555;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.pbtn:hover { background: #f0f0f0; text-decoration: none; }
.pbtn-green { background: #009688; border-color: #009688; color: #fff; }
.pbtn-green:hover { background: #00897b; border-color: #00897b; color: #fff; }
.pbtn-blue { background: #1e9fff; border-color: #1e9fff; color: #fff; }
.pbtn-blue:hover { background: #0d8fe8; border-color: #0d8fe8; color: #fff; }
.pbtn-red { background: #ff5722; border-color: #ff5722; color: #fff; }
.pbtn-red:hover { background: #e64a19; border-color: #e64a19; color: #fff; }

.pform { display: flex; flex-direction: column; gap: 8px; }
.prow { display: flex; align-items: stretch; }
.prow.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.prow.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.prow > .pgroup { flex: 1 1 auto; }
.pgroup { display: flex; align-items: stretch; min-width: 0; }
.plabel {
    flex: 0 0 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    min-height: 32px;
    background: #fafafa;
    border: 1px solid #e6e6e6;
    border-right: 0;
    color: #333;
    font-size: 13px;
    text-align: center;
    word-break: break-all;
}
.pvalue {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    border: 1px solid #e6e6e6;
    background: #fff;
}
.pvalue > input,
.pvalue > select,
.pvalue > textarea {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 30px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #333;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}
.pvalue > select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23c0c4cc'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 10px 6px;
    cursor: pointer;
}
.pvalue > textarea {
    height: auto;
    min-height: 88px;
    padding: 9px 14px;
    line-height: 1.65;
    resize: vertical;
    align-self: stretch;
}
.pvalue > input::placeholder,
.pvalue > textarea::placeholder { color: #b9b9b9; }
.pvalue > input:disabled,
.pvalue > select:disabled,
.pvalue > textarea:disabled {
    color: #b9b9b9;
    -webkit-text-fill-color: #b9b9b9;
    cursor: not-allowed;
    background: #fff;
}
.pvalue > select:disabled {
    opacity: 1;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23c0c4cc'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 10px 6px;
}
.pnote { padding: 0 14px; color: #b9b9b9; font-size: 12.5px; }

.pchecks {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
    width: 100%;
    padding: 6px 14px;
}
.pcheck { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #333; }
.pcheck input { width: 14px; height: 14px; margin: 0; accent-color: #009688; }
.pcheck.disabled { color: #b9b9b9; }
.pcheck.disabled input { cursor: not-allowed; }

.ptextarea {
    width: 100%;
    min-height: 118px;
    padding: 10px 14px;
    border: 1px solid #e6e6e6;
    border-radius: 0;
    color: #333;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    background: #fff;
}
.ptextarea:focus { border-color: #b7dfd9; }
.ptip { color: #b9b9b9; font-size: 12.5px; margin-top: 6px; text-align: right; }

/* 顶部快捷设置（标签 + 小输入框） */
.pchips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pchip { display: inline-flex; align-items: stretch; }
.pchip > span {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    background: #f5f5f5;
    border: 1px solid #e6e6e6;
    border-right: 0;
    color: #888;
    font-size: 12.5px;
    white-space: nowrap;
}
.pchip > select,
.pchip > input {
    height: 28px;
    width: 86px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid #e6e6e6;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: #555;
    font-family: inherit;
    font-size: 12.5px;
    outline: none;
}
.pchip > select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 22px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23c0c4cc'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 9px 5px;
    cursor: pointer;
}
.pchip > input[type="text"] { width: 150px; }
.pchip > input:disabled { color: #c0c0c0; -webkit-text-fill-color: #c0c0c0; cursor: not-allowed; }

/* 面板表格 */
.panel-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.panel-table th {
    background: #f5f5f5;
    color: #555;
    font-weight: 400;
    text-align: left;
    padding: 11px 16px;
    border-bottom: 1px solid #ececec;
    white-space: nowrap;
}
.panel-table td {
    padding: 11px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
}
.panel-table tbody tr:hover td { background: #fafafa; }
.panel-empty { text-align: center; color: #999; padding: 36px 0 !important; }
.panel-table .act { min-width: 42px; }
.list-actions form { margin: 0; }

/* 分页条（经典样式） */
.ppager {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
    color: #666;
    font-size: 13px;
}
.ppager form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.ppager input[type="number"] {
    width: 46px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid #dcdfe6;
    border-radius: 2px;
    text-align: center;
    font-size: 13px;
    background: #fff;
}
.ppager select {
    width: auto;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #dcdfe6;
    border-radius: 2px;
    font-size: 13px;
    background: #fff;
}
.ppager .pager-count { margin-left: 0; color: #666; }
.ppager .pager-size { margin-left: 0; }
.ppager .pbtn { height: 28px; padding: 0 10px; }

/* 面板弹窗 */
.pmodal-body { padding: 16px 18px 4px; }
.pmodal-actions { display: flex; justify-content: center; gap: 10px; padding: 16px 18px 18px; }

@media (max-width: 900px) {
    .prow.cols3 { grid-template-columns: 1fr; }
    .prow.cols2 { grid-template-columns: 1fr; }
    .plabel { flex-basis: 92px; }
    body.page-spam .main,
    body.page-join .main,
    body.page-adfilter .main { padding: 14px 12px 50px; }
}

/* ---------- 配置范围条 / 克隆 ---------- */
.scope-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 14px;
    margin: 0 0 14px;
}
.scope-bar-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scope-bar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scope-title { color: var(--muted); font-weight: 600; font-size: 13px; }
.scope-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.scope-tab { padding: 6px 12px; color: var(--text); background: #fff; border-right: 1px solid var(--line); font-size: 13px; line-height: 1.2; }
.scope-tab:last-child { border-right: 0; }
.scope-tab:hover { background: #f8fafc; text-decoration: none; }
.scope-tab.active { background: var(--primary); color: #fff; }
.scope-current { color: var(--muted); font-size: 13px; }
.scope-group-form select { min-width: 180px; }
.clone-modules, .clone-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    max-height: 280px;
    overflow: auto;
    padding: 4px 0;
}
.clone-modules .pcheck, .clone-targets .pcheck { min-width: 140px; }

@media (max-width: 720px) {
    .scope-bar { align-items: stretch; }
    .scope-bar-main, .scope-bar-actions { width: 100%; }
    .scope-group-form select { flex: 1; min-width: 0; }
}

/* ---------- 官网首页 ---------- */
.landing-body { margin: 0; background: #f6f7f9; color: #172033; scroll-behavior: smooth; }
.landing-nav { max-width: 1180px; margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; position: sticky; top: 0; z-index: 40; background: rgba(246, 247, 249, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(228, 231, 236, .7); }
.landing-brand { display: inline-flex; align-items: center; gap: 10px; color: #172033; font-weight: 700; text-decoration: none; min-width: 0; }
.landing-brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.landing-nav-links { display: flex; align-items: center; gap: 20px; font-size: 14px; flex-wrap: wrap; justify-content: flex-end; }
.landing-nav-links a { color: #3b475c; text-decoration: none; }
.landing-nav-links a:hover { color: #0f766e; }
.landing-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 18px; border-radius: 6px; background: #0f766e; color: #fff !important; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid #0f766e; }
.landing-btn:hover { background: #0b5f59; border-color: #0b5f59; text-decoration: none; }
.landing-btn-ghost { background: transparent; color: #172033 !important; border-color: #cbd5e1; }
.landing-btn-ghost:hover { background: #fff; border-color: #94a3b8; }
.landing-hero { max-width: 1180px; margin: 0 auto; padding: 54px 24px 40px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
.landing-kicker { display: inline-block; padding: 5px 10px; border-radius: 4px; background: #e6f4f1; color: #0f766e; font-size: 12px; font-weight: 600; }
.landing-hero h1 { margin: 16px 0 14px; font-size: 44px; line-height: 1.18; letter-spacing: -.5px; color: #101828; }
.landing-hero-copy > p { max-width: 620px; color: #475467; font-size: 16px; line-height: 1.8; }
.landing-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.landing-note { margin-top: 12px; color: #667085; font-size: 13px; }
.landing-hero-card { background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; padding: 20px; box-shadow: 0 12px 30px rgba(16,24,40,.06); }
.landing-card-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; padding-bottom: 14px; border-bottom: 1px solid #eaecf0; }
.landing-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.landing-stat-grid div { background: #f8fafc; border: 1px solid #eef2f6; border-radius: 8px; padding: 12px; }
.landing-stat-grid strong { display: block; font-size: 14px; color: #101828; }
.landing-stat-grid span { display: block; margin-top: 4px; color: #667085; font-size: 12px; }
.landing-code { background: #0f172a; color: #d7e3f4; border-radius: 6px; padding: 12px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.landing-section { max-width: 1180px; margin: 0 auto; padding: 46px 24px; scroll-margin-top: 76px; }
.landing-section-head h2 { margin: 0; font-size: 28px; color: #101828; }
.landing-section-head p { margin: 8px 0 0; color: #667085; }
.landing-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.landing-feature { background: #fff; border: 1px solid #e4e7ec; border-radius: 8px; padding: 20px; transition: transform .18s, box-shadow .18s, border-color .18s; }
.landing-feature:hover { transform: translateY(-2px); border-color: #cfe3df; box-shadow: 0 10px 24px rgba(16,24,40,.06); }
.landing-feature h3 { margin: 0 0 8px; font-size: 16px; color: #101828; }
.landing-feature p { margin: 0; color: #667085; font-size: 14px; line-height: 1.7; }
.landing-how { border-top: 1px solid #e4e7ec; }
.landing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.landing-steps > div { background: #fff; border: 1px solid #e4e7ec; border-radius: 8px; padding: 20px; transition: transform .18s, box-shadow .18s, border-color .18s; }
.landing-steps > div:hover { transform: translateY(-2px); border-color: #cfe3df; box-shadow: 0 10px 24px rgba(16,24,40,.06); }
.landing-steps span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #e6f4f1; color: #0f766e; font-size: 12px; font-weight: 700; }
.landing-steps h3 { margin: 10px 0 8px; font-size: 16px; }
.landing-steps p { margin: 0; color: #667085; font-size: 14px; }
.landing-cta { max-width: 1180px; margin: 20px auto 46px; padding: 34px 24px; background: #0f172a; border-radius: 10px; color: #fff; text-align: center; }
.landing-cta h2 { margin: 0 0 8px; font-size: 26px; }
.landing-cta p { margin: 0 0 18px; color: #cbd5e1; }
.landing-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 24px 34px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 28px;
    color: #98a2b3;
    font-size: 13px;
    border-top: 1px solid #e4e7ec;
}
.landing-footer-left { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.landing-copyright { color: #667085; }
.landing-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: flex-end; margin-left: auto; }
.landing-footer-links a { color: #667085; }
.landing-footer-links a:hover { color: #0f766e; }
@media (max-width: 1024px) {
    .landing-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 38px; }
    .landing-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .landing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .landing-hero h1 { font-size: 34px; }
    .landing-nav { padding: 14px 18px; gap: 12px; }
    .landing-nav-links { gap: 12px; }
    /* 移动端保留「登录 / 注册」，只隐藏页内锚点 */
    .landing-nav-links a[href^="#"] { display: none; }
    .landing-footer-links { margin-left: 0; justify-content: flex-start; }
}
@media (max-width: 640px) {
    .landing-nav { padding: 12px 16px; gap: 10px; }
    .landing-nav-links { gap: 10px; font-size: 13px; }
    .landing-nav-links .landing-btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
    .landing-hero { padding: 26px 16px 32px; }
    .landing-hero h1 { font-size: 30px; }
    .landing-hero-copy > p { font-size: 14px; }
    .landing-section { padding: 34px 16px; }
    .landing-section-head h2 { font-size: 23px; }
    .landing-features, .landing-steps { grid-template-columns: 1fr; }
    .landing-cta { margin: 8px 16px 32px; padding: 28px 18px; }
    .landing-cta h2 { font-size: 22px; }
    .landing-footer { flex-direction: column; padding: 18px 16px 28px; }
    .landing-footer-links { gap: 8px 14px; }
}
@media (max-width: 420px) {
    .landing-brand > span:last-child { max-width: 32vw; }
    .landing-nav-links { gap: 8px; font-size: 12.5px; }
    .landing-hero h1 { font-size: 27px; }
    .landing-actions { flex-direction: column; align-items: stretch; }
    .landing-actions .landing-btn, .landing-cta .landing-btn { width: 100%; }
    .landing-stat-grid { grid-template-columns: 1fr; }
}

/* ---------- 运行日志 ---------- */
.log-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    background: #fcfcfd;
}
.log-filter label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12.5px;
    white-space: nowrap;
}
.log-filter select {
    width: auto;
    min-width: 118px;
    max-width: 190px;
    padding: 6px 10px;
    font-size: 12.5px;
}
.log-filter input[type="text"] {
    width: 190px;
    padding: 6px 10px;
    font-size: 12.5px;
}
.log-raw { margin-top: 6px; }
.log-raw summary { cursor: pointer; color: var(--primary); font-size: 12px; }
.log-raw pre {
    margin: 6px 0 0;
    max-height: 220px;
    overflow: auto;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 11.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ---------- 自动 Tabs ---------- */
.auto-tabs-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.auto-tab { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.auto-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.auto-tab-panel[hidden] { display: none !important; }

/* ---------- 安装向导 ---------- */
.install-body { background: #f5f6f7; padding: 0; }
.install-shell { max-width: 1180px; margin: 0 auto; padding: 24px 24px 56px; }
.install-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 6px 0 20px; border-bottom: 1px solid var(--line); }
.install-brand { display: flex; align-items: center; gap: 12px; }
.install-brand strong { display: block; font-size: 16px; color: #101828; }
.install-brand span { display: block; font-size: 12px; color: var(--muted); }
.install-top-note { color: var(--muted); font-size: 12.5px; }
.install-layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 34px; align-items: start; margin-top: 28px; }
.install-aside { position: sticky; top: 24px; }
.install-aside-title { color: #667085; font-size: 11px; font-weight: 700; letter-spacing: .8px; margin-bottom: 10px; }
.install-steps { list-style: none; margin: 0; padding: 0; }
.install-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-left: 2px solid var(--line); color: #667085; }
.install-steps li.active { border-left-color: var(--primary); background: #fff; color: #101828; }
.install-steps li > span { color: #98a2b3; font-size: 11px; font-weight: 700; padding-top: 2px; }
.install-steps li.active > span { color: var(--primary); }
.install-steps strong { display: block; font-size: 13px; font-weight: 600; }
.install-steps small { display: block; margin-top: 2px; font-size: 11.5px; color: #98a2b3; }
.install-aside-box { margin-top: 20px; padding: 15px 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.install-aside-box strong { display: block; font-size: 12.5px; margin-bottom: 8px; }
.install-aside-box ul { margin: 0; padding-left: 16px; color: #667085; font-size: 12px; line-height: 1.9; }
.install-aside-meta { margin-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.install-aside-meta span { color: #98a2b3; font-size: 11px; margin-top: 6px; }
.install-aside-meta code { font-size: 11px; word-break: break-all; }
.install-main { min-width: 0; }
.install-page-head { margin-bottom: 18px; }
.install-kicker { display: inline-block; color: var(--primary); font-size: 10.5px; font-weight: 700; letter-spacing: 1px; }
.install-page-head h1 { margin: 8px 0 8px; font-size: 27px; line-height: 1.25; color: #101828; }
.install-page-head p { margin: 0; color: #667085; font-size: 13.5px; line-height: 1.8; }
.install-panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; overflow: hidden; }
.install-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.install-panel-head h2 { margin: 0; font-size: 14.5px; font-weight: 700; color: #1f2937; }
.install-grid { display: grid; gap: 13px 18px; padding: 18px; }
.install-grid.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.install-grid.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.install-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.install-field > span { font-size: 12.5px; font-weight: 600; color: #374151; }
.install-field small, .install-hint { color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.install-check-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #374151; padding-top: 22px; }
.install-env-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; padding: 16px 18px; }
.install-env { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid #eef0f3; border-radius: 6px; background: #fafbfc; }
.install-env-dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; margin-top: 6px; flex: 0 0 auto; }
.install-env.bad .install-env-dot { background: var(--danger); }
.install-env.warn .install-env-dot { background: #d97706; }
.install-env strong { display: block; font-size: 12.5px; color: #374151; font-weight: 600; }
.install-env small { display: block; margin-top: 2px; color: #98a2b3; font-size: 11px; }
.install-env-error { margin: 0 18px 16px; }
.install-submit { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.install-submit strong { display: block; font-size: 12.5px; color: #374151; }
.install-submit span { display: block; margin-top: 3px; color: #98a2b3; font-size: 11.5px; }
.install-submit .btn { min-width: 116px; }
.install-submit .btn:disabled { opacity: .5; cursor: not-allowed; }
.install-hint { margin: 10px 18px 16px; }
.install-bottom-hint { margin: 18px 0 0; }
.install-body .alert { margin-bottom: 14px; }

/* 安装完成 */
.install-done-main { max-width: 980px; margin: 0 auto; }
.install-done-hero { padding: 34px 0 22px; }
.install-done-hero h1 { margin: 10px 0 10px; font-size: 30px; color: #101828; }
.install-done-hero p { margin: 0; max-width: 720px; color: #667085; font-size: 14px; line-height: 1.8; }
.install-done-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.install-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; padding: 18px; }
.install-info-grid span { display: block; color: #98a2b3; font-size: 11.5px; margin-bottom: 4px; }
.install-info-grid strong { font-size: 13.5px; color: #1f2937; }
.install-info-grid code { font-size: 11.5px; word-break: break-all; }
.install-check-list { padding: 4px 18px 16px; }
.install-check { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f0f2f4; }
.install-check:last-child { border-bottom: 0; }
.install-check-no { flex: 0 0 26px; color: var(--primary); font-size: 11px; font-weight: 700; padding-top: 2px; }
.install-check strong { display: block; font-size: 13px; color: #1f2937; }
.install-check p { margin: 4px 0 0; color: #667085; font-size: 12.5px; line-height: 1.75; }
.install-code { margin: 0 18px 12px; padding: 14px 16px; background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; color: #334155; font-size: 11.5px; line-height: 1.7; overflow: auto; }
.install-nginx .install-hint { margin-bottom: 18px; }

@media (max-width: 960px) {
    .install-layout { grid-template-columns: 1fr; gap: 20px; }
    .install-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
    .install-aside-title { grid-column: 1 / -1; margin-bottom: 0; }
    .install-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .install-aside-box { margin-top: 0; }
    .install-aside-meta { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .install-shell { padding: 16px 14px 40px; }
    .install-top { align-items: flex-start; }
    .install-top-note { display: none; }
    .install-aside { display: none; }
    .install-steps { grid-template-columns: 1fr; }
    .install-grid.cols2, .install-grid.cols3 { grid-template-columns: 1fr; }
    .install-env-grid { grid-template-columns: 1fr; }
    .install-page-head h1 { font-size: 23px; }
    .install-done-hero h1 { font-size: 24px; }
    .install-info-grid { grid-template-columns: 1fr; }
    .install-check-line { padding-top: 0; }
}

/* ---------- 列表工具条与统一分页 ---------- */
.qa-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}
.qa-toolbar form { margin: 0; }
.qa-batch-group {
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0 8px;
    background: #fff;
    font-size: 12.5px;
}
.qa-batch-input {
    height: 32px;
    width: 130px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0 8px;
    background: #fff;
    font-size: 12.5px;
}
.group-remark-form {
    display: flex;
    align-items: center;
    gap: 6px;
}
.group-remark-form input[type="text"] {
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0 8px;
    min-width: 140px;
    font-size: 12.5px;
}

.qa-pager,
.ppager,
.pager-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: #fff;
    color: #667085;
    font-size: 12.5px;
}
.qa-pager form,
.ppager form,
.pager-bar form { margin: 0; }
.qa-pager .pager-count,
.ppager .pager-count,
.pager-bar .pager-count { margin-left: auto; margin-right: 4px; color: #667085; }
.qa-pager .pager-size,
.ppager .pager-size,
.pager-bar .pager-size { margin-left: 0; }
.pager-size select,
.ppager select,
.pager-jump input { height: 30px; }
.pager-btn,
.pg,
.pg-nav,
.pager-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: #475467;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
}
.pager-btn:hover,
.pg:hover,
.pg-nav:hover { border-color: #b7d9d4; color: var(--primary); text-decoration: none; }
.pager-btn.disabled,
.pg.disabled,
.pg-nav.disabled { color: #cbd5e1; cursor: not-allowed; pointer-events: none; }
.pg.on,
.pager-current { border-color: var(--primary); background: var(--primary); color: #fff; }
.pg.on:hover { background: var(--primary-dark); color: #fff; }
.pager-jump { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; }
.pager-jump input { width: 52px; padding: 0 6px; text-align: center; }

@media (max-width: 640px) {
    .qa-toolbar { gap: 6px; }
    .qa-pager .pager-count,
    .ppager .pager-count,
    .pager-bar .pager-count { width: 100%; order: 9; margin: 2px 0 0; }
}

/* ---------- 按钮尺寸统一 ---------- */
.btn,
.pbtn {
    height: 34px;
    padding: 0 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1;
    gap: 6px;
}
.btn.small,
.pbtn.small { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.tiny { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 5px; }
.btn-add,
.btn-clear,
.btn-export,
.list-search button,
.switch-btn { height: 32px; border-radius: 5px; font-size: 12.5px; }

/* ---------- 多端适配补充：PC / 平板 / 手机 ---------- */
.btn:focus-visible,
.pbtn:focus-visible,
.nav-item:focus-visible,
.landing-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 2px solid rgba(0, 150, 136, .55);
    outline-offset: 2px;
}

@media (max-width: 1024px) {
    .main { padding: 20px 20px 56px; }
    body.page-spam .main,
    body.page-join .main,
    body.page-adfilter .main { padding: 14px 16px 56px; }
}

@media (max-width: 900px) {
    .card { padding: 16px; }
    .stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 720px) {
    .prow { flex-wrap: wrap; }
    .prow > .pgroup { flex: 1 1 100%; min-width: 0; }
    .pchecks { gap: 12px 20px; }
    .panel-body { padding: 4px 12px 14px; }
    .panel-table th,
    .panel-table td { padding: 9px 10px; }
    .log-filter { padding: 10px 12px; gap: 8px 10px; }
    .log-filter label { white-space: normal; width: 100%; }
    .log-filter input[type="text"],
    .log-filter select { flex: 1 1 auto; width: auto; max-width: none; min-width: 0; }
    .module-botbar { justify-content: flex-start; flex-wrap: wrap; }
    .module-botbar select { max-width: 100%; flex: 1 1 auto; }
    .scope-bar { padding: 10px 12px; }
    .auto-tabs-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 10px; }
    .auto-tab { flex: 0 0 auto; }
}

@media (max-width: 640px) {
    .main { padding: 14px 12px calc(44px + env(safe-area-inset-bottom)); }
    .card { padding: 14px 13px; margin-bottom: 14px; }
    .card-head { margin-bottom: 10px; }
    .topbar { margin-bottom: 14px; }
    .topbar h1 { font-size: 18px; }
    .stats { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
    .stat { padding: 12px; }
    .stat strong { font-size: 21px; }
    .plabel { flex-basis: 86px; font-size: 12.5px; }
    .pvalue { flex-wrap: wrap; }
    .pvalue > input,
    .pvalue > select { height: 38px; }
    .pvalue > select + select { margin-left: 0 !important; }
    .pvalue > textarea { min-height: 104px; padding: 10px 12px; }
    /* 16px 可避免 iOS Safari 聚焦输入框时自动放大页面 */
    input[type="text"], input[type="password"], input[type="number"], input[type="email"],
    input[type="url"], input[type="search"], input[type="tel"], input[type="date"],
    select, textarea,
    .pvalue > input, .pvalue > select, .pvalue > textarea,
    .qa-form-row > input, .qa-form-row > select, .qa-form-row > textarea { font-size: 16px; }
    .btn, .pbtn { min-height: 38px; }
    .btn.tiny { min-height: 30px; }
    .auth-body { padding: 20px 14px; }
    .auth-card { padding: 26px 20px; border-radius: 14px; }
    .modal-mask { padding: 10px; align-items: flex-end; }
    .modal-card { width: 100%; max-height: calc(100vh - 20px); border-radius: 12px; }
    .qa-toolbar .qa-batch-input { width: 110px; }
    .group-remark-form { width: 100%; }
    .group-remark-form input[type="text"] { min-width: 0; flex: 1; }
}

@media (max-width: 420px) {
    .main { padding-left: 10px; padding-right: 10px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .stat strong { font-size: 19px; }
    .plabel { flex-basis: 78px; font-size: 12px; }
    .pchecks { gap: 10px 14px; }
    .pager-btn, .pg, .pg-nav, .pager-current { min-width: 32px; height: 32px; }
    .btn, .pbtn { padding: 0 11px; }
    .auth-card { padding: 22px 16px; }
    .auth-brand h1 { font-size: 17px; }
    .toast-stack { top: 10px; left: 10px; right: 10px; }
}

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