/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

/* Vue隐藏 */
[v-cloak] {
    display: none !important;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    padding: 50px 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 28px;
    color: #667eea;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 16px;
    color: #999;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 0 15px;
    transition: all 0.3s;
}

.form-group label:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group i {
    font-size: 20px;
    margin-right: 10px;
    color: #999;
}

.form-group input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 0;
    font-size: 14px;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.login-tips {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 13px;
}

/* 管理后台布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.nav-menu {
    list-style: none;
    padding: 15px 0;
    flex: 1;
}

.nav-menu li {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
}

.nav-menu li span {
    margin-right: 10px;
    font-size: 18px;
}

.nav-menu li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu li.active {
    background: rgba(102, 126, 234, 0.2);
    border-left-color: #667eea;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.page-desc {
    color: #999;
    font-size: 14px;
}

/* 数据卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    font-size: 48px;
    margin-right: 20px;
    opacity: 0.8;
}

.stat-info h3 {
    font-size: 32px;
    margin-bottom: 5px;
}

.stat-info p {
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    background: #f0f0f0;
    color: #666;
}

.stat-primary .stat-icon { color: #667eea; }
.stat-success .stat-icon { color: #10b981; }
.stat-warning .stat-icon { color: #f59e0b; }
.stat-danger .stat-icon { color: #ef4444; }

/* 图表容器 */
.charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.chart-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.chart-card h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #2c3e50;
}

.chart-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.simple-chart {
    padding: 10px 0;
}

.chart-bar {
    margin-bottom: 15px;
}

.bar-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.bar-container {
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    height: 30px;
}

.bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    min-width: 50px;
    transition: width 0.5s ease;
}

/* 内容区域 */
.content-section {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    font-size: 24px;
    color: #2c3e50;
}

.section-desc {
    color: #999;
    font-size: 13px;
    margin-top: 5px;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #667eea;
}

/* 按钮样式 */
.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-success {
    background: #10b981;
}

.btn-danger {
    background: #ef4444;
}

.btn-warning {
    background: #f59e0b;
}

.btn-info {
    background: #3b82f6;
}

.btn-primary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e1e8ed;
}

.data-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr {
    transition: all 0.3s;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* 订单信息 */
.order-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.order-info strong {
    color: #2c3e50;
    font-size: 14px;
}

.order-info small {
    color: #999;
    font-size: 12px;
}

/* 图片预览 */
.table-img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.table-img:hover {
    transform: scale(1.1);
}

/* 代码文本 */
.code-text {
    font-family: 'Courier New', monospace;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #667eea;
}

/* 金额文本 */
.money-text {
    color: #ef4444;
    font-weight: bold;
    font-size: 16px;
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success {
    background: #d1fae5;
    color: #10b981;
}

.status-badge.danger {
    background: #fee2e2;
    color: #ef4444;
}

.status-badge.warning {
    background: #fef3c7;
    color: #f59e0b;
}

.status-badge.info {
    background: #dbeafe;
    color: #3b82f6;
}

.status-badge.default {
    background: #f0f0f0;
    color: #999;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
}

.pagination button {
    padding: 8px 16px;
    border: 2px solid #e1e8ed;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination span {
    color: #666;
}

/* 配置页面 */
.config-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.config-section .form-group {
    margin-bottom: 25px;
}

.config-section .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.config-section .form-group input,
.config-section .form-group select,
.config-section .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s;
}

.config-section .form-group input:focus,
.config-section .form-group select:focus,
.config-section .form-group textarea:focus {
    border-color: #667eea;
}

.config-section .form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.price-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.price-preview h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
}

.price-label {
    font-size: 16px;
    color: #666;
}

.price-value {
    font-size: 24px;
    font-weight: bold;
    color: #ef4444;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-sm {
    max-width: 500px;
}

.modal-md {
    max-width: 700px;
}

.modal-lg {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    transition: all 0.3s;
}

.modal-close:hover {
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        transition: left 0.3s;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 12px;
    }
}

