/* ===== TOAST ===== */
#toast-container .toast-error {
    background-color: red !important;
}

#toast-container .toast-success {
    background-color: #115b11 !important;
}

.toast-tilte,
.toast-message {
    color: white !important;
}

#toast-container .toast:hover {
    box-shadow: 0 0 12px #000;
    opacity: 1;
    cursor: pointer;
}

.toast.show,
#toast-container .toast,
#toast-container.show {
    display: block;
    opacity: 1 !important;
    visibility: visible;
}

@media screen and (max-width:900px) {

    .new-navbar-left span,
    .new-navbar-account span {
        font-size: 7px !important;
    }

}

/* ===== NAVBAR BASE ===== */
.new-navbar {
    background: #fff;
    color: var(--topnav2);
    padding: 0;
    z-index: 1000;
    position: sticky;
    top: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .07);
    box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
}

.new-navbar-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

.new-navbar-left,
.new-navbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== LOGO ===== */
.custom-logo-nav-v2 {
    height: 62px;
    width: auto;
    object-fit: contain;
    transition: transform .2s ease;
}

.custom-logo-nav-v2:hover {
    transform: scale(1.03);
}

/* ===== LEFT INFO PANEL ===== */
.navbar-left-infos {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.new-navbar-account {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 1rem;
    border-right: 1px solid rgba(0, 0, 0, .1);
}

.new-navbar-account i {
    color: var(--primary-color);
    margin-right: 4px;
}

.new-navbar-left span,
.new-navbar-account span {
    font-size: 12px;
    font-weight: 600;
}

.new-navbar-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.new-navbar-balance {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    background: rgba(0, 80, 180, .05);
    border-radius: 10px;
}

/* USER TOGGLE BUTTON (hidden on desktop) */
.navbar-dropdown-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    background: var(--sec, #e8eef8) !important;
    color: #333;
    border: none;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s;
    max-width: 210px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.navbar-dropdown-toggle i {
    font-size: 15px;
    flex-shrink: 0;
}

.user-info {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* ===== RIGHT MENU ===== */
.new-navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.new-navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.1rem;
}

.new-navbar-item {
    position: relative;
}

.new-navbar-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background .18s, color .18s;
    white-space: nowrap;
    cursor: pointer;
}

.new-navbar-link:hover,
.new-navbar-link:focus {
    background: var(--hover-color, rgba(0, 80, 180, .07));
    color: var(--primary-color);
    text-decoration: none;
    outline: none;
}

.new-navbar-link i {
    font-size: 14px;
}

/* ===== DROPDOWN ===== */
.new-navbar-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .13);
    min-width: 215px;
    z-index: 2000;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, .06);
    animation: navDropIn .15s ease;
}

@keyframes navDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop hover */
@media (min-width: 861px) {
    .new-navbar-dropdown:hover .new-navbar-dropdown-menu {
        display: block;
    }
}

/* Toggle via .open class (mobile click) */
.new-navbar-dropdown.open .new-navbar-dropdown-menu {
    display: block;
}

.new-navbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2d2d2d;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.new-navbar-dropdown-item:hover {
    background: rgba(0, 80, 180, .06);
    color: var(--primary-color);
    text-decoration: none;
}

.new-navbar-dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.new-navbar-dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 4px 6px;
}

/* ===== BADGE ===== */
.new-navbar-badge {
    position: absolute;
    top: 3px;
    right: 5px;
    background: #e53935;
    color: #fff;
    font-size: 0.62rem;
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

/* ===== LOGOUT ===== */
.new-navbar-logout .new-navbar-link {
    color: #e53935;
}

.new-navbar-logout .new-navbar-link:hover {
    background: rgba(229, 57, 53, .08);
}

/* ===== HAMBURGER ===== */
.new-navbar-toggle-input {
    display: none;
}

.new-navbar-toggle-label {
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.45rem;
    border-radius: 8px;
    transition: background .18s;
    color: var(--primary-color);
    font-size: 22px;
}

.new-navbar-toggle-label:hover {
    background: var(--hover-color, rgba(0, 80, 180, .07));
}

/* ===== NAV2 SECONDARY BAR ===== */
.nav2 {
    background: #df3b3b;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
}

.nav2 .navbar-nav>li a {
    color: #fff !important;
}

.nav2 .navbar-nav>li a:hover {
    color: #ffe0e0 !important;
}

/* ===== TABLET (861px – 1100px) ===== */
@media screen and (min-width: 861px) and (max-width: 1100px) {
    .new-navbar-container {
        min-height: 62px;
    }

    .custom-logo-nav-v2 {
        height: 50px;
    }

    .new-navbar-info {
        display: none;
    }

    .new-navbar-balance {
        display: none;
    }

    .new-navbar-link {
        padding: .5rem .65rem;
        font-size: 13px;
    }

    .new-navbar-account {
        margin-left: 8px;
    }
}

/* ===== MOBILE (≤ 860px) ===== */
@media screen and (max-width: 860px) {
    .custom-logo-nav-v2 {
        height: 46px;
    }

    .new-navbar-container {
        padding: 0 10px;
        min-height: 60px;
    }

    /* show hamburger */
    .new-navbar-toggle-label {
        display: flex;
    }

    /* show user info toggle */
    .navbar-dropdown-toggle {
        display: flex;
    }

    /* slide-down menu */
    .new-navbar-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 0.75rem;
        z-index: 1500;
        box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
        border-top: 1px solid rgba(0, 0, 0, .06);
        gap: 2px;
    }

    .new-navbar-toggle-input:checked~.new-navbar-menu {
        display: flex;
    }

    .new-navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 2px;
    }

    .new-navbar-item {
        width: 100%;
    }

    .new-navbar-link {
        padding: .65rem 1rem;
        font-size: 14px;
    }

    /* mobile dropdown: static, indented */
    .new-navbar-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 8px;
        background: rgba(0, 0, 0, .03);
        padding: 4px 0 4px 10px;
        margin-top: 2px;
        animation: none;
        min-width: unset;
    }

    .new-navbar-logout {
        border-top: 1px solid #eee;
        padding-top: 6px;
        margin-top: 4px;
    }

    /* expanded user-info panel */
    .navbar-left-infos {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
        padding: 14px 16px;
        z-index: 1400;
        flex-wrap: wrap;
        gap: 10px;
        border-top: 1px solid rgba(0, 0, 0, .06);
    }

    .navbar-left-infos.show-info-section {
        display: flex;
    }

    .new-navbar-account {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
        width: 100%;
    }

    .new-navbar-balance {
        background: none;
        padding: 0;
    }

    /* nav2 responsive */
    .nav2 {
        min-height: auto !important;
        height: auto !important;
        padding: 8px !important;
        flex-wrap: wrap;
        justify-content: flex-start !important;
    }

    .nav2 .navbar-nav {
        display: flex !important;
        flex-wrap: wrap;
        gap: 4px;
    }

    .nav2 .navbar-nav>li {
        float: none !important;
        padding: 0 !important;
    }

    .nav2 .navbar-nav>li a {
        padding: 6px 10px !important;
        font-size: 13px;
    }

    .nav2 .navbar-nav>li:hover a {
        color: #ffe0e0 !important;
    }
}