/* 后台管理系统 - 公用样式文件 */

:root {
    --primary-color: #18181B; /* 新派高奢黑色 */
    --primary-hover: #09090B; /* 黑色 hover */
    --sidebar-bg: #FFFFFF; /* 侧栏白底 */
    --sidebar-text: #52525B; /* 侧栏文字 */
    --sidebar-text-hover: #18181B; /* 侧栏 hover */
    --header-height: 64px;
    --sidebar-width: 250px;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --bg-color: #F7F5F0; /* 象牙白背景 */
    --gold: #C9A961;
    --gold-bright: #E5C97A;
    --gold-deep: #A88B45;
    --black: #18181B;
    --black-deep: #09090B;
    --ink: #111111;
    --ink-mute: #71717A;
    --line: #EBE9E2;
    --line-soft: #F0EEE8;
    --bg-section: #F7F5F0;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    display: flex;
    min-height: 100vh;
}

/* ========== 侧边栏样式 ========== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-menu {
    padding: 0.5rem 0.6rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-group {
    margin-bottom: 0.55rem;
    padding: 0.15rem 0;
}

.nav-group:last-child {
    margin-bottom: 0;
}

.nav-group-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.35rem 0.4rem 0.3rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.78rem;
    color: #18181B;
    letter-spacing: 0.02em;
    user-select: none;
    font-weight: 700;
    line-height: 1.35;
    background: rgba(24, 24, 27, 0.08);
    border-radius: 6px;
    transition: background 0.12s ease, color 0.12s ease;
}

.nav-group-label:hover {
    background: rgba(24, 24, 27, 0.12);
    color: #09090b;
}

.nav-group-label .nav-group-chev {
    font-size: 0.65rem;
    opacity: 0.5;
    transition: transform 0.18s ease, opacity 0.12s ease;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.nav-group.is-collapsed .nav-group-label .nav-group-chev {
    transform: rotate(-90deg);
    opacity: 0.65;
}

.nav-group-label-trail {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: auto;
}

.sb-group-dyn-badge {
    display: none;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 10px;
    color: #fff;
    background: #ef4444;
    min-width: 18px;
    text-align: center;
    line-height: 1.3;
    font-weight: 600;
}

.nav-group.is-collapsed > .nav-group-label .sb-group-dyn-badge {
    display: inline-block;
}

.sb-group-dyn-badge--progress {
    background: #f59e0b;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.75rem;
    margin: 2px 0;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    border-radius: 6px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}

.nav-item.active {
    background-color: rgba(79, 70, 229, 0.25);
    color: #ffffff;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.nav-item i {
    margin-right: 0.6rem;
    width: 18px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.nav-item:hover i {
    opacity: 0.9;
}

.nav-item.active i {
    opacity: 1;
}

/* ========== 主内容区域 ========== */
.main-content {
    flex: 1 1 auto;
    min-width: 0;
    width: calc(100vw - var(--sidebar-width));
    max-width: calc(100vw - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    box-sizing: border-box;
    padding-top: var(--header-height);
}

/* ========== 顶部导航栏 ========== */
.header {
    height: var(--header-height);
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 90;
    box-sizing: border-box;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    font-size: 0.9rem;
    color: #4b5563;
}

.lang-switch {
    display: flex;
    gap: 2px;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 2px;
    margin-right: 0.5rem;
}

.lang-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    text-decoration: none;
    color: #6b7280;
    border-radius: 4px;
    transition: all 0.15s;
    font-weight: 500;
    line-height: 1.2;
}

.lang-btn:hover {
    color: #374151;
    background: #e5e7eb;
}

.lang-btn.active {
    background: var(--primary-color);
    color: #fff !important;
}

.btn-logout {
    color: var(--danger-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-logout:hover {
    background-color: #fee2e2;
}

/* ========== 页面内容 ========== */
.page-content {
    padding: 2rem;
    flex: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* ========== 卡片样式 ========== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 1.1rem;
    color: #111827;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* ========== 按钮样式 ========== */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

/* 列表操作：拒绝=橙，删除=深红（与移动端 m-card-actions 一致） */
a.action-btn.btn-reject,
button.action-btn.btn-reject {
    background-color: var(--warning-color);
    color: #fff;
    border: none;
}

a.action-btn.btn-delete,
button.action-btn.btn-delete {
    background-color: #991b1b;
    color: #fff;
    border: none;
}

a.action-btn.btn-delete:hover,
button.action-btn.btn-delete:hover {
    background-color: var(--danger-color);
}

/* ========== 表格样式 ========== */
.table-container {
    overflow-x: auto;
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.table-container table thead th {
    background-color: #f9fafb;
    color: #111827 !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    padding: 0.65rem 0.75rem !important;
    line-height: 1.35;
    vertical-align: middle;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.table-container table thead th small {
    color: #4b5563 !important;
    font-size: 0.8125rem !important;
    font-weight: 500;
    line-height: 1.3;
}

/* 列表表头吸顶：容器内纵向+横向滚动，表头 sticky top:0（勿用 viewport 吸顶） */
.table-container.sticky-table-scroll {
    max-height: calc(100vh - var(--sticky-table-offset, 220px));
    overflow: auto;
}

.table-container.sticky-table-scroll table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--line-soft, #f9fafb);
    box-shadow: inset 0 -1px 0 var(--line, #ebe9e2);
}

.table-container.sticky-table-scroll table thead th.cb-sticky-col,
.table-container.sticky-table-scroll table thead th.rr-th-left {
    z-index: 4;
}

/* 客户余额 Tab 组：卡片不裁切，表格区吸顶（上方 Tab/筛选占高，加大 offset） */
.cb-page .card {
    overflow: visible;
}

.cb-page .table-container.sticky-table-scroll {
    --sticky-table-offset: 300px;
}

/* 宽表：横向滚动限制在卡片内，避免撑出右侧视口 */
.wide-table-card {
    max-width: 100%;
    min-width: 0;
}
.wide-table-card .table-container {
    overflow-x: auto !important;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}
.wide-table-card .table-container.sticky-table-scroll {
    overflow: auto !important;
}
.aa-page {
    min-width: 0;
}
.aa-page .wide-table-card {
    overflow: visible;
    min-width: 0;
    max-width: 100%;
}
.aa-page .wide-table-card .table-container.sticky-table-scroll {
    --sticky-table-offset: 380px;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.aa-page .wide-table-card .table-container.sticky-table-scroll table {
    width: max-content;
    min-width: 100%;
}
.aa-page .wide-table-card .table-container.sticky-table-scroll::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}
.aa-page .wide-table-card .table-container.sticky-table-scroll::-webkit-scrollbar-thumb {
    background: #b8bcc4;
    border-radius: 5px;
}
.aa-page .wide-table-card .table-container.sticky-table-scroll::-webkit-scrollbar-track {
    background: #f3f4f6;
}
.wide-table-card .table-container table {
    width: max-content;
    min-width: 100%;
}
.wide-table-card .table-container thead th {
    background-color: #f9fafb;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: #f9fafb;
    padding: 0.65rem 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.35;
    vertical-align: middle;
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

/* ========== 表格对齐工具类 ========== */
/* 使用这些类来统一表头和表体的对齐方式，避免对齐不一致 */
th.text-center,
td.text-center {
    text-align: center;
}

th.text-right,
td.text-right {
    text-align: right;
}

th.text-left,
td.text-left {
    text-align: left;
}

/* 操作列统一样式 */
th.actions-cell,
td.actions-cell {
    text-align: center;
    white-space: nowrap;
}

tr:hover {
    background-color: #f9fafb;
}

/* ========== 表单样式 ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ========== 状态徽章 ========== */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* 状态徽章别名 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-suspended {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-submitted {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-partial {
    background-color: #fef3c7;
    color: #92400e;
}

/* ========== 提示框样式 ========== */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error,
.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ========== 欢迎横幅 ========== */
.welcome-banner {
    background: linear-gradient(135deg, #18181B 0%, #27272A 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.welcome-banner h2 {
    margin: 0 0 0.5rem 0;
}

.welcome-banner p {
    margin: 0;
    opacity: 0.9;
}

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stat-card {
    background: white;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-title {
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.stat-value {
    color: #111827;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-subtitle {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

/* ========== 平台图标样式 ========== */
.platform-icon {
    margin-right: 5px;
}

.fa-facebook {
    color: #1877f2;
}

.fa-google {
    color: #4285f4;
}

/* ========== 工具类 ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

/* ========== 响应式设计 ========== */
/* ========== 筛选折叠按钮（默认隐藏，移动端显示） ========== */
.filter-toggle-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f9fafb;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
    cursor: pointer;
    font-size: 0.85rem;
    color: #374151;
    font-weight: 500;
}

.filter-toggle-btn i.chevron {
    transition: transform 0.2s;
    margin-left: auto;
}

.filter-toggle-btn.open i.chevron {
    transform: rotate(180deg);
}

.filter-toolbar {
    display: flex;
    gap: 1rem 1.25rem;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 1rem 1.25rem 1.1rem;
}

.filter-toolbar .form-group,
.filter-toolbar .filter-group {
    margin-bottom: 0;
    flex: 0 1 auto;
}

.filter-toolbar .form-label,
.filter-toolbar .filter-group > label {
    margin-bottom: 0.35rem;
    display: block;
    font-size: 0.875rem;
}

.filter-section-mobile form > div {
    gap: 1rem 1.25rem;
    padding: 1rem 1.25rem 1.1rem;
}
.filter-section-mobile form .form-group,
.filter-section-mobile form .filter-group {
    min-width: 140px;
    flex: 0 1 auto;
}
.filter-section-mobile form .form-label,
.filter-section-mobile form .filter-group > label {
    margin-bottom: 0.35rem;
    display: block;
}

/* ========== 汉堡菜单按钮 ========== */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: #374151;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.hamburger-btn:hover {
    background: #f3f4f6;
}

/* ========== 侧边栏遮罩层 ========== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9;
}

.sidebar-overlay.show {
    display: block;
}

/* ========== 移动端侧边栏关闭按钮 ========== */
.sidebar-close {
    display: none;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    z-index: 11;
}

.sidebar-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* 移动端卡片列表：默认桌面隐藏 */
.mobile-card-list {
    display: none;
}

@media (max-width: 768px) {
    html {
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .hamburger-btn {
        display: flex;
        align-items: center;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .page-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .card {
        max-width: 100%;
        box-sizing: border-box;
    }

    .table-container {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header {
        left: 0;
        right: 0;
        padding: 0 1rem;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .header input,
    .header select,
    .form-control,
    input.form-control,
    select.form-control,
    textarea.form-control {
        font-size: 16px;
    }

    .header-title {
        font-size: 0.95rem;
    }

    .user-menu {
        gap: 0.5rem;
    }

    .user-info {
        font-size: 0.8rem;
    }

    .btn-logout {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-content {
        padding: 0.75rem;
    }

    .mobile-card-list {
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
        padding: 0.4rem 0.7rem 0.75rem;
        box-sizing: border-box;
    }

    .rr-page.card {
        overflow: visible;
    }

    .desktop-only-table {
        display: none !important;
    }

    .m-card {
        background: #fff;
        border: 2px solid #cbd5e1;
        border-radius: 10px;
        padding: 0.75rem 0.85rem;
        margin-bottom: 0;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
        box-sizing: border-box;
    }

    .m-card.m-card-st-pending {
        border-color: #f59e0b;
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18);
    }

    .m-card.m-card-st-submitted {
        border-color: #3b82f6;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
    }

    .m-card.m-card-st-completed {
        border-color: #10b981;
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.18);
    }

    .m-card.m-card-st-rejected {
        border-color: #ef4444;
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
    }

    .m-card-empty {
        text-align: center;
        color: #9ca3af;
        padding: 2rem 1rem;
    }

    .m-card-head {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem 0.5rem;
        margin-bottom: 0.45rem;
    }

    .m-card-check {
        display: inline-flex;
        align-items: center;
        margin-right: 0.15rem;
    }

    .m-card-check input {
        width: 1rem;
        height: 1rem;
    }

    .m-card-id {
        font-family: ui-monospace, Menlo, Consolas, monospace;
        font-size: 0.8rem;
        color: #6b7280;
        font-weight: 600;
    }

    .m-card-head .status-badge {
        font-size: 0.68rem;
        padding: 2px 8px;
    }

    .m-card-overdue {
        font-size: 0.72rem;
        font-weight: 600;
    }

    .m-card-time {
        margin-left: auto;
        font-size: 0.72rem;
        color: #9ca3af;
    }

    .m-card-customer {
        font-weight: 600;
        font-size: 0.88rem;
        color: #111827;
        margin-bottom: 0.35rem;
    }

    .m-card-account {
        font-size: 0.85rem;
        line-height: 1.45;
        margin-bottom: 0.45rem;
        word-break: break-word;
    }

    .m-card-plat-icon {
        margin-right: 0.35rem;
        flex-shrink: 0;
    }

    .m-card-sub {
        font-size: 0.72rem;
        color: #6b7280;
        margin-top: 0.2rem;
    }

    .m-card-main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        padding: 0.45rem 0;
        border-top: 1px solid #f3f4f6;
        border-bottom: 1px solid #f3f4f6;
        margin-bottom: 0.35rem;
    }

    .m-card-amt {
        font-size: 1.15rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .m-card-amt.pos { color: #10b981; }
    .m-card-amt.neg { color: #ef4444; }
    .m-card-amt.pending { color: #f59e0b; font-size: 0.9rem; }

    .m-card-row {
        display: flex;
        justify-content: space-between;
        gap: 0.5rem;
        font-size: 0.78rem;
        color: #374151;
        margin-bottom: 0.25rem;
    }

    .m-card-lbl {
        color: #9ca3af;
        flex-shrink: 0;
    }

    .m-card-remark {
        align-items: flex-start;
    }

    .m-card-remark span:last-child {
        text-align: right;
        word-break: break-word;
    }

    .m-card-foot {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.72rem;
        color: #6b7280;
        margin-top: 0.35rem;
    }

    .m-card-copy-all {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        width: 100%;
        margin-top: 0.5rem;
        padding: 0.5rem 0.65rem;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        background: #f9fafb;
        color: #374151;
        font-size: 0.8rem;
        font-weight: 600;
        cursor: pointer;
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
    }

    .m-card-copy-all:active {
        background: #f3f4f6;
    }

    .m-card-copy-all i {
        color: #6b7280;
        font-size: 0.85rem;
    }

    .m-card-src {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.5rem;
        height: 1.5rem;
        border-radius: 50%;
        font-size: 0.75rem;
    }

    .m-card-src.tg { background: #e0f2fe; color: #0369a1; }
    .m-card-src.web { background: #f3f4f6; color: #4b5563; }

    .m-card-actions {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
        margin-top: 0.55rem;
        padding-top: 0.55rem;
        border-top: 1px dashed #e5e7eb;
        box-sizing: border-box;
    }

    .m-card-actions .m-action-tile {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        height: 44px;
        max-width: none;
        padding: 0 0.35rem;
        margin: 0;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
        text-decoration: none;
    }

    .m-card-actions .m-action-tile span {
        font-size: 0.8rem;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        white-space: nowrap;
    }

    .m-card-actions .m-action-tile:active {
        opacity: 0.88;
        transform: scale(0.96);
    }

    .m-card-actions .m-action-tile.btn-approve {
        background-color: #10b981;
        color: #fff;
    }

    .m-card-actions .m-action-tile.btn-submit {
        background-color: #2563eb;
        color: #fff;
    }

    .m-card-actions .m-action-tile.btn-reject {
        background-color: #f59e0b;
        color: #fff;
    }

    .m-card-actions .m-action-tile.m-action-delete {
        background-color: #ef4444;
        color: #fff;
    }

    .m-card-actions .m-action-tile.m-action-edit {
        background-color: #6366f1;
        color: #fff;
    }

    .m-card-muted {
        font-size: 0.78rem;
        color: #9ca3af;
    }

    .m-card-summary {
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 0.65rem 0.85rem;
        margin-bottom: 0;
        font-size: 0.8rem;
        line-height: 1.5;
        box-sizing: border-box;
    }

    .m-card-summary-line strong {
        font-weight: 700;
    }

    .m-card-summary-sub {
        font-size: 0.75rem;
        color: #6b7280;
        margin-top: 0.2rem;
    }

    .rr-page .card-header > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }

    .rr-page .card-header .btn {
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
    }

    .rr-page #batchActionBar {
        position: sticky;
        bottom: 0.5rem;
        z-index: 5;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
        margin-left: 0.7rem;
        margin-right: 0.7rem;
        box-sizing: border-box;
    }

    .rr-page .pagination {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
        box-sizing: border-box;
    }

    .rr-page .table-container {
        max-height: none;
        overflow: visible;
    }

    /* 表格移动端适配 */
    th, td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    th {
        font-size: 0.75rem;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 隐藏次要列 */
    .hide-mobile {
        display: none !important;
    }

    /* 操作按钮 - 只显示图标 */
    .btn-view {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-right: 0.15rem;
        font-size: 0.85rem;
        width: 30px;
        height: 30px;
        padding: 0;
        border-radius: 6px;
        background: #f3f4f6;
        color: var(--primary-color);
    }

    .btn-view:hover {
        background: #e0e7ff;
        text-decoration: none;
    }

    /* 隐藏操作按钮文字 */
    .btn-view-text {
        display: none !important;
    }

    /* 表格内操作按钮紧凑 */
    .btn-edit, .btn-delete {
        padding: 0.2rem 0.5rem;
        font-size: 0.75rem;
    }

    .btn-actions {
        gap: 0.25rem !important;
    }

    /* 卡片移动端适配 */
    .card-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .card-title {
        font-size: 0.95rem;
    }

    .card-body {
        padding: 0.75rem 1rem;
    }

    /* 筛选栏 - 可折叠 */
    .filter-section-mobile {
        display: none;
    }

    .filter-section-mobile.show {
        display: block;
    }

    .filter-toggle-btn {
        display: flex !important;
    }

    .filter-form, .filter-form > div {
        flex-direction: column;
    }

    .form-group {
        min-width: auto !important;
        width: 100%;
    }

    .form-control {
        font-size: 0.85rem;
    }

    /* 按钮组 */
    .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    /* 概览卡片2列 */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.6rem 0.75rem;
    }

    .stat-icon {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .stat-title {
        font-size: 0.7rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .stat-subtitle {
        font-size: 0.65rem;
    }

    /* 隐藏占位卡片 */
    .stat-card[style*="visibility: hidden"] {
        display: none;
    }

    /* 平台卡片2列 */
    .platform-cards {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem;
    }

    /* 分页移动端 */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* 快捷筛选紧凑 */
    .saved-filter-bar {
        padding: 0.5rem 0.75rem !important;
    }

    /* 用户菜单隐藏退出文字 */
    .btn-logout-text {
        display: none;
    }

    /* 表单两列改单列 */
    .form-row {
        grid-template-columns: 1fr !important;
    }

    /* 模态框内网格改单列 */
    .modal-body [style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    /* 所有inline grid 2列改单列 */
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* 模态框全宽 */
    .modal-content {
        width: 95% !important;
        max-width: none !important;
        margin: 1rem auto;
    }

    /* 表单容器全宽 */
    .form-container {
        max-width: 100% !important;
    }

    /* 表单操作按钮 */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* 单列卡片适配 */
    .card {
        border-radius: 8px;
    }

    /* radio组换行 */
    .radio-group {
        gap: 0.75rem !important;
    }

    /* 通知面板适配 */
    .notification-panel {
        width: 300px;
        right: -60px;
    }

    /* 平台Tab横向滚动 */
    .platform-tabs {
        padding: 0.5rem 0.75rem 0;
        gap: 0.25rem;
    }

    .platform-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* 语言切换隐藏 */
    .lang-switch {
        display: none;
    }

    /* 内联min-width强制覆盖 */
    [style*="min-width"] {
        min-width: auto !important;
    }

    /* 内联grid强制单列 */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* 内联flex方向 */
    [style*="display: flex"][style*="gap: 1rem"] {
        flex-wrap: wrap;
    }
}

/* ========== 小屏手机适配（375px及以下） ========== */
@media (max-width: 480px) {
    .header {
        padding: 0 0.5rem;
        height: 50px;
    }

    .header-title {
        font-size: 0.85rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-menu {
        gap: 0.25rem;
    }

    .user-info {
        font-size: 0.75rem;
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .notification-bell {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }

    .btn-logout {
        padding: 0.3rem 0.4rem;
        font-size: 0.75rem;
    }

    .page-content {
        padding: 0.5rem;
    }

    .stats-grid {
        gap: 0.4rem;
    }

    .stat-card {
        padding: 0.5rem 0.6rem;
        gap: 0.5rem;
    }

    .stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        border-radius: 7px;
    }

    .stat-title {
        font-size: 0.65rem;
    }

    .stat-value {
        font-size: 0.95rem;
    }

    .notification-panel {
        width: 280px;
        right: -40px;
    }

    .card-header {
        padding: 0.5rem 0.75rem;
    }

    .card-body {
        padding: 0.5rem 0.75rem;
    }

    th, td {
        padding: 0.35rem 0.4rem;
        font-size: 0.75rem;
    }

    .platform-cards {
        gap: 0.4rem !important;
    }
}

/* ========== 平台Tab标签样式 ========== */
.platform-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem 0 1.5rem;
    background: white;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.platform-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.platform-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 8px 8px 0 0;
    margin-bottom: -2px;
    position: relative;
}

.platform-tab:hover {
    color: #111827;
    background-color: #f3f4f6;
}

.platform-tab.active {
    color: #78350f;
    background: linear-gradient(180deg, #faf6eb 0%, #f3e8c4 100%);
    border-bottom-color: #c9a961;
    font-weight: 700;
}

.platform-tab-badge {
    display: inline-flex;
    width: 1.65rem;
    height: 1.65rem;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    font-size: 0.92rem;
    line-height: 1;
    background: #64748b;
    color: #fff;
}

.platform-tab-badge i {
    color: inherit;
    font-size: inherit;
}

.platform-tab-badge--sm {
    width: 1.32rem;
    height: 1.32rem;
    font-size: 0.78rem;
    border-radius: 5px;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.platform-tab-badge[data-platform="all"] {
    background: #64748b;
    color: #fff;
}

.platform-tab-badge[data-platform="facebook"] {
    background: #1877f2;
    color: #fff;
}

.platform-tab-badge[data-platform="google"] {
    background: var(--line-soft, #f0eee8);
    color: inherit;
    border: 1px solid var(--line, #ebe9e2);
    padding: 1px 2px;
}

.platform-tab-badge[data-platform="google"] .platform-icon-google-svg,
.platform-tab-badge[data-platform="google"] .fab.fa-google {
    display: block;
    color: inherit;
}

.platform-icon--google {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 0;
    background: var(--line-soft, #f0eee8);
    border: 1px solid var(--line, #ebe9e2);
    border-radius: 4px;
    padding: 1px 2px;
}

.platform-tab-badge[data-platform="bing"] {
    background: #008373;
    color: #fff;
}

.platform-tab-badge[data-platform="tiktok"] {
    background: #000000;
    color: #ffffff;
}

.platform-tab-badge[data-platform="bigo"] {
    background: #00d4aa;
    color: #fff;
}

.platform-tab-badge[data-platform="general"] {
    background: #6366f1;
    color: #fff;
}

.platform-tab-badge[data-platform="taboola"] {
    background: #0cb5f0;
    color: #fff;
}

.platform-tab-badge[data-platform="ttd"] {
    background: #00acd7;
    color: #fff;
}

.platform-tab-badge[data-platform="outbrain"] {
    background: #ef4823;
    color: #fff;
}

/* Snapchat：黄底黑框官方方形标（fab fa-square-snapchat），勿叠一层纯色底 */
.platform-tab-badge[data-platform="snapchat"] {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
}

.platform-tab-badge[data-platform="snapchat"] .fab.fa-square-snapchat {
    display: block;
    font-size: 1.65rem;
    width: 1.65rem;
    height: 1.65rem;
    line-height: 1.65rem;
}

.platform-tab-badge--sm[data-platform="snapchat"] .fab.fa-square-snapchat,
.platform-tab-badge.platform-tab-badge--sm[data-platform="snapchat"] .fab.fa-square-snapchat {
    font-size: 1.32rem;
    width: 1.32rem;
    height: 1.32rem;
    line-height: 1.32rem;
}

.platform-icon--snapchat {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 0;
}

.platform-icon--snapchat .fab.fa-square-snapchat {
    font-size: inherit;
}

.platform-tab-badge[data-platform="criteo"] {
    background: #f37421;
    color: #fff;
}

.platform-tab-badge[data-platform="mediago"] {
    background: #ff6a00;
    color: #fff;
}

.platform-tab-badge[data-platform="dv360"] {
    background: #1a73e8;
    color: #fff;
}

.platform-tab-badge[data-platform="linkedin"] {
    background: #0a66c2;
    color: #fff;
}

.platform-tab-badge[data-platform="pinterest"] {
    background: #e60023;
    color: #fff;
}

.platform-tab-badge[data-platform="twitter"],
.platform-tab-badge[data-platform="x"] {
    background: #000000;
    color: #ffffff;
}

.platform-tab-badge[data-platform="newsbreak"] {
    background: #d62d2d;
    color: #fff;
}

.platform-tab-badge[data-platform="kwai"] {
    background: #ff6a00;
    color: #fff;
}

.platform-tab-badge[data-platform="reddit"] {
    background: #ff4500;
    color: #fff;
}

.platform-tab-badge[data-platform="yahoo"] {
    background: #720e9e;
    color: #fff;
}

.platform-tab-badge[data-platform="apple"],
.platform-tab-badge[data-platform="apple_ads"] {
    background: #555555;
    color: #fff;
}

.platform-tab.active[data-platform="all"] .platform-tab-badge {
    background: #c9a961;
    color: #fff;
}

/* 无徽章的 Tab（如用户管理角色切换）保留行内图标 */
.platform-tab > i:first-child {
    font-size: 1.05rem;
    color: #6b7280;
}

.platform-tab.active > i:first-child {
    color: #92400e;
}

/* 响应式 */
@media (max-width: 768px) {
    .platform-tabs {
        padding: 0.75rem 1rem 0 1rem;
    }

    .platform-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* ========== 分页样式 ========== */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.per-page-selector label {
    color: #6b7280;
    font-size: 0.875rem;
    white-space: nowrap;
}

.per-page-selector select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    background-color: white;
}

.per-page-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.pagination-buttons {
    display: flex;
    gap: 0.25rem;
}

.pagination-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #374151;
    font-size: 0.875rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.pagination-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn i {
    font-size: 0.75rem;
}

/* 响应式分页 */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-info {
        text-align: center;
    }

    .pagination-controls {
        flex-direction: column;
        width: 100%;
    }

    .per-page-selector {
        justify-content: center;
    }

    .pagination-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ========== 点击复制功能 ========== */
.clickable-copy {
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px dashed transparent;
}

.clickable-copy:hover {
    color: var(--primary-color, var(--primary-color));
    border-bottom-color: var(--primary-color, var(--primary-color));
}

/* 复制成功提示 */
.copy-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.copy-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 模态框样式 ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #4b5563;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 批量操作表格样式 */
.batch-table {
    width: 100%;
    border-collapse: collapse;
}

.batch-table th {
    background-color: #f9fafb;
    padding: 0.65rem 0.75rem;
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.35;
    vertical-align: middle;
}

.batch-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
    color: #374151;
    vertical-align: middle;
}

.batch-table tr:last-child td {
    border-bottom: none;
}

.batch-input-group {
    display: flex;
    align-items: center;
}

.batch-currency {
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-right: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px 0 0 6px;
    color: #6b7280;
    font-size: 0.875rem;
}

.batch-input {
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    border-radius: 0 6px 6px 0;
    width: 100%;
    font-size: 0.875rem;
}

.batch-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.batch-input:disabled {
    background-color: #f9fafb;
    cursor: not-allowed;
}

.batch-remove-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.15s;
}
.batch-remove-btn:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

/* Added for pending event counts */
.badge-count {
    background-color: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    line-height: 1;
}

/* ========== 多选下拉框样式 ========== */
.multi-select-container {
    position: relative;
    width: 100%;
}

.multi-select-display {
    cursor: pointer !important;
    user-select: none;
}

.multi-select-dropdown {
    position: fixed;
    z-index: 10000;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.multi-select-search {
    padding: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.multi-select-search-input {
    width: 100%;
    padding: 0.375rem 0.5rem !important;
    font-size: 0.875rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
}

.multi-select-search-input:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1) !important;
}

.multi-select-options {
    max-height: 250px;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.multi-select-option {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s;
    user-select: none;
    margin: 0;
}

.multi-select-option:hover {
    background-color: #f3f4f6;
}

.multi-select-option input[type="checkbox"] {
    margin: 0 0.5rem 0 0;
    cursor: pointer;
}

.multi-select-option .option-text {
    flex: 1;
    font-size: 0.9rem;
}

.multi-select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

/* 滚动条美化 */
.multi-select-options::-webkit-scrollbar {
    width: 6px;
}

.multi-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.multi-select-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.multi-select-options::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ========== 通知铃铛样式 ========== */
.notification-wrapper {
    position: relative;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    color: #6b7280;
    font-size: 1.1rem;
}

.notification-bell:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 0px;
    background-color: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 4px;
    pointer-events: none;
}

/* 铃铛摇摆动画 */
.notification-bell.has-new i {
    animation: bellShake 0.8s ease-in-out;
}

.header-settings-gear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    text-decoration: none;
    color: #6b7280;
    font-size: 1.05rem;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
}

.header-settings-gear:hover {
    background-color: #f3f4f6;
    color: var(--gold, #C9A961);
}

.header-settings-wrap {
    position: relative;
    flex-shrink: 0;
}

.header-settings-wrap.is-open .header-settings-gear {
    background-color: #f3f4f6;
    color: var(--gold, #C9A961);
}

.header-settings-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    padding: 0.45rem 0;
    z-index: 1200;
}

.header-settings-wrap.is-open .header-settings-dropdown {
    display: block;
}

.header-settings-group + .header-settings-group {
    border-top: 1px solid #f3f4f6;
    margin-top: 0.25rem;
    padding-top: 0.25rem;
}

.header-settings-group-label {
    padding: 0.35rem 0.9rem 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.header-settings-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.86rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.header-settings-item i {
    width: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.82rem;
}

.header-settings-item:hover {
    background: #f9fafb;
    color: var(--gold-deep, #A88B45);
}

.header-settings-item:hover i {
    color: var(--gold, #C9A961);
}

@keyframes bellShake {
    0% { transform: rotate(0); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(9deg); }
    60% { transform: rotate(-6deg); }
    75% { transform: rotate(3deg); }
    100% { transform: rotate(0); }
}

/* 通知下拉面板 */
.notification-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 460px;
    max-height: 440px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1200;
    overflow: hidden;
}

.notification-panel.show {
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.2s ease-out;
}

.notification-panel-header {
    padding: 0.85rem 1.1rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: 0.5rem;
}

.notification-panel-header > span:first-child {
    white-space: nowrap;
    flex-shrink: 0;
}

.notification-panel-counts {
    display: flex;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 400;
    flex-wrap: nowrap;
}

.notification-panel-counts .notification-count-tag {
    white-space: nowrap;
}

.notification-count-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
}
.notification-count-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    text-decoration: none;
}

.notification-count-tag.account {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.notification-count-tag.recharge {
    background-color: #d1fae5;
    color: #047857;
}

.notification-count-tag.clear {
    background-color: #fed7aa;
    color: #c2410c;
}

.notification-count-tag.refund {
    background-color: #fecaca;
    color: #b91c1c;
}

.notification-count-tag.bind {
    background-color: #fef3c7;
    color: #b45309;
}

.notification-count-tag.payment {
    background-color: #e0e7ff;
    color: var(--primary-hover);
}

.notification-panel-body {
    overflow-y: auto;
    flex: 1;
    max-height: 360px;
}

.notification-panel-body::-webkit-scrollbar {
    width: 6px;
}

.notification-panel-body::-webkit-scrollbar-track {
    background: #f9fafb;
}

.notification-panel-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.15s;
    text-decoration: none;
    color: inherit;
    gap: 0.75rem;
}

.notification-item:hover {
    background-color: #f9fafb;
}

.notification-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-item-icon.account {
    background-color: #dbeafe;
    color: #2563eb;
}

.notification-item-icon.recharge {
    background-color: #d1fae5;
    color: #059669;
}

.notification-item-icon.recharge_clear {
    background-color: #fed7aa;
    color: #c2410c;
}

.notification-item-icon.recharge_refund {
    background-color: #fecaca;
    color: #b91c1c;
}

.notification-item-icon.bind {
    background-color: #fef3c7;
    color: #d97706;
}

.notification-item-icon.payment {
    background-color: #e0e7ff;
    color: var(--primary-hover);
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 2px;
}

.notification-item-desc {
    font-size: 0.78rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item-time {
    font-size: 0.72rem;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 3px;
}

.notification-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
}

.notification-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #d1d5db;
}

/* ========== 客户通知样式 ========== */
.customer-notification-wrapper {
    position: relative;
}

.customer-notification-item {
    display: flex;
    align-items: flex-start;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.15s;
    gap: 0.75rem;
}

.customer-notification-item:hover {
    background-color: #f9fafb;
}

.customer-notification-item.unread {
    background-color: #eff6ff;
}

.customer-notification-item.unread:hover {
    background-color: #dbeafe;
}

.customer-notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.customer-notification-item.unread .customer-notification-dot {
    background-color: #3b82f6;
}

.customer-notification-item.read .customer-notification-dot {
    background-color: #d1d5db;
}

.customer-notification-content {
    flex: 1;
    min-width: 0;
}

.customer-notification-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-notification-item.read .customer-notification-title {
    color: #6b7280;
    font-weight: 400;
}

.customer-notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
}
/* ============================================ */
/* === 方案 C · 新派高奢黑金 · 精致化覆写 === */
/* ============================================ */

/* 字体调整 */
body, button, input, select, textarea {
    font-family: 'Inter', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

/* 整体背景 */
body {
    background: var(--bg-section) !important;
    color: var(--ink) !important;
}

/* 侧边栏 - 白底 + 金色激活 */
.sidebar {
    background: #FFFFFF !important;
    border-right: 1px solid var(--line) !important;
    color: var(--ink-mute) !important;
}

.sidebar .logo,
.sidebar h1,
.sidebar h2 {
    color: var(--ink) !important;
    font-family: 'Inter Tight', 'Inter', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

.sidebar .nav-item,
.sidebar .menu-item,
.sidebar a {
    color: var(--ink-mute) !important;
    transition: all 0.12s !important;
    position: relative;
}

.sidebar .nav-item:hover,
.sidebar .menu-item:hover,
.sidebar a:hover {
    background: var(--bg-section) !important;
    color: var(--ink) !important;
}

.sidebar .nav-item.active,
.sidebar .menu-item.active,
.sidebar a.active,
.sidebar .nav-item.current,
.sidebar a.current {
    background: var(--gold) !important;
    color: var(--black) !important;
    font-weight: 600 !important;
}

.sidebar .nav-item.active i,
.sidebar .menu-item.active i,
.sidebar a.active i {
    color: var(--black-deep) !important;
    opacity: 1 !important;
}

.sidebar .nav-item.active::before,
.sidebar .menu-item.active::before,
.sidebar a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--black);
    border-radius: 0 2px 2px 0;
}

.sidebar .nav-group-label {
    color: var(--ink) !important;
    background: rgba(24, 24, 27, 0.08) !important;
    font-weight: 700 !important;
}

.sidebar .nav-group-label:hover {
    background: rgba(24, 24, 27, 0.12) !important;
    color: var(--ink) !important;
}

/* 顶部 Header */
.header {
    background: #FFFFFF !important;
    border-bottom: 1px solid var(--line) !important;
    color: var(--ink) !important;
    box-shadow: none !important;
}

.header-title {
    color: var(--ink) !important;
    font-family: 'Inter Tight', 'Inter', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
}

/* 主内容区 */
.main-content {
    background: var(--bg-section) !important;
}

/* 卡片 - 干净阴影 */
.card,
.stat-card {
    background: #FFFFFF !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
    transition: all 0.2s !important;
}

.card:hover {
    border-color: var(--ink-mute) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
}

.card-header {
    border-bottom: 1px solid var(--line-soft) !important;
    background: transparent !important;
}

.card-title {
    font-family: 'Inter Tight', 'Inter', sans-serif !important;
    font-weight: 700 !important;
    color: var(--ink) !important;
    letter-spacing: -0.015em !important;
}

/* 按钮 */
.btn {
    border-radius: 8px !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em !important;
    transition: all 0.15s !important;
    border: 1px solid transparent !important;
}

.btn-primary {
    background: var(--black) !important;
    color: #FFFFFF !important;
    border-color: var(--black) !important;
}

.btn-primary:hover {
    background: var(--black-deep) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #FFFFFF !important;
    border-color: var(--line) !important;
    color: var(--ink) !important;
}

.btn-secondary:hover {
    border-color: var(--ink) !important;
    background: var(--bg-section) !important;
}

.btn-success {
    background: var(--gold) !important;
    color: var(--black) !important;
    border-color: var(--gold) !important;
    font-weight: 700 !important;
}

.btn-success:hover {
    background: var(--gold-bright) !important;
}

/* 表格 */
.table th, table th {
    background: var(--bg-section) !important;
    color: #111827 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 0.65rem 0.75rem !important;
    line-height: 1.35 !important;
    vertical-align: middle !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid var(--line) !important;
}

.table td, table td {
    border-bottom: 1px solid var(--line-soft) !important;
}

.table tbody tr:hover, table tbody tr:hover {
    background: var(--bg-section) !important;
}

/* 徽章 */
.badge {
    border-radius: 6px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
}

.badge-primary {
    background: rgba(201, 169, 97, 0.12) !important;
    color: var(--gold-deep) !important;
}

.badge-success {
    background: #D1FAE5 !important;
    color: #065F46 !important;
}

.badge-warning {
    background: #FEF3C7 !important;
    color: #92400E !important;
}

.badge-danger {
    background: #FEE2E2 !important;
    color: #991B1B !important;
}

.badge-info {
    background: var(--bg-section) !important;
    color: var(--ink) !important;
}

/* 表单输入 */
.form-control, input[type="text"], input[type="password"], input[type="email"], input[type="number"], textarea, select {
    border-radius: 8px !important;
    border: 1px solid var(--line) !important;
    background: #FFFFFF !important;
    color: var(--ink) !important;
    transition: all 0.15s !important;
}

.form-control:focus, input:focus, textarea:focus, select:focus {
    border-color: var(--ink) !important;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.06) !important;
    outline: none !important;
}

.form-label, .form-group label {
    color: var(--ink) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

/* 模态框 */
.modal-content {
    border-radius: 14px !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
}

.modal-header {
    border-bottom: 1px solid var(--line-soft) !important;
}

.modal-title {
    font-family: 'Inter Tight', 'Inter', sans-serif !important;
    font-weight: 700 !important;
}

.modal-footer {
    border-top: 1px solid var(--line-soft) !important;
}

/* 链接 */
a {
    color: var(--ink) !important;
}

a:hover {
    color: var(--gold-deep) !important;
}

/* 暗底按钮型链接保持白色文字（覆盖上面的全局 a color） */
a.btn-edit, a.btn-edit:hover,
a.btn-delete, a.btn-delete:hover,
a.btn-approve, a.btn-approve:hover,
a.btn-reject, a.btn-reject:hover,
a.action-btn.btn-reject, a.action-btn.btn-reject:hover,
button.action-btn.btn-reject, button.action-btn.btn-reject:hover,
a.action-btn.btn-delete, a.action-btn.btn-delete:hover,
button.action-btn.btn-delete, button.action-btn.btn-delete:hover,
a.action-btn.btn-pass, a.action-btn.btn-pass:hover,
a.action-btn.btn-approve, a.action-btn.btn-approve:hover,
a.action-btn.btn-submit, a.action-btn.btn-submit:hover,
a.action-btn.btn-down, a.action-btn.btn-down:hover,
a.action-btn.btn-finish, a.action-btn.btn-finish:hover {
    color: #fff !important;
}

a.action-btn.btn-submit:hover {
    background-color: #1d4ed8 !important;
}

a.action-btn.btn-finish:hover {
    background-color: #8f7639 !important;
}

a.action-btn.btn-info,
a.action-btn.btn-info:hover,
.admin-data-page a.action-btn.btn-info,
.admin-data-page a.action-btn.btn-info:hover {
    color: var(--ink) !important;
}

/* 主要数字/金额展示 */
.stat-value, .stat-number, .number-large {
    font-family: 'Inter Tight', 'Inter', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
    color: var(--ink) !important;
}

.text-primary {
    color: var(--gold-deep) !important;
}

.text-gold {
    color: var(--gold) !important;
}

/* 测试环境横幅 */
.clone-test-banner-global {
    position: sticky;
    top: 0;
    background: linear-gradient(90deg, #18181B, #27272A);
    color: var(--gold);
    padding: 6px 16px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    z-index: 999;
    border-bottom: 1px solid var(--gold);
}

/* 提示框 */
.alert {
    border-radius: 10px !important;
    border-width: 1px !important;
}

.alert-success { background: rgba(16, 185, 129, 0.08) !important; border-color: rgba(16, 185, 129, 0.2) !important; color: #065F46 !important; }
.alert-warning { background: rgba(245, 158, 11, 0.08) !important; border-color: rgba(245, 158, 11, 0.2) !important; color: #92400E !important; }
.alert-danger, .alert-error { background: var(--danger-bg, #FEF2F2) !important; border-color: rgba(239, 68, 68, 0.2) !important; color: #991B1B !important; }
.alert-info { background: rgba(201, 169, 97, 0.08) !important; border-color: rgba(201, 169, 97, 0.25) !important; color: var(--gold-deep) !important; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }

