:root {
    --primary-color: #5b4ff4;
    --primary-hover: #4a3ee2;
    --primary-light: #ecebff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --bg-main: #f5f6fa;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px;
}

.app-container {
    padding: 10px;
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Cards */
.filter-card,
.table-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filter-card {
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.filter-card .filter-header,
.filter-card .filter-row,
.filter-card .filter-actions-row {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 500px;
}



.table-card {
    padding: 0;
    overflow: hidden;
}

/* Filter Header */
.filter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.text-primary {
    color: var(--primary-color);
}

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

.font-semibold {
    font-weight: 600;
}

/* Filter Rows */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-row .form-group {
    flex: 1 1 0%;
    min-width: 200px;
    max-width: 300px;
}

.filter-row .form-group[data-filter-id="registerTime"] {
    flex: 1 1 0%;
    min-width: 530px;
    max-width: 620px;
}

.filter-row .form-group[data-filter-id="userTags"],
.filter-row .form-group[data-filter-id="bankCard"],
.filter-row .form-group[data-filter-id="depositAmount"],
.filter-row .form-group[data-filter-id="notLoginDays"],
.filter-row .form-group[data-filter-id="vipLevel"] {
    flex: 1 1 0%;
    min-width: 320px;
    max-width: 420px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.select-wrapper {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    height: 28px;
}

.select-wrapper select,
input[type="text"] {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 12px;
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    appearance: none;
    font-family: inherit;
}

input[type="text"] {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

input[type="text"]::placeholder {
    color: var(--text-light);
}

.inline-label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    margin-right: 4px;
    flex-shrink: 0;
}

.input-with-inline-label {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    height: 28px;
    width: 100%;
    padding-left: 12px;
    transition: border-color 0.2s;
}

.input-with-inline-label:focus-within {
    border-color: var(--primary-color);
}

.input-with-inline-label input {
    flex: 1;
    border: none;
    background: transparent;
    height: 100%;
    outline: none;
    padding: 0 12px 0 4px;
    min-width: 0;
}

.select-wrapper select {
    cursor: pointer;
    padding-right: 30px;
}

.select-wrapper::after {
    content: '\25BC';
    /* caret down */
    font-size: 10px;
    color: var(--text-light);
    position: absolute;
    right: 12px;
    pointer-events: none;
}

/* Multiple Simulated */
.multiple-simulated {
    display: flex;
    gap: 8px;
    padding: 0 12px;
}

.multiple-simulated::after {
    display: none;
}

.multiple-simulated .tag {
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.multiple-simulated .tag-counter {
    background-color: #f3f4f6;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.multiple-simulated .dropdown-icon {
    margin-left: auto;
    color: var(--text-light);
}

/* Filter Actions Row */
.filter-actions-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.account-input-group {
    flex: 1;
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
}

.account-type-dropdown {
    position: relative;
    border-right: 1px solid var(--border-color);
    background-color: #fafafa;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.dropdown-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    height: 100%;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.dropdown-selected i {
    color: var(--primary-color);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 260px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
    display: none;
    z-index: 35;
    padding: 4px 0;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    gap: 8px;
}

.dropdown-menu li:hover {
    background-color: #f3f4f6;
}

.dropdown-menu li.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.type-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background-color: #f3f4f6;
    color: var(--text-muted);
}

.dropdown-menu li.active .type-badge {
    background-color: var(--primary-color);
    color: white;
}

.account-input-group input {
    flex: 1;
    border: none;
    border-radius: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    height: 28px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-family: inherit;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.btn:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
}

.btn-icon-only {
    width: 28px;
    height: 28px;
    padding: 0;
    min-width: 28px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: white;
    border: none;
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #4338ca);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.15);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: var(--text-main);
    border-color: #e5e7eb;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border-color: #cbd5e1;
}

.btn-outline:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
}

.btn-text {
    background-color: transparent;
    color: var(--text-main);
}

.btn-text:hover {
    background-color: #f3f4f6;
}

.badge {
    background-color: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Current Filters */
.current-filters {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 20px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.filter-tag {
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-tag i {
    cursor: pointer;
    font-size: 14px;
}

.btn-clear {
    background: transparent;
    border: none;
    color: var(--danger-color);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.text-danger {
    color: var(--danger-color);
}

/* Table Section */
.table-header-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.table-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: var(--success-color);
    border-radius: 50%;
}

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

.divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
    background-color: #fafafa;
}

td {
    font-size: 14px;
    color: var(--text-main);
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Drawer / Modal */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.advanced-filter-drawer {
    position: fixed;
    top: 0;
    right: -480px;
    width: 480px;
    height: 100vh;
    background-color: var(--bg-card);
    z-index: 101;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

#columnsDrawer {
    width: 320px;
    right: -320px;
}

.advanced-filter-drawer.active {
    right: 0 !important;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.drawer-header h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.drawer-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.date-range-input {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 12px;
    height: 28px;
    font-size: 14px;
}

.date-input {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.date-input i {
    color: var(--text-light);
}

.separator {
    color: var(--text-light);
}

.input-with-suffix,
.input-with-prefix {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    height: 28px;
    width: 100%;
    transition: border-color 0.2s;
}

.input-with-suffix:focus-within,
.input-with-prefix:focus-within {
    border-color: var(--primary-color);
}

.input-with-suffix input,
.input-with-prefix input {
    border: none;
    background: transparent;
    height: 100%;
}

.input-with-suffix input {
    padding-right: 36px;
}

.input-with-suffix span {
    position: absolute;
    right: 12px;
    color: var(--text-muted);
}

.input-with-prefix input {
    padding-left: 32px;
}

.input-with-prefix span {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

.input-with-suffix .inline-label,
.input-with-prefix .inline-label {
    position: static;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    margin-right: 4px;
}

.input-with-prefix .prefix {
    position: static;
    color: var(--text-muted);
    margin-right: 4px;
}

.input-with-prefix,
.input-with-suffix {
    padding-left: 12px;
}

.input-with-prefix input,
.input-with-suffix input {
    padding-left: 0;
}

/* Drawer plain text inputs */
.drawer-content input[type="text"] {
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    transition: border-color 0.2s;
}

.drawer-content input[type="text"]:focus {
    border-color: var(--primary-color);
}

.drawer-content .input-with-suffix input[type="text"],
.drawer-content .input-with-prefix input[type="text"] {
    border: none;
}

.drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.btn-block {
    flex: 1;
}

/* User table styles */
.tag-level {
    background-color: #f3f4f6;
    color: var(--text-main);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.status-label {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-frozen {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-disabled {
    background-color: #f3f4f6;
    color: #374151;
}

/* Custom selects styles */
.custom-select-single,
.custom-select-multi {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    cursor: pointer;
    font-size: 14px;
    height: 28px;
    user-select: none;
}

.select-selected {
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 100%;
}

.select-selected i {
    color: var(--text-light);
    font-size: 14px;
    margin-left: auto;
    flex-shrink: 0;
}

.select-selected .selected-val {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
    display: none;
    z-index: 35;
    max-height: 250px;
    overflow-y: auto;
    padding: 4px 0;
}

.select-options.show {
    display: block;
}

.select-options li {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    transition: background-color 0.2s;
}

.select-options li:hover {
    background-color: #f3f4f6;
}

.select-options li.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 500;
}

.custom-select-multi .select-options li {
    cursor: pointer;
}

.custom-select-multi .select-options li input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    pointer-events: none;
}

.custom-select-multi .select-options li.selected {
    background-color: #fafafa;
}

.custom-select-multi .select-options li.selected:hover {
    background-color: #f3f4f6;
}

/* Detailed table styling */
td {
    vertical-align: top;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
}

.badge-online {
    display: inline-block;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

.badge-online.online {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-online.offline {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.avatar-cell {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 24px;
    border: 1px solid var(--border-color);
}

.info-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--text-main);
    min-width: 140px;
    text-align: left;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.refresh-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.refresh-link:hover {
    text-decoration: underline;
}

.ip-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.text-primary-link {
    color: var(--primary-color);
    cursor: pointer;
}

/* Operations Grid */
.operations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 12px;
    width: 260px;
}

.op-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}

.op-link:hover {
    text-decoration: underline;
}

.btn-more {
    grid-column: span 3;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.btn-more:hover {
    background-color: #f9fafb;
}

/* Stats Panel */
.stats-panel {
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.stats-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.header-title i {
    color: var(--primary-color);
    font-size: 18px;
}

.header-badge {
    background-color: #f1f3ff;
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.stats-cards-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.stat-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.card-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.info-icon {
    color: var(--text-light);
    cursor: pointer;
}

.card-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.card-value .currency {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.card-value .unit {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.card-value.color-primary {
    color: var(--primary-color);
}

.card-value.color-success {
    color: var(--success-color);
}

/* Pagination */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: #ffffff;
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-info {
    color: var(--text-main);
}

.pagination-size-wrapper select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 13px;
    outline: none;
    background-color: #ffffff;
    cursor: pointer;
}

.pagination-pages {
    display: flex;
    gap: 6px;
}

.btn-page {
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-main);
    transition: all 0.2s;
}

.btn-page:hover:not([disabled]) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-page.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
}

.btn-page[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-jump input {
    width: 44px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    padding: 0 4px;
    font-size: 13px;
    margin: 0 4px;
    outline: none;
}

/* Column Toggle Styles */
.column-toggle-container {
    position: relative;
}

.column-toggle-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 250px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 30;
    padding: 12px;
    text-align: left;
}

.column-toggle-dropdown.show {
    display: block;
}

.dropdown-header-defaults {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.defaults-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

.reset-icon {
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
}

.dropdown-search {
    position: relative;
    margin-bottom: 12px;
}

.dropdown-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
}

.dropdown-search input {
    width: 100%;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding-left: 32px;
    font-size: 13px;
    outline: none;
}

.column-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.column-list li {
    padding: 6px 0;
}

.column-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
}

.column-list label input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.dropdown-footer-info {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

/* Batch Dropdown Styles */
.batch-dropdown-container {
    position: relative;
}

.batch-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 200px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
    display: none;
    z-index: 30;
    padding: 4px 0;
    text-align: left;
}

.batch-dropdown-menu.show {
    display: block;
}

.batch-dropdown-menu li {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-main);
    transition: background-color 0.2s;
}

.batch-dropdown-menu li:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

/* Force nowrap for specific columns (在线, 标签, 状态) */
table tr td:nth-child(1),
table tr td:nth-child(8),
table tr td:nth-child(9) {
    white-space: nowrap !important;
}

/* User Custom Tags Styles */
.user-tags-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.user-custom-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.tag-blue {
    background-color: #ebf5ff;
    color: #1d4ed8;
}

.tag-green {
    background-color: #ecfdf5;
    color: #047857;
}

.tag-red {
    background-color: #fdf2f2;
    color: #b91c1c;
}

.tag-yellow {
    background-color: #fef9c3;
    color: #a16207;
}

.tag-purple {
    background-color: #faf5ff;
    color: #6b21a8;
}

.tag-more {
    background-color: #f3f4f6;
    color: #374151;
    cursor: help;
}

/* Export Dropdown Styles */
.export-dropdown-container {
    position: relative;
}

.export-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 180px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
    display: none;
    z-index: 30;
    padding: 4px 0;
    text-align: left;
}

.export-dropdown-menu.show {
    display: block;
}

.export-dropdown-menu li {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-main);
    transition: background-color 0.2s;
}

.export-dropdown-menu li:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

/* Sidebar Layout CSS */
.main-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-main);
}

.sidebar {
    width: 256px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: width 0.3s ease;
}


/* Sidebar Collapsed State */
.main-layout.sidebar-collapsed .sidebar {
    width: 64px;
}

.main-layout.sidebar-collapsed .sidebar-header #sidebarHeaderIcon,
.main-layout.sidebar-collapsed .sidebar-header #sidebarHeaderTitle {
    display: none;
}

.main-layout.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding: 16px 0;
}

.main-layout.sidebar-collapsed .sidebar-header #btnSidebarToggle {
    margin-left: 0 !important;
}

.main-layout.sidebar-collapsed .sidebar-nav {
    overflow-x: hidden;
}

.main-layout.sidebar-collapsed .nav-item-header {
    justify-content: center;
    padding: 12px 0;
}

.main-layout.sidebar-collapsed .nav-item-header span {
    display: none;
}

.main-layout.sidebar-collapsed .nav-item-header .toggle-arrow,
.main-layout.sidebar-collapsed .nav-item-header .nav-badge {
    display: none;
}

.main-layout.sidebar-collapsed .submenu {
    display: none !important;
}

.main-layout.sidebar-collapsed .sidebar-nav span {
    display: none;
}

.main-layout.sidebar-collapsed .permission-checkboxes {
    display: none !important;
}

.main-layout.sidebar-collapsed .sidebar-action-buttons,
.main-layout.sidebar-collapsed .sidebar-mock-row {
    display: none !important;
}

.main-layout.sidebar-collapsed .sidebar-nav > div {
    justify-content: center;
}

.main-layout.sidebar-collapsed .filter-card.collapsed-sticky .current-filters {
    left: 64px;
}

.main-content {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-header i {
    font-size: 32px;
    color: #9ca3af;
}

body.hide-edit-user .action-edit-user {
    display: none !important;
}

body.hide-view-details .action-view-details {
    display: none !important;
}

body.hide-add-withdraw #btnAddWithdraw {
    display: none !important;
}

body.hide-edit-withdraw .ued-action-save {
    display: none !important;
}

body.hide-delete-withdraw .ued-action-del {
    display: none !important;
}

body.hide-disable-withdraw .ued-withdraw-toggle {
    display: none !important;
}

body.hide-sub-actions .action-sub-member,
body.hide-sub-actions .action-sub-report,
body.hide-sub-actions .action-sub-bet {
    display: none !important;
}

body.hide-fund-detail .action-fund-detail { display: none !important; }
body.hide-bet-detail .action-bet-detail { display: none !important; }
body.hide-edit-balance .action-edit-balance { display: none !important; }
body.hide-trade-setting .action-trade-setting { display: none !important; }
body.hide-edit-proxy .action-edit-proxy { display: none !important; }
body.hide-third-game .action-third-game { display: none !important; }
body.hide-edit-point .action-edit-point { display: none !important; }
body.hide-audit-record .action-audit-record { display: none !important; }
body.hide-proxy-record .action-proxy-record { display: none !important; }
body.hide-hide-fund .action-hide-fund { display: none !important; }
body.hide-fast-login .action-fast-login { display: none !important; }
body.hide-google-auth .action-google-auth { display: none !important; }
body.hide-edit-password .action-edit-password { display: none !important; }
body.hide-chain-address .action-chain-address { display: none !important; }
body.hide-edit-balance-chain .action-edit-balance-chain { display: none !important; }
body.hide-odds-setting .action-odds-setting { display: none !important; }
body.hide-verify-task .action-verify-task { display: none !important; }
body.hide-edit-tag .action-edit-tag { display: none !important; }
body.hide-tag-record .action-tag-record { display: none !important; }
body.hide-follow-remark .action-follow-remark { display: none !important; }
body.hide-contact-info #editContactCard,
body.hide-contact-info #viewContactCard {
    display: none !important;
}

/* Sidebar toggle */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.nav-item-group {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f9fafb;
}

.nav-item-header {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #4b5563;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    font-size: 14px;
}

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

.nav-item-header i:first-child {
    font-size: 20px;
    color: #6b7280;
    transition: color 0.2s;
}

.nav-item-header span {
    margin-left: 12px;
    flex: 1;
}

/* Expanded Main Group */
.nav-item-group.expanded .nav-item-header {
    background-color: #eef2ff;
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item-group.expanded .nav-item-header i:first-child {
    color: var(--primary-color);
}

.nav-item-group.expanded .nav-item-header::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-color);
}

.toggle-arrow {
    font-size: 14px !important;
    color: #9ca3af !important;
    transition: transform 0.2s;
}

.nav-item-group.expanded .toggle-arrow {
    color: var(--primary-color) !important;
}

/* Badges */
.nav-badge {
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    margin-left: 8px;
    color: white;
}

.badge-danger {
    background-color: #ff4d4f;
}

/* Submenu */
.submenu {
    list-style: none;
    padding: 0;
    background-color: #f4f5f8;
    display: none;
}

.nav-item-group.expanded .submenu {
    display: block;
}

.submenu li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px 10px 56px;
    position: relative;
}

.submenu li a {
    color: #5a6b82;
    text-decoration: none;
    font-size: 13px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
}

.submenu li:hover a {
    color: var(--primary-color);
}

/* Active sub-item (like 会员) */
.submenu li.active {
    background-color: #e1e6eb;
}

.submenu li.active a {
    color: #1f2937;
    font-weight: 600;
}

/* Top Bar Styles */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    background-color: var(--bg-card);
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 80;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.local-time-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-btn {
    cursor: pointer;
    font-size: 20px;
    color: #fbbf24;
    /* Yellow color bell */
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-capsule {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 6px 18px;
}

.capsule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
}

.capsule-item i {
    font-size: 18px;
}

.capsule-item .num {
    font-weight: 600;
    margin-left: 2px;
}

.capsule-item-divider {
    width: 1px;
    height: 14px;
    background-color: #cbd5e1;
}

/* Specific colors inside capsule icons/numbers */
.text-blue-capsule {
    color: #3b82f6;
}

.text-orange-capsule {
    color: #f97316;
}

.text-cyan-capsule {
    color: #06b6d4;
}

.text-green-capsule {
    color: #10b981;
}

.text-blue-num {
    color: #2563eb !important;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #1f2937;
    font-weight: 600;
}

.user-dropdown i:first-child {
    font-size: 20px;
    color: #6366f1;
    /* Purple-ish user avatar icon */
}

.user-dropdown i:last-child {
    font-size: 12px;
    color: #9ca3af;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
}

.lang-selector .flag-icon {
    font-size: 18px;
}

.lang-selector i {
    font-size: 12px;
    color: #9ca3af;
}

/* Page Header Tabs Styles */
.page-header-tabs {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 60px;
    z-index: 70;
}

.breadcrumb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 24px;
    font-size: 13px;
}

.breadcrumb-path {
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-path i {
    font-size: 12px;
    color: #9ca3af;
}

.tabs-options-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #4b5563;
    font-weight: 500;
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 4px;
}

.tabs-options-dropdown i {
    font-size: 12px;
    color: #9ca3af;
}

.tabs-container {
    position: relative;
    display: flex;
    gap: 6px;
    padding: 0 24px 8px 32px;
    overflow-x: auto;
}

.tabs-container::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 8px;
    width: 4px;
    background-color: #3b82f6;
    border-radius: 2px;
}

.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 12px;
    color: #4b5563;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tab-item:hover {
    color: #2563eb;
    background-color: #f1f5f9;
}

.tab-item.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.tab-close {
    font-size: 14px;
    color: #9ca3af;
    cursor: pointer;
}

.tab-item.active .tab-close {
    color: rgba(255, 255, 255, 0.8);
}

.tab-close:hover {
    color: #ef4444;
}

.tab-item.active .tab-close:hover {
    color: white;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background-color: #fff;
    width: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
}

.btn-close-modal:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Custom Filter Inputs */
.date-range-container {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 12px;
    height: 28px;
    background-color: #fff;
    cursor: pointer;
}

/* 新增时间：开始晚于结束 */
.date-range-container,
.date-range-input {
    position: relative;
}

.date-range-container.date-range-error,
.date-range-input.date-range-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

.form-group:has(> .date-range-error),
.form-group:has(> .date-range-input.date-range-error) {
    margin-bottom: 16px;
}

.date-range-error-tip {
    position: absolute;
    left: 12px;
    top: calc(100% + 2px);
    font-size: 12px;
    line-height: 1.4;
    color: #ef4444;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}

.date-range-container .date-text {
    flex: 1;
    color: var(--text-light);
    font-size: 13px;
    min-width: 190px;
    width: 100%;
}

.date-range-container i {
    color: var(--text-light);
    font-size: 15px;
    margin-left: 4px;
}

.date-range-container .date-separator-line {
    margin: 0 12px;
    color: var(--border-color);
    font-size: 14px;
}

.filter-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-suffix,
.input-with-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-suffix input,
.input-with-prefix input {
    width: 100%;
}

.input-with-suffix .suffix {
    position: absolute;
    right: 12px;
    color: var(--text-light);
    font-size: 13px;
    pointer-events: none;
}

.input-with-prefix .prefix {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    font-size: 13px;
    pointer-events: none;
}

.input-with-prefix input {
    padding-left: 28px;
}

/* ==========================================
   显示模式切换与说明 Banner (Mode Switcher)
   ========================================== */
.mode-switcher-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mode-switcher-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mode-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mode-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.mode-segmented-control {
    display: inline-flex;
    background-color: #f3f4f6;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    height: 28px;
    box-sizing: border-box;
}

.mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    height: 100%;
    border: none;
    background: transparent;
    border-radius: 4px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn i {
    font-size: 16px;
}

.mode-btn:hover {
    color: var(--primary-color);
}

.mode-btn.active {
    background-color: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mode-right {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* 提示 Banner */
.table-mode-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    color: #065f46;
    font-size: 13px;
}

.table-mode-notice i {
    font-size: 18px;
    color: #10b981;
    flex-shrink: 0;
}

/* ==========================================
   压缩模式表格样式 (Compact Mode Table Styles)
   ========================================== */
.table-wrapper {
    overflow-x: auto;
    max-width: 100%;
}

/* 压缩模式特有样式 */
.compact-mode-table {
    white-space: nowrap;
    border-collapse: separate;
    border-spacing: 0;
}

.compact-mode-table th,
.compact-mode-table td {
    padding: 8px 12px;
    font-size: 13px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

/* 标题第 1 列 (Group Category) */
.compact-mode-table th.header-group {
    background-color: #eef2f7;
    color: #374151;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid #cbd5e1;
    text-align: left;
}

/* 标题第 2 列 (Sub Field Titles) */
.compact-mode-table th.header-sub {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 12px;
}

/* Tag-based Row Highlights */
.row-danger {
    background-color: #fef2f2 !important;
}

.row-danger td:first-child {
    box-shadow: inset 4px 0 0 0 #ef4444 !important;
}

.row-danger .sticky-col,
.row-danger td.sticky-col-right {
    background-color: #fef2f2 !important;
}

.row-warning {
    background-color: #fffbeb !important;
}

.row-warning td:first-child {
    box-shadow: inset 4px 0 0 0 #f59e0b !important;
}

.row-warning .sticky-col,
.row-warning td.sticky-col-right {
    background-color: #fffbeb !important;
}

.row-success {
    background-color: #f0fdf4 !important;
}

.row-success td:first-child {
    box-shadow: inset 4px 0 0 0 #22c55e !important;
}

.row-success .sticky-col,
.row-success td.sticky-col-right {
    background-color: #f0fdf4 !important;
}

.compact-mode-table tbody tr:hover {
    background-color: #f0f9ff;
}

.compact-mode-table tbody tr:hover .sticky-col,
.compact-mode-table tbody tr:hover td.sticky-col-right {
    background-color: #f0f9ff !important;
}


.compact-mode-table .cell-val {
    font-family: inherit;
    font-weight: 500;
    line-height: 1.8;
}

.compact-mode-table .cell-money {
    font-weight: 600;
    text-align: left;
    padding-left: 16px;
}

.compact-mode-table .cell-money.positive {
    color: #10b981;
}

.compact-mode-table .cell-money.highlight {
    color: #1d4ed8;
}

.compact-mode-table .cell-money.zero {
    color: #111827;
}

.compact-mode-table .cell-money.negative {
    color: #ef4444;
}

.compact-mode-table .cell-username {
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.8;
}

.compact-mode-table .cell-username:hover {
    text-decoration: underline;
}

/* 会员名：纯文字，不可点击 */
.cell-username-static,
.compact-mode-table .cell-username.cell-username-static {
    color: var(--text-main);
    font-weight: 600;
    cursor: default;
}

.cell-username-static:hover,
.compact-mode-table .cell-username.cell-username-static:hover {
    text-decoration: none;
}

/* 操作按钮选单 (Compact Mode Action Dropdown) */
.op-dropdown-container {
    position: relative;
    display: inline-block;
}

.btn-op-more {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-op-more:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.op-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    min-width: 140px;
    padding: 6px 0;
    display: none;
    text-align: center;
    max-height: 250px;
    overflow-y: auto;
}

.op-dropdown-container:hover .op-dropdown-menu {
    display: block;
}

.op-dropdown-menu li {
    list-style: none;
    padding: 8px 16px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s ease;
}

.op-dropdown-menu li:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

/* Sticky Columns Utilities */
.sticky-col {
    position: sticky;
    z-index: 10;
    background-color: #ffffff !important;
    box-shadow: 3px 0 6px -2px rgba(0, 0, 0, 0.12);
}

table tr.header-sub-row th.sticky-col,
table tr.header-group-row th.sticky-col {
    background-color: #f8fafc !important;
    z-index: 40 !important;
    box-shadow: 3px 0 6px -2px rgba(0, 0, 0, 0.12);
}

/* Base sticky columns that are always there */
.sticky-col-1 {
    left: 0;
    min-width: 40px;
    width: 40px;
    text-align: center;
}

/* Pin Icon Styles */
.icon-pin {
    cursor: pointer;
    color: var(--gray-400);
    transition: all 0.2s;
    opacity: 0;
    margin-left: 8px;
}

th:hover .icon-pin,
.icon-pin.active {
    opacity: 1;
}

.header-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.header-inline-actions .icon-pin,
.header-inline-actions .sort-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: 0;
}

th:hover .header-inline-actions .icon-pin,
th:hover .header-inline-actions .sort-btn,
.header-inline-actions .icon-pin.active,
.header-inline-actions .sort-btn.active-asc,
.header-inline-actions .sort-btn.active-desc {
    opacity: 1;
}

.icon-pin:hover {
    color: var(--primary-color);
}

.icon-pin.active {
    color: var(--primary-color);
    transform: rotate(45deg);
}

/* User Edit Modal Custom Styles */
.modal-content.modal-lg {
    max-width: 680px;
    width: 90%;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.user-edit-form-body {
    max-height: 72vh;
    overflow-y: auto;
    padding: 24px 32px;
}

.user-edit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-edit-form .form-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.user-edit-form .form-label {
    width: 220px;
    text-align: right;
    margin-right: 16px;
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
    flex-shrink: 0;
}

.user-edit-form .form-control-wrap {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.user-modal-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 12px;
}

.user-edit-form .form-input,
.user-edit-form .form-select,
.user-edit-form .form-textarea {
    width: 100%;
    max-width: 360px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-main);
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.15s;
}

.user-edit-form .form-input:focus,
.user-edit-form .form-select:focus,
.user-edit-form .form-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 79, 244, 0.1);
}

.user-edit-form .radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.user-edit-form .radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

.tag-badge-grey {
    background-color: #f3f4f6;
    color: #6b7280;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.user-detail-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.user-detail-link:hover {
    text-decoration: underline;
}

.sticky-col-2 {
    left: 40px;
    min-width: 100px;
}

.sticky-col-3 {
    left: 140px;
    min-width: 120px;
}

/* Drawer Column List Styling */
.drawer-content .column-list {
    max-height: none;
    overflow-y: visible;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

.drawer-content .column-list li {
    padding: 4px 0;
    border-bottom: 1px dashed #f1f5f9;
}

/* Shadow on the last sticky column */
.sticky-col-3::after {
    content: "";
    position: absolute;
    top: 0;
    right: -6px;
    width: 6px;
    height: 100%;
    box-shadow: inset 6px 0 6px -6px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.sticky-col-right {
    position: sticky !important;
    right: 0;
    background-color: inherit;
    z-index: 10;
}

table tbody td.sticky-col-right {
    background-color: #fff;
}

table tbody tr:hover td.sticky-col-right {
    z-index: 50 !important;
}

table thead th.sticky-col-right {
    background-color: #f8fafc;
    z-index: 30 !important;
}

.sticky-col-right::before {
    content: "";
    position: absolute;
    top: 0;
    left: -6px;
    width: 6px;
    height: 100%;
    box-shadow: inset -6px 0 6px -6px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

/* Sorting Buttons */
.sort-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: 4px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 4px;
}

.sort-btn:hover {
    background-color: #e5e7eb;
    color: var(--primary-color);
}

.sort-btn.active-asc {
    color: var(--primary-color);
}

.sort-btn.active-desc {
    color: var(--primary-color);
}

/* Compact Dropdown Layout */
.column-list li .dropdown-item-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.column-list li .dropdown-item-flex label {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin-right: 10px;
    margin-bottom: 0;
    cursor: pointer;
}

.column-list li .dropdown-item-flex .icon-pin {
    opacity: 1;
    /* Always visible in dropdown */
    margin-left: 0;
}

/* Refresh Animation */
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.icon-spin {
    animation: spin 1s linear infinite;
}

.refresh-icon-compact {
    cursor: pointer;
    color: var(--text-secondary);
    margin-left: 4px;
    vertical-align: middle;
}

.refresh-icon-compact:hover {
    color: var(--primary-color);
}

/* Toggle Switch Component */
.toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    user-select: none;
}

.toggle-switch {
    position: relative;
    width: 32px;
    height: 18px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

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

.resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    cursor: col-resize;
    user-select: none;
    height: 100%;
    z-index: 10;
}

.resizer:hover, .resizer.resizing {
    background-color: var(--primary-color, #6366f1);
}



.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .3s;
    border-radius: 18px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked+.slider:before {
    transform: translateX(14px);
}

/* ==========================================
   全新优化版 Top Bar Header 样式 (Design Overhaul)
   ========================================== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    background-color: #ffffff;
    padding: 0 24px;
    border-bottom: 1px solid #eaecf0;
    position: sticky;
    top: 0;
    z-index: 80;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.5px;
    font-family: var(--font-family);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-divider {
    width: 1px;
    height: 20px;
    background-color: #eaecf0;
    margin: 0 4px;
}

/* App Container Padding for Sticky Footer */
.app-container {
    padding: 0;
    max-width: 100%;
    margin: 5px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #eaecf0;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.04);
    flex: 1;
    min-height: 0;
    overflow: hidden;
    transition: margin-bottom 0.3s ease;
}

body.stats-collapsed .app-container {
    margin-bottom: 5px;
}

/* Filter Card Improvements */
.filter-card {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 4px 8px;
    box-shadow: none;
    border: 1px solid #eaecf0;
    margin: 12px 24px;
}

.filter-card.collapsed {
    display: none !important;
}


.custom-select-single,
.custom-select-multi {
    height: 28px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    background-color: #ffffff;
}

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

.account-input-group {
    flex: 1 1 auto;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    height: 28px;
    background-color: #ffffff;
}

.account-type-dropdown {
    background-color: #fafafa;
    border-right: 1px solid #eaecf0;
    border-radius: 8px 0 0 8px;
}

.dropdown-selected {
    height: 100%;
    font-size: 13px;
    color: #344054;
    font-weight: 500;
}

.account-input-group input {
    height: 100%;
    font-size: 13px;
    padding: 0 12px;
    border: none;
    border-radius: 0 8px 8px 0;
}

.btn-primary {
    background-color: #5b4ff4;
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    height: 28px;
    border: none;
    box-shadow: 0 1px 2px rgba(91, 79, 244, 0.15);
}

.btn-primary:hover {
    background-color: #4a3ee2;
}

.btn-outline {
    background-color: #ffffff;
    border: 1px solid #d0d5dd;
    color: #344054;
    border-radius: 8px;
    height: 28px;
    font-weight: 500;
}

.btn-outline:hover {
    background-color: #f8fafc;
}

.badge {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

.current-filters {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.current-filters .pagination-container {
    padding: 0;
    border-top: none;
    background-color: transparent;
    flex-shrink: 0;
    /* Prevent pagination from shrinking */
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    background-color: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-tag i {
    cursor: pointer;
    color: #4338ca;
}

/* Data Table Overhaul */
.table-card {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.table-and-filter-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding-bottom: 56px; /* Add space so last row isn't hidden by the floating bottom stats bar */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 16px;
    border-bottom: 1px solid #eaecf0;
    font-size: 13px;
}

table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
}

table tr.header-group-row th {
    height: 33px;
    box-sizing: border-box;
}

table tr.header-sub-row th {
    top: 33px; /* Height of the first row to prevent overlapping */
}

th.header-group {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid #eaecf0;
    text-align: left;
}

th.header-sub {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 12px;
    border-bottom: 1px solid #eaecf0;
    padding: 12px 14px;
}

td {
    color: var(--text-main);
    vertical-align: middle;
}

.user-detail-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.user-detail-link:hover {
    text-decoration: underline;
}

.status-dot-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot-icon.online {
    background-color: #10b981;
}

.status-dot-icon.offline {
    background-color: #d1d5db;
}

.user-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-transform: lowercase;
    margin: 0 auto;
}

.avatar-1 {
    background-color: #3b82f6;
}

.avatar-2 {
    background-color: #f97316;
}

.avatar-3 {
    background-color: #9ca3af;
}

.text-success-green {
    color: #10b981;
    font-weight: 600;
}

.level-gold {
    color: #d97706;
    font-weight: 700;
}

.level-vip {
    color: #2563eb;
    font-weight: 600;
}

.level-normal {
    color: #475569;
}

.btn-more-options {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    padding: 2px 6px;
    transition: all 0.2s;
}

.btn-more-options:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

/* ==========================================
   底部固定数据统计栏 (Fixed Bottom Summary Bar)
   ========================================== */
.bottom-stats-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background-color: #ffffff;
    border-top: 1px solid #eaecf0;
    box-shadow: 0 -4px 12px rgba(16, 24, 40, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 95;
    transition: left 0.3s ease, transform 0.3s ease;
}

.stats-toggle-btn {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #eaecf0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.bottom-stats-bar.collapsed {
    transform: translateY(100%);
}

.bottom-stats-bar.collapsed .stats-toggle-btn {
    transform: translateX(-50%) rotate(180deg);
}

.bottom-stats-left {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #475569;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-label {
    color: #64748b;
    font-weight: 500;
}

.stat-label i {
    cursor: help;
    pointer-events: auto;
    font-size: 14px;
    margin-left: 4px;
}

.stat-value {
    color: #0f172a;
    font-weight: 600;
}

.stat-unit {
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}

.text-indigo {
    color: #6366f1 !important;
}

.text-emerald {
    color: #10b981 !important;
}

.stat-divider {
    width: 1px;
    height: 16px;
    background-color: #e2e8f0;
}

.stats-exclude-badge {
    background-color: #f1f5f9;
    color: #64748b;
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* ==========================================
   顶部固钉区块与页面标签 (Sticky Top Header & Tabs)
   ========================================== */
.sticky-top-header-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.local-time-label {
    font-size: 13px;
    color: #475569;
    font-weight: 400;
}

.notification-btn {
    cursor: pointer;
    font-size: 20px;
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.info-capsule {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 5px 16px;
}

.capsule-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.capsule-item i {
    font-size: 16px;
}

.text-blue-capsule {
    color: #3b82f6;
}

.text-orange-capsule {
    color: #f97316;
}

.text-cyan-capsule {
    color: #06b6d4;
}

.text-green-capsule {
    color: #10b981;
}

.text-blue-num {
    color: #2563eb !important;
    font-weight: 600;
}

.capsule-item-divider {
    width: 1px;
    height: 14px;
    background-color: #cbd5e1;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #1e293b;
    font-weight: 600;
}

.user-dropdown i:first-child {
    font-size: 18px;
    color: #6366f1;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.page-header-tabs {
    background-color: #f8fafc;
    border-bottom: 1px solid #eaecf0;
}

.breadcrumb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    font-size: 13px;
}

.breadcrumb-path {
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tabs-options-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #344054;
    font-weight: 500;
    background-color: #ffffff;
    border: 1px solid #d0d5dd;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.tabs-container {
    position: relative;
    display: flex;
    gap: 6px;
    padding: 0 24px 10px 32px;
    overflow-x: auto;
}

.tabs-container::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 10px;
    width: 3px;
    background-color: #2563eb;
    border-radius: 2px;
}

.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 12px;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tab-item.active {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    font-weight: 600;
}

.tab-close {
    font-size: 13px;
    color: #94a3b8;
    cursor: pointer;
}

.tab-item.active .tab-close {
    color: rgba(255, 255, 255, 0.8);
}

.action-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 24px;
    background-color: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #eaecf0;
    box-shadow: none;
}

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

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================
   图一巢状模式表格与图二自订栏位图示样式
   ========================================== */

/* 自订栏位图示按钮 (图二样式) */
.btn-custom-columns-header {
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #344054;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: all 0.2s ease;
    margin: 0 auto;
}

.btn-custom-columns-header:hover {
    background-color: #f8fafc;
    border-color: #98a2b3;
    color: #1e293b;
    box-shadow: 0 2px 4px rgba(16, 24, 40, 0.08);
}

/* 灰色头像圆圈 */
.user-avatar-circle-grey {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.user-avatar-circle-grey .status-dot-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-sizing: content-box;
}

.user-avatar-circle-grey:hover {
    transform: scale(1.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
    position: relative;
}

/* 巢状单元格内文多列清单 */
.nested-cell-info {
    font-size: 12px;
    line-height: 1.8;
    color: #334155;
    vertical-align: top;
    padding: 12px 14px;
}

.nested-cell-info div {
    white-space: nowrap;
}

.nested-cell-info.wrap-text div {
    white-space: normal;
    word-break: break-word;
}

.nested-cell-info .info-label {
    color: #475569;
    font-weight: 500;
}

.operations-grid-3x3 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    text-align: left;
    margin-bottom: 10px;
}

.operations-grid-3x3 .op-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.operations-grid-3x3 .op-link:hover {
    text-decoration: underline;
}

/* 宽版「更多...」按钮 */
.btn-more-op-wide {
    width: 100%;
    height: 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 12px;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-more-op-wide:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* 标签颜色补强 */
.tag-grey {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.tag-yellow {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.tag-blue {
    background-color: #ebf5ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* Tag Tooltip Hover Style */
.tag-more-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tag-more-container .tag-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px;
    border-radius: 6px;
    z-index: 50;
    white-space: nowrap;
    gap: 4px;
    margin-bottom: 8px;
}

.tag-more-container .tag-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 12px;
    border-width: 5px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.tag-more-container .tag-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    right: 11px;
    border-width: 6px;
    border-style: solid;
    border-color: #e2e8f0 transparent transparent transparent;
    z-index: -1;
}

.tag-more-container:hover .tag-tooltip {
    display: flex;
}

.tag-green {
    background-color: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.tag-red {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.tag-purple {
    background-color: #f3e8ff;
    color: #9333ea;
    border: 1px solid #e9d5ff;
}

/* ==========================================
   编辑用户详情 右侧抽屉与页签样式
   ========================================== */
.user-edit-drawer {
    position: fixed;
    top: 0;
    right: -660px;
    width: 660px;
    max-width: 90vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 1050;
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-edit-drawer.shifted {
    transform: translateX(-100%);
}

.user-edit-drawer.active,
.user-edit-drawer.show {
    right: 0;
}

.user-edit-tab-item {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.user-edit-tab-item:hover {
    color: #4f46e5;
}

.user-edit-tab-item.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    font-weight: 600;
}

/* 巢状模式「更多...」移入选单 */
.more-op-dropdown-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.more-op-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 4px;
    /* 靠右对齐向左展开，避免被表格右边界裁切 */
    right: 0;
    left: auto;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 6px 0;
    list-style: none;
    min-width: 170px;
    z-index: 9999;
    max-height: 380px;
    overflow-y: auto;
}

.more-op-dropdown-container:hover .more-op-dropdown-menu {
    display: block;
}

.more-op-dropdown-menu li {
    padding: 8px 16px;
    font-size: 13px;
    color: #3b82f6;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.more-op-dropdown-menu li:hover {
    background-color: #f0f7ff;
    color: #1d4ed8;
}

/* --- Data UI States --- */

/* 1. Basic States */
.data-empty {
    color: var(--text-muted, #94a3b8);
    text-align: center;
}

.data-na {
    color: #b0b8c9;
    font-style: italic;
    font-size: 13px;
    letter-spacing: 0.02em;
}


.data-null {
    color: var(--text-muted, #94a3b8);
}

/* 2. Binding Status */
.status-bound {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-primary);
}

.status-bound i {
    color: #10b981;
    /* green */
}

.tag-unbound {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: var(--radius-sm, 4px);
    font-size: 11px;
    font-weight: 500;
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.tag-bound {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: var(--radius-sm, 4px);
    font-size: 11px;
    font-weight: 500;
    background-color: #ecfdf5;
    color: #10b981;
    border: 1px solid #a7f3d0;
}

/* 3. Display Format */
.data-masked {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background-color: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    color: #334155;
    letter-spacing: 0.05em;
}

.text-truncate {
    display: inline-block;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* 4. Error & Permission */
.tag-no-permission {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.data-error {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ef4444;
    font-weight: 500;
}

.tag-parse-error {
    display: inline-block;
    background-color: #fef08a;
    color: #b45309;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: help;
}

/* 5. Loading & Actions */
.skeleton-box {
    display: inline-block;
    height: 16px;
    width: 80%;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.copyable-text {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    line-height: 1.8;
}

.copyable-text .copy-icon {
    opacity: 0;
    margin-left: 6px;
    color: #64748b;
    transition: all 0.2s;
    font-size: 14px;
}

.copyable-text:hover .copy-icon {
    opacity: 1;
    color: #3b82f6;
    /* primary */
}

/* --- Data State Styling --- */
.data-empty {
    color: #94a3b8;
}

.data-null {
    display: inline-block;
    padding: 2px 8px;
    background-color: #f1f5f9;
    color: #64748b;
    border-radius: 9999px;
    font-size: 12px;
}

.tag-unbound {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid #f59e0b;
    color: #f59e0b;
    border-radius: 4px;
    font-size: 12px;
}

.tag-no-permission {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 16px;
    cursor: help;
}

.data-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 16px;
    cursor: help;
}

.tag-parse-error {
    display: inline-block;
    padding: 2px 6px;
    background-color: #fef08a;
    color: #b91c1c;
    border-radius: 4px;
    font-size: 12px;
    cursor: help;
    border: 1px solid #eab308;
}

.status-bound {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #10b981;
}

.data-masked {
    color: #334155;
}

.text-truncate {
    display: inline-block;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.data-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 16px;
    cursor: help;
}

/* --- Skeleton Loader --- */
@keyframes skeletonPulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}


.skeleton-box {
    display: inline-block;
    height: 16px;
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 4px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-avatar {
    width: 32px;
    height: 32px;
    background-color: #e2e8f0;
    border-radius: 50%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    margin: 0 auto;
}

.skeleton-text-short {
    width: 40%;
}

.skeleton-text-medium {
    width: 70%;
}

.skeleton-text-long {
    width: 100%;
}

/* Detail Card Styles for Expanded Row */
.detail-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 16px;
    min-width: 280px;
}

.detail-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--primary-color);
    background: #f8fafc;
}

.detail-card-body {
    padding: 16px;
    font-size: 13px;
}

.grid-2-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    column-gap: 24px;
    position: relative;
}

.grid-2-col::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background-color: #eaecf0;
    transform: translateX(-50%);
}

.grid-2-col>div {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.flex-list-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flex-list-col>div {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.lbl {
    color: #64748b;
    margin-right: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.val {
    font-weight: 500;
    color: var(--text-color);
    text-align: right;
    white-space: nowrap;
}

.text-red {
    color: #ef4444;
}

.text-blue {
    color: #3b82f6;
}

.text-green {
    color: #10b981;
}

/* ==========================================================================
   Custom Column Drawer (自订栏位抽屉)
   ========================================================================== */

.custom-column-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50vh; /* Default height */
    max-height: var(--max-drawer-height, calc(100vh - 250px));
    background: #ffffff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
}

.custom-column-drawer.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.custom-column-drawer.expanded {
    height: var(--max-drawer-height, calc(100vh - 250px));
}

/* Header */
.custom-column-drawer .drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.custom-column-drawer .drawer-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-column-drawer .drawer-title h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
}

.custom-column-drawer .drawer-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 0;
    display: block;
}

.custom-column-drawer .drawer-actions {
    display: flex;
    gap: 8px;
}

/* Body Layout */
.custom-column-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.column-panel {
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.column-panel.left-panel {
    flex: 0 0 auto;
    width: max-content;
    min-width: 220px;
    border-right: 1px solid var(--border-color);
    background: #ffffff;
}

.column-panel.right-panel {
    flex: 1;
    background: #f8fafc;
}

.column-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.column-panel .panel-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.column-panel .panel-header .badge {
    width: auto;
    height: auto;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    font-size: 11px;
}

.column-panel .panel-header .badge-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Left Panel: Zones */
.column-zones-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* List Items */
.sortable-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.column-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
}

.column-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Frozen items have a subtle blue tint */
#frozenColumnsList .column-item {
    background: #f0f7ff;
    border-color: #bfdbfe;
}

.column-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drag-handle {
    color: #cbd5e1;
    cursor: grab;
    display: flex;
    align-items: center;
}

.drag-handle:hover {
    color: #94a3b8;
}

.column-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.column-item-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-action-icon {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-action-icon:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.btn-action-icon.lock-btn:hover, .btn-action-icon.lock-btn.locked {
    color: #3b82f6;
    background: #eff6ff;
}

.btn-action-icon.delete-btn:hover {
    color: var(--danger-color);
    background: #fef2f2;
}

.btn-action-icon.add-btn:hover {
    color: #10b981;
    background: #ecfdf5;
}

/* Right Panel: Data Source Grid */
.auto-fit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.data-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.data-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(91, 79, 244, 0.1);
}

.data-card.promoted {
    opacity: 0.5;
    pointer-events: none;
    background: #f8fafc;
}

/* Sticky column classes */
.sticky-col {
    position: sticky;
    z-index: 10;
    background-color: #ffffff;
}

.sticky-col-header {
    position: sticky;
    z-index: 40 !important;
    background-color: #f8fafc;
}

/* Table scroll wrapper to prevent squeezing */
.table-scroll-container {
    overflow-x: auto;
    width: 100%;
}
.table-scroll-container table {
    min-width: max-content;
}

/* ==========================================
   用户编辑抽屉 (UED) 新版样式
   ========================================== */

/* 调整宽度以避免内容换行 (原 800px -> 540px -> 720px) */
.user-edit-drawer {
    width: 840px;
    max-width: 95vw;
    right: -100vw;
}

body.has-nested-open .user-edit-drawer {
    max-width: 50vw;
}

/* ---- 标头 Header ---- */
.ued-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 24px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}
.ued-header-left { display: flex; flex-direction: column; gap: 6px; }
.ued-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ued-title-row h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
}
.ued-tag {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}
.ued-tag-agent { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.ued-tag-vip   { background: #fdf4ff; color: #9333ea; border: 1px solid #e9d5ff; }

.ued-status-row { display: flex; align-items: center; gap: 8px; }
.ued-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 20px;
}
.ued-status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}
.ued-status-frozen { color: #f59e0b; background: #fefce8; border: 1px solid #fde68a; }
.ued-status-normal  { color: #16a34a; background: #f0fdf4; border: 1px solid #bbf7d0; }
.ued-status-disabled { color: #6b7280; background: #f9fafb; border: 1px solid #d1d5db; }

.ued-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.ued-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 18px;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s, background 0.15s;
}
.ued-close-btn:hover { color: #1e293b; background: #f1f5f9; }

/* ---- 页签 Tabs ---- */
.ued-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    background: #fff;
    flex-shrink: 0;
}

/* ---- Body ---- */
.ued-body {
    flex: 1;
    overflow-y: auto;
    background: #f8fafc;
    padding: 16px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ---- 卡片 Card ---- */
.ued-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.01);
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
}
.ued-form-grid {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    position: relative;
}


.ued-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    padding: 12px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0;
}
.ued-card-subtitle {
    margin-left: auto;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
}

/* ---- 表单网格 ---- */
/* Padding now moved into ued-card for structural separation */
.ued-form-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px;
}
.ued-form-field { display: flex; flex-direction: column; gap: 5px; }
.ued-field-full { grid-column: 1 / -1; }

.ued-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}
input.ued-input, textarea.ued-input {
    width: 100%;
    height: 36px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 0 12px;
    font-size: 13px;
    color: #1e293b;
    background: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.01) inset;
}
input.ued-input:hover {
    border-color: #cbd5e1;
}
input.ued-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.ued-input[readonly] {
    background: #f8fafc;
    color: #64748b;
    cursor: default;
}
.ued-select {
    width: 100%;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
    color: #1e293b;
    background: #fff;
    box-sizing: border-box;
    cursor: pointer;
    appearance: auto;
}
.ued-select:focus {
    outline: none;
    border-color: #6366f1;
}
textarea.ued-textarea {
    width: 100%;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 8px 10px;
    font-size: 13px;
    color: #1e293b;
    background: #fff !important;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.15s;
}
.ued-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Input with button */
.ued-input-with-btn {
    display: flex;
    gap: 8px;
    align-items: center;
}
.ued-input-with-btn .ued-input { flex: 1; }
.ued-input-with-btn .btn {
    height: 34px;
    padding: 0 16px;
    border-radius: 6px;
    background-color: #a78bfa;
    border-color: #a78bfa;
    color: #fff;
}
.ued-input-with-btn .btn:hover {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
}

/* ---- 账户状态 Radio ---- */
.ued-status-radio-group {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    height: 34px;
}
.ued-radio-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    border-right: 1px solid #cbd5e1;
    padding: 0;
    color: #475569;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}
.ued-radio-btn:last-child { border-right: none; }
.ued-radio-btn input[type="radio"] { display: none; }
.ued-radio-btn:has(input:checked),
.ued-radio-btn.ued-radio-active {
    background: #f59e0b;
    color: #fff;
    font-weight: 600;
}
/* Normal checked */
.ued-status-radio-group label:has(input[value="正常"]:checked) {
    background: #22c55e;
    color: #fff;
}
/* Frozen checked */
.ued-status-radio-group label:has(input[value="冻结"]:checked) {
    background: #f59e0b;
    color: #fff;
}
/* Disabled checked */
.ued-status-radio-group label:has(input[value="停用"]:checked) {
    background: #6b7280;
    color: #fff;
}

/* ---- 绑定框 ---- */
.ued-binding-box {
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border: 1px dashed #cbd5e1;
}
.ued-unbound { color: #94a3b8; background: #f8fafc; }
.ued-bound   { color: #16a34a; background: #f0fdf4; border-color: #bbf7d0; }

/* ---- 提现信息表格 ---- */
.ued-withdraw-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
}
.ued-withdraw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    min-width: 580px;
}
.ued-withdraw-table thead tr {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.ued-withdraw-table th {
    padding: 10px 8px;
    color: #64748b;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}
.ued-withdraw-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}
.ued-withdraw-table tbody tr:last-child { border-bottom: none; }
.ued-withdraw-table td {
    padding: 8px 6px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
select.ued-select-sm {
    height: 28px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    padding: 0 4px;
    font-size: 12px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    max-width: 100%;
}
input.ued-input-sm {
    height: 28px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    padding: 0 6px;
    font-size: 12px;
    width: 100%;
    min-width: 140px;
    box-sizing: border-box;
    color: #334155;
    background: #fff !important;
}
.ued-enabled-badge {
    font-size: 12px;
    font-weight: 500;
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    padding: 2px 8px;
}
.ued-withdraw-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: nowrap;
}
.ued-action-del, .ued-action-save, .ued-action-disable {
    height: 26px;
    padding: 0 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.15s;
}
.ued-action-del { background: #ef4444; color: #fff; }
.ued-action-save { background: #3b82f6; color: #fff; }
.ued-action-disable { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.ued-action-del:hover, .ued-action-save:hover { opacity: 0.85; }
.ued-action-disable:hover { background: #e2e8f0; }

/* 会员审核按钮 & 提现信息状态标签 (同步 ued-action-xxx 的样式规范) */
.ued-audit-btn, .ued-status-badge {
    height: 26px;
    padding: 0 10px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ued-audit-btn {
    cursor: pointer;
    transition: opacity 0.15s;
}
.ued-audit-btn:hover { opacity: 0.85; }

/* 审核按钮 */
.ued-audit-btn-pass { background: #10b981; color: #fff; } /* 绿色 通过 */
.ued-audit-btn-reject { background: #ef4444; color: #fff; } /* 红色 拒绝 */
.ued-audit-btn-reset { background: #64748b; color: #fff; } /* 灰色 重置 */

/* 状态标签 */
.ued-status-badge-active { background: #10b981; color: #fff; } /* 绿色 启用 */
.ued-status-badge-disabled { background: #ef4444; color: #fff; } /* 红色 停用 */
/* ---- 提现信息分页 ---- */
.ued-withdraw-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    padding-top: 4px;
}
.ued-withdraw-total strong { color: #1e293b; }
.ued-page-btn {
    width: 26px; height: 26px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #475569;
}
.ued-page-btn:disabled { opacity: 0.4; cursor: default; }
.ued-page-btn:not(:disabled):hover { background: #f1f5f9; }
.ued-page-input {
    width: 36px;
    height: 26px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
    padding: 0 2px;
}

/* ---- Toggle Switch ---- */
.ued-toggle-list { display: flex; flex-direction: column; padding: 0 20px; }
.ued-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid #f1f5f9;
}
.custom-column-item:last-child {
    border-bottom: none;
}

/* ==========================================
   查看用户详情抽屉 (User Detail Drawer) 样式
   ========================================== */

/* 唯读文字显示 */
.ued-readonly-text {
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    min-height: 36px;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0 12px;
    width: 100%;
    box-sizing: border-box;
}

/* 拷贝按钮 */
.ued-copy-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 6px;
}
.ued-copy-btn:hover {
    color: #4f46e5;
    background: #e0e7ff;
}
.ued-copy-btn:active {
    transform: scale(0.9);
}

/* 值与操作按钮同行 */
.ued-value-row {
    display: flex;
    align-items: center;
}

/* 数字超连结 */
.ued-link-num {
    font-size: 14px;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.ued-link-num:hover {
    text-decoration: underline;
}

/* 抽屉内用表格 */
.ued-drawer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ued-drawer-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}
.ued-drawer-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    vertical-align: middle;
}
.ued-drawer-table tr {
    transition: background-color 0.2s ease;
}
.ued-drawer-table tr:hover {
    background-color: #f8fafc;
}
.ued-drawer-table tr:last-child td {
    border-bottom: none;
}
.ued-action-group {
    display: flex;
    gap: 8px;
}
.btn-xs {
    padding: 2px 8px;
    font-size: 12px;
    height: 24px;
    border-radius: 4px;
}

/* 第三层抽屉叠加样式 */
.nested-drawer {
    z-index: 1060; /* Higher than primary drawer */
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    background: #ffffff;
}

.user-detail-tab-item {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}
.user-detail-tab-item:hover { 
    color: #4f46e5; 
}
.user-detail-tab-item.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    font-weight: 600;
}

/* Custom Tooltip */
.ued-tooltip {
    position: relative;
    cursor: help;
}
.ued-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%) translateX(4px);
    background: #1e293b;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.ued-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent #1e293b transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}
.ued-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(8px);
}
.ued-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(3px);
}

/* Tooltip Bottom */
.ued-tooltip.tooltip-bottom::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
}
.ued-tooltip.tooltip-bottom::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-color: transparent transparent #1e293b transparent;
}
.ued-tooltip.tooltip-bottom:hover::after {
    transform: translateX(-50%) translateY(8px);
}
.ued-tooltip.tooltip-bottom:hover::before {
    transform: translateX(-50%) translateY(3px);
}

.ued-toggle-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #334155;
}
.ued-toggle-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}
.ued-toggle-switch input { opacity: 0; width: 0; height: 0; }
.ued-toggle-thumb {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.ued-toggle-thumb::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    left: 3px;
    top: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.ued-toggle-switch input:checked + .ued-toggle-thumb {
    background: #6366f1;
}
.ued-toggle-switch input:checked + .ued-toggle-thumb::before {
    transform: translateX(18px);
}

/* Withdraw toggle disabled (checked) state with "禁" */
.ued-withdraw-toggle input:checked + .ued-toggle-thumb {
    background: #ef4444;
}
.ued-withdraw-toggle input:checked + .ued-toggle-thumb::before {
    content: '禁';
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #ef4444;
    font-weight: bold;
    /* Maintain the translate for the checked state */
    transform: translateX(18px);
}.ds-field .val {
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: right;
}

/* Wallet Detail Modal */
.wallet-detail-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}
.wallet-detail-link:hover {
    text-decoration: underline;
}
.wallet-detail-table-row td {
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 12px;
    text-align: center;
}
.wallet-detail-table-row td:last-child {
    border-right: none;
}
.wallet-detail-table-row:last-child td {
    border-bottom: none;
}

/* Pill Hover Actions */
.draggable-pill .pill-drag-handle,
.draggable-pill .pill-actions-hover {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.draggable-pill:hover .pill-drag-handle,
.draggable-pill:hover .pill-actions-hover {
    opacity: 1;
    visibility: visible;
}

/* Adjust layout so drag handle takes space even when hidden, to prevent jumping */
.draggable-pill .pill-drag-handle {
    margin-right: -4px; /* Slight adjustment to pull checkbox closer if needed */
}

/* Drag Drop Indication */
.drag-over-target {
    outline: 2px dashed #6366f1 !important;
    outline-offset: -2px;
    background-color: #eef2ff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    transition: all 0.2s ease;
}

/* Real DOM Placeholder */
.drag-placeholder {
    display: block;
    height: 56px;
    border: 2px dashed #6366f1;
    background-color: #eef2ff;
    border-radius: 8px;
    margin-bottom: 16px;
    box-sizing: border-box;
    flex-shrink: 0;
    pointer-events: none;
}

.drag-placeholder-pill {
    display: inline-block;
    height: 34px;
    width: 90px;
    border: 2px dashed #6366f1;
    background-color: #eef2ff;
    border-radius: 4px;
    box-sizing: border-box;
    flex-shrink: 0;
    vertical-align: middle;
    pointer-events: none;
}

/* Blocked drop: card already in main table */
.drop-blocked {
    outline: 2px dashed #fca5a5;
    outline-offset: -4px;
    background-color: #fef2f2;
    transition: background-color 0.15s, outline-color 0.15s;
}

.drag-block-hint {
    position: fixed;
    z-index: 100000;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #1e293b;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.drag-block-hint i {
    color: #f87171;
    font-size: 14px;
}

/* Blocked drop: default main-table card dragged over the expanded-card panel */
.drop-blocked-muted {
    outline: 2px dashed #cbd5e1;
    outline-offset: -4px;
    background-color: #f1f5f9;
    transition: background-color 0.15s, outline-color 0.15s;
}

.drop-blocked-muted > * {
    opacity: 0.5;
    transition: opacity 0.15s;
}

.drag-block-hint.is-muted i {
    color: #94a3b8;
}

/* Lock marker on default main-table cards */
.default-card-lock {
    color: #94a3b8;
    font-size: 12px;
    cursor: help;
}

/* 重置 button: armed (waiting for second click) state */
#customColumnDrawer .btn.is-confirming {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

/* ── Expanded detail cards: content-driven width with min/max clamps ──
   Applies to all three data states (无数据 / 正常 / 极限):
   - 无数据: values are "-", cards fall back to their min-width
   - 正常:   cards hug their content, label↔value gap never below --dc-gap-min
   - 极限:   cards stop at max-width, overflowing values truncate with "…" (full text on hover) */
:root {
    --dc-gap-min: 24px;        /* min space between a label and its value */
    --dc-list-min: 200px;      /* single-column cards: 额度 / 成长与积分 / 推荐关系 / 余额宝 / 信贷 */
    --dc-list-max: 320px;
    --dc-grid2-col-min: 200px; /* 基本资料: each of the two columns */
    --dc-grid2-max: 640px;
    --dc-dw-min: 600px;        /* 存取款资料 */
    --dc-dw-max: 920px;
}

.detail-card.dc-list,
.detail-card.dc-grid2,
.detail-card.dc-dw {
    width: max-content;
    box-sizing: border-box;
}

.detail-card.dc-list {
    min-width: var(--dc-list-min);
    max-width: var(--dc-list-max);
}

.detail-card.dc-grid2 {
    min-width: calc(var(--dc-grid2-col-min) * 2 + 32px + 32px);
    max-width: var(--dc-grid2-max);
}

.detail-card.dc-dw {
    min-width: var(--dc-dw-min);
    max-width: var(--dc-dw-max);
}

.dc-grid2 .grid-2-col {
    grid-template-columns: repeat(2, minmax(var(--dc-grid2-col-min), 1fr));
    column-gap: 32px;
}

.dc-list .detail-card-header,
.dc-grid2 .detail-card-header {
    white-space: nowrap;
    gap: var(--dc-gap-min);
}

.dc-list .flex-list-col > .ds-field,
.dc-grid2 .grid-2-col > .ds-field {
    gap: var(--dc-gap-min);
    align-items: center;
}

.dc-list .ds-field > .lbl,
.dc-grid2 .ds-field > .lbl {
    margin-right: 0;
}

.dc-list .ds-field > :not(.lbl),
.dc-grid2 .ds-field > :not(.lbl) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
    text-align: right;
}

/* 用户标签: fill top-to-bottom, max 4 rows per column, then start a new column */
.detail-card[data-category="用户标签"] {
    width: max-content;
    min-width: 200px;
    box-sizing: border-box;
}

.tags-column-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(var(--tag-rows, 4), auto);
    grid-auto-columns: max-content;
    gap: 8px;
    justify-items: start;
    align-content: start;
}

.tags-column-grid .user-custom-tag {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 展开列：明细卡片区固定在表格可视范围内（横向卷动表格时不跟着卷走），宽度＝可视宽度，
   不参与表格栏宽计算（展开／收合不改变栏宽）；卡片过多时在卡片区内横向卷动 */
.expanded-detail-row > td > .detail-cards-wrapper {
    position: sticky;
    left: 16px;
    width: var(--detail-visible-width, 0px);
    min-width: 0;
    box-sizing: border-box;
}

/* 三方余额刷新中：金额改为骨架占位符 */
.amount-loading-placeholder {
    height: 14px;
    vertical-align: middle;
}

.refresh-link.is-loading,
.refresh-icon-compact.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* 用户标签精准搜寻：无符合结果 */
.custom-select-multi .select-options li.search-empty-item {
    justify-content: center;
    color: #94a3b8;
    cursor: default;
    pointer-events: none;
}

/* 筛选列与工具列的下拉选单置于页面最上层：高于表格固定栏位(40)与底部统计列(95)，低于遮罩(100)及抽屉／弹窗 */
.filter-card .select-options,
.filter-card .dropdown-menu,
#batchOperationsMenu,
#exportDataMenu {
    z-index: 99 !important;
}

/* 展开列的大头照：沿用 detail-card 的排序／显示控制，但不套用卡片外框 */
.detail-card.detail-card-avatar {
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 0;
    min-width: 0;
}

/* 大头照加入主表时的栏位：与展开列大头照同样式的小尺寸版本 */
.table-avatar-initial {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #6366f1;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

td[data-col="ds_avatar"],
th[data-col="ds_avatar"] {
    text-align: center;
}

/* 展开模式表头不断行（自展开卡片加入主表的短标签，如「大头照」「真实姓名」不再逐字换行） */
#userTable:not(.compact-mode-table) thead th {
    white-space: nowrap;
}

/* ==========================================
   底部统计栏：一般情况维持单行（标签与金额并排、48px）；
   放不下单行时（极限金额／窄画面）由 script.js 加上 .stats-wrap：
   改为「标签在上、金额在下」，金额可在千分位后换行，统计栏整体增高
   ========================================== */
.bottom-stats-bar:not(.stats-wrap) .stat-item {
    white-space: nowrap; /* 单行模式：不让标签逐字断行，放不下时改用 .stats-wrap */
}

.bottom-stats-bar.stats-wrap {
    height: auto;
    min-height: 48px;
    padding: 8px 24px;
    box-sizing: border-box;
}

.bottom-stats-bar.stats-wrap .bottom-stats-left {
    flex: 1 1 auto;
    min-width: 0;
    align-items: stretch;
}

.bottom-stats-bar.stats-wrap .stat-item {
    flex: 0 1 auto;
    min-width: min-content;    /* 最窄只缩到标签宽度，由金额换行吸收空间 */
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
}

.bottom-stats-bar.stats-wrap .stat-label {
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}

.bottom-stats-bar.stats-wrap .stat-value {
    line-height: 1.35;
    overflow-wrap: break-word; /* 优先在千分位逗号后换行（script.js 插入 <wbr>），仍放不下才断字 */
    word-break: normal;
}

.bottom-stats-bar.stats-wrap .stat-unit {
    white-space: nowrap;
}

.bottom-stats-bar.stats-wrap .stat-divider {
    align-self: stretch;
    height: auto;
    min-height: 16px;
}

/* 表格底部预留空间 = 统计栏实际高度（由 script.js 量测写入 --stats-bar-height） */
.table-wrapper {
    padding-bottom: calc(var(--stats-bar-height, 48px) + 8px);
}

/* 极窄宽度（标签本身已放不下一列）：统计项改为多列排列 */
@media (max-width: 700px) {
    .bottom-stats-bar.stats-wrap .bottom-stats-left {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .bottom-stats-bar.stats-wrap .bottom-stats-left .stat-divider {
        display: none;
    }
}

/* ==========================================
   筛选标签区：限高与收合（标签过多时不再挤掉下方列表）
   ========================================== */
.current-filters .filter-tags {
    flex: 1 1 0;          /* 与「展开筛选」、分页同一列，标签区吃剩余宽度 */
    min-width: 0;
    align-items: center;
}

/* 单一标签最多一行，超出以省略号显示（完整内容见滑过提示） */
.filter-tag {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.filter-tag-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-tag i {
    flex-shrink: 0;
}

/* 展开全部标签：最高 30% 视窗，于标签区内卷动 */
.filter-tags.is-expanded {
    max-height: 30vh;
    overflow-y: auto;
    padding-right: 4px;
}

.filter-tags-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px dashed #c7d2fe;
    border-radius: 16px;
    background: #ffffff;
    color: #4f46e5;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.filter-tags-toggle:hover {
    background: #eef2ff;
}

/* 跨页勾选提示 */
.selection-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 8px;
    border-radius: 4px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 12px;
    white-space: nowrap;
}

.selection-hint i {
    font-size: 14px;
    color: #3b82f6;
}

.selection-hint-sub {
    color: #64748b;
}

.selection-hint-clear {
    border: none;
    background: none;
    padding: 0;
    color: #2563eb;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

.selection-hint-clear:hover {
    color: #1d4ed8;
}

/* 筛选条件被收起时的「展开筛选」 */
.btn-show-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;          /* 与「条/页」下拉、分页按钮同高 */
    padding: 0;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background: #ffffff;
    color: #475467;
    font-size: 14px;
    cursor: pointer;
}

.btn-show-filters:hover {
    background: #f9fafb;
    color: #4f46e5;
}

/* 保底：视窗过矮时整页可卷动（列表区最小高度由 script.js 写入 .app-container 的 min-height） */
.main-content {
    overflow-x: hidden;
    overflow-y: auto;
}

/* ==========================================
   筛选标签列间距：展开／收起筛选列时一致，并尽量压缩让列表显示更多
   标签列上下皆为 8px（展开时筛选卡片不再另留下边距）
   ========================================== */
.filter-card {
    margin-bottom: 0;
}

.current-filters {
    padding: 8px 24px;
    gap: 12px;
    align-items: flex-start;   /* 多行标签时，分页对齐第一行 */
}

/* 收起筛选列时，上方工具列有 -1px 下边距：补回 1px，让标签上方同为 8px */
.filter-card.collapsed + .table-card .current-filters {
    padding-top: 9px;
}

.current-filters .pagination-container {
    margin-top: 1px;           /* 24px 高的分页与 26px 高的标签垂直置中 */
}

.current-filters .filter-tags {
    gap: 6px;
}

.filter-tag {
    padding: 2px 10px;
    line-height: 20px;
    font-size: 13px;
}

.filter-tags-toggle {
    padding: 2px 10px;
    line-height: 20px;
}

.current-filters .btn-clear-all-tags {
    padding: 0 4px !important;
    height: 26px;              /* 与标签同高，避免撑高整列 */
    min-height: 26px;
    display: inline-flex;
    align-items: center;
}
