/* 统一页面头部样式（高度与对齐） */
header.page-header {
    height: 64px;
    /* 统一高度，可根据设计调整 */
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

header.page-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

header.page-header .back-btn,
header.page-header .global-back {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

header.page-header .back-btn {
    left: 18px;
}

header.page-header .global-back {
    right: 18px;
}

@media (max-width: 768px) {
    header.page-header {
        height: 56px;
        min-height: 56px;
    }

    header.page-header h1 {
        font-size: 16px;
    }
}

/* ========== Global App Layout (Mobile Border Effect) ========== */
body {
    background: #e0e5ec;
    /* Outer grey background */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.app-wrapper {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: #f5f7fa;
    /* Default inner bg */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    /* Inner gradient */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
    /* The "Border" shadow effect */
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: visible; /* Changed from overflow-x: hidden to allow sticky positioning */
}

/* Ensure existing containers inside the wrapper fill the space properly */
.app-wrapper .container {
    max-width: 100% !important;
    margin: 0 !important;
    width: 100%;
    flex: 1;
    box-shadow: none !important;
    /* Remove individual container shadows if any */
    min-height: auto !important;
    /* Let wrapper handle height */
    background: transparent !important;
    /* Let wrapper bg show through */
}

/* Fix header positioning inside wrapper */
.app-wrapper header.page-header {
    width: 100%;
    position: relative; /* Changed from sticky to relative so tabs can stick to top */
    z-index: 100;
}