/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #f5f7fb;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #4361ee;
}

.logo i {
    margin-right: 10px;
    font-size: 24px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: #666;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a:hover,
.main-nav a.active {
    background: #4361ee;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    font-weight: 500;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 16px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-menu a:hover {
    background: #f5f7fb;
}

.user-dropdown:hover .dropdown-menu {
    display: block;
}

/* 主容器 */
.main-container {
    display: flex;
    flex: 1;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #eee;
    padding: 20px;
}

.user-profile {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.profile-header {
    margin-bottom: 15px;
}

.profile-header i {
    font-size: 60px;
    color: #4361ee;
    margin-bottom: 10px;
}

.profile-info h4 {
    margin: 5px 0;
    font-size: 18px;
}

.user-level {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.level-primary {
    background: #cfe2ff;
    color: #084298;
}

.level-intermediate {
    background: #d1e7dd;
    color: #0a3622;
}

.level-top {
    background: #f8d7da;
    color: #58151c;
}

.level-admin {
    background: #4361ee;
    color: white;
}

.balance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-info strong {
    color: #4361ee;
    font-size: 18px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 30px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    text-decoration: none;
    color: #666;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #4361ee;
    color: white;
}

.quick-stats {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
}

.quick-stats h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.stat-item:last-child {
    border-bottom: none;
}

/* 主内容区 */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.content-header h1 {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.search-box {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    max-width: 400px;
}

.search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 5px 0 0 5px;
}

.search-form button {
    background: #4361ee;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

/* 卡片样式 */
.section-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.section-header h2 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #eee;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

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

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-success {
    background: #d1e7dd;
    color: #0a3622;
}

.status-secondary {
    background: #e2e3e5;
    color: #41464b;
}

.status-info {
    background: #cff4fc;
    color: #055160;
}

.status-danger {
    background: #f8d7da;
    color: #58151c;
}

.status-dark {
    background: #ced4da;
    color: #495057;
}

/* 表单样式 */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-group {
    margin-bottom: 20px;
    flex: 1 0 100%;
    padding: 0 10px;
}

@media (min-width: 768px) {
    .form-group {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

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

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #4361ee;
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: #4361ee;
    color: white;
}

.btn-primary:hover {
    background: #3a0ca3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-outline-success {
    background: transparent;
    border: 1px solid #28a745;
    color: #28a745;
}

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

.btn-xs {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

/* 价格计算 */
.price-summary {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.price-summary h4 {
    margin-bottom: 15px;
    color: #333;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.summary-row.total {
    font-size: 18px;
    font-weight: bold;
    color: #4361ee;
    border-bottom: none;
    padding-top: 15px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
}

/* 公告样式 */
.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.announcement-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #4361ee;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.announcement-header h3 {
    font-size: 16px;
    color: #333;
}

.announcement-date {
    font-size: 12px;
    color: #666;
}

.announcement-content {
    color: #555;
    line-height: 1.6;
}

.announcement-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

/* 提示框 */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1e7dd;
    color: #0a3622;
    border: 1px solid #a3cfbb;
}

.alert-danger {
    background: #f8d7da;
    color: #58151c;
    border: 1px solid #f1aeb5;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
}

.alert-info {
    background: #cff4fc;
    color: #055160;
    border: 1px solid #9eeaf9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin: 10px 0;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .sidebar-nav a {
        flex: 1;
        min-width: 150px;
        justify-content: center;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .quick-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .form-group {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-primary {
    color: #4361ee !important;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-muted {
    color: #6c757d !important;
}

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 25px; }

.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 25px; }

.ml-1 { margin-left: 5px; }
.ml-2 { margin-left: 10px; }
.ml-3 { margin-left: 15px; }
.ml-4 { margin-left: 20px; }
.ml-5 { margin-left: 25px; }

.mr-1 { margin-right: 5px; }
.mr-2 { margin-right: 10px; }
.mr-3 { margin-right: 15px; }
.mr-4 { margin-right: 20px; }
.mr-5 { margin-right: 25px; }

.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }
.p-5 { padding: 25px; }