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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.login-header {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.login-header h2 {
    margin-bottom: 10px;
    font-size: 24px;
}

.login-body {
    padding: 30px;
}

/* 管理界面布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: #34495e;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h4 {
    margin: 0;
    font-size: 18px;
}

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

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

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

.sidebar-nav .nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: #3498db;
}

.sidebar-nav .nav-item .icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

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

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

/* 顶部栏 */
.topbar {
    height: 60px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left h5 {
    font-size: 18px;
    color: #2c3e50;
}

.topbar-right {
    display: flex;
    align-items: center;
}

/* 内容区域 */
.content-area {
    flex: 1;
    padding: 30px;
}

/* 统计卡片 */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    height: 100%;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 15px;
}

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

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

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

.stat-icon.bg-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stat-info h3 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-info p {
    margin: 5px 0 0;
    color: #7f8c8d;
    font-size: 14px;
}

/* 卡片 */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

.card-body {
    padding: 20px;
}

/* 表格 */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    padding: 12px;
}

.table tbody td {
    padding: 12px;
    vertical-align: middle;
    font-size: 14px;
}

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

/* 头像 */
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

/* VIP套餐卡片 */
.vip-package-card {
    transition: transform 0.3s;
}

.vip-package-card:hover {
    transform: translateY(-5px);
}

.vip-package-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.vip-price h2 {
    margin-bottom: 5px;
}

/* 页面头部 */
.page-header {
    margin-bottom: 20px;
}

.page-header h4 {
    color: #2c3e50;
    font-weight: 600;
}

/* 按钮 */
.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

/* 徽章 */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 12px;
}

/* 模态框 */
.modal-content {
    border: none;
    border-radius: 8px;
}

.modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-250px);
    }

    .main-content {
        margin-left: 0;
    }

    .stat-card {
        margin-bottom: 15px;
    }

    .content-area {
        padding: 15px;
    }
}

/* 加载动画 */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* 表单 */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

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

/* 分页 */
.pagination {
    margin-top: 20px;
}

.page-link {
    color: #667eea;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    color: #667eea;
    background-color: #f8f9fa;
}

.page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 代码样式 */
code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

/* 表格响应式 */
.table-responsive {
    border-radius: 8px;
}

/* 下拉菜单 */
.dropdown-menu {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

