/**
 * 管理中心样式文件
 * 用于后台管理界面的专属样式
 */

:root {
    --admin-primary: #2c3e50;
    --admin-secondary: #34495e;
    --admin-success: #27ae60;
    --admin-danger: #e74c3c;
    --admin-warning: #f39c12;
    --admin-info: #3498db;
    --admin-sidebar-width: 260px;
}

/* 管理后台整体布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
    background: #ecf0f1;
}

/* 侧边栏样式 */
.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: var(--admin-primary);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.admin-sidebar-header {
    padding: 20px;
    background: var(--admin-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.admin-nav {
    padding: 20px 0;
}

.admin-nav-section {
    margin-bottom: 25px;
}

.admin-nav-section-title {
    padding: 10px 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

.admin-nav-item {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.admin-nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    padding-left: 25px;
}

.admin-nav-item.active {
    background: var(--admin-info);
    color: white;
    border-left: 4px solid white;
}

.admin-nav-item i {
    width: 20px;
    margin-right: 10px;
}

/* 主内容区域 */
.admin-main {
    flex: 1;
    margin-left: var(--admin-sidebar-width);
    padding: 0;
}

.admin-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-left h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--admin-primary);
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-content {
    padding: 30px;
}

/* 统计卡片 */
.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: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card-icon.primary { background: var(--admin-info); }
.stat-card-icon.success { background: var(--admin-success); }
.stat-card-icon.warning { background: var(--admin-warning); }
.stat-card-icon.danger { background: var(--admin-danger); }

.stat-card-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--admin-primary);
    margin-bottom: 5px;
}

.stat-card-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 数据表格样式 */
.admin-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.admin-table-header {
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-table-header h3 {
    margin: 0;
    color: var(--admin-primary);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--admin-primary);
    border-bottom: 2px solid #ecf0f1;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

/* 操作按钮组 */
.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.admin-btn-primary {
    background: var(--admin-info);
    color: white;
}

.admin-btn-success {
    background: var(--admin-success);
    color: white;
}

.admin-btn-danger {
    background: var(--admin-danger);
    color: white;
}

.admin-btn-warning {
    background: var(--admin-warning);
    color: white;
}

.admin-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* 表单样式 */
.admin-form-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.admin-form-section h4 {
    color: var(--admin-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

/* 徽章样式 */
.admin-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-badge-success {
    background: #d4edda;
    color: #155724;
}

.admin-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.admin-badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.admin-badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* 响应式设计 */
@media (max-width: 768px) {
    :root {
        --admin-sidebar-width: 0;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-content {
        padding: 15px;
    }
}

/* 加载动画 */
.admin-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.admin-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--admin-info);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

