/* App header: title, logo, top-right action buttons (coffee / strategy / share), tab bar */

.header {
    background: linear-gradient(135deg, #2563eb, #a855f7, #2563eb);
    background-size: 250% 250%;
    padding: 40px 30px 30px;
    text-align: center;
    position: relative;
    z-index: 2;
    animation: animateGradient 9s ease infinite;
    flex: 0 0 auto;
    border-radius: var(--shell-radius) var(--shell-radius) 0 0;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    backdrop-filter: blur(5px);
    border-radius: var(--shell-radius) var(--shell-radius) 0 0;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
    gap: 7px;
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    left: 0;
    margin-left: -10px;
    top: 6px;
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 400;
    position: relative;
    z-index: 1;
    margin-top: 5px;
    margin-bottom: 5px;
    display: block;
    text-align: center;
}

.header p .subheader-inner {
    display: inline-block;
    max-width: 100%;
    padding: 0 6px;
}

.wealth-nowrap {
    white-space: nowrap;
}

.header-top-right {
    position: absolute;
    top: 14px;
    right: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.bmc-cup {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.bmc-cup:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.bmc-cup img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.header-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    vertical-align: middle;
    margin-left: 4px;
    position: relative;
    top: -1px;
    z-index: 10;
    flex-shrink: 0;
    padding: 0;
}

.header-info:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.share-btn svg {
    width: 14px;
    height: 14px;
}

.tab-bar {
    display: flex;
    gap: 4px;
    padding: 8px 12px 0;
    background: rgba(15, 23, 42, 0.55);
    flex: 0 0 auto;
    position: relative;
}

/* Dark backing extended below the strip so the folder body's rounded
   shoulders are visible against it at the card edges. */
.tab-bar::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
    background: rgba(15, 23, 42, 0.55);
    pointer-events: none;
}

.tab-btn {
    --tab-fill: transparent;
    position: relative;
    flex: 1;
    padding: 12px 10px;
    border: none;
    background: var(--tab-fill);
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
    letter-spacing: 0.01em;
    border-radius: 12px 12px 0 0;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Active tab: same fill as the app body, flares into it like a folder tab. */
.tab-btn.active {
    --tab-fill: var(--folder-surface);
    color: #60a5fa;
}

/* Concave fillets at the bottom inside corners (the folder-tab skirt). */
.tab-btn::before,
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 9px;
    height: 9px;
    pointer-events: none;
}

.tab-btn::before {
    left: -9px;
    background: radial-gradient(circle at top left, transparent 8.5px, var(--tab-fill) 9.5px);
}

.tab-btn::after {
    right: -9px;
    background: radial-gradient(circle at top right, transparent 8.5px, var(--tab-fill) 9.5px);
}

/* Edge-most tabs: no outer fillet — it would paint over the folder
   body's rounded shoulder at the card edge. */
.tab-btn:first-child::before,
.tab-btn:last-child::after {
    display: none;
}

.tab-content { display: none; }
.tab-content.active { display: contents; }

@media (min-width: 601px) {
    .tab-bar {
        gap: 4px;
        padding: 12px 17px 0;
    }

    .tab-btn {
        flex: 1;
        min-width: 0;
        min-height: 50px;
        padding: 16px 7px;
        font-size: 0.9rem;
        line-height: 1.35;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .tab-btn[data-tab="spend-check"] {
        font-size: 0.98rem;
    }

    .header p {
        font-size: 1.05rem;
    }
}
