:root {
    --ground: #e9edf4;
    --surface: #ffffff;
    --raised: #f8f9fa;
    --active: rgba(14, 165, 233, .10);
    --border: #e1e4e8;
    --rule: #f0f1f3;
    --control: #d1d5db;
    --text: #111827;
    --muted: #4b5563;
    --faint: #6b7280;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --accent: #0ea5e9;
    --accent-ink: #0369a1;
    --link: #0366d6;
    --tint: rgba(14, 165, 233, .08);
    --positive: #059669;
    --pill-positive-bg: rgba(5, 150, 105, .08);
    --pill-positive-ink: #047857;
    --negative: #dc2626;
    --pill-negative-bg: rgba(220, 38, 38, .07);
    --pill-negative-ink: #b91c1c;
    --r-card: 8px;
    --r-ctrl: 6px;
    --gap: 16px;
}

* {
    box-sizing: border-box;
}

body.uc {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--text);
    background: var(--ground);
}

body.uc a {
    color: var(--link);
    text-decoration: none;
}

body.uc a:hover {
    text-decoration: underline;
}

.num {
    font-variant-numeric: tabular-nums;
}

.uc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- 手机顶栏与抽屉 ---------- */

.uc-mbar {
    display: none;
}

.uc-scrim[hidden] {
    display: none;
}

/* ---------- 外壳 ---------- */

.uc-shell {
    display: flex;
    min-height: 100vh;
}

.uc-side {
    position: sticky;
    top: 0;
    display: flex;
    flex: 0 0 240px;
    flex-direction: column;
    width: 240px;
    height: 100vh;
    padding: 22px 12px 18px;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.uc-side-top {
    padding: 0 10px 22px;
}

body.uc .uc-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

body.uc .uc-brand:hover {
    text-decoration: none;
}

.uc-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    line-height: 1;
}

.uc-brand-txt {
    font-size: 16px;
    line-height: 1.3;
}

.uc-brand-txt em {
    display: block;
    margin-top: 1px;
    font-style: normal;
    font-size: 14px;
    color: var(--faint);
}

.uc-scope {
    display: block;
    margin-top: 8px;
    padding-left: 36px;
    font-size: 14px;
    color: var(--faint);
}

.uc-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.uc .uc-mi {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 15px;
}

.uc-mi svg {
    flex: 0 0 auto;
    color: #78818f;
}

body.uc .uc-mi:hover {
    background: var(--tint);
    color: var(--text);
    text-decoration: none;
}

body.uc .uc-mi.on {
    background: var(--active);
    color: var(--accent-ink);
}

.uc-mi.on svg {
    color: var(--accent);
}

.uc-side-foot {
    margin-top: auto;
    padding: 14px 10px 0;
    border-top: 1px solid var(--border);
}

.uc-user-mail {
    display: block;
    font-size: 14px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uc-side-foot form {
    margin: 4px 0 0;
}

.uc-logout {
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.uc-logout:hover {
    color: var(--accent-ink);
    text-decoration: underline;
}

/* ---------- 画布与标题 ---------- */

.uc-canvas {
    flex: 1 1 auto;
    min-width: 0;
    padding: 32px 32px 56px;
}

.uc-canvas-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.uc-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.uc-title h1 {
    margin: 0;
    font-size: 25px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.uc-title p {
    margin: 6px 0 0;
    font-size: 15px;
    color: var(--muted);
}

/* ---------- KPI 条 ---------- */

.uc-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: var(--gap);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    overflow: hidden;
}

.uc-kpi {
    padding: 16px 20px 18px;
    border-left: 1px solid var(--rule);
}

.uc-kpi:first-child {
    border-left: 0;
}

.uc-kpi span {
    display: block;
    font-size: 14px;
    color: var(--muted);
}

.uc-kpi b {
    display: block;
    margin-top: 6px;
    font-size: 25px;
    font-weight: 400;
    line-height: 1.15;
}

.uc-kpi-lead b {
    font-size: 31px;
}

.uc-kpi em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    font-size: 14px;
    color: var(--faint);
}

/* ---------- 提示 ---------- */

.uc-alert,
.uc-ok {
    margin-bottom: var(--gap);
    padding: 10px 14px;
    border-radius: var(--r-ctrl);
    font-size: 15px;
}

.uc-alert {
    background: var(--pill-negative-bg);
    color: var(--pill-negative-ink);
}

.uc-ok {
    background: var(--pill-positive-bg);
    color: var(--pill-positive-ink);
}

/* ---------- 面板与表格 ---------- */

.uc-panel {
    margin-bottom: var(--gap);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
}

.uc-panel-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rule);
}

.uc-panel-hd h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
}

.uc-count {
    font-size: 14px;
    color: var(--muted);
}

.uc-count b {
    font-weight: 400;
    color: var(--text);
}

.uc-table-wrap {
    overflow-x: auto;
}

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

.uc-table th {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
    text-align: left;
    white-space: nowrap;
}

.uc-table td {
    padding: 10px 20px;
    border-bottom: 1px solid var(--rule);
    vertical-align: middle;
}

.uc-table tbody tr:last-child td {
    border-bottom: 0;
}

.uc-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.uc-col-check {
    width: 96px;
    padding-right: 8px;
    white-space: nowrap;
}

.uc-td-name {
    width: 45%;
}

.uc-name {
    display: block;
    font-size: 15px;
    color: var(--text);
}

.uc-cat-slug {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    color: var(--faint);
}

.uc-panel-ft {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-top: 1px solid var(--rule);
}

.uc-foot-note {
    margin: 0;
    font-size: 14px;
    color: var(--faint);
}

/* ---------- 勾选框 ---------- */

.uc-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.uc-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.uc-check i {
    position: relative;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 1px solid var(--control);
    border-radius: 4px;
    background: var(--surface);
}

.uc-check input:checked + i {
    border-color: var(--accent);
    background: var(--accent);
}

.uc-check input:checked + i::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.uc-check input:indeterminate + i {
    border-color: var(--accent);
    background: var(--accent);
}

.uc-check input:indeterminate + i::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 7px;
    width: 10px;
    height: 2px;
    background: #fff;
}

.uc-check input:focus-visible + i {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.uc-check-txt {
    font-size: 14px;
    color: var(--muted);
}

/* ---------- 按钮 ---------- */

.uc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--r-ctrl);
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.uc-btn[hidden] {
    display: none;
}

.uc-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.uc-btn:disabled {
    opacity: .6;
    cursor: default;
}

/* 表单提交中的加载态：灰底、禁用，避免重复提交 */
.uc-btn.uc-btn-loading,
.uc-btn.uc-btn-loading:hover,
.uc-btn.uc-btn-loading:disabled {
    background: var(--control);
    border-color: var(--control);
    color: var(--muted);
    opacity: 1;
    cursor: default;
}

.uc-btn-primary {
    background: var(--primary);
    color: #fff;
}

.uc-btn-primary:hover {
    background: var(--primary-hover);
}

.uc-btn-ghost {
    background: var(--surface);
    border-color: var(--control);
    color: var(--text);
}

.uc-btn-ghost:hover {
    border-color: var(--accent);
    background: var(--tint);
    color: var(--accent-ink);
}

body.uc a.uc-btn {
    text-decoration: none;
}

body.uc a.uc-btn-primary {
    color: #fff;
}

body.uc a.uc-btn-ghost {
    color: var(--text);
}

body.uc a.uc-btn-ghost:hover {
    color: var(--accent-ink);
}

/* ---------- 设置区 ---------- */

.uc-setting {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 32px;
    padding: 28px 20px;
}

.uc-setting + .uc-setting {
    border-top: 1px solid var(--rule);
}

.uc-setting-side h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
}

.uc-setting-side p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

.uc-setting-body {
    min-width: 0;
}

.uc-field {
    display: block;
    margin-bottom: 18px;
}

.uc-field > span {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text);
}

.uc-field input,
.uc-field select {
    display: block;
    width: 100%;
    max-width: 420px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--control);
    border-radius: var(--r-ctrl);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

.uc-field select {
    max-width: 240px;
    padding: 0 8px;
}

.uc-field[hidden] {
    display: none;
}

.uc-field input:focus,
.uc-field select:focus {
    outline: none;
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: -1px;
}

.uc-field-hint {
    display: block;
    max-width: 460px;
    margin-top: 6px;
    font-style: normal;
    font-size: 14px;
    line-height: 1.5;
    color: var(--faint);
}

.uc-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--rule);
}

.uc-switch-txt b {
    display: block;
    font-size: 15px;
    font-weight: 400;
}

.uc-switch-txt span {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    color: var(--muted);
}

.uc-switch {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    cursor: pointer;
}

.uc-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.uc-switch i {
    position: relative;
    display: block;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: var(--control);
    transition: background .15s;
}

.uc-switch i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: left .15s;
}

.uc-switch input:checked + i {
    background: var(--primary);
}

.uc-switch input:checked + i::after {
    left: 19px;
}

.uc-switch input:focus-visible + i {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.uc-setting-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.uc-kv {
    margin: 0;
}

.uc-kv > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
}

.uc-kv > div:last-child {
    border-bottom: 0;
}

.uc-kv dt {
    font-size: 14px;
    color: var(--muted);
}

.uc-kv dd {
    margin: 0;
    font-size: 15px;
    color: var(--text);
    text-align: right;
    word-break: break-all;
}

.uc-dash {
    color: var(--faint);
}

.uc-empty {
    margin: 0;
    padding: 24px 20px;
    font-size: 14px;
    color: var(--muted);
}

.uc-label {
    display: block;
    margin: 18px 0 6px;
    font-size: 14px;
    color: var(--text);
}

.uc-setting-body > .uc-label:first-child {
    margin-top: 0;
}

.uc-codebox {
    max-width: 460px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-ctrl);
    background: var(--raised);
    color: var(--accent-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
    font-size: 15px;
    letter-spacing: .04em;
    line-height: 1.5;
    word-break: break-all;
    user-select: all;
}

.uc-code-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.uc-apply-block {
    margin: 18px 0 22px;
}

.uc-pending {
    padding: 16px;
    border: 1px dashed rgba(14, 165, 233, .35);
    border-radius: var(--r-ctrl);
    background: var(--tint);
}

.uc-pending b {
    display: block;
    font-size: 15px;
    font-weight: 400;
}

.uc-pending p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.uc-strong {
    color: var(--text);
}

.uc-steps {
    max-width: 560px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: uc-step;
}

.uc-steps li {
    position: relative;
    padding-left: 34px;
    counter-increment: uc-step;
}

.uc-steps li + li {
    margin-top: 14px;
}

.uc-steps li::before {
    content: counter(uc-step);
    position: absolute;
    top: 1px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(14, 165, 233, .35);
    border-radius: 50%;
    background: var(--tint);
    font-size: 13px;
    color: var(--accent-ink);
}

.uc-steps b {
    display: block;
    font-size: 15px;
    font-weight: 400;
}

.uc-steps span {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    color: var(--muted);
}

.uc-empty-box {
    margin: 0;
    padding: 22px;
    border: 1px dashed var(--control);
    border-radius: var(--r-ctrl);
    font-size: 14px;
    color: var(--muted);
}

/* ---------- 通道管理 ---------- */

.uc-ch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.uc-ch-actions .uc-btn {
    height: 32px;
    padding: 0 14px;
}

.uc-toasts {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.uc-toast {
    max-width: 380px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-ctrl);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
    word-break: break-all;
}

.uc-toast.is-ok {
    border-color: rgba(5, 150, 105, .35);
    color: var(--positive);
}

.uc-toast.is-error {
    border-color: rgba(220, 38, 38, .35);
    color: var(--negative);
}

@media (max-width: 720px) {
    .uc-toasts {
        left: 16px;
        right: 16px;
        bottom: 16px;
        align-items: stretch;
    }
}

.uc-ch-empty {
    margin: 0;
    padding: 28px 14px;
    font-size: 14px;
    line-height: 2;
    color: var(--muted);
    text-align: center;
}

/* 通道列表对齐 push-front share.html：浅灰表头 + 12–14px 中性色 + 胶囊类型/状态标签 */

.uc-ch-table-wrap {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.uc-ch-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    color: #444;
}

.uc-ch-table th,
.uc-ch-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.uc-ch-table th {
    background: #fafafa;
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

.uc-ch-table tbody tr:last-child td {
    border-bottom: 0;
}

.uc-ch-table th:nth-child(1) { width: 82px; }
.uc-ch-table th:nth-child(1),
.uc-ch-table td:nth-child(1) {
    padding-left: 12px;
    padding-right: 12px;
}

.uc-ch-table th:nth-child(2) { width: 150px; }
.uc-ch-table th:nth-child(3) { width: 180px; }
.uc-ch-table th:nth-child(4) { width: 160px; }
.uc-ch-table th:nth-child(5) { width: 170px; }
.uc-ch-table th:nth-child(6) { width: 320px; }

.uc-ch-table th:nth-child(3),
.uc-ch-table td:nth-child(3) {
    text-align: left;
}

.uc-ch-type {
    display: inline-block;
    max-width: 100%;
    padding: 1px 8px;
    border-radius: 10px;
    background: #f2f5f7;
    color: #666;
    font-size: 13px;
    line-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.uc-ch-type.is-parent {
    border: 0;
    background: #eaf7f1;
    color: #4eb389;
}

.uc-ch-qr-cell {
    width: 150px;
}

.uc-ch-qr-cell img {
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 auto;
    border: 0;
    border-radius: 4px;
    background: #fff;
    cursor: zoom-in;
}

.uc-ch-name-cell {
    min-width: 180px;
}

.uc-ch-name-cell .uc-name {
    display: inline;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.uc-ch-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 8px;
    background: #eaf7f1;
    color: #4eb389;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    vertical-align: middle;
}

.uc-ch-badge.is-off {
    background: #fdeceb;
    color: #f44a40;
}

.uc-ch-code-cell {
    width: 160px;
}

.uc-ch-code {
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    color: #666;
}

.uc-ch-time {
    width: 170px;
    font-size: 14px;
    color: #444;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.uc-ch-ops {
    width: 320px;
    white-space: nowrap;
}

.uc-ch-op {
    display: inline-block;
    height: 28px;
    padding: 0 12px;
    border: 1px solid #4eb389;
    border-radius: 3px;
    background: #fff;
    color: #4eb389;
    font-family: inherit;
    font-size: 12px;
    line-height: 26px;
    cursor: pointer;
    transition: all .3s ease;
}

.uc-ch-op:hover {
    background: #4eb389;
    color: #fff;
}

.uc-ch-op + .uc-ch-op {
    margin-left: 6px;
}

.uc-ch-op.is-info {
    border-color: #38a4ff;
    color: #1296db;
}

.uc-ch-op.is-info:hover {
    background: #38a4ff;
    color: #fff;
}

.uc-ch-op.is-primary {
    background: #4eb389;
    color: #fff;
}

.uc-ch-op.is-primary:hover {
    background: #3da076;
    border-color: #3da076;
    color: #fff;
}

/* 通道名右侧的「推送记录」按钮（仅浏览器类型通道），与 push-front share.html 一致 */
.uc-ch-op.is-name {
    height: 24px;
    margin-left: 6px;
    padding: 0 10px;
    line-height: 22px;
    vertical-align: middle;
}

.uc-ch-op.is-danger {
    border-color: #f44a40;
    color: #f44a40;
}

.uc-ch-op.is-danger:hover {
    background: #f44a40;
    color: #fff;
}

@media (max-width: 992px) {
    .uc-ch-table th:nth-child(2),
    .uc-ch-table td:nth-child(2),
    .uc-ch-table th:nth-child(5),
    .uc-ch-table td:nth-child(5) {
        display: none;
    }

    .uc-ch-table {
        min-width: 700px;
    }

    .uc-ch-table th:nth-child(6) {
        width: 260px;
    }
}

/* ---------- 弹窗 ---------- */

.uc-dialog {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(17, 20, 24, .12);
}

.uc-dialog::backdrop {
    background: rgba(17, 20, 24, .32);
}

.uc-dialog-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--rule);
}

.uc-dialog-hd h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
}

.uc-dialog-x {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: var(--r-ctrl);
    background: none;
    color: var(--muted);
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
}

.uc-dialog-x:hover {
    background: var(--raised);
    color: var(--text);
}

.uc-dialog-bd {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 62vh;
    padding: 18px 20px;
    overflow: auto;
}

.uc-dialog-ft {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--rule);
}

.uc-dialog .uc-field {
    margin: 0;
}

.uc-dialog .uc-field[hidden] {
    display: none;
}

.uc-dialog .uc-field input,
.uc-dialog .uc-field select {
    display: block;
    width: 100%;
    max-width: none;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--control);
    border-radius: var(--r-ctrl);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

.uc-dialog .uc-field input:focus,
.uc-dialog .uc-field select:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: -1px;
}

.uc-dialog-target {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
    word-break: break-all;
}

.uc-dialog-target:empty {
    display: none;
}

/* 测试推送弹窗底部展示的免鉴权推送网址 */
.uc-test-api {
    margin: 0;
    padding: 8px 10px;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
    background: #f8f9fa;
    border: 1px solid var(--rule);
    border-radius: 6px;
    word-break: break-all;
}

.uc-test-api:empty {
    display: none;
}

.uc-dialog-err {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--pill-negative-ink);
}

.uc-dialog-err[hidden] {
    display: none;
}

/* 二维码浮层：照 push-server-frontend 的 .qr-modal / .modal-close，只有右上角一个 × */
.uc-qr {
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 30px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    background: var(--surface);
    color: var(--text);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .12);
}

.uc-qr::backdrop {
    background: rgba(17, 20, 24, .32);
}

.uc-qr-x {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    outline: none;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 21px;
    line-height: 26px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.uc-qr-x:hover {
    background: var(--rule);
    color: var(--text);
}

.uc-qr-x:focus,
.uc-qr-x:focus-visible {
    outline: none;
}

.uc-qr-name {
    margin: 0 0 8px;
    padding: 0 24px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    word-break: break-all;
}

.uc-qr-name:empty {
    display: none;
}

.uc-qr-big-wrap {
    display: flex;
    justify-content: center;
    padding: 6px 0 10px;
}

.uc-qr img {
    display: block;
    width: 320px;
    height: 320px;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--r-ctrl);
    background: #fff;
}

.uc-qr-records {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.uc-qr-records a {
    color: var(--link);
    text-decoration: none;
    cursor: pointer;
}

.uc-qr-records a:hover {
    text-decoration: underline;
}

/* ---------- 访客页（登录 / 注册） ---------- */

body.uc-guest {
    background: var(--ground);
}

.uc-guest-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 64px 16px 32px;
}

.uc-brand-center {
    padding: 0;
}

.uc-guest-main {
    width: 100%;
    max-width: 400px;
}

.uc-card {
    margin-top: 20px;
    padding: 28px 26px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
}

.uc-card h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 400;
}

.uc-sub {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--muted);
}

.uc-card label {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--text);
}

.uc-card input {
    display: block;
    width: 100%;
    height: 38px;
    margin-top: 6px;
    padding: 0 12px;
    border: 1px solid var(--control);
    border-radius: var(--r-ctrl);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

.uc-card input:focus {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
    border-color: var(--accent);
}

.uc-card .uc-btn {
    width: 100%;
    height: 38px;
    margin-top: 4px;
    font-size: 15px;
}

.uc-alt {
    margin: 16px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.uc-hint {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--faint);
}

.uc-ft {
    margin-top: 28px;
    font-size: 14px;
    color: var(--faint);
}

/* ---------- 手机 ---------- */

@media (max-width: 900px) {
    body.uc-lock {
        overflow: hidden;
    }

    .uc-mbar {
        position: sticky;
        top: 0;
        z-index: 10;
        display: flex;
        align-items: center;
        gap: 4px;
        height: 52px;
        padding: 0 8px;
        background: var(--ground);
        border-bottom: 1px solid var(--border);
    }

    .uc-mbtn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: var(--r-ctrl);
        background: none;
        color: var(--text);
        cursor: pointer;
    }

    .uc-mbtn:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: -2px;
    }

    .uc-mbar-title {
        font-size: 16px;
    }

    .uc-shell {
        display: block;
        min-height: 0;
    }

    .uc-side {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 30;
        width: 264px;
        height: auto;
        padding: 20px 12px 18px;
        background: var(--surface);
        border-right: 1px solid var(--border);
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    .uc-side.open {
        transform: none;
    }

    .uc-scrim {
        position: fixed;
        inset: 0;
        z-index: 20;
        background: rgba(17, 20, 24, .32);
    }

    .uc-canvas {
        padding: 20px 16px 40px;
    }

    .uc-title {
        margin-bottom: 18px;
    }

    .uc-title h1 {
        font-size: 21px;
    }

    .uc-title p {
        font-size: 14px;
    }

    .uc-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .uc-kpi {
        padding: 14px 16px;
    }

    .uc-kpi:nth-child(odd) {
        border-left: 0;
    }

    .uc-kpi:nth-child(n + 3) {
        border-top: 1px solid var(--rule);
    }

    .uc-kpi-lead b {
        font-size: 27px;
    }

    .uc-kpi b {
        font-size: 23px;
    }

    .uc-setting {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 20px 16px;
    }

    .uc-panel-hd,
    .uc-panel-ft {
        padding-left: 16px;
        padding-right: 16px;
    }

    .uc-table th,
    .uc-table td {
        padding-left: 16px;
        padding-right: 16px;
    }

    .uc-col-check {
        width: 84px;
    }

    .uc-field input {
        max-width: none;
    }

    .uc-panel-ft {
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .uc-foot-note {
        display: none;
    }

    .uc-td-name {
        width: auto;
    }

    .uc-table th,
    .uc-table td {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .uc-switch i,
    .uc-switch i::after,
    .uc-side {
        transition: none;
    }
}
