/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff4d6d;
    --primary-light: #ff758f;
    --primary-dark: #ff3355;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px 0;
    z-index: 1000;
}

.logo {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.logo h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.logo p {
    font-size: 14px;
    opacity: 0.9;
}

.nav-menu {
    padding: 0 10px;
}

/* 导航项基础样式 */
.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 5px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-item .icon {
    font-size: 18px;
    margin-right: 10px;
    width: 24px;
    display: inline-block;
    text-align: center;
}

/* 数字徽章样式（侧边栏） */
.nav-item .badge {
    position: absolute !important;
    top: 8px !important;
    right: 15px !important;
    background-color: #ff3b30 !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
    min-width: 18px !important;
    text-align: center !important;
    line-height: 1.4 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* 按钮徽章样式 */
.btn-cancel-apply {
    position: relative;
}

.btn-badge {
    display: inline-block;
    background-color: #ff3b30;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    margin-left: 5px;
    line-height: 1.3;
}



/* 主内容区 */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
}

/* 顶部栏 */
.header {
    background-color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header h1 {
    font-size: 24px;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 管理员下拉菜单 */
.admin-dropdown {
    position: relative;
}

.admin-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: #333;
}

.admin-btn:hover {
    background-color: #e9ecef;
    border-color: #d0d0d0;
}

.admin-btn i.fa-user-circle {
    font-size: 18px;
    color: var(--primary-color);
}

.admin-btn i.fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s;
}

.admin-dropdown.active .admin-btn i.fa-chevron-down {
    transform: rotate(180deg);
}

.admin-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.admin-dropdown.active .admin-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.admin-menu a:hover {
    background-color: #f8f9fa;
}

.admin-menu a i {
    width: 16px;
    text-align: center;
    color: #666;
}

.admin-menu .logout-link {
    color: var(--primary-color);
}

.admin-menu .logout-link i {
    color: var(--primary-color);
}

.admin-menu .menu-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 4px 0;
}

.user-info {
    color: #666;
}

.btn-logout {
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background-color: var(--primary-dark);
}

/* 内容区域 */
.content {
    padding: 30px;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 32px;
    color: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 12px;
}

.stat-info h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 14px;
}

/* 小统计卡片 */
.stat-card-small {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-card-small .stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-card-small .stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 仪表板区域 */
.dashboard-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.section-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

/* 图表容器 */
.chart-container {
    padding: 20px 0;
}

/* 库存预警容器 */
.alert-container {
    max-height: 400px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    margin-bottom: 10px;
}

.alert-item.critical {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.alert-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.alert-item-icon {
    font-size: 24px;
    color: #ffc107;
}

.alert-item.critical .alert-item-icon {
    color: #dc3545;
}

.alert-item-details h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.alert-item-details p {
    font-size: 14px;
    color: #666;
}

.alert-item-stock {
    font-size: 20px;
    font-weight: bold;
    color: #ffc107;
}

.alert-item.critical .alert-item-stock {
    color: #dc3545;
}

.loading-text {
    text-align: center;
    color: #999;
    padding: 20px;
}

.no-alert {
    text-align: center;
    color: #28a745;
    padding: 20px;
    font-size: 16px;
}

.no-alert i {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

/* 页面头部 */
.page-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 按钮 */
.btn-primary {
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

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

.btn-secondary {
    padding: 8px 15px;
    background-color: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 5px;
    transition: all 0.3s;
}

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

.btn-danger {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-danger:hover {
    background-color: var(--primary-dark);
}

.btn-warning {
    padding: 8px 15px;
    background-color: #ffc107;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 5px;
    transition: all 0.3s;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-success {
    padding: 8px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 5px;
    transition: all 0.3s;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-info {
    padding: 8px 15px;
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 5px;
    transition: all 0.3s;
}

.btn-info:hover {
    background-color: #138496;
}

/* 表格 */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

/* 移动端卡片列表默认隐藏 */
.mobile-card-list {
    display: none;
}

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

.data-table thead {
    background-color: #f8f9fa;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 商品预览图样式 */
.data-table td img {
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.data-table td img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.text-center {
    text-align: center;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

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

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

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    color: #333;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
}

.close:hover {
    color: #ff4d6d;
}

.modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* 上传容器 */
.upload-container {
    display: flex;
    align-items: center;
}

.btn-upload {
    padding: 10px 20px;
    background-color: #f0f0f0;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-upload:hover {
    background-color: #e0e0e0;
    border-color: var(--primary-color);
}

/* 图片预览 */
.image-preview {
    margin-top: 10px;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

/* 上传容器 */
.upload-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 状态徽章颜色 */
.status-warning {
    background-color: #fff3cd;
    color: #856404;
}

.status-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* 复制按钮 */
.btn-copy {
    padding: 8px 15px;
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 5px;
    transition: all 0.3s;
}

.btn-copy:hover {
    background-color: #138496;
}

/* ==================== 响应式设计 ==================== */

/* 汉堡菜单按钮 */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2001;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* 遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
    }

    .header {
        padding: 15px 20px;
    }

    .header h1 {
        font-size: 20px;
    }

    .content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        width: 95%;
    }
}

/* 手机设备 (最大768px) */
@media (max-width: 768px) {
    /* 显示汉堡菜单按钮 */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 侧边栏默认隐藏 */
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* 主内容区占满屏幕 */
    .main-content {
        margin-left: 0;
        width: 100%;
    }

    /* 顶部栏 */
    .header {
        padding: 15px 20px 15px 70px;
    }

    .header h1 {
        font-size: 18px;
    }

    .header-right {
        gap: 10px;
    }

    .admin-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .admin-btn span {
        display: none;
    }

    .admin-btn i.fa-user-circle {
        font-size: 24px;
        margin: 0;
    }

    /* 内容区 */
    .content {
        padding: 15px;
    }

    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .stat-info h3 {
        font-size: 24px;
    }

    /* 页面头部 */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .page-header > div {
        width: 100%;
    }

    .page-header select,
    .page-header input {
        width: 100% !important;
    }

    .page-header button {
        width: 100%;
        margin: 5px 0 !important;
    }

    /* 表格容器 - 改为卡片式布局 */
    .table-container {
        padding: 10px;
    }

    /* 在手机端隐藏表格 */
    .data-table {
        display: none;
    }

    /* 移动端卡片式列表 */
    .mobile-card-list {
        display: block;
    }

    .mobile-card {
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .mobile-card-header {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f0f0f0;
    }

    .mobile-card-image {
        width: 80px;
        height: 80px;
        border-radius: 8px;
        object-fit: cover;
        flex-shrink: 0;
    }

    .mobile-card-title {
        flex: 1;
        font-size: 15px;
        font-weight: 600;
        color: #333;
        line-height: 1.4;
        word-break: break-word;
    }

    .mobile-card-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 12px;
    }

    .mobile-card-item {
        display: flex;
        flex-direction: column;
    }

    .mobile-card-item.full-width {
        grid-column: 1 / -1;
    }

    .mobile-card-label {
        font-size: 12px;
        color: #999;
        margin-bottom: 4px;
    }

    .mobile-card-value {
        font-size: 14px;
        color: #333;
        font-weight: 500;
        word-break: break-word;
    }

    .mobile-card-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
    }

    .mobile-card-actions button {
        flex: 1;
        min-width: calc(50% - 4px);
    }

    /* 空状态 */
    .mobile-empty-state {
        text-align: center;
        padding: 40px 20px;
        color: #999;
    }

    .mobile-empty-state i {
        font-size: 48px;
        margin-bottom: 15px;
        display: block;
        opacity: 0.5;
    }

    /* 按钮 */
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-warning,
    .btn-success,
    .btn-info {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 弹窗 */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        max-height: 85vh;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .modal-body {
        padding: 20px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* 防止iOS自动缩放 */
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
        margin: 5px 0 !important;
    }

    /* 上传容器 */
    .upload-container {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-container input[type="text"] {
        margin-left: 0 !important;
        margin-top: 10px;
    }

    .btn-upload {
        width: 100%;
    }

    /* Dashboard */
    .dashboard-section {
        padding: 15px;
    }

    .section-title {
        font-size: 16px;
    }

    .chart-container {
        padding: 10px 0;
    }

    /* Tab标签页 */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 12px 15px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* 订单管理 */
    #orderStatusFilter,
    #orderKeyword,
    #cancelStatusFilter {
        width: 100% !important;
        margin-bottom: 10px;
    }

    /* 管理员下拉菜单 */
    .admin-menu {
        right: 0;
        left: auto;
        min-width: 150px;
    }

    /* 侧边栏Logo */
    .logo img {
        max-width: 200px !important;
    }

    .logo h2 {
        font-size: 20px;
    }

    /* 导航项 */
    .nav-item {
        padding: 12px 15px;
    }

    .nav-item .icon {
        font-size: 16px;
    }

    .nav-item span:not(.icon):not(.badge) {
        font-size: 14px;
    }
}

/* 小屏手机 (最大480px) */
@media (max-width: 480px) {
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: 15px;
        left: 15px;
    }

    .header {
        padding: 12px 15px 12px 60px;
    }

    .header h1 {
        font-size: 16px;
    }

    .content {
        padding: 10px;
    }

    .stat-card {
        padding: 15px;
        gap: 15px;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .stat-info h3 {
        font-size: 20px;
    }

    .stat-info p {
        font-size: 13px;
    }

    .dashboard-section {
        padding: 12px;
    }

    .section-title {
        font-size: 15px;
    }

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

    .modal-content {
        margin: 10px auto;
        max-height: 90vh;
    }

    .modal-header {
        padding: 12px 15px;
    }

    .modal-body {
        padding: 15px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-warning,
    .btn-success,
    .btn-info {
        padding: 10px;
        font-size: 14px;
    }
}

/* ==================== 会员积分系统样式 ==================== */

/* Tab标签页 */
.tabs-container {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 徽章样式（会员系统） - 基础样式 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    position: relative;
}

.badge-success {
    background: #52c41a;
}

.badge-secondary {
    background: #8c8c8c;
}

/* 表单容器 */
.form-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-container h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #8c8c8c;
    font-size: 12px;
}

.form-actions {
    margin-top: 30px;
    text-align: right;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.modal-header .close {
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-header .close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 30px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.modal-footer button {
    margin-left: 10px;
}


/* ==================== 主题设置页面样式 ==================== */

/* 主题卡片网格 */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.theme-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.theme-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(255, 77, 109, 0.3);
}

.theme-preview {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.theme-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.theme-check {
    font-size: 20px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.theme-card.active .theme-check {
    opacity: 1;
}

/* 自定义主题表单 */
.custom-theme-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
}

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

.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
}

.color-input-group input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

/* 预览区域 */
.theme-preview-section {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e0e0e0;
}

.preview-elements {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.preview-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
}

.preview-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.preview-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 响应式 - 主题设置 */
@media (max-width: 768px) {
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .preview-elements {
        flex-direction: column;
        align-items: stretch;
    }
    
    .color-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .color-input-group input[type="color"] {
        width: 100%;
    }
}
