/* ===== 页面顶部导航 ===== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 0 8px;
    height: 48px;
    background: #0350A3;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.top-bar-left .nav-back-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    top: 1px;
}

.top-bar-left .nav-back-icon:active {
    opacity: 0.7;
}

.top-bar-left .nav-back-icon-icon {
    width: 24px;
    height: 24px;
}

.top-bar .logo {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.top-bar .nav-links a {
    margin-left: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.top-bar .nav-links a:active {
    opacity: 0.7;
}

/* ===== 主内容区 ===== */
.main-content {
    background: #f0f0f0;
    padding: 12px 16px 0;
    min-height: calc(100vh - 48px);
}

/* ===== 用户信息卡片 ===== */
.user-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 20px;
    margin-bottom: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 64px;
    height: 64px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 32px;
    color: #ccc;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-detail {
    flex: 1;
    min-width: 0;
}

.user-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.user-name {
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.vip-badge {
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(to right, #FFB300, #F57C00);
    color: #fff;
}

.user-phone {
    font-size: 14px;
    color: #999;
}

.not-login {
    font-weight: 500;
    font-size: 15px;
    color: #222;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.not-login:active {
    opacity: 0.7;
}

.user-stats {
    display: flex;
    padding-top: 16px;
    border-top: 1px solid #f5f5f5;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #999;
}

.stat-divider {
    width: 1px;
    background: #f0f0f0;
}

/* ===== 金刚区 ===== */
.quick-menu {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 16px;
    margin-bottom: 12px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.menu-item:active {
    transform: scale(0.95);
}

.menu-icon-wrap {
    width: 48px;
    height: 48px;
    background: #ebf5ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.menu-name {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* ===== 功能菜单列表 ===== */
.menu-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    overflow: hidden;
}

.menu-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.menu-list-item:last-child {
    border-bottom: none;
}

.menu-list-item:active {
    background: #f8f8f8;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-icon {
    font-size: 20px;
}

.item-name {
    font-size: 15px;
    color: #222;
}

.item-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.item-badge.gray {
    color: #999;
}

.item-badge.blue {
    color: #1565C0;
    background: #ebf5ff;
}

.item-badge.red {
    color: #fff;
    background: #EF5350;
    border-radius: 12px;
}

.item-arrow {
    font-size: 20px;
    color: #ccc;
    line-height: 1;
}

/* ===== 退出登录 ===== */
.logout-btn {
    width: 100%;
    padding: 12px 0;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    color: #EF5350;
    font-size: 15px;
    font-weight: 600;
    background: transparent;
    cursor: pointer;
    margin-bottom: 12px;
}

.logout-btn:active {
    background: #FFEBEE;
}

.logout-btn.hidden {
    display: none;
}

/* ===== Toast / Modal ===== */
.page-toast {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 8px;
    max-width: 80vw;
    text-align: center;
}

.page-toast.show {
    display: block;
}

.page-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.page-modal.show {
    display: flex;
}

.page-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.page-modal-panel {
    position: relative;
    width: 100%;
    max-width: 300px;
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px 16px;
    text-align: center;
}

.page-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

.page-modal-content {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.page-modal-actions {
    display: flex;
    gap: 12px;
}

.page-modal-actions button {
    flex: 1;
    padding: 10px 0;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.btn-confirm {
    background: #0350A3;
    color: #fff;
}

/* ===== 底部 Tab 导航 ===== */
.bottom-tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: content-box;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #999;
    font-size: 11px;
    text-decoration: none;
    flex: 1;
    height: 60px;
}

.tab-item.active {
    color: #0350A3;
}

.tab-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.tab-text {
    font-size: 11px;
}

.page-bottom-space {
    height: 76px;
}

.login-block.hidden,
.user-detail.hidden,
.not-login.hidden,
.vip-badge.hidden {
    display: none;
}
