/* ChatGPT Team 管理系统 - 样式表 */

:root {
    --sidebar-width: 260px;
    --navbar-height: 60px;
    --primary-color: #667eea;
    --secondary-color: #764ba2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fb;
}

/* ============================================
   管理后台布局
   ============================================ */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e1e2d 0%, #1a1a27 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-brand i {
    font-size: 24px;
    color: var(--primary-color);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    display: block;
    padding: 8px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-link.active {
    background: rgba(102, 126, 234, 0.2);
    color: #fff;
    border-left-color: var(--primary-color);
}

.nav-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-info i {
    font-size: 24px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    height: var(--navbar-height);
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    margin-right: 15px;
}

.navbar-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.navbar-title i {
    color: var(--primary-color);
    margin-right: 8px;
}

.navbar-actions {
    margin-left: auto;
}

.content-wrapper {
    flex: 1;
    padding: 20px;
}

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

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

/* 响应式 */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar-toggle-btn {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* ============================================
   统计卡片
   ============================================ */

.stat-card {
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-card.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card.bg-info {
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
}

.stat-card.bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.stat-content p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.stat-card-mini {
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-card-mini i {
    font-size: 28px;
}

.stat-card-mini h5 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.stat-card-mini small {
    color: #666;
}

/* ============================================
   卡片样式
   ============================================ */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* ============================================
   表格样式
   ============================================ */

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    border-bottom: 2px solid #eee;
}

.table tbody td {
    vertical-align: middle;
    padding: 12px 15px;
}

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

/* ============================================
   按钮样式
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* ============================================
   操作栏
   ============================================ */

.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ============================================
   Badge 样式
   ============================================ */

.badge {
    font-weight: 500;
    padding: 5px 10px;
}

/* ============================================
   代码样式
   ============================================ */

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    color: #e83e8c;
}

pre {
    background: #f4f4f4;
    border-radius: 8px;
    padding: 15px;
    overflow-x: auto;
}

/* ============================================
   用户选择
   ============================================ */

.user-select-all {
    user-select: all;
    cursor: pointer;
}

/* ============================================
   进度条
   ============================================ */

.progress {
    border-radius: 10px;
    height: 6px;
    background-color: #e9ecef;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ============================================
   列表组
   ============================================ */

.list-group-item {
    border-left: none;
    border-right: none;
    padding: 15px 20px;
}

.list-group-item:first-child {
    border-top: none;
}

/* ============================================
   模态框
   ============================================ */

.modal-content {
    border: none;
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid #eee;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 15px 20px;
}

/* ============================================
   Alert
   ============================================ */

.alert {
    border: none;
    border-radius: 10px;
}

.alert-info {
    background-color: #e8f4fd;
    color: #0c5460;
}

/* ============================================
   表单
   ============================================ */

.form-control, .form-select {
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid #ddd;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* ============================================
   Tab 导航
   ============================================ */

.nav-tabs {
    border-bottom: 2px solid #eee;
}

.nav-tabs .nav-link {
    border: none;
    color: #666;
    padding: 12px 20px;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: -2px;
}
