* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fb;
}

/* 登录页样式 */
.login-body {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFE8D4 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 32px;
    padding: 40px 32px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 35px rgba(0,0,0,0.1);
}

.login-logo {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #FF8C42;
}

.error-message {
    background: #ffebee;
    color: #f56c6c;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #FF9F2E;
    box-shadow: 0 0 0 3px rgba(255,159,46,0.1);
}

.login-btn {
    width: 100%;
    background: #FF9F2E;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background: #FF8C42;
    transform: translateY(-1px);
}

.login-hint {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    margin-top: 20px;
}

.back-link {
    text-align: center;
    margin-top: 15px;
}

.back-link a, .back-to-site a {
    color: #FF9F2E;
    text-decoration: none;
}

/* 后台主布局 */
.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: white;
    border-right: 1px solid #eef2f6;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #FF8C42, #FFB347);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #4a5568;
    text-decoration: none;
    transition: 0.2s;
    margin: 4px 12px;
    border-radius: 12px;
}

.menu-item:hover, .menu-item.active {
    background: #FFF3E0;
    color: #FF9F2E;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 20px 30px;
}

.top-bar {
    background: white;
    border-radius: 20px;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.logout-btn {
    background: #ffebee;
    color: #f56c6c;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background: #f56c6c;
    color: white;
}

/* 统计卡片 */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-card h3 {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #FF8C42;
}

/* 表格样式 */
.data-table {
    background: white;
    border-radius: 24px;
    padding: 20px;
    overflow-x: auto;
}

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

.table-header h3 {
    font-size: 18px;
    color: #333;
}

.total-count {
    color: #999;
    font-size: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background: #fafafa;
    font-weight: 600;
    color: #666;
}

td {
    color: #333;
}

.empty-row {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* 标签样式 */
.badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-admin { background: #ffebee; color: #f56c6c; }
.badge-user { background: #e6f7e6; color: #2e7d32; }
.badge-viewer { background: #fff3e0; color: #ed6c02; }
.badge-normal { background: #e6f7e6; color: #2e7d32; }
.badge-disabled { background: #ffebee; color: #d32f2f; }

/* 金额颜色 */
.expense { color: #f56c6c; }
.income { color: #67c23a; }

/* 操作按钮 */
.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-link {
    background: none;
    border: none;
    color: #FF9F2E;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    padding: 4px 8px;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-danger { color: #f56c6c; }
.btn-success { color: #67c23a; }

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.page-link {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
}

.page-link.active {
    background: #FF9F2E;
    color: white;
    border-color: #FF9F2E;
}

/* 用户详情页 */
.user-detail-header {
    margin-bottom: 20px;
}

.user-detail-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF9F2E, #FFB347);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
}

.user-info h2 {
    margin-bottom: 5px;
}

.detail-section {
    background: white;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
}

.detail-section h4 {
    color: #FF9F2E;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #FFF3E0;
}

.info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.info-label {
    width: 100px;
    color: #999;
}

.info-value {
    flex: 1;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.stat-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 16px;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
}

.stat-number.expense { color: #f56c6c; }
.stat-number.income { color: #67c23a; }

.stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.mini-table {
    width: 100%;
    margin-top: 10px;
}

.mini-table th, .mini-table td {
    padding: 8px;
}

/* 关于页面 */
.about-section {
    text-align: center;
    padding: 40px;
}

.version {
    font-size: 20px;
    margin-bottom: 10px;
}

.copyright, .notice {
    color: #999;
    margin-top: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 200;
    }
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 成功消息 */
.success-message {
    background: #e6f7e6;
    color: #2e7d32;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
}