/* 恩泽天下管理系统 —— 现代化样式，浅/深色自适应 */

:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e5e8f0;
    --text: #1f2733;
    --text-soft: #64748b;
    --primary: #3b5bdb;
    --primary-hover: #2f49b8;
    --primary-soft: #eaeeff;
    --success: #12b76a;
    --success-soft: #e6f7ef;
    --danger: #e5484d;
    --danger-soft: #fdecec;
    --warn: #d9822b;
    --warn-soft: #fbefe0;
    --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-lg: 0 12px 40px rgba(16, 24, 40, .14);
    --radius: 12px;
    --radius-sm: 8px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f141c;
        --surface: #161d29;
        --surface-2: #1c2532;
        --border: #2a3444;
        --text: #e7ecf3;
        --text-soft: #94a3b8;
        --primary: #6c8cff;
        --primary-hover: #829dff;
        --primary-soft: #1e2740;
        --success: #35c988;
        --success-soft: #12281f;
        --danger: #ff6b6f;
        --danger-soft: #2c1719;
        --warn: #e6a15a;
        --warn-soft: #2a2013;
        --shadow: 0 1px 3px rgba(0, 0, 0, .4);
        --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
        "PingFang SC", "Hiragino Sans GB", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ---------- 通用控件 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
    white-space: nowrap;
    text-decoration: none;
    color: var(--text);
    background: var(--surface);
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; padding: 11px; font-size: 15px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-soft); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-link { background: transparent; border: 0; padding: 4px 6px; font-size: 13px; }
.btn-view { color: var(--text-soft); }
.btn-view:hover { background: var(--surface-2); color: var(--text); }
.btn-edit { color: var(--primary); }
.btn-edit:hover { background: var(--primary-soft); }
.btn-offline { color: var(--warn); }
.btn-offline:hover { background: var(--warn-soft); }
.btn-disable { color: var(--danger); }
.btn-disable:hover { background: var(--danger-soft); }
.btn-enable { color: var(--success); }
.btn-enable:hover { background: var(--success-soft); }
/* 删除（逻辑删除）与恢复 */
.btn-del { color: var(--danger); font-weight: 600; }
.btn-del:hover { background: var(--danger-soft); }
.btn-restore { color: var(--success); font-weight: 600; }
.btn-restore:hover { background: var(--success-soft); }
.btn-pwd { color: var(--warn); }
.btn-pwd:hover { background: var(--warn-soft); }

input[type=text], input[type=password], input[type=search] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ---------- 登录页 ---------- */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(1200px 500px at 50% -10%, var(--primary-soft), transparent 60%),
        var(--bg);
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 36px 32px;
}
.brand { text-align: center; margin-bottom: 24px; }
.brand-logo {
    display: inline-grid;
    place-items: center;
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
}
.brand-logo.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 16px; margin: 0; }
.brand h1 { font-size: 20px; margin: 0 0 4px; }
.brand-sub { color: var(--text-soft); margin: 0; font-size: 13px; }
.form .field { display: block; margin-bottom: 16px; }
.form .field span { display: block; margin-bottom: 6px; color: var(--text-soft); font-size: 13px; }
.login-ip { text-align: center; color: var(--text-soft); font-size: 12px; margin: 18px 0 0; min-height: 16px; }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 13px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- 顶栏 ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.topbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-name { color: var(--text-soft); font-size: 13px; }

/* ---------- 主体 ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 20px; }
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.search { display: flex; gap: 8px; flex: 1; max-width: 480px; min-width: 260px; }
.search input { flex: 1; }
.stat { color: var(--text-soft); font-size: 13px; white-space: nowrap; }

/* 筛选栏 */
.filters { display: flex; gap: 10px 12px; flex-wrap: wrap; align-items: flex-end; flex: 1; }
.f-search { flex: 1 1 220px; min-width: 180px; }
.f-item { display: inline-flex; flex-direction: column; gap: 4px; }
.f-item > span { font-size: 12px; color: var(--text-soft); padding-left: 2px; }
.filters select {
    height: 38px;
    padding: 0 30px 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color .15s, box-shadow .15s;
}
.filters select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chk { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 13px; white-space: nowrap; cursor: pointer; user-select: none; }
.badge-del { background: var(--danger-soft); color: var(--danger); }
.row-del td { opacity: .55; }
.row-del td:first-child { opacity: 1; }
.stat b { color: var(--primary); font-weight: 600; }

/* ---------- 表格 ---------- */
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: var(--shadow);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td {
    padding: 11px 14px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.data-table thead th {
    background: var(--surface-2);
    color: var(--text-soft);
    font-weight: 600;
    position: sticky; top: 0;
}
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td.empty { text-align: center; color: var(--text-soft); padding: 40px; }
.actions { display: flex; gap: 2px; }

/* 可排序表头 */
.data-table th[data-sort] {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 22px;              /* 给箭头留位置，避免和文字挤在一起 */
    transition: color .15s, background .15s;
}
.data-table th[data-sort]:hover { color: var(--text); background: var(--surface-2); }
.data-table th[data-sort]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}
/* 默认画一个朝上的小三角，平时淡出；hover 时半显以提示"这列可以排序" */
.data-table th[data-sort]::after {
    content: '';
    position: absolute;
    right: 8px; top: 50%;
    margin-top: -6px;
    border: 4px solid transparent;
    border-bottom-color: currentColor;
    opacity: 0;
    transition: opacity .15s;
}
.data-table th[data-sort]:hover::after { opacity: .35; }
.data-table th.sorted { color: var(--primary); }
.data-table th.sorted::after { opacity: 1; }
/* 降序：翻成朝下的三角（换边框方向而非 transform，位置更准） */
.data-table th.sorted.desc::after {
    border-bottom-color: transparent;
    border-top-color: currentColor;
    margin-top: -2px;
}

/* 排序下拉：宽屏用不上（直接点表头），只在窄屏表头被隐藏时出现 */
.f-sort { display: none; }

/* 徽章 / 状态 */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: var(--primary-soft);
    color: var(--primary);
}
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-on { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.dot-off { background: var(--text-soft); opacity: .5; }
.pill-yes { color: var(--success); }
.pill-no { color: var(--danger); }

/* ---------- 客户端版本分布 ---------- */
.verbar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 14px;
    margin-bottom: 16px;
}
.verbar-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-soft);
}
.verbar-head b { color: var(--text); font-weight: 600; }
.verbar-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ver-chip {
    display: inline-flex; align-items: baseline; gap: 7px;
    padding: 5px 11px; border-radius: 999px; font-size: 12px;
    background: var(--success-soft); color: var(--success);
}
.ver-chip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ver-chip .n { opacity: .85; }
.ver-chip.outdated { background: var(--warn-soft); color: var(--warn); }
.ver-chip.blocked { background: var(--danger-soft); color: var(--danger); }
/* 网页版（3d.eztx.cn）：刷新即最新，不参与版本闸门，故用中性的主色而非红黄 */
.ver-chip.web { background: var(--primary-soft); color: var(--primary); }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 20px 0; flex-wrap: wrap; }
.pager .btn.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager .info { color: var(--text-soft); font-size: 13px; margin: 0 8px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 10px; }
.toast {
    min-width: 220px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    animation: toast-in .2s ease;
    border-left: 3px solid var(--primary);
}
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.muted { color: var(--text-soft); }

/* ---------- 弹窗 ---------- */
.modal-mask {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(15, 20, 28, .5);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 40px 16px; overflow-y: auto;
}
.modal-mask[hidden] { display: none; }
.modal {
    width: 100%; max-width: 560px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: modal-in .18s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close {
    border: 0; background: transparent; color: var(--text-soft);
    font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 20px; }
.modal-foot {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 20px; border-top: 1px solid var(--border);
}

/* 详情定义列表 */
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.dl-row { display: flex; background: var(--surface); }
.dl-k { flex: 0 0 96px; padding: 8px 10px; color: var(--text-soft); font-size: 12px; background: var(--surface-2); }
.dl-v { flex: 1; padding: 8px 10px; font-size: 13px; word-break: break-all; }

/* 编辑表单 */
.edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ef-row { display: flex; flex-direction: column; gap: 5px; }
.ef-row label { font-size: 12px; color: var(--text-soft); }
.ef-row input, .ef-row select {
    height: 36px; padding: 0 10px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font-size: 14px;
}
.ef-row input:disabled { background: var(--surface-2); color: var(--text-soft); }
.ef-row input:focus, .ef-row select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

@media (max-width: 640px) {
    .toolbar { flex-direction: column; align-items: stretch; }
    .search { max-width: none; }
    .detail-list, .edit-form { grid-template-columns: 1fr; }

    /* ---- 表格 → 卡片 ---- */
    .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    .data-table thead { display: none; }
    /* 表头没了就点不了，改用筛选栏里的排序下拉 + 升降序按钮 */
    .f-sort { display: inline-flex; }
    button.f-sort { align-self: flex-end; height: 38px; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .data-table tr {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: var(--shadow);
        margin-bottom: 12px;
        overflow: hidden;
    }
    .data-table td {
        border: 0;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 14px;
        white-space: normal;
        text-align: right;
        word-break: break-all;
    }
    .data-table td::before {
        content: attr(data-label);
        color: var(--text-soft);
        font-size: 12px;
        text-align: left;
        flex: 0 0 34%;
        word-break: keep-all;
    }
    .data-table tr td:last-child { border-bottom: 0; }
    /* 操作单元格：按钮铺满一行、无标签、置顶 */
    .data-table td.cell-actions {
        justify-content: flex-start;
        background: var(--surface-2);
        padding: 8px 10px;
    }
    .data-table td.cell-actions::before { display: none; }
    .data-table td.cell-actions .actions { flex-wrap: wrap; gap: 4px; }
    .data-table td.cell-actions .btn-link { padding: 7px 12px; }
    .data-table td.empty { text-align: center; }
    .data-table td.empty::before { display: none; }
}

/* ---------- 安全设置页（settings.php） ---------- */
.set-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 24px;
    margin-bottom: 22px;
}
.set-card h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.set-card > p { margin: 0 0 16px; font-size: 13px; line-height: 1.7; }
.set-card code {
    background: var(--surface-2);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 12px;
}

.set-switch {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-size: 13px;
    line-height: 1.7;
    cursor: pointer;
}
.set-switch input { margin-top: 3px; flex: none; width: 16px; height: 16px; }

.set-rules input[type=number] {
    width: 74px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
}
.set-rules td { vertical-align: middle; }

.set-text, .set-code {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    resize: vertical;
}
.set-code { background: var(--surface-2); }

.set-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}
.set-inline { display: inline; }
.set-warn { color: var(--warn); font-size: 13px; }

.alert-ok { background: var(--success-soft); color: var(--success); }
.empty { color: var(--text-soft); text-align: center; padding: 24px; font-size: 13px; }

/* ---------- 重置密码弹窗 ---------- */
.pwd-tip { margin: 0 0 16px; font-size: 13px; line-height: 1.7; color: var(--text-soft); }
.pwd-tip b { color: var(--text); }
.pwd-field span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 13px;
}
.pwd-field input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 16px;                 /* 明文显示，字号大一点便于当场核对 */
    letter-spacing: .04em;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.pwd-quick {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-soft);
}


/* ---------- 新增用户弹窗 ---------- */
.create-form .ef-row.req label i {
    color: var(--danger);
    font-style: normal;
    margin-left: 2px;
}
.create-hint {
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-soft);
}
.create-more { margin-top: 16px; }
.create-more summary {
    cursor: pointer;
    user-select: none;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-soft);
    font-size: 13px;
}
.create-more summary:hover { color: var(--text); }
.create-more[open] summary { margin-bottom: 14px; }

/* ---------- 权限管理面板（roles.php） ---------- */
.perm-notes {
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.75;
}
.perm-notes p { margin: 0 0 6px; }
.perm-notes ol { margin: 0; padding-left: 20px; }
.perm-notes li { margin-bottom: 4px; }

.perm-table th.perm-role,
.perm-table td.perm-cell { text-align: center; width: 88px; }
.perm-table th.locked { background: var(--warn-soft); color: var(--warn); }
.perm-table td.perm-cap { min-width: 260px; line-height: 1.6; }
.perm-table td.perm-cap code { font-size: 11px; }
.perm-table input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; }
.perm-table input[type=checkbox]:disabled { cursor: not-allowed; opacity: .45; }
.perm-table tr.perm-group td {
    background: var(--surface-2);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-soft);
    letter-spacing: .06em;
    padding: 7px 14px;
}

/* 新增用户：登录名被识别为手机号时的提示态 */
.create-hint.synced { color: var(--success); }
.create-hint.synced b { color: var(--success); }

/* ---------- 品牌 Logo：图片模式 ---------- */
/* .brand-logo 默认是文字方块（蓝底白字）；.has-img 换成盛图片的容器。
   图片加载失败时 onerror 会把 has-img 摘掉，自动退回文字方块，不留破图。 */
.brand-logo.has-img {
    background: transparent;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.brand-logo.has-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.brand-logo.sm.has-img { border-radius: 8px; }

/* ---------- 站点外观页（branding.php） ---------- */
.brand-preview {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    padding: 16px 18px;
    margin-bottom: 22px;
}
.bp-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: .08em;
    margin-bottom: 14px;
}
.bp-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: stretch;
}
.bp-login {
    flex: 1 1 240px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 22px 16px;
}
.bp-login h1 { font-size: 19px; margin: 12px 0 4px; }
.bp-login .brand-sub { margin: 0; font-size: 13px; color: var(--text-soft); }
.bp-topbar {
    flex: 1 1 240px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 16px;
}
.bp-note { margin: 12px 0 0; font-size: 12px; }
.bp-note.ok { color: var(--success); }
.bp-note.warn { color: var(--warn); }

/* 站点外观表单：字段说明小字 */
.set-card .field { display: block; margin-bottom: 18px; }
.set-card .field > span { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-soft); }
.set-card .field small { display: block; margin-top: 5px; font-size: 12px; line-height: 1.6; }

/* ---------- 顶栏品牌：可点击返回首页 ---------- */
a.topbar-brand {
    color: inherit;
    text-decoration: none;
    padding: 4px 10px 4px 4px;
    margin-left: -4px;
    border-radius: 10px;
    transition: background .15s;
}
a.topbar-brand:hover { background: var(--surface-2); }
a.topbar-brand:active { transform: translateY(1px); }
a.topbar-brand:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---------- 工具栏：筛选项与主操作按钮对齐到同一基线 ---------- */
.toolbar { align-items: flex-end; }

/* 新增用户：高度与筛选栏的下拉/按钮一致（38px），不再比周围高出一截 */
.btn-add {
    height: 38px;
    padding: 0 18px;
    gap: 7px;
    box-shadow: 0 1px 2px rgba(59, 91, 219, .25);
}
.btn-add .ico {
    font-size: 15px;
    line-height: 1;
    font-weight: 600;
}

/* ---------- 结果概要行 ---------- */
.list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 10px;
    padding: 0 2px;
}
.list-head .stat {
    display: inline-flex;
    align-items: center;
    color: var(--text-soft);
    font-size: 13px;
}
.list-head .stat b { color: var(--text); font-weight: 600; }
.list-head .stat .sep { margin: 0 8px; opacity: .45; }

@media (max-width: 640px) {
    /* 窄屏：主操作按钮独占一行、铺满，比挤在筛选项右边好按 */
    .btn-add { width: 100%; }
}
