/*
 * 后台控制台外壳与组件。
 * 所有规则都限定在 .cx-app 内，买家分享页、兑换页不受影响；登录页也套 .cx-app，复用这里的主题与表单组件。
 * 视觉参考 ../wooz-clone 原型：56px 顶栏、215px 侧栏、浅灰内容区、#1677ff 主色。
 */

.cx-app {
    --cx-primary: #1677ff;
    --cx-primary-hover: #4096ff;
    --cx-primary-active: #0958d9;
    --cx-primary-bg: #e6f4ff;
    --cx-primary-border: #91caff;
    --cx-danger: #ff4d4f;
    --cx-danger-hover: #ff7875;
    --cx-danger-active: #d9363e;
    --cx-success: #52c41a;
    --cx-warning: #faad14;
    --cx-text: rgba(0, 0, 0, .88);
    --cx-text-2: rgba(0, 0, 0, .65);
    --cx-text-3: rgba(0, 0, 0, .45);
    --cx-text-4: rgba(0, 0, 0, .25);
    --cx-border: #d9d9d9;
    --cx-split: #f0f0f0;
    --cx-fill: #fafafa;
    --cx-bg: #f5f5f5;
    --cx-radius: 2px;
    --cx-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --cx-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --cx-side: 215px;
    --cx-top: 56px;

    /* 让 Tabler 组件跟随控制台主题 */
    --tblr-primary: #1677ff;
    --tblr-primary-rgb: 22, 119, 255;
    --tblr-primary-fg: #fff;
    --tblr-link-color: #1677ff;
    --tblr-link-color-rgb: 22, 119, 255;
    --tblr-link-hover-color: #4096ff;
    --tblr-link-hover-color-rgb: 64, 150, 255;
    --tblr-border-color: #d9d9d9;
    --tblr-border-radius: 2px;
    --tblr-font-sans-serif: var(--cx-font);
    --tblr-body-font-size: 14px;
    --tblr-body-color: rgba(0, 0, 0, .88);

    position: relative;
    min-height: 100vh;
    background: linear-gradient(180deg, #fff 0, var(--cx-bg) 400px);
    background-attachment: fixed;
    color: var(--cx-text);
    font-family: var(--cx-font);
    font-size: 14px;
    line-height: 1.5715;
}

.cx-app *,
.cx-app *::before,
.cx-app *::after {
    box-sizing: border-box;
}

.cx-app a {
    color: var(--cx-primary);
    text-decoration: none;
}

.cx-app a:hover {
    color: var(--cx-primary-hover);
    text-decoration: none;
}

.cx-app h1,
.cx-app h2,
.cx-app h3 {
    color: var(--cx-text);
}

.cx-app [hidden] {
    display: none !important;
}

/* ---------- 顶栏 ---------- */

.cx-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: var(--cx-top);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 24px 0 16px;
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid var(--cx-split);
    backdrop-filter: blur(8px);
}

.cx-topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cx-app .cx-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--cx-text);
}

.cx-app .cx-brand:hover {
    color: var(--cx-text);
}

.cx-brand-mark {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #4096ff, #1677ff);
    color: #fff;
    font-size: 16px;
}

.cx-brand-name {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
}

.cx-brand-scope {
    padding: 0 8px;
    border-radius: 10px;
    background: var(--cx-primary-bg);
    color: var(--cx-primary);
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
}

.cx-burger {
    display: none;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: var(--cx-radius);
    background: none;
    color: var(--cx-text-2);
    font-size: 16px;
    cursor: pointer;
}

.cx-burger:hover {
    background: var(--cx-bg);
}

.cx-user {
    position: relative;
}

.cx-user > summary {
    display: block;
    padding: 0 4px;
    color: #8c8c8c;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.cx-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
}

.cx-user > summary::-webkit-details-marker {
    display: none;
}

.cx-user > summary:hover {
    color: var(--cx-text-2);
}

.cx-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    font-size: 12px;
}

.cx-user-caret {
    font-size: 10px;
    transition: transform .2s;
}

.cx-user[open] .cx-user-caret {
    transform: rotate(180deg);
}

.cx-user-menu {
    position: absolute;
    top: 44px;
    right: 0;
    min-width: 168px;
    padding: 4px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 16px 0 rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05);
}

.cx-user-menu .cx-user-meta {
    padding: 5px 12px 8px;
    border-bottom: 1px solid var(--cx-split);
    margin-bottom: 4px;
    color: var(--cx-text-3);
    font-size: 12px;
}

.cx-app .cx-user-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 4px;
    color: var(--cx-text);
    line-height: 22px;
    white-space: nowrap;
}

.cx-app .cx-user-menu a:hover {
    background: rgba(0, 0, 0, .04);
    color: var(--cx-text);
}

.cx-app .cx-user-menu a.is-danger {
    color: var(--cx-danger);
}

.cx-user-menu i {
    width: 14px;
    text-align: center;
}

/* ---------- 侧栏 ---------- */

.cx-sidebar {
    position: fixed;
    top: var(--cx-top);
    bottom: 0;
    left: 0;
    z-index: 1020;
    width: var(--cx-side);
    display: flex;
    flex-direction: column;
    padding: 4px 8px 8px;
    background: #fff;
    border-right: 1px solid var(--cx-split);
    transition: width .18s, transform .2s;
}

.cx-nav {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.cx-nav-extra {
    border-top: 1px solid var(--cx-split);
    padding-top: 4px;
    max-height: 40vh;
    overflow: auto;
}

.cx-nav-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    padding: 0 8px 0 4px;
    color: #475569;
    white-space: nowrap;
}

.cx-nav-group small {
    color: var(--cx-text-4);
    font-size: 12px;
}

.cx-app .cx-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    margin: 0 4px 4px;
    padding: 0 16px;
    border-radius: 3px;
    color: var(--cx-text-2);
    white-space: nowrap;
    overflow: hidden;
}

.cx-nav-item > i {
    flex: none;
    width: 16px;
    font-size: 14px;
    text-align: center;
}

.cx-nav-item > span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.cx-app a.cx-nav-item:hover {
    background: var(--cx-bg);
    color: var(--cx-primary);
}

.cx-app a.cx-nav-item.is-active {
    background: #f0f7ff;
    color: var(--cx-primary);
    font-weight: 500;
}

.cx-app .cx-nav-item.is-disabled {
    color: var(--cx-text-4);
    cursor: not-allowed;
}

.cx-nav-badge {
    margin-left: auto;
    padding: 0 6px;
    border: 1px dashed var(--cx-border);
    border-radius: 2px;
    color: var(--cx-text-3);
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px;
}

.cx-collapse {
    position: absolute;
    top: 18px;
    right: -12px;
    z-index: 2;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    color: #bbb;
    font-size: 10px;
    cursor: pointer;
}

.cx-collapse:hover {
    color: var(--cx-primary);
}

.cx-backdrop {
    display: none;
}

.cx-app.is-collapsed {
    --cx-side: 64px;
}

.cx-app.is-collapsed .cx-nav-item {
    justify-content: center;
    padding: 0;
}

.cx-app.is-collapsed .cx-nav-item > span,
.cx-app.is-collapsed .cx-nav-badge,
.cx-app.is-collapsed .cx-nav-group > span,
.cx-app.is-collapsed .cx-nav-group > small {
    display: none;
}

.cx-app.is-collapsed .cx-nav-group {
    justify-content: center;
    padding: 0;
}

.cx-app.is-collapsed .cx-nav-group::before {
    content: "";
    width: 24px;
    border-top: 1px dashed var(--cx-border);
}

.cx-app.is-collapsed .cx-collapse i {
    transform: rotate(180deg);
}

/* ---------- 内容区 ---------- */

.cx-main {
    min-height: 100vh;
    margin-left: var(--cx-side);
    padding: var(--cx-top) 16px 0;
    display: flex;
    flex-direction: column;
    transition: margin-left .18s;
}

.cx-content {
    flex: 1;
    padding-bottom: 24px;
}

.cx-footer {
    padding: 16px 0 24px;
    color: var(--cx-text-3);
    font-size: 12px;
    text-align: center;
}

.cx-app .cx-footer a {
    color: var(--cx-text-3);
}

.cx-app .cx-footer a:hover {
    color: var(--cx-primary);
}

.cx-page-head {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cx-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cx-app .cx-page-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    white-space: nowrap;
}

.cx-page-sub {
    color: #777;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cx-app .cx-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--cx-radius);
    color: var(--cx-text-2);
}

.cx-app .cx-back:hover {
    background: rgba(0, 0, 0, .06);
    color: var(--cx-text);
}

.cx-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ---------- 卡片 ---------- */

.cx-panel {
    margin-bottom: 16px;
    border-radius: var(--cx-radius);
    background: #fff;
}

.cx-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 16px 24px 0;
}

.cx-panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.cx-panel-title small {
    margin-left: 6px;
    color: var(--cx-text-3);
    font-size: 14px;
    font-weight: 400;
}

.cx-panel-extra {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--cx-text-3);
}

.cx-panel-body {
    padding: 24px;
}

.cx-panel-head + .cx-panel-body {
    padding-top: 16px;
}

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

.cx-alert {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    border: 1px solid var(--cx-primary-border);
    border-radius: var(--cx-radius);
    background: var(--cx-primary-bg);
    line-height: 22px;
}

.cx-alert > i {
    flex: none;
    margin-top: 4px;
    color: var(--cx-primary);
}

.cx-alert-body {
    min-width: 0;
    overflow-wrap: anywhere;
}

.cx-alert-body p {
    margin: 0;
}

.cx-alert-body p + p {
    margin-top: 4px;
}

.cx-alert-body ul {
    margin: 0;
    padding-left: 18px;
}

.cx-inline-status {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
}

.cx-inline-status .cx-tag {
    margin: 0 2px;
}

.cx-alert-warning {
    border-color: #ffe58f;
    background: #fffbe6;
}

.cx-alert-warning > i {
    color: var(--cx-warning);
}

.cx-alert-success {
    border-color: #b7eb8f;
    background: #f6ffed;
}

.cx-alert-success > i {
    color: var(--cx-success);
}

.cx-alert-error {
    border-color: #ffccc7;
    background: #fff2f0;
}

.cx-alert-error > i {
    color: var(--cx-danger);
}

.cx-panel-body > .cx-alert:last-child {
    margin-bottom: 0;
}

/* ---------- 标签 ---------- */

.cx-tag {
    display: inline-block;
    padding: 0 7px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: rgba(0, 0, 0, .04);
    color: var(--cx-text);
    font-size: 12px;
    font-style: normal;
    line-height: 20px;
    white-space: nowrap;
    vertical-align: middle;
}

.cx-tag-success {
    background: #f6ffed;
    color: #389e0d;
}

.cx-tag-processing {
    background: var(--cx-primary-bg);
    color: var(--cx-primary);
}

.cx-tag-warning {
    background: #fff7e6;
    color: #d46b08;
}

.cx-tag-error {
    background: #fff2f0;
    color: #cf1322;
}

.cx-tag-ghost {
    border-color: var(--cx-border);
    border-style: dashed;
    background: transparent;
    color: var(--cx-text-3);
}

/* ---------- 按钮（覆盖 Tabler .btn，仅后台） ---------- */

.cx-app .btn {
    --tblr-btn-padding-x: 15px;
    --tblr-btn-padding-y: 4px;
    --tblr-btn-font-size: 14px;
    --tblr-btn-font-weight: 400;
    --tblr-btn-line-height: 22px;
    --tblr-btn-border-radius: 2px;
    --tblr-btn-color: rgba(0, 0, 0, .88);
    --tblr-btn-bg: #fff;
    --tblr-btn-border-color: #d9d9d9;
    --tblr-btn-hover-color: #4096ff;
    --tblr-btn-hover-bg: #fff;
    --tblr-btn-hover-border-color: #4096ff;
    --tblr-btn-active-color: #0958d9;
    --tblr-btn-active-bg: #fff;
    --tblr-btn-active-border-color: #0958d9;
    --tblr-btn-disabled-color: rgba(0, 0, 0, .25);
    --tblr-btn-disabled-bg: #f5f5f5;
    --tblr-btn-disabled-border-color: #d9d9d9;
    --tblr-btn-disabled-opacity: 1;
    --tblr-btn-box-shadow: 0 2px 0 rgba(0, 0, 0, .02);
    --tblr-btn-focus-box-shadow: 0 0 0 2px rgba(5, 145, 255, .1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    box-shadow: var(--tblr-btn-box-shadow);
    white-space: nowrap;
}

/* 链接按钮（a.btn）不能被 .cx-app a 的链接色覆盖 */
.cx-app .btn {
    color: var(--tblr-btn-color);
}

.cx-app .btn:hover {
    color: var(--tblr-btn-hover-color);
}

.cx-app .btn:active {
    color: var(--tblr-btn-active-color);
}

.cx-app .btn > i {
    font-size: 13px;
}

.cx-app .btn-primary {
    --tblr-btn-color: #fff;
    --tblr-btn-bg: #1677ff;
    --tblr-btn-border-color: #1677ff;
    --tblr-btn-hover-color: #fff;
    --tblr-btn-hover-bg: #4096ff;
    --tblr-btn-hover-border-color: #4096ff;
    --tblr-btn-active-color: #fff;
    --tblr-btn-active-bg: #0958d9;
    --tblr-btn-active-border-color: #0958d9;
    --tblr-btn-box-shadow: 0 2px 0 rgba(5, 145, 255, .1);
}

.cx-app .btn-danger {
    --tblr-btn-color: #fff;
    --tblr-btn-bg: #ff4d4f;
    --tblr-btn-border-color: #ff4d4f;
    --tblr-btn-hover-color: #fff;
    --tblr-btn-hover-bg: #ff7875;
    --tblr-btn-hover-border-color: #ff7875;
    --tblr-btn-active-color: #fff;
    --tblr-btn-active-bg: #d9363e;
    --tblr-btn-active-border-color: #d9363e;
    --tblr-btn-box-shadow: 0 2px 0 rgba(255, 38, 5, .06);
}

.cx-app .btn-outline-danger {
    --tblr-btn-color: #ff4d4f;
    --tblr-btn-bg: #fff;
    --tblr-btn-border-color: #ff4d4f;
    --tblr-btn-hover-color: #ff7875;
    --tblr-btn-hover-bg: #fff;
    --tblr-btn-hover-border-color: #ff7875;
    --tblr-btn-active-color: #d9363e;
    --tblr-btn-active-bg: #fff;
    --tblr-btn-active-border-color: #d9363e;
}

.cx-app .btn-outline-primary {
    --tblr-btn-color: #1677ff;
    --tblr-btn-bg: #fff;
    --tblr-btn-border-color: #1677ff;
    --tblr-btn-hover-color: #4096ff;
    --tblr-btn-hover-bg: #fff;
    --tblr-btn-hover-border-color: #4096ff;
    --tblr-btn-active-color: #0958d9;
    --tblr-btn-active-bg: #fff;
    --tblr-btn-active-border-color: #0958d9;
}

.cx-app .btn-text {
    --tblr-btn-border-color: transparent;
    --tblr-btn-bg: transparent;
    --tblr-btn-hover-bg: rgba(0, 0, 0, .04);
    --tblr-btn-hover-border-color: transparent;
    --tblr-btn-hover-color: rgba(0, 0, 0, .88);
    --tblr-btn-active-bg: rgba(0, 0, 0, .15);
    --tblr-btn-active-border-color: transparent;
    --tblr-btn-box-shadow: none;
}

.cx-app .btn-sm {
    --tblr-btn-padding-x: 7px;
    --tblr-btn-padding-y: 0;
    --tblr-btn-font-size: 14px;
    min-height: 24px;
}

.cx-app .btn-lg {
    --tblr-btn-padding-x: 15px;
    --tblr-btn-padding-y: 7px;
    --tblr-btn-font-size: 16px;
    min-height: 40px;
}

.cx-app .btn:disabled,
.cx-app .btn.disabled {
    border-color: var(--tblr-btn-disabled-border-color);
    background-color: var(--tblr-btn-disabled-bg);
    color: var(--tblr-btn-disabled-color);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: auto;
}

/* 行内文字按钮（表格操作列） */
.cx-app .cx-link {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cx-primary);
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.cx-app .cx-link:hover {
    color: var(--cx-primary-hover);
}

.cx-app .cx-link.is-danger {
    color: var(--cx-danger);
}

.cx-app .cx-link.is-danger:hover {
    color: var(--cx-danger-hover);
}

.cx-app .cx-link.is-warning {
    color: #d46b08;
}

.cx-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.cx-app .cx-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: var(--cx-radius);
    background: none;
    color: #999;
    cursor: pointer;
}

.cx-app .cx-icon-btn:hover {
    color: var(--cx-primary);
    background: rgba(0, 0, 0, .04);
}

/* ---------- 表单控件（覆盖 Tabler，仅后台） ---------- */

.cx-app .form-control,
.cx-app .form-select {
    min-height: 32px;
    padding: 4px 11px;
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    background-color: #fff;
    color: var(--cx-text);
    font-family: var(--cx-font);
    font-size: 14px;
    line-height: 22px;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s;
}

.cx-app .form-select {
    padding-right: 32px;
}

.cx-app .form-control::placeholder {
    color: rgba(0, 0, 0, .25);
}

.cx-app .form-control:hover,
.cx-app .form-select:hover {
    border-color: var(--cx-primary-hover);
}

.cx-app .form-control:focus,
.cx-app .form-select:focus {
    border-color: var(--cx-primary-hover);
    box-shadow: 0 0 0 2px rgba(5, 145, 255, .1);
    outline: 0;
}

.cx-app .form-control:disabled,
.cx-app .form-control[readonly],
.cx-app .form-select:disabled {
    border-color: var(--cx-border);
    background-color: rgba(0, 0, 0, .04);
    color: var(--cx-text-4);
    box-shadow: none;
}

.cx-app .form-control[readonly] {
    color: var(--cx-text-2);
}

.cx-app textarea.form-control {
    min-height: 64px;
    resize: vertical;
}

.cx-app .cx-code {
    font-family: var(--cx-mono);
    font-size: 13px;
    line-height: 20px;
    tab-size: 2;
}

.cx-app .form-check-input {
    border-color: var(--cx-border);
    cursor: pointer;
}

.cx-app .form-check-input:checked {
    border-color: var(--cx-primary);
    background-color: var(--cx-primary);
}

.cx-app .form-check-input:focus {
    border-color: var(--cx-primary-hover);
    box-shadow: 0 0 0 2px rgba(5, 145, 255, .1);
}

.cx-app .form-check-input:disabled {
    cursor: not-allowed;
}

.cx-app .form-switch .form-check-input {
    width: 44px;
    height: 22px;
    margin: 0;
    border: 0;
    border-radius: 100px;
    background-color: rgba(0, 0, 0, .25);
    background-position: 2px center;
    background-size: 18px 18px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='4' fill='%23fff'/%3e%3c/svg%3e");
}

.cx-app .form-switch .form-check-input:checked {
    background-color: var(--cx-primary);
    background-position: calc(100% - 2px) center;
}

.cx-app .form-switch .form-check-input:disabled {
    opacity: .45;
}

/* 竖排表单：label 在上、控件在下（对齐原型弹窗） */
.cx-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 16px;
}

.cx-form-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cx-form-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cx-span-2 {
    grid-column: span 2;
}

.cx-span-3 {
    grid-column: span 3;
}

.cx-span-full {
    grid-column: 1 / -1;
}

.cx-field {
    min-width: 0;
    margin-bottom: 24px;
}

.cx-label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding-bottom: 8px;
    color: var(--cx-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

.cx-label.is-required::before {
    content: "*";
    margin-right: 2px;
    color: var(--cx-danger);
    font-family: SimSun, sans-serif;
}

.cx-label .cx-tag {
    margin-left: 4px;
}

.cx-help {
    margin-top: 4px;
    color: var(--cx-text-3);
    font-size: 14px;
    line-height: 22px;
    overflow-wrap: anywhere;
}

.cx-help code,
.cx-alert code {
    padding: 0 4px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .06);
    color: inherit;
    font-family: var(--cx-mono);
    font-size: 12px;
}

.cx-help pre {
    margin: 6px 0 0;
    padding: 8px 12px;
    border-radius: var(--cx-radius);
    background: var(--cx-fill);
    color: var(--cx-text-2);
    font-family: var(--cx-mono);
    font-size: 12px;
    white-space: pre-wrap;
}

.cx-input-group {
    display: flex;
    align-items: stretch;
}

.cx-input-group > .form-control,
.cx-input-group > .form-select {
    flex: 1;
    min-width: 0;
}

.cx-input-group > .form-control:not(:last-child),
.cx-input-group > .form-select:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.cx-input-group > .btn {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.cx-addon {
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border: 1px solid var(--cx-border);
    border-left: 0;
    border-radius: 0 var(--cx-radius) var(--cx-radius) 0;
    background: var(--cx-fill);
    color: var(--cx-text-2);
    white-space: nowrap;
}

.cx-input-group > .form-control:has(+ .cx-addon) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.cx-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.cx-switch.form-switch {
    padding-left: 0;
}

.cx-switch.form-switch .form-check-input {
    float: none;
    margin-left: 0;
}

.cx-switch-text {
    color: var(--cx-text-2);
}

.cx-option-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.cx-option {
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--cx-split);
    border-radius: var(--cx-radius);
    background: var(--cx-fill);
}

.cx-option .cx-label {
    padding-bottom: 6px;
}

.cx-option .cx-help {
    margin-top: 6px;
    font-size: 12px;
    line-height: 20px;
}

/* 账号多选清单（分享页 / 兑换批次） */
.cx-check-box {
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
}

.cx-check-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--cx-split);
    background: var(--cx-fill);
}

.cx-check-tools .form-control {
    width: 220px;
    min-height: 28px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.cx-check-count {
    margin-left: auto;
    color: var(--cx-text-3);
}

.cx-check-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2px 16px;
    max-height: 280px;
    overflow: auto;
    padding: 8px 12px;
}

.cx-app .cx-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 5px 4px;
    border-radius: var(--cx-radius);
    cursor: pointer;
}

.cx-check-item:hover {
    background: var(--cx-fill);
}

.cx-check-item .form-check-input {
    flex: none;
    float: none;
    margin: 0;
}

.cx-check-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cx-check-empty {
    padding: 16px 12px;
    color: var(--cx-text-3);
}

/* 设置页：左侧 label 右对齐（对齐原型「平台配置」） */
.cx-hform .cx-hrow {
    display: grid;
    grid-template-columns: minmax(120px, 33%) minmax(0, 1fr);
    gap: 0 12px;
    align-items: start;
    margin-bottom: 24px;
}

.cx-hform .cx-hrow > .cx-label {
    justify-content: flex-end;
    min-height: 32px;
    padding: 5px 0 0;
    text-align: right;
}

.cx-hform .cx-hrow > .cx-label::after {
    content: "：";
}

.cx-hform .cx-hcontrol {
    max-width: 640px;
    min-width: 0;
}

/* 底部固定操作栏（对齐原型「保存配置」） */
.cx-form-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    margin: 0 -16px;
    padding: 8px 16px;
    border-top: 1px solid var(--cx-split);
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(8px);
}

.cx-btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cx-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--cx-text-2);
}

.cx-app .cx-inline-form .form-control {
    width: 120px;
}

/* ---------- 列表 ---------- */

.cx-segmented {
    display: inline-flex;
    padding: 2px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .04);
}

.cx-app .cx-segmented a {
    padding: 0 11px;
    border-radius: 2px;
    color: var(--cx-text-2);
    line-height: 28px;
    white-space: nowrap;
    transition: color .2s, background .2s;
}

.cx-app .cx-segmented a:hover {
    color: var(--cx-text);
}

.cx-app .cx-segmented a.is-active {
    background: #fff;
    color: var(--cx-text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 1px 6px -1px rgba(0, 0, 0, .02), 0 2px 4px rgba(0, 0, 0, .02);
}

.cx-tabs {
    display: flex;
    align-items: stretch;
    gap: 32px;
    height: 64px;
}

.cx-app .cx-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--cx-text);
    white-space: nowrap;
}

.cx-app .cx-tab:hover,
.cx-app .cx-tab.is-active {
    color: var(--cx-primary);
}

.cx-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--cx-primary);
}

.cx-tab .cx-tag {
    margin-left: 6px;
}

.cx-table-panel {
    margin-bottom: 16px;
    padding: 0 24px;
    border-radius: var(--cx-radius);
    background: #fff;
}

.cx-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    padding: 0 8px;
}

.cx-toolbar-lead {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.cx-toolbar-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.cx-toolbar-tools {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cx-app .cx-tool {
    padding: 0;
    border: 0;
    background: none;
    color: #444;
    font-size: 16px;
    line-height: 24px;
    cursor: pointer;
}

.cx-app .cx-tool:hover {
    color: var(--cx-primary);
}

.cx-filter {
    position: relative;
}

.cx-filter > i {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: var(--cx-text-4);
    font-size: 12px;
    pointer-events: none;
}

.cx-app .cx-filter .form-control {
    width: 200px;
    padding-left: 28px;
}

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

.cx-app .cx-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--cx-text);
    font-size: 14px;
}

.cx-app .cx-table > thead > tr > th {
    position: relative;
    padding: 8px;
    border-bottom: 1px solid var(--cx-split);
    background: var(--cx-fill);
    color: var(--cx-text);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 22px;
    text-align: left;
    text-transform: none;
    white-space: nowrap;
}

.cx-app .cx-table > thead > tr > th:not(:last-child):not(.cx-col-actions)::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 1.6em;
    background: var(--cx-split);
    transform: translateY(-50%);
}

.cx-app .cx-table > tbody > tr > td {
    padding: 8px;
    border-bottom: 1px solid var(--cx-split);
    background: #fff;
    line-height: 22px;
    vertical-align: middle;
    white-space: nowrap;
    transition: background .2s;
}

.cx-app .cx-table > tbody > tr:hover > td {
    background: var(--cx-fill);
}

.cx-table-panel.is-middle .cx-table > thead > tr > th,
.cx-table-panel.is-middle .cx-table > tbody > tr > td {
    padding: 12px 8px;
}

.cx-table-panel.is-large .cx-table > thead > tr > th,
.cx-table-panel.is-large .cx-table > tbody > tr > td {
    padding: 16px;
}

.cx-app .cx-table .cx-wrap {
    min-width: 160px;
    max-width: 360px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.cx-app .cx-table .cx-ellipsis {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.cx-app .cx-table .cx-col-actions {
    position: sticky;
    right: 0;
    z-index: 1;
}

.cx-table-wrap.is-overflow .cx-col-actions {
    box-shadow: inset 10px 0 8px -8px rgba(5, 5, 5, .1);
}

/* 兑换码列：单元格保持 <td>兑换码</td> 原样（deploy/acceptance.sh 按此匹配），等宽字体只由这里给 */
.cx-app .cx-codes-table > tbody > tr:not(.cx-empty-row) > td:first-child {
    font-family: var(--cx-mono);
    font-size: 13px;
}

.cx-app .cx-table > tbody > tr.cx-empty-row > td,
.cx-app .cx-table > tbody > tr.cx-empty-row:hover > td {
    background: #fff;
}

.cx-empty {
    padding: 32px 0;
    color: var(--cx-text-4);
    text-align: center;
}

.cx-empty i {
    display: block;
    margin-bottom: 8px;
    font-size: 36px;
    color: #e5e5e5;
}

.cx-empty span {
    color: var(--cx-text-3);
}

.cx-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 0;
}

.cx-pager:empty {
    padding: 8px 0;
}

.cx-app .cx-pager .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cx-app .cx-pager .pagination li > a,
.cx-app .cx-pager .pagination li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--cx-text);
    line-height: 30px;
}

.cx-app .cx-pager .pagination li > a:hover {
    background: rgba(0, 0, 0, .06);
}

.cx-app .cx-pager .pagination li.active > span,
.cx-app .cx-pager .pagination li.active > a {
    border-color: var(--cx-primary);
    background: #fff;
    color: var(--cx-primary);
    font-weight: 600;
}

.cx-app .cx-pager .pagination li.disabled > span {
    color: var(--cx-text-4);
    cursor: not-allowed;
}

/* 密码列：默认遮盖，可显示 / 复制 */
.cx-secret {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cx-secret-value {
    display: none;
    font-family: var(--cx-mono);
    font-size: 13px;
}

.cx-secret-mask {
    letter-spacing: 1px;
}

.cx-secret.is-revealed .cx-secret-value {
    display: inline;
}

.cx-secret.is-revealed .cx-secret-mask {
    display: none;
}

.cx-muted {
    color: var(--cx-text-3);
}

.cx-mono {
    font-family: var(--cx-mono);
    font-size: 13px;
}

.cx-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* ---------- 概览页 ---------- */

.cx-dash-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.cx-dash-top > .cx-panel {
    min-height: 158px;
}

.cx-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 66px;
}

.cx-profile-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--cx-primary-bg);
    color: var(--cx-primary);
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
}

.cx-app .cx-profile h2 {
    margin: 0 0 4px;
    color: #555;
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    overflow-wrap: anywhere;
}

.cx-status-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cx-status-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}

.cx-status-list li + li {
    border-top: 1px dashed var(--cx-split);
}

.cx-status-list li > span:first-child {
    min-width: 0;
    color: var(--cx-text-2);
}

.cx-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.cx-stats.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cx-stat .cx-panel-head {
    min-height: 44px;
}

.cx-stat .cx-panel-body {
    padding-top: 14px;
    padding-bottom: 16px;
}

.cx-stat-icon {
    color: var(--cx-primary);
    font-size: 22px;
}

.cx-stat-value {
    color: var(--cx-text);
    font-size: 24px;
    line-height: 32px;
}

.cx-stat-foot {
    margin-top: 2px;
    color: var(--cx-text-2);
}

.cx-stat-desc {
    color: var(--cx-text-2);
    font-size: 14px;
    line-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cx-steps {
    display: flex;
    gap: 16px;
}

.cx-step {
    flex: 1;
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

.cx-step:last-child {
    flex: none;
}

.cx-step-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .06);
    color: var(--cx-text-3);
    font-size: 14px;
}

.cx-step.is-done .cx-step-icon {
    background: var(--cx-primary-bg);
    color: var(--cx-primary);
}

.cx-step.is-current .cx-step-icon {
    background: var(--cx-primary);
    color: #fff;
}

.cx-step-main {
    min-width: 0;
    flex: 1;
}

.cx-step-title {
    position: relative;
    display: inline-block;
    padding-right: 16px;
    color: var(--cx-text);
    font-size: 16px;
    line-height: 32px;
    white-space: nowrap;
}

.cx-step-title::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 100%;
    width: 9999px;
    height: 1px;
    background: rgba(5, 5, 5, .06);
}

.cx-step.is-done .cx-step-title::after {
    background: var(--cx-primary);
}

.cx-step:last-child .cx-step-title::after {
    display: none;
}

.cx-step-desc {
    color: var(--cx-text-3);
}

.cx-step-desc a {
    margin-left: 4px;
}

.cx-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.cx-feature-col h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
}

.cx-feature-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cx-feature-col li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 0;
    color: var(--cx-text-2);
}

.cx-feature-col li > i {
    flex: none;
    width: 14px;
    font-size: 12px;
    text-align: center;
}

.cx-feature-col li small {
    color: var(--cx-text-3);
    font-size: 12px;
}

.cx-quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.cx-app .cx-quick a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--cx-split);
    border-radius: var(--cx-radius);
    color: var(--cx-text);
    transition: border-color .2s, color .2s;
}

.cx-app .cx-quick a:hover {
    border-color: var(--cx-primary-border);
    color: var(--cx-primary);
}

.cx-quick a > i {
    color: var(--cx-primary);
    font-size: 16px;
}

.cx-desc {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px 16px;
    margin: 0;
}

.cx-desc dt {
    color: #888;
    font-weight: 400;
}

.cx-desc dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* ---------- 人工任务页 ---------- */

.cx-task {
    max-width: 720px;
}

.cx-task-account {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: var(--cx-radius);
    background: var(--cx-fill);
}

.cx-task-account i {
    color: var(--cx-primary);
    font-size: 18px;
}

.cx-task-account strong {
    overflow-wrap: anywhere;
}

.cx-task-status {
    margin-bottom: 8px;
}

.cx-app .cx-task .text-danger:empty,
.cx-app .cx-task .cx-muted:empty {
    display: none;
}

.cx-captcha {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--cx-split);
    border-radius: var(--cx-radius);
}

.cx-captcha img {
    max-width: 100%;
    margin-bottom: 12px;
    border: 1px solid var(--cx-split);
    border-radius: var(--cx-radius);
}

.cx-captcha .form-control {
    max-width: 280px;
    font-family: var(--cx-mono);
    letter-spacing: 1px;
}

.cx-app #device-form {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--cx-split);
    border-radius: var(--cx-radius);
}

.cx-app #device-list {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
}

.cx-app #device-list .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 8px 12px;
    border: 1px solid var(--cx-split);
    border-radius: var(--cx-radius);
    cursor: pointer;
}

.cx-app #device-list .form-check-input {
    float: none;
    margin: 0;
}

.cx-task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.cx-task-note {
    margin: 16px 0 0;
}

.cx-task-status {
    font-weight: 500;
}

/* ---------- 登录页（无顶栏和侧栏，单卡片居中） ---------- */

.cx-login {
    display: flex;
    flex-direction: column;
}

.cx-login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px 24px;
}

.cx-login-card {
    width: 100%;
    max-width: 380px;
    padding: 32px 32px 8px;
    border: 1px solid var(--cx-split);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 16px 0 rgba(0, 0, 0, .04), 0 3px 6px -4px rgba(0, 0, 0, .06);
}

.cx-login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cx-login-brand .cx-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 20px;
}

.cx-login-brand .cx-brand-name {
    font-size: 20px;
}

.cx-login-sub {
    margin: 8px 0 28px;
    color: var(--cx-text-3);
    text-align: center;
}

.cx-login .cx-field .form-control {
    width: 100%;
    min-height: 40px;
    padding: 7px 11px;
    font-size: 16px;
    line-height: 24px;
}

.cx-app .cx-login-submit {
    width: 100%;
    margin-bottom: 24px;
}

@media (max-width: 575px) {
    .cx-login-main {
        align-items: flex-start;
        padding-top: 64px;
    }

    .cx-login-card {
        padding: 24px 20px 4px;
    }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1200px) {
    .cx-main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .cx-form-footer {
        margin: 0 -12px;
    }

    .cx-page-head {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .cx-page-sub {
        font-size: 12px;
    }

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

    .cx-quick {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .cx-app {
        --cx-side: 64px;
    }

    .cx-app .cx-nav-item {
        justify-content: center;
        padding: 0;
    }

    .cx-nav-item > span,
    .cx-nav-badge,
    .cx-nav-group > span,
    .cx-nav-group > small {
        display: none;
    }

    .cx-nav-group {
        justify-content: center;
        padding: 0;
    }

    .cx-nav-group::before {
        content: "";
        width: 24px;
        border-top: 1px dashed var(--cx-border);
    }

    .cx-collapse {
        display: none;
    }

    .cx-topbar {
        padding: 0 12px;
    }

    .cx-brand-name {
        font-size: 16px;
    }

    .cx-brand-mark {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .cx-dash-top,
    .cx-feature-grid {
        grid-template-columns: 1fr;
    }

    .cx-stats,
    .cx-stats.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .cx-stat .cx-panel-head,
    .cx-stat .cx-panel-body {
        padding: 12px;
    }

    .cx-stat-icon {
        display: none;
    }

    .cx-panel-head {
        padding: 16px 16px 0;
    }

    .cx-panel-body {
        padding: 16px;
    }

    .cx-table-panel {
        padding: 0 12px;
    }

    /* 窄屏下固定操作列会盖住账号、密码列：取消吸附与阴影，随表格一起横向滚动（优先级高于吸附和阴影规则） */
    .cx-app .cx-table-wrap .cx-table .cx-col-actions {
        position: static;
        box-shadow: none;
    }

    .cx-form-grid,
    .cx-form-grid.cols-2,
    .cx-form-grid.cols-3,
    .cx-option-grid {
        grid-template-columns: 1fr;
    }

    .cx-span-2,
    .cx-span-3 {
        grid-column: auto;
    }

    .cx-hform .cx-hrow {
        grid-template-columns: 1fr;
    }

    .cx-hform .cx-hrow > .cx-label {
        justify-content: flex-start;
        padding: 0 0 8px;
        text-align: left;
    }

    .cx-hform .cx-hrow > .cx-label::after {
        content: "";
    }

    .cx-steps {
        flex-direction: column;
    }

    .cx-step,
    .cx-step:last-child {
        flex: none;
    }

    .cx-step-title::after {
        display: none;
    }

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

@media (max-width: 575px) {
    .cx-burger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .cx-brand-scope,
    .cx-user-name {
        display: none;
    }

    .cx-sidebar {
        width: 215px;
        transform: translateX(-100%);
        box-shadow: none;
    }

    /* 抽屉模式下忽略桌面端的折叠状态，始终显示文字 */
    .cx-app .cx-sidebar .cx-nav-item {
        justify-content: flex-start;
        padding: 0 16px;
    }

    .cx-app .cx-sidebar .cx-nav-item > span,
    .cx-app .cx-sidebar .cx-nav-badge,
    .cx-app .cx-sidebar .cx-nav-group > span,
    .cx-app .cx-sidebar .cx-nav-group > small {
        display: inline;
    }

    .cx-app .cx-sidebar .cx-nav-group {
        justify-content: space-between;
        padding: 0 8px 0 4px;
    }

    .cx-app .cx-sidebar .cx-nav-group::before {
        display: none;
    }

    .cx-app.is-drawer-open .cx-sidebar {
        transform: none;
        box-shadow: 6px 0 16px rgba(0, 0, 0, .08);
    }

    .cx-app.is-drawer-open .cx-backdrop {
        display: block;
        position: fixed;
        inset: var(--cx-top) 0 0 0;
        z-index: 1010;
        background: rgba(0, 0, 0, .45);
    }

    .cx-main {
        margin-left: 0;
    }

    .cx-stats,
    .cx-stats.cols-4,
    .cx-quick {
        grid-template-columns: 1fr;
    }

    .cx-table-toolbar {
        flex-wrap: wrap;
        row-gap: 10px;
        padding: 10px 0;
    }

    .cx-toolbar-lead {
        flex-wrap: wrap;
        gap: 8px;
    }

    .cx-tabs {
        height: 40px;
        gap: 24px;
    }

    .cx-app .cx-filter .form-control,
    .cx-check-tools .form-control {
        width: 160px;
    }

    .cx-page-actions {
        justify-content: flex-start;
    }

    .cx-desc {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .cx-desc dd {
        margin-bottom: 8px;
    }
}
