/* ������ʽ���� */
/* RelaXR 管理后台样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fbfbfd;
    color: #1d1d1f;
    font-size: 14px;
    line-height: 1.47;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 20px 32px;
}

.header-section.unified {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #dee2e6;
    display: block;
}

/* 头部布局：三列布局 */
.header-layout {
    display: grid;
    grid-template-columns: 200px 1fr 500px;
    gap: 20px;
    align-items: start;
}

/* 左侧：标题和用户信息（占据两行高度） */
.header-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
}

.header-left .app-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

/* 中间：统计信息 */
.stats-section {
    min-width: 0;
}

/* 右侧：上传区域 */
.upload-section.unified {
    min-width: 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #dee2e6;
}

.app-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
}

/* 简洁用户信息：位于标题右侧 */
.simple-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6c757d;
    margin: 0;
    padding: 0;
}

.simple-user-info .username {
    font-weight: 600;
    color: #495057;
}

.simple-user-info .user-role {
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}

.simple-user-info .user-role.role-admin {
    background: #28a745;
    color: white;
}

.simple-user-info .user-role.role-user {
    background: #6c757d;
    color: white;
}

.simple-user-info .logout-link {
    color: #6c757d;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.simple-user-info .logout-link:hover {
    color: #dc3545;
}

/* 紧凑型上传数据模块 */
.upload-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-height: 32px;
}

.upload-section.unified {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    display: block;
    backdrop-filter: blur(10px);
}

.upload-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 12px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

.week-input {
    padding: 4px 6px;
    border: 1px solid #ced4da;
    border-radius: 2px;
    font-size: 10px;
    background: white;
    height: 24px;
    min-width: 80px;
}

.week-input.unified {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 3px;
    min-width: 100px;
    height: 26px;
}

/* ͳ����Ϣ�o�ܲ�局 */
.inventory-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-item {
    min-width: 120px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-item.total-stat {
    background: linear-gradient(135deg, #6f42c1 0%, #6610f2 100%);
    color: white;
    border: 2px solid #5a32a3;
    box-shadow: 0 2px 6px rgba(111, 66, 193, 0.3);
}

.stat-item.total-stat .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.stat-item.total-stat .stat-sku,
.stat-item.total-stat .stat-style,
.stat-item.total-stat .stat-amount {
    color: white;
}

.stat-label {
    font-size: 10px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-numbers-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.stat-sku, .stat-style {
    font-size: 10px;
    font-weight: 600;
    color: #495057;
}

.stat-amount {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
}

.inventory-bg {
    background: #d1ecf1;
    color: #0c5460;
}

.sales-bg {
    background: #d4edda;
    color: #155724;
}

.user-welcome {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.username {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.user-role {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.role-admin {
    background: #fff3cd;
    color: #856404;
}

.role-user {
    background: #d1ecf1;
    color: #0c5460;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.logout-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* ========== 登录界面 ========== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: cyberGlow 6s ease-in-out infinite alternate;
}

.login-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        linear-gradient(45deg, transparent 48%, rgba(0, 255, 255, 0.1) 50%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(255, 0, 255, 0.1) 50%, transparent 52%);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

@keyframes cyberGlow {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.7;
    }
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-60px, -60px);
    }
}

.login-box {
    background: rgba(15, 12, 41, 0.85);
    backdrop-filter: blur(25px);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(0, 255, 255, 0.3),
        0 0 30px rgba(0, 255, 255, 0.2),
        0 0 60px rgba(255, 0, 255, 0.1);
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: cyberSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

@keyframes cyberSlideIn {
    0% {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.login-box h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #00ffff 0%, #ff00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.login-subtitle {
    color: #8b8b9d;
    font-size: 14px;
    margin-bottom: 40px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.input-group {
    position: relative;
}

.login-input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    font-family: 'Courier New', monospace;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.login-input:focus {
    outline: none;
    border-color: #00ffff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.2);
    transform: translateY(-1px);
}

.login-input::placeholder {
    color: #8b8b9d;
    font-weight: 400;
    font-family: 'Courier New', monospace;
}

.login-btn {
    background: linear-gradient(135deg, #00ffff 0%, #ff00ff 100%);
    color: #0f0c29;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s;
}

.login-btn:hover:not(:disabled)::before {
    left: 100%;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    letter-spacing: 2px;
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    padding: 12px 16px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin-top: 8px;
    font-weight: 500;
}

.success-message {
    color: #28a745;
    font-size: 14px;
    padding: 12px 16px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    margin-top: 8px;
    font-weight: 500;
}
.user-management-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

/* �û�����ͷ�� */
.user-management-header {
    margin-bottom: 16px;
    padding: 24px 24px 0;
    background: transparent;
    color: inherit;
    border-bottom: none;
}

.user-management-header h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px 0;
    text-shadow: none;
}

.user-management-header p {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

/* ����û���� */
.add-user-form {
    padding: 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.add-user-form h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-user-form h4::before {
    content: '+';
    background: #28a745;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

.form-input {
    padding: 12px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
    padding: 12px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* �û��б� */
.user-list-container {
    padding: 0;
}

.user-list-header {
    padding: 16px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-list-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.user-count {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

.user-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    font-size: 14px;
}

.user-table td {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.user-table tr:hover {
    background: #f8f9fa;
}

/* �û�״̬ */
.user-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-active .status-dot {
    background: #28a745;
}

.status-inactive .status-dot {
    background: #dc3545;
}

/* �û���ɫ */
.user-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.role-admin {
    background: #fff3cd;
    color: #856404;
}

.role-user {
    background: #d1ecf1;
    color: #0c5460;
}

/* ������ť */
.user-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-toggle-status {
    background: #17a2b8;
    color: white;
}

.btn-toggle-status:hover {
    background: #138496;
    transform: translateY(-1px);
}

.btn-reset-password {
    background: #ffc107;
    color: #212529;
}

.btn-reset-password:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* ����״̬ */
.loading-users {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ��״̬ */
.empty-users {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-users-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ��Ӧʽ��� */
@media (max-width: 768px) {
    .user-management-container {
        margin: 10px;
        border-radius: 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .user-table {
        display: block;
        overflow-x: auto;
    }

    .user-actions {
        flex-direction: column;
        gap: 4px;
    }

    .btn-action {
        justify-content: center;
    }
}
.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-close-btn:hover {
    background: #dc3545;
    color: white;
    transform: rotate(90deg);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* ģ̬�򱳾����� */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 1200px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, -apple-system, BlinkMacSystemFont;
    background: #f4f7f9;
    color: #333;
    font-size: 12px;
    line-height: 1.4;
}

.container {
    max-width: 2400px;
    margin: 0 auto;
    padding: 20px;
}
.file-inputs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-inputs.unified {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.file-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.file-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 50px;
}

.file-group.unified {
    gap: 4px;
    min-height: 48px;
}

.file-group label {
    font-size: 10px;
    color: #6a737d;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 2px;
}

.file-group.unified label {
    font-size: 10px;
    color: #495057;
    margin-bottom: 2px;
}

.file-group.required label {
    color: #007bff;
}

.file-group input[type="file"] {
    font-size: 9px;
    padding: 5px 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 100%;
    background: white;
    height: 28px;
    line-height: 1.2;
    overflow: visible;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    box-sizing: border-box;
}

.file-group.unified input[type="file"] {
    font-size: 9px;
    padding: 5px 6px;
    width: 110px;
    height: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
}

.file-group.required label::after,
.file-group.unified.required label::after {
    content: " *";
    color: #dc3545;
    font-size: 8px;
}

/* 紧凑上传按钮 */
.upload-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-upload {
    padding: 5px 10px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    height: 26px;
    min-width: 65px;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.3);
}

.btn-upload.unified {
    padding: 6px 14px;
    font-size: 11px;
    min-width: 75px;
    height: 28px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 1px 4px rgba(40, 167, 69, 0.3);
}

.btn-upload:hover:not(:disabled) {
    background: #0056b3;
}

.btn-upload:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

.btn-loading {
    background: #ffc107;
    color: #333;
}

/* ====================================
   ��Ϣ�ͼ���״̬
   ==================================== */
.message-box {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.message-box.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-box.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.filter-section {
    background: white;
    padding: 10px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 2px 0;
}

.filter-group-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.filter-group-row:last-child {
    margin-bottom: 0;
}

.filter-group-row .filter-group {
    margin-bottom: 0;
}

.search-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.search-section .search-input-container {
    flex: 1;
    max-width: 300px;
}

.search-section .search-input {
    width: 100%;
    min-width: 200px;
}

/* ͳһɸѡ�������ʽ - �����߶��� */
.filter-section .filter-controls .search-input {
    width: 200px !important;
    min-width: 200px !important;
    height: 28px !important;
    line-height: 18px !important;
    display: flex !important;
    align-items: center !important;
}

.filter-section .filter-controls .combined-filter-group {
    min-width: 200px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
}

.filter-section .filter-controls .combined-filter-input {
    min-width: 200px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    line-height: 18px !important;
}

.filter-section .filter-controls .filter-select {
    width: 120px !important;
    min-width: 120px !important;
    height: 28px !important;
    line-height: 18px !important;
    display: flex !important;
    align-items: center !important;
}

.filter-section .filter-controls .sort-order-btn {
    width: 60px !important;
    min-width: 60px !important;
    height: 28px !important;
    line-height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.filter-section .filter-controls .stats-info {
    margin-left: auto;
    white-space: nowrap;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    line-height: 18px !important;
}

/* ��Ӧʽ��� - �ֻ��� */
@media (max-width: 768px) {
    .filter-section .filter-controls {
        gap: 8px;
    }

    .filter-section .filter-controls .filter-group {
        flex-wrap: wrap;
    }

    .filter-section .filter-controls .search-input {
        width: 100% !important;
        min-width: 100% !important;
    }

    .filter-section .filter-controls .filter-select {
        width: 100% !important;
        min-width: 100% !important;
    }

    .filter-section .filter-controls .sort-order-btn {
        width: 100% !important;
        min-width: 100% !important;
    }

    .filter-section .filter-controls .stats-info {
        margin-left: 0;
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.filter-select {
    padding: 5px 8px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 11px;
    background: white;
    min-width: 110px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 8px;
    line-height: 18px !important;
    display: flex !important;
    align-items: center !important;
}

/* ��������ʽ */
.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 5px 24px 5px 8px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 11px;
    width: 140px;
    transition: all 0.2s ease;
    line-height: 18px !important;
    display: flex !important;
    align-items: center !important;
}

.search-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.2);
}

.clear-search-btn {
    position: absolute;
    right: 6px;
    background: transparent;
    color: #6c757d;
    border: none;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.clear-search-btn:hover {
    color: #343a40;
}

.sort-order-btn {
    padding: 5px 8px;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    min-width: 60px;
    transition: background-color 0.2s;
}

.sort-order-btn:hover {
    background: #e9ecef;
}

.stats-info {
    font-size: 11px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 3px;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.load-more-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #6c757d;
    font-size: 12px;
    gap: 8px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.load-complete {
    text-align: center;
    padding: 15px;
    color: #28a745;
    font-size: 12px;
    font-weight: 500;
    background: #f8f9fa;
    border-top: 1px solid #e1e4e8;
}

.no-filtered-data {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
}

.search-no-result {
    margin-top: 10px;
    color: #dc3545;
    font-weight: 500;
}

.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
}
.view-toggle-section {
    margin-bottom: 16px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.view-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid #e1e4e8;
}

.view-toggle-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.view-toggle-btn.active {
    background: #007bff;
    color: white;
}

.view-toggle-btn:hover:not(.active) {
    background: #e9ecef;
}

/* ====================================
   ����ά�ȱ����ʽ
.dimension-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.dimension-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-table-group {
        padding: 12px;
    }

    .category-table {
        font-size: 12px;
    }
}

.product-center-scope-banner {
    margin: 12px 0;
    padding: 10px 14px;
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 6px;
    font-size: 13px;
    color: #0c5460;
    line-height: 1.5;
}

.product-center-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
    container-type: inline-size;
    container-name: product-center;
}

@media (max-width: 1800px) {
    .product-center-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1400px) {
    .product-center-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .product-center-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .product-center-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .product-center-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 400px) {
    .product-center-grid {
        grid-template-columns: 1fr;
    }
}

.pc-style-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.pc-sku-modal {
    width: min(96vw, 1120px);
    max-width: 96vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.pc-sku-modal-header {
    padding: 16px 48px 12px 20px;
    border-bottom: 1px solid #e9ecef;
}

.pc-sku-modal-header h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.pc-sku-modal-sub {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.5;
}

.pc-sku-modal-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.pc-sku-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-height: calc(88vh - 120px);
    overflow-y: auto;
    padding: 12px 16px 16px;
    margin: 0;
    border-top: none;
    container-type: inline-size;
    container-name: pc-sku-modal;
}

@media (max-width: 900px) {
    .pc-sku-modal-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .pc-sku-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 400px) {
    .pc-sku-modal-grid {
        grid-template-columns: 1fr;
    }
}

/* SKU 弹窗卡片：与产品中心款式卡片同构 */
.pc-sku-modal-grid .pc-sku-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.pc-sku-modal-grid .pc-sku-card:hover {
    border-color: #ced4da;
}

.pc-sku-modal-grid .pc-sku-card-head {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 6px;
}

.pc-sku-modal-grid .pc-sku-image-wrap {
    width: min(100%, 25cqw);
    margin: 0 auto;
    aspect-ratio: 1;
    height: auto;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@supports not (width: 1cqw) {
    .pc-sku-modal-grid .pc-sku-image-wrap {
        width: 100%;
    }
}

.pc-sku-modal-grid .pc-sku-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pc-sku-modal-grid .pc-sku-no-image {
    font-size: 11px;
    color: #adb5bd;
}

.pc-sku-modal-grid .pc-sku-meta {
    min-width: 0;
}

.pc-sku-modal-grid .pc-sku-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.pc-sku-modal-grid .pc-sku-code {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    color: #212529;
    word-break: break-all;
}

.pc-sku-modal-grid .new-badge,
.pc-sku-modal-grid .thumb-combo-badge {
    font-size: 8px;
    padding: 1px 4px;
}

.pc-sku-modal-grid .pc-sku-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 2px;
    max-height: 18px;
    overflow: hidden;
}

.pc-sku-modal-grid .pc-sku-tags .category-badge {
    font-size: 9px;
    padding: 1px 4px;
    line-height: 1.2;
}

.pc-sku-modal-grid .pc-sku-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0;
    font-size: 10px;
}

.pc-sku-modal-grid .pc-sku-stats div {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.pc-sku-modal-grid .pc-sku-stats dt {
    margin: 0;
    color: #6c757d;
    font-weight: 500;
    font-size: 10px;
}

.pc-sku-modal-grid .pc-sku-stats dd {
    margin: 0;
    font-weight: 700;
    color: #212529;
    font-size: 10px;
}

.pc-sku-modal-grid .pc-sku-wholesale-block {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #eee;
    font-size: 10px;
}

.pc-sku-modal-grid .pc-sku-wholesale-label {
    display: block;
    color: #6c757d;
    font-size: 10px;
    margin-bottom: 2px;
}

.pc-sku-modal-grid .pc-wholesale-display {
    font-size: 10px;
    max-width: 100%;
    word-break: break-all;
}

.pc-sku-modal-grid .pc-wholesale-edit {
    gap: 4px;
}

.pc-sku-modal-grid .pc-wholesale-input {
    width: 100%;
    max-width: 100%;
    font-size: 10px;
    padding: 3px 5px;
}

.pc-sku-modal-grid .pc-wholesale-save,
.pc-sku-modal-grid .pc-wholesale-cancel,
.pc-sku-modal-grid .pc-wholesale-clear {
    padding: 2px 6px;
    font-size: 9px;
}

.pc-style-card-head {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 10px;
}

.product-center-grid .pc-style-card-head {
    padding: 8px;
    gap: 6px;
}

.pc-style-image-wrap {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pc-style-img-badge {
    position: absolute;
    left: 4px;
    bottom: 4px;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(21, 101, 192, 0.85);
    color: #fff;
    font-weight: 600;
    z-index: 1;
}

.pc-style-gallery-edit {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: #1565c0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    opacity: 0.88;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.pc-style-image-wrap:hover .pc-style-gallery-edit {
    opacity: 1;
}

.pc-style-gallery-edit:hover {
    transform: scale(1.06);
    background: #fff;
}

.pc-style-delete-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: #c62828;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.pc-style-delete-btn:hover {
    background: #ffebee;
}

.pc-sku-modal-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pc-sku-modal-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pc-sku-delete-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #fff3e0;
    border-radius: 6px;
    font-size: 13px;
}

.pc-sku-card {
    position: relative;
}

.pc-sku-card--selected {
    outline: 2px solid #ff9800;
    background: #fff8e1;
}

.pc-sku-delete-check {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    background: #fff;
    padding: 4px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.pc-sku-delete-btn {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 11px;
}

.style-gallery-modal {
    width: 560px;
    max-width: 96vw;
    max-height: 90vh;
    overflow-y: auto;
}

.style-gallery-lead {
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
}

.style-gallery-status {
    margin: 0 20px 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
}

.style-gallery-status--success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.style-gallery-status--error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.style-gallery-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px 12px;
}

.style-gallery-slot {
    position: relative;
    width: 100px;
    flex-shrink: 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    transition: box-shadow 0.25s, border-color 0.25s;
}

.style-gallery-slot.is-highlight {
    border-color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.35);
}

.style-gallery-slot-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2e7d32;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.style-gallery-slot-img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    display: block;
}

.style-gallery-slot-actions {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    background: #fff;
    border-top: 1px solid #eee;
}

.style-gallery-slot-actions button {
    border: 1px solid #ced4da;
    background: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
}

.style-gallery-slot-actions .slot-remove {
    color: #c62828;
    border-color: #ffcdd2;
}

.style-gallery-slot--add {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 128px;
    border-style: dashed;
    border-color: #90caf9;
    background: #f3f9ff;
}

.style-gallery-slot--add.is-busy {
    opacity: 0.55;
    pointer-events: none;
}

.style-gallery-slot--pending {
    min-height: 128px;
    border-style: dashed;
    border-color: #ffb74d;
}

.style-gallery-slot-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    font-weight: 600;
    color: #e65100;
}

.style-gallery-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid #ffe0b2;
    border-top-color: #ff9800;
    border-radius: 50%;
    animation: bh-spin 0.7s linear infinite;
}

@keyframes bh-spin {
    to { transform: rotate(360deg); }
}

.style-gallery-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #1565c0;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    padding: 12px 8px;
    width: 100%;
}

.style-gallery-upload-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 22px;
    line-height: 36px;
    font-weight: 400;
}

.style-gallery-url-row {
    display: flex;
    gap: 8px;
    padding: 0 20px 8px;
}

.style-gallery-url-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 13px;
}

.style-gallery-count {
    padding: 0 20px 8px;
    font-size: 12px;
    color: #6c757d;
}

/* 边长 = 4 列全宽方图的一半（约为产品中心区域宽度的 1/8） */
.product-center-grid .pc-style-image-wrap {
    width: min(100%, 12.5cqw);
    margin: 0 auto;
    aspect-ratio: 1;
    height: auto;
    border-radius: 6px;
}

@supports not (width: 1cqw) {
    .product-center-grid .pc-style-image-wrap {
        width: 50%;
    }
}

.pc-style-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pc-style-no-image {
    font-size: 13px;
    color: #adb5bd;
}

.product-center-grid .pc-style-no-image {
    font-size: 11px;
}

.pc-style-meta {
    min-width: 0;
}

.pc-style-title-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.pc-style-code {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #212529;
    word-break: break-all;
}

.product-center-grid .pc-style-code {
    font-size: 11px;
    line-height: 1.25;
}

.product-center-grid .pc-style-index {
    font-size: 10px;
}

.product-center-grid .pc-style-groups {
    margin: 2px 0 4px;
    font-size: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-center-grid .pc-style-tags {
    margin-bottom: 4px;
    gap: 2px;
    max-height: 18px;
    overflow: hidden;
}

.product-center-grid .pc-style-tags .category-badge,
.product-center-grid .pc-style-tags .no-category {
    font-size: 9px;
    padding: 1px 4px;
    line-height: 1.2;
}

.product-center-grid .pc-style-stats {
    font-size: 10px;
    gap: 4px 8px;
}

.product-center-grid .pc-style-stats dt {
    font-size: 10px;
}

.product-center-grid .pc-style-stats dd {
    font-size: 10px;
}

.pc-stat-margin dd {
    font-weight: 700;
}

.pc-style-index {
    font-size: 12px;
    color: #adb5bd;
}

.pc-style-groups {
    margin: 4px 0 6px;
    font-size: 12px;
    color: #6c757d;
}

.pc-style-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.pc-style-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin: 0;
    font-size: 13px;
}

.pc-style-stats div {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.pc-style-stats dt {
    margin: 0;
    color: #6c757d;
    font-weight: 500;
}

.pc-style-stats dd {
    margin: 0;
    font-weight: 700;
    color: #212529;
}

.pc-expand-btn {
    grid-column: 1 / -1;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #f8f9fa;
    color: #495057;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.pc-expand-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.pc-style-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.product-center-grid .pc-style-actions {
    flex-direction: row;
    gap: 4px;
}

.product-center-grid .pc-expand-btn {
    grid-column: auto;
    width: auto;
    flex: 1;
    min-width: 0;
    padding: 4px 5px;
    font-size: 10px;
    line-height: 1.2;
    border-radius: 4px;
}

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

@media (max-width: 600px) {
    .pc-sku-grid {
        grid-template-columns: 1fr;
    }
}

.pc-sku-card {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    align-items: flex-start;
}

.pc-sku-card:hover {
    background: #fff;
    border-color: #ced4da;
}

.pc-sku-image-wrap {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-sku-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pc-sku-no-image {
    font-size: 12px;
    color: #adb5bd;
}

.pc-sku-body {
    flex: 1;
    min-width: 0;
    font-size: 12px;
}

.pc-sku-code-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.pc-sku-code {
    font-weight: 700;
    font-size: 13px;
    color: #212529;
    word-break: break-all;
}

.pc-sku-fields {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pc-sku-fields li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
    border-bottom: 1px dashed #eee;
}

.pc-sku-fields li:last-child {
    border-bottom: none;
}

.pc-field-label {
    color: #6c757d;
    flex-shrink: 0;
}

.pc-missing-cost {
    color: #dc3545;
    font-weight: 600;
}

.pc-margin-high {
    color: #155724;
    font-weight: 600;
}

.pc-margin-mid {
    color: #856404;
    font-weight: 600;
}

.pc-margin-low {
    color: #6c757d;
    font-weight: 600;
}

.pc-margin-negative {
    color: #dc3545;
    font-weight: 600;
}

.pc-wholesale-toolbar {
    margin-bottom: 8px;
}

.pc-wholesale-toolbar .filter-controls {
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.pc-wholesale-file-input {
    font-size: 13px;
    max-width: 220px;
}

.pc-wholesale-row {
    flex-direction: column;
    align-items: stretch !important;
    gap: 4px !important;
}

.pc-wholesale-display {
    border: none;
    background: transparent;
    padding: 0;
    text-align: left;
    cursor: pointer;
    color: #0d6efd;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pc-wholesale-display:hover {
    text-decoration: underline;
}

.pc-edit-hint {
    font-size: 11px;
    opacity: 0.7;
}

.pc-wholesale-edit {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.pc-wholesale-input {
    width: 88px;
    padding: 4px 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
}

.pc-wholesale-save,
.pc-wholesale-cancel,
.pc-wholesale-clear {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    background: #fff;
    cursor: pointer;
}

.pc-wholesale-save {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.pc-wholesale-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pc-wholesale-clear {
    color: #dc3545;
    border-color: #f5c2c7;
}

.product-center-section .load-more-btn {
    margin: 16px auto 8px;
    display: block;
    padding: 8px 20px;
    border: 1px solid #007bff;
    background: #fff;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
}

.product-center-section .load-more-btn:hover {
    background: #007bff;
    color: #fff;
}

.category-badge {
    display: inline-block;
    background: #e7f1ff;
    color: #0d6efd;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}
.no-category {
    display: inline-block;
    font-size: 11px;
    color: #6c757d;
    font-style: italic;
}
.new-badge {
    background: #e74c3c;
    color: white;
    font-size: 8px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
}
.cost-warning-badge {
    color: #ff6b35;
    font-size: 12px;
    font-weight: bold;
}
.thumb-combo-badge {
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
    color: #fff;
    background: #6f42c1;
}
.header-layout--compact {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.app-top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 20px;
}

.data-import-panel {
    background: #fff;
    border: 2px solid #0d6efd;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(13, 110, 253, 0.12);
}

.data-import-panel .panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #0d47a1;
    margin: 0 0 6px;
}

.data-import-panel .panel-hint {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 14px;
    line-height: 1.5;
}

.data-import-panel .panel-hint strong {
    color: #212529;
}

.data-import-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 20px;
}

.data-import-row .week-block label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

.data-import-row .week-input.unified {
    min-width: 160px;
    height: 36px;
    font-size: 14px;
    padding: 6px 10px;
}

.upload-file-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    flex: 1;
}

.upload-file-row .file-group {
    flex: 1;
    min-width: 180px;
}

.upload-file-row .btn-upload.unified {
    width: 100%;
    min-height: 36px;
    font-size: 13px;
    font-weight: 600;
}

.no-data-message {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 10px;
    border: 1px dashed #ced4da;
    color: #6c757d;
}

.no-data-message p {
    margin: 8px 0;
    font-size: 14px;
}

.no-data-message p:first-child {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

@media (max-width: 900px) {
    .header-layout {
        grid-template-columns: 1fr;
    }
}

/* 播货 */
.broadcast-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 12px;
    padding: 10px 12px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    align-items: center;
}

.broadcast-bar-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

.broadcast-bar-btn--primary {
    background: #ff6f00;
    border-color: #ff6f00;
    color: #fff;
    font-weight: 600;
}

.broadcast-bar-btn--primary:hover {
    background: #e65100;
}

.product-center-grid .pc-broadcast-style-btn {
    flex: 1;
    min-width: 0;
    padding: 4px 5px;
    font-size: 10px;
    line-height: 1.2;
    border-radius: 4px;
    border: 1px solid #ff9800;
    background: #fff3e0;
    color: #e65100;
    cursor: pointer;
}

.product-center-grid .pc-broadcast-style-btn:hover {
    background: #ffe0b2;
}

.product-center-grid .pc-broadcast-style-btn.is-in-cart {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.product-center-grid .pc-broadcast-style-btn.is-in-cart:hover {
    background: #c8e6c9;
}

.pc-sku-modal-grid .broadcast-add-sku-btn {
    width: 100%;
    margin-top: 6px;
    padding: 4px 5px;
    font-size: 10px;
    border: 1px solid #ff9800;
    background: #fff;
    color: #e65100;
    border-radius: 4px;
    cursor: pointer;
}

.pc-sku-modal-grid .broadcast-add-sku-btn.is-in-cart {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.broadcast-cart-modal {
    width: 520px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.broadcast-cart-count {
    font-size: 13px;
    color: #6c757d;
    margin-left: 8px;
}

.broadcast-cart-toolbar {
    padding: 0 20px 12px;
}

.broadcast-cart-toolbar label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.broadcast-title-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.broadcast-cart-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
    max-height: 50vh;
}

.broadcast-cart-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.broadcast-cart-thumb {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 4px;
    background: #f8f9fa;
    flex-shrink: 0;
}

.broadcast-cart-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #adb5bd;
}

.broadcast-cart-info {
    flex: 1;
    min-width: 0;
}

.broadcast-cart-sku {
    font-weight: 700;
    font-size: 13px;
    word-break: break-all;
}

.broadcast-cart-meta {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

.broadcast-cart-price-row {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.broadcast-cart-price-origin {
    font-size: 11px;
    color: #9e9e9e;
    text-decoration: line-through;
    width: 100%;
}

.broadcast-cart-price-label {
    font-size: 11px;
    color: #6c757d;
    flex-shrink: 0;
}

.broadcast-cart-price-input {
    width: 88px;
    padding: 4px 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #e65100;
}

.broadcast-cart-price-input:disabled {
    background: #f5f5f5;
    color: #9e9e9e;
}

.broadcast-cart-price-custom-tag {
    font-size: 10px;
    color: #1565c0;
    background: #e3f2fd;
    padding: 2px 6px;
    border-radius: 4px;
}

.broadcast-cart-remove {
    border: none;
    background: transparent;
    color: #dc3545;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.broadcast-cart-empty {
    padding: 24px 20px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.broadcast-cart-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

.broadcast-btn-primary,
.broadcast-btn-secondary {
    flex: 1;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #ced4da;
}

.broadcast-btn-primary {
    background: #ff6f00;
    border-color: #ff6f00;
    color: #fff;
    font-weight: 600;
}

.broadcast-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.broadcast-btn-primary.is-copied {
    background: #2e7d32;
    border-color: #2e7d32;
}

.broadcast-btn-secondary {
    background: #fff;
}

.broadcast-share-modal {
    width: 480px;
    max-width: 95vw;
}

.broadcast-share-hint {
    font-size: 13px;
    color: #6c757d;
    margin: 8px 0 0;
    line-height: 1.5;
}

.broadcast-share-expiry {
    font-size: 13px;
    color: #856404;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 10px 0 0;
}

.broadcast-share-url-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px;
}

.broadcast-share-url-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.broadcast-preview-link {
    display: block;
    text-align: center;
    padding: 0 20px 20px;
    color: #0d6efd;
    font-size: 14px;
}

.broadcast-edit-modal {
    width: 520px;
    max-width: 95vw;
}

.broadcast-edit-body {
    padding: 0 20px 12px;
}

.broadcast-edit-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin: 10px 0 4px;
}

.broadcast-edit-skus {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.broadcast-edit-hint,
.broadcast-edit-token {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
    line-height: 1.45;
}

/* 分享链接管理 */
.broadcast-links-section {
    width: 100%;
}

.broadcast-links-header {
    margin-bottom: 16px;
}

.broadcast-links-header h3 {
    margin: 0 0 6px;
    font-size: 22px;
}

.broadcast-links-header p {
    margin: 0 0 12px;
    color: #6c757d;
    font-size: 14px;
}

.broadcast-links-refresh {
    flex: 0 0 auto;
    width: auto;
    min-width: 120px;
}

.broadcast-links-empty {
    padding: 48px 20px;
    text-align: center;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.broadcast-links-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.broadcast-links-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.broadcast-links-table th,
.broadcast-links-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
}

.broadcast-links-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.bl-title {
    font-weight: 600;
    max-width: 200px;
    word-break: break-word;
}

.bl-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.bl-status--ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.bl-status--exp {
    background: #f8f9fa;
    color: #6c757d;
}

.bl-actions {
    white-space: nowrap;
}

.bl-link {
    color: #0d6efd;
    margin-right: 8px;
    text-decoration: none;
}

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

.bl-btn {
    border: none;
    background: transparent;
    color: #0d6efd;
    font-size: 12px;
    cursor: pointer;
    padding: 0 6px;
}

.bl-btn:hover {
    text-decoration: underline;
}

.bl-btn--danger {
    color: #dc3545;
}

.bl-btn--margin {
    color: #6a1b9a;
}

.bl-btn--rebuild {
    color: #e65100;
    font-weight: 600;
}

.bl-btn--revoke {
    color: #c62828;
}

.broadcast-rebuild-banner {
    margin: 0 20px 12px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #5d4037;
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 8px;
}

.broadcast-cart-add-row {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.broadcast-btn-add-sku {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px dashed #ff9800;
    background: #fff8e1;
    color: #e65100;
    cursor: pointer;
}

.broadcast-btn-add-sku:hover {
    background: #ffecb3;
}

.broadcast-cart-add-hint {
    font-size: 11px;
    color: #9e9e9e;
}

.broadcast-add-sku-overlay {
    z-index: 1200;
}

.broadcast-picker-modal {
    width: 520px;
    max-width: 96vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.broadcast-picker-head {
    padding-bottom: 8px;
}

.broadcast-add-sku-lead {
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
    line-height: 1.45;
}

.broadcast-picker-search-wrap {
    margin-top: 12px;
    position: relative;
}

.broadcast-picker-search {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box;
}

.broadcast-picker-search:focus {
    outline: none;
    border-color: #1565c0;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}

.broadcast-picker-search-status {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #6c757d;
}

.broadcast-picker-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 12px;
    min-height: 200px;
    max-height: 52vh;
}

.broadcast-picker-empty,
.broadcast-picker-summary {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    padding: 16px 8px;
}

.broadcast-picker-summary {
    text-align: left;
    padding: 8px 4px 12px;
    font-weight: 600;
    color: #495057;
}

.broadcast-picker-style-block {
    margin-bottom: 14px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.broadcast-picker-style-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f0f4f8;
    border-bottom: 1px solid #e9ecef;
}

.broadcast-picker-style-code {
    font-weight: 700;
    font-size: 13px;
    color: #1565c0;
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

.broadcast-picker-style-meta {
    font-size: 11px;
    color: #6c757d;
}

.broadcast-picker-style-add {
    border: none;
    background: #fff3e0;
    color: #e65100;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.broadcast-picker-style-add:hover {
    background: #ffe0b2;
}

.broadcast-picker-sku-list {
    display: flex;
    flex-direction: column;
}

.broadcast-picker-sku-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.broadcast-picker-sku-row:last-child {
    border-bottom: none;
}

.broadcast-picker-sku-row.is-in-cart {
    background: #f1f8e9;
}

.broadcast-picker-sku-thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background: #f8f9fa;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.broadcast-picker-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #adb5bd;
}

.broadcast-picker-sku-info {
    flex: 1;
    min-width: 0;
}

.broadcast-picker-sku-code {
    font-size: 12px;
    font-weight: 700;
    word-break: break-all;
}

.broadcast-picker-sku-price {
    font-size: 11px;
    color: #e65100;
    margin-top: 2px;
}

.broadcast-picker-sku-stock {
    font-size: 10px;
    color: #6c757d;
    margin-top: 2px;
}

.broadcast-picker-sku-add {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid #ff9800;
    background: #fff;
    color: #e65100;
    cursor: pointer;
}

.broadcast-picker-sku-add:hover:not(:disabled) {
    background: #fff3e0;
}

.broadcast-picker-sku-add:disabled {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
    cursor: default;
}

.broadcast-picker-foot {
    border-top: 1px solid #eee;
}

.broadcast-orders-section {
    width: 100%;
}

.broadcast-order-detail-modal {
    width: 640px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
}

.broadcast-order-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.broadcast-order-detail-head h3 {
    margin: 0;
}

.broadcast-order-edit-panel {
    padding: 0 16px 16px;
}

.broadcast-order-edit-panel h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.broadcast-order-edit-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.broadcast-order-edit-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.broadcast-order-edit-field span {
    font-weight: 600;
    color: #495057;
}

.broadcast-order-edit-textarea {
    min-height: 56px;
    resize: vertical;
}

.broadcast-order-edit-lines-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
}

.broadcast-order-edit-add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
}

.broadcast-order-edit-select {
    min-width: 200px;
    max-width: 100%;
}

.broadcast-order-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.bo-edit-qty-cell {
    width: 88px;
}

.bo-edit-qty-input {
    width: 72px;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
}

.bl-btn--sm {
    padding: 2px 8px;
    font-size: 12px;
}

.order-edit-picker-modal {
    width: 420px;
    max-width: 92vw;
    max-height: 72vh;
    display: flex;
    flex-direction: column;
}

.order-edit-picker-body {
    max-height: 50vh;
    overflow-y: auto;
}

.broadcast-share-logs-modal {
    width: 520px;
    max-width: 94vw;
    max-height: 80vh;
    overflow-y: auto;
    padding: 16px 20px 20px;
}

.broadcast-order-logs-section {
    padding: 12px 16px 16px;
    border-top: 1px solid #eee;
    margin-top: 8px;
}

.broadcast-order-logs-section h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
}

.broadcast-order-logs-empty {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

.broadcast-op-log-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12px;
}

.broadcast-op-log-item {
    display: grid;
    grid-template-columns: 130px 72px 100px 1fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: start;
}

.broadcast-op-log-time {
    color: #6c757d;
    font-variant-numeric: tabular-nums;
}

.broadcast-op-log-user {
    font-weight: 600;
}

.broadcast-op-log-action {
    color: #1565c0;
}

.broadcast-op-log-detail {
    color: #495057;
    word-break: break-word;
}

@media (max-width: 640px) {
    .broadcast-op-log-item {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

.broadcast-order-meta,
.broadcast-order-summary {
    font-size: 13px;
    color: #6c757d;
    margin-top: 6px;
    line-height: 1.5;
}

.broadcast-order-lines-wrap {
    padding: 0 16px 16px;
    overflow-x: auto;
}

.broadcast-order-lines-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.broadcast-order-lines-table th,
.broadcast-order-lines-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.broadcast-order-lines-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.bo-customer-cell {
    min-width: 140px;
    max-width: 220px;
}

.bo-customer-name {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.35;
}

.bo-customer-sub {
    font-size: 11px;
    color: #6c757d;
    margin-top: 3px;
    line-height: 1.4;
    word-break: break-word;
}

.bo-customer-addr {
    color: #495057;
}

.bo-flag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.bo-flag--on {
    background: #e8f5e9;
    color: #2e7d32;
}

.bo-flag--off {
    background: #f5f5f5;
    color: #757575;
}

.bo-flag--void {
    background: #eceff1;
    color: #546e7a;
    text-decoration: line-through;
}

.bo-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.bo-status--paid-no {
    background: #fff3e0;
    color: #e65100;
}

.bo-status--paid-yes {
    background: #e8f5e9;
    color: #2e7d32;
}

.bo-status--shipped-no {
    background: #e3f2fd;
    color: #1565c0;
}

.bo-status--shipped-yes {
    background: #e0f2f1;
    color: #00695c;
}

.bo-status--void {
    background: #eceff1;
    color: #546e7a;
}

.bo-status--void-muted {
    color: #9e9e9e;
    font-size: 12px;
}

.broadcast-order-status-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0 6px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.bo-status-bar--pending {
    background: #fafafa;
    border-color: #e0e0e0;
}

.bo-status-bar--paid-only {
    background: #e8f4fd;
    border-color: #90caf9;
}

.bo-status-bar--shipped-only {
    background: #fff8e1;
    border-color: #ffcc80;
}

.bo-status-bar--complete {
    background: #e8f5e9;
    border-color: #a5d6a7;
}

.bo-status-bar--voided {
    background: #eceff1;
    border-color: #b0bec5;
}

.bo-status-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.order-legend-hint {
    font-size: 12px;
    color: #6c757d;
    margin-right: 12px;
}

.bl-btn--status-on {
    border-color: #2e7d32;
    color: #2e7d32;
}

.bl-btn--status-off {
    border-color: #e65100;
    color: #e65100;
}

.bo-flag--active {
    background: #e8f5e9;
    color: #2e7d32;
}

.order-filters {
    margin: 12px 0 14px;
    padding: 12px 14px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.order-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
}

.order-filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #495057;
}

.order-filter-item .filter-select {
    min-width: 120px;
}

.order-filter-search .search-input-container {
    min-width: 200px;
}

.order-filter-search .search-input {
    min-width: 180px;
    padding: 8px 28px 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
}

.order-filter-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
    font-size: 11px;
    color: #6c757d;
}

.order-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bo-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.bo-legend--pending { background: #fafafa; border: 1px solid #e0e0e0; }
.bo-legend--paid-only { background: #e3f2fd; }
.bo-legend--shipped-only { background: #fff3e0; }
.bo-legend--complete { background: #e8f5e9; }
.bo-legend--voided { background: #eceff1; }

.bo-share-cell {
    min-width: 120px;
}

.bo-share-code {
    display: inline-block;
    font-family: ui-monospace, monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #1565c0;
    font-variant-numeric: tabular-nums;
}

.bo-share-code--lg {
    font-size: 15px;
}

.bo-share-title {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.35;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.broadcast-order-share-card {
    margin: 10px 0 12px;
    padding: 12px 14px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.bo-share-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin-bottom: 6px;
}

.bo-share-meta-row:last-child {
    margin-bottom: 0;
}

.bo-share-meta-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    min-width: 72px;
}

.bo-share-meta-value {
    font-size: 13px;
    color: #343a40;
}

.order-filter-stats {
    margin-left: auto;
    font-weight: 600;
    color: #495057;
}

.bl-col-no {
    width: 48px;
    text-align: center;
    color: #6c757d;
    font-variant-numeric: tabular-nums;
}

.bo-order-no,
.bl-code {
    font-family: ui-monospace, monospace;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

.broadcast-shares-table tbody tr.bl-row--active {
    background: #fff;
}

.broadcast-shares-table tbody tr.bl-row--active:hover {
    background: #f8f9fa;
}

.broadcast-shares-table tbody tr.bl-row--expired {
    background: #fff8e1;
}

.broadcast-shares-table tbody tr.bl-row--expired:hover {
    background: #ffecb3;
}

.broadcast-shares-table tbody tr.bl-row--revoked {
    background: #eceff1;
}

.broadcast-shares-table tbody tr.bl-row--revoked:hover {
    background: #cfd8dc;
}

.bl-status--active { color: #2e7d32; }
.bl-status--expired { color: #e65100; }
.bl-status--revoked { color: #546e7a; }

.broadcast-orders-table tbody tr.bo-row--pending {
    background: #fafafa;
}

.broadcast-orders-table tbody tr.bo-row--pending:hover {
    background: #f0f0f0;
}

.broadcast-orders-table tbody tr.bo-row--paid-only {
    background: #e8f4fd;
}

.broadcast-orders-table tbody tr.bo-row--paid-only:hover {
    background: #d2eafd;
}

.broadcast-orders-table tbody tr.bo-row--shipped-only {
    background: #fff8e1;
}

.broadcast-orders-table tbody tr.bo-row--shipped-only:hover {
    background: #ffecb3;
}

.broadcast-orders-table tbody tr.bo-row--complete {
    background: #e8f5e9;
}

.broadcast-orders-table tbody tr.bo-row--complete:hover {
    background: #c8e6c9;
}

.broadcast-orders-table tbody tr.bo-row--voided {
    background: #eceff1;
    color: #78909c;
}

.broadcast-orders-table tbody tr.bo-row--voided:hover {
    background: #cfd8dc;
}

.broadcast-orders-table tbody tr.bo-row--voided td {
    text-decoration: line-through;
    text-decoration-color: rgba(84, 110, 122, 0.45);
}

.broadcast-orders-table tbody tr.bo-row--voided .bl-actions,
.broadcast-orders-table tbody tr.bo-row--voided .bl-actions button {
    text-decoration: none;
}

.bl-btn--void {
    color: #c62828;
    border-color: #ffcdd2;
}

.bl-btn--void:hover {
    background: #ffebee;
}

.broadcast-order-void-banner {
    margin: 8px 0 0;
    padding: 8px 12px;
    background: #eceff1;
    color: #546e7a;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.broadcast-order-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.user-perm-block {
    margin: 12px 0 16px;
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.user-perm-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.user-perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px 16px;
}

.user-perm-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.user-perm-check:hover {
    background: rgba(0, 0, 0, 0.04);
}

.user-perm-check input {
    margin-top: 2px;
    flex-shrink: 0;
}

.user-perm-check span {
    line-height: 1.4;
    color: #343a40;
}

.user-perm-admin-hint {
    margin: 8px 0 12px;
    font-size: 12px;
    color: #6c757d;
}

.user-perm-cell {
    font-size: 12px;
}

.user-perm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.user-perm-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 11px;
}

.user-perm-tag--all {
    background: #ede7f6;
    color: #5e35b1;
}

.user-perm-tag--none {
    background: #f5f5f5;
    color: #9e9e9e;
}

.user-perm-modal {
    width: 400px;
    max-width: 94vw;
}

.user-perm-modal-lead {
    font-size: 13px;
    color: #6c757d;
    margin-top: 6px;
}

.user-perm-modal-body {
    padding: 8px 20px 16px;
}

.user-perm-modal-footer {
    margin: 0;
    padding: 0;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
}

.btn-edit-perm {
    color: #1565c0;
}

.broadcast-order-customer-card {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.bo-thumbs-cell {
    width: 120px;
}

.bo-thumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.bo-thumb,
.bo-line-thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.bo-line-thumb-cell {
    width: 52px;
}

.bo-line-thumb {
    width: 44px;
    height: 44px;
}

.bo-no-thumb {
    font-size: 11px;
    color: #adb5bd;
}

.broadcast-margin-modal {
    width: 720px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
}

.broadcast-margin-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.broadcast-margin-table-wrap {
    padding: 0 16px 16px;
    overflow-x: auto;
}

.broadcast-margin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.broadcast-margin-table th,
.broadcast-margin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.broadcast-margin-table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* 客户管理 */
.customer-management-section {
    width: 100%;
}

.customer-mgmt-header {
    margin-bottom: 16px;
}

.customer-mgmt-header h3 {
    margin: 0 0 6px;
    font-size: 22px;
}

.customer-mgmt-header p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.customer-sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    background: #f0f2f5;
    border-radius: 8px;
    width: fit-content;
}

.customer-sub-tab {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

.customer-sub-tab.active {
    background: #fff;
    color: #0d6efd;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.customer-toolbar {
    margin-bottom: 12px;
}

.customer-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.customer-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.customer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.customer-table th,
.customer-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.customer-table th {
    background: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

.cm-name {
    font-weight: 600;
}

.cm-address {
    max-width: 240px;
    word-break: break-word;
    color: #495057;
}

.cm-actions {
    white-space: nowrap;
}

.level-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.level-hint,
.level-form-hint {
    font-size: 12px;
    color: #6c757d;
    margin: 0 0 12px;
    line-height: 1.45;
}

.customer-form-modal {
    width: 440px;
    max-width: 95vw;
}

.customer-form-body {
    padding: 0 20px 8px;
}

.customer-form-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin: 12px 0 4px;
}

.customer-form-label .req {
    color: #dc3545;
}

.apple-pill-btn--link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.broadcast-customer-select {
    width: 100%;
    margin-bottom: 10px;
}

.broadcast-customer-hint {
    font-size: 12px;
    color: #856404;
    margin: 0 0 10px;
}

.customer-form-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.locale-switch {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    margin-right: 8px;
}

.locale-switch-btn {
    padding: 6px 10px;
    font-size: 12px;
    border: none;
    background: #f5f5f7;
    color: #333;
    cursor: pointer;
}

.locale-switch-btn.active {
    background: #0071e3;
    color: #fff;
}

.locale-switch-btn:hover:not(.active) {
    background: #e8e8ed;
}

/* 用户管理（新版卡片布局） */
.user-management-section.user-management-container {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-mgmt-page-header h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1d1d1f;
}

.user-mgmt-page-header p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
}

.user-mgmt-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.user-mgmt-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.user-mgmt-card-head h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.user-mgmt-add-card .user-mgmt-card-head h4::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border-radius: 50%;
    background: #28a745;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    vertical-align: middle;
}

.user-mgmt-card-body {
    padding: 18px 20px 8px;
}

.user-mgmt-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px 16px;
}

.user-mgmt-input {
    border-width: 1px;
}

.user-mgmt-perm-block {
    margin-top: 4px;
    background: #f8f9fa;
}

.user-mgmt-admin-hint {
    margin: 0 0 8px;
    padding: 10px 12px;
    background: #eef2ff;
    border-radius: 8px;
    border: 1px solid #d0d9ff;
}

.user-mgmt-form-message {
    margin: 12px 0 4px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

.user-mgmt-form-message--error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.user-mgmt-form-message--success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.user-mgmt-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    background: #f1f3f5;
    border-top: 1px solid #dee2e6;
}

.user-mgmt-form-actions-hint {
    font-size: 12px;
    color: #6c757d;
}

.user-mgmt-form-actions-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.user-mgmt-btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    color: #343a40;
    background: #fff;
    border: 2px solid #868e96;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.user-mgmt-btn-reset:hover {
    background: #e9ecef;
    border-color: #495057;
    color: #212529;
}

.user-mgmt-btn-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.user-mgmt-btn-create:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.45);
}

.user-mgmt-btn-create:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.user-mgmt-list-head-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-mgmt-btn-refresh {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.user-mgmt-btn-refresh:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.user-mgmt-btn-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.user-mgmt-loading,
.user-mgmt-empty {
    padding: 40px 24px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.user-mgmt-table-wrap {
    padding: 0;
    overflow-x: auto;
}

.user-perm-modal .user-mgmt-form-actions {
    border-radius: 0 0 12px 12px;
}

@media (max-width: 640px) {
    .user-management-section.user-management-container {
        padding: 16px;
    }

    .user-mgmt-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .user-mgmt-form-actions-hint {
        text-align: center;
    }

    .user-mgmt-form-actions-btns {
        width: 100%;
        margin-left: 0;
    }

    .user-mgmt-btn-reset,
    .user-mgmt-btn-create {
        flex: 1;
    }
}

