:root {
    --yljz-primary: #2563eb;
    --yljz-income: #16a34a;
    --yljz-expense: #dc2626;
    --yljz-sidebar-bg: #1f2937;
}

body {
    background-color: #f5f6f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* ---------- 登录 / 注册 ---------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 55%, #111827 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .28);
}

.auth-brand {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--yljz-primary);
}

/* ---------- 主框架 ---------- */
.app-sidebar {
    width: 210px;
    min-height: 100vh;
    background-color: var(--yljz-sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1030;
}

.app-sidebar .brand {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 1.15rem 1.25rem;
    display: block;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.app-sidebar .nav-link {
    color: #cbd5e1;
    padding: .7rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    border-left: 3px solid transparent;
}

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

.app-sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(37, 99, 235, .2);
    border-left-color: var(--yljz-primary);
}

.app-main {
    margin-left: 210px;
    min-height: 100vh;
}

.app-topbar {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: .7rem 1.5rem;
}

.app-content {
    padding: 1.5rem;
}

/* ---------- 卡片与数字 ---------- */
.stat-card .stat-label {
    color: #6b7280;
    font-size: .85rem;
    margin-bottom: .35rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.text-income {
    color: var(--yljz-income) !important;
}

.text-expense {
    color: var(--yljz-expense) !important;
}

.amount-income {
    color: var(--yljz-income);
    font-weight: 600;
}

.amount-expense {
    color: var(--yljz-expense);
    font-weight: 600;
}

.category-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #eef2ff;
    color: var(--yljz-primary);
    font-size: 1rem;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.chart-box {
    width: 100%;
    height: 300px;
}

.pagination {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .app-sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }

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