/* Page Header - Mobile Native-like Header with Safe Area Support */

.page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(3, 69, 168, 0.98) 0%, rgba(3, 69, 168, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    
    /* Safe area for notch/dynamic island on iOS - with Android fallback */
    padding-top: 12px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: 12px;
    
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.page-header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    max-width: 100%;
    padding: 0 12px;
    min-height: 40px;
}

.page-header-back-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.page-header-back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.page-header-back-btn:active {
    transform: scale(0.95);
}

.page-header-back-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.page-header-back-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.page-header-title {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* Mobile only */
@media (max-width: 768px) {
    .page-header {
        position: sticky;
        top: 0;
    }
}

/* Avoid conflict with app-header (desktop) */
@media (min-width: 769px) {
    .page-header {
        display: none;
    }
}
