.container-fluid {
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.main-header {
    background: #ffffff;
    padding: 5px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.main-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    min-height: 70px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.main-header.is-scrolled .logo img {
    transform: scale(calc(60 / 70));
    transform-origin: left center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tránh hiện tượng giật nhẹ khi refresh ở trang dùng header-user */
.header-user.main-header,
.header-user .logo img {
    transition: none;
}

.icon-btn {
    border: none;
    background: transparent;
    color: #666;
    font-size: 16px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.icon-btn:hover:not(:disabled) {
    background: #eef4fa;
    color: #0072bb;
}

.icon-btn:active:not(:disabled) {
    background: #dceeff;
    transform: scale(0.96);
}

.icon-btn:disabled {
    color: #c4c4c4;
    cursor: not-allowed;
}

.icon-btn.is-muted {
    color: #b0b0b0;
    cursor: pointer;
}

.icon-btn.is-muted:hover {
    background: #f5f5f5;
    color: #888;
}

.icon-btn[aria-disabled='true'] {
    cursor: pointer;
}

.btn-gray {
    background: #cfcfcf;
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-gray:hover {
    background: #b8b8b8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-gray:active {
    background: #a8a8a8;
    transform: translateY(1px);
    box-shadow: none;
}

.btn-blue {
    background: #0072bb;
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-blue:hover {
    background: #005a94;
    box-shadow: 0 2px 10px rgba(0, 114, 187, 0.35);
}

.btn-blue:active {
    background: #004a7a;
    transform: translateY(1px);
    box-shadow: none;
}

.btn-green {
    width: 44px;
    height: 40px;
    border-radius: 6px;
    background: #73c243;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-green:hover {
    background: #5fa835;
    color: #fff;
    box-shadow: 0 2px 10px rgba(115, 194, 67, 0.4);
}

.btn-green:active {
    background: #4f902c;
    transform: translateY(1px);
    box-shadow: none;
}

.btn-content-drive {
    background: #f6ab00;
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-content-drive:hover {
    background: #e09b00;
    color: #fff;
    box-shadow: 0 2px 10px rgba(246, 171, 0, 0.4);
}

.btn-content-drive:active {
    background: #c98900;
    transform: translateY(1px);
    box-shadow: none;
}

.home-dropdown {
    position: relative;
}

.home-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #dceeff;
    color: #6aa6d8;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.home-btn:hover {
    background: #c5e2ff;
    color: #0072bb;
    box-shadow: 0 2px 10px rgba(0, 114, 187, 0.2);
}

.home-btn:active {
    background: #b3d8ff;
    transform: scale(0.96);
}

.home-dropdown.active .home-btn {
    background: #0072bb;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 114, 187, 0.3);
}

.home-dropdown.active .home-btn:hover {
    background: #005a94;
    color: #fff;
}

.dropdown-menu-custom {
    position: absolute;
    top: 55px;
    right: 0;
    width: min(300px, 90vw);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 16px;
    display: none;
    z-index: 999;
}

.home-dropdown.active .dropdown-menu-custom {
    display: block;
}

.dropdown-section {
    margin-bottom: 18px;
}

.dropdown-section:last-child {
    margin-bottom: 0;
}

.dropdown-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ececec;
}

.dropdown-title i {
    color: #0072bb;
    font-size: 15px;
}

.dropdown-item-custom {
    display: flex;
    align-items: center;
    gap: 10px;

    text-decoration: none;

    color: #555;

    padding: 10px 12px;

    border-radius: 8px;

    font-size: 14px;

    transition: all 0.3s ease;
}

.dropdown-item-custom i {
    width: 18px;
    color: #888;
    transition: all 0.3s ease;
}

.dropdown-item-custom:hover {
    background: #f5f8ff;
    color: #0072bb;
}

.dropdown-item-custom:hover i {
    color: #0072bb;
}

.icon-btn,
.home-btn,
.btn-gray,
.btn-blue {
    cursor: pointer;
}

.icon-btn:focus-visible,
.home-btn:focus-visible,
.btn-gray:focus-visible,
.btn-blue:focus-visible,
.btn-green:focus-visible,
.btn-content-drive:focus-visible {
    outline: 2px solid #0072bb;
    outline-offset: 2px;
}

.header-actions-spacer {
    display: none;
}

@media (max-width: 991.98px) {
    .main-header {
        position: static;
        z-index: auto;
        overflow: visible;
    }

    .header-wrapper {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
    }

    .logo {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .header-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 15px;
        padding: 8px 15px 10px;
        background: #ffffff;
        box-sizing: border-box;
        transition: padding 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    }

    .main-header.header-actions-pinned .header-actions {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }

    .header-actions-spacer {
        display: none;
        width: 100%;
    }

    .main-header.header-actions-pinned .header-actions-spacer {
        display: block;
    }

    .btn-gray,
    .btn-blue {
        padding: 5px 12px;
    }

    .btn-green {
        width: 38px;
        height: 32px;
        font-size: 16px;
    }

    .home-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .main-header.header-compact .header-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .main-header.header-compact .logo {
        width: auto;
        justify-content: flex-start;
        flex-shrink: 0;
        min-height: 56px;
    }

    .main-header.header-compact .logo img {
        height: 56px;
        transition: transform 0.3s ease;
    }

    .main-header.header-compact .header-actions {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        padding: 0;
        gap: 10px;
    }

    .main-header.header-compact {
        position: sticky;
        top: 0;
        z-index: 9999;
    }

    .main-header.header-compact.is-scrolled {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }

    .main-header.header-compact.is-scrolled .logo img {
        transform: scale(calc(48 / 56));
        transform-origin: left center;
    }

}

@media (max-width: 575.98px) {
    .header-actions {
        gap: 8px;
    }

    .main-header.header-compact .logo {
        min-height: 48px;
    }

    .main-header.header-compact .logo img {
        height: 48px;
    }

    .main-header.header-compact.is-scrolled .logo img {
        transform: scale(1);
    }
}

@media (max-width: 991.98px) {
    .collect-header-seller-code,
    .collect-header-seller-total {
        display: none !important;
    }
}

main {
    width: 100%;
}

.admin-user-label {
    font-size: 13px;
    color: #888;
    padding: 0 12px 8px;
}