/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    color: #0056b3;
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 15px;
}

.logout-btn {
    background-color: #f8f9fa;
    color: #333;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.logout-btn:hover {
    background-color: #e2e6ea;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 220px;
    height: calc(100vh - 60px);
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 900;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: #f8f9fa;
    border-left-color: #007bff;
    color: #007bff;
}

/* 主要内容区域 */
.main-content {
    margin-left: 220px;
    margin-top: 60px;
    padding: 20px;
    min-height: calc(100vh - 60px);
}

.page-title {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.card-body {
    padding: 15px;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 500;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #007bff;
    outline: none;
}

.required:after {
    content: "*";
    color: #dc3545;
    margin-left: 3px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 15px;
    margin: 5px 10px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0069d9;
    color: #fff;
}

.btn-primary {
    background-color: #007bff;
}

.btn-success {
    background-color: #28a745;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-warning {
    background-color: #ffc107;
    color: #333;
}

.btn-info {
    background-color: #17a2b8;
}

.btn-secondary {
    background-color: #6c757d;
}

/* 提示框样式 */
.alert {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 统计卡片 */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 20px;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    margin: 0 10px 20px;
    padding: 20px;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
}

.stat-card.primary {
    border-top: 3px solid #007bff;
}

.stat-card.success {
    border-top: 3px solid #28a745;
}

.stat-card.warning {
    border-top: 3px solid #ffc107;
}

.stat-card.danger {
    border-top: 3px solid #dc3545;
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #007bff;
}

.pagination a:hover {
    background-color: #f8f9fa;
}

.pagination a.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pagination a.disabled {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
}

/* 搜索框 */
.search-box {
    display: flex;
    margin-bottom: 20px;
}

.search-box .form-control {
    flex: 1;
    margin-right: 10px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
        transition: width 0.3s;
    }
    
    .sidebar.active {
        width: 220px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-container {
        flex-direction: column;
    }
    
    .stat-card {
        margin-bottom: 10px;
    }
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f5f5f5;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    font-size: 24px;
    color: #333;
}

.login-form .form-group {
    margin-bottom: 20px;
}

/* 移动端样式 */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-header h1 {
    font-size: 18px;
    margin: 0;
}

.mobile-header .back-btn {
    font-size: 20px;
    color: #333;
}

.mobile-container {
    padding: 15px;
}

.mobile-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    overflow: hidden;
}

.mobile-card-header {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.mobile-card-body {
    padding: 15px;
}

.mobile-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.mobile-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    border-radius: 10px;
    padding: 20px 10px;
    text-align: center;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-menu-item:nth-child(2) {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}

.mobile-menu-item:nth-child(3) {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.mobile-menu-item:nth-child(4) {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.mobile-menu-item:nth-child(5) {
    background: linear-gradient(135deg, #a6c0fe 0%, #f68084 100%);
}

.mobile-menu-item:nth-child(6) {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
}

.mobile-menu-item i {
    font-size: 24px;
    margin-bottom: 10px;
}

.mobile-form-group {
    margin-bottom: 15px;
}

.mobile-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.mobile-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.mobile-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #fff;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
}

.mobile-stats {
    display: flex;
    margin-bottom: 20px;
}

.mobile-stat-card {
    flex: 1;
    padding: 15px;
    text-align: center;
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    border-radius: 10px;
    color: #fff;
    margin-right: 10px;
}

.mobile-stat-card:last-child {
    margin-right: 0;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.mobile-stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.mobile-stat-title {
    font-size: 14px;
}

/* 水印样式 */
.watermark {
    color: #999;
    font-size: 12px;
}

/* 金额样式 */
.amount {
    font-weight: 500;
    color: #dc3545;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

/* 图标样式 */
.icon {
    margin-right: 5px;
}

/* 工具栏样式 */
.toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.toolbar-left, .toolbar-right {
    display: flex;
}

.toolbar-left > *, .toolbar-right > * {
    margin-right: 10px;
}

.toolbar-left > :last-child, .toolbar-right > :last-child {
    margin-right: 0;
}

