/**
 * 村级管理系统 - 自定义样式
 */

/* 全局样式 */
body {
    background-color: #f5f7fa;
    font-family: "Microsoft YaHei", "Segoe UI", Tahoma, sans-serif;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.2rem;
}

/* 统计卡片 */
.stat-card {
    border: none;
    border-radius: 10px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.6;
}

/* 头像样式 */
.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background-color: #6c757d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
    line-height: 36px;
}

.avatar-placeholder.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #dee2e6;
}

/* 照片预览 */
.photo-preview {
    width: 150px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #dee2e6;
}

.photo-preview-lg {
    width: 200px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #dee2e6;
    margin-top: 5px;
}

/* 关系标签 */
.relationship-badge {
    background-color: #e7f5ff;
    color: #1971c2;
    border: 1px solid #a5d8ff;
    font-weight: normal;
}

/* 表格样式优化 */
.table th {
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.9rem;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* 卡片样式 */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* 表单样式 */
.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #495057;
}

.form-check-label {
    font-size: 0.95rem;
}

/* 面包屑 */
.breadcrumb {
    background: none;
    padding: 0;
}

/* 年龄显示 */
.age-display {
    font-size: 0.85rem;
    margin-top: 2px;
    display: inline-block;
}

/* 页脚 */
footer {
    border-top: 1px solid #dee2e6;
}

/* 搜索筛选栏 */
.form-select, .form-control {
    font-size: 0.9rem;
}

/* 按钮优化 */
.btn-sm {
    padding: 0.2rem 0.5rem;
}

/* 开关样式优化 */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* ===== 移动端适配 ===== */

/* --- 底部Tab导航栏 --- */
.mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    border-top: 1px solid #e9ecef;
    z-index: 1050;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.mobile-tab-bar .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #868e96;
    font-size: 0.65rem;
    padding: 4px 0 2px;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}
.mobile-tab-bar .tab-item i {
    font-size: 1.25rem;
    margin-bottom: 1px;
    line-height: 1;
}
.mobile-tab-bar .tab-item.active {
    color: #4e73df;
    font-weight: 600;
}
.mobile-tab-bar .tab-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #4e73df;
    border-radius: 1px;
}
.mobile-tab-bar .tab-item:active {
    background: #f8f9fa;
}

/* --- 更多功能底部弹窗 --- */
.mobile-more-sheet {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1060;
    background: rgba(0,0,0,0.4);
    align-items: flex-end;
    justify-content: center;
}
.mobile-more-sheet.show {
    display: flex;
}
.mobile-more-sheet .sheet-content {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px 16px 32px;
    animation: slideUp 0.25s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.mobile-more-sheet .sheet-title {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: #212529;
}
.mobile-more-sheet .sheet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 8px;
}
.mobile-more-sheet .sheet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #495057;
    font-size: 0.72rem;
    padding: 8px 4px;
    border-radius: 10px;
    transition: background 0.15s;
}
.mobile-more-sheet .sheet-item:active {
    background: #f1f3f5;
}
.mobile-more-sheet .sheet-item i {
    font-size: 1.5rem;
    margin-bottom: 6px;
    color: #4e73df;
}
.mobile-more-sheet .sheet-close {
    display: block;
    width: 40px;
    height: 4px;
    background: #dee2e6;
    border-radius: 2px;
    margin: 0 auto 16px;
    border: none;
    cursor: pointer;
}

/* --- 平板端 (≤768px) --- */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 10px;
    }
    .table {
        font-size: 0.8rem;
    }
    .avatar-sm {
        width: 28px;
        height: 28px;
    }
    .photo-preview, .photo-preview-lg {
        width: 100%;
        height: auto;
    }
}

/* --- 手机端 (≤576px) --- */
@media (max-width: 576px) {
    /* 隐藏顶部导航栏，改用底部Tab */
    .navbar {
        display: none !important;
    }

    /* 内容区域底部留出Tab栏空间 */
    .container-fluid {
        padding-bottom: 64px !important;
    }

    /* 隐藏桌面端页脚 */
    footer {
        display: none !important;
    }

    /* 显示底部Tab栏 */
    .mobile-tab-bar {
        display: flex !important;
    }

    /* 卡片间距优化 */
    .card {
        border-radius: 12px;
        margin-bottom: 12px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    .card-header {
        border-radius: 12px 12px 0 0 !important;
        padding: 12px 14px !important;
        font-size: 0.92rem !important;
    }
    .card-body {
        padding: 12px 14px !important;
    }

    /* 简介/内容区图片自适应，防止超宽图片撑破布局 */
    .card-body img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 表格转卡片布局 */
    .table-mobile-card thead {
        display: none;
    }
    .table-mobile-card,
    .table-mobile-card tbody,
    .table-mobile-card tr,
    .table-mobile-card td {
        display: block;
        width: 100%;
    }
    .table-mobile-card tr {
        background: #fff;
        border-radius: 10px;
        padding: 12px 14px;
        margin-bottom: 10px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        border: none !important;
    }
    .table-mobile-card td {
        padding: 4px 0 !important;
        border: none !important;
        font-size: 0.88rem;
        display: flex;
        align-items: center;
    }
    .table-mobile-card td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #868e96;
        font-size: 0.78rem;
        flex-shrink: 0;
        width: 72px;
        min-width: 72px;
    }
    .table-mobile-card td:last-child {
        padding-top: 8px !important;
        margin-top: 4px;
        border-top: 1px solid #f1f3f5;
    }

    /* 表单优化 */
    .form-control, .form-select {
        font-size: 1rem !important; /* 防止iOS自动缩放 */
        padding: 10px 12px !important;
        border-radius: 8px !important;
    }
    .form-label {
        font-size: 0.88rem !important;
        margin-bottom: 4px !important;
    }
    .input-group-text {
        font-size: 0.88rem !important;
        padding: 10px 12px !important;
    }

    /* 按钮增大触摸区域 */
    .btn {
        padding: 10px 16px !important;
        font-size: 0.92rem !important;
        border-radius: 8px !important;
        min-height: 42px;
    }
    .btn-sm {
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
        min-height: 36px;
    }

    /* 搜索筛选栏 */
    .row.g-3 > [class*="col-"] {
        margin-bottom: 4px;
    }

    /* 统计卡片移动端 */
    .stat-card {
        border-radius: 10px;
        padding: 12px !important;
    }
    .stat-icon {
        font-size: 1.8rem !important;
    }
    .stat-card-mini {
        padding: 0 !important;
        border-radius: 6px !important;
    }
    .stat-card-mini .card-body {
        padding: 4px 3px !important;
    }
    .stat-mini-num {
        font-size: 1rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0 !important;
    }
    .stat-mini-label {
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0 !important;
    }

    /* 详情页优化 */
    .detail-header-bar {
        padding: 14px 16px !important;
    }
    .detail-field {
        padding: 10px 12px !important;
        margin-bottom: 8px !important;
    }

    /* 头像 */
    .avatar-placeholder {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.75rem;
        line-height: 32px;
    }

    /* 照片预览 */
    .photo-preview {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }

    /* 面包屑简化 */
    .breadcrumb {
        font-size: 0.82rem;
        padding: 8px 0 !important;
    }

    /* 人员卡片 */
    .person-card {
        padding: 10px 12px;
    }

    /* 模态框优化 */
    .modal-dialog {
        margin: 16px !important;
        max-height: calc(100vh - 32px);
    }
    .modal-content {
        border-radius: 14px !important;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }

    /* 徽章 */
    .badge {
        font-size: 0.68rem;
        padding: 3px 6px;
    }

    /* 分隔线 */
    hr {
        margin: 1rem 0;
    }

    /* 标题字号 */
    h4, .h4 { font-size: 1.1rem !important; }
    h5, .h5 { font-size: 1rem !important; }
    h6, .h6 { font-size: 0.92rem !important; }

    /* 台账侧边栏移动端适配 */
    .ledger-layout {
        flex-direction: column !important;
    }
    .ledger-sidebar {
        width: 100% !important;
        min-width: unset !important;
        border-right: none !important;
        border-bottom: 1px solid #dee2e6;
        max-height: none !important;
    }
    .ledger-sidebar .sidebar-section {
        padding: 10px 12px;
    }
    .ledger-content {
        width: 100% !important;
    }
    .ledger-sidebar .cat-list {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .ledger-sidebar .cat-item {
        white-space: nowrap;
        border-left: none !important;
        border-bottom: 2px solid transparent;
        padding: 6px 12px;
        font-size: 0.82rem;
        border-radius: 6px;
        background: #f1f3f5;
    }
    .ledger-sidebar .cat-item.active,
    .ledger-sidebar .cat-item:hover {
        background: #4e73df;
        color: #fff;
        border-bottom-color: transparent;
    }

    /* 空状态图标 */
    .bi[style*="font-size: 2rem"],
    .bi[style*="font-size:3rem"] {
        font-size: 2.5rem !important;
    }

    /* Alert间距 */
    .alert {
        padding: 10px 12px !important;
        font-size: 0.85rem;
        border-radius: 8px !important;
    }

    /* 列表操作按钮组 */
    .btn-group .btn,
    .d-flex.gap-2 .btn {
        flex: 1;
        min-width: 0;
    }

    /* 文件上传区域 */
    .form-control[type="file"] {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    /* 开关 */
    .form-check-input {
        width: 2.2em;
        height: 1.2em;
    }

    /* 首页统计数字和村庄标签移动端优化 */
    .mobile-stat-box {
        padding: 4px 6px !important;
        min-width: 55px !important;
    }
    .mobile-stat-box .fw-bold {
        font-size: 1rem !important;
    }
    .mobile-stat-box .text-muted {
        font-size: 0.7rem !important;
    }
    .mobile-village-badge {
        min-width: 110px !important;
        padding: 6px 10px !important;
    }
    .mobile-village-badge .fw-bold {
        font-size: 0.85rem !important;
    }

    /* 表单移动端优化 */
    .mb-3 > .row > [class*="col-"] {
        margin-bottom: 0.25rem;
    }
    .form-check.form-switch {
        padding-left: 0;
        margin-bottom: 0.5rem;
    }
    .form-check.form-switch .form-check-input {
        margin-left: 0;
        float: none;
        vertical-align: middle;
    }
    .form-control[type="file"] {
        min-height: 44px;
        font-size: 0.9rem !important;
    }
    .text-center.mt-4 .btn {
        min-width: 120px;
    }
    /* 附件列表文件名不溢出 */
    .att-item .flex-grow-1 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }
    .att-item .btn-sm {
        min-width: 32px;
        min-height: 32px;
    }
    /* 纠纷照片删除按钮加大 */
    .photo-item .btn-sm,
    .position-relative .btn-sm {
        min-width: 32px;
        min-height: 32px;
        font-size: 0.8rem !important;
    }
    /* 表格内操作按钮紧凑 */
    .table-mobile-card td .btn-sm {
        padding: 2px 6px;
        font-size: 0.78rem;
    }
    /* 卡片内表格底部留白(Tab栏避让) */
    .card .table-responsive {
        padding-bottom: 60px;
    }
    /* 详情弹窗表格移动端适配 */
    .detail-table th {
        white-space: normal !important;
        width: auto !important;
    }
    .detail-table,
    .detail-table thead,
    .detail-table tbody,
    .detail-table tr,
    .detail-table th,
    .detail-table td {
        display: block;
        width: 100%;
    }
    .detail-table tr {
        margin-bottom: 6px;
    }
    .detail-table th {
        background: #f8f9fa;
        border-bottom: none;
        padding: 4px 8px !important;
        font-size: 0.8rem;
    }
    .detail-table td {
        padding: 6px 8px !important;
        border-bottom: 1px solid #f1f3f5;
    }

    /* 台账页面标题不换行 */
    .content-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px;
        flex-wrap: wrap;
    }
    .content-header h4 {
        font-size: 1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 0;
        min-width: 0;
    }
    .content-header h4 small {
        font-size: 0.78rem !important;
    }
    /* 台账按钮文字不换行 */
    .content-header .btn {
        white-space: nowrap;
        font-size: 0.82rem !important;
        padding: 6px 10px !important;
        flex-shrink: 0;
    }

    /* 走访记录页面按钮组移动端适配 */
    .d-flex.justify-content-between > h5 {
        font-size: 0.92rem !important;
        flex-shrink: 1;
        min-width: 0;
    }
    .d-flex.justify-content-between > h5 small {
        display: block;
        font-size: 0.75rem !important;
    }
    .d-flex.justify-content-between > div {
        flex-shrink: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .d-flex.justify-content-between > div .btn {
        font-size: 0.78rem !important;
        padding: 5px 8px !important;
        white-space: nowrap;
    }

    /* 通用：卡片头部操作按钮不换行 */
    .card-header.d-flex .btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* 分类Tab横向滚动 */
    .cat-list,
    .category-tabs,
    .nav-pills.flex-column {
        flex-direction: row !important;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .cat-list .cat-item,
    .category-tabs .cat-item,
    .nav-pills.flex-column .nav-item {
        flex-shrink: 0;
    }

    /* 统计卡片文字适配 */
    .stat-card h6 {
        font-size: 0.82rem !important;
        line-height: 1.3;
    }
    .stat-card h3 {
        font-size: 1.3rem !important;
    }
    .stat-card small {
        font-size: 0.7rem !important;
    }

    /* 照片行特殊处理：标签在上，图片在下 */
    .table-mobile-card td[data-label="照片"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .table-mobile-card td[data-label="照片"]::before {
        width: auto !important;
        min-width: auto !important;
        margin-bottom: 2px;
    }
    .table-mobile-card td[data-label="照片"] .avatar-sm,
    .table-mobile-card td[data-label="照片"] .avatar-placeholder {
        width: 48px !important;
        height: 48px !important;
    }

    /* 操作按钮行：标签与按钮紧凑排列 */
    .table-mobile-card td:last-child {
        flex-wrap: wrap;
        gap: 4px;
    }
    .table-mobile-card td:last-child .btn-sm {
        min-width: 36px;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* 回到顶部FAB避开Tab栏和卡片操作按钮 */
    #backToTopBtn {
        bottom: 72px !important;
        width: 38px !important;
        height: 38px !important;
        right: 12px !important;
        z-index: 1040 !important;
    }

    /* 纠纷/印章等页面"新增"按钮位置优化 */
    .card-body .btn-success,
    .card-body .btn-primary {
        white-space: nowrap;
    }
    /* 筛选栏中的"新增"按钮全宽 */
    form.row .text-end .btn-success,
    form.row .text-end .btn-primary {
        width: 100%;
        margin-top: 4px;
    }

    /* 筛选表单按钮组 */
    .card-body .d-flex.gap-2,
    .card-body .row .btn {
        white-space: nowrap;
    }

    /* 面包屑导航移动端 */
    .breadcrumb {
        font-size: 0.78rem !important;
        flex-wrap: wrap;
    }

    /* 空状态图标缩小 */
    .text-center .bi[style*="font-size: 3rem"],
    .text-center .bi[style*="font-size:2rem"] {
        font-size: 2rem !important;
    }

    /* 图库筛选栏移动端 - 折叠式 */
    .gallery-topbar {
        gap: 4px !important;
        padding: 4px 0 !important;
        margin-bottom: 6px !important;
    }
    .gallery-actions {
        gap: 4px !important;
    }
    .gallery-actions .btn-sm {
        font-size: 0.78rem !important;
        padding: 3px 8px !important;
    }
    .gallery-filter-panel {
        gap: 4px !important;
        padding: 5px 8px !important;
        margin-bottom: 6px !important;
    }
    .gallery-filter-panel .form-select-sm,
    .gallery-filter-panel .form-control-sm {
        font-size: 0.78rem !important;
        padding: 4px 6px !important;
    }
    .gf-uploader { min-width: 68px !important; }
    .gf-search { min-width: 80px !important; max-width: 130px !important; }
    .gf-date-range .form-control-sm {
        width: 100px !important;
    }
    .gf-sep { font-size: 0.72rem !important; }
    /* 移动端卡片操作按钮始终可见(touch无hover) */
    .gallery-card .card-actions {
        display: flex !important;
    }
    .gallery-card .card-actions button {
        opacity: 0.55;
    }
    /* 选择模式底部栏 - 移动端适配 */
    .selection-bar {
        bottom: 56px !important;
        padding: 8px 10px !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .selection-bar .sel-actions {
        gap: 4px !important;
    }
    .selection-bar button {
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
    }
    /* 照片预览网格移动端 */
    .photo-preview-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
    }
    .photo-preview-item .preview-check {
        width: 22px !important;
        height: 22px !important;
        font-size: 12px !important;
    }
}

/* ===== 底部Tab导航栏 ===== */
.mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    background: #fff;
    border-top: 1px solid #e9ecef;
    z-index: 1050;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    align-items: center;
    justify-content: space-around;
}
.mobile-tab-bar .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #868e96;
    font-size: 0.65rem;
    position: relative;
    padding: 4px 0;
    transition: color 0.2s;
}
.mobile-tab-bar .tab-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}
.mobile-tab-bar .tab-item.active {
    color: #4e73df;
    font-weight: 600;
}
.mobile-tab-bar .tab-item.active::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 20px; height: 2px;
    background: #4e73df;
    border-radius: 1px;
}

/* ===== "更多"底部弹出面板 ===== */
.mobile-more-sheet {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1060;
}
.mobile-more-sheet.show {
    display: block;
}
.mobile-sheet-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
}
.mobile-sheet-panel {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 16px 12px 72px;
    max-height: 75vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: mobileSheetUp 0.3s ease;
}
@keyframes mobileSheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.mobile-sheet-handle {
    width: 36px; height: 4px;
    background: #dee2e6;
    border-radius: 2px;
    margin: 0 auto 14px;
}
.mobile-sheet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.mobile-sheet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 4px 10px;
    text-decoration: none;
    color: #495057;
    border-radius: 12px;
    transition: background 0.15s;
    font-size: 0.72rem;
}
.mobile-sheet-item:active {
    background: #f1f3f5;
}
.mobile-sheet-item i {
    font-size: 1.4rem;
    margin-bottom: 6px;
    color: #4e73df;
}
.mobile-sheet-divider {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: #adb5bd;
    padding: 8px 4px 2px;
    border-top: 1px solid #f1f3f5;
    margin-top: 4px;
}

/* 空状态 */
.bi[style*="font-size: 2rem"] {
    color: #adb5bd;
}

/* 标签样式 */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    margin-right: 2px;
}

/* 户主信息卡片 */
.border-primary .card-header {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
}

/* 过渡效果 */
.btn {
    transition: all 0.2s;
}

/* 表单区域分割 */
hr {
    margin: 1.5rem 0;
    opacity: 0.15;
}

/* 输入框焦点效果 */
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* 上传文件样式 */
.form-control[type="file"] {
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
}

/* 公开浏览页 - 人员卡片 */
.person-card {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.person-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
    background-color: #f0f6ff;
}

/* 关系标签小尺寸 */
.relationship-badge-sm {
    font-size: 0.7rem;
    color: #1971c2;
    background: #e7f5ff;
    padding: 1px 6px;
    border-radius: 3px;
}

/* 户主卡片 */
.household-card {
    transition: box-shadow 0.2s;
}

.household-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* 详情弹窗头像 */
.detail-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0d6efd;
}

.avatar-placeholder.avatar-xl {
    width: 120px;
    height: 120px;
    font-size: 3rem;
    border: 3px solid #0d6efd;
}

/* 详情照片 */
.detail-photo {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.detail-photo-full {
    width: 100%;
    height: 300px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    cursor: zoom-in;
    transition: opacity 0.2s;
    background: #f8f9fa;
}

.detail-photo-full:hover {
    opacity: 0.85;
}

/* 详情表格 */
.detail-table th {
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

.detail-table td {
    color: #212529;
}

/* 统计图标小尺寸 */
.stat-icon-sm {
    font-size: 1.8rem;
    opacity: 0.6;
}

/* 登录页面 */
.shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
}

/* 敏感信息脱敏 */
.sensitive-wrap {
    cursor: pointer;
    display: inline-block;
}

.sensitive-masked {
    color: #6c757d;
    letter-spacing: 1px;
}

.sensitive-masked:hover {
    color: #0d6efd;
}

.sensitive-real {
    color: #212529;
    font-weight: 500;
    letter-spacing: 1px;
}

.sensitive-real:hover {
    color: #dc3545;
}

/* 迷你统计卡片 */
.stat-card-mini {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.85;
    padding: 0 !important;
}
.stat-card-mini .card-body {
    padding: 4px 3px !important;
}

.stat-card-mini:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card-mini.active {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.5), 0 4px 12px rgba(0,0,0,0.2);
}

.stat-mini-num {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-mini-label {
    font-size: 0.75rem;
    opacity: 0.9;
    white-space: nowrap;
}

/* 筛选高亮人员卡片 */
.person-highlight {
    border-color: #0d6efd !important;
    background-color: #e8f0fe !important;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* ===== 详情页美化 ===== */
.detail-header-bar {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: #fff;
    border-radius: 10px 10px 0 0;
    padding: 20px 24px;
}
.detail-header-bar .detail-code {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.detail-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4e73df;
    padding: 8px 0 10px;
    margin-bottom: 14px;
    border-bottom: 2px solid #e8ecf1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.detail-section-title i {
    margin-right: 6px;
    font-size: 0.9rem;
}
.detail-field {
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 0;
    transition: box-shadow .15s;
}
.detail-field:hover {
    box-shadow: 0 2px 8px rgba(78,115,223,0.1);
}
.detail-field-label {
    font-size: 0.78rem;
    color: #8a94a6;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.detail-field-label i {
    font-size: 0.85rem;
    opacity: 0.65;
}
.detail-field-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    word-break: break-word;
}
.detail-modal-section {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #edf2f7;
}
.detail-modal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.detail-modal-section-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4e73df;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.detail-modal-section-title i {
    font-size: 0.9rem;
}
.detail-info-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.detail-info-row .info-label {
    color: #8a94a6;
    font-size: 0.82rem;
    min-width: 72px;
    flex-shrink: 0;
}
.detail-info-row .info-value {
    color: #2d3748;
    font-weight: 500;
}
/* Modal内卡片网格字段块 */
.detail-card-block {
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    padding: 14px 16px;
    height: 100%;
    transition: box-shadow .15s;
}
.detail-card-block:hover {
    box-shadow: 0 2px 8px rgba(78,115,223,0.1);
}
.detail-card-block .card-field-label {
    font-size: 0.78rem;
    color: #8a94a6;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.detail-card-block .card-field-label i {
    font-size: 0.85rem;
    opacity: 0.65;
}
.detail-card-block .card-field-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    word-break: break-word;
}

