:root {
    --bg: linear-gradient(135deg, #f0f4ff 0%, #f8fafc 100%);
    --panel: #ffffff;
    --panel-soft: #f8fafb;
    --text: #0f172a;
    --text-secondary: #475569;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-dark: #cbd5e1;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar: #0f172a;
    /* 后台浅色侧边栏（Notion/Linear 简约风） */
    --sidebar-bg: #fbfbfa;
    --sidebar-border: #ebeced;
    --nav-text: #545861;
    --nav-text-hover: #1f2329;
    --nav-active-bg: #eef4ff;
    --nav-active-text: var(--primary-dark);
    --nav-section: #9aa0a6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.inline-panel {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 16px;
    align-items: start;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.inline-panel strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.danger-zone {
    border-color: rgba(220, 38, 38, .2);
    background: #fffafa;
}

.callback-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
}

.callback-summary-grid div {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.callback-summary-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.callback-summary-grid strong {
    font-size: 20px;
}

.account-bind-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.account-bind-form h3 {
    margin: 0;
    font-size: 16px;
}

.inline-fields {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
}

.payment-guide-grid,
.backup-command-list {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.payment-guide-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.payment-guide-grid div,
.backup-command-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.payment-guide-grid strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.payment-guide-grid span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.backup-command-card {
    display: grid;
    grid-template-columns: minmax(180px, 260px) 1fr;
    gap: 14px;
}

.backup-command-card h2 {
    margin: 4px 0 0;
    font-size: 16px;
}

.backup-command-card pre {
    margin: 0;
    padding: 12px;
    overflow-x: auto;
    border-radius: 8px;
    background: #0f172a;
    color: #e5eefb;
    white-space: pre-wrap;
    word-break: break-all;
}

.section-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.ops-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.launch-step-grid,
.payment-acceptance-grid,
.operation-tip-grid {
    display: grid;
    gap: 12px;
}

.launch-step-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.payment-acceptance-grid,
.operation-tip-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.launch-step-card,
.operation-tip-card,
.payment-acceptance-grid div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.launch-step-card {
    min-height: 162px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.launch-step-card > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--primary-dark);
    font-weight: 700;
}

.launch-step-card.bad > span {
    background: #fff7ed;
    color: #c2410c;
}

.launch-step-card strong,
.operation-tip-card strong,
.payment-acceptance-grid strong {
    display: block;
    color: var(--text);
}

.launch-step-card p,
.operation-tip-card p,
.payment-acceptance-grid span {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.launch-step-card a {
    margin-top: auto;
    font-weight: 700;
}

.payment-acceptance-grid div {
    padding: 14px;
}

.operation-tips-panel {
    margin-top: 16px;
}

.operation-tip-card {
    position: relative;
    min-height: 168px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.operation-tip-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--primary);
}

.operation-tip-card.tip-danger::before { background: var(--danger); }
.operation-tip-card.tip-warn::before { background: var(--warning); }
.operation-tip-card.tip-ok::before { background: var(--success); }

.operation-tip-card span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 12px;
}

.operation-tip-card.tip-danger span {
    background: #fef2f2;
    color: #b91c1c;
}

.operation-tip-card.tip-warn span {
    background: #fffbeb;
    color: #b45309;
}

.operation-tip-card.tip-ok span {
    background: #ecfdf5;
    color: #047857;
}

.operation-tip-card a {
    font-weight: 700;
}

.order-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -6px 0 18px;
}

.delivery-copy-tip {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.account-order-filter {
    margin-bottom: 12px;
}

.batch-card-grid,
.reconcile-risk-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.batch-mini-card,
.reconcile-risk-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.batch-mini-card {
    display: grid;
    gap: 10px;
}

.batch-mini-card strong,
.reconcile-risk-card span {
    display: block;
    color: var(--text);
    font-weight: 700;
}

.batch-mini-card p,
.reconcile-risk-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.batch-mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.batch-mini-stats span {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
}

.batch-action-cell {
    min-width: 360px;
}

.batch-action-form {
    display: grid;
    grid-template-columns: 110px minmax(120px, 1fr) 92px auto;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}

.batch-action-form input,
.batch-action-form select {
    min-width: 0;
}

.reconciliation-metrics {
    margin: 16px 0;
}

.reconcile-risk-card {
    position: relative;
    overflow: hidden;
}

.reconcile-risk-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--success);
}

.reconcile-risk-card.risk-warn::before {
    background: var(--warning);
}

.reconcile-risk-card.risk-danger::before {
    background: var(--danger);
}

.reconcile-risk-card strong {
    display: block;
    margin: 8px 0 4px;
    font-size: 28px;
}

.reconcile-risk-card a {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
}

.quality-ok {
    color: #067647 !important;
    background: #ecfdf3 !important;
}

.quality-warn {
    color: #93370d !important;
    background: #fffaeb !important;
}

.quality-danger {
    color: #b42318 !important;
    background: #fef3f2 !important;
}

.settings-subsection {
    margin-top: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.finance-anomaly-list {
    display: grid;
    gap: 10px;
}

.finance-anomaly-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.finance-anomaly-item.risk-danger {
    border-color: rgba(239, 68, 68, .28);
    background: #fffafa;
}

.finance-anomaly-item.risk-warn {
    border-color: rgba(245, 158, 11, .32);
    background: #fffdf6;
}

.finance-anomaly-item strong,
.finance-anomaly-item span,
.finance-anomaly-item p {
    display: block;
}

.finance-anomaly-item span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.finance-anomaly-item p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.finance-trace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.finance-trace-grid > div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.finance-trace-grid h3 {
    margin-bottom: 10px;
}

.finance-trace-grid p {
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.finance-trace-grid p:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.finance-trace-grid strong,
.finance-trace-grid span,
.finance-trace-grid em {
    display: block;
}

.finance-trace-grid span,
.finance-trace-grid em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--text);
    background: #f8fafc;
    background-image: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    font: 14px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--primary-dark); }
h1, h2, h3, p { margin-top: 0; }
h1 {
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
h2 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
h3 {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}
p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 248px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    background: var(--sidebar-bg);
    color: var(--nav-text);
    border-right: 1px solid var(--sidebar-border);
    z-index: 30;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 4px 8px 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--sidebar-border);
    color: var(--text);
}

.sidebar-brand span {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
}

.sidebar-brand strong {
    font-size: 15px;
    color: var(--text);
}

.sidebar-section {
    padding: 14px 12px 6px;
    color: var(--nav-section);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.sidebar-nav .sidebar-section:first-child {
    padding-top: 6px;
}

.sidebar-nav {
    display: grid;
    gap: 2px;
    margin-top: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 7px;
    color: var(--nav-text);
    font-weight: 500;
    font-size: 14px;
    transition: background .12s ease, color .12s ease;
}

.nav-item .nav-icon {
    flex: 0 0 20px;
    color: #8a9099;
    transition: color .12s ease;
}

.nav-item:hover {
    background: #f1f2f3;
    color: var(--nav-text-hover);
}

.nav-item:hover .nav-icon {
    color: var(--nav-text-hover);
}

.nav-item.active {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
    font-weight: 600;
}

.nav-item.active .nav-icon {
    color: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    padding: 12px 8px 4px;
    border-top: 1px solid var(--sidebar-border);
    display: grid;
    gap: 6px;
}

.sidebar-footer span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.sidebar-footer a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
}

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

.app-main {
    min-width: 0;
    margin-left: 248px;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 78px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 28px;
    background: rgba(255,255,255,.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.app-header-lead { min-width: 0; }

.eyebrow {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--line);
    white-space: nowrap;
    line-height: 1.2;
}

.role-badge.is-super {
    color: #7c3aed;
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.role-badge.is-station {
    color: var(--primary-dark);
    background: #eff6ff;
    border-color: #bfdbfe;
}

.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--line);
    color: var(--text-secondary);
    background: #fff;
    transition: var(--transition);
}

.header-icon-btn:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    background: var(--panel-soft);
}

.header-icon-btn .nav-icon {
    width: 19px;
    height: 19px;
}

/* 右上角用户下拉菜单 */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 4px 10px 4px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu-trigger::before { display: none; }

.user-menu-trigger:hover {
    background: var(--panel-soft);
    border-color: var(--line-dark);
    color: var(--text);
    transform: none;
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.user-avatar.is-super { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.user-avatar.is-station { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }

.user-menu-meta {
    display: grid;
    gap: 1px;
    text-align: left;
    line-height: 1.25;
}

.user-menu-meta strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-meta em {
    font-style: normal;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.user-menu-caret {
    color: var(--muted);
    transition: transform .2s ease;
}

.user-menu.open .user-menu-caret { transform: rotate(180deg); }

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15,23,42,.14);
    display: none;
    z-index: 60;
    animation: fadeInUp .2s ease;
}

.user-menu.open .user-menu-dropdown { display: block; }

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    transition: background .12s ease, color .12s ease;
}

.user-menu-dropdown a svg { color: #9aa0a6; }

.user-menu-dropdown a:hover {
    background: var(--panel-soft);
    color: var(--text);
}

.user-menu-dropdown a:hover svg { color: var(--primary); }

.user-menu-dropdown a.is-danger:hover {
    background: #fef2f2;
    color: var(--danger);
}

.user-menu-dropdown a.is-danger:hover svg { color: var(--danger); }

.page {
    width: min(1280px, calc(100% - 40px));
    margin: 24px auto 56px;
}

.app-page {
    width: auto;
    margin: 24px 28px 56px;
    max-width: 1480px;
}

/* ===== 后台内容页版式统一 BACKEND CONTENT ===== */
/* 顶部 Header 已显示页面标题，隐藏内容区重复的首个区块标题（模态框标题保留） */
.app-page .section-title > div > h1 {
    display: none;
}

.app-page .modal .section-title > div > h1 {
    display: block;
    font-size: 20px;
    line-height: 1.35;
    margin-bottom: 6px;
    font-weight: 700;
}

/* 隐藏标题后，说明文字略增上间距，撑起区块头部 */
.app-page .section-title > div > p {
    margin-top: 2px;
}

/* 卡片内非首要标题（h2/h3、或显式保留的标题）正常显示并降级 */
.app-page .panel-main > h2,
.app-page .panel-side > h1,
.app-page .panel-side > h2,
.app-page .heading > h1,
.app-page .section-title > div > h2 {
    font-size: 20px;
    line-height: 1.35;
    margin-bottom: 6px;
    font-weight: 700;
}

.app-page .section-title p,
.app-page .panel-main > p,
.app-page .heading > p {
    font-size: 13.5px;
    color: var(--muted);
}

/* 统一卡片内边距与卡片间距 */
.app-page .panel-main,
.app-page .panel-side,
.app-page .heading {
    padding: 24px;
}

.app-page .heading {
    margin-bottom: 20px;
}

/* 保留的 h2 区块标题加竖线（如库存预警） */
.app-page .section-title > div > h2 {
    position: relative;
    padding-left: 13px;
}

.app-page .section-title > div > h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), #7c3aed);
}

/* 后台表格精致化：表头浅底、行高、hover */
.app-page table {
    box-shadow: var(--shadow-sm);
}

.app-page thead th {
    padding: 13px 16px;
    background: #f8fafc;
    color: #475467;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .02em;
    border-bottom: 1px solid var(--line);
}

.app-page tbody td {
    padding: 14px 16px;
    font-size: 14px;
}

.app-page tbody tr {
    transition: background .12s ease;
}

.app-page tbody tr:hover {
    background: #f7faff;
}

/* 空状态：单行「暂无数据」居中淡灰 */
.app-page tbody tr td[colspan] {
    padding: 44px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    background: #fff;
}

.app-page tbody tr:hover td[colspan] {
    background: #fff;
}

/* 筛选栏统一卡片化 */
.app-page .filter-bar {
    padding: 14px 16px;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    gap: 12px;
}

.app-page .filter-bar select,
.app-page .filter-bar input {
    min-height: 40px;
}

/* 操作列链接：弱化为按钮感 */
.app-page .table-actions a,
.app-page .table-actions .link-button {
    font-weight: 600;
}

.app-page .table-actions .danger-link {
    color: #dc2626;
}

.app-page .batch-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.app-page .check-col {
    width: 42px;
    text-align: center;
}

.app-page .danger-button {
    background: #dc2626;
    border-color: #dc2626;
}

.app-page .danger-button:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* admin-shell 左右栏间距统一 */
.app-page .admin-shell,
.app-page .split {
    gap: 24px;
}

/* 商品单元格图片更精致 */
.app-page .product-cell img {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(15,23,42,.08);
}

.app-page .product-cell strong {
    font-size: 14px;
    font-weight: 700;
}

/* 推荐标签 */
.app-page .product-cell em {
    background: linear-gradient(135deg, #fff7d6 0%, #ffe9a8 100%);
    color: #a16207;
    border: 1px solid #fde68a;
}

/* 金额涨跌色加粗清晰 */
.app-page .amount-positive { color: var(--success-dark); font-weight: 700; }
.app-page .amount-negative { color: var(--danger); font-weight: 700; }

/* 后台 panel-side 表单标题降级统一 */
.app-page .panel-side > h2 {
    font-size: 17px;
    margin-bottom: 14px;
}

/* ===== 配置类页面精致化（验证配置等 settings-form / panel-side）===== */
/* 表单分组小标题：更小、加细分隔线，作为「区块分组」而非「页面标题」 */
.app-page .settings-form h2,
.app-page .panel-side > h2 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .01em;
    margin: 22px 0 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.app-page .settings-form h2:first-child,
.app-page .panel-side > h2:first-child {
    margin-top: 0;
}

/* 字段标签：弱化字重、缩小字号，更精致 */
.app-page .settings-form label,
.app-page .test-config-form label,
.app-page .panel-side label {
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

/* 输入框：收紧高度与字号 */
.app-page .settings-form input,
.app-page .settings-form select,
.app-page .test-config-form input,
.app-page .panel-side input {
    padding: 9px 12px;
    font-size: 14px;
}

/* 表单整体行距收紧 */
.app-page .settings-form,
.app-page .test-config-form {
    gap: 13px;
}

/* 右栏说明文字精致 */
.app-page .panel-side > p {
    font-size: 13px;
    line-height: 1.65;
    color: var(--muted);
    margin-bottom: 10px;
}

.app-page .panel-side > p strong {
    color: var(--text);
    font-weight: 700;
}

/* 两个测试表单之间分隔 */
.app-page .test-config-form + .test-config-form {
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--line);
}

.public-topbar {
    height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 40;
}

.public-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    transition: var(--transition);
}

.public-brand:hover {
    color: var(--primary);
    transform: translateX(2px);
}

.public-brand img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.public-brand:hover img {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.public-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-left: auto;
}

.public-home-button {
    white-space: nowrap;
}

.mini-query,
.query,
.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mini-query {
    width: min(420px, 100%);
}

.mini-query input,
.query input {
    min-width: 0;
}

.notice {
    padding: 16px 18px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    border: 2px solid #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.notice.success {
    color: var(--success-dark);
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #86efac;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.notice.error {
    color: var(--danger);
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.auth-body::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.auth-body::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.auth-box {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    margin: 80px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.customer-auth-box {
    margin-top: 48px;
}

/* 注册/登录页头部精修 */
.customer-auth-box .eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff 0%, #ede9fe 100%);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
}

.customer-auth-box > h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.customer-auth-box > p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 6px;
}

.auth-switch {
    margin: 18px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.auth-switch a {
    font-weight: 700;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin: 18px 0;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
}

.auth-tabs button {
    min-height: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.auth-tabs button::before { display: none; }

.auth-tabs button:hover {
    color: var(--text);
    background: rgba(255,255,255,.6);
    transform: none;
}

.auth-tabs button.active {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(15,23,42,.1);
    transform: none;
}

.auth-login-panel {
    display: none;
}

.auth-login-panel.active {
    display: grid;
}

.code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.code-row .button {
    min-height: 0;
    white-space: nowrap;
    padding: 0 16px;
}

.captcha-panel {
    width: min(380px, calc(100vw - 28px));
    padding: 22px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15,23,42,.22);
}

.captcha-panel img {
    width: 150px;
    height: 48px;
    display: block;
    margin: 8px 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.field-error {
    display: block;
    min-height: 20px;
    margin-top: 6px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

input.input-error {
    border-color: #f04438 !important;
    box-shadow: 0 0 0 3px rgba(240,68,56,.12) !important;
}

.test-config-form {
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--line);
}

.account-console {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.mobile-account-home {
    display: none;
}

.mobile-category-page {
    display: grid;
    gap: 16px;
}

.mobile-contact-page {
    display: grid;
    gap: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #6b73df 0%, #7651bd 100%);
    color: #fff;
}

.mobile-contact-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 68px;
    padding: 0 18px;
    background: rgba(74, 59, 150, .24);
    position: relative;
}

.mobile-contact-nav a {
    position: absolute;
    left: 18px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    text-decoration: none;
}

.mobile-contact-nav h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #fff;
    font-size: 22px;
}

.mobile-contact-nav h1 span {
    width: 22px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff 0 18%, #ede9fe 19% 100%);
    position: relative;
}

.mobile-contact-nav h1 span::after {
    content: '';
    position: absolute;
    left: 3px;
    bottom: -4px;
    border-width: 5px 4px 0 0;
    border-style: solid;
    border-color: #ede9fe transparent transparent transparent;
}

.mobile-contact-hero {
    padding: 22px 18px 28px;
    text-align: center;
}

.mobile-contact-hero h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 28px;
}

.mobile-contact-hero p {
    margin: 0;
    color: rgba(255,255,255,.86);
    font-weight: 800;
}

.mobile-contact-list {
    display: grid;
    gap: 16px;
    padding: 0 18px 26px;
}

.mobile-contact-card {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 24px 18px;
    border-top: 2px solid rgba(255,255,255,.9);
    border-radius: 20px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .18);
}

.mobile-contact-title {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
}

.mobile-contact-title i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #22c55e;
    color: #fff;
    font-style: normal;
    font-weight: 900;
}

.mobile-contact-card:nth-child(2) .mobile-contact-title i {
    background: #4ade80;
}

.mobile-contact-title h3 {
    margin: 0;
    font-size: 22px;
}

.mobile-contact-card > p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.mobile-contact-qr {
    width: min(210px, 72vw);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.mobile-contact-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.mobile-contact-copy {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
}

.mobile-contact-copy span {
    color: var(--muted);
    font-weight: 800;
}

.mobile-contact-copy strong {
    text-align: right;
    word-break: break-all;
}

.mobile-contact-copy button {
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    background: #7651bd;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.mobile-category-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary) 0%, #7651bd 100%);
    color: #fff;
    box-shadow: 0 14px 32px rgba(37, 99, 235, .18);
}

.mobile-category-head a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    text-decoration: none;
}

.mobile-category-head h1 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 24px;
}

.mobile-category-head h1 span {
    width: 28px;
    height: 22px;
    display: inline-block;
    border-radius: 4px 4px 6px 6px;
    background: #facc15;
    position: relative;
}

.mobile-category-head h1 span::before {
    content: '';
    position: absolute;
    left: 3px;
    top: -5px;
    width: 12px;
    height: 7px;
    border-radius: 4px 4px 0 0;
    background: #facc15;
}

.mobile-category-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 540px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #f8fafc;
}

.mobile-category-primary {
    display: grid;
    align-content: start;
    background: #fff;
    border-right: 1px solid var(--line);
}

.mobile-category-primary button {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
    color: #1f2937;
    font: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.mobile-category-primary button.active {
    background: #f5f7ff;
    color: var(--primary);
    box-shadow: inset 3px 0 0 var(--primary);
}

.mobile-category-primary i,
.mobile-category-title i,
.mobile-category-children i {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-style: normal;
    font-weight: 900;
}

.mobile-category-primary i {
    width: 34px;
    height: 34px;
    background: #eef2ff;
    color: var(--primary);
}

.mobile-category-detail {
    padding: 28px;
}

.mobile-category-panel {
    display: none;
}

.mobile-category-panel.active {
    display: block;
}

.mobile-category-card {
    max-width: 520px;
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.mobile-category-title {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.mobile-category-title i {
    width: 42px;
    height: 42px;
    background: #111827;
    color: #fff;
}

.mobile-category-title h2 {
    margin: 0;
    font-size: 22px;
}

.mobile-category-title p {
    margin: 4px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.mobile-category-children {
    display: grid;
    gap: 12px;
    padding-top: 18px;
}

.mobile-category-children a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--text);
    text-decoration: none;
}

.mobile-category-children i {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: #fff;
}

.mobile-category-children strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
}

.mobile-category-children span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.category-product-hero {
    min-height: 112px;
}

.category-product-back {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 34px;
    line-height: 1;
    text-decoration: none;
    font-weight: 900;
}

.category-product-return {
    flex: 0 0 auto;
}

.account-side,
.account-content-card,
.account-hero,
.account-metrics > div {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    background: #fff;
}

.account-side {
    position: sticky;
    top: 100px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.account-profile-card {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 32px 20px 28px;
    border-bottom: 2px solid rgba(226, 232, 240, 0.6);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    text-align: center;
    position: relative;
}

.account-profile-card::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.account-profile-card img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #f8fafc;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2), 0 0 0 2px rgba(59, 130, 246, 0.1);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.account-profile-card:hover img {
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.3), 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.account-profile-card h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.account-profile-card p,
.account-profile-card span {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.account-profile-card span {
    padding: 6px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary);
}

.account-tabs {
    display: grid;
    gap: 6px;
    padding: 16px 12px;
}

.account-tabs a {
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
}

.account-tabs a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    border-radius: 0 4px 4px 0;
    background: var(--primary);
    transition: var(--transition);
}

.account-tabs a:hover {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: var(--primary);
    padding-left: 20px;
}

.account-tabs a:hover::before {
    height: 24px;
}

.account-tabs a.active {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--primary);
    font-weight: 700;
    padding-left: 20px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.account-tabs a.active::before {
    height: 32px;
    width: 4px;
}

.account-main {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.account-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 36px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%), #fff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.account-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.account-hero h1 {
    margin: 6px 0 8px;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 700;
}

.account-hero p {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
}

.account-buy-button {
    min-width: 140px;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

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

.account-metrics > div {
    position: relative;
    overflow: hidden;
    padding: 24px 22px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transition: var(--transition);
}

.account-metrics > div::before {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    transition: var(--transition);
}

.account-metrics > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.account-metrics > div:hover::before {
    transform: scale(1.2);
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

.account-metrics span,
.account-metrics strong {
    display: block;
    position: relative;
    z-index: 1;
}

.account-metrics span {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.account-metrics strong {
    margin-top: 8px;
    color: var(--text);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.account-content-card {
    padding: 0;
    overflow: hidden;
    min-height: 500px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

.account-tab-panel {
    display: none;
    padding: 36px 40px 42px;
    animation: fadeInUp 0.4s ease;
}

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

.account-tab-panel.active {
    display: block;
}

.account-form {
    max-width: 680px;
}

.account-profile-form {
    display: grid;
    gap: 28px;
    max-width: 900px;
}

.avatar-uploader {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 2px dashed rgba(59, 130, 246, 0.3);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    transition: var(--transition);
}

.avatar-uploader:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.avatar-uploader img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
    transition: var(--transition);
}

.avatar-uploader:hover img {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.3);
}

.avatar-uploader > div {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.avatar-uploader strong {
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
}

.avatar-uploader span,
.avatar-uploader em {
    color: var(--text-secondary);
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
}

.avatar-upload-button {
    width: fit-content;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.avatar-upload-button input {
    display: none;
}

.account-recharge-form {
    align-items: stretch;
    padding: 14px;
    margin: 4px 0 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.account-recharge-form input,
.account-recharge-form select {
    min-width: 180px;
}

.support-table {
    margin-top: 20px;
}

.ticket-upload {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px dashed #b8c7dc;
    border-radius: 8px;
    background: #f8fbff;
}

.ticket-upload input {
    padding: 10px;
    background: #fff;
}

.ticket-upload span {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.ticket-attachment {
    color: var(--primary);
    font-weight: 900;
}

.ticket-attachment-thumb {
    width: fit-content;
    display: inline-grid;
    grid-template-columns: 54px auto;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font-weight: 900;
}

.ticket-attachment-thumb img {
    width: 54px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    background: #f2f4f7;
}

.ticket-view-button {
    min-height: 34px;
    padding: 0 12px;
}

.ticket-modal {
    z-index: 90;
}

.ticket-modal-panel {
    width: min(860px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.ticket-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.ticket-modal-head h2 {
    margin: 4px 0 6px;
}

.ticket-modal-head p {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 700;
}

.ticket-message-list {
    display: grid;
    gap: 12px;
    padding: 18px 0;
}

.ticket-message-item {
    max-width: 78%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.ticket-message-item.mine {
    justify-self: end;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ticket-message-item > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
}

.ticket-message-item p {
    margin: 8px 0 0;
    white-space: pre-wrap;
    line-height: 1.65;
}

.ticket-modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.ticket-reply-form {
    max-width: none;
}

.ticket-admin-reply-form {
    max-width: none;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.ticket-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--line);
}

.ticket-action-form {
    max-width: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.ticket-action-form h3 {
    margin: 0;
    font-size: 16px;
}

.message-list {
    display: grid;
    gap: 12px;
}

.message-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.message-card.is-unread {
    border-color: #bfdbfe;
    background: #f0f7ff;
}

.message-card > div:first-child,
.message-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.message-card strong {
    color: var(--text);
    font-size: 15px;
}

.message-card span,
.message-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.message-actions a {
    color: var(--primary);
    font-weight: 900;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.metric-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.metric-card span {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 24px;
    line-height: 1.1;
}

.log-context {
    max-width: 520px;
    max-height: 160px;
    overflow: auto;
    padding: 10px;
    margin: 8px 0 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.station-trend-panel {
    margin-bottom: 18px;
}

.trend-grid {
    min-height: 180px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.trend-bar {
    min-height: 160px;
    display: grid;
    grid-template-rows: 1fr auto auto;
    gap: 8px;
    align-items: end;
    text-align: center;
}

.trend-bar span {
    width: 100%;
    min-height: 8px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #3b82f6, #16a34a);
}

.trend-bar strong {
    color: var(--text);
    font-size: 13px;
}

.trend-bar em {
    color: var(--text-secondary);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.compact-rules {
    margin-top: 14px;
}

.rule-list {
    display: grid;
    gap: 8px;
}

.rule-list p {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 700;
    line-height: 1.65;
}

.order-support-card {
    margin-top: 18px;
}

.order-support-form {
    max-width: none;
}

.ticket-mini-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.ticket-mini-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.ticket-mini-list span {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.setting-check {
    align-self: end;
    min-height: 44px;
}

.contact-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.contact-preview-grid > div {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.contact-preview-grid img {
    width: 100%;
    max-width: 140px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
}

.contact-modal {
    z-index: 120;
}

.contact-panel {
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 56px);
    overflow: auto;
    padding: 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6275df 0%, #7651bd 100%);
    color: #fff;
    box-shadow: 0 22px 56px rgba(30, 41, 59, .26);
    position: relative;
}

.contact-panel .modal-close {
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .14);
}

.contact-head {
    text-align: center;
    margin-bottom: 18px;
}

.contact-head h2 {
    margin: 0;
    color: #fff;
    font-size: 25px;
    letter-spacing: 0;
}

.contact-head p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
    font-weight: 800;
}

.contact-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-card {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 12px 28px rgba(30, 41, 59, .12);
}

.contact-card-title {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

.wechat-icon {
    background: linear-gradient(135deg, #10b981, #06c755);
}

.official-icon {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.contact-card h3 {
    margin: 0;
    font-size: 19px;
}

.contact-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
}

.contact-qr-box {
    width: min(160px, 78%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .07);
}

.contact-qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.contact-copy-row {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 13px;
}

.contact-copy-row span {
    color: var(--text-secondary);
    font-weight: 800;
}

.contact-copy-row strong {
    text-align: right;
    word-break: break-all;
}

.contact-copy-row button {
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: #7458c8;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.contact-tips {
    margin-top: 14px;
    padding: 14px 16px;
    border-left: 3px solid #60a5fa;
    border-radius: 12px;
    background: rgba(255, 255, 255, .92);
    color: var(--text);
}

.contact-tips strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.contact-tips p {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.station-popup-config {
    margin: 8px 0 0;
}

.popup-preview-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.popup-preview-card > img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.popup-preview-card div {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.65;
}

.popup-preview-card div img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.station-popup-modal {
    z-index: 130;
}

.station-popup-panel {
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .26);
    position: relative;
}

.station-popup-image {
    width: 100%;
    max-height: 320px;
    overflow: hidden;
    border-radius: 10px;
    background: #f8fafc;
}

.station-popup-image img {
    width: 100%;
    height: 100%;
    max-height: 320px;
    object-fit: contain;
    display: block;
}

.station-popup-content {
    color: var(--text);
    font-size: 15px;
    line-height: 1.8;
}

.station-popup-content p {
    margin: 0 0 10px;
}

.station-popup-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.station-popup-confirm {
    justify-self: center;
    min-width: 150px;
}

.user-notice-modal {
    z-index: 135;
}

.user-notice-panel {
    position: relative;
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100vh - 44px);
    display: grid;
    grid-template-rows: auto minmax(120px, 1fr) auto;
    gap: 16px;
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.user-notice-head,
.user-notice-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-notice-head {
    padding-right: 38px;
}

.user-notice-toolbar,
.store-product-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-notice-toolbar {
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
}

.segmented-control {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.segmented-control button {
    min-height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 900;
    cursor: pointer;
}

.segmented-control button.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.user-notice-head span {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.user-notice-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 24px;
}

.user-notice-read-all {
    min-height: 38px;
    padding: 0 14px;
}

.user-notice-list {
    display: grid;
    gap: 10px;
    overflow: auto;
    padding-right: 4px;
}

.user-notice-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.user-notice-card.is-unread {
    border-color: #bfdbfe;
    background: #f0f7ff;
}

.user-notice-card > div:first-child,
.user-notice-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-notice-card strong {
    color: var(--text);
    font-size: 15px;
}

.user-notice-card span,
.user-notice-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.65;
}

.user-notice-actions a {
    color: var(--primary);
    font-weight: 900;
}

.link-button.danger {
    color: #dc2626;
}

.user-notice-foot {
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.ticket-resolve-form {
    align-self: end;
}

.ticket-upload.compact {
    padding: 10px;
}

.support-inline-form {
    min-width: 260px;
    display: grid;
    gap: 8px;
}

.support-inline-form select,
.support-inline-form textarea {
    width: 100%;
}

.customer-balance-form {
    min-width: 240px;
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(90px, 1fr) auto;
    gap: 6px;
    margin-top: 8px;
}

.customer-balance-form input {
    height: 34px;
    padding: 0 8px;
    font-size: 13px;
}

.customer-balance-form button {
    min-height: 34px;
    padding: 0 10px;
}

.status-open { color: #b54708; background: #fffaeb; }
.status-processing { color: #175cd3; background: #eff6ff; }
.status-resolved { color: #067647; background: #ecfdf3; }

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.heading,
.panel-main,
.panel-side,
.order-result {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}

.order-page {
    display: grid;
    gap: 18px;
}

.order-hero,
.order-empty,
.order-summary-card,
.delivery-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.order-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 24px 28px;
}

.order-hero h1 {
    margin-bottom: 6px;
}

.order-hero p {
    margin-bottom: 0;
}

.order-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.order-summary-card {
    display: grid;
    gap: 8px;
    min-height: 96px;
    padding: 18px;
}

.order-summary-card span {
    color: var(--muted);
    font-weight: 800;
}

.order-summary-card strong {
    color: var(--text);
    font-size: 18px;
    word-break: break-word;
}

.delivery-card {
    padding: 22px 28px;
}

.delivery-card pre {
    margin: 0;
    min-height: 84px;
    font-size: 15px;
}

.order-empty {
    width: min(720px, 100%);
    margin: 40px auto;
    padding: 32px;
    text-align: center;
}

.order-empty .query {
    width: min(520px, 100%);
    margin: 18px auto 0;
}

.admin-shell,
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 22px;
    align-items: start;
}

.order-detail-shell {
    grid-template-columns: minmax(720px, 1fr) 360px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.section-title > div > h1,
.section-title > div > h2,
.section-title > div > h3 {
    position: relative;
    padding-left: 13px;
}

.section-title > div > h1::before,
.section-title > div > h2::before,
.section-title > div > h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), #7c3aed);
}

.section-title p { margin-bottom: 0; }

.detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.metrics div {
    position: relative;
    overflow: hidden;
    padding: 22px 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(15,23,42,.05);
    transition: var(--transition);
}

.metrics div::before {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.1) 0%, transparent 70%);
    transition: var(--transition);
}

.metrics div:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(59,130,246,.15);
    border-color: rgba(59,130,246,.3);
}

.metrics div:hover::before {
    transform: scale(1.2);
}

.metrics strong {
    display: block;
    position: relative;
    z-index: 1;
    margin-top: 6px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metrics span {
    position: relative;
    z-index: 1;
    color: var(--text-secondary);
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.compact-table th,
.compact-table td {
    padding: 12px 14px;
}

th, td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:last-child td { border-bottom: 0; }
tbody tr {
    transition: var(--transition);
}
tbody tr:hover {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}
.warning-row td {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 6px;
    color: #344054;
    font-weight: 800;
}

input, textarea, select {
    width: 100%;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--text);
    background: #fff;
    font: inherit;
    outline: none;
    transition: var(--transition);
    font-size: 15px;
}

input:hover, textarea:hover, select:hover {
    border-color: var(--line-dark);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: #fff;
}

textarea { resize: vertical; min-height: 120px; }

button,
.button {
    min-height: 44px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

button::before,
.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before,
.button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover,
.button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

button:active,
.button:active {
    transform: translateY(0);
}

.button.ghost {
    background: #fff;
    color: var(--text);
    border-color: var(--line-dark);
    box-shadow: var(--shadow-sm);
}

.button.ghost:hover {
    background: var(--panel-soft);
    color: var(--text);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.button.danger {
    background: #fff;
    color: var(--danger);
    border-color: #fecaca;
}

.button.danger:hover {
    background: #fef2f2;
    border-color: var(--danger);
}

.link-button {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-weight: 800;
}

.link-button:hover {
    background: transparent;
    color: var(--primary-dark);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.table-actions form {
    display: inline;
}

button[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

.filter-bar {
    padding: 14px;
    margin-bottom: 16px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-bar input { width: min(340px, 100%); }
.filter-bar input[type="date"] { width: 160px; }
.filter-bar select { width: 180px; }

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

.wide-form { max-width: 820px; }
.actions { margin-top: 16px; }

.bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.bulk-toolbar input[type="number"] {
    width: 150px;
}

.compact-input {
    width: 110px;
    padding: 8px 9px;
}

.check-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.check-row label,
.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.check-row input,
.inline-check input {
    width: auto;
}

.rich-editor-wrap {
    display: grid;
    gap: 8px;
}

.rich-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.rich-toolbar button {
    min-height: 34px;
    padding: 0 10px;
    background: #fff;
    color: var(--text);
    border-color: var(--line-dark);
    font-size: 13px;
}

.rich-toolbar button:hover {
    background: #eef4ff;
    color: var(--primary);
    border-color: #b2ccff;
}

.rich-editor-box {
    min-height: 240px;
    padding: 14px;
    border: 1px solid var(--line-dark);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    outline: none;
    overflow: auto;
}

.rich-editor-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23,105,224,.12);
}

.rich-editor-box:empty::before {
    content: "请输入商品详情，可插入图片、列表和链接";
    color: var(--muted);
}

.rich-editor-box img {
    display: block;
    width: auto;
    max-width: min(420px, 100%);
    max-height: 320px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--line);
    margin: 10px 0;
}

.detail-box img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 260px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--line);
    margin: 10px auto;
}

.rich-editor-box p,
.rich-editor-box ul,
.rich-editor-box ol {
    margin-top: 0;
    margin-bottom: 10px;
}

.upload-hint {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.cover-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.cover-preview img {
    width: 116px;
    height: 84px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef2f7;
}

.cover-preview span {
    color: var(--muted);
    font-weight: 800;
}

.cover-preview-large {
    display: grid;
    align-items: start;
}

.cover-preview-large img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.product-cell img {
    width: 64px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #eef2f7;
}

.compact-product-cell {
    min-width: 300px;
}

.compact-product-cell img {
    width: 72px;
    height: 54px;
}

.product-table th,
.product-table td {
    white-space: nowrap;
}

.product-table .product-cell span {
    max-width: 360px;
}

.product-cell strong,
.product-cell span,
.product-cell em {
    display: block;
}

.product-cell span {
    max-width: 420px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-cell em,
.card-tags span,
.status-pill {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.product-cell em {
    margin-top: 4px;
    color: #8a4b00;
    background: #fff3d6;
    font-style: normal;
}

.status-pill { color: #344054; background: #eef2f7; }
.status-pending { color: #175cd3; background: #eff6ff; }
.status-paid { color: var(--success); background: #ecfdf3; }
.status-paid_hold { color: var(--warning); background: #fff7e6; }
.status-delivered { color: var(--success); background: #ecfdf3; }
.status-closed { color: #667085; background: #f2f4f7; }

.brand-preview {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 20px;
}

.brand-preview img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.brand-preview span,
.hint {
    color: var(--muted);
    font-size: 13px;
}

.field-tip {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.brand-setting-grid,
.contact-setting-grid {
    align-items: stretch;
}

.brand-setting-grid {
    gap: 16px;
}

.brand-setting-grid > label {
    display: grid;
    grid-template-rows: auto auto minmax(36px, auto);
    align-content: start;
    gap: 10px;
    min-height: 142px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfdff;
}

.brand-setting-grid input {
    min-height: 52px;
}

.brand-setting-grid input[type="file"] {
    padding: 10px 12px;
    line-height: 1.8;
}

.brand-setting-grid .field-tip {
    margin-top: 0;
}

.theme-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.theme-preset-card {
    min-height: 118px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 12px;
    align-content: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.theme-preset-card:hover {
    border-color: rgba(37, 99, 235, .35);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.theme-preset-card input {
    grid-row: 1 / span 2;
    margin-top: 6px;
}

.theme-preset-card:has(input:checked) {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.theme-swatch {
    width: 100%;
    height: 28px;
    grid-column: 1 / -1;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--swatch), color-mix(in srgb, var(--swatch) 70%, #111827));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.38);
}

.theme-preset-card strong {
    margin-top: 2px;
    color: var(--text);
}

.theme-preset-card small {
    grid-column: 2;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.contact-setting-card {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}

.station-dashboard-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.station-metrics strong {
    font-size: 24px;
}

.station-metrics.secondary strong {
    font-size: 22px;
}

.station-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
}

.station-dashboard-side,
.station-dashboard-side section {
    display: grid;
    gap: 14px;
}

.mini-product-row,
.payment-summary-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.mini-product-row img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #eef2f7;
}

.mini-product-row strong,
.mini-product-row span,
.payment-summary-row strong,
.payment-summary-row span {
    display: block;
}

.mini-product-row span,
.payment-summary-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.payment-summary-row {
    justify-content: space-between;
}

.full-button {
    width: 100%;
}

.thumb-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.thumb-list img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.pay-config {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.pay-tip {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background: #e0f2fe;
}

.pay-tip p {
    margin: 0;
    color: #155e75;
}

.hidden { display: none !important; }

.detail-list {
    display: grid;
    grid-template-columns: 112px 1fr;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 18px;
}

.detail-list dt { font-weight: 900; }
dd { margin: 0; }

.order-detail-panel {
    display: grid;
    gap: 18px;
}

.order-kpi-grid,
.detail-grid {
    display: grid;
    gap: 12px;
}

.order-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.order-kpi-grid > div,
.detail-grid > div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.order-kpi-grid span,
.detail-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.order-kpi-grid strong {
    display: block;
    font-size: 20px;
    line-height: 1.2;
}

.compact-detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-detail-grid strong {
    display: block;
    font-size: 15px;
    line-height: 1.35;
    word-break: break-word;
}

.compact-section {
    display: grid;
    gap: 10px;
}

.compact-section h2,
.order-log-side h2 {
    margin: 0;
    font-size: 18px;
}

.compact-section pre {
    min-height: 92px;
    max-height: 260px;
    overflow: auto;
    margin: 0;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    padding: 16px;
    background: #111827;
    color: #e5e7eb;
    border-radius: 8px;
}

.amount-positive { color: var(--success); font-weight: 900; }
.amount-negative { color: var(--danger); font-weight: 900; }

.status-available { color: #067647; background: #ecfdf3; }
.status-disabled { color: #93370d; background: #fffaeb; }
.status-sold { color: #344054; background: #eef2f7; }

.muted-line {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.card-detail-table td {
    vertical-align: top;
}

.card-secret {
    display: block;
    max-width: 360px;
    max-height: 72px;
    overflow: auto;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    color: var(--text);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

.inline-card-action {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}

.inline-card-action input {
    width: 140px;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
}

.slim-title {
    margin-bottom: 14px;
}

.manual-delivery-box {
    border-color: #bfdbfe;
    background: #eff6ff;
}

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

.manual-card-toolbar span {
    color: var(--muted);
    font-weight: 800;
}

.manual-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-height: 360px;
    overflow: auto;
    padding: 4px;
}

.manual-card-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.manual-card-item input {
    margin-top: 3px;
}

.manual-card-item strong,
.manual-card-item em {
    display: block;
}

.manual-card-item code {
    display: block;
    max-height: 46px;
    overflow: auto;
    margin: 4px 0;
    color: var(--text);
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-all;
}

.manual-card-item em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.tiny-muted {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.pay-callback-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.pay-callback-grid > div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.pay-callback-grid span,
.pay-callback-grid strong {
    display: block;
}

.pay-callback-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 5px;
}

.pay-callback-grid strong {
    font-size: 12px;
    line-height: 1.4;
    word-break: break-all;
}

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

.health-card {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.health-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.health-card.ok { border-left: 3px solid var(--success); }
.health-card.bad { border-left: 3px solid var(--danger); }

.health-card span,
.health-card strong,
.health-card p {
    display: block;
}

.health-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.health-card strong {
    margin-bottom: 8px;
}

.health-card.ok strong { color: var(--success); }
.health-card.bad strong { color: var(--danger); }

.health-card p {
    margin: 0;
    color: #475467;
    font-size: 13px;
    word-break: break-all;
}

.report-metrics {
    margin-top: 8px;
}

.report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
    gap: 18px;
    align-items: start;
}

.compact-title {
    margin-top: 8px;
    margin-bottom: 10px;
}

.compact-title h2 {
    margin: 0;
    font-size: 18px;
}

.task-url-box {
    display: grid;
    gap: 8px;
    padding: 14px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.task-url-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.task-url-box strong,
.task-url-box code {
    word-break: break-all;
}

.task-url-box p {
    margin: 0;
    color: #475467;
}

.notice-list,
.notification-list {
    display: grid;
    gap: 12px;
}

.notice-list > div,
.notification-item {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.notice-list strong,
.notice-list span,
.notification-item span,
.notification-item strong,
.notification-item p {
    display: block;
}

.notice-list span,
.notification-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.notification-item.unread {
    border-color: #fedf89;
    background: #fffaf0;
}

.notification-item p {
    margin: 4px 0 0;
    color: #475467;
}

.risk-settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.risk-settings-grid .form-actions {
    grid-column: 1 / -1;
    margin-top: 0;
}

.log-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 12px;
    background: #f8fafc;
}

.log-card span {
    color: var(--muted);
    font-size: 12px;
}

.log-card pre {
    max-height: 220px;
    overflow: auto;
    margin: 0;
    font-size: 12px;
}

.order-log-side {
    display: grid;
    gap: 18px;
}

.order-log-side section {
    display: grid;
    gap: 10px;
}

.compact-log-card {
    margin-bottom: 0;
    padding: 10px;
}

.compact-log-card strong {
    font-size: 14px;
    line-height: 1.35;
}

.compact-log-card pre {
    max-height: 140px;
}

.store-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 18px;
}

.refined-store-hero {
    align-items: stretch;
    min-height: 140px;
    padding: 32px 28px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    position: relative;
    overflow: hidden;
}

.refined-store-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.store-brand-block {
    display: grid;
    align-content: center;
    gap: 12px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.store-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.store-brand img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    transition: var(--transition);
}

.refined-store-hero .store-brand img {
    width: 72px;
    height: 72px;
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
}

.refined-store-hero:hover .store-brand img {
    transform: scale(1.05) rotate(2deg);
}

.store-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.store-brand h1 {
    margin: 0 0 6px;
    font-size: 28px;
    letter-spacing: -0.02em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.store-brand p {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
}

.store-quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.store-quick-stats span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
    font-weight: 900;
}

.store-actions {
    display: grid;
    align-content: center;
    justify-items: end;
    gap: 12px;
    width: auto;
    margin-left: auto;
}

.store-order-query {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 10px;
}

.store-order-query input {
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border-radius: 8px;
    background: #f8fafc;
}

.store-order-query button,
.store-action-buttons .button {
    min-height: 44px;
    border-radius: 8px;
    white-space: nowrap;
}

.store-action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
}

.store-action-buttons .button {
    min-width: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    font-weight: 900;
}

.store-action-primary {
    background: #111827;
    border-color: #111827;
}

.store-action-primary:hover {
    background: #0f172a;
}

.store-action-secondary {
    background: #fff;
}

.store-notice-button {
    position: relative;
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    overflow: visible;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
    cursor: pointer;
    transition: var(--transition);
}

.store-notice-button:hover {
    border-color: rgba(37, 99, 235, .32);
    background: #fff;
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .12), 0 0 0 4px rgba(37, 99, 235, .08);
}

.store-notice-button svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.store-notice-button.has-unread::after {
    content: none;
}

.store-notice-button span {
    position: absolute;
    z-index: 3;
    right: -8px;
    top: -8px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-sizing: border-box;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 8px 16px rgba(239, 68, 68, .28);
}

.ticker {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px 18px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.refined-ticker {
    min-height: 48px;
    padding: 0 20px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.ticker span {
    flex: 0 0 auto;
    color: var(--warning);
    font-weight: 700;
    font-size: 14px;
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 8px;
}

.banner-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.banner-strip img {
    width: 100%;
    max-height: 280px;
    aspect-ratio: 16 / 5;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.banner-strip img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
}

.category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.store-product-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin: 18px 0 14px;
}

.store-product-head h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.store-product-head p {
    margin: 0;
    color: #667085;
    font-weight: 700;
}

.store-product-tools {
    margin: -4px 0 16px;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, .78);
    border-radius: 10px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.store-search-box {
    flex: 1 1 320px;
}

.store-search-box input,
.store-product-tools select {
    width: 100%;
    min-height: 42px;
    border-radius: 8px;
    background: #fff;
}

.store-product-tools select {
    flex: 0 0 180px;
}

.store-recommend-filter {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.tab {
    min-height: 42px;
    padding: 0 18px;
    background: #fff;
    color: var(--text);
    border: 2px solid var(--line);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
}

.tab:hover {
    border-color: var(--primary-light);
    background: #f0f9ff;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.tab.active:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
}

.commerce-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}

.commerce-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.32s ease, border-color 0.32s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.commerce-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0) 0%, rgba(59, 130, 246, 0.04) 100%);
    opacity: 0;
    transition: opacity 0.32s ease;
    pointer-events: none;
    border-radius: var(--radius);
}

.commerce-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 16px 32px rgba(59, 130, 246, 0.12);
}

.commerce-card:hover::after {
    opacity: 1;
}

.card-cover {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    display: block;
    padding: 14px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,.9), transparent 60%),
        linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    transition: transform 0.4s ease;
}

.commerce-card:hover .card-cover {
    transform: scale(1.04);
}

.card-body {
    display: grid;
    gap: 10px;
    padding: 14px 15px 16px;
    flex: 1;
    align-content: start;
}

.card-body h2 {
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
    font-weight: 700;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    min-height: 22px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.card-tags span {
    color: var(--primary);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 7px;
    min-height: 22px;
    padding: 0 9px;
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.commerce-card:hover .card-tags span {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: rgba(59, 130, 246, 0.4);
}

.commerce-card button {
    width: 100%;
    min-height: 40px;
    margin-top: 4px;
    padding: 0 16px;
    font-size: 14px;
    border-radius: 10px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    transition: var(--transition);
}

.commerce-card button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.commerce-card .product-meta span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 900;
}

.stock-ok {
    color: #067647 !important;
    background: #ecfdf3;
}

.stock-empty {
    color: #b42318 !important;
    background: #fef3f2;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-meta strong,
.price {
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 36px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 50;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show { display: flex; }

.modal-panel {
    position: relative;
    width: min(980px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-modal {
    width: min(860px, 100%);
}

.small-modal {
    width: min(520px, 100%);
}

.form-modal .rich-editor-box {
    min-height: 150px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

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

.modal-close {
    position: absolute;
    right: 14px;
    top: 12px;
    width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 50%;
    background: #eef2f7;
    color: #172033;
    border-color: #eef2f7;
    font-size: 22px;
}

.modal-product {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 24px;
}

.modal-product > img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.product-modal-panel {
    width: min(1180px, calc(100vw - 48px));
}

.modal-product-main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(260px, 1fr) auto;
    gap: 14px;
}

.modal-product-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.modal-product-head h2 {
    margin-bottom: 8px;
}

.modal-product-head p {
    margin-bottom: 0;
}

.modal-price-box {
    flex: 0 0 auto;
    display: grid;
    gap: 6px;
    text-align: right;
}

.modal-price-box strong {
    color: var(--primary);
    font-size: 28px;
    line-height: 1.1;
    font-weight: 900;
}

.modal-price-box span {
    color: var(--muted);
    font-weight: 800;
}

.detail-box {
    max-height: 180px;
    overflow: auto;
    padding: 12px;
    margin: 10px 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.product-detail-box {
    min-height: 300px;
    max-height: min(430px, 46vh);
    margin: 0;
    padding: 16px;
}

.compact-form {
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.order-panel {
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.order-fields,
.order-submit-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 10px;
    align-items: end;
}

.order-submit-row {
    grid-template-columns: minmax(0, 1fr) 180px;
}

.order-panel label {
    gap: 4px;
    font-size: 13px;
}

.order-panel input,
.order-panel select {
    min-height: 38px;
    padding: 8px 10px;
}

.order-panel button {
    min-height: 38px;
    width: 100%;
}

.order-panel .hint {
    margin: 0;
}

.product-modal-panel {
    width: min(1040px, calc(100vw - 48px));
    max-height: min(780px, calc(100vh - 28px));
    padding: 0;
    overflow: auto;
    border-radius: var(--radius-lg);
    background: #fff;
}

.product-modal-topbar {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 40px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.product-modal-topbar b {
    opacity: 0.8;
}

.product-modal-topbar strong {
    max-width: 280px;
    padding: 6px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-modal-close {
    right: 14px;
    top: 8px;
    z-index: 3;
    background: rgba(255,255,255,.92);
    border-color: rgba(255,255,255,.92);
}

.product-modal-content {
    display: grid;
    gap: 0;
}

.product-modal-content .modal-product {
    grid-template-columns: minmax(260px, 360px) minmax(360px, 1fr);
    gap: 40px;
    align-items: start;
    padding: 32px 44px 36px;
}

.modal-cover-box {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,.9), transparent 60%),
        linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(15,23,42,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 22px;
}

.modal-cover-box img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    background: transparent;
}

.cover-zoom-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    min-height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 13px;
}

.cover-zoom-badge:hover {
    background: rgba(0,0,0,.68);
}

.product-modal-content .modal-product-main {
    display: block;
    padding-top: 2px;
}

.product-modal-content .modal-product-main h2 {
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 23px;
    line-height: 1.25;
    font-weight: 700;
}

.product-modal-content .modal-product-main > p {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
}

.modal-stock-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: var(--success-dark);
    font-size: 13px;
    font-weight: 600;
}

.modal-stock-line::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}

.buy-panel {
    gap: 14px;
}

/* 弹窗内字段标题统一：联系方式/支付方式/优惠码等 */
.buy-panel > .buy-contact-grid label,
.coupon-input-row label,
.buy-label {
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .01em;
}

.buy-label {
    margin-bottom: 8px;
}

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-stepper button,
.qty-stepper input {
    width: 44px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border: 1px solid var(--line-dark);
    border-radius: 10px;
    background: #fff;
    color: #111827;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
}

.qty-stepper input {
    width: 104px;
}

.qty-stepper button:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

.qty-hint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12.5px;
}

.buy-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .65fr);
    gap: 12px;
}

.buy-contact-grid label {
    gap: 7px;
}

.buy-contact-grid input,
.buy-contact-grid select {
    min-height: 42px;
    padding: 10px 12px;
}

.buy-summary {
    display: grid;
    grid-template-columns: minmax(150px, .8fr) minmax(180px, 1fr);
    gap: 14px;
    align-items: center;
    margin-top: 2px;
    padding: 18px 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1.5px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.08);
}

.buy-summary span {
    display: block;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
}

.buy-summary strong {
    display: block;
    margin-top: 4px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
}

.buy-summary button {
    min-height: 48px;
    border: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
    transition: var(--transition);
}

.buy-summary button:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.5);
}

.product-detail-section {
    padding: 34px 44px 44px;
    border-top: 1px solid var(--line);
}

.product-detail-section h2 {
    margin-bottom: 20px;
    color: #111827;
    font-size: 18px;
}

.product-detail-section .product-detail-box {
    min-height: 160px;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
}

.product-detail-section .detail-box img {
    max-height: 420px;
}

.image-preview-modal {
    z-index: 70;
}

.image-preview-panel {
    position: relative;
    width: min(920px, calc(100vw - 42px));
    max-height: calc(100vh - 42px);
    padding: 18px;
    border-radius: 8px;
    background: #fff;
}

.image-preview-panel img {
    width: 100%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
    display: block;
}

.pay-code-modal {
    z-index: 75;
}

.pay-code-panel {
    position: relative;
    width: min(360px, calc(100vw - 32px));
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15,23,42,.22);
}

.pay-code-head {
    display: grid;
    gap: 4px;
    padding: 28px 26px 10px;
}

.pay-code-head strong {
    color: var(--text);
    font-size: 18px;
}

.pay-code-head span,
.pay-code-panel p {
    color: var(--muted);
    margin: 0;
}

.pay-code-amount {
    padding-top: 14px;
    color: var(--text);
    font-size: 24px;
    font-weight: 900;
}

.pay-code-box {
    display: flex;
    justify-content: center;
    padding: 18px 0 20px;
}

.pay-code-box img {
    width: 230px;
    height: 230px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.pay-code-tip {
    padding: 14px 12px;
    background: #16a34a;
    color: #fff !important;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

.pay-code-close {
    right: 10px;
    top: 10px;
}

.qrbox {
    display: inline-flex;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 10px 0 18px;
}

.qrbox img {
    width: 220px;
    height: 220px;
    display: block;
}

.coupon-box {
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

.coupon-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.coupon-input-row label {
    margin: 0;
}

.coupon-input-row .button {
    min-height: 40px;
    white-space: nowrap;
}

.coupon-message {
    margin: 0;
    color: #15803d;
    font-size: 13px;
    line-height: 1.4;
}

.coupon-message:not(:empty) {
    margin-top: 8px;
}

.coupon-message.error {
    color: #b91c1c;
}

.buy-summary em {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}

.marketing-shell {
    align-items: start;
}

.coupon-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.coupon-toolbar > div {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.coupon-toolbar strong {
    display: block;
    color: #0f172a;
    font-size: 22px;
}

.coupon-toolbar span,
.muted-line {
    color: #64748b;
    font-size: 12px;
}

.coupon-table td {
    vertical-align: middle;
}

.coupon-create-form {
    gap: 14px;
}

.coupon-help {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.coupon-help p {
    margin: 8px 0 0;
    color: #64748b;
    line-height: 1.7;
}

.store-theme-shell {
    position: relative;
    isolation: isolate;
}

.store-theme-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-position: center top;
    background-size: cover;
    pointer-events: none;
}

.store-template-compact .store-hero {
    padding: 20px;
}

.store-template-compact .commerce-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.store-template-banner .store-hero {
    min-height: 260px;
    align-items: flex-end;
}

.coupon-strip {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #fde68a;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff7ed, #fff);
}

.coupon-strip > div:first-child span {
    display: block;
    color: #b45309;
    font-size: 12px;
    font-weight: 800;
}

.coupon-strip > div:first-child strong {
    display: block;
    margin-top: 4px;
    color: #78350f;
    font-size: 14px;
}

.coupon-strip-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.coupon-strip-list button {
    min-width: 170px;
    padding: 10px 12px;
    border: 1px dashed #f59e0b;
    border-radius: 10px;
    background: #fff;
    color: #92400e;
    text-align: left;
    cursor: pointer;
}

.coupon-strip-list b,
.coupon-strip-list span {
    display: block;
}

.coupon-strip-list span {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.store-footer-note {
    margin: 28px 0 6px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.public-rule-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    max-width: 1120px;
    margin: 10px auto 28px;
    padding: 14px 18px;
    color: #6b7280;
    font-size: 13px;
}

.public-rule-footer a {
    color: inherit;
    text-decoration: none;
}

.public-rule-footer a:hover {
    color: var(--primary);
}

.mobile-bottom-nav {
    display: none;
}

.mobile-store-tools,
.mobile-tool-sheet {
    display: none;
}

.rule-page-shell {
    width: min(1120px, calc(100vw - 32px));
    margin: 28px auto 10px;
}

.rule-page-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .08);
}

.rule-page-head h1 {
    margin: 4px 0 8px;
    font-size: 30px;
    letter-spacing: 0;
}

.rule-page-head p {
    margin: 0;
    color: #64748b;
}

.rule-page-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.rule-page-nav,
.rule-page-content {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.rule-page-nav {
    position: sticky;
    top: 18px;
    align-self: start;
    padding: 10px;
}

.rule-page-nav a {
    display: block;
    padding: 11px 12px;
    border-radius: 10px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 700;
}

.rule-page-nav a:hover,
.rule-page-nav a.active {
    background: #eef4ff;
    color: var(--primary-dark);
}

.rule-page-content {
    padding: 28px;
    color: #334155;
    line-height: 1.8;
}

.rule-page-content h2 {
    margin: 22px 0 8px;
    font-size: 18px;
    color: #111827;
}

.rule-page-content h2:first-child {
    margin-top: 0;
}

.rule-page-content p,
.rule-page-content ul,
.rule-page-content ol {
    margin: 0 0 14px;
}

.rule-link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.rule-agreement-check {
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(135deg, #fbfcfe 0%, #f5f8fc 100%);
    color: #4b5563;
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.rule-agreement-check:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 10px rgba(59,130,246,.08);
}

/* 自定义勾选框 + 对勾描边动画 */
.rule-agreement-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin: 0;
    flex: 0 0 22px;
    border: 2px solid var(--line-dark);
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: background .2s ease, border-color .2s ease, transform .15s ease;
}

.rule-agreement-check input[type="checkbox"]::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
    opacity: 0;
    transition: transform .25s cubic-bezier(.2, .9, .3, 1.4), opacity .15s ease;
}

.rule-agreement-check input[type="checkbox"]:hover {
    border-color: var(--primary);
}

.rule-agreement-check input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    animation: checkPop .3s ease;
}

.rule-agreement-check input[type="checkbox"]:checked::after {
    transform: rotate(45deg) scale(1);
    opacity: 1;
}

.rule-agreement-check input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(59,130,246,.18);
}

@keyframes checkPop {
    0% { transform: scale(1); }
    45% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.rule-agreement-check a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    padding: 1px 4px;
    border-radius: 5px;
    transition: background .15s ease;
}

.rule-agreement-check a:hover {
    background: rgba(59,130,246,.1);
    text-decoration: none;
}

.buy-rule-check {
    margin-top: 4px;
}

.customer-auth-box .auth-login-panel,
.customer-auth-box .auth-login-panel[hidden] {
    display: none;
}

.customer-auth-box .auth-login-panel.active:not([hidden]) {
    display: grid;
}

.settings-check-stack {
    display: grid;
    gap: 10px;
    align-content: center;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

.tag-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mini-tag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 700;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.inline-actions form {
    margin: 0;
}

.callback-url-grid {
    display: grid;
    gap: 12px;
}

.callback-url-grid > div {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

.callback-url-grid span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.callback-url-grid strong {
    word-break: break-all;
    color: #0f172a;
    font-size: 13px;
}

.health-card em {
    display: block;
    margin-top: 8px;
    color: #92400e;
    font-size: 12px;
    font-style: normal;
    line-height: 1.5;
}

@media (max-width: 1120px) {
    .sidebar {
        position: static;
        width: auto;
        height: auto;
        min-height: 0;
        border-right: none;
        border-bottom: 1px solid var(--sidebar-border);
    }
    .sidebar-nav {
        display: flex;
        gap: 6px;
        overflow-x: auto;
    }
    .sidebar-nav .sidebar-section {
        display: none;
    }
    .nav-item {
        flex: 0 0 auto;
    }
    .sidebar-footer {
        display: none;
    }
    .app-main {
        margin-left: 0;
    }
    .admin-shell,
    .split,
    .account-console,
    .modal-product {
        grid-template-columns: 1fr;
    }
    .account-side {
        position: static;
    }
    .modal-product-main {
        grid-template-rows: auto;
    }
    .commerce-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .store-product-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .store-product-tools {
        align-items: stretch;
        flex-direction: column;
    }
    .store-product-tools select,
    .store-recommend-filter {
        flex: 0 0 auto;
        width: 100%;
    }
}

@media (max-width: 720px) {
    .page,
    .app-page {
        width: calc(100% - 24px);
        margin: 16px auto 40px;
    }
    .app-header,
    .public-topbar,
    .store-hero {
        align-items: stretch;
        flex-direction: column;
        height: auto;
        padding: 16px;
    }
    .public-actions {
        display: none;
    }
    .mini-query {
        width: 100%;
    }
    .store-actions,
    .store-order-query,
    .store-action-buttons {
        width: 100%;
    }
    .store-order-query {
        grid-template-columns: 1fr;
    }
    .store-action-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .store-action-buttons .button {
        min-width: 0;
    }
    .store-notice-button {
        width: 48px;
        min-width: 48px;
        justify-self: start;
    }
    .store-quick-stats {
        width: 100%;
    }
    .store-product-head {
        margin-top: 16px;
    }
    .category-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }
    .tab {
        flex: 0 0 auto;
    }
    .metrics,
    .grid-2,
    .account-metrics,
    .order-summary-grid,
    .order-kpi-grid,
    .compact-detail-grid,
    .manual-card-list,
    .pay-callback-grid,
    .health-grid,
    .metric-grid,
    .report-grid,
    .risk-settings-grid,
    .banner-strip,
    .trend-grid,
    .contact-card-grid,
    .contact-preview-grid,
    .commerce-grid {
        grid-template-columns: 1fr;
    }
    .trend-bar {
        min-height: auto;
        grid-template-columns: 70px minmax(0, 1fr) 120px;
        grid-template-rows: auto;
        align-items: center;
        text-align: left;
    }
    .trend-bar span {
        height: 12px !important;
    }
    .account-hero {
        align-items: flex-start;
        flex-direction: column;
    }
    .account-buy-button {
        width: 100%;
    }
    .account-tab-panel {
        padding: 18px;
    }
    .avatar-uploader {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
    .avatar-uploader > div {
        justify-items: center;
    }
    .ticket-modal-actions {
        grid-template-columns: 1fr;
    }
    .contact-panel {
        padding: 22px 16px;
    }
    .station-popup-panel {
        padding: 18px 14px;
    }
    .user-notice-panel {
        padding: 20px 14px;
    }
    .user-notice-head,
    .user-notice-toolbar,
    .user-notice-foot,
    .user-notice-card > div:first-child,
    .user-notice-actions {
        align-items: flex-start;
        flex-direction: column;
    }
    .segmented-control {
        width: 100%;
    }
    .segmented-control button {
        flex: 1;
    }
    .user-notice-read-all,
    .user-notice-foot .button {
        width: 100%;
    }
    .contact-card {
        padding: 22px 16px;
    }
    .contact-copy-row {
        grid-template-columns: 1fr;
        justify-items: start;
    }
    .contact-copy-row strong {
        text-align: left;
    }
    .ticket-action-grid {
        grid-template-columns: 1fr;
    }
    .ticket-message-item {
        max-width: 100%;
    }
    .coupon-input-row,
    .coupon-toolbar,
    .coupon-strip {
        grid-template-columns: 1fr;
    }
    .coupon-strip-list {
        flex-direction: column;
    }
    .coupon-strip-list button {
        width: 100%;
    }
    .rule-page-head {
        flex-direction: column;
        padding: 20px;
    }
    .rule-page-head h1 {
        font-size: 24px;
    }
    .rule-page-layout {
        grid-template-columns: 1fr;
    }
    .rule-page-nav {
        position: static;
        display: flex;
        overflow-x: auto;
    }
    .rule-page-nav a {
        white-space: nowrap;
    }
    .rule-page-content {
        padding: 20px;
    }
    .order-hero {
        flex-direction: column;
        padding: 20px;
    }
    .delivery-card {
        padding: 18px;
    }
    .notification-item {
        align-items: stretch;
        flex-direction: column;
    }
    .banner-strip img {
        aspect-ratio: 16 / 7;
        max-height: 180px;
    }
    .commerce-grid {
        gap: 12px;
    }
    .filter-bar,
    .mini-query,
    .query {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }
    .modal {
        padding: 12px;
    }
    .product-modal-panel {
        width: 100%;
        max-height: calc(100vh - 24px);
        padding: 0;
    }
    .product-modal-topbar {
        min-height: auto;
        gap: 8px;
        padding: 12px 42px 12px 14px;
        font-size: 13px;
        overflow-x: auto;
    }
    .product-modal-topbar strong {
        max-width: 180px;
        flex: 0 0 auto;
    }
    .product-modal-content .modal-product {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px 14px 22px;
    }
    .modal-cover-box img {
        height: min(260px, 46vh);
    }
    .product-modal-content .modal-product-main h2 {
        margin-bottom: 8px;
        font-size: 21px;
    }
    .product-modal-content .modal-product-main > p {
        margin: 0 0 14px;
    }
    .modal-stock-line {
        margin-bottom: 14px;
        font-size: 15px;
    }
    .qty-stepper {
        gap: 10px;
    }
    .qty-stepper input {
        width: 96px;
    }
    .buy-contact-grid,
    .buy-summary {
        grid-template-columns: 1fr;
    }
    .buy-summary {
        padding: 14px;
    }
    .product-detail-section {
        padding: 24px 14px 32px;
    }
    .modal-product-head,
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .modal-price-box {
        text-align: left;
    }
    .product-detail-box {
        min-height: 220px;
        max-height: 360px;
    }
    .order-fields,
    .order-submit-row,
    .code-row,
    .inline-panel,
    .inline-fields {
        grid-template-columns: 1fr;
    }
    .callback-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .payment-guide-grid,
    .backup-command-card,
    .ops-metrics,
    .launch-step-grid,
    .payment-acceptance-grid,
    .operation-tip-grid,
    .batch-card-grid,
    .reconcile-risk-grid,
    .batch-action-form,
    .finance-trace-grid,
    .finance-anomaly-item {
        grid-template-columns: 1fr;
    }
    .filter-bar input,
    .filter-bar select {
        width: 100%;
    }
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 720px) {
    .public-body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .public-page {
        width: min(100% - 20px, 520px);
        margin-top: 10px;
        margin-bottom: 18px;
    }

    .store-theme-shell {
        width: 100%;
    }

    .refined-store-hero {
        min-height: auto;
        padding: 14px 14px;
        border-radius: 16px;
    }

    .refined-store-hero::before {
        width: 220px;
        height: 220px;
        right: -90px;
        top: -90px;
    }

    .store-brand {
        gap: 12px;
        align-items: center;
    }

    .refined-store-hero .store-brand img {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }

    .store-eyebrow {
        font-size: 10px;
    }

    .store-brand h1 {
        margin-bottom: 3px;
        font-size: 21px;
        letter-spacing: 0;
    }

    .store-brand p {
        font-size: 12.5px;
        line-height: 1.45;
    }

    .store-actions {
        display: none;
    }

    .mobile-store-tools {
        position: absolute;
        right: 12px;
        top: 12px;
        z-index: 2;
        display: inline-flex;
        gap: 8px;
    }

    .category-product-hero .store-brand-block {
        padding-right: 86px;
    }

    .category-product-hero .store-brand {
        align-items: flex-start;
    }

    .category-product-hero .store-brand h1 {
        padding-top: 1px;
        line-height: 1.18;
    }

    .category-product-back {
        width: 38px;
        height: 38px;
        border-radius: 13px;
        font-size: 30px;
    }

    .category-product-return {
        display: none;
    }

    .mobile-store-tools button {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 1px solid rgba(203, 213, 225, .9);
        border-radius: 12px;
        background: rgba(255, 255, 255, .92);
        color: #334155;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
    }

    .mobile-store-tools svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .store-product-tools {
        display: none !important;
    }

    .mobile-tool-sheet {
        position: fixed;
        inset: 0;
        z-index: 160;
        display: none;
        align-items: flex-start;
        justify-content: center;
        padding: 96px 14px 14px;
        background: rgba(15, 23, 42, .18);
    }

    .mobile-tool-sheet.show {
        display: flex;
    }

    .mobile-tool-panel {
        width: min(100%, 430px);
        display: grid;
        gap: 12px;
        padding: 14px;
        border: 1px solid rgba(226, 232, 240, .95);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 18px 42px rgba(15, 23, 42, .2);
    }

    .mobile-tool-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-tool-head strong {
        font-size: 16px;
    }

    .mobile-tool-head button {
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #f1f5f9;
        color: #475569;
        font-size: 20px;
    }

    .mobile-search-panel input {
        width: 100%;
        min-height: 42px;
        border-radius: 12px;
        font-size: 15px;
    }

    .mobile-sort-options {
        display: grid;
        gap: 8px;
    }

    .mobile-sort-options button {
        min-height: 42px;
        padding: 0 14px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #f8fafc;
        color: var(--text);
        font-weight: 800;
        text-align: left;
    }

    .mobile-sort-options button.active {
        border-color: var(--primary);
        background: #eff6ff;
        color: var(--primary);
    }

    .mobile-recommend-toggle {
        min-height: 42px;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 12px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
        font-weight: 800;
    }

    .refined-ticker {
        min-height: 36px;
        gap: 6px;
        padding: 6px 8px;
        border-radius: 10px;
        margin: 8px 0 10px;
    }

    .refined-ticker span {
        min-width: 40px;
        padding: 5px 8px;
        border-radius: 8px;
        font-size: 12px;
    }

    .store-product-head {
        gap: 8px;
        margin: 10px 0 8px;
    }

    .store-product-head h2 {
        font-size: 19px;
    }

    .store-product-head p {
        font-size: 12px;
    }

    .category-tabs {
        gap: 8px;
        margin: 0 -2px;
    }

    .tab {
        min-height: 36px;
        padding: 0 13px;
        border-width: 1px;
        border-radius: 999px;
        font-size: 13px;
    }

    .tab:hover,
    .tab.active {
        transform: none;
    }

    .store-product-tools {
        gap: 8px;
        margin: 8px 0 10px;
        padding: 8px;
        border-radius: 12px;
    }

    .store-search-box {
        flex: 0 0 auto;
        width: 100%;
    }

    .store-product-tools select,
    .store-recommend-filter {
        flex: 0 0 auto;
        width: 100%;
    }

    .store-search-box input,
    .store-product-tools select {
        min-height: 36px;
        font-size: 14px;
    }

    .store-recommend-filter {
        min-height: 36px;
        justify-content: center;
        border-radius: 10px;
        font-size: 13px;
    }

    .commerce-grid {
        gap: 10px;
    }

    .commerce-card {
        border-radius: 14px;
    }

    .card-cover {
        aspect-ratio: 16 / 10;
        padding: 10px;
    }

    .card-body {
        gap: 8px;
        padding: 11px 12px 12px;
    }

    .card-body h2 {
        font-size: 15px;
    }

    .card-body p {
        min-height: 0;
        font-size: 12.5px;
    }

    .card-tags span {
        min-height: 20px;
        padding: 0 7px;
        font-size: 10.5px;
    }

    .product-meta strong,
    .price {
        font-size: 20px;
    }

    .commerce-card button {
        min-height: 38px;
        border-radius: 10px;
        font-size: 13px;
    }

    .product-modal-panel,
    .user-notice-panel,
    .contact-panel,
    .station-popup-panel {
        margin-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    .contact-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .contact-panel {
        width: 100%;
        max-height: calc(100vh - 92px - env(safe-area-inset-bottom, 0px));
        padding: 16px 12px;
        border-radius: 20px 20px 16px 16px;
    }

    .contact-panel .modal-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .contact-head {
        margin-bottom: 14px;
        padding-right: 38px;
        text-align: left;
    }

    .contact-head h2 {
        font-size: 24px;
    }

    .contact-head p {
        margin-top: 4px;
        font-size: 13px;
    }

    .contact-card-grid {
        gap: 10px;
    }

    .contact-card {
        gap: 10px;
        padding: 12px;
        border-radius: 16px;
    }

    .contact-card-title {
        gap: 10px;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .contact-card h3 {
        font-size: 19px;
    }

    .contact-card p {
        font-size: 13px;
    }

    .contact-qr-box {
        width: min(148px, 66vw);
        padding: 7px;
        border-radius: 14px;
    }

    .contact-copy-row {
        gap: 6px;
        padding: 10px 12px;
        border-radius: 12px;
        font-size: 13px;
    }

    .contact-copy-row button {
        min-height: 32px;
        padding: 0 12px;
    }

    .contact-tips {
        margin-top: 10px;
        padding: 10px 12px;
        border-left-width: 3px;
        border-radius: 14px;
        font-size: 12px;
    }

    .account-console {
        gap: 12px;
    }

    .account-side {
        border-radius: 18px;
    }

    .account-profile-card {
        grid-template-columns: 52px minmax(0, 1fr);
        justify-items: start;
        align-items: center;
        gap: 12px;
        padding: 16px;
        text-align: left;
    }

    .account-profile-card::before {
        display: none;
    }

    .account-profile-card img {
        width: 52px;
        height: 52px;
        border-width: 2px;
    }

    .account-profile-card h1 {
        font-size: 18px;
    }

    .account-profile-card p {
        font-size: 12px;
    }

    .account-profile-card span {
        grid-column: 1 / -1;
        width: 100%;
        padding: 7px 10px;
        border-radius: 12px;
        text-align: center;
        font-size: 12px;
    }

    .account-tabs {
        display: flex;
        gap: 8px;
        padding: 10px 12px 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .account-tabs a {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 0 14px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: #fff;
        font-size: 13px;
        scroll-snap-align: start;
    }

    .account-tabs a::before {
        display: none;
    }

    .account-tabs a:hover,
    .account-tabs a.active {
        padding-left: 14px;
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
        box-shadow: 0 8px 16px rgba(37, 99, 235, .18);
    }

    .account-main {
        gap: 12px;
    }

    .account-hero {
        padding: 16px;
        border-radius: 18px;
    }

    .account-hero h1 {
        margin: 4px 0;
        font-size: 20px;
    }

    .account-hero p {
        font-size: 13px;
        line-height: 1.5;
    }

    .account-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .account-metrics > div {
        min-height: 84px;
        padding: 14px;
        border-radius: 16px;
    }

    .account-metrics span {
        font-size: 12px;
    }

    .account-metrics strong {
        margin-top: 6px;
        font-size: 24px;
    }

    .account-content-card {
        min-height: 0;
        border-radius: 18px;
    }

    .account-tab-panel {
        padding: 16px 14px 22px;
    }

    .account-tab-panel .section-title {
        gap: 10px;
        align-items: flex-start;
        flex-direction: column;
    }

    .account-tab-panel .section-title h2 {
        font-size: 19px;
    }

    .account-tab-panel .section-title p {
        font-size: 13px;
    }

    .account-order-filter,
    .account-recharge-form {
        gap: 8px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .public-rule-footer {
        margin-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        padding: 10px 12px;
        gap: 8px 12px;
        font-size: 12px;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        z-index: 45;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 3px;
        min-height: 64px;
        padding: 7px 8px;
        border: 1px solid rgba(203, 213, 225, .85);
        border-radius: 20px;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 18px 42px rgba(15, 23, 42, .18), inset 0 1px 0 rgba(255, 255, 255, .8);
        backdrop-filter: blur(16px);
    }

    .mobile-bottom-nav.is-guest {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        position: relative;
        min-width: 0;
        min-height: 50px;
        display: grid;
        place-items: center;
        gap: 3px;
        padding: 5px 2px;
        border: 0;
        border-radius: 15px;
        background: transparent;
        color: #64748b;
        font: inherit;
        font-size: 11px;
        font-weight: 800;
        line-height: 1.1;
        text-decoration: none;
        cursor: pointer;
    }

    .mobile-bottom-nav svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-nav .active,
    .mobile-bottom-nav a:hover,
    .mobile-bottom-nav button:hover {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
        box-shadow: 0 8px 18px rgba(37, 99, 235, .25);
    }

    .mobile-bottom-nav em {
        position: absolute;
        top: 3px;
        right: 11px;
        min-width: 18px;
        height: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
        border: 2px solid #fff;
        border-radius: 999px;
        background: #ef4444;
        color: #fff;
        font-size: 10px;
        font-style: normal;
        font-weight: 900;
        line-height: 1;
        box-shadow: 0 8px 14px rgba(239, 68, 68, .24);
    }
}

/* =========================================================================
   移动端体验增强（2026-06-15）
   仅在 <=720px 生效，且全部限定在 .public-body（前台用户页），不影响电脑端与后台。
   ========================================================================= */
@media (max-width: 720px) {
    /* ---- 前台数据表格 → 卡片化：告别横向滚动 ---- */
    .public-body .account-tab-panel .table-scroll,
    .public-body .panel-main .table-scroll {
        overflow: visible;
    }

    .public-body .account-tab-panel table,
    .public-body .panel-main table {
        display: block;
        width: 100%;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        white-space: normal;
    }

    .public-body .account-tab-panel thead,
    .public-body .panel-main thead {
        display: none;
    }

    .public-body .account-tab-panel tbody,
    .public-body .panel-main tbody {
        display: grid;
        gap: 10px;
    }

    .public-body .account-tab-panel tr,
    .public-body .panel-main tbody tr {
        display: grid;
        gap: 7px;
        padding: 13px 15px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
        transition: none;
    }

    .public-body .account-tab-panel tbody tr:hover,
    .public-body .panel-main tbody tr:hover {
        background: #fff;
    }

    .public-body .account-tab-panel td,
    .public-body .panel-main tbody td {
        display: flex;
        gap: 14px;
        align-items: center;
        justify-content: space-between;
        padding: 0;
        border: 0;
        white-space: normal;
        word-break: break-word;
        text-align: right;
        font-size: 13.5px;
        line-height: 1.5;
    }

    .public-body .account-tab-panel td::before,
    .public-body .panel-main tbody td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--muted);
        font-size: 12.5px;
        font-weight: 700;
        text-align: left;
    }

    /* 首列（订单号/工单号/时间）作为卡片标题，强调显示 */
    .public-body .account-tab-panel td:first-child,
    .public-body .panel-main tbody td:first-child {
        margin-bottom: 1px;
        padding-bottom: 8px;
        border-bottom: 1px dashed var(--line);
        font-weight: 800;
        color: var(--text);
    }

    /* 操作列：让“查看”按钮/链接更像按钮、易点 */
    .public-body .account-tab-panel td:last-child a,
    .public-body .panel-main tbody td:last-child a,
    .public-body .account-tab-panel td:last-child .button {
        display: inline-flex;
        align-items: center;
        min-height: 34px;
        padding: 0 16px;
        border-radius: 9px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
        font-weight: 700;
        text-decoration: none;
    }

    /* 占位/空状态行（colspan）：居中、不显示标签 */
    .public-body .account-tab-panel td[colspan],
    .public-body .panel-main tbody td[colspan] {
        justify-content: center;
        color: var(--muted);
        text-align: center;
    }

    .public-body .account-tab-panel td[colspan]::before,
    .public-body .panel-main tbody td[colspan]::before {
        display: none;
    }

    /* 我的订单独立页（.panel-main）头部按钮排布更紧凑 */
    .public-body .panel-main .detail-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .public-body .panel-main .detail-actions .button {
        width: 100%;
    }

    /* ---- 商品购买弹窗：结算条吸底，下单按钮始终可见 ---- */
    .product-modal-content .buy-summary {
        position: sticky;
        bottom: 0;
        z-index: 4;
        margin: 16px -14px -22px;
        padding: 14px;
        border: 0;
        border-top: 1px solid var(--line);
        border-radius: 16px 16px 0 0;
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(10px);
        box-shadow: 0 -10px 24px rgba(15, 23, 42, .1);
    }

    .product-modal-content .buy-summary button {
        min-height: 48px;
        font-size: 16px;
    }

    .product-modal-content .buy-summary strong {
        font-size: 22px;
    }

    /* ---- 订单结果 / 扫码支付 / 充值返回 等结果页 ---- */
    .order-result {
        margin-bottom: 18px;
        padding: 22px 18px;
        text-align: center;
    }

    .order-result h1 {
        font-size: 22px;
    }

    .order-result .detail-list {
        grid-template-columns: 92px 1fr;
        gap: 4px 12px;
        padding: 14px;
        text-align: left;
        font-size: 14px;
    }

    .order-result .detail-actions {
        display: grid;
        gap: 10px;
        margin-top: 16px;
    }

    .order-result .detail-actions .button {
        width: 100%;
    }

    .order-result .qrbox {
        display: flex;
        justify-content: center;
        width: 100%;
        margin: 14px 0;
    }

    .order-result .qrbox img {
        width: min(220px, 62vw);
        height: auto;
    }

    /* 订单详情页操作按钮整行铺满，触控更友好 */
    .order-action-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .order-action-row .button {
        width: 100%;
        text-align: center;
    }

    .delivery-card pre {
        font-size: 13.5px;
        word-break: break-all;
        white-space: pre-wrap;
    }

    /* ---- 直接结算页（product.php / .checkout）---- */
    .checkout {
        display: grid;
        gap: 14px;
    }

    .checkout .form {
        margin: 0;
    }

    /* ---- 登录 / 注册：卡片更贴合手机，输入框更大 ---- */
    .customer-auth-box {
        margin: 14px auto 8px;
        padding: 22px 18px;
        border-radius: 18px;
    }

    .customer-auth-box > h1 {
        font-size: 24px;
    }

    .customer-auth-box .auth-tabs {
        width: 100%;
    }

    .customer-auth-box .auth-tabs button {
        flex: 1;
    }

    .customer-auth-box input,
    .customer-auth-box select {
        min-height: 46px;
        font-size: 15px;
    }

    .customer-auth-box .form > button {
        min-height: 48px;
        font-size: 16px;
    }

    /* ---- 商品列表：手机改双列，更像商城，单屏看到更多 ---- */
    .public-body .commerce-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .public-body .card-cover {
        aspect-ratio: 1 / 1;
        padding: 8px;
    }

    .public-body .card-body {
        padding: 10px 11px 12px;
    }
}

/* 超窄屏（小屏手机）单列商品，避免内容过挤 */
@media (max-width: 360px) {
    .public-body .commerce-grid {
        grid-template-columns: 1fr;
    }

    .public-body .card-cover {
        aspect-ratio: 16 / 10;
    }
}

/* =========================================================================
   移动端二次修复（2026-06-15）
   1) 个人中心：让“消息/订单/资金…”等功能像独立页面，去掉常驻概览的夹带感
   2) 首页商品工具区：搜索/排序/筛选更紧凑，符合手机习惯
   ========================================================================= */
@media (max-width: 720px) {
    /* ---- 个人中心：功能页聚焦 ---- */
    /* 手机端隐藏冗长的欢迎语 hero（含重复的“继续购买”，底部导航已有首页入口）*/
    .public-body .account-hero {
        display: none;
    }

    /* 账户概览（余额/订单/消费/待支付）仅在“订单/我的”主视图出现；
       进入消息、消费、资金、工单、资料、安全等具体功能页时不再夹带 */
    .public-body .account-main:not([data-active-tab="orders"]) .account-metrics {
        display: none;
    }

    /* 当前功能面板单独成页，去掉进入动画造成的“多页叠加”观感 */
    .public-body .account-tab-panel {
        animation: none;
    }

    /* 顶部 Tab 切换条更贴近当前页：让选中项更明显，便于辨认“我在哪一页” */
    .public-body .account-tabs a.active {
        position: relative;
    }

    /* ---- 首页商品工具区：紧凑两行布局 ---- */
    /* 第一行：搜索框整行；第二行：排序下拉 + 只看推荐 并排 */
    .public-body .store-product-tools {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
        align-items: center;
    }

    .public-body .store-search-box {
        grid-column: 1 / -1;
        width: auto;
    }

    .public-body .store-product-tools select {
        flex: none;
        width: 100%;
        margin: 0;
    }

    .public-body .store-recommend-filter {
        flex: none;
        width: auto;
        min-height: 36px;
        padding: 0 11px;
        white-space: nowrap;
    }

    /* 商品标题与工具区/列表之间收紧，让首屏更快看到商品 */
    .public-body .store-product-head {
        margin: 10px 0 7px;
    }

    .public-body .store-product-tools {
        margin: 8px 0 9px;
    }

    .public-body .store-product-tools {
        display: none !important;
    }

    .public-body .banner-strip {
        margin-bottom: 8px;
    }
}

/* =========================================================================
   移动端我的页面：会员首页仪表盘
   ========================================================================= */
@media (max-width: 720px) {
    body:has(.mobile-account-home) .public-topbar {
        display: none;
    }

    .public-body .mobile-account-home {
        display: grid;
        gap: 12px;
        width: min(100%, 520px);
        margin: -10px auto 12px;
    }

    .public-body:not(.account-detail-open) .mobile-account-home + .account-console {
        display: none;
    }

    .public-body.account-detail-open .mobile-account-home {
        display: none;
    }

    .public-body .mobile-member-hero {
        position: relative;
        display: grid;
        grid-template-columns: 78px minmax(0, 1fr) 42px;
        gap: 14px;
        align-items: center;
        min-height: 150px;
        padding: 22px 18px;
        border-radius: 0 0 22px 22px;
        background: linear-gradient(135deg, #334155 0%, #233044 100%);
        color: #fff;
        box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
        overflow: hidden;
    }

    .public-body .mobile-member-hero::after {
        content: '';
        position: absolute;
        right: -38px;
        top: -44px;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .08);
    }

    .public-body .mobile-member-hero img {
        width: 78px;
        height: 78px;
        object-fit: cover;
        border: 4px solid rgba(255, 255, 255, .9);
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .2);
        position: relative;
        z-index: 1;
    }

    .public-body .mobile-member-hero h1 {
        margin: 0 0 8px;
        font-size: 24px;
        line-height: 1.2;
        color: #fff;
    }

    .public-body .mobile-member-hero a {
        display: inline-flex;
        margin-top: 10px;
        color: rgba(255, 255, 255, .92);
        font-size: 13px;
        font-weight: 800;
        text-decoration: none;
    }

    .public-body .mobile-member-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .public-body .mobile-member-badges span,
    .public-body .mobile-member-badges em {
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        padding: 0 12px;
        border-radius: 999px;
        font-size: 12px;
        font-style: normal;
        font-weight: 900;
    }

    .public-body .mobile-member-badges span {
        background: #facc15;
        color: #1f2937;
    }

    .public-body .mobile-member-badges em {
        background: rgba(255, 255, 255, .16);
        color: #fff;
    }

    .public-body .mobile-member-settings {
        position: relative;
        z-index: 1;
        width: 42px;
        height: 42px;
        display: grid !important;
        place-items: center;
        margin: 0 !important;
        border-radius: 50%;
        background: rgba(255, 255, 255, .14);
        color: #fff;
    }

    .public-body .mobile-member-settings svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .public-body .mobile-member-level,
    .public-body .mobile-member-stats,
    .public-body .mobile-account-card,
    .public-body .mobile-logout-card {
        margin: 0 10px;
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    }

    .public-body .mobile-member-level {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px;
        background: linear-gradient(135deg, #f8e9b6 0%, #f5dda0 100%);
    }

    .public-body .mobile-member-level strong {
        color: #7c5b19;
        font-size: 18px;
        font-weight: 900;
    }

    .public-body .mobile-member-level a {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        padding: 0 18px;
        border-radius: 999px;
        background: rgba(124, 91, 25, .12);
        color: #7c5b19;
        font-size: 13px;
        font-weight: 900;
        text-decoration: none;
    }

    .public-body .mobile-member-stats {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 18px 10px;
        text-align: center;
    }

    .public-body .mobile-member-stats strong {
        display: block;
        color: #111827;
        font-size: 17px;
        line-height: 1.2;
        word-break: break-all;
    }

    .public-body .mobile-member-stats span {
        display: block;
        margin-top: 6px;
        color: #8a94a6;
        font-size: 12px;
        font-weight: 800;
    }

    .public-body .mobile-account-card {
        padding: 18px 14px 16px;
    }

    .public-body .mobile-card-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
    }

    .public-body .mobile-card-title h2 {
        margin: 0;
        color: #111827;
        font-size: 19px;
    }

    .public-body .mobile-card-title a {
        color: #8a94a6;
        font-size: 13px;
        font-weight: 900;
        text-decoration: none;
    }

    .public-body .mobile-quick-grid {
        display: grid;
        gap: 12px 8px;
    }

    .public-body .mobile-quick-grid.five {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .public-body .mobile-quick-grid.four {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .public-body .mobile-quick-grid a {
        min-width: 0;
        display: grid;
        justify-items: center;
        gap: 8px;
        color: #4b5563;
        font-size: 12px;
        font-weight: 800;
        text-align: center;
        text-decoration: none;
    }

    .public-body .mobile-quick-grid i {
        position: relative;
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: linear-gradient(135deg, #fb8a4b 0%, #f97350 100%);
        color: #fff;
        font-size: 15px;
        font-style: normal;
        font-weight: 900;
        box-shadow: 0 8px 16px rgba(249, 115, 80, .18);
    }

    .public-body .mobile-quick-grid i svg {
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .public-body .mobile-quick-grid i em {
        position: absolute;
        right: -4px;
        top: -6px;
        min-width: 20px;
        height: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
        border: 2px solid #fff;
        border-radius: 999px;
        background: #ef4444;
        color: #fff;
        font-size: 11px;
        font-style: normal;
        font-weight: 900;
        line-height: 1;
        box-shadow: 0 8px 14px rgba(239, 68, 68, .24);
    }

    .public-body .mobile-quick-grid.four a:nth-child(1) i { background: linear-gradient(135deg, #7567df, #5b4bd1); }
    .public-body .mobile-quick-grid.four a:nth-child(2) i { background: linear-gradient(135deg, #eb6bb8, #d9469d); }
    .public-body .mobile-quick-grid.four a:nth-child(3) i { background: linear-gradient(135deg, #60c5f8, #38aeea); }
    .public-body .mobile-quick-grid.four a:nth-child(4) i { background: linear-gradient(135deg, #68e596, #38d878); }
    .public-body .mobile-quick-grid.four a:nth-child(5) i { background: linear-gradient(135deg, #f59e0b, #f97316); }
    .public-body .mobile-quick-grid.four a:nth-child(6) i { background: linear-gradient(135deg, #64748b, #334155); }

    .public-body .mobile-quick-grid b {
        font-weight: 800;
        line-height: 1.2;
    }

    .public-body .mobile-logout-card {
        min-height: 58px;
        display: grid;
        place-items: center;
        color: #ef4444;
        font-weight: 900;
        text-decoration: none;
    }

    .public-body .account-console {
        margin-top: 4px;
    }

    .public-body .account-side,
    .public-body .account-hero,
    .public-body .account-metrics {
        display: none !important;
    }

    .public-body .account-content-card {
        margin: 0 10px;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    }
}

@media (max-width: 720px) {
    .public-body .mobile-category-page {
        width: min(100%, 520px);
        min-height: calc(100vh - 88px - env(safe-area-inset-bottom, 0px));
        margin: -10px auto 0;
        gap: 0;
        overflow: hidden;
        border-radius: 18px;
        background: #f3f4f6;
        box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
    }

    .public-body .mobile-category-head {
        justify-content: center;
        min-height: 66px;
        padding: 12px 16px;
        border-radius: 18px 18px 0 0;
        box-shadow: none;
    }

    .public-body .mobile-category-head a {
        position: absolute;
        left: 18px;
        width: 32px;
        height: 32px;
    }

    .public-body .mobile-category-head h1 {
        font-size: 20px;
    }

    .public-body .mobile-category-head h1 span {
        width: 24px;
        height: 19px;
    }

    .public-body .mobile-category-layout {
        grid-template-columns: 34% minmax(0, 1fr);
        min-height: calc(100vh - 154px - env(safe-area-inset-bottom, 0px));
        border: 0;
        border-radius: 0;
    }

    .public-body .mobile-category-primary {
        max-height: calc(100vh - 154px - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
    }

    .public-body .mobile-category-primary button {
        min-height: 58px;
        gap: 8px;
        padding: 0 10px;
        font-size: 13px;
    }

    .public-body .mobile-category-primary i {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 12px;
    }

    .public-body .mobile-category-detail {
        max-height: calc(100vh - 154px - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        padding: 18px 14px 72px;
    }

    .public-body .mobile-category-card {
        max-width: none;
        padding: 18px 14px;
        border-radius: 16px;
    }

    .public-body .mobile-category-title {
        gap: 10px;
        padding-bottom: 14px;
    }

    .public-body .mobile-category-title i {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .public-body .mobile-category-title h2 {
        font-size: 18px;
    }

    .public-body .mobile-category-title p {
        font-size: 12px;
    }

    .public-body .mobile-category-children {
        gap: 10px;
        padding-top: 14px;
    }

    .public-body .mobile-category-children a {
        gap: 10px;
        padding: 12px;
        border-radius: 12px;
    }

    .public-body .mobile-category-children i {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .public-body .mobile-category-children strong {
        font-size: 15px;
    }

    .public-body .mobile-category-children span {
        font-size: 12px;
    }

    .public-body .mobile-contact-page {
        width: min(100%, 520px);
        min-height: auto;
        margin: -10px auto 0;
        border-radius: 18px 18px 0 0;
        padding-bottom: 16px;
    }

    .public-body:has(.mobile-contact-page) .public-rule-footer {
        display: none;
    }

    .public-body:has(.mobile-account-home) .public-rule-footer,
    .public-body:has(.mobile-category-page) .public-rule-footer {
        display: none;
    }

    .public-body .mobile-contact-nav {
        min-height: 62px;
    }

    .public-body .mobile-contact-nav h1 {
        font-size: 20px;
    }

    .public-body .mobile-contact-hero {
        padding: 20px 16px 24px;
    }

    .public-body .mobile-contact-hero h2 {
        font-size: 26px;
    }

    .public-body .mobile-contact-hero p {
        font-size: 14px;
    }

    .public-body .mobile-contact-list {
        gap: 14px;
        padding: 0 14px 20px;
    }

    .public-body .mobile-contact-card {
        gap: 14px;
        padding: 22px 16px;
        border-radius: 18px;
    }

    .public-body .mobile-contact-title i {
        width: 44px;
        height: 44px;
    }

    .public-body .mobile-contact-title h3 {
        font-size: 20px;
    }

    .public-body .mobile-contact-qr {
        width: min(190px, 70vw);
    }

    .public-body .mobile-contact-copy {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* =========================================================================
   分站「店铺装修」页面美化（2026-06-15）—— 作用域 .station-decorate
   卡片化分区 / 美化文件上传 / 当前值预览 / 预览栏吸附 / 吸底保存条
   ========================================================================= */
.station-decorate .decorate-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 11px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    color: #1e40af;
    font-size: 13.5px;
    font-weight: 600;
}

.station-decorate .decorate-tip svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- 设置区卡片化 + 序号徽标 ---- */
.station-decorate .decorate-form.wide-form {
    max-width: none;
    counter-reset: deco;
    gap: 18px;
}

.station-decorate .decorate-card {
    counter-increment: deco;
    gap: 14px;
    padding: 20px 22px 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: box-shadow .22s ease, border-color .22s ease;
}

.station-decorate .decorate-card:hover {
    border-color: rgba(37, 99, 235, .25);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

.station-decorate .decorate-card .slim-title {
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 2px;
}

.station-decorate .decorate-card .slim-title::before {
    content: counter(deco);
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(37, 99, 235, .25);
}

/* 用序号徽标替代原标题左侧竖条 */
.station-decorate .decorate-card .slim-title > div > h2 {
    padding-left: 0;
}

.station-decorate .decorate-card .slim-title > div > h2::before {
    display: none;
}

/* 标题右侧的状态徽标 / 开关推到最右 */
.station-decorate .decorate-card .slim-title > .status-pill,
.station-decorate .decorate-card .slim-title > .decorate-switch {
    margin-left: auto;
}

.station-decorate .decorate-switch {
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    font-size: 13px;
    white-space: nowrap;
}

/* ---- 字段与标签 ---- */
.station-decorate .decorate-field {
    display: grid;
    gap: 8px;
}

.station-decorate .decorate-field-label {
    color: #344054;
    font-size: 14px;
    font-weight: 800;
}

/* ---- 文件上传组件 ---- */
.station-decorate .decorate-uploader {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1.5px dashed var(--line-dark);
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.station-decorate .decorate-uploader:hover {
    border-color: var(--primary);
    background: #f2f7ff;
}

.station-decorate .decorate-uploader.is-dragover {
    border-color: var(--primary);
    background: #eaf2ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.station-decorate .decorate-uploader input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.station-decorate .decorate-uploader-thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
}

.station-decorate .decorate-uploader-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.station-decorate .decorate-uploader-thumb svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.station-decorate .decorate-uploader-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.station-decorate .decorate-uploader-text b {
    color: var(--text);
    font-size: 14px;
}

.station-decorate .decorate-uploader-text em {
    overflow: hidden;
    color: var(--muted);
    font-size: 12.5px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.station-decorate .decorate-uploader.has-file {
    border-style: solid;
    border-color: var(--success);
    background: #f0fdf4;
}

.station-decorate .decorate-uploader.has-file .decorate-uploader-text em {
    color: var(--success-dark);
    font-weight: 700;
}

.station-decorate .decorate-inline-check {
    margin-top: 2px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ---- 主题色卡：选中打勾 ---- */
.station-decorate .theme-preset-card:has(input:checked) .theme-swatch::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.station-decorate .theme-swatch {
    position: relative;
}

/* ---- 右侧预览栏：吸附 + 分块 ---- */
.station-decorate .decorate-preview {
    position: sticky;
    top: 16px;
    align-self: start;
    display: grid;
    gap: 0;
    padding: 18px;
}

.station-decorate .preview-block + .preview-block {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.station-decorate .preview-block > h2 {
    margin: 0 0 10px;
    font-size: 15px;
}

.station-decorate .preview-empty {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

/* ---- 吸底保存条 ---- */
.station-decorate .decorate-savebar {
    position: sticky;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
    padding: 13px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, .09), 0 8px 24px rgba(15, 23, 42, .06);
    backdrop-filter: blur(10px);
    z-index: 5;
}

.station-decorate .decorate-savebar-hint {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.station-decorate .decorate-save-button {
    min-width: 168px;
}

/* ---- 响应式 ---- */
@media (max-width: 1120px) {
    .station-decorate .decorate-preview {
        position: static;
    }
}

@media (max-width: 720px) {
    .station-decorate .decorate-card {
        padding: 16px;
    }

    .station-decorate .decorate-savebar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        text-align: center;
    }

    .station-decorate .decorate-save-button {
        width: 100%;
    }
}
