/**
 * 全球视野商学院 - 后台管理样式
 */

/* ==================== 基础重置 ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ==================== 登录页面 ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 16px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    margin-bottom: 20px;
}

.login-logo .logo-text {
    display: block;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo .logo-cn {
    font-size: 14px;
    color: #94a3b8;
}

.login-header h1 {
    font-size: 20px;
    color: #e2e8f0;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #94a3b8;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    border-radius: 8px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #64748b;
    font-size: 14px;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: #f59e0b;
}

/* ==================== 后台布局 ==================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: #1e293b;
    border-right: 1px solid rgba(226, 232, 240, 0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.1);
}

.sidebar-logo .logo-text {
    display: block;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-logo .logo-cn {
    font-size: 12px;
    color: #64748b;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-menu .nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 14px;
    color: #94a3b8;
    transition: all 0.3s;
}

.nav-menu .nav-item a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.nav-menu .nav-item a:hover,
.nav-menu .nav-item.active a {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.1);
}

.admin-info {
    margin-bottom: 15px;
}

.admin-name {
    font-size: 14px;
    color: #e2e8f0;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    font-size: 13px;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    transition: all 0.3s;
}

.logout-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background: #0f172a;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 5px;
}

.content-header p {
    font-size: 14px;
    color: #64748b;
}

/* ==================== 通用组件 ==================== */

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    color: #0f172a;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    color: #e2e8f0;
    background: #334155;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-danger {
    color: #fff;
    background: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 警告框 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* 卡片 */
.card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.1);
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
}

.card-header .header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-body {
    padding: 20px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #94a3b8;
}

.form-group .required {
    color: #ef4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    border-radius: 8px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #64748b;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.1);
    margin-top: 20px;
}

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(226, 232, 240, 0.1);
}

.data-table th {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.5);
}

.data-table td {
    font-size: 14px;
    color: #e2e8f0;
}

.data-table tbody tr:hover {
    background: rgba(245, 158, 11, 0.05);
}

.data-table .empty {
    text-align: center;
    color: #64748b;
    padding: 40px;
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.badge-type-0 { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.badge-type-1 { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.badge-type-2 { background: rgba(168, 85, 247, 0.2); color: #a855f7; }

/* 状态 */
.status {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 20px;
}

.status-0 { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.status-1 { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.status-2 { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.status-active { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.status-inactive { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.1);
}

.page-link {
    padding: 8px 15px;
    font-size: 13px;
    color: #94a3b8;
    background: rgba(51, 65, 85, 0.5);
    border-radius: 6px;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.2);
}

/* 筛选 */
.filter-group select {
    padding: 8px 15px;
    font-size: 13px;
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.8);
    border: 1px solid #475569;
    border-radius: 6px;
    cursor: pointer;
}

/* ==================== 控制面板 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stats-grid .stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.1);
}

.stats-grid .stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stats-grid .stat-icon svg {
    width: 30px;
    height: 30px;
}

.stats-grid .stat-card.primary .stat-icon { background: rgba(59, 130, 246, 0.2); }
.stats-grid .stat-card.primary .stat-icon svg { fill: #3b82f6; }

.stats-grid .stat-card.success .stat-icon { background: rgba(34, 197, 94, 0.2); }
.stats-grid .stat-card.success .stat-icon svg { fill: #22c55e; }

.stats-grid .stat-card.warning .stat-icon { background: rgba(245, 158, 11, 0.2); }
.stats-grid .stat-card.warning .stat-icon svg { fill: #f59e0b; }

.stats-grid .stat-card.info .stat-icon { background: rgba(168, 85, 247, 0.2); }
.stats-grid .stat-card.info .stat-icon svg { fill: #a855f7; }

.stats-grid .stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #e2e8f0;
}

.stats-grid .stat-label {
    font-size: 14px;
    color: #64748b;
}

/* 快捷操作 */
.quick-actions {
    margin-bottom: 30px;
}

.quick-actions h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #e2e8f0;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 12px;
    transition: all 0.3s;
}

.action-card:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-3px);
}

.action-card svg {
    width: 30px;
    height: 30px;
    fill: #f59e0b;
}

.action-card span {
    font-size: 14px;
    color: #94a3b8;
}

.action-card:hover span {
    color: #f59e0b;
}

/* 最近数据 */
.recent-data {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.data-section {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.data-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid rgba(226, 232, 240, 0.1);
}

.data-section .section-header h2 {
    font-size: 16px;
    color: #e2e8f0;
}

.view-all {
    font-size: 13px;
    color: #f59e0b;
}

/* 预览统计 */
.preview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.preview-stat {
    text-align: center;
    padding: 20px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 10px;
}

.preview-stat .value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #f59e0b;
}

.preview-stat .label {
    font-size: 13px;
    color: #94a3b8;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
    .stats-grid,
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .preview-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: static;
        border-right: none;
        border-bottom: 1px solid rgba(226, 232, 240, 0.1);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .admin-wrapper {
        flex-direction: column;
    }
    
    .stats-grid,
    .action-grid,
    .recent-data,
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .preview-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}
