/* Top Utility / Trust Bar */
.top-trust-bar {
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.8125rem;
    line-height: 1.5;
    padding: 7px 0;
    border-bottom: none;
    position: relative;
    z-index: 1001;
}

.top-trust-container {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.top-trust-left,
.top-trust-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.top-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.top-trust-item:hover {
    color: #ffffff;
}

.top-trust-item svg,
.top-trust-item i {
    color: #38bdf8;
    font-size: 0.85rem;
}

.top-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 3px 10px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.75rem;
    border: none;
    letter-spacing: 0.02em;
}

.top-trust-b2b-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
    padding: 3px 10px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.76rem;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
}

.top-trust-b2b-btn:hover {
    background: #facc15;
    color: #0f172a;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.top-trust-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 900px) {
    .top-trust-bar {
        display: none;
    }
}

/* Header & Navbar Styling */
.site-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: none;
    box-shadow: none;
    transition: all var(--transition-smooth);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-cyan);
    letter-spacing: -0.03em;
}

.brand-logo svg {
    width: 28px;
    height: 28px;
    fill: url(#logo-gradient);
    transition: transform var(--transition-fast);
}

.brand-logo:hover svg {
    transform: rotate(15deg);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.nav-item a {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--slate-600);
    position: relative;
    padding: 6px 0;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.nav-item a:hover {
    color: var(--slate-900);
    transform: translateY(-2px);
}

.nav-item.active > a {
    color: var(--slate-900);
    font-weight: 600;
}

.nav-item.active > a:hover {
    transform: translateY(-2px);
}

.nav-item.active > a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
    pointer-events: none;
}

/* Navigation Dropdown Styling */
.nav-item-dropdown {
    position: relative;
}

.nav-item-dropdown .nav-dropdown-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.nav-dropdown-chevron {
    font-size: 0.65rem;
    color: var(--slate-400);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.nav-item-dropdown:hover .nav-dropdown-chevron,
.nav-item-dropdown.open .nav-dropdown-chevron {
    transform: rotate(180deg);
    color: var(--slate-800);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 40px -4px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.04);
    min-width: 300px;
    padding: 8px;
    z-index: 1050;
    list-style: none;
    animation: navDropdownFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover bridge to keep mouse over menu without breaking hover */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 16px;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown.open .nav-dropdown-menu,
.nav-dropdown-menu:hover {
    display: block;
}

@keyframes navDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(2px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(8px);
    }
}

.nav-dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    background: transparent !important;
    transform: none !important;
    transition: background 0.18s ease, transform 0.18s ease !important;
}

.nav-dropdown-item::after {
    display: none !important;
}

.nav-dropdown-item:hover {
    background: #f8fafc !important;
    transform: translateX(3px) !important;
}

.nav-dropdown-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nav-dropdown-item:hover .nav-dropdown-icon {
    background: #0284c7;
    color: #ffffff;
    transform: scale(1.05);
}

.nav-dropdown-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.nav-dropdown-title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
    transition: color 0.18s ease;
}

.nav-dropdown-desc {
    font-size: 0.74rem !important;
    color: #64748b !important;
    margin-top: 3px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
}

.nav-dropdown-item:hover .nav-dropdown-title {
    color: #0284c7 !important;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--slate-800);
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--slate-200);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 10000;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

.bottom-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--slate-500);
    text-decoration: none;
    flex: 1;
    transition: all var(--transition-fast);
}

.bottom-bar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 32px;
    border-radius: 16px;
    transition: all var(--transition-fast);
}

.bottom-bar-item:hover {
    color: var(--primary-cyan);
}

.bottom-bar-item.active {
    color: var(--primary-cyan);
}

.bottom-bar-item.active .bottom-bar-icon {
    color: var(--primary-cyan);
}

.bottom-bar-icon svg {
    width: 22px;
    height: 22px;
    transition: stroke-width var(--transition-fast);
}

.bottom-bar-item.active .bottom-bar-icon svg {
    stroke-width: 2.5;
}

.bottom-bar-label {
    font-size: 0.75rem;
    font-weight: 700;
}

@media (max-width: 991px) {
    .nav-menu { display: none; }
    .mobile-bottom-bar { display: flex; }
    .nav-actions { display: none !important; }
}

/* User Account Button */
.user-account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    color: var(--primary-dark);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border: 1px solid #e2e8f0;
}
.user-account-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.user-account-btn svg {
    width: 20px;
    height: 20px;
}
/* Mobile Header User Badge & Guest Login Badge */
.mobile-user-wrapper,
.mobile-guest-wrapper {
    display: none !important; /* Always hidden on desktop (>= 992px) */
    position: relative;
    z-index: 1010;
}

@media (max-width: 991px) {
    .mobile-user-wrapper,
    .mobile-guest-wrapper {
        display: inline-flex !important;
        align-items: center;
        margin-left: auto;
    }

    .mobile-user-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 4px 2px;
        cursor: pointer;
        transition: opacity 0.2s ease;
        text-align: left;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    }

    .mobile-user-badge:active,
    .mobile-user-badge:focus-visible {
        background: transparent;
        border: none;
        outline: none;
        opacity: 0.8;
    }

    .mub-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background: linear-gradient(135deg, #06b6d4, #0284c7);
        color: #ffffff;
        box-shadow: 0 2px 6px rgba(6, 182, 212, 0.25);
    }

    .mub-avatar svg {
        width: 17px;
        height: 17px;
    }

    .mub-avatar-admin {
        background: linear-gradient(135deg, #1e293b, #0f172a);
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
    }
    .mub-avatar-agent {
        background: linear-gradient(135deg, #0284c7, #0ea5e9);
        box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    }
    .mub-avatar-customer,
    .mub-avatar-user {
        background: linear-gradient(135deg, #06b6d4, #0284c7);
        box-shadow: 0 2px 6px rgba(6, 182, 212, 0.25);
    }

    .mub-text {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
    }

    .mub-top-line {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .mub-welcome {
        font-size: 0.64rem;
        font-weight: 600;
        color: #64748b;
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    .mub-role-tag {
        font-size: 0.58rem;
        font-weight: 700;
        padding: 1px 6px;
        border-radius: 4px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        line-height: 1.2;
        border: none;
    }

    .mub-tag-admin,
    .mud-tag-admin {
        background: #f1f5f9;
        color: #334155;
    }
    .mub-tag-agent,
    .mud-tag-agent {
        background: #e0f2fe;
        color: #0284c7;
    }
    .mub-tag-customer,
    .mub-tag-user,
    .mud-tag-customer,
    .mud-tag-user {
        background: #e0f2fe;
        color: #0284c7;
    }

    .mub-bottom-line {
        display: flex;
        align-items: center;
    }

    .mub-name {
        font-size: 0.85rem;
        font-weight: 700;
        color: #0f172a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 90px;
    }

    .mub-chevron {
        width: 14px;
        height: 14px;
        color: #94a3b8;
        margin-left: 2px;
        transition: transform 0.2s ease;
        flex-shrink: 0;
    }

    .mobile-user-wrapper.active .mub-chevron {
        transform: rotate(180deg);
    }

    /* Mobile Dropdown Menu */
    .mobile-user-dropdown {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15), 0 2px 6px rgba(15, 23, 42, 0.06);
        min-width: 195px;
        padding: 8px 0;
        z-index: 1050;
    }

    .mobile-user-dropdown.show {
        display: block;
        animation: mubDropIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes mubDropIn {
        from { opacity: 0; transform: translateY(-6px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .mud-header {
        padding: 6px 14px 10px 14px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .mud-role-badge {
        display: inline-block;
        align-self: flex-start;
        font-size: 0.62rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        padding: 2px 7px;
        border-radius: 6px;
    }

    .mud-full-name {
        font-size: 0.88rem;
        font-weight: 700;
        color: #0f172a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mud-divider {
        height: 1px;
        background: #f1f5f9;
        margin: 4px 0;
    }

    .mud-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 14px;
        color: #334155;
        text-decoration: none;
        font-size: 0.86rem;
        font-weight: 600;
        transition: background 0.15s ease, color 0.15s ease;
    }

    .mud-item svg {
        width: 17px;
        height: 17px;
        color: #64748b;
        flex-shrink: 0;
        transition: color 0.15s ease;
    }

    .mud-item:active,
    .mud-item:hover {
        background: #f8fafc;
        color: #0284c7;
    }

    .mud-item:active svg,
    .mud-item:hover svg {
        color: #0284c7;
    }

    .mud-logout {
        color: #ef4444;
    }

    .mud-logout svg {
        color: #ef4444;
    }

    .mud-logout:active,
    .mud-logout:hover {
        background: #fef2f2;
        color: #dc2626;
    }

    .mud-logout:active svg,
    .mud-logout:hover svg {
        color: #dc2626;
    }

    /* Mobile Guest Badge Styling */
    .mobile-guest-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 4px 2px;
        cursor: pointer;
        text-decoration: none;
        transition: opacity 0.2s ease, transform 0.15s ease;
        text-align: left;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    }

    .mobile-guest-badge:active {
        opacity: 0.75;
        transform: scale(0.98);
    }

    .mgb-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background: linear-gradient(135deg, #06b6d4, #0284c7);
        color: #ffffff;
        box-shadow: 0 2px 6px rgba(6, 182, 212, 0.25);
    }

    .mgb-avatar svg {
        width: 17px;
        height: 17px;
    }

    .mgb-text {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
    }

    .mgb-welcome {
        font-size: 0.64rem;
        font-weight: 600;
        color: #64748b;
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    .mgb-action {
        font-size: 0.88rem;
        font-weight: 700;
        color: #0284c7;
        white-space: nowrap;
    }

    .mgb-chevron {
        width: 14px;
        height: 14px;
        color: #94a3b8;
        flex-shrink: 0;
        margin-left: -2px;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .mobile-guest-badge:hover .mgb-chevron,
    .mobile-guest-badge:active .mgb-chevron {
        color: #0284c7;
        transform: translateX(2px);
    }
}

@media (max-width: 480px) {
    .site-header .brand-logo img {
        height: 46px !important;
        max-width: 140px !important;
    }
    .mobile-user-badge,
    .mobile-guest-badge {
        padding: 2px 0;
        gap: 6px;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    .mub-avatar,
    .mgb-avatar {
        width: 30px;
        height: 30px;
    }
    .mub-avatar svg,
    .mgb-avatar svg {
        width: 15px;
        height: 15px;
    }
    .mub-name {
        font-size: 0.80rem;
        max-width: 72px;
    }
    .mgb-action {
        font-size: 0.82rem;
    }
    .mub-welcome,
    .mgb-welcome {
        font-size: 0.60rem;
    }
    .mub-role-tag {
        font-size: 0.52rem;
        padding: 1px 4px;
    }
}


.desktop-account-btn {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 0;
    padding: 6px 14px;
    border-radius: 50px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}
.desktop-account-btn:hover {
    background: #f1f5f9;
}
.desktop-account-icon-wrapper {
    color: var(--slate-700);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    transition: all 0.2s ease;
}
.desktop-account-btn:hover .desktop-account-icon-wrapper {
    background: var(--primary-cyan);
    color: #fff;
    border: none;
}


.account-dropdown-wrapper {
    position: relative;
    display: inline-block;
}
.account-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 16px;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
    overflow: hidden;
}
.account-dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}
.account-dropdown-menu a {
    color: var(--slate-700);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 500;
    transition: background 0.2s;
}
.account-dropdown-menu a:hover {
    background-color: #f1f5f9;
    color: var(--primary-cyan);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Mobile Offcanvas Sidebar */
.mobile-offcanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10050;
    visibility: hidden;
    transition: visibility 0.3s;
}
.mobile-offcanvas.show {
    visibility: visible;
}
.mobile-offcanvas-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-offcanvas.show .mobile-offcanvas-backdrop {
    opacity: 1;
}
.mobile-offcanvas-content {
    position: absolute;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.mobile-offcanvas.show .mobile-offcanvas-content {
    right: 0;
}
.mobile-offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.mobile-offcanvas-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--slate-800);
}
.mobile-offcanvas-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--slate-500);
    cursor: pointer;
}
.mobile-offcanvas-body {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Scoped styling for the included sidebars to look good on mobile */
.mobile-offcanvas-body .sidebar {
    width: 100% !important;
    position: relative !important;
    height: auto !important;
    border: none !important;
    padding: 0 !important;
}
.mobile-offcanvas-body .sidebar-logo {
    display: none !important; /* Hide logo since we have header */
}
.mobile-offcanvas-body .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--slate-700);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: background 0.2s;
}
.mobile-offcanvas-body .nav-item:hover,
.mobile-offcanvas-body .nav-item.active {
    background-color: #f1f5f9;
    color: var(--primary-cyan);
}
.mobile-offcanvas-body .nav-item svg {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}
.mobile-offcanvas-body .nav-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate-500);
    margin: 15px 0 5px 15px;
}


.mobile-offcanvas-body .sidebar-search {
    position: relative;
    padding: 0 15px;
    margin-bottom: 20px;
    margin-top: 10px;
}
.mobile-offcanvas-body .sidebar-search svg {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--slate-400);
}
.mobile-offcanvas-body .sidebar-search input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
    box-sizing: border-box;
}
/* Catch-all to prevent any other rogue SVGs from blowing up */
.mobile-offcanvas-body svg {
    max-width: 24px;
    max-height: 24px;
}

