/**
 * ================================================
 * 法律提示：本程序/代码仅限合法用途使用，您可以修改自用，请保留版权
 * ================================================
 * 使用限制：禁止用于非法用途，作者不承担任何使用责任
 * ================================================
 * Copy right 2026 网博士网络工作室， 保留所有权利。
 * ================================================
 * 官方网址: www.网博士.com   联系：QQ: 570830288
 * ================================================
 */
/* ==================== 全局基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4A90E2;
    --success: #52C41A;
    --warning: #FAAD14;
    --danger: #FF4D4F;
    --text: #333;
    --text-light: #999;
    --bg: #F5F5F5;
    --white: #FFF;
    --border: #E8E8E8;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

input, select, textarea, button {
    font-family: inherit;
}

/* ==================== 通用组件 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:active {
    background: #3A7BC8;
    transform: scale(0.98);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
    display: flex;
}

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

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--white);
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-input::placeholder {
    color: var(--text-light);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ==================== 底部导航（3按钮新样式） ==================== */
.bnav {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: 400px;
    max-width: calc(100vw - 24px);
    height: 60px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    z-index: 999;
    box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.12), 0 18px 36px rgba(15, 23, 42, 0.14), 0 3px 12px rgba(15, 23, 42, 0.08);
}

.bnav ul {
    position: relative;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    margin: 0;
    height: 100%;
}

.bnav .blist {
    list-style: none;
    position: relative;
    width: 70px;
    height: 60px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bnav .blist a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    text-decoration: none;
}

.bnav .bicon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    color: #222327;
    transition: 0.5s;
    transition-delay: 0s;
}

.bnav .bicon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.bnav .bicon::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--clr, #4a90e2);
    border-radius: 50%;
    filter: blur(5px);
    opacity: 0;
    transition: 0.5s;
    transition-delay: 0s;
}

.bnav .blist.active .bicon {
    color: var(--clr, #4a90e2);
    transition-delay: 0.25s;
}

.bnav .blist:nth-child(2).active .bicon {
    background: var(--clr, #4a90e2);
    color: #080808;
    transform: translateY(-27px);
}

.bnav .blist:nth-child(2).active .bicon::before {
    opacity: 0.5;
    transition-delay: 0.5s;
}

.bnav .btext {
    display: none;
}

.bnav .bindicator {
    position: absolute;
    top: -35px;
    left: 50%;
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14), 0 3px 10px rgba(15, 23, 42, 0.08);
    z-index: 1;
    transform: translateX(-50%);
}

.bnav .bindicator::before {
    content: "";
    position: absolute;
    top: 5px;
    left: -28px;
    width: 30px;
    height: 30px;
    background: transparent;
    border-radius: 50%;
    box-shadow: 15px 18px #fff;
}

.bnav .bindicator::after {
    content: "";
    position: absolute;
    top: 5px;
    right: -28px;
    width: 30px;
    height: 30px;
    background: transparent;
    border-radius: 50%;
    box-shadow: -15px 18px #fff;
}

.bnav .blist:nth-child(1) { --clr: #f44336; }
.bnav .blist:nth-child(2) { --clr: #0fc70f; }
.bnav .blist:nth-child(3) { --clr: #ffa117; }

@media (max-width: 560px) {
    .bnav {
        width: calc(100vw - 24px);
        height: 56px;
        bottom: 10px;
    }

    .bnav ul {
        padding: 0 18px;
    }

    .bnav .blist {
        width: 54px;
        height: 56px;
    }

    .bnav .bicon {
        width: 46px;
        height: 46px;
    }

    .bnav .bicon svg {
        width: 22px;
        height: 22px;
    }

    .bnav .blist:nth-child(2).active .bicon {
        transform: translateY(-21px);
    }

    .bnav .bindicator {
        top: -20px;
        left: 50%;
        width: 54px;
        height: 54px;
        transform: translateX(-50%);
    }

    .bnav .bindicator::before {
        left: -22px;
        width: 24px;
        height: 24px;
        box-shadow: 12px 14px #fff;
    }

    .bnav .bindicator::after {
        right: -22px;
        width: 24px;
        height: 24px;
        box-shadow: -12px 14px #fff;
    }

    .bnav .btext {
        font-size: 10px;
    }
}

body:has(.bnav) {
    padding-bottom: 92px;
}

@media (max-width: 560px) {
    body:has(.bnav) {
        padding-bottom: 80px;
    }
}

/* ==================== 卡片样式 ==================== */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

/* ==================== 列表样式 ==================== */
.list-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

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

.list-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.list-item-desc {
    font-size: 12px;
    color: var(--text-light);
}

.list-item-extra {
    text-align: right;
    flex-shrink: 0;
}

.list-item-amount {
    font-size: 16px;
    font-weight: 600;
}

.list-item-amount.income {
    color: var(--success);
}

.list-item-amount.expense {
    color: var(--danger);
}
