/* ==================== 页面布局 ==================== */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    /* 适配 iOS 刘海屏 / Android 状态栏安全区域 */
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
    background-color: #f5f5f5;
}

.app-header {
    background: linear-gradient(135deg, #1989fa 0%, #3f7efc 100%);
    padding: 16px;
    color: white;
    min-height: 80px;
}

.app-content {
    flex: 1;
    min-height: 0;
    padding: 0;
    overflow-y: auto;
    padding-bottom: 12px;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.bottom-action-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    gap: 12px;
    padding: 12px 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

.bottom-action-bar .van-button {
    flex: 1;
}

/* ==================== 通用列表与卡片 ==================== */

.page-content {
    flex: 1;
    overflow-y: auto;
}

.page-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    position: relative;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
    transition: background-color 0.2s;
}

.card:active {
    background-color: #f7f8fa;
}

.card-content {
    overflow: hidden;
    padding: 16px;
    background: #fff;
}

.card-content-compact {
    padding: 14px;
}

.detail-card-content {
    padding: 16px 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-title {
    padding: var(--van-cell-group-title-padding);
    color: var(--van-cell-group-title-color);
    font-size: var(--van-cell-group-title-font-size);
    line-height: var(--van-cell-group-title-line-height);
}

.card-header > .card-title {
    flex: 1;
    min-width: 0;
    margin-right: 12px;
    padding: 0;
    overflow: hidden;
    color: #323233;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-row {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #646566;
    font-size: 13px;
}

.card-row + .card-row {
    margin-top: 6px;
}

.stats-grid {
    display: grid;
    gap: 8px;
}

.stats-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stats-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--van-primary-color);
}

.stats-grid-2 .stats-value {
    font-size: 24px;
}

.stats-label {
    font-size: 12px;
    color: #969799;
}

.card-actions {
    display: flex;
    border-top: 1px solid #f0f0f0;
}

.card-btn {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.card-btn:active {
    background-color: #f5f5f5;
}

.card-btn + .card-btn {
    border-left: 1px solid #f0f0f0;
}

/* ==================== 通用颜色 ==================== */

.profile-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
}

.profile-card-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #323233;
}

.profile-card-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.phone-value {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.list-stats {
    display: flex;
    gap: 16px;
}

.list-stats-top {
    padding-top: 12px;
    border-top: 1px solid #f2f3f5;
}

.list-stats-bottom {
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f3f5;
}

.list-stats-gap-lg {
    gap: 24px;
}

.list-stat-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.list-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #323233;
}

.list-stat-label {
    font-size: 12px;
    color: #969799;
}

.card-section-flat {
    margin: 0 0 12px;
    background: #fff;
    padding: 20px 16px;
    box-shadow: none;
}

.building-stats {
    display: flex;
    gap: 16px;
}

.building-stats .stat-item,
.community-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.building-stats .stat-value,
.community-stats .stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #323233;
}

.building-stats .stat-label,
.community-stats .stat-label {
    font-size: 12px;
    color: #969799;
}

.primary-color {
    color: var(--van-primary-color);
}

.success-color {
    color: var(--van-success-color);
}

.warning-color {
    color: var(--van-warning-color);
}

.danger-color {
    color: var(--van-danger-color);
}

/* ==================== 通用标题 ==================== */

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #323233;
    font-size: 16px;
    font-weight: 600;
}

/* ==================== 加载状态 ==================== */

.loading-center {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

/* ==================== 全屏 Tabs 布局 ==================== */

.tabs-page {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f7f8fa;
}

.tabs-full {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tabs-full .van-sticky,
.tabs-full .van-tabs__wrap {
    flex-shrink: 0;
}

.tabs-full .van-tabs__content {
    flex: 1;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

.tabs-full .van-tab__panel {
    display: flex;
    flex: 1;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.tabs-panel {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tabs-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f7f8fa;
}
