/* 祈福机管理后台 — 科技感样式 + 移动端适配 */
:root {
    --admin-primary: #22d3ee;
    --admin-primary-dark: #06b6d4;
    --admin-primary-soft: rgba(34, 211, 238, 0.12);
    --admin-accent: #38bdf8;
    --admin-bg: #070b14;
    --admin-surface: #111827;
    --admin-surface-elevated: #172033;
    --admin-text: #e8eef6;
    --admin-muted: #94a3b8;
    --admin-border: rgba(34, 211, 238, 0.14);
    --admin-radius: 12px;
    --admin-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    --admin-header-h: 58px;
    --admin-bottom-nav-h: 64px;
    --admin-sidebar-w: 280px;
    --admin-sidebar-bg: #070b14;
    --admin-sidebar-text: rgba(203, 213, 225, 0.92);
    --admin-sidebar-active: #0e7490;
    --admin-safe-bottom: env(safe-area-inset-bottom, 0px);
    --neon-cyan: #22d3ee;
    --neon-purple: #38bdf8;
    --neon-blue: #38bdf8;
    --glow-cyan: 0 0 16px rgba(34, 211, 238, 0.28);
    --glow-purple: 0 0 12px rgba(56, 189, 248, 0.2);
    /* 顶栏控件（主题切换 / 个人信息）— 形状共用，主题只改色 */
    --admin-top-ctrl-border: rgba(148, 163, 184, 0.28);
    --admin-top-ctrl-bg: rgba(30, 41, 59, 0.65);
    --admin-top-ctrl-color: #e2e8f0;
    --admin-top-ctrl-hover-bg: rgba(51, 65, 85, 0.85);
    --admin-top-ctrl-hover-color: #f8fafc;
    --admin-top-ctrl-hover-border: rgba(148, 163, 184, 0.35);
    --admin-top-ctrl-accent: #60a5fa;
    --admin-theme-icon-color: #fbbf24;
    --admin-theme-icon-hover-color: #fde68a;
    /* 手机列表 / 卡片层级（深浅色由 admin-theme.css 覆盖） */
    --admin-list-bg: #0a0f1a;
    --admin-subtle-bg: #141c2b;
    --admin-inset-bg: #121a2a;
    --admin-row-border: rgba(148, 163, 184, 0.12);
    --admin-dashed-border: rgba(148, 163, 184, 0.2);
    --admin-group-head-bg: rgba(26, 37, 56, 0.92);
    --admin-icon-surface: #1a2538;
    --admin-strong-text: #f8fafc;
    --admin-chip-bg: #1e293b;
    --admin-chip-text: #cbd5e1;
}

* { box-sizing: border-box; }

body.admin-app {
    background: linear-gradient(165deg, #070b14 0%, #0a101c 48%, #070b14 100%);
    background-color: var(--admin-bg);
    color: var(--admin-text);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
    padding-bottom: calc(var(--admin-bottom-nav-h) + var(--admin-safe-bottom) + 16px);
    min-height: 100vh;
}

@media (min-width: 992px) {
    body.admin-app {
        padding-bottom: 24px;
    }
}

/* —— 桌面侧边栏 —— */
.admin-shell {
    min-height: 100vh;
}

.admin-sidebar {
    display: none;
}

@media (min-width: 992px) {
    .admin-shell {
        display: flex;
        min-height: 100vh;
    }

    .admin-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--admin-sidebar-w);
        min-width: var(--admin-sidebar-w);
        max-width: var(--admin-sidebar-w);
        flex-shrink: 0;
        overflow-x: hidden;
        z-index: 1050;
        background: var(--admin-sidebar-bg);
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.35);
        border-right: 1px solid rgba(255, 255, 255, 0.04);
    }

    .admin-sidebar-brand {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
        padding: 1.1rem 1rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        flex-shrink: 0;
    }

    .admin-sidebar-brand-main {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        min-width: 0;
        color: #fff;
        text-decoration: none;
        flex: 1;
    }

    .admin-sidebar-brand-main:hover {
        color: #fff;
        opacity: 0.92;
    }

    .admin-sidebar-brand-copy {
        display: flex;
        flex-direction: column;
        min-width: 0;
        gap: 0.12rem;
        flex: 1;
    }

    .admin-sidebar-brand-title-row {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        min-width: 0;
    }

    .admin-sidebar-brand-logo {
        display: grid;
        grid-template-columns: repeat(2, 8px);
        gap: 4px;
        flex-shrink: 0;
    }

    .admin-sidebar-brand--has-logo .admin-sidebar-brand-main {
        align-items: center;
    }

    .admin-sidebar-brand-logo--img {
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        height: 46px;
        max-width: 148px;
        flex-shrink: 0;
        overflow: hidden;
        border-radius: 12px;
        padding: 4px 8px;
        background:
            linear-gradient(165deg, #ffffff 0%, #f0fdff 55%, #e0f7fa 100%);
        border: 1px solid rgba(103, 232, 249, 0.4);
        box-shadow:
            0 6px 16px rgba(0, 0, 0, 0.22),
            0 0 14px rgba(34, 211, 238, 0.14);
    }

    .admin-sidebar-brand-logo--img .admin-sidebar-brand-logo-img {
        display: block;
        width: auto;
        height: 100%;
        max-width: 132px;
        padding: 0;
        border-radius: 0;
        object-fit: contain;
        object-position: center;
    }

    .admin-sidebar-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }

    .admin-sidebar-dot--1 { background: #a855f7; }
    .admin-sidebar-dot--2 { background: #22c55e; }
    .admin-sidebar-dot--3 { background: #f97316; }
    .admin-sidebar-dot--4 { background: #3b82f6; }

    .admin-sidebar-brand-text {
        line-height: 1.25;
        font-weight: 700;
        font-size: 1.05rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .admin-sidebar-brand-sub {
        align-self: flex-start;
        font-size: 0.72rem;
        color: rgba(148, 163, 184, 0.95);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* 兼容旧结构：单图标品牌 */
    .admin-sidebar-brand-icon {
        width: 44px;
        height: 44px;
        border-radius: 11px;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(124, 77, 255, 0.2));
        border: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .admin-sidebar-nav {
        flex: 1;
        overflow-y: auto;
        padding: 0.65rem 0.55rem;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    }

    .admin-sidebar-nav::-webkit-scrollbar {
        width: 4px;
    }

    .admin-sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 4px;
    }

    .admin-sidebar-link {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        box-sizing: border-box;
        min-height: 3.05rem;
        padding: 0.55rem 0.7rem 0.55rem 0.65rem;
        border-radius: 12px;
        color: var(--admin-sidebar-text);
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
        line-height: 1.35;
        transition: background 0.15s, color 0.15s;
    }

    .admin-sidebar-link-text {
        flex: 1;
        min-width: 0;
    }

    .admin-sidebar-link i.bi:first-child {
        font-size: 1.15rem;
        width: 1.35rem;
        text-align: center;
        flex-shrink: 0;
        opacity: 0.88;
    }

    .admin-sidebar-chevron {
        font-size: 0.75rem;
        opacity: 0.55;
        transition: transform 0.2s ease;
        flex-shrink: 0;
    }

    .admin-sidebar-link:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.06);
    }

    .admin-sidebar-link.active {
        color: #fff;
        background: var(--admin-sidebar-active);
        font-weight: 500;
        border: none;
        box-shadow: none;
    }

    .admin-sidebar-link.active i {
        opacity: 1;
    }

    .admin-sidebar-group {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .admin-sidebar-link.parent-active {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

    .admin-sidebar-group.is-open .admin-sidebar-chevron {
        transform: rotate(180deg);
    }

    .admin-sidebar-subnav {
        display: none;
        flex-direction: column;
        gap: 0.05rem;
        padding: 0.15rem 0 0.25rem 0.25rem;
        margin-left: 1.85rem;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
    }

    .admin-sidebar-group.is-open .admin-sidebar-subnav {
        display: flex;
    }

    .admin-sidebar-sublink {
        display: flex;
        align-items: center;
        box-sizing: border-box;
        min-height: 3.05rem;
        padding: 0.55rem 0.75rem 0.55rem 0.85rem;
        border-radius: 12px;
        color: rgba(203, 213, 225, 0.72);
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
        line-height: 1.35;
        border: 1px solid transparent;
        transition: background 0.15s, color 0.15s, border-color 0.15s;
    }

    .admin-sidebar-sublink:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

    .admin-sidebar-sublink.active {
        color: #fff;
        background: rgba(37, 99, 235, 0.35);
        font-weight: 500;
    }

    .admin-sidebar-foot {
        flex-shrink: 0;
        padding: 0.65rem 0.75rem 0.85rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        background: rgba(0, 0, 0, 0.12);
    }

    .admin-sidebar-foot-link {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.55rem 0.95rem;
        border-radius: 8px;
        color: var(--admin-sidebar-text);
        text-decoration: none;
        font-size: 0.95rem;
        transition: background 0.15s;
    }

    .admin-sidebar-foot-link:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.06);
    }

    .admin-theme-picker--sidebar {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 0.4rem 0.45rem 0.45rem;
        border: 1px solid rgba(148, 163, 184, 0.35);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.03);
    }

    .admin-theme-picker-caption {
        font-size: 0.65rem;
        letter-spacing: 0.04em;
        color: rgba(148, 163, 184, 0.9);
        padding-left: 0.1rem;
    }

    .admin-theme-picker-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.25rem;
    }

    .admin-theme-pick {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.1rem;
        min-width: 0;
        padding: 0.28rem 0.15rem;
        border: 1px solid transparent;
        border-radius: 6px;
        background: rgba(15, 23, 42, 0.35);
        color: rgba(203, 213, 225, 0.9);
        font-size: 0.62rem;
        line-height: 1.15;
        cursor: pointer;
        transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    }

    .admin-theme-pick .bi {
        font-size: 0.78rem;
        line-height: 1;
    }

    .admin-theme-pick span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-theme-pick:hover {
        color: #fff;
        border-color: rgba(148, 163, 184, 0.45);
        background: rgba(255, 255, 255, 0.06);
    }

    .admin-theme-pick.is-active {
        color: #fff;
        border-color: rgba(56, 189, 248, 0.55);
        background: rgba(56, 189, 248, 0.16);
        box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.12);
    }

    .admin-sidebar-group-toggle {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        border: none;
        background: transparent;
        text-align: left;
        font: inherit;
        color: inherit;
        line-height: inherit;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }

    button.admin-sidebar-link {
        font-family: inherit;
    }

    .admin-sidebar-todos {
        margin: 0 0 0.45rem;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .admin-sidebar-todos .admin-sidebar-tools {
        margin-bottom: 0;
    }

    .admin-sidebar-todos-toggle {
        position: relative;
    }

    .admin-sidebar-todos-badge {
        position: absolute;
        top: 0.15rem;
        right: 0.2rem;
        min-width: 1rem;
        padding: 0 0.28rem;
        border-radius: 999px;
        background: rgba(212, 181, 106, 0.95);
        color: #1a1408;
        font-style: normal;
        font-size: 0.68rem;
        line-height: 1.05rem;
        text-align: center;
    }

    .admin-sidebar-todos-badge.is-due {
        background: #f59e0b;
    }

    .admin-sidebar-todos-due {
        margin: 0.35rem 0 0.1rem;
        color: #fbbf24;
        font-size: 0.72rem;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: pointer;
    }

    .admin-sidebar-version {
        margin: 0;
        text-align: center;
        font-size: 0.78rem;
        color: rgba(148, 163, 184, 0.85);
        line-height: 1.4;
    }

    .admin-sidebar-foot-exit {
        margin-top: 0.35rem;
        color: #ff8a80;
        background: rgba(255, 82, 82, 0.12);
        font-weight: 600;
        border: 1px solid rgba(255, 82, 82, 0.2);
    }

    .admin-sidebar-foot-exit:hover {
        background: rgba(255, 82, 82, 0.25);
        color: #fff;
    }

    .admin-body {
        flex: 1;
        min-width: 0;
        width: calc(100% - var(--admin-sidebar-w));
        margin-left: var(--admin-sidebar-w);
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        background: var(--admin-bg);
    }

    .admin-header {
        display: none;
    }

    .admin-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        flex-shrink: 0;
        min-height: 52px;
        padding: 0 1.5rem;
        background: rgba(10, 22, 46, 0.95);
        border-bottom: 1px solid rgba(0, 229, 255, 0.08);
        position: sticky;
        top: 0;
        z-index: 1020;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .admin-topbar-page {
        min-width: 0;
    }

    .admin-topbar-label {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--admin-text);
        letter-spacing: 0.01em;
    }

    .admin-topbar-meta {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        gap: 0.5rem;
        font-size: 0.82rem;
        color: var(--admin-muted);
    }

    .admin-topbar-user {
        color: var(--admin-muted);
        padding-left: 0.85rem;
        border-left: 1px solid rgba(0, 229, 255, 0.1);
    }

    .admin-main {
        max-width: none !important;
        width: 100%;
        margin: 0 !important;
        padding: 1.15rem 1.35rem 1.25rem;
        flex: 1;
        min-width: 0;
    }

    .admin-page-head {
        display: block;
        margin: 0 0 1.15rem;
        padding: 0;
    }

    .admin-page-head .admin-page-title {
        margin: 0;
        font-size: 1.35rem;
        font-weight: 700;
        color: var(--admin-text);
        letter-spacing: -0.02em;
    }

    .admin-page-head .lead {
        margin: 0.35rem 0 0;
        font-size: 0.875rem;
        color: var(--admin-muted);
    }

    .admin-page-head:not(.admin-page-head--sub) .lead {
        display: none;
    }

    .admin-main .card,
    .admin-main .rev-page,
    .admin-main .admin-card,
    .admin-main .admin-filter-card,
    .admin-main .admin-search-card,
    .admin-main .admin-stat-grid,
    .admin-main .dash-desktop-only,
    .admin-main .dev-desktop-only,
    .admin-main .ord-desktop-only,
    .admin-main .crm-desktop-only,
    .admin-main .pay-tabs,
    .admin-main .pay-panel,
    .admin-main > form,
    .admin-main > .row,
    .admin-main > section {
        width: 100%;
        max-width: none;
    }

    .rev-page,
    .rev-filter-form {
        width: 100%;
        max-width: none;
    }

    .rev-filter-form .rev-export-btn {
        margin-left: auto;
    }

    .table-responsive {
        width: 100%;
    }
}

/* —— 顶栏（手机 / 平板） —— */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: linear-gradient(180deg, #0a1628 0%, #0b1a30 70%, #0c1f38 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(34, 211, 238, 0.1);
    border-bottom: 1px solid rgba(34, 211, 238, 0.08);
}

.admin-header .header-inner {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: var(--admin-header-h);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.admin-brand:hover { color: #fff; opacity: 0.92; }

.admin-brand-text { display: none; }
@media (min-width: 400px) {
    .admin-brand-text { display: inline; }
}

.admin-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 3px;
    border-radius: 12px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 255, 0.94));
    border: 1px solid rgba(34, 211, 238, 0.28);
    box-shadow:
        0 0 0 1px rgba(8, 17, 31, 0.25),
        0 6px 16px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.admin-brand-logo-img {
    display: block;
    height: 36px;
    width: auto;
    max-width: 118px;
    border-radius: 8px;
    background: transparent;
    padding: 0;
    object-fit: contain;
    object-position: center;
}

.admin-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(124, 77, 255, 0.2));
    border: 1px solid rgba(0, 229, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: var(--glow-cyan);
}

.admin-nav-toggle {
    display: none;
    border: 0;
    background: rgba(0, 229, 255, 0.1);
    color: var(--neon-cyan);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-left: auto;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

@media (max-width: 991.98px) {
    .admin-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

.admin-tabs-wrap {
    flex: 1;
    min-width: 0;
}

@media (max-width: 991.98px) {
    .admin-tabs-wrap {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: var(--admin-header-h);
        background: linear-gradient(180deg, #0a1225 0%, #0a1628 100%);
        padding: 0.75rem 1rem 1rem;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(0, 229, 255, 0.1);
        border-bottom: 1px solid rgba(0, 229, 255, 0.08);
    }
    .admin-tabs-wrap.show { display: block; }
    .admin-tabs {
        flex-direction: column;
        align-items: stretch;
        overflow: visible;
    }
    .admin-tab {
        border-radius: 10px;
        padding: 0.65rem 1rem;
    }
    .admin-tab.active {
        background: rgba(255, 255, 255, 0.95);
    }
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .admin-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-tab { font-size: 0.82rem; white-space: nowrap; }
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    color: rgba(224, 232, 240, 0.9);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.admin-tab:hover { color: #fff; background: rgba(0, 229, 255, 0.1); }

.admin-tab.active {
    color: #050a18;
    background: var(--neon-cyan);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 229, 255, 0.3), var(--glow-cyan);
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.admin-header-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.12);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 229, 255, 0.2);
    line-height: 1.2;
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    body.admin-index-mobile .admin-header-badge {
        display: none !important;
    }

    body.admin-index-mobile .admin-actions,
    body.admin-revenue-mobile .admin-actions,
    body.admin-me-mobile .admin-actions {
        margin-left: 0;
        padding-right: 0;
    }

    .admin-header .admin-actions .admin-theme-dropdown,
    .admin-header .admin-actions .admin-theme-toggle,
    .admin-header .admin-actions .admin-click-sound-toggle,
    .admin-header .admin-actions .admin-ui-toggle {
        display: none !important;
    }

    /* 商户手机端：顶栏右侧显示音效 / 界面 / 主题（账户菜单已迁到「我的」） */
    body.portal-merchant .admin-header .admin-actions .admin-theme-dropdown,
    body.portal-merchant .admin-header .admin-actions .admin-theme-toggle,
    body.portal-merchant .admin-header .admin-actions .admin-click-sound-toggle,
    body.portal-merchant .admin-header .admin-actions .admin-ui-toggle {
        display: inline-flex !important;
    }

    .admin-header .admin-actions {
        gap: 0.35rem;
    }
}

@media (max-width: 991.98px) {
    .admin-actions .btn-header-label { display: none; }
}

.admin-actions .btn-header {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    border-radius: 9px;
    font-size: 0.82rem;
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--neon-cyan);
    background: rgba(0, 229, 255, 0.08);
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s;
}

.admin-actions .btn-header:hover { background: rgba(0, 229, 255, 0.15); color: #fff; box-shadow: var(--glow-cyan); }

.admin-actions .btn-header.btn-exit {
    background: var(--neon-cyan);
    color: #050a18;
    border-color: transparent;
    font-weight: 600;
}
/* —— 底部导航（手机） —— */
.admin-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1035;
    height: calc(var(--admin-bottom-nav-h) + var(--admin-safe-bottom));
    padding-bottom: var(--admin-safe-bottom);
    background: rgba(8, 14, 28, 0.92);
    border-top: 1px solid rgba(34, 211, 238, 0.12);
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

@media (max-width: 991.98px) {
    .admin-bottom-nav { display: flex; }
    /* 支付配置表单复杂，仅桌面端维护 */
    .admin-tabs a[href*="pay_config.php"],
    .admin-bottom-nav a[href*="pay_config.php"] {
        display: none !important;
    }
}

.admin-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    text-decoration: none;
    color: var(--admin-muted);
    font-size: 0.72rem;
    padding: 0.4rem 0.2rem;
    min-height: 44px;
    transition: color 0.22s ease, text-shadow 0.22s ease, transform 0.15s ease;
}

.admin-bottom-nav a i {
    font-size: 1.28rem;
    line-height: 1;
    transition: transform 0.18s ease, filter 0.22s ease;
}

.admin-bottom-nav a.active {
    color: #67e8f9;
    font-weight: 650;
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.28);
}

.admin-bottom-nav a.active i {
    transform: translateY(-1px);
    filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.45));
}

.admin-bottom-nav a:active {
    transform: scale(0.96);
}

.portal-more-page {
    max-width: 520px;
    margin: 0 auto;
}

.portal-more-page .m-home-grid {
    background: transparent;
    box-shadow: none !important;
}

.m-home-grid {
    position: relative;
}

.m-home-grid-edit {
    background: rgba(0, 229, 255, 0.12);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.m-home-grid-edit:hover {
    background: rgba(0, 229, 255, 0.2);
    color: var(--neon-cyan);
}

.home-grid-sort-item {
    user-select: none;
}

@media (max-width: 991.98px) {
    .admin-more-mobile .admin-page-head,
    body.admin-app[class*="admin-more"] .admin-page-head {
        display: none;
    }
}

/* —— 主内容 —— */
@media (max-width: 991.98px) {
    .admin-topbar {
        display: none !important;
    }
}

.admin-main {
    padding: 1rem 0.75rem;
}

@media (max-width: 991.98px) {
    .admin-main {
        max-width: 1320px;
        margin: 0 auto;
    }
}

.admin-page-head {
    margin-bottom: 1rem;
}

.admin-page-head h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.admin-page-head .lead {
    color: var(--admin-muted);
    font-size: 0.875rem;
    margin: 0;
}



.admin-card .card-header,
.admin-card > .admin-card-header {
    background: linear-gradient(180deg, rgba(26, 37, 56, 0.98) 0%, rgba(21, 29, 46, 0.95) 100%);
    border-bottom: 1px solid var(--admin-border);
    padding: 0.85rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--admin-text);
}

.admin-card .card-body { padding: 1rem; }

.card.admin-card,
.card {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    margin-bottom: 1rem;
    background: var(--admin-surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card .card-header {
    background: linear-gradient(180deg, rgba(26, 37, 56, 0.98) 0%, rgba(21, 29, 46, 0.95) 100%);
    border-bottom: 1px solid var(--admin-border);
    font-weight: 600;
    color: var(--admin-text);
}

/* —— 统计块 —— */
.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 576px) {
    .admin-stat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
    .admin-stat-grid { grid-template-columns: repeat(6, 1fr); }
}

.admin-stat-card {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    padding: 0.85rem 0.75rem;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.admin-stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), var(--glow-cyan); border-color: rgba(0, 229, 255, 0.2); }

.admin-stat-card .label {
    font-size: 0.75rem;
    color: var(--admin-muted);
    margin-bottom: 0.25rem;
}

.admin-stat-card .value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--neon-cyan);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .admin-stat-card .value { font-size: 1.35rem; }
}

.admin-highlight {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.08) 0%, rgba(10, 22, 46, 0.9) 100%);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: var(--admin-radius);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #69f0ae;
}

.admin-highlight .amount {
    font-size: 1.25rem;
    color: var(--neon-cyan);
}

.admin-highlight-sep {
    margin: 0 0.75rem;
    color: rgba(120, 144, 156, 0.5);
    font-weight: 400;
}

/* —— 统计概览（控制台） —— */
.dash-kpi-card {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    padding: 1.25rem 1.35rem 1rem;
    display: flex;
    flex-direction: column;
    min-height: 148px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dash-kpi-card:hover {
    border-color: rgba(0, 229, 255, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05), var(--glow-cyan);
}

/* —— 电脑版首页「常用功能」宫格 —— */
.dash-common-card {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    padding: 0.75rem 0.85rem 0.85rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dash-common-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    padding: 0 0.15rem;
}

.dash-common-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--admin-text);
    letter-spacing: 0.02em;
}

.dash-common-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: var(--admin-muted);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.dash-common-edit:hover {
    color: var(--neon-cyan, #22d3ee);
    background: rgba(0, 229, 255, 0.08);
}

.dash-common-grid {
    --dash-common-cols: 3;
    display: grid;
    grid-template-columns: repeat(var(--dash-common-cols), 1fr);
    flex: 1;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.25);
}

.dash-common-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 0;
    padding: 0.55rem 0.35rem;
    text-decoration: none;
    color: var(--admin-text);
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    transition: background 0.15s, color 0.15s;
}

.dash-common-item:nth-child(3n) {
    border-right: none;
}

.dash-common-item:nth-last-child(-n+3) {
    border-bottom: none;
}

.dash-common-item:hover {
    background: rgba(0, 229, 255, 0.08);
    color: var(--neon-cyan, #22d3ee);
}

.dash-common-item--empty {
    pointer-events: none;
    background: transparent;
}

.dash-common-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.25rem;
    color: #fff;
    background: linear-gradient(145deg, #38bdf8, #2563eb);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.dash-common-item:nth-child(3n+2) .dash-common-icon {
    background: linear-gradient(145deg, #fb7185, #e11d48);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28);
}

.dash-common-item:nth-child(3n+3) .dash-common-icon {
    background: linear-gradient(145deg, #34d399, #059669);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28);
}

.dash-common-item:nth-child(3n+4) .dash-common-icon {
    background: linear-gradient(145deg, #a78bfa, #7c3aed);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28);
}

.dash-common-item:nth-child(3n+5) .dash-common-icon {
    background: linear-gradient(145deg, #fbbf24, #d97706);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28);
}

.dash-common-item:nth-child(3n+6) .dash-common-icon {
    background: linear-gradient(145deg, #2dd4bf, #0d9488);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.28);
}

.dash-common-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--admin-surface);
}

.dash-common-label {
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 2px;
}

.dash-common-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 156px;
    padding: 1rem;
    color: var(--admin-muted);
    font-size: 0.85rem;
}

.dash-common-empty a {
    color: var(--neon-cyan, #22d3ee);
    text-decoration: none;
}

.dash-common-empty a:hover {
    text-decoration: underline;
}

.dash-kpi-label {
    font-size: 0.9rem;
    color: var(--admin-muted);
    margin-bottom: 0.5rem;
}

.dash-kpi-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--neon-cyan);
    line-height: 1.1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-kpi-value.dash-kpi-money {
    font-size: 2rem;
}

.dash-kpi-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-muted);
    margin-left: 0.15rem;
}

.dash-kpi-foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    border-top: 1px solid rgba(0, 229, 255, 0.08);
    padding-top: 0.65rem;
    margin-top: auto;
}

.dash-kpi-foot:has(> .dash-kpi-mini:only-child) {
    grid-template-columns: 1fr;
}

.dash-kpi-mini {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.32);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.dash-kpi-mini-label {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    font-size: 0.86rem;
    color: var(--admin-muted);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-kpi-mini-label .bi {
    font-size: 0.92rem;
    opacity: 0.88;
    flex-shrink: 0;
}

.dash-kpi-mini-val {
    font-size: 1.08rem;
    font-weight: 650;
    color: var(--admin-text);
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-kpi-mini-val--ok {
    color: #34d399;
}

.dash-kpi-mini-val--danger {
    color: #f87171;
}

.dash-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.85rem;
    color: var(--admin-text);
}

.dash-panel {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    padding: 1.25rem 1.35rem;
    min-height: 120px;
}

.dash-panel-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dash-panel-label {
    font-size: 0.88rem;
    color: var(--admin-muted);
}

.dash-panel-big {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--neon-cyan);
    line-height: 1.2;
    margin-top: 0.35rem;
}

.dash-empty {
    color: var(--admin-muted);
    text-align: center;
    padding: 1.5rem 0;
}

.dash-fault-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.dash-fault-list li {
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(0, 229, 255, 0.06);
    font-size: 0.875rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
}

.dash-fault-list li:last-child {
    border-bottom: none;
}

.dash-section-todos {
    margin-top: 0;
    margin-bottom: 0.75rem !important;
}

.dash-section-todos--chips {
    margin-top: -0.15rem;
}

.dash-todo-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.45rem;
    padding: 0.35rem 0.15rem;
}

.dash-todo-chips-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--admin-muted);
    margin-right: 0.15rem;
}

.dash-todo-chips-label .bi {
    font-size: 0.9rem;
}

.dash-todo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.28rem 0.55rem 0.28rem 0.45rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--admin-text);
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.12);
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.dash-todo-chip:hover {
    color: var(--neon-cyan, #22d3ee);
    border-color: rgba(0, 229, 255, 0.35);
    background: rgba(0, 229, 255, 0.06);
}

.dash-todo-chip .bi {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.dash-todo-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-todo-chip em {
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 1.15rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    text-align: center;
    background: rgba(148, 163, 184, 0.2);
    color: var(--admin-text);
}

.dash-todo-chip--warning {
    border-color: rgba(255, 214, 0, 0.28);
}

.dash-todo-chip--warning .bi {
    color: #ffd740;
}

.dash-todo-chip--warning em {
    background: rgba(255, 214, 0, 0.18);
    color: #ffd740;
}

.dash-todo-chip--danger {
    border-color: rgba(255, 82, 82, 0.3);
}

.dash-todo-chip--danger .bi {
    color: #ff5252;
}

.dash-todo-chip--danger em {
    background: rgba(255, 82, 82, 0.16);
    color: #ff6b6b;
}

.dash-todo-chip--info .bi {
    color: var(--neon-cyan, #22d3ee);
}

/* 故障 / 收益速览 — 左右并排 */
.dash-section-title--bar {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.dash-section-title--bar::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 0.95em;
    border-radius: 2px;
    background: var(--neon-cyan, #22d3ee);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.45);
    flex-shrink: 0;
}

.dash-panel-card {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.dash-panel-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

.dash-panel-card-head .dash-section-title {
    margin: 0;
}

.dash-panel-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.86rem;
    color: var(--admin-muted);
    white-space: nowrap;
}

.dash-fault-split {
    display: grid;
    grid-template-columns: minmax(5.5rem, 28%) minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.75rem 1rem 0.85rem;
    flex: 1;
    min-height: 0;
}

.dash-fault-split .dash-panel {
    min-height: 0;
    margin: 0;
    box-shadow: none;
    background: rgba(15, 23, 42, 0.35);
    border-color: rgba(0, 229, 255, 0.08);
    padding: 0.65rem 0.75rem;
}

.dash-fault-now .dash-panel-big {
    font-size: 2rem;
    margin-top: 0.25rem;
}

.dash-fault-recent .dash-fault-list {
    max-height: 9.5rem;
}

.dash-fault-recent--empty {
    display: flex;
    flex-direction: column;
}

.dash-fault-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem 0.35rem;
    min-height: 5.25rem;
    text-align: center;
}

.dash-fault-empty-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.14);
    color: #22c55e;
    font-size: 1.2rem;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18);
}

.dash-fault-empty-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--admin-muted);
    letter-spacing: 0.03em;
}

.dash-revenue-board .dash-revenue-split {
    display: grid;
    grid-template-columns: minmax(7.5rem, 30%) minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.75rem 1rem 0.85rem;
    flex: 1;
    min-height: 0;
}

.dash-revenue-board .dash-revenue-split--chart-only {
    grid-template-columns: 1fr;
}

.dash-revenue-side {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.dash-revenue-side .dash-metric {
    flex: 1;
    min-height: 0;
    padding: 0.6rem 0.7rem;
    box-shadow: none;
    background: rgba(15, 23, 42, 0.35);
    border-color: rgba(0, 229, 255, 0.08);
}

.dash-revenue-board .dash-chart-card {
    min-height: 0;
    height: 100%;
    margin: 0;
    box-shadow: none;
    background: rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(0, 229, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.dash-revenue-board .dash-chart-wrap {
    flex: 1;
    min-height: 180px;
}

/* 故障预览 — 单卡紧凑（旧结构兼容） */
.dash-fault-board {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    overflow: hidden;
}

.dash-fault-board-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

.dash-fault-board-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.dash-fault-board-title .dash-section-title {
    margin: 0;
}

.dash-fault-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.dash-fault-pill--ok {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.dash-fault-pill--warn {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.dash-fault-board-body {
    padding: 0.65rem 1rem 0.75rem;
}

.dash-section-fault--empty .dash-fault-board-body {
    padding: 0.55rem 1rem 0.65rem;
}

.dash-empty--inline {
    text-align: left;
    padding: 0.15rem 0;
    font-size: 0.88rem;
}

/* 收益预览 — 指标条 + 全宽图（独立区块时用） */
.dash-section-revenue > .dash-revenue-board {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dash-revenue-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.dash-metric {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    padding: 0.75rem 1rem;
    min-width: 0;
}

.dash-metric-label {
    font-size: 0.8rem;
    color: var(--admin-muted);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.dash-metric-hint {
    font-size: 0.72rem;
    opacity: 0.85;
}

.dash-metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1.25;
}

@media (max-width: 991.98px) {
    .dash-fault-split {
        grid-template-columns: 1fr;
    }

    .dash-revenue-board .dash-revenue-split {
        grid-template-columns: 1fr;
    }

    .dash-revenue-side {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .dash-revenue-board .dash-chart-wrap {
        min-height: 220px;
    }
}

@media (max-width: 767.98px) {
    .dash-revenue-side {
        grid-template-columns: 1fr;
    }
}

/* 统计概览底部：场地排行 + 最近订单 */
.dash-board-card {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.dash-board-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem 0.55rem;
    border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

.dash-board-head .dash-section-title {
    margin-bottom: 0;
}

.dash-board-sub {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: var(--admin-muted);
}

.dash-board-body {
    flex: 1;
    padding: 0.75rem 1rem 0.85rem;
    min-height: 0;
}

.dash-board-body--table {
    padding: 0;
}

.dash-place-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dash-place-rank-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}

.dash-place-rank-no {
    flex: 0 0 1.35rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--neon-cyan, #22d3ee);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35rem;
    text-align: center;
}

.dash-place-rank-item:nth-child(1) .dash-place-rank-no {
    background: rgba(251, 191, 36, 0.18);
    color: #f59e0b;
}

.dash-place-rank-item:nth-child(2) .dash-place-rank-no {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.dash-place-rank-item:nth-child(3) .dash-place-rank-no {
    background: rgba(180, 83, 9, 0.15);
    color: #d97706;
}

.dash-place-rank-main {
    flex: 1;
    min-width: 0;
}

.dash-place-rank-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.dash-place-rank-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--admin-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-place-rank-amt {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--neon-cyan, #22d3ee);
    white-space: nowrap;
}

.dash-place-rank-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.dash-place-rank-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.85), rgba(34, 211, 238, 0.9));
}

.dash-place-rank-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.72rem;
}

/* 结算/分账快照 */
.dash-settle-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.dash-settle-metric {
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(0, 229, 255, 0.08);
    min-width: 0;
}

.dash-settle-metric-label {
    font-size: 0.72rem;
    color: var(--admin-muted);
    margin-bottom: 0.2rem;
}

.dash-settle-metric-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--neon-cyan, #22d3ee);
    line-height: 1.2;
}

.dash-settle-metric-value--warn {
    color: #f87171;
}

.dash-settle-metric-meta {
    font-size: 0.68rem;
    margin-top: 0.15rem;
}

.dash-settle-share-list {
    margin-top: 0.15rem;
}

.dash-recent-table-wrap {
    max-height: 320px;
}

.dash-recent-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--admin-surface);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--admin-muted);
    border-bottom-color: rgba(0, 229, 255, 0.08);
    white-space: nowrap;
}

.dash-recent-table tbody td {
    font-size: 0.82rem;
    vertical-align: middle;
    border-bottom-color: rgba(0, 229, 255, 0.06);
}

.dash-recent-place {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-recent-table .badge {
    font-size: 0.68rem;
    font-weight: 600;
}

.m-home-todos {
    padding: 0.75rem 1rem;
}

.merchant-onboard-guide {
    margin-bottom: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.14);
}

.merchant-onboard-guide--prominent {
    padding: 0.85rem 0.95rem 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-left: 4px solid var(--admin-primary, #2563eb);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(59, 130, 246, 0.06) 48%, rgba(255, 255, 255, 0.92) 100%);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.m-home > .merchant-onboard-guide--prominent {
    margin: 0.65rem 0.75rem 0.35rem;
}

.dash-desktop-only > .merchant-onboard-guide--prominent {
    margin-bottom: 1rem;
}

.merchant-onboard-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.merchant-onboard-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.merchant-onboard-main {
    min-width: 0;
    flex: 1;
}

.merchant-onboard-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.2rem;
}

.merchant-onboard-progress-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #1e40af;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(37, 99, 235, 0.22);
}

.merchant-onboard-step-title {
    font-size: 0.98rem;
    line-height: 1.35;
    color: var(--admin-text, #1e293b);
    font-weight: 600;
}

.merchant-onboard-step-title strong {
    color: var(--admin-primary, #2563eb);
    font-weight: 800;
}

.merchant-onboard-step-hint {
    margin-top: 0.15rem;
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--admin-muted, #64748b);
}

.merchant-onboard-progress-bar {
    height: 6px;
    margin: 0.65rem 0 0.55rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.merchant-onboard-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    transition: width 0.35s ease;
}

.merchant-onboard-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    width: 100%;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.merchant-onboard-cta:hover,
.merchant-onboard-cta:focus {
    color: #fff !important;
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.merchant-onboard-cta i {
    font-size: 1.35rem;
    line-height: 1;
}

.merchant-onboard-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.merchant-onboard-bar-text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    min-width: 0;
    font-size: 0.82rem;
    line-height: 1.35;
}

.merchant-onboard-kicker {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--admin-primary-dark, #1e3a8a);
    white-space: nowrap;
}

.merchant-onboard-meta {
    color: var(--admin-muted, #64748b);
    font-size: 0.75rem;
    white-space: nowrap;
}

.merchant-onboard-next {
    color: var(--admin-text, #334155);
    min-width: 0;
}

.merchant-onboard-next strong {
    color: var(--admin-primary, #2563eb);
    font-weight: 700;
}

.merchant-onboard-btn {
    flex-shrink: 0;
    padding: 0.22rem 0.65rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

.merchant-onboard-track {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(37, 99, 235, 0.18);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.merchant-onboard-track::-webkit-scrollbar {
    display: none;
}

.merchant-onboard-track-line {
    flex: 0 0 0.65rem;
    height: 1px;
    background: rgba(100, 116, 139, 0.35);
}

.merchant-onboard-track-item {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
    font-size: 0.68rem;
    color: var(--admin-muted, #94a3b8);
}

.merchant-onboard-track-item > span,
.merchant-onboard-track-item > i {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 700;
    background: #e2e8f0;
    color: #64748b;
}

.merchant-onboard-track-item em {
    font-style: normal;
    font-weight: 600;
    font-size: 0.72rem;
}

.merchant-onboard-track-item--done {
    color: #15803d;
}

.merchant-onboard-track-item--done > i {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.merchant-onboard-track-item--current {
    color: #b45309;
    font-weight: 700;
}

.merchant-onboard-track-item--current > span {
    background: #f59e0b;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

@media (min-width: 992px) {
    .dash-desktop-only .merchant-onboard-guide--prominent {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem 1rem;
        padding: 1rem 1.15rem;
    }

    .dash-desktop-only .merchant-onboard-head {
        flex: 1 1 320px;
    }

    .dash-desktop-only .merchant-onboard-progress-bar {
        flex: 1 1 100%;
        order: 3;
        margin: 0;
    }

    .dash-desktop-only .merchant-onboard-cta {
        flex: 0 0 auto;
        width: auto;
        min-width: 7.5rem;
        order: 2;
        align-self: center;
        margin-left: auto;
    }

    .dash-desktop-only .merchant-onboard-track {
        flex: 1 1 100%;
        order: 4;
        margin-top: 0.15rem;
        padding-top: 0.55rem;
        display: flex;
    }
}

@media (max-width: 575.98px) {
    .merchant-onboard-track-item em {
        display: inline;
    }

    .merchant-onboard-step-title {
        font-size: 1.02rem;
    }
}

.m-home-todos-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.m-home-todos-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--admin-primary-dark);
}

.m-home-todos-empty {
    font-size: 0.82rem;
}

.m-home-todos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.m-home-todos-list li {
    border-top: 1px solid var(--admin-border);
}

.m-home-todos-list li:first-child {
    border-top: none;
}

.m-home-todos-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0;
    text-decoration: none;
    color: var(--admin-text);
    font-size: 0.82rem;
    min-width: 0;
}

.m-home-todos-link .flex-grow-1 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.m-home-todos-icon {
    color: var(--admin-primary);
    font-size: 1rem;
}

.merchant-notify-home-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--admin-text);
}

.merchant-notify-home-link:hover {
    color: var(--admin-primary);
    background: rgba(37, 99, 235, 0.04);
}

.merchant-notify-home-title {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--admin-primary-dark);
}

.merchant-notify-list .list-group-item {
    border-left: 3px solid transparent;
}

.merchant-notify-unread {
    border-left-color: #2563eb !important;
    background: rgba(37, 99, 235, 0.04);
}

.merchant-notify-list--compact .list-group-item {
    padding-left: 0;
    padding-right: 0;
    border-left: none;
    border-right: none;
}

.merchant-notify-list--compact .merchant-notify-unread {
    border-left: 3px solid #2563eb !important;
    padding-left: 0.65rem;
}

.merchant-notify-btn {
    position: relative;
}

.merchant-notify-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .m-home .merchant-notify-home {
        margin: 0.75rem 0.75rem 0;
    }
}

/* —— 切换账号 —— */
.acct-switch-page {
    max-width: 520px;
    margin: 0 auto;
}

.acct-switch-list {
    overflow: hidden;
    border-radius: var(--admin-radius);
    border: 1px solid rgba(0, 229, 255, 0.1);
}

.acct-switch-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0, 229, 255, 0.06);
    background: var(--admin-surface);
}

.acct-switch-item:last-child {
    border-bottom: none;
}

.acct-switch-item--current {
    background: rgba(0, 229, 255, 0.04);
}

.acct-switch-item--selectable {
    cursor: pointer;
    margin: 0;
}

.acct-switch-item--link {
    padding: 0;
    margin: 0;
    border-bottom: 1px solid rgba(0, 229, 255, 0.06);
}

.acct-switch-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    background: transparent;
    text-align: left;
    color: var(--admin-text);
}

.acct-switch-btn:hover {
    background: rgba(0, 229, 255, 0.04);
}

.acct-switch-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(124, 77, 255, 0.12));
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--neon-cyan);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acct-switch-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.acct-switch-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--admin-text);
}

.acct-switch-phone {
    font-size: 0.8rem;
    color: var(--admin-muted);
}

.acct-switch-mark {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.acct-switch-chevron {
    flex-shrink: 0;
}

.acct-switch-check {
    flex-shrink: 0;
    margin: 0;
}

.acct-switch-check-placeholder {
    width: 1.1rem;
    flex-shrink: 0;
}

.acct-switch-notice ol {
    line-height: 1.55;
}

.dash-mini-card {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    padding: 1rem 1.1rem;
    text-align: center;
}

.dash-mini-label {
    font-size: 0.85rem;
    color: var(--admin-muted);
    margin-bottom: 0.35rem;
}

.dash-mini-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--admin-text);
}

.dash-mini-hint {
    font-size: 0.75rem;
    color: var(--admin-muted);
    margin-top: 0.35rem;
}

.dash-yoy-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 700;
}

.dash-yoy-up {
    background: rgba(0, 230, 118, 0.1);
    color: #69f0ae;
}

.dash-yoy-down {
    background: rgba(255, 82, 82, 0.1);
    color: #ff8a80;
}

.dash-chart-card {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    padding: 1rem 1.15rem 0.75rem;
    height: 100%;
    min-height: 280px;
}

.dash-chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.dash-chart-title {
    font-size: 0.85rem;
    color: var(--admin-muted);
    margin-bottom: 0;
}

.dash-chart-range {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 3px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.dash-chart-range-pill {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--admin-chart-line, #2563eb) 28%, transparent);
    box-shadow: 0 1px 6px color-mix(in srgb, var(--admin-chart-line, #2563eb) 22%, transparent);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 0;
}

.dash-chart-range-btn {
    position: relative;
    z-index: 1;
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--admin-muted);
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.28s ease;
}

.dash-chart-range-btn.is-active {
    color: var(--admin-chart-line, var(--admin-primary, #2563eb));
    font-weight: 600;
}

.dash-chart-title.is-fading,
.m-home-board-chart-title.is-fading {
    opacity: 0;
    transform: translateY(2px);
}

.dash-chart-title,
.m-home-board-chart-title {
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.dash-chart-wrap.is-swapping,
.m-home-chart-wrap.is-swapping {
    transition: opacity 0.2s ease;
    opacity: 0.55;
}

.m-home-board-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.65rem;
}

.m-home-board-chart-head .m-home-board-chart-title {
    padding-top: 0;
}

.dash-chart-wrap {
    height: min(320px, 50vw);
    min-height: 220px;
}

@media (max-width: 767.98px) {
    .dash-kpi-value { font-size: 1.75rem; }
    .dash-kpi-foot { grid-template-columns: 1fr 1fr; }
}

/* 统计概览 — 桌面紧凑排版 */
@media (min-width: 992px) {
    body.admin-index-mobile .admin-main {
        padding: 0.85rem 1.25rem 1rem;
    }

    .dash-desktop-only {
        display: block;
        max-width: 1280px;
    }

    /* 顶栏：左统计 + 右常用功能，等高拉伸 */
    .dash-desktop-only .dash-top-row {
        --bs-gutter-y: 0.75rem;
        align-items: stretch;
        margin-bottom: 0.75rem !important;
    }

    .dash-desktop-only .dash-top-row > [class*="col-"] {
        display: flex;
    }

    .dash-desktop-only .dash-top-row > [class*="col-"] > .dash-common-card,
    .dash-desktop-only .dash-top-row > [class*="col-"] > .dash-kpi-row {
        width: 100%;
    }

    .dash-desktop-only .dash-kpi-row {
        display: flex;
        width: 100%;
        height: 100%;
        margin: 0;
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0;
    }

    .dash-desktop-only .dash-kpi-row > [class*="col-"] {
        display: flex;
        flex: 1 1 0;
        max-width: none;
        width: auto;
        padding-left: calc(var(--bs-gutter-x) * 0.5);
        padding-right: calc(var(--bs-gutter-x) * 0.5);
    }

    .dash-desktop-only .dash-kpi-card {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0.4rem;
        width: 100%;
        height: 100%;
        min-height: 0;
        max-height: none;
        padding: 0.9rem 1rem 0.85rem;
        box-sizing: border-box;
    }

    .dash-desktop-only .dash-kpi-label {
        font-size: 0.95rem;
        margin-bottom: 0;
        line-height: 1.25;
    }

    .dash-desktop-only .dash-kpi-value {
        flex: 0 0 auto;
        display: block;
        font-size: 2.05rem;
        line-height: 1.15;
        margin: 0;
    }

    .dash-desktop-only .dash-kpi-value.dash-kpi-money {
        font-size: 1.9rem;
    }

    .dash-desktop-only .dash-kpi-unit {
        font-size: 1.05rem;
    }

    .dash-desktop-only .dash-kpi-foot {
        margin-top: auto;
        padding-top: 0.6rem;
        gap: 0.45rem;
    }

    .dash-desktop-only .dash-kpi-mini {
        padding: 0.55rem 0.6rem;
        gap: 0.32rem;
    }

    .dash-desktop-only .dash-kpi-mini-label {
        font-size: 0.95rem;
    }

    .dash-desktop-only .dash-kpi-mini-label .bi {
        font-size: 1rem;
    }

    .dash-desktop-only .dash-kpi-mini-val {
        font-size: 1.18rem;
    }

    .dash-desktop-only .dash-common-card {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        min-height: 0;
        max-height: none;
        padding: 0.7rem 0.7rem 0.75rem;
        box-sizing: border-box;
        overflow: visible;
    }

    .dash-desktop-only .dash-common-head {
        margin-bottom: 0.45rem;
        min-height: 0;
        flex: 0 0 auto;
    }

    .dash-desktop-only .dash-common-title {
        font-size: 0.95rem;
    }

    .dash-desktop-only .dash-common-edit {
        width: 26px;
        height: 26px;
    }

    .dash-desktop-only .dash-common-grid {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        grid-template-rows: 1fr 1fr;
        overflow: visible;
    }

    .dash-desktop-only .dash-common-item {
        min-height: 0;
        height: auto;
        gap: 0.28rem;
        padding: 0.45rem 0.25rem 0.5rem;
        overflow: visible;
    }

    .dash-desktop-only .dash-common-icon {
        width: 36px;
        height: 36px;
        font-size: 1.15rem;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
        flex-shrink: 0;
    }

    .dash-desktop-only .dash-common-label {
        font-size: 0.82rem;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .dash-desktop-only .dash-section {
        margin-bottom: 0.9rem !important;
    }

    .dash-desktop-only .dash-section:last-child {
        margin-bottom: 0 !important;
    }

    .dash-desktop-only .dash-section-title {
        font-size: 1.05rem;
        margin-bottom: 0.55rem;
    }

    .dash-desktop-only .dash-section-todos--empty {
        margin-bottom: 0.65rem !important;
    }

    .dash-desktop-only .dash-todo-panel--empty {
        padding: 0.45rem 0.9rem;
    }

    .dash-desktop-only .dash-insights-row {
        align-items: stretch;
    }

    .dash-desktop-only .dash-insights-row > [class*="col-"] {
        display: flex;
    }

    .dash-desktop-only .dash-panel-card {
        width: 100%;
    }

    .dash-desktop-only .dash-panel-card-head {
        padding: 0.6rem 0.9rem;
    }

    .dash-desktop-only .dash-fault-split {
        padding: 0.65rem 0.9rem 0.75rem;
        gap: 0.55rem;
    }

    .dash-desktop-only .dash-fault-now .dash-panel-big {
        font-size: 1.85rem;
    }

    .dash-desktop-only .dash-fault-recent .dash-fault-list {
        max-height: 8.5rem;
    }

    .dash-desktop-only .dash-revenue-board .dash-revenue-split {
        padding: 0.65rem 0.9rem 0.75rem;
        gap: 0.55rem;
    }

    .dash-desktop-only .dash-revenue-side .dash-metric {
        padding: 0.55rem 0.65rem;
    }

    .dash-desktop-only .dash-revenue-side .dash-metric-value {
        font-size: 1.05rem;
    }

    .dash-desktop-only .dash-revenue-board .dash-chart-wrap.chart-container {
        height: 100% !important;
        min-height: 200px;
        max-height: none;
    }

    .dash-desktop-only .dash-yoy-badge {
        font-size: 0.9rem;
        padding: 0.12rem 0.45rem;
    }

    .dash-desktop-only .dash-chart-card {
        min-height: 0;
        padding: 0.65rem 0.75rem 0.55rem;
    }

    .dash-desktop-only .dash-board-card {
        min-height: 260px;
    }

    .dash-desktop-only .dash-board-head {
        padding: 0.65rem 0.9rem 0.5rem;
    }

    .dash-desktop-only .dash-board-body {
        padding: 0.65rem 0.9rem 0.75rem;
    }

    .dash-desktop-only .dash-recent-table-wrap {
        max-height: 280px;
    }

    .dash-desktop-only .dash-place-rank-list {
        gap: 0.55rem;
    }
}

/* —— 筛选条 —— */
.admin-filter-card .card-body { padding: 0.75rem 1rem; }

.admin-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.admin-filter-export {
    margin-left: auto;
}

.admin-filter-form .form-control { min-width: 0; }
.admin-filter-form .form-select { min-width: 8rem; max-width: 14rem; }
.admin-filter-form select[name="device_id"] { min-width: 10rem; max-width: 18rem; }

/* —— 表格 —— */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 var(--admin-radius) var(--admin-radius);
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table thead th {
    font-size: 0.78rem;
    text-transform: none;
    font-weight: 600;
    color: var(--admin-muted);
    white-space: nowrap;
    border-bottom-width: 1px;
    border-color: rgba(0, 229, 255, 0.08);
}

.table-hover tbody tr:hover { background: rgba(0, 229, 255, 0.04); }

.badge-online {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #69f0ae;
}

.badge-online::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.5);
    animation: status-blink 2s ease-in-out infinite;
}

.badge-offline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--admin-muted);
}

.badge-offline::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #546e7a;
}

.admin-filter-export {
    margin-left: auto;
}

.admin-filter-form .form-control { min-width: 0; }
.admin-filter-form .form-select { min-width: 8rem; max-width: 14rem; }
.admin-filter-form select[name="device_id"] { min-width: 10rem; max-width: 18rem; }

@media (max-width: 575.98px) {
    .admin-filter-form { flex-direction: column; align-items: stretch; }
    .admin-filter-form .col-auto { width: 100%; }
    .admin-filter-form .btn { width: 100%; }
}

/* —— 表格 —— */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 var(--admin-radius) var(--admin-radius);
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table thead th {
    font-size: 0.78rem;
    text-transform: none;
    font-weight: 600;
    color: var(--admin-muted);
    white-space: nowrap;
    border-bottom-width: 1px;
}

.table-hover tbody tr:hover { background: var(--admin-primary-soft); }

.badge-online {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-online::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}

.badge-offline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--admin-muted);
}

.badge-offline::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
}

/* 手机：表格转卡片 */
@media (max-width: 767.98px) {
    .table-mobile-cards thead { display: none; }
    .table-mobile-cards tbody tr {
        display: block;
        margin: 0.65rem;
        padding: 0.75rem;
        background: var(--admin-surface);
        border: 1px solid rgba(0, 229, 255, 0.1);
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    .table-mobile-cards tbody tr.table-warning {
        background: rgba(255, 214, 0, 0.05);
        border-color: rgba(255, 214, 0, 0.2);
    }
    .table-mobile-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.4rem 0;
        border: none;
        text-align: right !important;
    }
    .table-mobile-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.78rem;
        color: var(--admin-muted);
        text-align: left;
        flex-shrink: 0;
        pointer-events: none;
    }
    .table-mobile-cards tbody td[data-label=""]::before,
    .table-mobile-cards tbody td:not([data-label])::before { display: none; }
    .table-mobile-cards tbody td.actions-cell {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 0.35rem;
    }
    .table-mobile-cards tbody td.actions-cell::before { margin-bottom: 0.25rem; width: 100%; }
    .table-mobile-cards tbody td.actions-cell .btn,
    .table-mobile-cards tbody td.actions-cell .btn-group {
        flex: 1 1 calc(50% - 0.2rem);
        width: auto;
        min-width: 0;
        min-height: 44px;
        margin-bottom: 0;
        white-space: normal;
        text-align: center;
        justify-content: center;
    }
    .table-mobile-cards tfoot { display: none; }
    .table-mobile-cards .table-responsive { overflow: visible; }
}

.qr-cell img {
    border-radius: 8px;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.qr-cell-btn {
    display: inline-block;
    line-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.qr-cell-btn:hover img,
.qr-cell-link:hover img {
    border-color: rgba(0, 229, 255, 0.45);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.12);
}

.qr-cell-link {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}

.qr-preview-large {
    max-width: min(320px, 86vw);
    height: auto;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
}

/* —— 表单 —— */
.admin-form-grid .col-md-1,
.admin-form-grid .col-md-2,
.admin-form-grid .col-auto {
    min-width: 0;
}

@media (max-width: 767.98px) {
    .admin-form-grid > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    border-color: var(--neon-cyan);
    color: #050a18;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00b8d4, #2962ff);
    border-color: #00b8d4;
    box-shadow: 0 4px 16px rgba(0, 229, 255, 0.3);
}

/* —— 支付配置 —— */
.pay-tabs { border-bottom: none; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pay-tabs .nav-link {
    border-radius: 10px 10px 0 0;
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.88rem;
    color: var(--admin-muted);
    border-color: transparent;
}
.pay-tabs .nav-link.active {
    background: var(--admin-surface);
    border-color: rgba(0, 229, 255, 0.1);
    border-bottom-color: var(--admin-surface);
    color: var(--neon-cyan);
}
.pay-panel {
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-top: none;
    border-radius: 0 0 var(--admin-radius) var(--admin-radius);
    background: var(--admin-surface);
    padding: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
@media (max-width: 575.98px) {
    .pay-panel { padding: 0.85rem; }
}
.config-key {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    color: var(--neon-cyan);
}

.pay-notify {
    font-size: 0.82rem;
    background: rgba(0, 229, 255, 0.05);
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    word-break: break-all;
    border: 1px solid rgba(0, 229, 255, 0.12);
    color: var(--admin-text);
}

.chart-container {
    height: min(350px, 55vw);
    width: 100%;
    min-height: 220px;
}

.alert { border-radius: 12px; border: none; }

.modal-content { border-radius: var(--admin-radius); border: none; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); background: var(--admin-surface); }

.device-type-badge {
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: middle;
}

/* —— 登录页 —— */
body.admin-login-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.25rem 0.75rem;
    background: linear-gradient(160deg, #030810 0%, #0a1628 40%, #121840 100%);
}

.admin-login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(10, 22, 46, 0.95);
    border-radius: 22px;
    padding: 2rem 1.5rem;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(0, 229, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.admin-login-card .login-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(124, 77, 255, 0.12));
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: var(--glow-cyan);
}

.portal-login-logo--img,
.login-icon.portal-login-logo--img {
    display: block;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    padding: 5px;
    border: none;
    box-shadow: none;
    margin: 0;
    box-sizing: border-box;
}

.login-icon.portal-login-logo--img {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    padding: 6px;
}

.portal-login-logo--img .portal-login-logo-img,
.login-icon.portal-login-logo--img .portal-login-logo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.portal-login-logo--dots,
.login-icon.portal-login-logo--dots {
    display: grid;
    grid-template-columns: repeat(2, 8px);
    gap: 4px;
    width: 42px;
    height: 42px;
    align-content: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.login-icon.portal-login-logo--dots {
    margin: 0 auto 1rem;
}

.portal-login-logo--dots .admin-sidebar-dot,
.admin-login-card .login-icon .admin-sidebar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.portal-login-logo--dots .admin-sidebar-dot--1,
.admin-login-card .login-icon .admin-sidebar-dot--1 { background: #a855f7; }
.portal-login-logo--dots .admin-sidebar-dot--2,
.admin-login-card .login-icon .admin-sidebar-dot--2 { background: #22c55e; }
.portal-login-logo--dots .admin-sidebar-dot--3,
.admin-login-card .login-icon .admin-sidebar-dot--3 { background: #f97316; }
.portal-login-logo--dots .admin-sidebar-dot--4,
.admin-login-card .login-icon .admin-sidebar-dot--4 { background: #3b82f6; }

.admin-login-card h1 {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 0.35rem;
    font-weight: 700;
    color: var(--admin-text);
}

.admin-login-card .hint {
    text-align: center;
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* 登录/注册：标签、说明文字 — 避免 Bootstrap text-muted 在深色底上发灰看不清 */
.admin-login-card .form-label,
.admin-login-card .text-muted,
.admin-login-card p.small:not(.text-danger):not(.text-warning):not(.text-success) {
    color: #cbd5e1 !important;
}

.admin-login-card a:not(.btn):not(.login-back) {
    color: #60a5fa;
    font-weight: 600;
    text-decoration: none;
}

.admin-login-card a:not(.btn):not(.login-back):hover {
    color: #93c5fd;
    text-decoration: underline;
}

.admin-login-card .form-control {
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    border-color: rgba(148, 163, 184, 0.28);
    background-color: rgba(15, 23, 42, 0.85) !important;
    color: #f1f5f9;
}

.admin-login-card .form-control::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.admin-login-card .form-control:focus {
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    background-color: rgba(15, 23, 42, 0.95) !important;
    color: #f8fafc;
}

.admin-login-card .form-control:-webkit-autofill,
.admin-login-card .form-control:-webkit-autofill:hover,
.admin-login-card .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #f1f5f9;
    caret-color: #f1f5f9;
    -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.95) inset;
    box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.95) inset;
    border-color: rgba(148, 163, 184, 0.28);
}

.admin-login-card .btn-login {
    width: 100%;
    padding: 0.72rem;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    border: none;
    color: #050a18;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-login-card .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.35);
}

.portal-captcha-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.portal-captcha-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.portal-captcha-aside {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    width: 112px;
}

.portal-captcha-img {
    display: block;
    width: 112px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    cursor: pointer;
    background: #f3f6fc;
    object-fit: cover;
}

.portal-captcha-refresh {
    color: rgba(147, 197, 253, 0.95) !important;
    font-size: 0.72rem;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
}

.portal-captcha-refresh:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

.portal-agree-single.form-check {
    padding-left: 0;
    min-height: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.4rem;
}
.portal-agree-single .form-check-input {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    flex-shrink: 0;
    float: none;
}
.portal-agree-single .portal-agree-label {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #cbd5e1;
    white-space: normal;
    margin: 0;
    padding: 0;
}
.portal-agree-single .portal-agree-label a {
    font-weight: 600;
    color: #60a5fa;
    text-decoration: none;
}
.portal-agree-single .portal-agree-label a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

body.admin-login-page .portal-agree-single .form-check-input {
    background-color: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.45);
}

body.admin-login-page .portal-agree-single .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

/* —— 商户登录：电脑版左右分栏 —— */
.portal-login-shell {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portal-login-header,
.portal-login-showcase,
.portal-login-form-head,
.portal-login-actions .btn-register,
.portal-input-label {
    display: none;
}

.portal-login-mobile-head {
    display: block;
}

.portal-login-register-link {
    display: block;
}

.portal-login-actions .btn-login {
    width: 100%;
}

.portal-login-tabs {
    display: flex;
    gap: 0.35rem;
    align-items: stretch;
    padding: 0.35rem;
    margin-bottom: 1.15rem;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.14);
}

.portal-login-tabs .portal-login-tab {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: transparent;
    border: none;
    padding: 0.72rem 0.65rem;
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    color: #64748b;
    border-radius: 11px;
    border-bottom: none;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.portal-login-tabs .portal-login-tab i {
    font-size: 1rem;
    opacity: 0.85;
}

.portal-login-tabs .portal-login-tab.is-active {
    color: #1e40af;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.portal-login-tabs .portal-login-tab:not(.is-active):hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.45);
}

.portal-login-tabs .portal-login-tab:active {
    transform: scale(0.98);
}

.portal-login-form-head:not(.portal-login-tabs) .portal-login-tab {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2563eb;
    padding: 0 0 0.65rem;
    margin-bottom: 0.85rem;
    border-bottom: 2px solid #2563eb;
}

.portal-sms-code-group .btn {
    white-space: nowrap;
    min-width: 7.5rem;
}

.portal-input-icon {
    display: none;
}

.portal-login-bg {
    display: none;
}

.portal-login-stage {
    width: 100%;
}

.portal-login-welcome {
    display: none;
}

.portal-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    font-size: 0.84rem;
    line-height: 1.45;
    margin-bottom: 0.85rem;
}

.portal-login-alert i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1rem;
}

.portal-login-alert--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.portal-login-alert--warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fde68a;
}

.portal-login-alert--success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}

.portal-login-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    color: #60a5fa;
    transition: color 0.2s ease;
}

.portal-login-back:hover {
    color: #93c5fd;
}

.portal-login-actions--single {
    display: block;
    margin-top: 0.35rem;
}

.portal-login-actions--single .btn-login {
    width: 100%;
}

.portal-login-card--register .portal-login-welcome {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #cbd5e1;
    font-weight: 400;
}

@media (max-width: 991.98px) {
    body.admin-login-page.portal-login-desktop {
        padding:
            max(1.25rem, env(safe-area-inset-top, 0px))
            max(1.25rem, env(safe-area-inset-right, 0px))
            max(0.75rem, env(safe-area-inset-bottom, 0px))
            max(1.25rem, env(safe-area-inset-left, 0px));
    }

    body.admin-login-page.portal-login-desktop .portal-login-shell {
        width: 100%;
        max-width: 400px;
        flex: 0 1 auto;
        align-items: stretch;
    }

    body.admin-login-page.portal-login-desktop .portal-login-main,
    body.admin-login-page.portal-login-desktop .portal-login-panel {
        width: 100%;
    }

    body.admin-login-page.portal-login-desktop .portal-login-actions {
        display: block;
    }

    body.admin-login-page.portal-login-desktop .site-footer--login {
        width: 100%;
        max-width: 400px;
        margin-top: 1rem;
    }
}

body.admin-login-page.portal-login-app {
    align-items: center;
    justify-content: center;
    padding:
        max(1.25rem, env(safe-area-inset-top, 0px))
        max(1.25rem, env(safe-area-inset-right, 0px))
        max(0.75rem, env(safe-area-inset-bottom, 0px))
        max(1.25rem, env(safe-area-inset-left, 0px));
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(34, 211, 238, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 70% 45% at 90% 100%, rgba(56, 189, 248, 0.14) 0%, transparent 50%),
        linear-gradient(165deg, #070b14 0%, #0a1628 42%, #0c2740 100%) !important;
}

body.admin-login-page.portal-login-app .portal-login-bg {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

body.admin-login-page.portal-login-app .portal-login-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.55;
    animation: portalLoginOrbFloat 14s ease-in-out infinite;
}

body.admin-login-page.portal-login-app .portal-login-bg-orb--1 {
    width: 220px;
    height: 220px;
    top: -60px;
    left: -40px;
    background: rgba(34, 211, 238, 0.35);
}

body.admin-login-page.portal-login-app .portal-login-bg-orb--2 {
    width: 180px;
    height: 180px;
    right: -50px;
    top: 35%;
    background: rgba(56, 189, 248, 0.28);
    animation-delay: -4s;
}

body.admin-login-page.portal-login-app .portal-login-bg-orb--3 {
    width: 260px;
    height: 260px;
    left: 20%;
    bottom: -80px;
    background: rgba(14, 116, 144, 0.32);
    animation-delay: -8s;
}

@keyframes portalLoginOrbFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(12px, -16px, 0) scale(1.06); }
}

body.admin-login-page.portal-login-app .portal-login-header,
body.admin-login-page.portal-login-app .portal-login-showcase,
body.admin-login-page.portal-login-app .portal-app-download,
body.admin-login-page.portal-login-app .site-footer-app {
    display: none !important;
}

body.admin-login-page.portal-login-app .portal-login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    flex: 0 1 auto;
    align-items: stretch;
}

body.admin-login-page.portal-login-app .portal-login-main,
body.admin-login-page.portal-login-app .portal-login-panel {
    width: 100%;
}

body.admin-login-page.portal-login-app .portal-login-actions {
    display: block;
}

body.admin-login-page.portal-login-app .site-footer--login {
    width: 100%;
    max-width: 400px;
    margin-top: 1rem;
}

body.admin-login-page.portal-login-app .admin-login-card,
body.admin-login-page.portal-login-app .admin-login-card.portal-login-card {
    animation: portalLoginCardIn 0.45s ease-out both;
}

@keyframes portalLoginCardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.admin-login-page.portal-login-app .admin-login-card .form-control,
body.admin-login-page.portal-login-app .portal-input-group .form-control,
body.admin-login-page.portal-login-app .portal-captcha-input,
body.admin-login-page.portal-login-app .portal-sms-code-group .form-control {
    background-color: rgba(10, 18, 32, 0.96) !important;
    color: #e8eef6 !important;
    -webkit-text-fill-color: #e8eef6 !important;
    caret-color: #22d3ee;
    border-color: rgba(34, 211, 238, 0.28) !important;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: dark;
}

body.admin-login-page.portal-login-app input[type="password"].form-control {
    background-color: rgba(10, 18, 32, 0.96) !important;
    color: #e8eef6 !important;
    -webkit-text-fill-color: #e8eef6 !important;
}

body.admin-login-page.portal-login-app .admin-login-card .form-control::placeholder,
body.admin-login-page.portal-login-app .portal-input-group .form-control::placeholder,
body.admin-login-page.portal-login-app .portal-captcha-input::placeholder,
body.admin-login-page.portal-login-app .portal-sms-code-group .form-control::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
    -webkit-text-fill-color: #94a3b8 !important;
}

body.admin-login-page.portal-login-app .admin-login-card .form-control:-webkit-autofill,
body.admin-login-page.portal-login-app .admin-login-card .form-control:-webkit-autofill:hover,
body.admin-login-page.portal-login-app .admin-login-card .form-control:-webkit-autofill:focus,
body.admin-login-page.portal-login-app .portal-input-group .form-control:-webkit-autofill,
body.admin-login-page.portal-login-app .portal-input-group .form-control:-webkit-autofill:hover,
body.admin-login-page.portal-login-app .portal-input-group .form-control:-webkit-autofill:focus,
body.admin-login-page.portal-login-app input[type="password"].form-control:-webkit-autofill {
    -webkit-text-fill-color: #e8eef6 !important;
    caret-color: #22d3ee;
    transition: background-color 99999s ease-out 0s;
    -webkit-box-shadow: 0 0 0 1000px rgba(10, 18, 32, 0.98) inset !important;
    box-shadow: 0 0 0 1000px rgba(10, 18, 32, 0.98) inset !important;
    border-color: rgba(34, 211, 238, 0.28) !important;
}

body.admin-login-page.portal-login-app .portal-agree-single .form-check-input {
    background-color: rgba(10, 18, 32, 0.9) !important;
    border-color: rgba(34, 211, 238, 0.4) !important;
}

body.admin-login-page.portal-login-app .portal-agree-single .portal-agree-label,
body.admin-login-page.portal-login-app .portal-agree-single .portal-agree-label a {
    color: #94a3b8 !important;
}

body.admin-login-page.portal-login-app .portal-agree-single .portal-agree-label a {
    color: #67e8f9 !important;
}

/* —— 手机版登录：青蓝科技风（窄屏 + 商户 APP） —— */
@media (max-width: 991.98px) {
    body.admin-login-page {
        background:
            radial-gradient(ellipse 80% 50% at 20% 0%, rgba(34, 211, 238, 0.16) 0%, transparent 55%),
            linear-gradient(165deg, #070b14 0%, #0a1628 42%, #0c2740 100%) !important;
    }

    body.admin-login-page .admin-login-card,
    body.admin-login-page .admin-login-card.portal-login-card {
        background: rgba(17, 24, 39, 0.92);
        border: 1px solid rgba(34, 211, 238, 0.18);
        border-radius: 20px;
        box-shadow:
            0 24px 64px rgba(0, 0, 0, 0.45),
            0 0 40px rgba(34, 211, 238, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.04);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    body.admin-login-page .portal-login-mobile-head {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 1.1rem;
        gap: 0.65rem;
    }

    body.admin-login-page .admin-login-card .login-icon,
    body.admin-login-page .portal-login-mobile-head .login-icon {
        background: linear-gradient(145deg, rgba(34, 211, 238, 0.22), rgba(14, 116, 144, 0.14));
        border-color: rgba(34, 211, 238, 0.35);
        color: #67e8f9;
        box-shadow: 0 0 28px rgba(34, 211, 238, 0.22);
    }

    body.admin-login-page .portal-login-mobile-head h1,
    body.admin-login-page .admin-login-card h1 {
        color: #f8fafc;
        font-weight: 750;
        letter-spacing: 0.02em;
        margin: 0;
    }

    body.admin-login-page .portal-login-welcome {
        display: block;
        margin: 0.35rem 0 0;
        font-size: 0.8rem;
        line-height: 1.45;
        color: #94a3b8;
        font-weight: 400;
    }

    body.admin-login-page .portal-login-tabs {
        flex-wrap: wrap;
        background: rgba(7, 11, 20, 0.65);
        border: 1px solid rgba(34, 211, 238, 0.16);
        border-radius: 14px;
        padding: 0.25rem;
    }

    body.admin-login-page .portal-login-tabs .portal-login-welcome {
        flex: 1 1 100%;
        order: 3;
        margin: 0.45rem 0.15rem 0.2rem;
        text-align: center;
    }

    body.admin-login-page .portal-login-tabs .portal-login-tab {
        color: #94a3b8;
        border-radius: 11px;
        transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    }

    body.admin-login-page .portal-login-tabs .portal-login-tab.is-active {
        color: #04111a;
        background: linear-gradient(135deg, #67e8f9, #22d3ee 55%, #06b6d4);
        box-shadow: 0 4px 16px rgba(34, 211, 238, 0.28);
        font-weight: 650;
    }

    body.admin-login-page .portal-login-tabs .portal-login-tab:not(.is-active):hover {
        color: #e0f2fe;
        background: rgba(34, 211, 238, 0.1);
    }

    body.admin-login-page .portal-login-tabs .portal-login-tab:active {
        transform: scale(0.97);
    }

    body.admin-login-page .portal-login-form-head:not(.portal-login-tabs) .portal-login-tab.is-active {
        color: #67e8f9;
        border-bottom-color: #22d3ee;
    }

    body.admin-login-page .portal-login-back {
        color: #67e8f9;
    }

    body.admin-login-page .portal-login-back:hover {
        color: #a5f3fc;
    }

    body.admin-login-page .portal-login-card--register .portal-login-welcome {
        color: #94a3b8;
    }

    body.admin-login-page .admin-login-card .form-control,
    body.admin-login-page .portal-input-group .form-control,
    body.admin-login-page .portal-captcha-input,
    body.admin-login-page .portal-sms-code-group .form-control {
        background-color: rgba(10, 18, 32, 0.96) !important;
        color: #e8eef6 !important;
        -webkit-text-fill-color: #e8eef6 !important;
        caret-color: #22d3ee;
        border-color: rgba(34, 211, 238, 0.28) !important;
        border-radius: 12px;
        -webkit-appearance: none;
        appearance: none;
    }

    body.admin-login-page input[type="password"].form-control {
        background-color: rgba(10, 18, 32, 0.96) !important;
        color: #e8eef6 !important;
        -webkit-text-fill-color: #e8eef6 !important;
    }

    body.admin-login-page .admin-login-card .form-control::placeholder,
    body.admin-login-page .portal-input-group .form-control::placeholder,
    body.admin-login-page .portal-captcha-input::placeholder,
    body.admin-login-page .portal-sms-code-group .form-control::placeholder {
        color: #94a3b8 !important;
        opacity: 1;
        -webkit-text-fill-color: #94a3b8 !important;
    }

    body.admin-login-page .admin-login-card .form-control:focus,
    body.admin-login-page .portal-input-group .form-control:focus {
        background-color: rgba(12, 24, 42, 0.98) !important;
        color: #fff !important;
        -webkit-text-fill-color: #fff !important;
        border-color: rgba(34, 211, 238, 0.65) !important;
        box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
    }

    body.admin-login-page .admin-login-card a:not(.btn):not(.login-back) {
        color: #67e8f9;
    }

    body.admin-login-page .admin-login-card a:not(.btn):not(.login-back):hover {
        color: #a5f3fc;
    }

    body.admin-login-page .admin-login-card .form-control:-webkit-autofill,
    body.admin-login-page .admin-login-card .form-control:-webkit-autofill:hover,
    body.admin-login-page .admin-login-card .form-control:-webkit-autofill:focus,
    body.admin-login-page .portal-input-group .form-control:-webkit-autofill,
    body.admin-login-page .portal-input-group .form-control:-webkit-autofill:hover,
    body.admin-login-page .portal-input-group .form-control:-webkit-autofill:focus,
    body.admin-login-page input[type="password"].form-control:-webkit-autofill {
        -webkit-text-fill-color: #e8eef6 !important;
        caret-color: #22d3ee;
        transition: background-color 99999s ease-out 0s;
        -webkit-box-shadow: 0 0 0 1000px rgba(10, 18, 32, 0.98) inset !important;
        box-shadow: 0 0 0 1000px rgba(10, 18, 32, 0.98) inset !important;
        border-color: rgba(34, 211, 238, 0.28) !important;
    }

    body.admin-login-page .portal-agree-single .form-check-input {
        background-color: rgba(10, 18, 32, 0.9) !important;
        border-color: rgba(34, 211, 238, 0.4) !important;
    }

    body.admin-login-page .portal-agree-single .portal-agree-label,
    body.admin-login-page .portal-agree-single .portal-agree-label a {
        color: #94a3b8 !important;
    }

    body.admin-login-page .admin-login-card .btn-login,
    body.admin-login-page .portal-login-actions .btn-login {
        background: linear-gradient(135deg, #67e8f9, #22d3ee 50%, #0891b2);
        color: #04111a;
        border: none;
        font-weight: 700;
        border-radius: 12px;
        box-shadow: 0 8px 22px rgba(34, 211, 238, 0.28);
        transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    }

    body.admin-login-page .admin-login-card .btn-login:hover,
    body.admin-login-page .portal-login-actions .btn-login:hover {
        background: linear-gradient(135deg, #a5f3fc, #22d3ee 45%, #06b6d4);
        box-shadow: 0 10px 26px rgba(34, 211, 238, 0.36);
        color: #04111a;
        filter: brightness(1.03);
    }

    body.admin-login-page .admin-login-card .btn-login:active,
    body.admin-login-page .portal-login-actions .btn-login:active {
        transform: scale(0.98);
    }

    body.admin-login-page .portal-login-actions .btn-register,
    body.admin-login-page .admin-login-card .btn-outline-primary {
        color: #a5f3fc;
        border-color: rgba(34, 211, 238, 0.45);
        background: rgba(14, 116, 144, 0.18);
        border-radius: 12px;
    }

    body.admin-login-page .portal-login-actions .btn-register:hover,
    body.admin-login-page .admin-login-card .btn-outline-primary:hover {
        color: #fff;
        background: rgba(34, 211, 238, 0.22);
        border-color: #67e8f9;
    }

    body.admin-login-page .portal-sms-code-group .btn-outline-primary {
        color: #a5f3fc;
        border-color: rgba(34, 211, 238, 0.45);
    }

    body.admin-login-page .portal-agree-single .portal-agree-label a {
        color: #67e8f9;
    }

    body.admin-login-page .portal-agree-single .form-check-input:checked {
        background-color: #0891b2;
        border-color: #22d3ee;
    }

    body.admin-login-page .portal-captcha-refresh {
        color: rgba(165, 243, 252, 0.95) !important;
    }

    body.admin-login-page .login-role-badge.merchant {
        background: rgba(34, 211, 238, 0.12);
        color: #67e8f9;
        border-color: rgba(34, 211, 238, 0.35);
    }

    body.admin-login-page .login-back {
        color: #67e8f9;
    }
}

@media (min-width: 992px) {
    body.admin-login-page.portal-login-desktop {
        align-items: stretch;
        justify-content: flex-start;
        padding: 0;
        background:
            radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.45) 0%, transparent 100%),
            radial-gradient(1px 1px at 28% 62%, rgba(255, 255, 255, 0.28) 0%, transparent 100%),
            radial-gradient(1.5px 1.5px at 68% 32%, rgba(255, 255, 255, 0.35) 0%, transparent 100%),
            radial-gradient(1px 1px at 84% 76%, rgba(255, 255, 255, 0.22) 0%, transparent 100%),
            radial-gradient(1px 1px at 52% 88%, rgba(255, 255, 255, 0.18) 0%, transparent 100%),
            radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.32) 0%, transparent 42%),
            radial-gradient(circle at 88% 85%, rgba(14, 165, 233, 0.26) 0%, transparent 40%),
            radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 55%),
            linear-gradient(180deg, #000b1d 0%, #0b1120 45%, #0f172a 100%);
    }

    body.admin-login-page.portal-login-desktop .portal-login-shell {
        min-height: 100vh;
    }

    body.admin-login-page.portal-login-desktop .portal-input-icon {
        display: block;
    }

    body.admin-login-page.portal-login-desktop .portal-login-header {
        display: block;
        padding: 1.35rem 0 1.1rem;
        background: transparent;
        border-bottom: none;
    }

    body.admin-login-page.portal-login-desktop .portal-login-header-inner {
        width: min(1120px, calc(100% - 3rem));
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.25rem;
    }

    body.admin-login-page.portal-login-desktop .portal-login-brand {
        display: flex;
        align-items: center;
        gap: 1rem;
        min-width: 0;
        flex: 1;
    }

    body.admin-login-page.portal-login-desktop .portal-login-header .portal-login-logo--img {
        width: 80px;
        height: 80px;
        max-width: none;
        border-radius: 14px;
        padding: 6px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.28);
    }

    body.admin-login-page.portal-login-desktop .portal-login-header .portal-login-logo--img .portal-login-logo-img {
        object-fit: contain;
        object-position: center;
    }

    body.admin-login-page.portal-login-desktop .portal-login-logo:not(.portal-login-logo--img):not(.portal-login-logo--dots) {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: #fff;
        background: linear-gradient(135deg, #2563eb, #0ea5e9);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
        flex-shrink: 0;
    }

    body.admin-login-page.portal-login-desktop .portal-login-logo--img {
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.28);
    }

    body.admin-login-page.portal-login-desktop .portal-login-logo--dots {
        width: 56px;
        height: 56px;
        box-shadow: none;
    }

    body.admin-login-page.portal-login-desktop .portal-login-logo--dots .admin-sidebar-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }

    body.admin-login-page.portal-login-desktop .portal-login-logo--dots .admin-sidebar-dot--1 { background: #a855f7; }
    body.admin-login-page.portal-login-desktop .portal-login-logo--dots .admin-sidebar-dot--2 { background: #22c55e; }
    body.admin-login-page.portal-login-desktop .portal-login-logo--dots .admin-sidebar-dot--3 { background: #f97316; }
    body.admin-login-page.portal-login-desktop .portal-login-logo--dots .admin-sidebar-dot--4 { background: #3b82f6; }

    body.admin-login-page.portal-login-desktop .portal-login-brand-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.2rem;
        min-width: 0;
        padding-top: 0.1rem;
    }

    body.admin-login-page.portal-login-desktop .portal-login-brand-text strong {
        font-size: 1.28rem;
        font-weight: 700;
        color: #f8fafc;
        line-height: 1.25;
        letter-spacing: 0.02em;
    }

    body.admin-login-page.portal-login-desktop .portal-login-brand-text span {
        font-size: 0.9rem;
        color: rgba(148, 163, 184, 0.95);
        line-height: 1.3;
    }

    body.admin-login-page.portal-login-desktop .portal-login-header-link {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.45rem 0.95rem;
        border-radius: 999px;
        border: 1px solid rgba(56, 189, 248, 0.35);
        background: rgba(15, 23, 42, 0.55);
        color: #7dd3fc;
        font-size: 0.88rem;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    body.admin-login-page.portal-login-desktop .portal-login-header-link:hover {
        background: rgba(30, 58, 138, 0.45);
        border-color: rgba(56, 189, 248, 0.55);
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.25);
        color: #bae6fd;
    }

    body.admin-login-page.portal-login-desktop .portal-login-main {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0.5rem 0 1.75rem;
    }

    body.admin-login-page.portal-login-desktop .portal-login-stage-wrap {
        position: relative;
        width: min(1120px, calc(100% - 3rem));
        padding: 3px;
        border-radius: 22px;
        background: linear-gradient(135deg, rgba(34, 211, 238, 0.85) 0%, rgba(37, 99, 235, 0.75) 45%, rgba(168, 85, 247, 0.55) 100%);
        box-shadow:
            0 0 24px rgba(34, 211, 238, 0.35),
            0 0 64px rgba(37, 99, 235, 0.28),
            0 0 100px rgba(99, 102, 241, 0.15);
    }

    body.admin-login-page.portal-login-desktop .portal-login-stage-wrap::before,
    body.admin-login-page.portal-login-desktop .portal-login-stage-wrap::after {
        content: "";
        position: absolute;
        width: 32px;
        height: 32px;
        pointer-events: none;
        z-index: 4;
    }

    body.admin-login-page.portal-login-desktop .portal-login-stage-wrap::before {
        top: 8px;
        left: 8px;
        border-top: 2px solid rgba(34, 211, 238, 0.9);
        border-left: 2px solid rgba(34, 211, 238, 0.9);
        border-radius: 6px 0 0 0;
        box-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
    }

    body.admin-login-page.portal-login-desktop .portal-login-stage-wrap::after {
        bottom: 8px;
        right: 8px;
        border-bottom: 2px solid rgba(168, 85, 247, 0.75);
        border-right: 2px solid rgba(168, 85, 247, 0.75);
        border-radius: 0 0 6px 0;
        box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
    }

    body.admin-login-page.portal-login-desktop .portal-login-stage {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(380px, 420px);
        align-items: stretch;
        width: 100%;
        border-radius: 20px;
        overflow: hidden;
        background: #fff;
        border: 1px solid rgba(56, 189, 248, 0.35);
        box-shadow:
            0 0 0 1px rgba(14, 165, 233, 0.1),
            0 0 40px rgba(37, 99, 235, 0.22),
            inset 0 0 48px rgba(37, 99, 235, 0.05);
    }

    body.admin-login-page.portal-login-desktop .portal-login-stage::before,
    body.admin-login-page.portal-login-desktop .portal-login-stage::after {
        content: "";
        position: absolute;
        width: 28px;
        height: 28px;
        pointer-events: none;
        z-index: 3;
    }

    body.admin-login-page.portal-login-desktop .portal-login-stage::before {
        top: 12px;
        left: 12px;
        border-top: 2px solid rgba(56, 189, 248, 0.55);
        border-left: 2px solid rgba(56, 189, 248, 0.55);
        border-radius: 4px 0 0 0;
    }

    body.admin-login-page.portal-login-desktop .portal-login-stage::after {
        bottom: 12px;
        right: 12px;
        border-bottom: 2px solid rgba(56, 189, 248, 0.55);
        border-right: 2px solid rgba(56, 189, 248, 0.55);
        border-radius: 0 0 4px 0;
    }

    body.admin-login-page.portal-login-desktop .portal-login-bg {
        display: block;
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 0;
        overflow: hidden;
    }

    body.admin-login-page.portal-login-desktop .portal-login-shell > :not(.portal-login-bg) {
        position: relative;
        z-index: 1;
    }

    body.admin-login-page.portal-login-desktop .portal-login-bg-orb {
        position: absolute;
        border-radius: 50%;
        filter: blur(60px);
        opacity: 0.55;
        animation: portal-login-orb-float 18s ease-in-out infinite;
    }

    body.admin-login-page.portal-login-desktop .portal-login-bg-orb--1 {
        width: 420px;
        height: 420px;
        top: -8%;
        left: -6%;
        background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, transparent 70%);
    }

    body.admin-login-page.portal-login-desktop .portal-login-bg-orb--2 {
        width: 360px;
        height: 360px;
        right: -4%;
        top: 18%;
        background: radial-gradient(circle, rgba(14, 165, 233, 0.28) 0%, transparent 70%);
        animation-delay: -6s;
    }

    body.admin-login-page.portal-login-desktop .portal-login-bg-orb--3 {
        width: 300px;
        height: 300px;
        left: 38%;
        bottom: -10%;
        background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, transparent 70%);
        animation-delay: -12s;
    }

    body.admin-login-page.portal-login-desktop .portal-login-welcome {
        display: block;
        margin: 0.55rem 0 0;
        font-size: 0.84rem;
        line-height: 1.45;
        color: #64748b;
        font-weight: 400;
    }

    body.admin-login-page.portal-login-desktop .portal-login-form-head.portal-login-tabs + .portal-login-alert,
    body.admin-login-page.portal-login-desktop .portal-login-form-head:not(.portal-login-tabs) + .portal-login-alert {
        margin-top: 0.85rem;
    }

    body.admin-login-page.portal-login-desktop .portal-login-showcase {
        display: block;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-card {
        position: relative;
        overflow: hidden;
        min-height: 480px;
        height: 100%;
        padding: 2.25rem 2rem 1.75rem;
        border-radius: 0;
        color: #e2e8f0;
        background:
            linear-gradient(155deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 52%, rgba(15, 23, 42, 0.99) 100%);
        box-shadow: none;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-card::after {
        content: "";
        position: absolute;
        inset: 0;
        background-image:
            linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
        background-size: 28px 28px;
        mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 85%);
        pointer-events: none;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.28) 0%, transparent 42%),
            radial-gradient(circle at 18% 88%, rgba(14, 165, 233, 0.18) 0%, transparent 36%);
        pointer-events: none;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-card > * {
        position: relative;
        z-index: 1;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-eyebrow {
        margin: 0 0 0.45rem;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        color: #7dd3fc;
        text-transform: none;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-card h2 {
        margin: 0 0 0.65rem;
        font-size: 1.75rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        color: #fff;
        background: linear-gradient(135deg, #fff 0%, #bfdbfe 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-card p {
        margin: 0 0 1.25rem;
        max-width: 28rem;
        font-size: 0.95rem;
        line-height: 1.65;
        color: rgba(226, 232, 240, 0.82);
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.55rem;
        margin: 0;
        padding: 0;
        list-style: none;
        max-width: 24rem;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-tags li {
        padding: 0.28rem 0.72rem;
        border-radius: 999px;
        border: 1px solid rgba(96, 165, 250, 0.35);
        background: rgba(37, 99, 235, 0.12);
        color: #bfdbfe;
        font-size: 0.78rem;
        line-height: 1.4;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-visual {
        position: static;
        display: grid;
        gap: 0.65rem;
        width: min(168px, 34%);
        flex-shrink: 0;
        align-self: center;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-dashboard {
        margin-top: 1.35rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        min-height: 240px;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-metrics {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.55rem;
        max-width: 26rem;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-metric {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        min-height: 72px;
        padding: 0.65rem 0.55rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(96, 165, 250, 0.18);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        text-align: center;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-metric-icon {
        font-size: 1.15rem;
        line-height: 1;
        color: #7dd3fc;
        filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45));
    }

    body.admin-login-page.portal-login-desktop .portal-dash-metric strong {
        display: none;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-metric span {
        display: block;
        font-size: 0.72rem;
        font-weight: 600;
        color: rgba(191, 219, 254, 0.88);
        line-height: 1.35;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-body {
        display: flex;
        align-items: stretch;
        gap: 0.85rem;
        flex: 1;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-main {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
        padding: 0.85rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(96, 165, 250, 0.16);
    }

    body.admin-login-page.portal-login-desktop .portal-dash-gauge {
        position: relative;
        width: min(140px, 42%);
        margin: 0 auto;
        aspect-ratio: 1 / 1;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-gauge-svg {
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
    }

    body.admin-login-page.portal-login-desktop .portal-dash-gauge-track {
        fill: none;
        stroke: rgba(148, 163, 184, 0.18);
        stroke-width: 10;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-gauge-fill {
        fill: none;
        stroke: url(#portalDashGaugeGrad);
        stroke-width: 10;
        stroke-linecap: round;
        stroke-dasharray: 280 302;
        filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.65));
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-device {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        padding: 0.55rem 0.75rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(96, 165, 250, 0.28);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        box-shadow: 0 0 16px rgba(37, 99, 235, 0.12);
        font-size: 0.72rem;
        line-height: 1.3;
        color: rgba(226, 232, 240, 0.92);
        white-space: nowrap;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-device span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-gauge-center {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-gauge-center strong:not(.portal-dash-gauge-value) {
        display: none;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-gauge-icon {
        font-size: 1.5rem;
        line-height: 1;
        color: #7dd3fc;
        margin-bottom: 0.25rem;
        filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
    }

    body.admin-login-page.portal-login-desktop .portal-dash-gauge-value {
        display: block !important;
        font-size: 1.35rem;
        font-weight: 800;
        line-height: 1.1;
        color: #e0f2fe;
        letter-spacing: -0.02em;
        background: none;
        -webkit-text-fill-color: #e0f2fe;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-gauge-center span {
        margin-top: 0.15rem;
        font-size: 0.72rem;
        font-weight: 600;
        color: rgba(191, 219, 254, 0.88);
    }

    body.admin-login-page.portal-login-desktop .portal-dash-bars {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 0.35rem;
        height: 88px;
        padding: 0.35rem 0.15rem 0;
    }

    body.admin-login-page.portal-login-desktop .portal-dash-bar {
        flex: 1 1 0;
        height: var(--h, 50%);
        min-height: 12px;
        border-radius: 6px 6px 2px 2px;
        background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
        box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
        opacity: 0.92;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-device--pos {
        animation: portal-login-device-float 5s ease-in-out infinite;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-device--qr {
        transform: none;
        animation: portal-login-device-float 5.5s ease-in-out infinite;
        animation-delay: -1.2s;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-device--phone {
        transform: none;
        animation: portal-login-device-float 6s ease-in-out infinite;
        animation-delay: -2.4s;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-device i {
        font-size: 1.25rem;
        color: #93c5fd;
    }

    @keyframes portal-login-device-float {
        0%, 100% { translate: 0 0; }
        50% { translate: 0 -6px; }
    }

    @keyframes portal-login-orb-float {
        0%, 100% { transform: translate(0, 0) scale(1); }
        33% { transform: translate(12px, -18px) scale(1.04); }
        66% { transform: translate(-10px, 10px) scale(0.96); }
    }

    @media (prefers-reduced-motion: reduce) {
        body.admin-login-page.portal-login-desktop .portal-login-bg-orb,
        body.admin-login-page.portal-login-desktop .portal-showcase-device {
            animation: none !important;
        }
    }

    body.admin-login-page.portal-login-desktop .portal-login-panel {
        display: flex;
        justify-content: center;
    }

    body.admin-login-page.portal-login-desktop .portal-login-mobile-head,
    body.admin-login-page.portal-login-desktop .portal-login-register-link,
    body.admin-login-page.portal-login-desktop .portal-app-download {
        display: none !important;
    }

    body.admin-login-page.portal-login-desktop .portal-login-form-head.portal-login-tabs {
        display: flex;
        flex-wrap: wrap;
    }

    body.admin-login-page.portal-login-desktop .portal-login-form-head.portal-login-tabs .portal-login-tab {
        flex: 1 1 calc(50% - 0.2rem);
    }

    body.admin-login-page.portal-login-desktop .portal-login-welcome {
        flex: 0 0 100%;
    }

    body.admin-login-page.portal-login-desktop .portal-login-form-head:not(.portal-login-tabs) {
        display: block;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    body.admin-login-page.portal-login-desktop .portal-login-tabs {
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
    }

    body.admin-login-page.portal-login-desktop .portal-login-tabs .portal-login-tab {
        font-size: 0.95rem;
    }

    body.admin-login-page.portal-login-desktop .portal-login-tabs .portal-login-tab.is-active {
        color: #2563eb;
        background: #fff;
        box-shadow: 0 2px 12px rgba(37, 99, 235, 0.12);
    }

    body.admin-login-page.portal-login-desktop .portal-login-form-head:not(.portal-login-tabs) .portal-login-tab {
        display: inline-block;
        font-size: 1.35rem;
        font-weight: 800;
        color: #1d4ed8;
        padding-bottom: 0.5rem;
        border-bottom: none;
        letter-spacing: -0.02em;
    }

    body.admin-login-page.portal-login-desktop .admin-login-card.portal-login-card {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 2.15rem 2rem 1.65rem;
        min-height: 480px;
        border-radius: 0;
        background: #fff;
        border: none;
        border-left: 1px solid rgba(226, 232, 240, 0.95);
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    body.admin-login-page.portal-login-desktop .portal-input-label {
        display: block;
    }

    body.admin-login-page.portal-login-desktop .admin-login-card .form-label,
    body.admin-login-page.portal-login-desktop .admin-login-card .text-muted,
    body.admin-login-page.portal-login-desktop .admin-login-card p.small:not(.text-danger):not(.text-warning):not(.text-success) {
        color: #64748b !important;
    }

    body.admin-login-page.portal-login-desktop .admin-login-card a:not(.btn):not(.login-back) {
        color: #2563eb;
    }

    body.admin-login-page.portal-login-desktop .admin-login-card a:not(.btn):not(.login-back):hover {
        color: #1d4ed8;
    }

    body.admin-login-page.portal-login-desktop .admin-login-card .form-control {
        background-color: #fff !important;
        color: #0f172a;
        border-color: #dbeafe;
    }

    body.admin-login-page.portal-login-desktop .admin-login-card .form-control::placeholder {
        color: #94a3b8;
    }

    body.admin-login-page.portal-login-desktop .admin-login-card .form-control:focus {
        border-color: #93c5fd;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
        background-color: #fff !important;
        color: #0f172a;
    }

    body.admin-login-page.portal-login-desktop .admin-login-card .form-control:-webkit-autofill,
    body.admin-login-page.portal-login-desktop .admin-login-card .form-control:-webkit-autofill:hover,
    body.admin-login-page.portal-login-desktop .admin-login-card .form-control:-webkit-autofill:focus {
        -webkit-text-fill-color: #0f172a;
        caret-color: #0f172a;
        -webkit-box-shadow: 0 0 0 1000px #fff inset;
        box-shadow: 0 0 0 1000px #fff inset;
        border-color: #dbeafe;
    }

    body.admin-login-page.portal-login-desktop .portal-input-group {
        position: relative;
    }

    body.admin-login-page.portal-login-desktop .portal-input-icon {
        position: absolute;
        left: 0.85rem;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 1rem;
        pointer-events: none;
        z-index: 2;
    }

    body.admin-login-page.portal-login-desktop .portal-input-icon {
        transition: color 0.2s ease;
    }

    body.admin-login-page.portal-login-desktop .portal-input-group .form-control {
        padding-left: 2.45rem;
        background-color: #f8fafc !important;
        color: #0f172a;
        border-color: rgba(147, 197, 253, 0.65);
        border-radius: 12px;
        min-height: 46px;
        box-shadow: inset 0 1px 2px rgba(37, 99, 235, 0.04);
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    }

    body.admin-login-page.portal-login-desktop .portal-input-group .form-control::placeholder {
        color: #94a3b8;
    }

    body.admin-login-page.portal-login-desktop .portal-input-group .form-control:focus {
        border-color: #38bdf8;
        box-shadow:
            0 0 0 4px rgba(37, 99, 235, 0.1),
            0 0 16px rgba(34, 211, 238, 0.15),
            inset 0 0 12px rgba(37, 99, 235, 0.04);
        background-color: #fff !important;
        color: #0f172a;
    }

    body.admin-login-page.portal-login-desktop .portal-input-group .form-control:-webkit-autofill,
    body.admin-login-page.portal-login-desktop .portal-input-group .form-control:-webkit-autofill:hover,
    body.admin-login-page.portal-login-desktop .portal-input-group .form-control:-webkit-autofill:focus {
        -webkit-text-fill-color: #0f172a;
        caret-color: #0f172a;
        -webkit-box-shadow: 0 0 0 1000px #f8fafc inset;
        box-shadow: 0 0 0 1000px #f8fafc inset;
        border-color: #e2e8f0;
    }

    body.admin-login-page.portal-login-desktop .portal-input-group:focus-within .portal-input-icon {
        color: #2563eb;
    }

    body.admin-login-page.portal-login-desktop .portal-login-alert--error {
        background: #fef2f2;
        border-color: #fecaca;
        color: #b91c1c;
    }

    body.admin-login-page.portal-login-desktop .portal-login-alert--warning {
        background: #fffbeb;
        border-color: #fde68a;
        color: #b45309;
    }

    body.admin-login-page.portal-login-desktop .portal-login-alert--success {
        background: #ecfdf5;
        border-color: #a7f3d0;
        color: #047857;
    }

    body.admin-login-page.portal-login-desktop .portal-login-back {
        color: #64748b;
    }

    body.admin-login-page.portal-login-desktop .portal-login-back:hover {
        color: #2563eb;
    }

    body.admin-login-page.portal-login-desktop .portal-login-stage--register {
        align-items: stretch;
    }

    body.admin-login-page.portal-login-desktop .portal-login-card--register {
        min-height: 560px;
        justify-content: flex-start;
        padding-top: 1.65rem;
    }

    body.admin-login-page.portal-login-desktop .portal-login-card--register .portal-login-welcome {
        color: #64748b;
    }

    body.admin-login-page.portal-login-desktop .portal-login-actions--single {
        display: block;
    }

    body.admin-login-page.portal-login-desktop .portal-login-actions--single .btn-login {
        width: 100%;
        margin-top: 0;
    }

    body.admin-login-page.portal-login-desktop .portal-captcha-row {
        align-items: stretch;
    }

    body.admin-login-page.portal-login-desktop .portal-captcha-aside img {
        border-radius: 10px;
        border: 1px solid #e2e8f0;
    }

    body.admin-login-page.portal-login-desktop .portal-captcha-refresh {
        color: #2563eb !important;
    }

    body.admin-login-page.portal-login-desktop .portal-captcha-refresh:hover {
        color: #1d4ed8 !important;
    }

    body.admin-login-page.portal-login-desktop .portal-agree-single .portal-agree-label {
        color: #64748b;
    }

    body.admin-login-page.portal-login-desktop .portal-agree-single .portal-agree-label a {
        color: #2563eb;
    }

    body.admin-login-page.portal-login-desktop .portal-agree-single .form-check-input {
        background-color: #fff;
        border-color: #cbd5e1;
    }

    body.admin-login-page.portal-login-desktop .portal-agree-single .form-check-input:checked {
        background-color: #2563eb;
        border-color: #2563eb;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    }

    body.admin-login-page.portal-login-desktop .portal-login-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-top: 0.35rem;
    }

    body.admin-login-page.portal-login-desktop .portal-login-actions .btn-register {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.7rem 1rem;
        border-radius: 10px;
        font-weight: 600;
        border-color: #cbd5e1;
        color: #334155;
        text-decoration: none;
    }

    body.admin-login-page.portal-login-desktop .portal-login-actions .btn-register:hover {
        background: #f8fafc;
        border-color: #94a3b8;
        color: #0f172a;
        transform: translateY(-1px);
    }

    body.admin-login-page.portal-login-desktop .portal-login-actions .btn-login {
        width: auto;
        margin-top: 0;
        background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
        color: #fff;
        border: none;
        border-radius: 12px;
        box-shadow:
            0 4px 16px rgba(37, 99, 235, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    body.admin-login-page.portal-login-desktop .portal-login-actions .btn-login:hover {
        transform: translateY(-1px);
        box-shadow:
            0 10px 28px rgba(37, 99, 235, 0.38),
            0 0 20px rgba(34, 211, 238, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
        color: #fff;
    }

    body.admin-login-page.portal-login-desktop .portal-login-actions--single .btn-login {
        width: 100%;
        padding: 0.78rem 1rem;
        font-size: 1rem;
        font-weight: 700;
    }

    body.admin-login-page.portal-login-desktop .portal-login-actions .btn-register {
        transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    body.admin-login-page.portal-login-desktop .site-footer--login {
        width: 100%;
        max-width: none;
        margin-top: auto;
        padding: 1rem 1.5rem 0;
        background: transparent;
        color: #64748b;
    }

    body.admin-login-page.portal-login-desktop .site-footer--login .site-footer-app a,
    body.admin-login-page.portal-login-desktop .site-footer--login .site-footer-icp a {
        color: #64748b;
    }

    body.admin-login-page.portal-login-desktop .site-footer--login .site-footer-app a:hover,
    body.admin-login-page.portal-login-desktop .site-footer--login .site-footer-icp a:hover {
        color: #2563eb;
    }
}

@media (min-width: 992px) and (max-width: 1100px) {
    body.admin-login-page.portal-login-desktop .portal-login-stage-wrap {
        width: min(920px, calc(100% - 2rem));
    }

    body.admin-login-page.portal-login-desktop .portal-login-stage {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-visual {
        position: static;
        width: 100%;
        margin-top: 1.5rem;
    }

    body.admin-login-page.portal-login-desktop .portal-showcase-device--qr,
    body.admin-login-page.portal-login-desktop .portal-showcase-device--phone {
        transform: none;
    }
}

body.legal-doc-page {
    margin: 0;
    min-height: 100vh;
    background: var(--admin-bg);
    padding: 1rem 1rem 2rem;
}
.legal-doc-wrap {
    max-width: 720px;
    margin: 0 auto;
    background: var(--admin-surface);
    border-radius: 16px;
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 229, 255, 0.08);
}
.legal-doc-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--neon-cyan);
    text-decoration: none;
    margin-bottom: 0.75rem;
}
.legal-doc-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--admin-text);
}
.legal-doc-body {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--admin-text);
}
.legal-doc-body h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
    color: var(--admin-text);
}
.legal-doc-body p,
.legal-doc-body li { margin-bottom: 0.5rem; }
.legal-doc-foot {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 229, 255, 0.08);
}

/* —— 全站页脚 —— */
.site-footer {
    text-align: center;
    line-height: 1.5;
}
.site-footer p {
    margin: 0;
}
.site-footer-copy { margin-bottom: 0.15rem !important; }
.site-footer-icp { margin-bottom: 0 !important; }
.site-footer-icp a {
    text-decoration: none;
    color: var(--admin-muted);
}
.site-footer-icp a:hover { text-decoration: underline; color: var(--neon-cyan); }

.site-footer-app {
    margin-bottom: 0.35rem !important;
}
.site-footer-app a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: rgba(226, 232, 240, 0.92);
    font-size: 0.82rem;
}
.site-footer-app a:hover {
    color: var(--neon-cyan);
    text-decoration: underline;
}
.site-footer--app .site-footer-app a {
    color: var(--admin-muted);
}
.site-footer--app .site-footer-app a:hover {
    color: var(--neon-cyan);
}

.portal-app-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 229, 255, 0.35);
    background: rgba(0, 229, 255, 0.08);
    color: rgba(226, 232, 240, 0.95);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.portal-app-download-btn:hover {
    background: rgba(0, 229, 255, 0.16);
    border-color: rgba(0, 229, 255, 0.55);
    color: #fff;
}

.app-download-page .app-download-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem 1.5rem 1.25rem;
    text-align: center;
}
.app-download-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--neon-cyan);
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.25);
}
.app-download-card h1 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}
.app-download-sub {
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.92rem;
    margin-bottom: 1.25rem;
}
.app-download-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.app-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
}
.app-download-tip {
    margin-top: 1rem;
    margin-bottom: 0;
}
.app-download-back {
    color: rgba(226, 232, 240, 0.85);
    text-decoration: none;
}
.app-download-back:hover {
    color: var(--neon-cyan);
}

.site-footer--login {
    width: 100%;
    max-width: 400px;
    margin-top: 1.25rem;
    padding-bottom: 0;
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.78);
}
.site-footer--login .site-footer-icp a {
    color: rgba(226, 232, 240, 0.88);
}

.site-footer--app {
    margin-top: 1.25rem;
    padding: 0.85rem 0 0;
    font-size: 0.75rem;
    color: var(--admin-muted);
    border-top: 1px solid rgba(0, 229, 255, 0.06);
}
.site-footer--app .site-footer-icp a {
    color: var(--admin-muted);
}

.site-footer--legal {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    font-size: 0.75rem;
}
.site-footer--legal .site-footer-icp a {
    color: var(--admin-muted);
}

.wx-alarm-mp-qr-wrap {
    max-width: 220px;
    margin: 0 auto;
}
.wx-alarm-mp-qr-img {
    display: block;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid var(--admin-border, rgba(0, 229, 255, 0.12));
    background: #fff;
    object-fit: contain;
}

/* —— 登录入口首页 —— */
body.portal-page {
    min-height: 100vh;
    margin: 0;
    padding: 1.5rem 1rem 2rem;
    background: linear-gradient(160deg, #030810 0%, #0a1628 38%, #121840 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portal-wrap {
    width: 100%;
    max-width: 520px;
}

.portal-brand {
    text-align: center;
    color: #fff;
    margin-bottom: 1.75rem;
}

.portal-brand .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.75rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(124, 77, 255, 0.15));
    border: 1px solid rgba(0, 229, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--glow-cyan);
}

.portal-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.portal-brand p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.portal-cards {
    display: grid;
    gap: 1rem;
}

.portal-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(10, 22, 46, 0.9);
    border-radius: 18px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.05);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 2px solid rgba(0, 229, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.portal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), var(--glow-cyan);
    color: inherit;
}

.portal-card.admin:hover { border-color: var(--neon-cyan); }
.portal-card.merchant:hover { border-color: #00e676; }

.portal-card-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portal-card .card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.portal-card.admin .card-icon {
    background: rgba(0, 229, 255, 0.12);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.portal-card.merchant .card-icon {
    background: rgba(0, 230, 118, 0.1);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.portal-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    color: var(--admin-text);
}

.portal-card .desc {
    font-size: 0.82rem;
    color: var(--admin-muted);
    margin: 0;
}

.portal-card .arrow {
    margin-left: auto;
    color: rgba(0, 229, 255, 0.3);
    font-size: 1.25rem;
}

.portal-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: rgba(224, 232, 240, 0.6);
}

.portal-logged {
    background: rgba(10, 22, 46, 0.8);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid rgba(0, 229, 255, 0.08);
}

.portal-logged a {
    margin: 0 0.35rem;
}

.login-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--admin-muted);
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.login-back:hover { color: var(--neon-cyan); }

.login-role-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.login-role-badge.admin { background: rgba(0, 229, 255, 0.1); color: var(--neon-cyan); border: 1px solid rgba(0, 229, 255, 0.2); }
.login-role-badge.merchant { background: rgba(0, 230, 118, 0.08); color: #00e676; border: 1px solid rgba(0, 230, 118, 0.2); }

/* 设备列表：名称/点位/场地等 — 文字在上，编辑/设置在下 */
.device-name-cell,
.device-place-cell,
.device-group-cell,
.device-admin-remark-cell,
.device-type-cell,
.device-volume-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    max-width: 100%;
}
.device-name-text { font-weight: 500; color: var(--admin-text); }
.device-admin-remark-text {
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.3;
    color: #ffd54f;
    text-shadow: 0 0 12px rgba(255, 213, 79, 0.18);
}
.device-name-cell .btn-link,
.device-place-cell .btn-link,
.device-group-cell .btn-link,
.device-admin-remark-cell .btn-link,
.device-type-cell .btn-link,
.device-volume-cell .btn-link,
.price-plans-cell .btn-link,
.dev-traffic .btn-link {
    position: relative;
    z-index: 2;
    cursor: pointer;
    color: var(--neon-cyan);
}
.price-plans-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}
.price-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-start;
}
.price-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.price-chip-times {
    padding: 0.2rem 0.45rem;
    font-weight: 600;
    color: #fff;
}
.price-chip-amt {
    padding: 0.2rem 0.5rem;
    background: rgba(10, 22, 46, 0.9);
    font-weight: 600;
    color: var(--admin-text);
}
.price-chip-1 .price-chip-times { background: var(--neon-cyan); color: #050a18; }
.price-chip-2 .price-chip-times { background: #00e676; color: #050a18; }
.price-chip-3 .price-chip-times { background: #7c4dff; }
.price-chip-edit {
    font-size: 0.75rem;
    text-decoration: none !important;
    color: var(--admin-muted);
}
.price-chip-edit:hover { color: var(--neon-cyan); }
@media (min-width: 768px) {
    .price-plans-cell { align-items: center; }
    .price-chips { justify-content: center; }
}

/* —— 收益查询（新版） —— */
.rev-filter-card {
    border: 1px solid rgba(0, 229, 255, 0.1);
    box-shadow: none;
    position: relative;
    z-index: 2;
    overflow: visible;
}
.rev-filter-card .card-body {
    overflow: visible;
}
.rev-period-nav {
    overflow: visible;
    display: inline-flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.rev-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.rev-filter-form .form-select,
.rev-filter-form .form-control { width: auto; min-width: 7.5rem; }
.rev-filter-form .rev-device-select { min-width: 11rem; max-width: 16rem; }
.rev-export-btn { margin-left: auto; }

.rev-period-nav .rev-period-label {
    min-width: 7.5rem;
    font-weight: 600;
    color: var(--admin-text);
    opacity: 1;
    pointer-events: none;
}
.rev-period-pick-wrap {
    display: inline-flex;
    align-items: stretch;
    position: relative;
}
.rev-date-cal {
    position: relative;
    display: inline-flex;
}
.rev-date-cal-trigger {
    min-width: 8.75rem;
    max-width: 14rem;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
}
.rev-date-cal-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: 18.5rem;
    padding: 0.65rem 0.75rem 0.55rem;
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: var(--admin-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: light;
}
.rev-date-cal-panel.is-floating {
    position: fixed;
    z-index: 1060;
}
.rev-date-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}
.rev-date-cal-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--admin-text);
}
.rev-date-cal-head .btn-link {
    color: var(--admin-muted);
    text-decoration: none;
    padding: 0.15rem 0.35rem;
}
.rev-date-cal-weekdays,
.rev-date-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.rev-date-cal-weekdays {
    margin-bottom: 0.25rem;
}
.rev-date-cal-weekdays span {
    text-align: center;
    font-size: 0.72rem;
    color: var(--admin-muted);
    padding: 0.15rem 0;
}
.rev-date-cal-day {
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.85rem;
    padding: 0;
    color: var(--admin-text);
    cursor: pointer;
}
.rev-date-cal-day:hover:not(:disabled) {
    background: rgba(0, 229, 255, 0.12);
}
.rev-date-cal-day.is-empty {
    visibility: hidden;
    pointer-events: none;
}
.rev-date-cal-day.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.rev-date-cal-day.is-today {
    font-weight: 700;
    color: var(--neon-cyan);
}
.rev-date-cal-day.in-range {
    background: rgba(0, 229, 255, 0.14);
    border-radius: 0;
}
.rev-date-cal-day.is-start {
    border-radius: 6px 0 0 6px;
    background: rgba(0, 229, 255, 0.28);
    font-weight: 700;
}
.rev-date-cal-day.is-end {
    border-radius: 0 6px 6px 0;
    background: rgba(0, 229, 255, 0.28);
    font-weight: 700;
}
.rev-date-cal-day.is-start.is-end {
    border-radius: 6px;
}
.rev-date-cal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}
.rev-date-cal-hint {
    font-size: 0.72rem;
    color: var(--admin-muted);
    line-height: 1.3;
}
.rev-period-pick-wrap .rev-period-pick,
    min-width: 8.75rem;
    max-width: 11rem;
    border-radius: 0;
    height: auto;
    font-weight: 600;
}
.rev-period-pick-wrap .rev-period-pick-year {
    min-width: 6.5rem;
}
.rev-period-nav .btn { padding: 0.25rem 0.55rem; }
.rev-today-mini {
    min-width: 2rem;
    font-weight: 700;
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
}

.rev-kpi-card {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--admin-radius);
    padding: 1rem 1.15rem;
    height: 100%;
}
.rev-kpi-title { font-size: 0.88rem; color: var(--admin-muted); margin-bottom: 0.35rem; }
.rev-kpi-value { font-size: 1.85rem; font-weight: 700; color: var(--neon-cyan); line-height: 1.2; }
.rev-kpi-unit { font-size: 0.95rem; font-weight: 600; color: var(--admin-muted); margin-left: 0.15rem; }
.rev-kpi-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.65rem;
    font-size: 0.8rem;
    color: var(--admin-muted);
}
.rev-delta { font-weight: 600; }
.rev-delta-up { color: #69f0ae; }
.rev-delta-down { color: #ff8a80; }

.rev-chart-card .card-header { font-weight: 600; background: rgba(10, 22, 46, 0.95); color: var(--admin-text); }
.rev-chart-wrap {
    height: 280px;
    min-height: 280px;
    width: 100%;
    position: relative;
}
.rev-chart-wrap-bar {
    height: 300px;
    min-height: 300px;
    width: 100%;
}
.rev-chart-wrap-hour {
    height: 300px;
    min-height: 300px;
    width: 100%;
}
.rev-chart-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.rev-detail-card .card-header { font-weight: 600; background: rgba(10, 22, 46, 0.95); color: var(--admin-text); }
.rev-detail-table thead th {
    font-size: 0.78rem;
    white-space: nowrap;
    background: rgba(10, 22, 46, 0.95);
    border-color: rgba(0, 229, 255, 0.08);
}
.rev-pagination { background: rgba(10, 22, 46, 0.95); }
.volume-schedule-list .volume-schedule-item:last-child {
    border-bottom: 0 !important;
}
.volume-schedule-days .form-check-inline {
    margin-right: 0.65rem;
}
.ord-list-pagination .btn.disabled,
.ord-list-page-nav .btn.disabled {
    opacity: 1;
    pointer-events: none;
}
.ord-list-page-nav .btn {
    min-width: 2rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

/* 商户数据列表面板（操作记录、订单明细等） */
.mdp-panel .card-body { background: var(--admin-surface, #fff); }
.mdp-filter-wrap {
    padding: 1rem 1.15rem 0.85rem;
    border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}
.mdp-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem 0.75rem;
}
.mdp-filter-grid.is-collapsed { display: none; }
.mdp-label {
    display: block;
    font-size: 0.75rem;
    color: var(--admin-muted, #64748b);
    margin-bottom: 0.25rem;
}
.mdp-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(0, 229, 255, 0.08);
}
.mdp-filter-range { margin-left: auto; }
.mdp-tips {
    padding: 0.55rem 1.15rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.06);
    border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}
.mdp-tips-label { font-weight: 600; margin-right: 0.25rem; }
.mdp-table thead th {
    font-size: 0.78rem;
    white-space: nowrap;
    background: rgba(248, 250, 252, 0.98);
    border-color: rgba(15, 23, 42, 0.08);
    color: #334155;
    font-weight: 600;
}
html[data-admin-theme="dark"] .mdp-table thead th,
html[data-admin-theme="stick"] .mdp-table thead th, html[data-admin-theme="wish"] .mdp-table thead th,
body:not([data-admin-theme="light"]) .mdp-table thead th {
    background: rgba(10, 22, 46, 0.95);
    border-color: rgba(0, 229, 255, 0.08);
    color: var(--admin-text);
}
.mdp-col-index { width: 3rem; }
.mdp-operator-name { font-weight: 600; }
.mdp-action-text { font-weight: 500; }
.mdp-detail-cell { max-width: 18rem; word-break: break-word; }
.mdp-module-badge {
    font-weight: 500;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.15);
}
.mdp-module-devices { background: rgba(14, 165, 233, 0.12); color: #0369a1; border-color: rgba(14, 165, 233, 0.2); }
.mdp-module-orders { background: rgba(168, 85, 247, 0.12); color: #7e22ce; border-color: rgba(168, 85, 247, 0.2); }
.mdp-module-share { background: rgba(245, 158, 11, 0.12); color: #b45309; border-color: rgba(245, 158, 11, 0.2); }
.mdp-module-subaccounts { background: rgba(16, 185, 129, 0.12); color: #047857; border-color: rgba(16, 185, 129, 0.2); }

@media (max-width: 991.98px) {
    .mdp-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mdp-filter-range { margin-left: 0; width: 100%; }
}
@media (max-width: 575.98px) {
    .mdp-filter-grid { grid-template-columns: 1fr; }
}

@media (max-width: 991.98px) {
    .rev-page .row.g-3 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .rev-chart-wrap {
        height: 260px;
        min-height: 260px;
    }
    .rev-chart-wrap-bar {
        height: min(380px, 65vw);
        min-height: 280px;
    }
    .rev-chart-wrap-hour {
        height: 260px;
        min-height: 240px;
    }
    .rev-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .rev-filter-form .form-select,
    .rev-filter-form .form-control,
    .rev-period-nav {
        width: 100%;
        max-width: none;
    }
    .rev-filter-form > .btn,
    .rev-filter-form > button[type="submit"],
    .rev-filter-form > .rev-export-btn {
        width: 100%;
        max-width: none;
    }
    .rev-period-nav .btn,
    .rev-period-nav > a.btn {
        width: auto;
        max-width: none;
    }
    .rev-period-nav {
        display: grid;
        grid-template-columns: 2.1rem minmax(0, 1fr) 2.1rem 2.1rem;
        align-items: stretch;
        gap: 0.3rem;
        justify-content: stretch;
    }
    .rev-period-prev { grid-column: 1; }
    .rev-period-pick-wrap {
        grid-column: 2;
        min-width: 0;
        display: flex;
        align-items: stretch;
    }
    .rev-period-next { grid-column: 3; }
    .rev-today-mini { grid-column: 4; }
    .rev-period-nav .btn,
    .rev-period-nav > a.btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }
    .rev-date-cal {
        flex: 1 1 0;
        min-width: 0;
        width: 100%;
        display: flex;
    }
    .rev-date-cal-trigger {
        flex: 1 1 0;
        width: 100%;
        min-width: 0;
        max-width: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
    }
    .rev-date-cal-trigger .bi {
        flex-shrink: 0;
        margin-left: 0 !important;
    }
    .rev-date-cal-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
        flex: 1 1 0;
    }
    .rev-period-pick-wrap .rev-period-pick-month,
    .rev-period-pick-wrap .rev-period-pick-year {
        flex: 1 1 0;
        min-width: 0;
        width: 100%;
    }
    .rev-export-btn {
        margin-left: 0;
        width: 100%;
    }
    .rev-date-cal-panel {
        left: 0;
        transform: none;
        width: min(18.5rem, calc(100vw - 2rem));
    }
}

@media (max-width: 767.98px) {
    .rev-kpi-value { font-size: 1.5rem; }
    .rev-kpi-row .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .rev-detail-table.table-mobile-cards tbody td {
        font-size: 0.85rem;
    }
}

/* —— 手机收益查询（紧凑） —— */
@media (max-width: 991.98px) {
    body.admin-revenue-mobile {
        overflow-x: clip;
    }
    body.admin-revenue-mobile .admin-page-head {
        display: none;
    }
    body.admin-revenue-mobile .admin-main {
        padding-top: 0.35rem;
        padding-bottom: 0;
    }
    body.admin-revenue-mobile .admin-bottom-nav {
        display: flex !important;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1045;
    }
    body.admin-revenue-mobile .rev-page {
        max-width: 100%;
        overflow-x: clip;
    }
    body.admin-revenue-mobile .rev-filter-card {
        z-index: auto;
    }
    body.admin-revenue-mobile .alert {
        margin-bottom: 0.5rem !important;
        padding: 0.4rem 0.65rem;
        font-size: 0.78rem;
    }
    body.admin-revenue-mobile .rev-page > .mb-3 {
        margin-bottom: 0.5rem !important;
    }
    body.admin-revenue-mobile .rev-filter-card .card-body {
        padding: 0.5rem 0.65rem;
    }
    body.admin-revenue-mobile .rev-filter-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
        align-items: stretch;
    }
    body.admin-revenue-mobile .rev-filter-form .form-select,
    body.admin-revenue-mobile .rev-filter-form .form-control {
        width: 100%;
        min-width: 0;
        max-width: none;
        font-size: 0.78rem;
        padding: 0.28rem 0.45rem;
    }
    body.admin-revenue-mobile .rev-filter-form .rev-period-nav {
        grid-column: 1 / -1;
    }
    body.admin-revenue-mobile .rev-date-cal-trigger {
        font-size: 0.72rem;
        padding: 0.22rem 0.35rem;
    }
    body.admin-revenue-mobile .rev-today-mini {
        font-weight: 700;
    }
    body.admin-revenue-mobile .rev-filter-form button[type="submit"] {
        grid-column: 1;
        width: 100%;
        font-size: 0.78rem;
        padding: 0.28rem 0.5rem;
    }
    body.admin-revenue-mobile .rev-export-btn,
    body.admin-revenue-mobile .portal-export-desktop-only {
        display: none !important;
    }
    body.admin-revenue-mobile .rev-kpi-row {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.35rem;
        margin-bottom: 0.45rem !important;
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
    }
    body.admin-revenue-mobile .rev-kpi-row > [class*="col-"] {
        flex: none !important;
        width: auto !important;
        max-width: none !important;
        padding: 0 !important;
    }
    body.admin-revenue-mobile .rev-page .row.g-3:not(.rev-kpi-row) {
        --bs-gutter-x: 0.45rem;
        --bs-gutter-y: 0.45rem;
    }
    body.admin-revenue-mobile .rev-kpi-card {
        padding: 0.45rem 0.4rem;
        border-radius: 10px;
    }
    body.admin-revenue-mobile .rev-kpi-title {
        font-size: 0.68rem;
        margin-bottom: 0.12rem;
        white-space: nowrap;
    }
    body.admin-revenue-mobile .rev-kpi-value {
        font-size: 0.95rem;
        line-height: 1.15;
    }
    body.admin-revenue-mobile .rev-kpi-unit {
        font-size: 0.72rem;
    }
    body.admin-revenue-mobile .rev-kpi-meta {
        display: none;
    }
    body.admin-revenue-mobile .rev-chart-card .card-header {
        padding: 0.4rem 0.65rem;
        font-size: 0.82rem;
    }
    body.admin-revenue-mobile .rev-chart-card .card-body {
        padding: 0.35rem 0.45rem 0.45rem;
    }
    body.admin-revenue-mobile .rev-chart-wrap {
        height: 168px;
        min-height: 168px;
    }
    body.admin-revenue-mobile .rev-chart-wrap-bar {
        height: 260px;
        min-height: 240px;
    }
    body.admin-revenue-mobile .rev-chart-wrap-hour {
        height: 210px;
        min-height: 200px;
    }
    body.admin-revenue-mobile .rev-detail-card .card-header {
        padding: 0.42rem 0.65rem;
        font-size: 0.82rem;
    }
    body.admin-revenue-mobile .rev-detail-card .card-header .small {
        display: none;
    }
    body.admin-revenue-mobile .rev-detail-table.table-mobile-cards tbody tr {
        margin: 0.3rem 0.45rem;
        padding: 0.45rem 0.55rem;
        border-radius: 8px;
    }
    body.admin-revenue-mobile .rev-detail-table.table-mobile-cards tbody td {
        padding: 0.18rem 0;
        font-size: 0.76rem;
        gap: 0.45rem;
    }
    body.admin-revenue-mobile .rev-detail-table.table-mobile-cards tbody td::before {
        font-size: 0.7rem;
    }
    body.admin-revenue-mobile .rev-detail-table .rev-col-hide-mobile {
        display: none !important;
    }
}

/* —— 手机首页（参考商户 App） —— */
.m-home {
    display: none;
    touch-action: manipulation;
}

.m-home a,
.m-home button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 991.98px) {
    .m-home { display: block; margin: -1rem -0.75rem 0; }
    .dash-desktop-only { display: none !important; }
    .portal-export-desktop-only { display: none !important; }

    body.admin-index-mobile .admin-page-head,
    body.admin-revenue-mobile .admin-page-head,
    body.admin-me-mobile .admin-page-head { display: none; }
    body.admin-index-mobile .admin-tabs-wrap,
    body.admin-index-mobile .admin-nav-toggle,
    body.admin-revenue-mobile .admin-tabs-wrap,
    body.admin-revenue-mobile .admin-nav-toggle,
    body.admin-me-mobile .admin-tabs-wrap,
    body.admin-me-mobile .admin-nav-toggle { display: none; }
    body.admin-index-mobile .admin-main { padding-top: 0; }
    body.admin-me-mobile .admin-main { padding-top: 0.35rem; }
    body.admin-index-mobile .admin-header .header-inner,
    body.admin-revenue-mobile .admin-header .header-inner,
    body.admin-me-mobile .admin-header .header-inner {
        min-height: auto;
        padding: 0.72rem 0.75rem;
        gap: 0.65rem;
    }
    body.admin-index-mobile .admin-brand,
    body.admin-revenue-mobile .admin-brand,
    body.admin-me-mobile .admin-brand,
    body.portal-merchant .admin-brand {
        gap: 0.55rem;
        min-width: 0;
    }
    body.admin-index-mobile .admin-brand-logo,
    body.admin-revenue-mobile .admin-brand-logo,
    body.admin-me-mobile .admin-brand-logo,
    body.portal-merchant .admin-brand-logo {
        padding: 4px 8px;
        border-radius: 14px;
        background:
            linear-gradient(165deg, #ffffff 0%, #f0fdff 55%, #e0f7fa 100%);
        border: 1px solid rgba(103, 232, 249, 0.45);
        box-shadow:
            0 0 0 1px rgba(8, 17, 31, 0.2),
            0 8px 20px rgba(0, 0, 0, 0.28),
            0 0 18px rgba(34, 211, 238, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.95);
    }
    body.admin-index-mobile .admin-brand-logo-img,
    body.admin-revenue-mobile .admin-brand-logo-img,
    body.admin-me-mobile .admin-brand-logo-img,
    body.portal-merchant .admin-brand-logo-img {
        height: 40px;
        max-width: 132px;
    }
    /* Logo 已含品牌名时，手机端隐藏重复文字，避免拥挤 */
    body.admin-index-mobile .admin-brand--has-logo .admin-brand-text,
    body.admin-revenue-mobile .admin-brand--has-logo .admin-brand-text,
    body.admin-me-mobile .admin-brand--has-logo .admin-brand-text,
    body.portal-merchant .admin-brand--has-logo .admin-brand-text {
        display: none;
    }
    body.admin-index-mobile .admin-actions,
    body.admin-revenue-mobile .admin-actions,
    body.admin-me-mobile .admin-actions {
        margin-left: 0;
        padding-right: 0;
    }
    body.admin-index-mobile .m-home {
        margin-top: 0;
    }
    body.admin-index-mobile .m-home-hero {
        padding-top: 1.05rem;
        padding-bottom: var(--m-home-quick-pad-y, 0.75rem);
    }
}

@media (min-width: 992px) {
    .m-home { display: none !important; }
}

.m-home-hero {
    --m-home-quick-pad-y: 0.75rem;
    position: relative;
    background: linear-gradient(135deg, #070b14 0%, #0a1628 48%, #0c2740 100%);
    padding: var(--m-home-quick-pad-y) 0.75rem;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(34, 211, 238, 0.12);
}

.m-home-quick-wrap {
    position: relative;
}

.m-home-quick-edit,
.m-home-grid-edit {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1rem;
}

.m-home-quick-edit {
    background: rgba(0, 229, 255, 0.15);
    color: rgba(0, 229, 255, 0.9);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.m-home-quick-edit:hover {
    background: rgba(0, 229, 255, 0.25);
    color: #fff;
}

@media (min-width: 992px) {
    .m-home-quick-edit,
    .m-home-grid-edit {
        display: none;
    }
}

.m-home-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem 0.35rem;
}

.m-home-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.95);
    padding: 0.35rem 0.15rem;
    min-height: 44px;
    position: relative;
}

.m-home-quick-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    margin-bottom: 0.3rem;
}

.m-home-quick-item:active .m-home-quick-icon {
    background: #eff6ff;
    transform: scale(0.96);
}

.m-home-quick-label {
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.3;
    min-height: 1.3em;
    font-weight: 500;
}

.m-home-quick-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.55rem;
    background: #ef4444;
    color: #fff;
    padding: 0.1rem 0.25rem;
    border-radius: 4px;
}

.m-home-grid,
.m-home-notice,
.m-home-banners,
.m-home-board,
.m-home-todos,
.m-home-device-types {
    margin: 0.65rem 0.75rem 0;
    border-radius: 14px !important;
}

.m-home-grid-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    padding: 0.7rem 0.4rem 0.85rem;
}

.m-home-grid-inner--9 {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem 0.2rem;
    padding: 0.75rem 0.45rem 0.9rem;
}

.m-home-grid-more-btn {
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    font: inherit;
}

.m-home-grid-more-btn.is-open .m-home-grid-icon--more {
    background: var(--admin-primary-soft);
    border-color: #93c5fd;
    color: var(--admin-primary-dark);
}

.m-home-grid-icon--more {
    background: linear-gradient(145deg, #f8fafc, #eff6ff);
}

.m-home-more-panel {
    display: none;
    border-top: 1px solid var(--admin-border);
    padding: 0.35rem 0.5rem 0.65rem;
    background: var(--admin-subtle-bg);
}

.m-home-more-panel.is-open {
    display: block;
}

.m-home-more-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    text-decoration: none;
    color: var(--admin-text);
    font-size: 0.88rem;
    border-radius: 10px;
}

.m-home-more-link:active,
.m-home-more-link:hover {
    background: var(--admin-primary-soft);
    color: var(--admin-primary-dark);
}

.m-home-more-link > .bi:first-child {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--admin-icon-surface);
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-primary);
    flex-shrink: 0;
}

.m-home-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--admin-text);
    padding: 0.55rem 0.25rem;
    min-height: 44px;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.m-home-grid-item:active { background: var(--admin-primary-soft); }

.m-home-grid-item:active .m-home-grid-icon {
    transform: scale(0.94);
}

.m-home-grid-icon {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 42%),
        var(--admin-icon-surface);
    color: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.m-home-grid-badge,
.m-home-more-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--admin-surface, #fff);
}
.m-home-more-badge {
    position: static;
    margin-left: 0.35rem;
    margin-right: 0.15rem;
    flex-shrink: 0;
}

.m-home-grid-label {
    font-size: 0.8rem;
    text-align: center;
    color: var(--admin-text);
    line-height: 1.3;
    font-weight: 500;
}

.m-home-notice {
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
}

.m-home-notice-link { text-decoration: none; }

.m-home-banners {
    margin: 0.65rem 0.75rem 0;
    padding: 0;
    overflow: hidden;
}

.m-home-banner-carousel {
    border-radius: 14px;
    overflow: hidden;
}

.m-home-banner-carousel .carousel-inner {
    border-radius: 14px;
}

.m-home-banner-carousel .carousel-item .m-home-banner {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.m-home-banner-carousel .carousel-indicators {
    margin-bottom: 0.4rem;
    gap: 0.25rem;
}

.m-home-banner-carousel .carousel-indicators [data-bs-target] {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    border: none;
    background-color: rgba(15, 23, 42, 0.28);
    opacity: 1;
}

.m-home-banner-carousel .carousel-indicators .active {
    background-color: #2563eb;
    transform: scale(1.15);
}

.m-home-banner {
    display: block;
    width: 100%;
    min-height: 88px;
    border-radius: 14px !important;
    overflow: hidden;
    text-decoration: none;
    color: #0f172a;
    position: relative;
}

.m-home-banner--img {
    color: #fff;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
}

.m-home-banner--img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.08) 55%, transparent 100%);
    pointer-events: none;
}

.m-home-banner:not(.m-home-banner--img) .m-home-banner-body {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.m-home-banner-body {
    position: relative;
    z-index: 1;
    padding: 0.85rem 1rem;
}

.m-home-banner--img .m-home-banner-body {
    max-width: 72%;
}

.m-home-banner-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.2rem;
}

.m-home-banner-sub {
    font-size: 0.72rem;
    opacity: 0.88;
}

.m-home-board-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1rem 0;
    background: var(--admin-subtle-bg);
    border-radius: 14px 14px 0 0;
}

.m-home-board-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--admin-primary-dark);
}

.m-home-board-time {
    font-size: 0.68rem;
    color: var(--admin-muted);
}

.m-home-board-main {
    padding: 0.85rem 1rem 0.65rem;
    text-align: center;
}

.m-home-board-main-label {
    font-size: 0.82rem;
    color: var(--admin-muted);
}

.m-home-board-main-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #22d3ee;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.m-home-board-main-sub {
    font-size: 0.75rem;
    color: var(--admin-muted);
    margin-top: 0.25rem;
}

.m-home-yoy {
    display: inline-block;
    margin-left: 0.25rem;
    font-weight: 600;
}

.m-home-yoy-up { color: #16a34a; }
.m-home-yoy-down { color: #dc2626; }

.m-home-board-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--admin-border);
}

.m-home-board-cell {
    padding: 0.75rem 1rem;
    text-align: center;
}

.m-home-board-cell + .m-home-board-cell {
    border-left: 1px solid var(--admin-border);
}

.m-home-board-cell-label {
    font-size: 0.75rem;
    color: var(--admin-muted);
}

.m-home-board-cell-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--admin-text);
    margin-top: 0.15rem;
}

.m-home-board-coins {
    border-top: 1px solid var(--admin-border);
    padding: 0.65rem 1rem 0.75rem;
    background: var(--admin-inset-bg);
}

.m-home-board-coins-title {
    font-size: 0.78rem;
    color: var(--admin-muted);
    margin-bottom: 0.5rem;
}

.m-home-board-coins-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.m-home-coin-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--admin-primary-dark);
}

.m-home-coin-lbl {
    font-size: 0.72rem;
    color: var(--admin-muted);
}

a.m-home-coin-item--fault {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    padding: 0.25rem 0.15rem;
    margin: -0.25rem -0.15rem;
    transition: background 0.15s, transform 0.12s;
}

a.m-home-coin-item--fault:active {
    transform: scale(0.97);
    background: var(--admin-primary-soft);
}

a.m-home-coin-item--fault .m-home-coin-lbl {
    color: var(--admin-primary-dark);
}

a.m-home-coin-item--fault .m-home-coin-lbl .bi {
    font-size: 0.65rem;
    vertical-align: 0.05em;
    opacity: 0.75;
}

a.m-home-coin-item--fault.is-alert {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(248, 113, 113, 0.28);
}

a.m-home-coin-item--fault.is-alert .m-home-coin-val {
    color: #f87171;
}

a.m-home-coin-item--fault.is-alert .m-home-coin-lbl {
    color: #fca5a5;
}

.m-home-board-chart {
    padding: 0 1rem 1rem;
    border-top: 1px dashed var(--admin-dashed-border);
    margin-top: 0;
    background: var(--admin-surface);
    border-radius: 0 0 14px 14px;
}

.m-home-board-chart-title {
    font-size: 0.78rem;
    color: var(--admin-muted);
    padding-top: 0.65rem;
}

/* 手机首页视觉收紧：宫格图标分色、看板数字与分区卡片化 */
@media (max-width: 991.98px) {
    body.admin-index-mobile .admin-header {
        background: linear-gradient(180deg, #08111f 0%, #0a1628 100%);
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
    }

    body.admin-index-mobile .admin-main {
        background:
            radial-gradient(120% 42% at 50% -10%, color-mix(in srgb, var(--admin-chart-line, #22d3ee) 18%, transparent), transparent 60%),
            linear-gradient(180deg, #0a1628 0px, transparent 72px),
            transparent;
    }

    .m-home-grid,
    .m-home-notice,
    .m-home-banners,
    .m-home-board,
    .m-home-todos,
    .m-home-device-types {
        margin: 0.75rem 0.7rem 0;
        border: 1px solid rgba(36, 48, 68, 0.95) !important;
        border-radius: 16px !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
        background: color-mix(in srgb, var(--admin-surface) 92%, #0a1628);
    }

    body.admin-app .admin-main .card {
        border: 1px solid #243044 !important;
    }

    .m-home-grid-inner--9 {
        gap: 0.35rem 0.2rem;
        padding: 0.9rem 0.45rem 1.05rem;
    }

    .m-home-grid-item {
        padding: 0.5rem 0.15rem 0.4rem;
    }

    .m-home-grid-icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        border: 0;
        font-size: 1.3rem;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            inset 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent),
            0 6px 14px rgba(0, 0, 0, 0.16);
    }

    .m-home-grid-item:nth-child(6n+1) .m-home-grid-icon {
        color: #22d3ee;
        background: color-mix(in srgb, #22d3ee 16%, var(--admin-surface));
    }
    .m-home-grid-item:nth-child(6n+2) .m-home-grid-icon {
        color: #d4b56a;
        background: color-mix(in srgb, #d4b56a 18%, var(--admin-surface));
    }
    .m-home-grid-item:nth-child(6n+3) .m-home-grid-icon {
        color: #4ade80;
        background: color-mix(in srgb, #4ade80 16%, var(--admin-surface));
    }
    .m-home-grid-item:nth-child(6n+4) .m-home-grid-icon {
        color: #60a5fa;
        background: color-mix(in srgb, #60a5fa 16%, var(--admin-surface));
    }
    .m-home-grid-item:nth-child(6n+5) .m-home-grid-icon {
        color: #fb7185;
        background: color-mix(in srgb, #fb7185 16%, var(--admin-surface));
    }
    .m-home-grid-item:nth-child(6n+6) .m-home-grid-icon,
    .m-home-grid-icon--more {
        color: var(--admin-chart-line, #a78bfa);
        background: color-mix(in srgb, var(--admin-chart-line, #a78bfa) 14%, var(--admin-surface));
    }

    .m-home-grid-label {
        font-size: 0.76rem;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    .m-home-board {
        overflow: hidden;
    }

    .m-home-board-head {
        padding: 0.8rem 1rem 0.15rem;
        background: transparent;
    }

    .m-home-board-title {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        color: var(--admin-text);
    }

    .m-home-board-title::before {
        content: '';
        width: 3px;
        height: 0.9em;
        border-radius: 99px;
        background: var(--admin-chart-line, #22d3ee);
    }

    .m-home-board-main {
        padding: 0.35rem 1rem 0.85rem;
    }

    .m-home-board-main-value {
        font-size: 3.15rem;
        color: var(--admin-chart-line, #22d3ee);
        font-variant-numeric: tabular-nums;
        text-shadow: 0 8px 24px color-mix(in srgb, var(--admin-chart-line, #22d3ee) 28%, transparent);
    }

    .m-home-board-split {
        border-top: 1px solid var(--admin-border);
        gap: 0.5rem;
        padding: 0.65rem 0.75rem 0;
    }

    .m-home-board-cell {
        border: 1px solid var(--admin-border);
        border-radius: 12px;
        background: var(--admin-inset-bg, var(--admin-surface));
        color: var(--admin-text);
        padding: 0.65rem 0.5rem;
    }

    .m-home-board-cell + .m-home-board-cell {
        border-left: 1px solid var(--admin-border);
    }

    .m-home-board-cell-label,
    .m-home-board-cell-value {
        color: var(--admin-text);
    }

    .m-home-board-cell-label {
        color: var(--admin-muted);
    }

    .m-home-board-cell-value {
        font-variant-numeric: tabular-nums;
    }

    .m-home-board-coins {
        border-top: 1px solid var(--admin-border);
        background: transparent;
        padding: 0.4rem 0.75rem 0.05rem;
        margin-top: 0.45rem;
    }

    .m-home-board-coins-title {
        font-size: 0.68rem;
        margin-bottom: 0.28rem;
    }

    .m-home-board-coins-row {
        gap: 0.45rem;
    }

    .m-home-coin-item {
        border-radius: 10px;
        padding: 0.22rem 0.15rem 0.18rem;
        background: var(--admin-inset-bg, var(--admin-surface));
        border: 1px solid var(--admin-border);
        color: var(--admin-text);
    }

    .m-home-board-coins .m-home-coin-val {
        font-size: 0.95rem;
        font-weight: 700;
        line-height: 1.15;
        color: var(--admin-text);
    }

    .m-home-board-coins .m-home-coin-lbl {
        font-size: 0.62rem;
        margin-top: 0.05rem;
    }

    .m-home-coin-val {
        font-variant-numeric: tabular-nums;
        color: var(--admin-text);
    }

    a.m-home-coin-item--fault {
        margin: 0;
        padding: 0.22rem 0.15rem 0.18rem;
    }

    .m-home-board-chart {
        background: transparent;
        border-top: 1px solid var(--admin-border);
        padding-top: 0.15rem;
        margin-top: 0.55rem;
    }
}

.m-home-chart-wrap {
    height: 140px;
    position: relative;
}

/* —— 手机订单中心 —— */
.ord-m-page { display: none; }
.ord-desktop-only { display: block; }

@media (max-width: 991.98px) {
    body.admin-orders-mobile .admin-page-head { display: none; }
    body.admin-orders-mobile .admin-main { padding-top: 0.5rem; }
    .ord-m-page {
        display: block;
        margin: -0.5rem -0.75rem 0;
    }
    .ord-desktop-only { display: none !important; }
}

.ord-m-search {
    border-radius: 0 !important;
    margin-bottom: 0.5rem;
}
.ord-m-search-row {
    display: flex;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem 0.35rem;
    align-items: center;
}
.ord-m-search-type { max-width: 6.5rem; flex-shrink: 0; }
.ord-m-home-btn {
    width: 38px;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-primary);
    text-decoration: none;
    flex-shrink: 0;
}
.ord-m-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 0.75rem 0.65rem;
    align-items: center;
}
.ord-m-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--admin-text);
    text-decoration: none;
    background: var(--admin-surface);
}
.ord-m-filter-chip.active {
    border-color: #93c5fd;
    background: var(--admin-primary-soft);
    color: var(--admin-primary-dark);
}
.ord-m-filter-select {
    width: auto;
    max-width: 7.5rem;
    font-size: 0.75rem;
    border-radius: 999px;
}
.ord-m-filter-submit {
    border: none;
    background: var(--admin-primary);
    color: #fff;
    cursor: pointer;
}

.ord-m-subnav {
    display: flex;
    background: var(--admin-surface);
    border-top: 1px solid var(--admin-border);
    border-bottom: 1px solid var(--admin-border);
    margin-bottom: 0.5rem;
}
.ord-m-subnav-item {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0.25rem;
    font-size: 0.78rem;
    color: var(--admin-muted);
    text-decoration: none;
}
.ord-m-subnav-item i {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 0.1rem;
}
.ord-m-subnav-item.active {
    color: var(--admin-primary);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--admin-primary);
}

.ord-m-summary {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    color: var(--admin-muted);
}
.ord-m-list {
    padding: 0 0.5rem 0.75rem;
}
.ord-m-empty {
    text-align: center;
    color: var(--admin-muted);
    padding: 2rem 1rem;
}

.ord-refund-busy {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
}
.ord-refund-busy[hidden] {
    display: none !important;
}
.ord-refund-busy-inner {
    text-align: center;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.92);
}
body.ord-refund-page-busy {
    cursor: wait;
}

.ord-m-card {
    margin-bottom: 0.65rem;
    border-radius: 12px !important;
    overflow: hidden;
}
.ord-m-card--refund { opacity: 0.92; }
.ord-m-card-top {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem 0;
    font-size: 0.72rem;
    flex-wrap: wrap;
}
.ord-m-loc {
    color: var(--admin-primary);
    font-weight: 500;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ord-m-loc i { margin-right: 0.15rem; }
.ord-m-sep { color: #cbd5e1; }
.ord-m-time { color: var(--admin-primary); }

.ord-m-card-main {
    display: flex;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
}
.ord-m-status-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--admin-chip-bg);
    color: var(--admin-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.ord-m-status-icon--ok {
    background: #dcfce7;
    color: #16a34a;
}
.ord-m-status-icon--refund {
    background: var(--admin-chip-bg);
    color: var(--admin-muted);
}
.ord-m-card-body { flex: 1; min-width: 0; }
.ord-m-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}
.ord-m-device {
    font-weight: 700;
    font-size: 0.92rem;
    word-break: break-all;
}
.ord-m-pay-status {
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
}
.ord-m-order-no {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.2rem;
}
.ord-m-order-no code {
    font-size: 0.72rem;
    color: var(--admin-muted);
    word-break: break-all;
}
.ord-m-copy {
    border: none;
    background: none;
    color: var(--admin-muted);
    padding: 0;
}
.ord-m-tag {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.1rem 0.45rem;
    font-size: 0.68rem;
    border: 1px solid #bfdbfe;
    color: var(--admin-primary);
    border-radius: 4px;
}

.ord-m-product {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    background: var(--admin-inset-bg);
    border-top: 1px solid var(--admin-row-border);
    font-size: 0.82rem;
}
.ord-m-product-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--admin-primary-soft);
    color: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ord-m-product-name { flex: 1; }
.ord-m-product-price { font-weight: 600; }

.ord-m-meta { padding: 0 0.75rem 0.35rem; }
.ord-m-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    color: var(--admin-muted);
    border-top: 1px dashed var(--admin-dashed-border);
}
.ord-m-total-amt {
    color: var(--admin-text);
    font-size: 0.88rem;
}
.ord-m-total-amt strong { color: var(--admin-strong-text); }

.ord-m-actions {
    display: flex;
    gap: 0.28rem;
    padding: 0.4rem 0.65rem 0.5rem;
    flex-wrap: nowrap;
    align-items: stretch;
}
.ord-m-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 32px;
    border-radius: 8px;
    font-size: 0.75rem;
    padding: 0.25rem 0.35rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ord-m-detail {
    padding: 0 0.75rem 0.65rem;
}

/* 弹窗：Bootstrap JS 未加载时由 devices-page.js 原生回退 */
.modal.show {
    display: block;
    z-index: 1060;
}
.modal-backdrop.show {
    z-index: 1055;
}

/* 设备页弹窗：JS 会移到 body；未迁移前先隐藏占位容器 */
.devices-modals-host {
    display: none !important;
}
body > .modal.fade:not(.show) {
    display: none;
}
body > .modal.show {
    display: block;
    z-index: 1060;
}

/* —— 商户桌面设备卡片（customer/devices） —— */
.devices-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.devices-card-list[data-devices-view="grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    gap: 0.9rem;
    align-items: stretch;
}
.devices-card-list[data-devices-view="grid"] > .dev-d-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.devices-card-list[data-devices-view="grid"] .dev-d-top {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    flex: 1 1 auto;
}
.devices-card-list[data-devices-view="grid"] .dev-d-body {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}
.devices-card-list[data-devices-view="grid"] .dev-d-body > .dev-traffic {
    justify-self: start;
    text-align: left;
    grid-column: 1 / -1;
    order: 3;
}
.devices-card-list[data-devices-view="grid"] .dev-d-body > .dev-traffic .device-traffic-inner {
    align-items: center;
    justify-content: flex-start;
}
.devices-card-list[data-devices-view="grid"] .dev-d-side {
    justify-self: end;
}
.devices-card-list[data-devices-view="grid"] .dev-d-primary-ops {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
}
.devices-card-list[data-devices-view="grid"] .dev-d-primary-ops .btn {
    min-width: 0;
    flex: 1 1 auto;
}
.devices-card-list[data-devices-view="grid"] .dev-d-more {
    margin-top: auto;
}
.devices-card-list[data-devices-view="grid"] .dev-d-more-edit,
.devices-card-list[data-devices-view="grid"] .dev-d-more-ops {
    width: 100%;
}
.devices-card-list[data-devices-view="grid"] .dev-d-more-ops {
    margin-left: 0;
}
@media (max-width: 991.98px) {
    .devices-view-toggle {
        display: none !important;
    }
    .devices-card-list[data-devices-view="grid"] {
        display: flex;
        flex-direction: column;
    }
}
.dev-d-card {
    position: relative;
    padding: 0.85rem 1rem 0.75rem;
    border: 1px solid var(--admin-border, rgba(148, 163, 184, 0.28));
    border-radius: 14px;
    background: var(--admin-surface, #fff);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.dev-d-card:not(.dev-d-card--offline) {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: inset 3px 0 0 #22c55e;
}
.dev-d-card--disabled {
    opacity: 0.88;
    background: var(--dev-disabled-row-bg, rgba(251, 191, 36, 0.08));
    border-color: rgba(245, 158, 11, 0.45);
}
.dev-d-card--disabled:not(.dev-d-card--offline) {
    box-shadow: inset 3px 0 0 #22c55e;
}
.dev-d-card--offline {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: inset 3px 0 0 #ef4444;
}
.dev-d-card--offline .dev-d-title-wrap .device-name-text {
    opacity: 0.92;
}
.dev-d-card--offline .dev-d-body {
    opacity: 0.92;
}
.dev-d-title-wrap .badge-offline {
    font-size: 0.86rem;
    padding: 0.18rem 0.55rem;
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.45);
}
.dev-d-top {
    display: grid;
    grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr) auto;
    gap: 0.55rem 0.9rem;
    align-items: start;
}
.dev-d-info {
    min-width: 0;
}
.dev-d-head {
    display: block;
}
.dev-d-title-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    min-width: 0;
}
.dev-d-title-wrap .device-name-cell {
    display: inline-flex;
    align-items: center;
}
.dev-d-title-wrap .device-name-text {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--admin-text, #0f172a);
    line-height: 1.25;
}
.dev-d-title-wrap .dev-status {
    display: inline-flex;
    align-items: center;
}
.dev-d-title-wrap .dev-status-stack {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.dev-d-primary-ops {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    flex-shrink: 0;
    min-width: 5.8rem;
}
.dev-d-primary-ops .btn {
    min-width: 5.5rem;
}
.dev-d-primary-ops .dev-d-vol-btn {
    width: 100%;
    min-width: 0;
}
.dev-d-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    margin-top: 0.35rem;
}
.dev-d-meta-row .dev-d-meta {
    margin-top: 0;
}
.dev-d-vol-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.dev-d-vol-btn .dev-d-vol-lab {
    opacity: 0.8;
}
.dev-d-meta,
.dev-d-place {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.35rem;
    margin-top: 0.3rem;
    font-size: 0.82rem;
    color: var(--admin-muted, #64748b);
    line-height: 1.35;
}
.dev-d-meta .device-id-code {
    font-size: 0.78rem;
    padding: 0.06rem 0.35rem;
    border-radius: 6px;
    border: 1px solid var(--admin-border, rgba(148, 163, 184, 0.35));
    background: rgba(148, 163, 184, 0.08);
}
.dev-d-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.45;
    flex-shrink: 0;
}
.dev-d-place .device-place-text {
    font-weight: 560;
    color: var(--admin-text, #334155);
}
.dev-d-iccid {
    margin-top: 0.2rem;
    font-size: 0.76rem;
    color: var(--admin-muted, #64748b);
    line-height: 1.3;
}
.dev-d-iccid .device-iccid-text {
    font-size: inherit;
    color: inherit;
    background: transparent;
    border: 0;
    padding: 0;
}
.dev-d-admin-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    color: var(--admin-muted, #64748b);
    line-height: 1.35;
}
.dev-d-admin-meta .device-admin-remark-text {
    min-width: 0;
    word-break: break-word;
}
.dev-d-place .device-customer-text {
    font-weight: 560;
    color: var(--admin-text, #334155);
}
.dev-d-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 0.85rem;
    row-gap: 0.4rem;
    margin: 0;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.06);
    min-width: 0;
}
.dev-d-main {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}
.dev-d-body > .dev-traffic {
    min-width: 0;
    justify-self: center;
    text-align: center;
}
.dev-d-body > .dev-traffic .device-traffic-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.45rem;
    font-size: 0.8rem;
}
.dev-d-main .price-plans-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin: 0;
}
.dev-d-scan {
    display: block;
    font-size: 0.78rem;
    color: var(--admin-muted, #64748b);
    line-height: 1.35;
}
.dev-d-scan .device-scan-preview {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    line-height: 1.4;
}
.dev-d-scan .device-scan-preview:hover {
    color: var(--admin-link, #38bdf8);
    text-decoration: underline;
}
.dev-d-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    justify-self: end;
    margin: 0;
}
.dev-d-side .qr-cell {
    margin: 0;
}
.dev-d-side .qr-cell-btn {
    padding: 0;
    border: 1px solid var(--admin-border, rgba(148, 163, 184, 0.35));
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    line-height: 0;
}
.dev-d-side .qr-cell-btn img {
    display: block;
    width: 56px;
    height: 56px;
}
@media (max-width: 1100px) {
    .dev-d-top {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .dev-d-body {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr) auto auto;
    }
    .dev-d-primary-ops {
        grid-column: 2;
        grid-row: 1;
    }
}
@media (max-width: 760px) {
    .dev-d-top {
        grid-template-columns: 1fr;
    }
    .dev-d-primary-ops {
        grid-column: 1;
        grid-row: auto;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .dev-d-body {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .dev-d-body > .dev-traffic {
        justify-self: start;
        text-align: left;
    }
    .dev-d-body > .dev-traffic .device-traffic-inner {
        align-items: flex-start;
    }
}
.dev-d-more {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.85rem;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--admin-border, rgba(148, 163, 184, 0.22));
}
.dev-d-more-edit,
.dev-d-more-ops {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.dev-d-more-ops {
    margin-left: auto;
}
.dev-d-more-edit .btn {
    padding: 0.28rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 560;
    border-radius: 999px;
    border-width: 1.5px;
    color: var(--admin-text, #334155);
    border-color: rgba(100, 116, 139, 0.55);
    background: rgba(148, 163, 184, 0.12);
}
.dev-d-more-edit .btn:hover {
    color: var(--admin-text, #0f172a);
    border-color: rgba(56, 189, 248, 0.65);
    background: rgba(56, 189, 248, 0.12);
}
.dev-d-more .btn-sm:not(.btn-link) {
    padding: 0.28rem 0.7rem;
    font-size: 0.82rem;
}

html[data-admin-theme="stick"] .dev-d-card,
html[data-admin-theme="dark"] .dev-d-card,
html[data-admin-theme="wish"] .dev-d-card {
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
}
html[data-admin-theme="stick"] .dev-d-place .device-place-text,
html[data-admin-theme="dark"] .dev-d-place .device-place-text,
html[data-admin-theme="wish"] .dev-d-place .device-place-text,
html[data-admin-theme="stick"] .dev-d-place .device-customer-text,
html[data-admin-theme="dark"] .dev-d-place .device-customer-text,
html[data-admin-theme="wish"] .dev-d-place .device-customer-text {
    color: var(--admin-text, #e2e8f0);
}
html[data-admin-theme="stick"] .dev-d-iccid .device-iccid-text,
html[data-admin-theme="dark"] .dev-d-iccid .device-iccid-text,
html[data-admin-theme="wish"] .dev-d-iccid .device-iccid-text {
    color: var(--admin-muted, #94a3b8);
}
html[data-admin-theme="stick"] .dev-d-meta .device-id-code,
html[data-admin-theme="dark"] .dev-d-meta .device-id-code,
html[data-admin-theme="wish"] .dev-d-meta .device-id-code {
    border-color: rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.08);
    color: #f0d78c;
}
html[data-admin-theme="stick"] .dev-d-body,
html[data-admin-theme="dark"] .dev-d-body,
html[data-admin-theme="wish"] .dev-d-body {
    background: rgba(0, 0, 0, 0.18);
}
html[data-admin-theme="stick"] .dev-d-side .qr-cell-btn,
html[data-admin-theme="dark"] .dev-d-side .qr-cell-btn,
html[data-admin-theme="wish"] .dev-d-side .qr-cell-btn {
    background: #fff;
}
html[data-admin-theme="stick"] .dev-d-card:not(.dev-d-card--offline),
html[data-admin-theme="dark"] .dev-d-card:not(.dev-d-card--offline),
html[data-admin-theme="wish"] .dev-d-card:not(.dev-d-card--offline) {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: inset 3px 0 0 #22c55e;
}
html[data-admin-theme="stick"] .dev-d-card--offline,
html[data-admin-theme="dark"] .dev-d-card--offline,
html[data-admin-theme="wish"] .dev-d-card--offline {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: inset 3px 0 0 #ef4444;
}
html[data-admin-theme="stick"] .dev-d-card--disabled,
html[data-admin-theme="dark"] .dev-d-card--disabled,
html[data-admin-theme="wish"] .dev-d-card--disabled {
    background: rgba(245, 158, 11, 0.08);
}
html[data-admin-theme="stick"] .dev-d-card--disabled:not(.dev-d-card--offline),
html[data-admin-theme="dark"] .dev-d-card--disabled:not(.dev-d-card--offline),
html[data-admin-theme="wish"] .dev-d-card--disabled:not(.dev-d-card--offline) {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: inset 3px 0 0 #22c55e;
}
html[data-admin-theme="stick"] .dev-d-more-edit .btn-outline-secondary,
html[data-admin-theme="dark"] .dev-d-more-edit .btn-outline-secondary,
html[data-admin-theme="wish"] .dev-d-more-edit .btn-outline-secondary {
    color: #f1f5f9;
    border-color: rgba(212, 175, 55, 0.55);
    background: rgba(212, 175, 55, 0.12);
}
html[data-admin-theme="stick"] .dev-d-more-edit .btn-outline-secondary:hover,
html[data-admin-theme="dark"] .dev-d-more-edit .btn-outline-secondary:hover,
html[data-admin-theme="wish"] .dev-d-more-edit .btn-outline-secondary:hover {
    color: #fffbeb;
    border-color: rgba(250, 204, 21, 0.85);
    background: rgba(212, 175, 55, 0.22);
}

/* —— 手机设备管理 —— */
.dev-m-page { display: none; }
.dev-desktop-only { display: block; }

/* 桌面设备表：横向滚动 + 操作列固定 */
.devices-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.devices-table-hint {
    display: none;
    text-align: center;
    padding: 0.25rem 0.5rem 0;
}
@media (min-width: 992px) {
    .devices-table-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
    }
    #devicesTable { min-width: 980px; }
    #devicesTable thead th:last-child,
    #devicesTable tbody td.actions-cell {
        position: sticky;
        right: 0;
        z-index: 3;
        background: var(--admin-surface, #fff);
        box-shadow: -6px 0 10px rgba(15, 23, 42, 0.06);
    }
    #devicesTable thead th:last-child { z-index: 4; }
    #devicesTable tbody tr.table-warning td.actions-cell {
        background: var(--dev-disabled-row-bg, #fffbeb);
    }
}

/* 设备列表：合并单元格 */
.device-identity-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    max-width: 9.5rem;
}
.device-identity-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--admin-muted, #94a3b8);
    line-height: 1.2;
}
.device-iccid-text {
    font-size: 0.68rem;
    color: var(--admin-muted, #94a3b8);
    word-break: break-all;
    max-width: 100%;
    line-height: 1.2;
}
.device-owner-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    max-width: 10rem;
}
.device-owner-cell .device-customer-text {
    font-weight: 500;
    font-size: 0.86rem;
}
.device-scan-vol-cell {
    text-align: center;
    vertical-align: middle;
}
.device-scan-vol-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
    max-width: 11rem;
    margin: 0 auto;
}
.device-scan-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.08rem;
    width: 100%;
}
.device-scan-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.02rem;
}
.device-scan-block .device-scan-preview {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
#devicesTable td.dev-traffic,
#devicesTable td.dev-prices {
    text-align: center;
}
#devicesTable .dev-traffic .device-traffic-inner,
#devicesTable .price-plans-cell {
    margin-left: auto;
    margin-right: auto;
}
.dev-actions-compact {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.28rem;
    min-width: 4.5rem;
}

/* —— 设备列表表格 —— */
.devices-list-card {
    overflow: hidden;
    border: 1px solid var(--admin-border);
}
.devices-table-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.devices-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.devices-view-toggle .devices-view-btn {
    padding: 0.2rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 999px;
}
.devices-view-toggle .devices-view-btn.is-active {
    color: #fff;
    border-color: rgba(34, 197, 94, 0.75);
    background: rgba(34, 197, 94, 0.85);
}
html[data-admin-theme="stick"] .devices-view-toggle .devices-view-btn.is-active,
html[data-admin-theme="dark"] .devices-view-toggle .devices-view-btn.is-active,
html[data-admin-theme="wish"] .devices-view-toggle .devices-view-btn.is-active {
    color: #0f172a;
    border-color: rgba(212, 175, 55, 0.75);
    background: rgba(212, 175, 55, 0.9);
}
.devices-table-live {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.22);
    animation: status-blink 2s ease-in-out infinite;
}
.devices-table-hint {
    margin: 0;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}
@media (min-width: 992px) {
    .devices-table-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        border-bottom: 1px solid var(--admin-border);
    }
    .devices-table-hint::before {
        content: "\2190 \2192";
        font-size: 0.7rem;
        opacity: 0.55;
        letter-spacing: 0.05em;
    }
    #devicesTable tbody td.device-identity-cell .device-id-code {
        display: inline-block;
        padding: 0.18rem 0.55rem;
        border-radius: 6px;
        font-size: 0.82rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        color: var(--neon-cyan);
        background: rgba(0, 229, 255, 0.08);
        border: 1px solid rgba(0, 229, 255, 0.18);
    }
    #devicesTable .onlineLogBtn {
        border-radius: 999px;
        padding: 0.12rem 0.65rem;
        font-size: 0.76rem;
        font-weight: 500;
    }
    #devicesTable tbody td.actions-cell {
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
        vertical-align: middle;
    }
    #devicesTable tbody td.actions-cell .dev-actions-compact .btn,
    #devicesTable tbody td.actions-cell .dev-actions-compact a.btn {
        margin: 0;
        width: 100%;
        min-width: 4.25rem;
        padding: 0.28rem 0.45rem;
        font-size: 0.78rem;
        line-height: 1.25;
        white-space: nowrap;
    }
    #devicesTable .dev-traffic .device-traffic-inner {
        display: inline-flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.15rem 0.4rem;
    }
    #devicesTable .qr-cell {
        display: inline-flex;
        padding: 3px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.04);
    }
    #devicesTable .qr-cell img {
        width: 48px;
        height: 48px;
        object-fit: contain;
    }
    #devicesTable .device-name-cell,
    #devicesTable .device-place-cell,
    #devicesTable .device-group-cell,
    #devicesTable .device-admin-remark-cell,
    #devicesTable .device-type-cell,
    #devicesTable .device-owner-cell {
        justify-content: center;
        max-width: 9rem;
    }
    #devicesTable .device-name-text,
    #devicesTable .device-place-text,
    #devicesTable .device-group-text,
    #devicesTable .device-admin-remark-text {
        word-break: break-word;
        text-align: center;
    }
    #devicesTable .device-admin-remark-text {
        font-size: 0.95rem;
        letter-spacing: 0.02em;
    }
    #devicesTable .price-plans-cell .btn-link {
        font-size: 0.76rem;
        opacity: 0.85;
    }
}

/* 手机操作区：主操作 / 编辑分开，允许换行避免裁切 */
.dev-m-ops-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.dev-m-ops-primary,
.dev-m-ops-secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}
.dev-m-ops-primary .btn,
.dev-m-ops-primary a.btn,
.dev-m-ops-secondary .btn,
.dev-m-ops-secondary a.btn {
    width: 100%;
    margin: 0;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.2;
    min-height: 32px;
    padding: 0.28rem 0.45rem;
}
.dev-m-ops-primary {
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--admin-dashed-border);
}

@media (max-width: 991.98px) {
    body.admin-devices-mobile .admin-page-head { display: none; }
    body.admin-devices-mobile .admin-main {
        padding-top: 0.5rem;
        padding-bottom: 0.25rem;
    }
    body.admin-devices-mobile .admin-main > .site-footer--app {
        margin-top: 1.25rem;
        padding: 0.85rem 0.75rem 0;
        background: var(--admin-subtle-bg);
        border-top: 1px solid var(--admin-border);
    }
    .dev-m-page {
        display: block;
        margin: -0.5rem -0.75rem 0;
        padding-bottom: 0.25rem;
    }
    .dev-desktop-only { display: none !important; }
    .dev-m-list { min-height: auto; }
}

/* 商户设备：按类型宫格入口 */
.dev-type-hub-intro { margin-top: 0.15rem; }
.dev-type-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
@media (min-width: 768px) {
    .dev-type-hub-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
}
@media (min-width: 1200px) {
    .dev-type-hub-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.dev-type-hub-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface, #fff);
    color: inherit;
    text-decoration: none;
    min-height: 8.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.dev-type-hub-card:hover {
    border-color: var(--admin-primary, #2563eb);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
    color: inherit;
}
.dev-type-hub-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-subtle-bg, #f1f5f9);
    color: var(--admin-primary, #2563eb);
    font-size: 1.15rem;
}
.dev-type-hub-card-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
}
.dev-type-hub-card-count {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--admin-primary, #2563eb);
    line-height: 1.1;
}
.dev-type-hub-card-stat {
    font-size: 0.78rem;
}
.dev-type-hub-card-desc {
    font-size: 0.72rem;
    color: var(--admin-muted, #64748b);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dev-extra-links {
    margin-bottom: 0.75rem;
}
.dev-extra-links-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
}
.dev-extra-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    background: var(--admin-primary-soft, rgba(37, 99, 235, 0.08));
    color: var(--admin-primary, #2563eb);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.dev-extra-link:hover {
    background: var(--admin-primary, #2563eb);
    color: #fff;
}
.dev-extra-link i {
    font-size: 1rem;
}
@media (max-width: 991.98px) {
    .dev-extra-links {
        margin: 0 0 0.65rem;
    }
    .dev-extra-links-inner {
        padding: 0.55rem 0.65rem;
        gap: 0.4rem;
    }
    .dev-extra-link {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
        min-width: 0;
        font-size: 0.78rem;
        padding: 0.5rem 0.45rem;
    }
}
.dev-type-back-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.dev-type-manage-link {
    color: var(--admin-muted, #64748b);
    text-decoration: none;
}
.dev-type-manage-link:hover { text-decoration: underline; }

.m-home-device-types {
    padding: 0;
    overflow: hidden;
}
.m-home-device-types .m-home-board-head {
    margin-bottom: 0;
}
.m-home-device-types .dev-type-hub {
    margin: 0;
    padding: 0.45rem 1rem 0.75rem;
}
.m-home-device-types .dev-type-hub-intro {
    margin-bottom: 0.65rem;
}
.dash-section-device-types {
    margin-bottom: 1.25rem;
}
.dash-section-device-types .dev-type-hub {
    margin-top: 0.15rem;
}

/* 统计概览 — 设备类型紧凑条（仅桌面） */
@media (min-width: 992px) {
    .dash-desktop-only .dash-section-device-types {
        margin-bottom: 0.75rem !important;
    }

    .dash-desktop-only .dash-section-device-types .dash-section-title {
        font-size: 0.95rem;
        margin-bottom: 0.45rem !important;
    }

    .dash-desktop-only .dev-type-hub--dash .dev-type-hub-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: stretch;
    }

    .dash-desktop-only .dev-type-hub--dash .dev-type-hub-card {
        flex: 0 1 auto;
        width: auto;
        max-width: min(100%, 260px);
        min-height: 0;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.3rem 0.45rem;
        padding: 0.45rem 0.6rem;
        border-radius: 0.5rem;
    }

    .dash-desktop-only .dev-type-hub--dash .dev-type-hub-card:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
    }

    .dash-desktop-only .dev-type-hub--dash .dev-type-hub-card-icon {
        width: 1.7rem;
        height: 1.7rem;
        border-radius: 0.4rem;
        font-size: 0.82rem;
        flex-shrink: 0;
    }

    .dash-desktop-only .dev-type-hub--dash .dev-type-hub-card-name {
        font-size: 0.8rem;
        font-weight: 600;
        line-height: 1.25;
        flex: 1;
        min-width: 0;
    }

    .dash-desktop-only .dev-type-hub--dash .dev-type-hub-card-count {
        font-size: 0.88rem;
        font-weight: 700;
        margin-left: auto;
        flex-shrink: 0;
    }

    .dash-desktop-only .dev-type-hub--dash .dev-type-hub-card-stat {
        width: 100%;
        padding-left: 2.05rem;
        font-size: 0.68rem;
        line-height: 1.2;
    }

    .dash-desktop-only .dev-type-hub--dash .dev-type-hub-card-desc {
        display: none;
    }
}

.dev-type-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    color: var(--admin-primary, #2563eb);
    text-decoration: none;
    font-size: 0.9rem;
}
.dev-type-back-link:hover { text-decoration: underline; }
.dev-type-back-title {
    font-weight: 600;
    color: var(--admin-text, #0f172a);
}
@media (max-width: 991.98px) {
    .dev-type-hub {
        margin: 0;
    }
    .dev-type-hub-grid {
        gap: 0.45rem;
        padding: 0;
    }
    .dev-type-hub-card {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.25rem 0.45rem;
        min-height: 0;
        padding: 0.55rem 0.6rem;
        border-radius: 0.55rem;
    }
    .dev-type-hub-card:hover {
        transform: none;
        box-shadow: none;
    }
    .dev-type-hub-card-icon {
        width: 1.85rem;
        height: 1.85rem;
        border-radius: 0.45rem;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    .dev-type-hub-card-name {
        flex: 1;
        min-width: 0;
        font-size: 0.82rem;
        line-height: 1.25;
    }
    .dev-type-hub-card-count {
        font-size: 0.95rem;
        margin-left: auto;
        flex-shrink: 0;
    }
    .dev-type-hub-card-stat {
        width: 100%;
        padding-left: 2.3rem;
        font-size: 0.68rem;
        line-height: 1.2;
    }
    .dev-type-hub-card-desc {
        display: none;
    }
    .m-home-device-types .dev-type-hub {
        padding: 0.35rem 1rem 0.65rem;
    }
    .m-home-device-types .m-home-board-title {
        font-size: 0.88rem;
    }

    /* 手机设备列表页 */
    .dev-m-page {
        margin: -0.35rem -0.5rem 0;
    }
    .dev-m-search-row {
        padding: 0.45rem 0.55rem 0.35rem;
        gap: 0.25rem;
    }
    .dev-m-search-row input {
        font-size: 0.82rem;
        padding: 0.25rem 0.45rem;
    }
    .dev-m-search-btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    .dev-m-home-btn {
        width: 32px;
        height: 28px;
        border-radius: 6px;
    }
    .dev-m-tab {
        padding: 0.4rem 0.2rem;
        font-size: 0.74rem;
    }
    .dev-m-filter-row {
        padding: 0.35rem 0.55rem 0.45rem;
        gap: 0.25rem;
    }
    .dev-m-filter-select {
        font-size: 0.72rem;
        padding: 0.2rem 0.4rem;
        min-height: 1.85rem;
    }
    .dev-m-toolbar {
        padding: 0.25rem 0.55rem;
        font-size: 0.68rem;
    }
    .dev-m-toolbar-hint:last-child {
        display: none;
    }
    .dev-m-scan-bar {
        padding-left: 0.55rem !important;
        padding-right: 0.55rem !important;
        padding-bottom: 0.35rem !important;
    }
    .dev-m-scan-bar .btn {
        font-size: 0.78rem;
        padding: 0.35rem 0.5rem;
    }
    .dev-type-back-bar {
        padding: 0 0.55rem;
        margin-bottom: 0.45rem !important;
        gap: 0.35rem;
    }
    .dev-type-back-link {
        font-size: 0.78rem;
    }
    .dev-type-back-title {
        font-size: 0.82rem;
    }
    .dev-m-place {
        margin-bottom: 0.2rem;
    }
    .dev-m-place-head {
        padding: 0.42rem 0.55rem;
    }
    .dev-m-place-name {
        font-size: 0.8rem;
    }
    .dev-m-place-stat {
        font-size: 0.68rem;
    }
    .dev-m-item-row {
        padding: 0.42rem 0.35rem 0.42rem 0.55rem;
        gap: 0.25rem;
    }
    .dev-m-item-title {
        font-size: 0.8rem;
        line-height: 1.25;
    }
    .dev-m-item-sub {
        font-size: 0.68rem;
        margin-top: 0.08rem;
    }
    .dev-m-item-side {
        min-width: 2.75rem;
    }
    .dev-m-alarm {
        font-size: 0.6rem;
        padding: 0.08rem 0.22rem;
    }
    .dev-m-signal {
        font-size: 0.58rem;
        padding: 0.1rem 0.28rem;
    }
    .dev-m-offline-dur {
        font-size: 0.62rem;
        margin-top: 0.08rem;
    }
    .dev-m-expand-btn {
        width: 30px;
        height: 30px;
        border-radius: 6px;
        flex-shrink: 0;
    }
    .dev-m-detail {
        padding: 0 0.55rem 0.5rem;
    }
    .dev-m-detail-grid {
        gap: 0.22rem 0.35rem;
        margin: 0.35rem 0 0.25rem;
    }
    .dev-m-field {
        padding: 0.22rem 0.35rem;
        border-radius: 7px;
    }
    .dev-m-field-lab {
        font-size: 0.62rem;
    }
    .dev-m-field-val {
        font-size: 0.72rem;
    }
    .dev-m-detail-dl {
        grid-template-columns: 4.6rem 1fr;
        gap: 0.15rem 0.35rem;
        font-size: 0.72rem;
        margin: 0.35rem 0;
    }
    .dev-m-detail-qr img,
    .dev-m-qr-box img {
        max-width: 88px;
        height: auto;
    }
    .dev-m-detail-panel {
        padding: 0.45rem 0.55rem 0.5rem;
        border-radius: 8px;
        margin-top: 0.15rem;
    }
    .dev-m-panel-row {
        padding: 0.3rem 0;
        gap: 0.35rem;
    }
    .dev-m-panel-label {
        width: 3.8rem;
        font-size: 0.68rem;
    }
    .dev-m-panel-label--ops {
        margin-top: 0.35rem;
        margin-bottom: 0.2rem;
        padding-top: 0.35rem;
        font-size: 0.72rem;
    }
    .dev-m-panel-body {
        font-size: 0.72rem;
        gap: 0.25rem 0.35rem;
    }
    .dev-m-ops-wrap {
        gap: 0.35rem;
    }
    .dev-m-ops-primary,
    .dev-m-ops-secondary {
        gap: 0.3rem;
    }
    .dev-m-ops-primary {
        padding-bottom: 0.3rem;
    }
    .dev-m-detail-actions .btn,
    .dev-m-detail-actions a.btn {
        min-height: 1.65rem;
        padding: 0.22rem 0.4rem;
        font-size: 0.68rem;
        border-radius: 5px;
    }
    .dev-m-empty {
        padding: 1.5rem 0.75rem;
        font-size: 0.82rem;
    }
}

.dev-m-search {
    border-radius: 0 !important;
    margin-bottom: 0;
}
.dev-m-search-row {
    display: flex;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem 0.5rem;
    align-items: center;
}
.dev-m-search-row .bi-search { flex-shrink: 0; }
.dev-m-search-row input { flex: 1; min-width: 0; }
.dev-m-search-btn { flex-shrink: 0; }
.dev-m-home-btn {
    width: 38px;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.dev-m-tabs {
    display: flex;
    border-top: 1px solid var(--admin-border);
}
.dev-m-tab {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0.25rem;
    font-size: 0.8rem;
    color: var(--admin-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.dev-m-tab.active {
    color: var(--admin-primary);
    font-weight: 600;
    border-bottom-color: var(--admin-primary);
    background: var(--admin-primary-soft);
}

.dev-m-filter-row {
    display: flex;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem 0.65rem;
    flex-wrap: wrap;
}
.dev-m-filter-select {
    flex: 1;
    min-width: 0;
    font-size: 0.78rem;
    border-radius: 8px;
}

.dev-m-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    color: var(--admin-muted);
    background: var(--admin-subtle-bg);
    border-bottom: 1px solid var(--admin-border);
}
.dev-m-toolbar-hint i { margin-right: 0.15rem; }

.dev-m-list { background: var(--admin-list-bg); min-height: 40vh; }
.dev-m-empty {
    text-align: center;
    color: var(--admin-muted);
    padding: 2.5rem 1rem;
}

.dev-m-place {
    margin-bottom: 0.35rem;
    background: var(--admin-surface);
}
.dev-m-place-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--admin-border);
    width: 100%;
    border: none;
    background: var(--admin-surface);
    text-align: left;
    cursor: pointer;
}
.dev-m-place-name {
    font-weight: 700;
    font-size: 0.9rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dev-m-place-stat { font-size: 0.75rem; flex-shrink: 0; }
.dev-m-place-chevron {
    color: #94a3b8;
    transition: transform 0.2s;
}
.dev-m-place--collapsed .dev-m-place-body { display: none; }
.dev-m-place--collapsed .dev-m-place-chevron { transform: rotate(-90deg); }

.dev-m-item {
    border-bottom: 1px solid var(--admin-row-border);
    background: var(--admin-surface);
}
.dev-m-item--disabled { opacity: 0.88; }
.dev-m-item-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem 0.65rem 0.75rem;
}
.dev-m-item-main { flex: 1; min-width: 0; }
.dev-m-item-title {
    font-weight: 700;
    font-size: 0.88rem;
    word-break: break-all;
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.4rem;
}
.dev-m-title-text {
    font-weight: 700;
}
.dev-m-title-id {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--admin-muted);
    font-variant-numeric: tabular-nums;
}
.dev-m-item-icon { font-size: 0.85rem; margin-left: 0.15rem; }
.dev-m-item-sub {
    font-size: 0.75rem;
    color: var(--admin-muted);
    margin-top: 0.15rem;
}
/* 二维码下方：流量 / 扫码页 / 操作（与桌面三列对应） */
.dev-m-detail-panel {
    margin-top: 0.25rem;
    padding: 0.65rem 0.75rem 0.75rem;
    background: var(--admin-surface-elevated);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
}
.dev-m-panel-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--admin-row-border);
}
.dev-m-panel-row:last-of-type {
    border-bottom: none;
    padding-bottom: 0.15rem;
}
.dev-m-panel-label {
    flex-shrink: 0;
    width: 4.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--admin-muted);
    line-height: 1.4;
}
.dev-m-panel-label--ops {
    width: auto;
    margin-top: 0.5rem;
    margin-bottom: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--admin-dashed-border);
    color: var(--admin-text);
}
.dev-m-panel-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.35;
}
.dev-m-panel-traffic .badge,
.dev-m-panel-traffic .small {
    font-size: 0.72rem;
}
.dev-m-panel-scan-text {
    flex: 1;
    min-width: 0;
    color: var(--admin-text);
    word-break: break-word;
}
.dev-m-detail-panel .dev-m-detail-actions,
.dev-m-detail-panel .dev-m-ops-wrap {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.modal .form-select {
    font-size: 16px;
}
.dev-m-item-side {
    text-align: center;
    flex-shrink: 0;
    min-width: 3.2rem;
}
.dev-m-side-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}
.dev-m-printer-alarms {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    line-height: 1.1;
}
.dev-m-printer-alarms[hidden] {
    display: none !important;
}
.dev-m-alarm {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.12rem 0.32rem;
    border-radius: 4px;
    white-space: nowrap;
}
.dev-m-alarm--low {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.dev-m-alarm--paper {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.dev-m-alarm--jam {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.dev-m-signal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    border: 1px solid #fecaca;
    color: #dc2626;
    background: #fef2f2;
}
.dev-status-cell {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}
#devicesTable .dev-status-cell {
    min-width: 5.5rem;
}
#devicesTable .dev-status-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    min-width: 5.5rem;
}
#devicesTable .dev-status-stack .onlineLogBtn {
    font-size: 0.75rem;
    line-height: 1.2;
    opacity: 0.85;
}
#devicesTable .dev-status-stack .onlineLogBtn:hover {
    opacity: 1;
}
.dev-m-signal--on {
    border-color: #bbf7d0;
    color: #16a34a;
    background: #f0fdf4;
}
.dev-m-signal-x {
    position: absolute;
    right: -4px;
    top: -4px;
    font-size: 0.55rem;
    color: #dc2626;
}
.dev-m-signal-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 1px;
    margin-left: 3px;
    height: 10px;
    vertical-align: middle;
}
.dev-m-bar {
    display: block;
    width: 2px;
    border-radius: 1px;
    background: rgba(22, 163, 74, 0.25);
}
.dev-m-bar:nth-child(1) { height: 3px; }
.dev-m-bar:nth-child(2) { height: 5px; }
.dev-m-bar:nth-child(3) { height: 7px; }
.dev-m-bar:nth-child(4) { height: 9px; }
.dev-m-bar--on {
    background: #16a34a;
}
.dev-m-signal--off .dev-m-bar--on {
    background: #dc2626;
}
.dev-m-offline-dur {
    font-size: 0.68rem;
    margin-top: 0.15rem;
    font-weight: 600;
}
.dev-m-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
}
.dev-m-status-pill--on {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}
.dev-m-status-pill--off {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.dev-m-expand-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--admin-chip-bg);
    border-radius: 10px;
    color: var(--admin-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    z-index: 2;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, transform 0.15s;
}
.dev-m-expand-btn .bi-chevron-right { transition: transform 0.2s; }
.dev-m-item--open .dev-m-expand-btn {
    background: var(--admin-primary-soft);
    color: var(--admin-primary);
}
.dev-m-item--open .dev-m-expand-btn .bi-chevron-right { transform: rotate(90deg); }

.dev-m-detail {
    padding: 0 0.75rem 0.75rem;
    border-top: 1px dashed var(--admin-dashed-border);
    background: var(--admin-inset-bg);
}
.dev-m-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.28rem 0.45rem;
    margin: 0.45rem 0 0.35rem;
}
.dev-m-field {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
    padding: 0.28rem 0.4rem;
    border-radius: 8px;
    background: var(--admin-surface-elevated, rgba(148, 163, 184, 0.08));
    border: 1px solid var(--admin-border, rgba(148, 163, 184, 0.18));
}
.dev-m-field--wide {
    grid-column: 1 / -1;
}
.dev-m-field-lab {
    font-size: 0.65rem;
    line-height: 1.2;
    color: var(--admin-muted);
}
.dev-m-field-val {
    font-size: 0.78rem;
    line-height: 1.3;
    word-break: break-all;
}
.dev-m-field[aria-hidden="true"] {
    visibility: hidden;
    pointer-events: none;
}
.dev-m-field-val .badge,
.dev-m-field-val .price-chips {
    vertical-align: middle;
}
.dev-m-detail-dl {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.25rem 0.5rem;
    font-size: 0.78rem;
    margin: 0.5rem 0;
}
.dev-m-detail-dl dt {
    color: var(--admin-muted);
    margin: 0;
}
.dev-m-detail-dl dd { margin: 0; word-break: break-all; }
.dev-m-detail-qr .qrGenerateBtn {
    font-size: 0.78rem;
}
.dev-m-qr-box img {
    max-width: 100px;
    height: auto;
    border-radius: 6px;
}
.dev-m-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.dev-m-detail-actions .btn,
.dev-m-detail-actions a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.85rem;
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
    line-height: 1.25;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface-elevated);
    color: var(--admin-text);
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.dev-m-detail-actions .btn:empty,
.dev-m-detail-actions a.btn:empty {
    display: none;
}
.dev-m-detail-actions .btn-outline-secondary,
.dev-m-detail-actions a.btn-outline-secondary {
    border-color: var(--admin-border);
    background: var(--admin-surface-elevated);
    color: var(--admin-text);
}
.dev-m-detail-actions .btn-outline-warning,
.dev-m-detail-actions a.btn-outline-warning {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #b45309;
}
.dev-m-detail-actions .btn-outline-danger,
.dev-m-detail-actions a.btn-outline-danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #dc2626;
}
.dev-m-detail-actions .btn-outline-primary,
.dev-m-detail-actions .btn-primary,
.dev-m-detail-actions a.btn-outline-primary,
.dev-m-detail-actions a.btn-primary {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}
.dev-m-detail-actions .btn-success,
.dev-m-detail-actions a.btn-success {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
}
.dev-m-detail-actions .btn-secondary.disabled,
.dev-m-detail-actions span.btn.disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
}
.dev-m-detail-actions .btn-success.disabled {
    opacity: 0.55;
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #64748b;
}
.dev-m-detail-actions .btn-outline-warning.disabled {
    opacity: 0.55;
}
.dev-m-detail-actions .price-chips {
    width: 100%;
    margin-bottom: 0.15rem;
}
.dev-m-detail .price-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* —— 手机客户 / 场地管理 —— */
.crm-m-page { display: none; }
.crm-desktop-only { display: block; }

.crm-customers-table th,
.crm-customers-table td {
    text-align: center !important;
    vertical-align: middle !important;
}

.crm-customers-table .device-admin-remark-cell {
    display: inline-flex;
    width: 100%;
    align-items: center;
}

.crm-customers-table td .form-check,
.crm-customers-table td form.form-check {
    display: inline-flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: left;
}

.crm-customers-table td form.d-flex {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.crm-customers-table td .form-check-input {
    float: none;
    margin-left: 0;
    margin-top: 0;
}

.crm-customers-table td .form-check-label {
    text-align: left;
    margin-bottom: 0;
    padding-left: 0;
}

.crm-customers-table td .d-inline-flex,
.crm-customers-table td .btn-group {
    justify-content: center;
}

.crm-customers-table td.actions-cell {
    text-align: center !important;
}

.crm-customers-table td.actions-cell .d-inline-flex,
.crm-customers-table td.actions-cell form.d-inline-flex {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 991.98px) {
    body.admin-crm-mobile .admin-page-head { display: none; }
    body.admin-crm-mobile .admin-main { padding-top: 0.5rem; }
    .crm-m-page {
        display: block;
        margin: -0.5rem -0.75rem 0;
        padding-bottom: 0.5rem;
    }
    .crm-desktop-only { display: none !important; }
}

.crm-m-search {
    border-radius: 0 !important;
    margin-bottom: 0;
}
.crm-m-search-row {
    display: flex;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem 0.5rem;
    align-items: center;
}
.crm-m-search-row .bi-search { flex-shrink: 0; }
.crm-m-search-row input { flex: 1; min-width: 0; }
.crm-m-home-btn {
    width: 38px;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-primary);
    text-decoration: none;
    flex-shrink: 0;
}
.crm-m-filter-row {
    padding: 0 0.75rem 0.65rem;
}
.crm-m-filter-row select { font-size: 0.78rem; border-radius: 8px; }

.crm-m-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--admin-subtle-bg);
    border-bottom: 1px solid var(--admin-border);
    font-size: 0.82rem;
}

.crm-m-add-panel {
    margin: 0.5rem 0.75rem;
    border-radius: 12px !important;
}

.crm-m-list {
    background: var(--admin-list-bg);
    min-height: 36vh;
    padding-bottom: 0.5rem;
}
.crm-m-empty {
    text-align: center;
    color: var(--admin-muted);
    padding: 2.5rem 1rem;
}

.crm-m-group-head {
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--admin-muted);
    background: var(--admin-group-head-bg);
    position: sticky;
    top: 0;
    z-index: 1;
}

.crm-m-item {
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-row-border);
}
.crm-m-item-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.5rem 0.65rem 0.75rem;
}
.crm-m-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--admin-primary-soft);
    color: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.crm-m-avatar--place {
    background: #ecfdf5;
    color: #059669;
}
.crm-m-item-main { flex: 1; min-width: 0; }
.crm-m-item-title {
    font-weight: 700;
    font-size: 0.9rem;
    word-break: break-all;
}
.crm-m-item-sub {
    font-size: 0.75rem;
    color: var(--admin-muted);
    margin-top: 0.1rem;
}
.crm-m-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}
.crm-m-chip {
    font-size: 0.72rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: var(--admin-chip-bg);
    color: var(--admin-chip-text);
}
.crm-m-chip i { margin-right: 0.1rem; }

.crm-m-expand-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--admin-chip-bg);
    border-radius: 8px;
    color: var(--admin-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}
.crm-m-expand-btn .bi-chevron-right { transition: transform 0.2s; }
.crm-m-item--open .crm-m-expand-btn {
    background: var(--admin-primary-soft);
    color: var(--admin-primary);
}
.crm-m-item--open .crm-m-expand-btn .bi-chevron-right { transform: rotate(90deg); }

.crm-m-detail {
    padding: 0 0.75rem 0.75rem;
    border-top: 1px dashed var(--admin-dashed-border);
    background: var(--admin-inset-bg);
}
.crm-m-detail-dl {
    display: grid;
    grid-template-columns: 4rem 1fr;
    gap: 0.2rem 0.5rem;
    font-size: 0.78rem;
    margin: 0.5rem 0;
}
.crm-m-detail-dl dt { color: var(--admin-muted); margin: 0; }
.crm-m-detail-dl dd { margin: 0; }
.crm-m-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.crm-m-detail-actions .btn { font-size: 0.72rem; }

.admin-subs-block {
    margin: 0.5rem 0 0.75rem;
    padding: 0.65rem 0.75rem;
    background: var(--admin-subtle-bg);
    border: 1px solid var(--admin-border);
    border-radius: 0.5rem;
}
.admin-subs-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--admin-muted);
    margin-bottom: 0.5rem;
}
.admin-subs-table th,
.admin-subs-table td {
    font-size: 0.78rem;
    vertical-align: middle;
}
.admin-subs-row > td {
    background: var(--admin-subtle-bg) !important;
}
.admin-subs-toggle {
    text-decoration: none;
    font-weight: 600;
}
.crm-m-detail .admin-subs-block {
    margin: 0 0 0.75rem;
}

.crm-m-subs-section {
    margin: 0.5rem 0 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--admin-dashed-border);
}
.crm-m-subs-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--admin-muted);
    margin-bottom: 0.35rem;
    padding: 0 0.15rem;
}
.crm-m-item--sub {
    margin-left: 0.35rem;
    border-left: 3px solid var(--admin-border);
    background: var(--admin-surface);
}
.crm-m-item--sub.crm-m-item--hit {
    border-left-color: #fbbf24;
    background: #fffbeb;
}
.crm-m-avatar--sub {
    background: #e0e7ff;
    color: #4338ca;
    width: 2rem;
    height: 2rem;
    font-size: 0.95rem;
}
.crm-m-item--sub .crm-m-item-title { font-size: 0.88rem; }
.crm-m-item--sub .crm-m-expand-btn {
    width: 32px;
    height: 32px;
}
.crm-m-pwd-form { margin-top: 0.35rem; }
.crm-m-pwd-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.crm-m-pwd-row input { flex: 1; min-width: 5rem; }

/* 桌面列表搜索栏 */
.admin-search-card .card-body { padding-top: 0.65rem; padding-bottom: 0.65rem; }
.admin-search-form { flex-wrap: wrap; }
.admin-search-form .input-group-text { background: var(--admin-surface-elevated); color: var(--admin-muted); border-color: var(--admin-border); }

.admin-inset-panel {
    background: var(--admin-surface-elevated);
    border-color: var(--admin-border) !important;
}

/* —— UI 版本显隐（经典默认隐藏新版专属块） —— */
.ui-v2-only {
    display: none !important;
}
html[data-admin-ui="v2"] .ui-v2-only {
    display: block !important;
}
html[data-admin-ui="v2"] .m-home-board-main.ui-v2-only,
html[data-admin-ui="v2"] .m-home-board-main--v2compact {
    display: block !important;
}
html[data-admin-ui="v2"] .ui-classic-only {
    display: none !important;
}

/* —— 界面版本切换：经典 / 新版（与配色主题独立） —— */
.admin-ui-toggle {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    padding: 2px;
    border-radius: 999px;
    border: 1px solid var(--admin-top-ctrl-border);
    background: var(--admin-top-ctrl-bg);
    vertical-align: middle;
}

.admin-ui-pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    margin: 0;
    padding: 0.28rem 0.65rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--admin-top-ctrl-color);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.admin-ui-pick .bi {
    font-size: 0.82rem;
    line-height: 1;
}

.admin-ui-pick:hover {
    color: var(--admin-top-ctrl-hover-color);
    background: var(--admin-top-ctrl-hover-bg);
}

.admin-ui-pick.is-active {
    color: #fff;
    background: var(--admin-top-ctrl-accent, #60a5fa);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
}

.admin-ui-picker-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
}

.admin-ui-picker--menu .admin-ui-pick {
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    padding: 0.35rem 0.2rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--admin-text);
    font-size: 0.68rem;
}

.admin-ui-picker--menu .admin-ui-pick.is-active {
    border-color: rgba(37, 99, 235, 0.4);
    background: rgba(37, 99, 235, 0.12);
    color: var(--admin-primary, #2563eb);
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .admin-header .admin-actions .admin-ui-toggle .admin-ui-pick span {
        display: none;
    }
    .admin-header .admin-actions .admin-ui-pick {
        padding: 0.32rem 0.48rem;
    }
}

/* —— 个人信息下拉（手机顶栏） —— */
/* —— 顶栏控件：深浅色形状一致，仅颜色走 CSS 变量 —— */
.admin-user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    box-shadow: none;
    border: 1px solid var(--admin-top-ctrl-border);
    background: var(--admin-top-ctrl-bg);
    color: var(--admin-top-ctrl-color);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.admin-user-menu-toggle:hover,
.admin-user-menu-toggle:focus {
    background: var(--admin-top-ctrl-hover-bg);
    color: var(--admin-top-ctrl-hover-color);
    border-color: var(--admin-top-ctrl-hover-border);
    box-shadow: none;
}

.admin-user-menu-toggle .bi-person-circle {
    font-size: 1.15rem;
    color: var(--admin-top-ctrl-accent);
}

.admin-user-menu-toggle::after {
    margin-left: 0.15rem;
}

.admin-user-menu-panel {
    min-width: 11rem;
    border-radius: 10px;
    margin-top: 0.35rem;
}

.admin-user-menu-label {
    max-width: 5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .admin-user-menu-label { display: none; }
}

.admin-user-menu-panel .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.admin-user-menu-panel .dropdown-item i {
    width: 1.1rem;
    text-align: center;
    opacity: 0.85;
}
.admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-light],
.admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-stick],
html[data-admin-theme="light"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-dark],
html[data-admin-theme="light"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-stick],
html[data-admin-theme="dark"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-stick],
html[data-admin-theme="stick"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-dark], html[data-admin-theme="wish"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-dark],
html[data-admin-theme="stick"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-light] , html[data-admin-theme="wish"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-light] {
    display: none;
}
html[data-admin-theme="light"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-light] {
    display: inline-block;
}
html[data-admin-theme="dark"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-dark] {
    display: inline-block;
}
html[data-admin-theme="stick"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-stick] {
    display: inline-block;
}
html[data-admin-theme="dark"] .admin-user-menu-panel .admin-theme-toggle-menu .bi[data-theme-light] {
    display: none;
}
.admin-user-menu-panel .admin-click-sound-toggle-menu .bi[data-sound-off] {
    display: none;
}
.admin-user-menu-panel .admin-click-sound-toggle-menu.is-muted .bi[data-sound-on] {
    display: none;
}
.admin-user-menu-panel .admin-click-sound-toggle-menu.is-muted .bi[data-sound-off] {
    display: inline-block;
}
/* 电脑端：主题/音效在顶栏；手机端在个人菜单 */
@media (min-width: 992px) {
    .admin-user-menu-mobile-prefs {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    body.portal-merchant .admin-header .admin-user-menu {
        display: none !important;
    }
}

.admin-user-menu-account {
    font-weight: 600;
    color: var(--admin-text) !important;
    padding-bottom: 0.15rem !important;
}
.admin-user-menu-id {
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--admin-muted, #6b7280) !important;
    padding-top: 0.1rem !important;
    white-space: nowrap;
}
.admin-user-menu-exit {
    color: #dc2626 !important;
}
.admin-user-menu-exit:hover {
    background: #fef2f2;
    color: #b91c1c !important;
}

/* —— 平台控制：商户后台手机版 / 电脑版权限 —— */
body.merchant-portal-mobile-off .m-home,
body.merchant-portal-mobile-off .dev-m-page,
body.merchant-portal-mobile-off .crm-m-page,
body.merchant-portal-mobile-off .ord-m-page,
body.merchant-portal-mobile-off .admin-bottom-nav,
body.merchant-portal-mobile-off .portal-more-page {
    display: none !important;
}

body.merchant-portal-mobile-off .dash-desktop-only,
body.merchant-portal-mobile-off .dev-desktop-only,
body.merchant-portal-mobile-off .ord-desktop-only,
body.merchant-portal-mobile-off .crm-desktop-only {
    display: block !important;
}

@media (max-width: 991.98px) {
    body.merchant-portal-mobile-off.admin-index-mobile .admin-nav-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    body.merchant-portal-mobile-off.admin-index-mobile .admin-page-head {
        display: block;
    }
    body.merchant-portal-mobile-off .admin-main {
        padding-bottom: 1rem;
    }
}

body.merchant-portal-desktop-off .merchant-portal-desktop-block {
    display: none;
}

.merchant-portal-desktop-block-card {
    text-align: center;
    max-width: 22rem;
    padding: 2rem 1.75rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.merchant-portal-desktop-block-icon {
    font-size: 2.75rem;
    color: var(--neon-cyan, #00e5ff);
    margin-bottom: 0.75rem;
}

.merchant-portal-desktop-block-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #f5e6dc;
    margin: 0 0 0.65rem;
}

.merchant-portal-desktop-block-desc {
    font-size: 0.9rem;
    color: rgba(245, 230, 220, 0.78);
    margin: 0 0 1.25rem;
    line-height: 1.55;
}

@media (min-width: 992px) {
    body.merchant-portal-desktop-off .merchant-portal-desktop-block {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 10000;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        background: linear-gradient(165deg, #1a0f0a, #2d1810 50%, #3d2218);
    }

    body.merchant-portal-desktop-off .admin-shell {
        display: none !important;
    }
}

/* 配件商城：列表小图 + 悬停/点击查看大图 */
.parts-shop-thumb-wrap {
    position: relative;
}
.parts-shop-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 88px;
    padding: 0.35rem 0.5rem;
    background: var(--admin-subtle-bg, #f8f9fa);
    border-bottom: 1px solid var(--admin-border, rgba(0, 0, 0, 0.08));
    overflow: hidden;
    cursor: pointer;
}
.parts-shop-thumb img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.parts-shop-thumb-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.15rem 0.35rem;
    font-size: 0.65rem;
    line-height: 1.2;
    text-align: center;
    color: #fff;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.72));
    pointer-events: none;
}
.parts-shop-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 88px;
    color: var(--admin-muted, #6c757d);
    background: var(--admin-subtle-bg, #f8f9fa);
    border-bottom: 1px solid var(--admin-border, rgba(0, 0, 0, 0.08));
}
.parts-shop-image-preview {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    cursor: zoom-out;
}
.parts-shop-image-preview.is-visible {
    opacity: 1;
    visibility: visible;
}
.parts-shop-image-preview-inner {
    max-width: min(94vw, 520px);
    text-align: center;
}
.parts-shop-image-preview-inner img {
    display: block;
    max-width: min(94vw, 520px);
    max-height: min(78vh, 680px);
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.35);
}
.parts-shop-image-preview-caption {
    margin-top: 0.5rem;
    color: #fff;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.parts-shop-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.35rem;
    margin-bottom: 0.25rem;
}
.parts-shop-attr {
    font-size: 0.72rem;
    line-height: 1.3;
    background: #f3f4f6;
    color: #374151;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
}
@media (min-width: 768px) {
    .parts-shop-thumb {
        height: 96px;
    }
    .parts-shop-thumb--empty {
        height: 96px;
    }
}

/* 管理端配件商城：手机卡片列表 */
.parts-shop-admin-thumb {
    object-fit: cover;
    border-radius: 6px;
}
@media (max-width: 767.98px) {
    body.admin-parts-shop-mobile .admin-page-head {
        display: none;
    }
    body.admin-parts-shop-mobile .admin-main {
        padding-top: 0.5rem;
    }
    body.admin-parts-shop-mobile .parts-shop-admin-table tbody tr {
        margin-left: 0;
        margin-right: 0;
    }
    body.admin-parts-shop-mobile .parts-shop-admin-table tbody td[data-label="ID"] {
        font-size: 0.78rem;
        color: var(--admin-muted);
        padding-bottom: 0;
    }
    body.admin-parts-shop-mobile .parts-shop-admin-table tbody td[data-label="图片"] {
        justify-content: flex-start;
    }
    body.admin-parts-shop-mobile .parts-shop-admin-table .parts-shop-admin-thumb {
        width: 72px;
        height: 72px;
    }
    body.admin-parts-shop-mobile .parts-shop-admin-table tbody td[data-label="名称"] {
        flex-direction: column;
        align-items: flex-start;
        text-align: left !important;
    }
    body.admin-parts-shop-mobile .parts-shop-admin-table tbody td.parts-shop-admin-sort {
        display: none;
    }
    body.admin-parts-shop-mobile .parts-shop-admin-table tbody td.actions-cell .btn {
        margin-bottom: 0.35rem;
    }
    body.merchant-parts-shop-mobile .row.g-3 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    body.merchant-parts-shop-mobile .parts-shop-thumb,
    body.merchant-parts-shop-mobile .parts-shop-thumb--empty {
        height: 140px;
    }
    body.merchant-parts-orders-mobile .table-mobile-cards tbody td.actions-cell .btn {
        width: 100%;
    }
}

/* 设备上下线记录弹窗 */
.online-log-dialog {
    max-width: 440px;
    margin: 0.75rem auto;
}

.online-log-modal {
    border: none;
    border-radius: 16px;
    background: #f8fafc;
    color: #1f2937;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.online-log-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.65rem 1rem;
    border: none;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
}

.online-log-modal-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.online-log-modal-head .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.88;
}

.online-log-modal-body {
    background: #f8fafc;
}

.online-log-section {
    padding: 0.85rem 1rem 0.75rem;
}

.online-log-section + .online-log-section {
    border-top: none;
    padding-top: 0.35rem;
}

.online-log-current-card {
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.online-log-current-card--on {
    border-color: rgba(22, 163, 74, 0.28);
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}

.online-log-current-card--off {
    border-color: rgba(239, 68, 68, 0.24);
    background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
}

.online-log-current-card--disabled {
    border-color: #d1d5db;
    background: #f9fafb;
}

.online-log-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.online-log-section-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.online-log-history-hint {
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
}

.online-log-history-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.online-log-admin {
    padding-top: 0.15rem;
}

.online-log-admin-card {
    margin: 0 1rem 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.9rem;
    border: 1px dashed rgba(220, 38, 38, 0.28);
    background: linear-gradient(180deg, #fff7f7, #fff);
}

.online-log-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.online-log-admin-badge {
    font-size: 0.68rem;
    font-weight: 650;
    color: #b91c1c;
    background: #fee2e2;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    flex-shrink: 0;
}

.online-log-admin-hint {
    margin-bottom: 0.55rem !important;
    line-height: 1.45;
}

.online-log-clear-btn {
    font-size: 0.8125rem;
    padding: 0.35rem 0.75rem;
    line-height: 1.4;
    border-radius: 0.65rem;
}

.online-log-current-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.online-log-current-main {
    flex: 1;
    min-width: 0;
}

.online-log-device-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    word-break: break-all;
}

.online-log-current-status {
    margin-top: 0.4rem;
}

.online-log-refresh-btn {
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #fff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
    transition: background 0.15s ease, transform 0.15s ease;
}

.online-log-refresh-btn:hover {
    background: #eff6ff;
}

.online-log-refresh-btn:active {
    transform: scale(0.96);
}

.online-log-refresh-btn.is-spinning i {
    animation: online-log-spin 0.8s linear infinite;
}

@keyframes online-log-spin {
    to { transform: rotate(360deg); }
}

.online-log-list {
    max-height: min(52vh, 420px);
    overflow-y: auto;
    padding-right: 0.15rem;
}

.online-log-list::-webkit-scrollbar {
    width: 5px;
}

.online-log-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.online-log-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.online-log-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: stretch;
}

.online-log-item-track {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.55rem;
}

.online-log-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #cbd5e1;
    background: #94a3b8;
    flex-shrink: 0;
    z-index: 1;
}

.online-log-item--on .online-log-dot {
    background: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.online-log-item--off .online-log-dot {
    background: #ef4444;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.28);
}

.online-log-line {
    flex: 1;
    width: 2px;
    margin-top: 0.25rem;
    min-height: 1rem;
    background: linear-gradient(180deg, #dbeafe 0%, #e5e7eb 100%);
    border-radius: 999px;
}

.online-log-item-card {
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.online-log-item--latest .online-log-item-card {
    border-color: #bfdbfe;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.online-log-item--on .online-log-item-card {
    background: linear-gradient(180deg, #fafffb 0%, #fff 100%);
}

.online-log-item--off .online-log-item-card {
    background: linear-gradient(180deg, #fffafa 0%, #fff 100%);
}

.online-log-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.online-log-item-time {
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
}

.online-log-item-dur {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    line-height: 1.35;
}

.online-log-item-dur-label {
    font-size: 0.78rem;
    color: #6b7280;
}

.online-log-item-dur-value {
    font-size: 0.98rem;
    font-weight: 700;
    color: #111827;
}

.online-log-item-live {
    font-size: 0.72rem;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
}

.online-log-item-note {
    margin-top: 0.35rem;
    font-size: 0.74rem;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.online-log-item-note i {
    font-size: 0.82rem;
    color: #9ca3af;
}

.online-log-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
}

.online-log-status--on {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
}

.online-log-status--off {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.1);
}

.online-log-status--disabled {
    color: #4b5563;
    background: #f3f4f6;
}

.online-log-signal {
    display: inline-flex;
    align-items: flex-end;
    gap: 1px;
    height: 0.85rem;
}

.online-log-signal i {
    display: block;
    width: 3px;
    background: currentColor;
    border-radius: 1px;
}

.online-log-signal i:nth-child(1) { height: 35%; }
.online-log-signal i:nth-child(2) { height: 65%; }
.online-log-signal i:nth-child(3) { height: 100%; }

.online-log-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
    padding: 1.5rem 0.75rem;
    font-size: 0.88rem;
    color: #9ca3af;
}

.online-log-empty i {
    font-size: 1.35rem;
    opacity: 0.75;
}

@media (max-width: 991.98px) {
    .online-log-dialog {
        max-width: min(90vw, 340px);
        margin: 0.5rem auto;
    }

    .modal.show .online-log-dialog {
        transform: none;
    }

    .online-log-modal {
        border-radius: 12px;
        min-height: 0;
    }

    .online-log-modal-head {
        min-height: 2.35rem;
        padding: 0.45rem 0.7rem;
    }

    .online-log-modal-title {
        font-size: 0.82rem;
        gap: 0.3rem;
    }

    .online-log-modal-head .btn-close {
        width: 0.75rem;
        height: 0.75rem;
        padding: 0;
        background-size: 0.65rem;
    }

    .online-log-section {
        padding: 0.55rem 0.65rem 0.45rem;
    }

    .online-log-section + .online-log-section {
        padding-top: 0.25rem;
    }

    .online-log-current-card {
        padding: 0.5rem 0.6rem;
        border-radius: 10px;
    }

    .online-log-device-title {
        font-size: 0.88rem;
    }

    .online-log-current-status {
        margin-top: 0.25rem;
    }

    .online-log-refresh-btn {
        width: 1.85rem;
        height: 1.85rem;
        font-size: 0.85rem;
    }

    .online-log-history-head {
        margin-bottom: 0.4rem;
    }

    .online-log-section-title {
        font-size: 0.75rem;
        gap: 0.25rem;
    }

    .online-log-history-hint {
        font-size: 0.66rem;
    }

    .online-log-list {
        max-height: min(38vh, 240px);
    }

    .online-log-timeline {
        gap: 0.38rem;
    }

    .online-log-item {
        grid-template-columns: 14px minmax(0, 1fr);
        gap: 0.45rem;
    }

    .online-log-item-track {
        padding-top: 0.4rem;
    }

    .online-log-dot {
        width: 8px;
        height: 8px;
        border-width: 1.5px;
    }

    .online-log-item-card {
        padding: 0.45rem 0.55rem;
        border-radius: 9px;
    }

    .online-log-item-head {
        margin-bottom: 0.2rem;
        gap: 0.35rem;
    }

    .online-log-item-time {
        font-size: 0.66rem;
    }

    .online-log-item-dur-label {
        font-size: 0.7rem;
    }

    .online-log-item-dur-value {
        font-size: 0.82rem;
    }

    .online-log-item-live {
        font-size: 0.64rem;
        padding: 0.05rem 0.35rem;
    }

    .online-log-item-note {
        margin-top: 0.2rem;
        font-size: 0.66rem;
        gap: 0.2rem;
    }

    .online-log-item-note i {
        font-size: 0.72rem;
    }

    .online-log-status {
        font-size: 0.72rem;
        gap: 0.22rem;
        padding: 0.06rem 0.35rem;
    }

    .online-log-signal {
        height: 0.7rem;
    }

    .online-log-signal i {
        width: 2px;
    }

    .online-log-empty {
        padding: 1rem 0.5rem;
        font-size: 0.78rem;
        gap: 0.25rem;
    }

    .online-log-admin-card {
        margin: 0 0.75rem 0.85rem;
        padding: 0.75rem 0.8rem;
    }

    .online-log-admin-hint {
        font-size: 0.72rem;
    }

    .online-log-clear-btn {
        width: 100%;
    }

    .online-log-empty i {
        font-size: 1.05rem;
    }
}

/* —— 经营统计（对齐收益查询 rev-page） —— */
.biz-stats-page {
    max-width: 100%;
}
.biz-stats-view-tabs {
    border-bottom: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.15rem;
}
.biz-stats-view-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.88rem;
    color: var(--admin-muted);
    border-color: transparent;
    padding: 0.45rem 0.95rem;
}
.biz-stats-view-tabs .nav-link:hover {
    color: var(--admin-text);
    border-color: transparent;
}
.biz-stats-view-tabs .nav-link.active {
    background: var(--admin-surface);
    border-color: rgba(0, 229, 255, 0.12);
    border-bottom-color: var(--admin-surface);
    color: var(--neon-cyan);
    font-weight: 600;
}
.biz-stats-presets {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.55rem;
    margin-bottom: 0.55rem;
    border-bottom: 1px solid rgba(0, 229, 255, 0.08);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.biz-stats-presets::-webkit-scrollbar {
    display: none;
}
.biz-stats-preset {
    flex: 0 0 auto;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: transparent;
    color: var(--admin-text-muted);
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
}
.biz-stats-preset.is-active {
    background: rgba(0, 229, 255, 0.12);
    border-color: rgba(0, 229, 255, 0.35);
    color: var(--neon-cyan);
    font-weight: 600;
}
.biz-stats-preset-divider {
    flex: 0 0 1px;
    align-self: stretch;
    width: 1px;
    min-height: 1.25rem;
    margin: 0 0.1rem;
    background: rgba(148, 163, 184, 0.28);
}
.biz-stats-period-wrap {
    display: inline-flex;
}
.biz-stats-kpi-meta {
    margin-top: 0.35rem;
    font-size: 0.72rem;
}
.biz-stats-table-name {
    font-weight: 600;
}
.biz-stats-table-actions a {
    margin-left: 0.55rem;
    font-size: 0.82rem;
}
.biz-stats-table-actions a:first-child {
    margin-left: 0;
}
/* 经营统计：桌面表格 / 手机卡片二选一，避免同屏重复 */
.biz-stats-page .biz-stats-desktop-only {
    display: block;
}
.biz-stats-page .biz-stats-mobile-only {
    display: none !important;
}
@media (max-width: 991.98px) {
    .biz-stats-page .biz-stats-desktop-only {
        display: none !important;
    }
    .biz-stats-page .biz-stats-mobile-only {
        display: block !important;
    }
    .biz-stats-list.biz-stats-mobile-only {
        display: flex !important;
        flex-direction: column;
    }
}
.biz-stats-desktop-only > .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}
.biz-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.biz-stats-empty {
    text-align: center;
    padding: 1.5rem 0.75rem;
    color: var(--admin-text-muted);
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    border: 1px dashed rgba(148, 163, 184, 0.28);
    font-size: 0.84rem;
}
.biz-stats-card {
    background: var(--admin-surface);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}
.biz-stats-card-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.55rem;
    border-bottom: 1px solid rgba(0, 229, 255, 0.08);
    background: rgba(10, 22, 46, 0.35);
}
.biz-stats-card-title {
    flex: 1 1 auto;
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.biz-stats-card-badge {
    flex-shrink: 0;
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--neon-cyan);
}
.biz-stats-card-total {
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--neon-cyan);
}
.biz-stats-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.35rem 0.45rem;
}
.biz-stats-card-cell {
    text-align: center;
    min-width: 0;
}
.biz-stats-card-label {
    display: block;
    font-size: 0.62rem;
    color: var(--admin-text-muted);
    line-height: 1.2;
}
.biz-stats-card-val {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--admin-text);
    line-height: 1.25;
    margin-top: 0.08rem;
}
.biz-stats-card-foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.35rem 0.45rem 0.42rem;
    border-top: 1px solid rgba(0, 229, 255, 0.08);
}
.biz-stats-card-foot a {
    text-align: center;
    font-size: 0.72rem;
    color: var(--neon-cyan);
    text-decoration: none;
    padding: 0.28rem 0.2rem;
    border-radius: 6px;
    background: rgba(0, 229, 255, 0.06);
}
@media (min-width: 992px) {
    .biz-stats-preset-view,
    .biz-stats-preset-divider {
        display: none;
    }
    .biz-stats-filter-form .rev-period-pick-wrap {
        margin-left: 0;
    }
    .biz-stats-kpi-row {
        display: flex;
        flex-wrap: wrap;
    }
    .biz-stats-kpi-row > .col-md-3 {
        flex: 0 0 auto;
        width: 25%;
        max-width: 25%;
    }
    .biz-stats-filter-form {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }
    .biz-stats-detail-card {
        width: 100%;
    }
}
@media (max-width: 991.98px) {
    body.admin-business-stats-mobile .admin-main {
        padding-bottom: 0;
    }
    body.admin-business-stats-mobile .biz-stats-page > .mb-3 {
        margin-bottom: 0.45rem !important;
    }
    body.admin-business-stats-mobile .biz-stats-filter-card .card-body {
        padding: 0.45rem 0.55rem !important;
    }
    body.admin-business-stats-mobile .biz-stats-presets {
        padding-bottom: 0.4rem;
        margin-bottom: 0.4rem;
        gap: 0.28rem;
    }
    body.admin-business-stats-mobile .biz-stats-preset {
        padding: 0.2rem 0.55rem;
        font-size: 0.72rem;
    }
    body.admin-business-stats-mobile .biz-stats-filter-form {
        grid-template-columns: 1fr 1fr;
    }
    body.admin-business-stats-mobile .biz-stats-period-wrap,
    body.admin-business-stats-mobile .biz-stats-filter-form button[type="submit"] {
        grid-column: 1 / -1;
    }
    body.admin-business-stats-mobile .biz-stats-period-wrap {
        width: 100%;
    }
    body.admin-business-stats-mobile .biz-stats-period-wrap .rev-date-cal,
    body.admin-business-stats-mobile .biz-stats-period-wrap .rev-date-cal-trigger {
        width: 100%;
        max-width: none;
    }
    body.admin-business-stats-mobile .biz-stats-kpi-row {
        margin-bottom: 0.45rem !important;
    }
    body.admin-business-stats-mobile .biz-stats-kpi-row .biz-stats-kpi-orders {
        display: none;
    }
    body.admin-business-stats-mobile .biz-stats-kpi-meta {
        display: none;
    }
    body.admin-business-stats-mobile .biz-stats-list {
        gap: 0.35rem;
    }
    body.admin-business-stats-mobile .biz-stats-view-tabs-wrap {
        margin-bottom: 0.35rem !important;
    }
    body.admin-business-stats-mobile .biz-stats-view-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    }
    body.admin-business-stats-mobile .biz-stats-view-tabs::-webkit-scrollbar {
        display: none;
    }
    body.admin-business-stats-mobile .biz-stats-view-tabs .nav-link {
        font-size: 0.78rem;
        padding: 0.4rem 0.65rem;
        white-space: nowrap;
    }
    body.admin-business-stats-mobile .biz-stats-filter-card {
        border: none;
        background: transparent;
        box-shadow: none;
        margin-bottom: 0.35rem !important;
    }
    body.admin-business-stats-mobile .biz-stats-filter-card .card-body {
        padding: 0 0 0.45rem !important;
    }
    body.admin-business-stats-mobile .biz-stats-presets {
        border-bottom: none;
        margin-bottom: 0.35rem;
        padding-bottom: 0;
    }
    body.admin-business-stats-mobile .biz-stats-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.35rem;
    }
    body.admin-business-stats-mobile .biz-stats-filter-form .form-select {
        font-size: 0.72rem;
        padding: 0.28rem 1.4rem 0.28rem 0.45rem;
        min-height: 2rem;
    }
    body.admin-business-stats-mobile .biz-stats-filter-submit {
        display: none;
    }
    body.admin-business-stats-mobile .biz-stats-kpi-row {
        display: none !important;
    }
}

/* 经营统计手机版：标题 / 蓝色汇总 / 底部 Tab */
.biz-stats-mobile-head {
    padding: 0.15rem 0 0.35rem;
}
.biz-stats-mobile-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: var(--admin-text);
}
.biz-stats-mobile-period {
    margin: 0.2rem 0 0;
    font-size: 0.72rem;
    color: var(--admin-text-muted);
}
.biz-stats-mobile-hero {
    margin-bottom: 0.55rem;
    padding: 0.85rem 0.75rem 0.75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}
.biz-stats-mobile-hero-total {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.15rem;
    margin-bottom: 0.25rem;
}
.biz-stats-mobile-hero-total-label {
    font-size: 0.88rem;
    opacity: 0.95;
}
.biz-stats-mobile-hero-total-val {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.biz-stats-mobile-hero-note {
    margin: 0 0 0.65rem;
    font-size: 0.68rem;
    opacity: 0.88;
    line-height: 1.35;
}
.biz-stats-mobile-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.biz-stats-mobile-hero-cell {
    text-align: center;
    min-width: 0;
}
.biz-stats-mobile-hero-label {
    display: block;
    font-size: 0.68rem;
    opacity: 0.9;
    line-height: 1.25;
}
.biz-stats-mobile-hero-val {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
}
.biz-stats-mobile-hero-coins {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.76rem;
    font-weight: 600;
}
.biz-stats-mobile-hero-coins-meta {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.92;
}
.biz-stats-mobile-hero-refund {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    opacity: 0.95;
}
.biz-stats-card-grid-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.biz-stats-card-grid-sub {
    grid-template-columns: 1fr;
    padding-top: 0;
    border-top: 1px dashed rgba(148, 163, 184, 0.22);
}
.biz-stats-card-cell-wide {
    text-align: left;
    padding: 0.15rem 0;
}
.biz-stats-card-cell-wide .biz-stats-card-label,
.biz-stats-card-cell-wide .biz-stats-card-val {
    display: inline;
    font-size: 0.72rem;
}
.biz-stats-card-cell-wide .biz-stats-card-label {
    margin-right: 0.25rem;
}
.biz-stats-card-sub {
    font-size: 0.66rem;
    font-weight: 500;
    color: var(--admin-text-muted);
}
@media (max-width: 991.98px) {
    .biz-stats-card {
        border-radius: 12px;
        border-color: rgba(148, 163, 184, 0.22);
        background: var(--admin-surface);
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    }
    .biz-stats-card-head {
        padding: 0.55rem 0.65rem;
        background: transparent;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    }
    .biz-stats-card-title {
        font-size: 0.88rem;
    }
    .biz-stats-card-badge {
        font-size: 0.68rem;
        padding: 0.12rem 0.42rem;
        background: rgba(59, 130, 246, 0.12);
        color: #2563eb;
    }
    .biz-stats-card-total {
        font-size: 0.92rem;
        color: #2563eb;
    }
    .biz-stats-card-grid {
        padding: 0.45rem 0.55rem;
    }
    .biz-stats-card-label {
        font-size: 0.66rem;
    }
    .biz-stats-card-val {
        font-size: 0.8rem;
    }
    .biz-stats-card-foot a {
        background: transparent;
        color: #2563eb;
        font-size: 0.76rem;
        padding: 0.35rem 0.2rem;
    }
}
.biz-stats-bottom-nav {
    --biz-stats-bottom-nav-h: 56px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1055;
    align-items: stretch;
    height: calc(var(--biz-stats-bottom-nav-h) + var(--admin-safe-bottom, 0px));
    padding-bottom: var(--admin-safe-bottom, 0px);
    background: var(--admin-surface);
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.08);
}
.biz-stats-bottom-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    min-width: 0;
    padding: 0.35rem 0.15rem 0.25rem;
    font-size: 0.62rem;
    line-height: 1.15;
    text-decoration: none;
    color: var(--admin-text-muted);
    text-align: center;
}
.biz-stats-bottom-nav-item i {
    font-size: 1.15rem;
}
.biz-stats-bottom-nav-item.is-active {
    color: #2563eb;
    font-weight: 600;
}
html[data-admin-theme="light"] .biz-stats-mobile-hero {
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.18);
}
html[data-admin-theme="light"] .biz-stats-bottom-nav {
    background: #fff;
}
html[data-admin-theme="dark"] .biz-stats-card-badge {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}
html[data-admin-theme="dark"] .biz-stats-card-total,
html[data-admin-theme="dark"] .biz-stats-card-foot a,
html[data-admin-theme="dark"] .biz-stats-bottom-nav-item.is-active {
    color: #93c5fd;
}
html[data-admin-theme="stick"] .biz-stats-card-badge {
    background: rgba(212, 181, 106, 0.2);
    color: #e8d5a3;
}
html[data-admin-theme="stick"] .biz-stats-card-total,
html[data-admin-theme="stick"] .biz-stats-card-foot a,
html[data-admin-theme="stick"] .biz-stats-bottom-nav-item.is-active {
    color: #e8d5a3;
}
html[data-admin-theme="wish"] .biz-stats-card-badge {
    background: rgba(225, 29, 72, 0.22);
    color: #fda4af;
}
html[data-admin-theme="wish"] .biz-stats-card-total,
html[data-admin-theme="wish"] .biz-stats-card-foot a,
html[data-admin-theme="wish"] .biz-stats-bottom-nav-item.is-active {
    color: #fda4af;
}

/* —— 平台代管商户后台 —— */
body.admin-impersonating {
    --admin-impersonate-banner-h: 2.75rem;
    padding-top: var(--admin-impersonate-banner-h);
}
body.admin-impersonating .admin-header {
    top: var(--admin-impersonate-banner-h);
}
.admin-impersonate-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    padding-top: env(safe-area-inset-top, 0px);
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.admin-impersonate-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
}
.admin-impersonate-banner-inner strong {
    font-weight: 700;
}
html[data-admin-theme="dark"] .admin-impersonate-banner {
    background: linear-gradient(90deg, #b45309, #92400e);
    color: #fef3c7;
}

@media (min-width: 992px) {
    body.admin-impersonating .admin-sidebar {
        top: var(--admin-impersonate-banner-h);
        height: calc(100vh - var(--admin-impersonate-banner-h));
    }

    body.admin-impersonating .admin-body {
        min-height: calc(100vh - var(--admin-impersonate-banner-h));
    }

    body.admin-impersonating.merchant-portal-desktop-off .admin-shell {
        display: flex !important;
    }
}

/* 申诉反馈：手机卡片列表 */
.cmp-m-list {
    padding: 0 0.5rem 0.85rem;
}
.cmp-m-empty {
    text-align: center;
    color: var(--admin-muted);
    padding: 2.2rem 1rem;
    font-size: 0.9rem;
}
.cmp-m-card {
    margin-bottom: 0.65rem;
    border-radius: 14px !important;
    overflow: hidden;
    background: var(--admin-surface);
}
.cmp-m-card--pending {
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35), 0 4px 14px rgba(245, 158, 11, 0.08) !important;
}
.cmp-m-card-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.65rem 0.85rem 0;
}
.cmp-m-time {
    font-size: 0.72rem;
    color: var(--admin-muted);
}
.cmp-m-card-main {
    padding: 0.55rem 0.85rem 0.35rem;
}
.cmp-m-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.cmp-m-device {
    font-weight: 650;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cmp-m-amt {
    font-weight: 700;
    color: var(--admin-primary);
    flex-shrink: 0;
}
.cmp-m-place,
.cmp-m-meta {
    font-size: 0.78rem;
    margin-top: 0.2rem;
}
.cmp-m-order {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.cmp-m-order code {
    font-size: 0.78rem;
    word-break: break-all;
}
.cmp-m-desc {
    margin-top: 0.45rem;
    font-size: 0.84rem;
    line-height: 1.4;
    color: var(--admin-text);
    background: var(--admin-chip-bg, rgba(148, 163, 184, 0.12));
    border-radius: 10px;
    padding: 0.45rem 0.6rem;
}
.cmp-m-id {
    margin-top: 0.35rem;
    word-break: break-all;
}
.cmp-m-actions {
    display: flex;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem 0.85rem;
}
.cmp-m-actions .btn {
    min-height: 36px;
}

@media (max-width: 767.98px) {
    body.admin-complaints-mobile .admin-page-head {
        margin-bottom: 0.5rem;
    }
    .cmp-filter-form .form-label {
        margin-bottom: 0.2rem;
    }
}

/* —— 故障记录精简页 —— */
body.fault-log-page.admin-app .admin-page-head,
body.fault-log-page.admin-app--tech .admin-page-head {
    display: none;
}

body.fault-log-page .dev-type-back-bar {
    margin-bottom: 0.65rem;
    padding: 0.45rem 0.15rem;
}

.fault-log-filter .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.fault-log-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.fault-log-filter-grid--admin {
    grid-template-columns: 1fr 1fr;
}

.fault-log-filter-actions {
    display: flex;
    gap: 0.45rem;
}

.fault-log-empty {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.92rem;
}

.fault-log-cards {
    padding: 0.35rem 0.55rem 0.65rem;
}

.fault-log-card {
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface-elevated, var(--admin-surface));
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.5rem;
}

.fault-log-card:last-child {
    margin-bottom: 0;
}

.fault-log-card.is-fault {
    border-left: 3px solid #ef4444;
}

.fault-log-card.is-cleared {
    border-left: 3px solid #22c55e;
}

.fault-log-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.fault-log-card-time {
    font-size: 0.78rem;
    color: var(--admin-muted);
    font-variant-numeric: tabular-nums;
}

.fault-log-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: flex-end;
    align-items: center;
}

.fault-log-card-state {
    font-size: 0.72rem;
    color: var(--admin-muted);
}

.fault-log-card-device {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--admin-text);
}

.fault-log-card-device code {
    font-size: 0.85rem;
    color: var(--admin-primary-dark, var(--admin-primary));
    background: transparent;
}

.fault-log-card-meta {
    margin-top: 0.2rem;
    font-size: 0.78rem;
}

.fault-log-card-note {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--admin-muted);
    line-height: 1.4;
}

@media (min-width: 768px) {
    .fault-log-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fault-log-filter-grid--admin {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .fault-log-filter-actions {
        justify-content: flex-end;
    }

    .fault-log-filter-actions .btn.flex-grow-1 {
        flex-grow: 0 !important;
        min-width: 5.5rem;
    }
}

@media (min-width: 992px) {
    body.fault-log-page.admin-app .admin-page-head,
    body.fault-log-page.admin-app--tech .admin-page-head {
        display: block;
        margin-bottom: 0.75rem;
        padding: 0.55rem 0.75rem;
    }

    body.fault-log-page .admin-page-head .lead {
        display: none;
    }
}

/* —— 后台顶部 LED 滚动广告（经典 / 新版共用） —— */
.admin-led-ticker {
    margin: 0 0 0.85rem;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #1a1a1a;
    box-shadow:
        inset 0 0 0 1px rgba(255, 200, 50, 0.18),
        0 6px 18px rgba(15, 23, 42, 0.18);
    background: #0b0f0c;
}
.admin-led-ticker-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.admin-led-ticker-link:hover .admin-led-ticker-seg {
    text-shadow: 0 0 8px var(--admin-led-glow, rgba(255, 224, 102, 0.95)), 0 0 18px var(--admin-led-glow-soft, rgba(255, 196, 0, 0.55));
}
.admin-led-ticker-screen {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 3.1rem;
    padding: 0.65rem 0.75rem 0.65rem 0.65rem;
    background:
        radial-gradient(ellipse 80% 120% at 50% 0%, rgba(255, 200, 60, 0.08), transparent 55%),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.18) 0,
            rgba(0, 0, 0, 0.18) 1px,
            transparent 1px,
            transparent 3px
        ),
        linear-gradient(180deg, #141a14 0%, #070a08 100%);
    overflow: hidden;
}
.admin-led-ticker-bulb {
    flex: 0 0 auto;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #ff3b3b;
    box-shadow: 0 0 6px #ff4d4d, 0 0 12px rgba(255, 60, 60, 0.55);
    animation: admin-led-bulb-blink 1.6s ease-in-out infinite;
}
.admin-led-ticker-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    animation: admin-led-marquee var(--admin-led-speed, 28s) linear infinite;
    will-change: transform;
}
.admin-led-ticker-seg {
    font-family: "DIN Alternate", "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--admin-led-color, #ffe066);
    text-shadow:
        0 0 4px var(--admin-led-glow, rgba(255, 224, 102, 0.95)),
        0 0 12px var(--admin-led-glow-soft, rgba(255, 196, 0, 0.55)),
        0 0 1px var(--admin-led-color, #ffe066);
}
.admin-led-ticker-gap {
    color: var(--admin-led-color, #ffb703);
    opacity: 0.75;
    font-size: 0.85rem;
    text-shadow: 0 0 6px var(--admin-led-glow-soft, rgba(255, 183, 3, 0.7));
}
.admin-led-ticker--preview {
    margin-bottom: 0;
}
@keyframes admin-led-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@keyframes admin-led-bulb-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-led-ticker-track {
        animation: none;
        transform: none;
        flex-wrap: wrap;
        width: auto;
        white-space: normal;
    }
    .admin-led-ticker-bulb {
        animation: none;
    }
}
@media (max-width: 991.98px) {
    .admin-led-ticker {
        margin: 0 0 0.65rem;
        border-radius: 10px;
    }
    .admin-led-ticker-screen {
        min-height: 2.7rem;
        padding: 0.5rem 0.55rem;
    }
    .admin-led-ticker-seg {
        font-size: 0.92rem;
        letter-spacing: 0.08em;
    }
}
