.iq-top-navbar .navbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 12px;
}

.top-nav-leading,
.top-nav-actions,
.top-nav-menu {
    display: flex;
    align-items: center;
}

.top-nav-leading {
    min-width: 0;
    gap: 0;
}

.top-nav-leading .wrapper-menu {
    display: none;
    flex: 0 0 auto;
    cursor: pointer;
}

.top-nav-actions {
    min-width: 0;
    margin-left: auto;
    gap: 10px;
}

.top-nav-menu {
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-nav-menu > li {
    position: relative;
    list-style: none;
}

.top-nav-menu .dropdown-toggle::after {
    display: none;
}

.top-nav-control {
    min-height: 38px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.top-nav-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 11px;
    color: #334155;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

.top-nav-control:hover,
.top-nav-control:focus {
    color: #2563eb;
    border-color: #93b4f8;
    background: #f8fbff;
    outline: none;
    text-decoration: none;
    transform: translateY(-1px);
}

.top-nav-recharge {
    display: inline-flex;
    color: #059669;
    border-color: #a7e7cf;
}

.top-nav-recharge:hover,
.top-nav-recharge:focus {
    color: #047857;
    border-color: #6ee7b7;
    background: #ecfdf5;
}

.top-nav-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    color: #fff;
    background: #e11d48;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.top-nav-cart-count[hidden] {
    display: none !important;
}

.top-nav-theme .custom-control,
.top-nav-theme .custom-switch-inner {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 !important;
}

.top-nav-theme {
    margin: 0 !important;
}

.top-nav-theme .custom-switch-inner > p {
    display: none;
}

.top-nav-theme .custom-control-label {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 38px !important;
    min-height: 38px;
    margin: 0 !important;
    padding: 0 !important;
    color: #d97706 !important;
    background: #fffbeb !important;
    border: 2px solid #d4a72c !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12) !important;
    cursor: pointer;
}

.top-nav-theme .custom-control-label::before,
.top-nav-theme .custom-control-label::after {
    display: none !important;
}

.top-nav-theme .switch-icon-left,
.top-nav-theme .switch-icon-right {
    position: static !important;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.top-nav-theme .switch-icon-left,
.top-nav-theme .switch-icon-left svg { color: #d97706 !important; }
.top-nav-theme .switch-icon-right,
.top-nav-theme .switch-icon-right svg { color: #2563eb !important; }
.top-nav-theme .switch-icon-left { display: flex !important; }
.top-nav-theme .switch-icon-right { display: none !important; }
.top-nav-theme #dark-mode:checked + .custom-control-label .switch-icon-left { display: none !important; }
.top-nav-theme #dark-mode:checked + .custom-control-label .switch-icon-right { display: flex !important; }

.top-nav-menu .nav-item {
    margin: 0 !important;
}

.top-nav-notification > a {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0 !important;
    color: #475569;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.top-nav-notification > a:hover,
.top-nav-notification > a:focus {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.top-nav-notification > a > .badge {
    position: absolute;
    top: -4px;
    right: -4px;
}

.top-nav-user > a {
    display: flex !important;
    align-items: center;
    min-height: 40px;
    padding: 0 !important;
    color: #334155 !important;
    text-decoration: none !important;
}

.top-nav-user > a img {
    width: 38px;
    height: 38px;
    object-fit: cover;
}

.top-nav-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.top-nav-avatar-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    color: #fff;
    background: #e11d48;
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.top-nav-user .user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155 !important;
    font-weight: 600;
}

.top-nav-account-summary {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 210px;
}

.top-nav-user .dropdown-menu {
    min-width: 220px;
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.top-nav-dropdown-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 12px 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.top-nav-notification-entry.is-unread {
    background: #f8fbff;
}

.top-nav-notification-entry > a {
    min-width: 0;
}

.top-nav-notification-title {
    display: block;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-nav-notification-empty {
    padding: 8px 12px 10px;
    color: #94a3b8;
    font-size: 12px;
}

.top-nav-user .dropdown-menu > li {
    list-style: none;
}

.top-nav-user .dropdown-menu li.dropdown-item {
    position: relative;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    color: #334155 !important;
    border-radius: 8px;
    cursor: pointer;
}

.top-nav-user .dropdown-menu li.dropdown-item:not(.top-nav-account-summary):hover,
.top-nav-user .dropdown-menu li.dropdown-item:not(.top-nav-account-summary):focus-within {
    color: #1d4ed8 !important;
    background: #eff6ff;
}

.top-nav-user .dropdown-menu li.dropdown-item > a {
    flex: 1 1 auto;
    color: inherit !important;
    font-weight: 600;
    text-decoration: none !important;
}

.top-nav-user .dropdown-menu li.dropdown-item > a::before {
    position: absolute;
    inset: 0;
    z-index: 2;
    content: "";
    border-radius: 8px;
}

.top-nav-user .dropdown-menu li.dropdown-item > svg,
.top-nav-user .dropdown-menu li.dropdown-item > i {
    flex: 0 0 20px;
    color: #64748b !important;
    pointer-events: none;
}

.dark .top-nav-control,
.dark-mode .top-nav-control,
.dark .top-nav-theme .custom-control-label,
.dark-mode .top-nav-theme .custom-control-label {
    color: #e2e8f0;
    background: #1f2937 !important;
    border-color: #475569 !important;
}

.dark .top-nav-theme .switch-icon-left,
.dark .top-nav-theme .switch-icon-left svg,
.dark-mode .top-nav-theme .switch-icon-left,
.dark-mode .top-nav-theme .switch-icon-left svg,
.dark .top-nav-theme .switch-icon-right,
.dark .top-nav-theme .switch-icon-right svg,
.dark-mode .top-nav-theme .switch-icon-right,
.dark-mode .top-nav-theme .switch-icon-right svg {
    color: #f8fafc !important;
}

.dark .top-nav-notification > a,
.dark-mode .top-nav-notification > a {
    color: #e2e8f0;
    background: #1f2937;
    border-color: #475569;
}

.dark .top-nav-leading .wrapper-menu,
.dark-mode .top-nav-leading .wrapper-menu {
    color: #e2e8f0 !important;
    background: #1f2937;
    border-color: #475569;
}

.dark .top-nav-user > a,
.dark .top-nav-user .user-name,
.dark-mode .top-nav-user > a,
.dark-mode .top-nav-user .user-name {
    color: #e2e8f0 !important;
}

.dark .top-nav-avatar-badge,
.dark-mode .top-nav-avatar-badge {
    border-color: #1f2937;
}

.dark .top-nav-user .dropdown-menu,
.dark-mode .top-nav-user .dropdown-menu {
    color: #e2e8f0;
    background: #111827;
    border-color: #475569;
}

.dark .top-nav-user .dropdown-menu li.dropdown-item,
.dark-mode .top-nav-user .dropdown-menu li.dropdown-item {
    color: #e2e8f0 !important;
}

.dark .top-nav-user .dropdown-menu li.dropdown-item:not(.top-nav-account-summary):hover,
.dark .top-nav-user .dropdown-menu li.dropdown-item:not(.top-nav-account-summary):focus-within,
.dark-mode .top-nav-user .dropdown-menu li.dropdown-item:not(.top-nav-account-summary):hover,
.dark-mode .top-nav-user .dropdown-menu li.dropdown-item:not(.top-nav-account-summary):focus-within {
    color: #fff !important;
    background: #1e3a5f;
}

@media (max-width: 1199.98px) {
    .top-nav-user .user-name {
        display: none;
    }
}

/* The base layout hides the sidebar below 1300px, not 992px. Keep the toggle
 * available throughout that entire responsive range so medium laptop windows
 * never lose both the sidebar and its opener. */
@media (max-width: 1299.98px) {
    .top-nav-leading .wrapper-menu {
        display: block;
        box-sizing: border-box;
        width: 38px;
        height: 38px;
        padding: 6px;
        color: #475569 !important;
        background: #fff;
        border: 2px solid #cbd5e1;
        border-radius: 10px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
    }
}

@media (max-width: 991.98px) {
    .iq-top-navbar {
        min-height: 62px !important;
        padding: 0 12px !important;
    }

    .iq-top-navbar .navbar {
        min-height: 62px;
        gap: 7px;
    }

    .top-nav-control-label {
        display: none;
    }

    .top-nav-control {
        width: 38px;
        min-width: 38px;
        padding: 0;
    }

    .top-nav-cart-count {
        position: absolute;
        top: -5px;
        right: -5px;
        border: 2px solid #fff;
    }
}

@media (max-width: 575.98px) {
    .iq-top-navbar {
        padding: 0 8px !important;
    }

    .iq-top-navbar .navbar {
        gap: 5px;
    }

    .top-nav-actions,
    .top-nav-menu {
        gap: 7px;
    }

    .top-nav-leading .wrapper-menu {
        width: 36px;
        height: 36px;
        padding: 5px;
    }

    .top-nav-control,
    .top-nav-theme .custom-control-label,
    .top-nav-notification > a,
    .top-nav-user > a img {
        width: 36px !important;
        min-width: 36px;
        height: 36px !important;
        min-height: 36px;
    }

    .top-nav-notification .iq-sub-dropdown {
        position: fixed !important;
        top: 62px !important;
        right: 8px !important;
        left: 8px !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
    }
}

@media (max-width: 389.98px) {
    .top-nav-theme {
        display: none;
    }
}

