/* ========== 全局样式 ========== */
:root {
    --pf-primary: #2c8c5a;
    --pf-primary-dark: #1f6b43;
    --pf-bg: #eef1f6;
    --pf-card-border: #dce1e8;
    --pf-card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}

body {
    background-color: var(--pf-bg);
    font-family: -apple-system, "Microsoft YaHei", "微软雅黑", sans-serif;
    overscroll-behavior-y: contain;
}
html {
    overscroll-behavior-y: contain;
}

/* 访客模式：隐藏需要登录的操作按钮 */
body.guest-mode .req-login {
    display: none !important;
}

/* 主内容容器增强 */
.container-fluid {
    background: transparent;
}

/* ========== 导航栏 ========== */
.navbar-pf {
    background: linear-gradient(135deg, #2c8c5a 0%, #1f6b43 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.navbar-pf .navbar-brand {
    font-weight: 700;
    color: #fff !important;
    font-size: 1.25rem;
}
.navbar-pf .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.92rem;
    padding: 0.5rem 0.8rem !important;
    border-radius: 6px;
    transition: all 0.2s;
}
.navbar-pf .nav-link:hover,
.navbar-pf .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.15);
}
.navbar-pf .nav-link i {
    margin-right: 4px;
}
.navbar-pf .brand-short { display: none; }

/* 登录后：第一排名称/版本/管理，功能菜单换行到第2～3排 */
.navbar-logged {
    padding-top: 0.35rem;
    padding-bottom: 0.45rem;
}
.navbar-logged .navbar-toggler {
    display: none !important;
}
.navbar-logged .nav-shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
}
.navbar-logged .nav-top-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.1rem;
}
.navbar-logged .nav-top-row .navbar-brand {
    margin-right: 0;
    padding: 0.2rem 0;
    flex-shrink: 1;
    min-width: 0;
}
.navbar-logged .nav-version {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.85);
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    line-height: 1.3;
    white-space: nowrap;
}
.navbar-logged .nav-top-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
}
.navbar-logged .nav-top-actions .nav-link {
    padding: 0.3rem 0.55rem !important;
    font-size: 0.85rem;
}
.navbar-logged .nav-menu-rows {
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 0.3rem;
}
.navbar-logged .nav-menu-open {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px;
    width: 100%;
}
.navbar-logged .navbar-nav .nav-link {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.8rem;
    white-space: nowrap;
}
.navbar-logged .navbar-nav .nav-link i {
    margin-right: 2px;
}
.navbar-logged .nav-plan-badge {
    font-size: 0.65rem;
    vertical-align: middle;
}
@media (max-width: 768px) {
    .navbar-logged .navbar-brand {
        font-size: 1rem;
    }
    .navbar-logged .brand-full { display: none; }
    .navbar-logged .brand-short { display: inline; }
    .navbar-logged .nav-version {
        font-size: 0.68rem;
        padding: 0.1rem 0.45rem;
    }
    .navbar-logged .nav-menu-open {
        gap: 1px;
    }
    .navbar-logged .navbar-nav .nav-link {
        padding: 0.28rem 0.42rem !important;
        font-size: 0.76rem;
    }
    .navbar-logged .navbar-nav .badge {
        font-size: 0.65rem;
    }
}

/* ========== 卡片 ========== */
.card {
    border: 1px solid var(--pf-card-border);
    box-shadow: var(--pf-card-shadow);
    border-radius: 10px;
    background: #fff;
}
.card-header {
    background: #f8f9fc;
    border-bottom: 2px solid #e4e8ef;
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
    color: #3a4654;
}
.card-body {
    background: #fff;
}

/* ========== 统计卡片 ========== */
.stat-card {
    border: 1px solid var(--pf-card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--pf-card-shadow);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.stat-card .stat-body {
    padding: 1.2rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 4px;
}
.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}
.stat-squab    { background: linear-gradient(135deg, #ffd43b, #fab005); }
.stat-juvenile { background: linear-gradient(135deg, #3bc9db, #0dcaf0); }
.stat-adult    { background: linear-gradient(135deg, #868e96, #495057); }
.stat-breeder  { background: linear-gradient(135deg, #ff6b6b, #e03131); }
.stat-info     { background: linear-gradient(135deg, #51cf66, #2c8c5a); }

/* ========== 鸽巢网格布局 ========== */
.nest-grid {
    display: grid;
    gap: 10px;
    padding: 10px;
    background: #f0f2f6;
    border-radius: 8px;
    border: 1px solid #dde2ea;
}
.nest-cell {
    background: #fff;
    border: 2px solid #d0d6e0;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    position: relative;
    min-height: 80px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    box-sizing: border-box;
}
.nest-body {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.nest-cell:hover {
    border-color: var(--pf-primary);
    box-shadow: 0 2px 8px rgba(44,140,90,0.2);
    transform: translateY(-1px);
}
.nest-cell.occupied {
    background: #e8f5e9;
    border-color: #66bb6a;
}
.nest-cell.occupied::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
}
.nest-cell.empty {
    background: #fafbfc;
    border-color: #c5cad3;
    border-style: dashed;
}
.nest-cell.has-eggs {
    background: #fff8e1;
    border-color: #ffb74d;
    border-style: solid;
}
.nest-cell.has-eggs::after {
    content: '🥚';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 11px;
    opacity: 0.7;
}
.nest-cell.has-eggs-occupied {
    background: #fff0e5;
    border-color: #ff8a65;
    border-style: solid;
}
.nest-cell.has-eggs-occupied::after {
    content: '🐣';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 11px;
    opacity: 0.8;
}
.nest-cell-wrapper {
    position: relative;
    height: 100%;
    min-width: 0;
}
.nest-cell-empty {
    min-height: 80px;
    border: 2px dashed #f1f3f5;
    border-radius: 8px;
    background: transparent;
}
.nest-number {
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
}
.nest-info {
    font-size: 0.72rem;
    color: #6c757d;
    margin-top: 2px;
    max-width: 100%;
    word-break: break-word;
    white-space: normal;
    line-height: 1.3;
}
.nest-info.fw-bold {
    font-size: 0.70rem;
}
.nest-todo {
    font-weight: 700;
    margin-top: 3px;
}
.nest-todo-ring {
    color: #c0392b !important;
}
.nest-todo-leave {
    color: #b7791f !important;
}
.nest-young-label {
    color: #0d6efd !important;
    font-weight: 700;
    margin-top: 3px;
}

/* ========== 鸽子卡片 ========== */
.pigeon-card {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--pf-card-border);
    margin-bottom: 8px;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.pigeon-card:hover {
    border-color: var(--pf-primary);
    background: #f0f7f4;
    box-shadow: 0 2px 6px rgba(44,140,90,0.15);
}
.pigeon-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
}
.pigeon-avatar.has-photo {
    padding: 0;
    background: #e9ecef;
}
.pigeon-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pigeon-avatar-lg {
    width: 120px !important;
    height: 120px !important;
    font-size: 3rem !important;
    margin-right: 0 !important;
}
.pigeon-thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pigeon-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pigeon-thumb-empty {
    font-size: .95rem;
    color: #fff;
}

/* ========== 徽章 ========== */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
}

/* ========== 按钮 ========== */
.btn-pf {
    background: var(--pf-primary);
    border-color: var(--pf-primary);
    color: #fff;
}
.btn-pf:hover {
    background: var(--pf-primary-dark);
    border-color: var(--pf-primary-dark);
    color: #fff;
}

/* ========== 表格 ========== */
.table > :not(caption) > * > * {
    padding: 0.6rem 0.75rem;
}
.table {
    background: #fff;
}
.table thead th {
    background: #f0f2f6;
    border-bottom: 2px solid #dce1e8;
    color: #3a4654;
    font-weight: 600;
}
.table-hover tbody tr:hover {
    background-color: #f0f7f4;
}
.table-group-divider {
    border-top: 2px solid #dce1e8;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #adb5bd;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px dashed #dce1e8;
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* ========== 时间线 ========== */
.timeline {
    list-style: none;
    padding-left: 0;
}
.timeline-item {
    position: relative;
    padding-left: 24px;
    padding-bottom: 16px;
    border-left: 2px solid #dce1e8;
}
.timeline-item:last-child {
    border-left-color: transparent;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--pf-primary);
}

/* ========== 日历视图 ========== */
.calendar-day {
    min-height: 80px;
    border: 1px solid #dce1e8;
    padding: 4px;
    font-size: 0.8rem;
    background: #fff;
}
.calendar-day.has-plan {
    background: #e8f5e9;
    border-color: #66bb6a;
}
.calendar-day .day-number {
    font-weight: 600;
    color: #495057;
}
.calendar-day .day-plans {
    font-size: 0.7rem;
    color: #2c8c5a;
    margin-top: 2px;
}

/* ========== 表单增强 ========== */
.form-control:focus,
.form-select:focus {
    border-color: var(--pf-primary);
    box-shadow: 0 0 0 0.2rem rgba(44,140,90,0.15);
}
.form-control,
.form-select {
    border-color: #cdd3dd;
}

/* ========== 小型统计卡（仪表盘顶部） ========== */
.card .card-body.py-2 {
    border-radius: 10px;
}

/* ========== 面包屑 ========== */
.breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}
.breadcrumb a {
    color: var(--pf-primary);
    text-decoration: none;
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    .navbar-pf .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem !important;
    }
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
    .stat-card .stat-icon {
        font-size: 1.8rem;
    }
    /* 手机端：固定每行4个，卡片可随内容拉高，并由脚本统一高度 */
    .nest-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 5px;
        padding: 6px;
        align-items: stretch;
    }
    .nest-cell-wrapper {
        height: auto;
        min-height: 100%;
    }
    .nest-cell {
        min-height: 88px;
        height: 100%;
        padding: 6px 3px;
        justify-content: flex-start;
        display: flex !important;
    }
    .nest-cell-empty {
        min-height: 88px;
        height: 100%;
    }
    .nest-number {
        font-size: 0.72rem;
        flex-shrink: 0;
        line-height: 1.2;
        margin-bottom: 2px;
    }
    .nest-info {
        font-size: 0.62rem;
        line-height: 1.35;
        margin-top: 1px;
        white-space: normal;
    }
    .table {
        font-size: 0.85rem;
    }
    .table > :not(caption) > * > * {
        padding: 0.4rem 0.5rem;
    }
    .finance-chart {
        height: 160px;
    }
    .chart-bar-wrap {
        width: 16px;
    }
    .chart-bar-label {
        font-size: 0.55rem;
    }
    .chart-month-label {
        font-size: 0.7rem;
    }
    .chart-month-profit {
        font-size: 0.6rem;
    }
}


/* ========== 仪表盘Tab ========== */
/* 强制隐藏未激活 Tab，避免 fade 只透明仍占位造成大片空白 */
.tab-content > .tab-pane {
    display: none;
}
.tab-content > .tab-pane.active.show {
    display: block;
}
.tab-pane.fade:not(.show) {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-tabs .nav-link:hover {
    color: var(--pf-primary);
    border-bottom-color: rgba(44,140,90,0.3);
}
.nav-tabs .nav-link.active {
    color: var(--pf-primary);
    background: transparent;
    border-bottom-color: var(--pf-primary);
    font-weight: 600;
}
.nav-tabs {
    border-bottom: 2px solid #dce1e8;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 10px 10px 0 0;
    border: 1px solid var(--pf-card-border);
    border-bottom: 2px solid #dce1e8;
    padding: 0 0.5rem;
}

/* ========== 模态框 ========== */
.modal-header {
    background: var(--pf-primary);
    color: #fff;
}
.modal-header .btn-close {
    filter: invert(1);
}
.modal-content {
    border: 1px solid var(--pf-card-border);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

/* ========== 列表组 ========== */
.list-group-item {
    border-color: #e4e8ef;
    background: #fff;
    transition: background 0.15s;
}
.list-group-item:hover {
    background: #f8f9fc;
}

/* ========== 提示框 ========== */
.alert {
    border-radius: 8px;
    border-width: 1px;
}

/* ========== 面包屑容器 ========== */
.breadcrumb-container {
    background: #fff;
    border: 1px solid var(--pf-card-border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--pf-card-shadow);
}

/* ========== 分隔标题 ========== */
.section-title {
    color: #3a4654;
    font-weight: 600;
    font-size: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e4e8ef;
    margin-bottom: 0.75rem;
}

/* ========== 过滤器 ========== */
.filter-bar {
    background: #fff;
    border: 1px solid var(--pf-card-border);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--pf-card-shadow);
}

/* ========== 蛋记录：统计六格均分 + 筛选铺满 ========== */
.egg-stats-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}
.egg-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    padding: 0.55rem 0.35rem;
    border-radius: 8px;
    border: 1px solid var(--pf-card-border);
    box-shadow: var(--pf-card-shadow);
    color: inherit;
}
.egg-stat:hover {
    filter: brightness(0.97);
}
.egg-stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    white-space: nowrap;
}
.egg-stat-num {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0.1rem;
}
.egg-filter-form {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}
.egg-filter-form .form-select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}
@media (max-width: 768px) {
    .egg-stats-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .egg-stat-num {
        font-size: 1.05rem;
    }
}
@media (max-width: 400px) {
    .egg-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ========== 系统介绍页 ========== */
.intro-page {
    margin: 0;
    background: #e8f0ea;
    color: #1e2a22;
}
.intro-top {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(31, 107, 67, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}
.intro-top-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.intro-brand {
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
}
.intro-brand i { margin-right: 0.25rem; }
.intro-top-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.intro-hero {
    position: relative;
    min-height: min(72vh, 560px);
    display: flex;
    align-items: flex-end;
    color: #fff;
    overflow: hidden;
}
.intro-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(20, 70, 42, 0.55) 0%, rgba(31, 107, 67, 0.82) 45%, rgba(18, 55, 34, 0.92) 100%),
        radial-gradient(ellipse 80% 60% at 70% 20%, rgba(160, 220, 170, 0.25), transparent 55%),
        linear-gradient(135deg, #2c8c5a 0%, #1a5c38 55%, #123822 100%);
}
.intro-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 18% 72%, rgba(255,255,255,0.08) 0 2px, transparent 3px),
        radial-gradient(circle at 42% 38%, rgba(255,255,255,0.06) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 78% 58%, rgba(255,255,255,0.07) 0 2px, transparent 3px);
    background-size: 120px 120px, 90px 90px, 140px 140px;
    opacity: 0.7;
}
.intro-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 3.5rem 1.25rem 2.75rem;
}
.intro-hero-brand {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.95;
    margin: 0 0 0.85rem;
}
.intro-hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.6rem);
    font-weight: 750;
    line-height: 1.25;
    margin: 0 0 0.75rem;
    max-width: 16em;
}
.intro-hero-lead {
    font-size: 1.05rem;
    line-height: 1.55;
    opacity: 0.9;
    margin: 0 0 1.5rem;
    max-width: 28em;
}
.intro-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.intro-hero-cta .btn-outline-light:hover {
    color: #1f6b43;
}
.intro-section {
    padding: 2.75rem 1.25rem;
}
.intro-section-alt {
    background: #f4f8f5;
}
.intro-section-inner {
    max-width: 960px;
    margin: 0 auto;
}
.intro-section h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: #1f6b43;
}
.intro-section-desc {
    color: #5a6b60;
    margin: 0 0 1.5rem;
    max-width: 36em;
}
.intro-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.intro-feature {
    background: #fff;
    border: 1px solid var(--pf-card-border);
    border-radius: 10px;
    padding: 1.1rem 1rem;
    box-shadow: var(--pf-card-shadow);
}
.intro-feature i {
    font-size: 1.45rem;
    color: var(--pf-primary);
    display: block;
    margin-bottom: 0.45rem;
}
.intro-feature h3 {
    font-size: 1rem;
    font-weight: 650;
    margin: 0 0 0.35rem;
}
.intro-feature p {
    margin: 0;
    font-size: 0.88rem;
    color: #5c6b62;
    line-height: 1.45;
}
.intro-apk-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--pf-card-border);
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    box-shadow: var(--pf-card-shadow);
    margin-bottom: 0.85rem;
}
.intro-apk-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}
.intro-apk-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    background: rgba(44, 140, 90, 0.12);
    color: var(--pf-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.intro-apk-name {
    font-weight: 700;
    font-size: 1.05rem;
}
.intro-apk-sub {
    color: #6c757d;
    font-size: 0.85rem;
}
.intro-apk-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.intro-apk-tip code {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    word-break: break-all;
    background: #eef3ef;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
.intro-bottom-cta .intro-hero-cta .btn-outline-secondary {
    border-color: #9aafa0;
}
.site-risk-footer {
    border-top: 1px solid #e2ebe5;
    background: #f7faf8;
    color: #5a6b61;
    margin-top: 1rem;
}
.site-risk-footer a {
    color: #1f6b43;
    font-weight: 600;
}
.site-risk-footer a:hover {
    text-decoration: underline !important;
}
.intro-footer {
    text-align: center;
    padding: 1.75rem 1rem 2.25rem;
    color: #3d4f44;
    font-weight: 600;
}
.intro-footer a {
    color: var(--pf-primary-dark);
    text-decoration: none;
}
.intro-footer a:hover {
    text-decoration: underline;
}
@media (max-width: 767.98px) {
    .intro-feature-grid {
        grid-template-columns: 1fr;
    }
    .intro-hero {
        min-height: min(68vh, 480px);
    }
    .intro-apk-box {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    .intro-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 鸽子页：脚环搜索输入框 + 按钮 同一行连体 */
.filter-bar-simple {
    padding: 0.5rem 0.75rem;
}
.filter-bar-simple .filter-search-only {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    max-width: 380px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.filter-bar-simple .filter-search-only .form-control {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 0.875rem;
    height: 2.1rem;
    padding: 0.25rem 0.5rem;
}
.filter-bar-simple .filter-search-only .form-control:focus {
    box-shadow: none;
}
.filter-bar-simple .filter-search-only .btn {
    flex: 0 0 auto;
    border-radius: 0;
    white-space: nowrap;
    height: 2.1rem;
    padding: 0 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* 鸽子列表：手机端不撑破屏幕 */
.pigeon-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.pigeon-table {
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .filter-bar-simple .filter-search-only {
        max-width: 340px;
    }
    .pigeon-table .col-hide-xs {
        display: none;
    }
    .pigeon-table {
        font-size: 0.8rem;
    }
    .pigeon-table > :not(caption) > * > * {
        padding: 0.35rem 0.35rem;
    }
    .pigeon-table .btn-sm {
        padding: 0.15rem 0.35rem;
        font-size: 0.75rem;
    }
    .pigeon-table .btn-label {
        display: none;
    }
}

/* ========== 财务图表 ========== */
.finance-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 220px;
    padding: 10px 0 0;
    border-bottom: 2px solid #dce1e8;
}
.chart-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
}
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    flex: 1;
    width: 100%;
    justify-content: center;
    padding-bottom: 2px;
}
.chart-bar-wrap {
    width: 24px;
    height: 100%;
    display: flex;
    align-items: flex-end;
}
.chart-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 0.4s ease;
    min-height: 2px;
    cursor: pointer;
}
.chart-bar:hover {
    opacity: 0.8;
}
.chart-bar-income {
    background: linear-gradient(180deg, #51cf66, #2c8c5a);
}
.chart-bar-expense {
    background: linear-gradient(180deg, #ff8787, #e03131);
}
.chart-bar-label {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    white-space: nowrap;
    color: #495057;
    font-weight: 600;
}
.chart-month-label {
    font-size: 0.8rem;
    color: #495057;
    font-weight: 600;
    margin-top: 6px;
}
.chart-month-profit {
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 2px;
}

/* ========== 进度条增强 ========== */
.progress {
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}
.progress-bar {
    transition: width 0.5s ease;
}

/* ========== 数据看板优化 ========== */
.dash-top-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.dash-stat {
    background: #fff;
    border: 1px solid var(--pf-card-border);
    border-radius: 8px;
    text-align: center;
    padding: 8px 4px;
    box-shadow: var(--pf-card-shadow);
}
.dash-stat .n {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    color: #212529;
}
.dash-stat .l {
    font-size: 0.68rem;
    color: #6c757d;
    margin-top: 2px;
}
.dash-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    overflow: visible;
    border-bottom: 2px solid #dce1e8;
}
.dash-tabs .nav-item {
    flex: 0 0 auto;
}
.dash-tabs .nav-link {
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 0.45rem 0.55rem !important;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.dash-tabs .nav-link .badge {
    font-size: 0.65rem;
    padding: 0.2em 0.4em;
}
.dash-tabs .dash-tab-text {
    margin-left: 0.15rem;
}
@media (max-width: 576px) {
    .dash-tabs .nav-link {
        font-size: 0.78rem;
        padding: 0.4rem 0.45rem !important;
    }
}
.dash-todo-panel {
    border: 1px solid #f0d78c !important;
    background: #fffdf5;
    box-shadow: var(--pf-card-shadow);
}
.dash-todo-head {
    background: #fff3cd;
    color: #664d03;
    font-weight: 600;
    padding: 0.55rem 0.85rem;
}
.dash-todo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dash-todo-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}
.dash-todo-chip.chip-ring { background: #fde8e8; color: #c0392b; }
.dash-todo-chip.chip-leave { background: #fff3cd; color: #856404; }
.dash-todo-chip.chip-hatch { background: #cff4fc; color: #055160; }
.dash-todo-block + .dash-todo-block { margin-top: 10px; }
.dash-todo-title {
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 4px;
    padding: 0 2px;
}
.dash-todo-list .dash-todo-item {
    padding: 0.65rem 0.5rem;
    border-left: 3px solid transparent;
}
.dash-todo-list .item-ring { border-left-color: #dc3545; }
.dash-todo-list .item-leave { border-left-color: #ffc107; }
.dash-todo-list .item-hatch { border-left-color: #0dcaf0; }
.dash-room-card {
    border: 1px solid var(--pf-card-border);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dash-room-card:hover {
    border-color: var(--pf-primary);
}
.dash-room-todo {
    border-color: #f0ad4e;
    background: #fffdf8;
}
.dash-room-name {
    font-size: 0.9rem;
    line-height: 1.25;
    word-break: break-word;
}
.dash-room-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 6px;
}
.dash-room-metrics .num {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
}
.dash-room-metrics .lbl {
    display: block;
    font-size: 0.65rem;
    color: #6c757d;
}
.dash-room-todos {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
@media (min-width: 768px) {
    .dash-room-metrics {
        grid-template-columns: repeat(3, 1fr);
    }
    .dash-stat .n { font-size: 1.35rem; }
    .dash-stat .l { font-size: 0.75rem; }
}
@media (max-width: 768px) {
    .dash-top-stats { gap: 4px; }
    .dash-stat { padding: 6px 2px; border-radius: 6px; }
    .dash-stat .n { font-size: 1rem; }
    .dash-todo-item .btn { font-size: 0.75rem; padding: 0.15rem 0.45rem; }
}
