﻿/* ==========================================
   APPLICATION HEADER
========================================== */

.app-header {
    position: relative;
    width: 100%;
    max-width: var(--app-content-width,430);
    min-height: var(--app-header-height,68px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto;
    padding: 14px var(--app-page-padding,16px);
    background: var(--background,#F8FAFC);
    z-index: 100;
}

.app-header--sticky {
    position: sticky;
    top: 0;
    background: rgba(248,250,252,.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.app-header--bordered {
    border-bottom: 1px solid rgba(226,232,240,.82);
}

/* ---------- Left ---------- */

.app-header__start {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header__identity {
    min-width: 0;
}

.app-header__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--text-light,#64748B);
    font-size: 12px;
    line-height: 1.3;
}

.app-header__title {
    overflow: hidden;
    color: var(--text,#0F172A);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.app-header__subtitle {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--text-light,#64748B);
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ---------- Logo ---------- */

.app-header__logo {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    background: var(--primary,#16A34A);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(22,163,74,.18);
}

    .app-header__logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ---------- Back ---------- */

.app-header__back {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border,#E2E8F0);
    border-radius: 14px;
    background: #fff;
    color: var(--text,#0F172A);
    transition: .16s ease;
}

    .app-header__back:hover {
        border-color: #CBD5E1;
        background: #F8FAFC;
    }

    .app-header__back:active {
        transform: scale(.96);
    }

    .app-header__back svg {
        width: 21px;
        height: 21px;
    }

/* ---------- Right ---------- */

.app-header__end {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-header__action {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border,#E2E8F0);
    border-radius: 14px;
    background: #fff;
    color: var(--text-light,#64748B);
    transition: .16s ease;
}

    .app-header__action:hover {
        border-color: #CBD5E1;
        color: var(--text,#0F172A);
    }

    .app-header__action svg {
        width: 21px;
        height: 21px;
    }

/* ---------- Avatar ---------- */

.app-header__avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #DCFCE7;
    color: #15803D;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(15,23,42,.10);
    transition: .16s ease;
}

    .app-header__avatar:hover {
        transform: translateY(-1px);
    }

    .app-header__avatar:active {
        transform: scale(.96);
    }

    .app-header__avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ---------- Notification badge ---------- */

.app-header__badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #DC2626;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
}

.app-header__action-wrapper {
    position: relative;
}

@media(max-width:430px) {

    .app-header {
        min-height: 64px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .app-header__title {
        font-size: 18px;
    }
}
/*bổ sung css trang trí lại app header và bot-nav */
/* ==========================================
   FOOTBALL CAPTAIN
   APP HEADER + BOTTOM NAV ENHANCEMENT
========================================== */


/* ==========================================
   APP HEADER
========================================== */

.app-header {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 16px 62px;
    overflow: hidden;
    border-radius: 0px 0px 28px 28px;
    background: linear-gradient( 135deg, #22C55E 0%, #16A34A 55%, #15803D 100% );
    box-shadow: 0 8px 24px rgba(22,163,74,.10);
}


    /* ==========================================
   HEADER DECORATION
========================================== */

    .app-header::before {
        content: "";
        position: absolute;
        z-index: -1;
        width: 190px;
        height: 190px;
        top: -112px;
        right: -52px;
        border-radius: 50%;
        background: rgba(255,255,255,.07);
        pointer-events: none;
    }

    .app-header::after {
        content: "";
        position: absolute;
        z-index: -1;
        width: 135px;
        height: 135px;
        left: -64px;
        bottom: -78px;
        border-radius: 50%;
        background: rgba(255,255,255,.055);
        pointer-events: none;
    }


/* ==========================================
   HEADER START / END
========================================== */

.app-header__start {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.app-header__end {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ==========================================
   HEADER LOGO
========================================== */

.app-header__logo {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 15px;
    background: rgba(255,255,255,.14);
    box-shadow: 0 5px 16px rgba(0,0,0,.09);
    text-decoration: none;
}

    .app-header__logo img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }


/* ==========================================
   HEADER IDENTITY
========================================== */

.app-header__identity {
    min-width: 0;
}

.app-header__eyebrow {
    display: block;
    color: rgba(255,255,255,.82);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
}

.app-header__title {
    margin: 2px 0 0;
    overflow: hidden;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.app-header__subtitle {
    display: block;
    margin-top: 2px;
    color: rgba(255,255,255,.76);
    font-size: 10px;
    font-weight: 500;
}


/* ==========================================
   HEADER ACTION
========================================== */

.app-header__action-wrapper {
    position: relative;
}

.app-header__action {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 14px;
    background: rgba(255,255,255,.96);
    color: #475569;
    box-shadow: 0 5px 16px rgba(0,0,0,.08);
    text-decoration: none;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

    .app-header__action svg {
        width: 20px;
        height: 20px;
    }

    .app-header__action:hover {
        background: #fff;
        box-shadow: 0 7px 18px rgba(0,0,0,.10);
    }

    .app-header__action:active {
        transform: scale(.96);
    }


/* ==========================================
   HEADER BADGE
========================================== */

.app-header__badge {
    position: absolute;
    min-width: 17px;
    height: 17px;
    top: -5px;
    right: -5px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #16A34A;
    border-radius: 999px;
    background: #EF4444;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,.10);
}


/* ==========================================
   HEADER AVATAR
========================================== */

.app-header__avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 3px solid rgba(255,255,255,.76);
    border-radius: 50%;
    background: #F0FDF4;
    color: #15803D;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 5px 16px rgba(0,0,0,.10);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease;
}

    .app-header__avatar:hover {
        box-shadow: 0 7px 19px rgba(0,0,0,.12);
    }

    .app-header__avatar:active {
        transform: scale(.96);
    }


/* ==========================================
   TEAM SUMMARY OVERLAP
   Nếu team-summary-card nằm ngay sau header
========================================== */

.team-summary-card {
    position: relative;
    z-index: 25;
    margin-top: -46px;
    box-shadow: 0 10px 28px rgba(15,23,42,.08);
}

/* ==========================================
   RESPONSIVE
========================================== */

@media(max-width:360px) {

    .app-header {
        padding: 16px 14px 29px;
        border-radius: 0 0 24px 24px;
    }

    .app-header__logo {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .app-header__title {
        font-size: 16px;
    }

    .app-header__action {
        width: 39px;
        height: 39px;
    }

    .app-header__avatar {
        width: 41px;
        height: 41px;
    }
}


/* ==========================================
   REDUCED MOTION
========================================== */

@media(prefers-reduced-motion:reduce) {

    .app-header__action,
    .app-header__avatar {
        transition: none;
    }
}
