/* Frontend header: same height as admin panel (80px) for consistency */

:root {
    --frontend-header-height: 80px;
    --frontend-header-height-mobile: 72px;
    --frontend-bottom-nav-height: 65px;
    --frontend-bottom-nav-offset: calc(var(--frontend-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 1px);
    --frontend-fab-height: 48px;
    --frontend-tracker-gap: 0px;
    --frontend-overlay-clearance: 0px;
}

body {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: 0;
    position: fixed;
    top: var(--app-viewport-top, 0px);
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    height: var(--app-height, 100dvh);
    max-height: 100%;
    max-height: 100dvh;
    max-height: var(--app-height, 100dvh);
    transform: translateZ(0);
    text-rendering: optimizeLegibility;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-user-drag: none;
    -ms-content-zooming: none;
    word-wrap: break-word;
    overscroll-behavior-y: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    --bs-body-bg: linear-gradient(0deg, #0D0D0D, #0D0D0D);
    --bs-body-color: #fff;
    background: linear-gradient(0deg, #0D0D0D, #0D0D0D);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

/*
 * Stripe appends its 3DS challenge as a fixed, cross-origin iframe directly
 * under <body>. A transformed fixed body creates a separate containing block
 * in mobile Chromium/PWA mode; the challenge can look correctly positioned
 * while its touch hit-testing is offset. Suspend only the shell compositing
 * and gesture restrictions while Stripe owns the authentication UI.
 */
html.stripe-authentication-active,
body.stripe-authentication-active {
    touch-action: auto !important;
    overscroll-behavior: auto !important;
}

body.stripe-authentication-active {
    transform: none !important;
    -webkit-transform: none !important;
}

body.stripe-authentication-active > iframe {
    pointer-events: auto !important;
    touch-action: auto !important;
}

* {
    font-family: 'Inter', sans-serif;
}

#main-wraper {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    position: absolute;
    flex-direction: column;
    justify-content: space-between;
    contain: layout size style;
    z-index: 0;
}

#pannel {
    inset: 0px;
    display: flex;
    position: absolute;
    flex-flow: row;
    contain: strict;
    /* Never exceed the visible viewport height. A Tailwind `min-h-screen`
       (min-height: 100vh) here would force the panel to the large layout
       viewport, pushing the bottom nav below the fold and cutting off bottom
       sheets on mobile Chrome. The ID selector overrides that utility. */
    min-height: 0;
    max-height: var(--app-height, 100dvh);
}

#main-content {
    inset: 0px;
    position: relative;
    flex: 1 1 0%;
    box-shadow: none;
    overflow: hidden;
    z-index: 0;
    display: flex;
    flex-direction: column;
}

.content {
    overflow: auto;
    display: block;
    position: relative;
    flex: 1 1 0%;
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
    padding-bottom: var(--frontend-overlay-clearance);
    contain: size;
    --bs-body-bg: linear-gradient(0deg, #0D0D0D, #0D0D0D);
    background: linear-gradient(0deg, #0D0D0D, #0D0D0D);
    scrollbar-width: thin;
    scrollbar-color: #404040 transparent;
}

/* The nav already occupies flex space; reserve only overlays above it. */
body.frontend-has-list-fab {
    --frontend-overlay-clearance: calc(var(--frontend-fab-height) + 16px + 16px);
}
body.abx-tracker-on {
    --frontend-overlay-clearance: calc(var(--frontend-tracker-gap) + var(--abx-height, 88px) + 16px);
}
body.abx-tracker-on.frontend-has-list-fab {
    --frontend-overlay-clearance: calc(var(--frontend-tracker-gap) + var(--abx-height, 88px) + 12px + var(--frontend-fab-height) + 16px);
}
@media (min-width: 768px) {
    :root { --frontend-tracker-gap: 14px; }
}

.content::-webkit-scrollbar {
    width: 4px;
}

.content::-webkit-scrollbar-track {
    background: transparent;
}

.content::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

.content::-webkit-scrollbar-thumb:active {
    background: #737373;
}

.content--no-bottom-nav {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
}

/* Chat detail: pin composer to viewport bottom; align with sidebar footer on desktop */
.content--chat-detail {
    overflow: hidden !important;
    padding-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    contain: layout style;
}

.content--chat-detail .chat-detail-screen {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.content--chat-detail .chat-input {
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    background: #0a0a0a;
}

.content--chat-detail .chat-composer-bar {
    align-items: center;
    min-height: var(--frontend-bottom-nav-height);
    padding-top: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    border-bottom: none;
}

@media screen and (min-width: 992px) {
    .content--chat-detail .chat-composer-bar {
        min-height: calc(var(--frontend-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0);
        background-color: #1a1a1a;
        border-top-color: #2a2a2a;
    }
}

.p-16 {
    padding: 16px !important;
}


/* ALL YOUR EXISTING CSS STYLES REMAIN THE SAME - NOT CHANGED */


/* Header: fixed height (matches admin 80px) on all frontend pages */

.header {
    background-color: #171717;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: var(--frontend-header-height);
    height: var(--frontend-header-height);
    padding: 0 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 200;
}

@media (min-width: 768px) {
    .header {
        padding: 0 20px;
    }
}

@media (min-width: 992px) {
    .header {
        padding: 0 24px;
    }
}

@media (min-width: 1200px) {
    .header {
        padding: 0 32px;
    }
}

@media (min-width: 1600px) {
    .header {
        padding: 0 40px;
    }
}

.header .toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--frontend-header-height);
}

.header .slot-start {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 40px;
}

.header .toolbar-title {
    font-size: 1.125rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.header .container {
    width: 100%;
    max-width: 100%;
    align-items: center;
}

.header-content {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow: hidden;
    min-height: var(--frontend-header-height);
}

.search-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.search-container .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.search-wrapper {
    position: relative;
    min-width: 0;
    flex: 1 1 0%;
    max-width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    font-size: 16px;
    pointer-events: none;
}

.filter-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    font-size: 18px;
    pointer-events: auto;
    transition: opacity 0.2s ease;
}

.filter-icon:hover {
    opacity: 0.8;
}

.notification-icon {
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
    padding: 4px;
}

.notification-icon:hover {
    opacity: 0.8;
}

.search-input {
    background-color: #2c2c2c;
    border: 1px solid rgb(192 192 192 / 30%);
    color: white;
    border-radius: 25px;
    padding-left: 42px;
    padding-right: 42px;
    height: 45px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: #ADAEBC !important;
}

.search-input:focus {
    color: #fff;
    background-color: #2c2c2c !important;
    border-color: rgb(192 192 192 / 50%);
    outline: none;
}


/* Extra Small Devices (Mobile Portrait) - up to 575px */

@media (max-width: 575.98px) {
    .header {
        padding: 0 16px;
        min-height: var(--frontend-header-height-mobile);
        height: var(--frontend-header-height-mobile);
    }

    .header .toolbar,
    .header-content {
        min-height: var(--frontend-header-height-mobile);
    }

    .logo {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .search-input {
        height: 40px;
        font-size: 13px;
        padding-left: 36px;
        padding-right: 36px;
        border-radius: 20px;
        min-width: 0;
    }

    .search-icon {
        left: 11px;
        font-size: 13px;
    }

    .filter-icon {
        right: 9px;
        font-size: 15px;
    }

    .notification-icon {
        font-size: 17px;
        padding: 3px;
        flex-shrink: 0;
    }

    .header-content {
        gap: 8px;
    }

    .search-wrapper {
        min-width: 120px;
    }
}


/* Small Devices (Mobile Landscape / Small Tablets) - 576px to 767px */

@media (min-width: 576px) and (max-width: 767.98px) {
    .header {
        padding: 0 14px;
    }

    .logo {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .search-input {
        height: 42px;
        font-size: 13.5px;
        padding-left: 40px;
        padding-right: 40px;
        min-width: 0;
    }

    .search-icon {
        left: 13px;
        font-size: 15px;
    }

    .filter-icon {
        right: 11px;
        font-size: 17px;
    }

    .notification-icon {
        font-size: 19px;
        flex-shrink: 0;
    }

    .header-content {
        gap: 10px;
    }

    .search-wrapper {
        min-width: 150px;
    }
}


/* Medium Devices (Tablets) - 768px to 991px */

@media (min-width: 768px) and (max-width: 991.98px) {
    .header {
        padding: 0 20px;
    }

    .logo {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .search-input {
        height: 44px;
        font-size: 14px;
        padding-left: 42px;
        padding-right: 42px;
        min-width: 0;
    }

    .search-icon {
        left: 14px;
        font-size: 16px;
    }

    .filter-icon {
        right: 12px;
        font-size: 18px;
    }

    .notification-icon {
        font-size: 20px;
        flex-shrink: 0;
    }

    .header-content {
        gap: 12px;
    }

    .search-wrapper {
        flex: 1 1 0%;
        max-width: none;
    }

    .search-input {
        max-width: 100%;
    }
}


/* Large Devices (Desktop) - 992px to 1199px */

@media (min-width: 992px) and (max-width: 1199.98px) {
    .header {
        padding: 0 24px;
    }

    .logo {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .search-input {
        height: 46px;
        font-size: 14.5px;
        padding-left: 44px;
        padding-right: 44px;
        min-width: 0;
    }

    .search-icon {
        left: 15px;
        font-size: 17px;
    }

    .filter-icon {
        right: 13px;
        font-size: 19px;
    }

    .notification-icon {
        font-size: 21px;
        flex-shrink: 0;
    }

    .header-content {
        gap: 14px;
    }

    .search-wrapper {
        flex: 1 1 0%;
        max-width: none;
    }

    .search-input {
        max-width: 100%;
    }
}


/* Extra Large Devices (Large Desktop) - 1200px and above */

@media (min-width: 1200px) {
    .header {
        padding: 0 32px;
    }

    .logo {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .search-input {
        height: 48px;
        font-size: 15px;
        padding-left: 46px;
        padding-right: 46px;
        min-width: 0;
    }

    .search-icon {
        left: 16px;
        font-size: 18px;
    }

    .filter-icon {
        right: 14px;
        font-size: 20px;
    }

    .notification-icon {
        font-size: 22px;
        flex-shrink: 0;
    }

    .header-content {
        gap: 16px;
    }

    .search-wrapper {
        flex: 1 1 0%;
        max-width: 800px;
    }

    .search-input {
        max-width: 100%;
    }
}


/* Ultra Wide Screens - 1600px and above */

@media (min-width: 1600px) {
    .header {
        padding: 0 40px;
    }

    .search-input {
        min-width: 0;
    }

    .search-wrapper {
        flex: 1 1 0%;
        max-width: 900px;
    }

    .search-input {
        max-width: 100%;
    }
}

.chip-scroll {
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 0 16px 0;
    -webkit-overflow-scrolling: touch;
    /* Visible horizontal scrollbar so users know they can scroll for more categories */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.chip-scroll::-webkit-scrollbar {
    height: 6px;
}

.chip-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.chip-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
}

.chip-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Wrapper so we can show a scroll hint without it scrolling away */
.chip-scroll-wrapper {
    position: relative;
    margin: 0 -4px;
    /* let gradient extend slightly into padding */
}

.chip-scroll-wrapper .chip-scroll {
    padding-right: 12px;
}

/* Fade + chevron on the right to suggest more categories; click to scroll right */
.chip-scroll-fade {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 16px;
    width: 48px;
    pointer-events: auto;
    cursor: pointer;
    background: linear-gradient(to right, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 0.85) 50%, rgb(10, 10, 10) 100%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chip-scroll-wrapper.has-overflow .chip-scroll-fade {
    opacity: 1;
}

.chip-scroll-wrapper.at-end .chip-scroll-fade {
    opacity: 0;
}

.chip-scroll-fade__hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.chip-scroll-fade__hint i {
    font-size: 1.5rem;
}

.chip {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: 500;
    background: #1f1f1f;
    border: 1px solid rgb(192 192 192 / 30%);
    margin-right: 8px;
    font-size: 14px;
    color: #C0C0C0;
}

.chip.active {
    background: #bdbdbd;
    color: black;
    background: linear-gradient(45deg, #C0C0C0 50%, #A8A8A8 67.68%, #D4D4D4 85.36%, #B8B8B8 103.03%, #C8C8C8 120.71%);
}

.tool-card {
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, background-color 0.2s;
}

.tool-card:hover {
    background-color: #222;
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.marketplace-tool-card {
    min-width: 0;
    container-type: inline-size;
}

.marketplace-tools-grid-empty {
    grid-column: 1 / -1;
}

.card-img-container {
    position: relative;
    padding-top: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #111;
}

.card-img-container img {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.card-img-top {
    max-height: 100%;
    width: auto;
    object-fit: cover;
    height: 100%;
}

/* .badge-status-group {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    z-index: 2;
    max-width: calc(100% - 16px);
} */

.badge-status {
    border-radius: 9999px;
    padding: 3px 9px;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: capitalize;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-rent {
    background-color: #16a34a;
}

.badge-sale {
    background-color: #2563eb;
}

.badge-trade {
    background-color: #ea580c;
}

.card-body {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tool-card .card-body {
    padding: 12px 14px;
}

.tool-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 640px) {
    .tool-title {
        font-size: 15px;
    }
}

.tool-price {
    font-size: 15px;
    font-weight: 700;
    /* margin-bottom: 4px; */
    color: #e5e7eb;
}

@media (min-width: 640px) {
    .tool-price {
        font-size: 16px;
    }
}

.tool-dist {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
    line-height: 1.3;
    margin-top: auto;
}

@media (min-width: 640px) {
    .tool-dist {
        font-size: 13px;
    }
}

.fab {
    position: fixed;
    bottom: 85px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: black;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-size: 30px;
    background: linear-gradient(45deg, #C0C0C0 50%, #A8A8A8 67.68%, #D4D4D4 85.36%, #B8B8B8 103.03%, #C8C8C8 120.71%);
}

.logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .logo {
        width: 40px;
        height: 40px;
    }
}

.mb-14 {
    margin-bottom: 14px;
}

.blackBg {
    background: #000;
    max-width: 800px;
}

input::-webkit-input-placeholder {
    color: #fff !important;
}

input::focus {
    color: #000 !important;
}


/* Bottom nav */

.bottom-nav {
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    flex-shrink: 0;
}

/* Nav items always share space equally — 2, 3, or 4 items all look right */
.bottom-nav > div {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--frontend-bottom-nav-height);
    min-height: var(--frontend-bottom-nav-height);
    padding: 6px 0 10px;
    box-sizing: border-box;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
    color: #6B7280;
    font-size: 0.75rem;
    text-decoration: none;
    max-width: 90px;   /* prevents items stretching too wide on large screens */
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1.2;
}

.nav-item.active {
    color: #ffffff;
    font-weight: 700;
    opacity: 1;
}

.nav-item.active i {
    color: #ffffff;
}

.nav-item i {
    font-size: 1.4rem;
    display: block;
    line-height: 1;
}

.nav-item-icon-wrap {
    position: relative;
    display: block;
    line-height: 1;
}

.nav-item-label {
    display: block;
    font-size: inherit;
    line-height: 1.2;
}

.nav-chat-badge {
    position: absolute;
    top: -2px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    border: 1.5px solid #1a1a1a;
}


/* Sidebar overlay */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* Sidebar */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #171717;
    z-index: 1999;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media screen and (min-width: 992px) {
    .sidebar {
        position: relative !important;
        transform: none !important;
        max-width: 340px;
        width: 340px;
        min-width: 340px;
        flex-shrink: 0;
        height: 100%;
        border-right: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 1px 0 0 rgba(0, 0, 0, 0.2);
    }

    .sidebar-overlay {
        display: none;
    }

    .sidebar-header-mobile {
        display: none !important;
    }

    .sidebar-header-desktop {
        display: flex !important;
    }
}


/* Chat pages: full-width (no sidebar), fixed message input at bottom */

body.chat-page .sidebar,
body.chat-page .sidebar-overlay {
    display: none !important;
}

body.chat-page #main-content {
    max-width: 100%;
}

.chat-screen {
    height: 100%;
    min-height: 0;
}

.chat-messages {
    -webkit-overflow-scrolling: touch;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    background-color: #171717;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: var(--frontend-header-height);
    height: var(--frontend-header-height);
    flex-shrink: 0;
}

.sidebar-header-mobile,
.sidebar-header-desktop {
    width: 100%;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
}

.sidebar-close {
    background: none;
    border: none;
    color: #a3a3a3;
    font-size: 1.35rem;
    cursor: pointer;
    padding: 6px 10px;
    transition: color 0.2s;
    border-radius: 6px;
}

.sidebar-close:hover {
    color: #fff;
}

.sidebar-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px 12px 0;
}

.sidebar-menu-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    margin-right: -12px;
    padding-right: 12px;
    padding-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: #404040 transparent;
}

.sidebar-menu-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu-scroll::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

.sidebar-menu-scroll::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

.sidebar-menu-scroll::-webkit-scrollbar-thumb:active {
    background: #737373;
}

.sidebar-footer {
    flex-shrink: 0;
    margin: 0 -12px;
    padding: 6px 24px 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background-color: #171717;
    box-sizing: border-box;
}

@media screen and (min-width: 992px) {
    .sidebar-footer {
        background-color: #1a1a1a;
        border-top-color: #2a2a2a;
    }
}

.sidebar-footer .sidebar-menu-item.logout {
    margin: 0;
    width: 100%;
    border-radius: 10px;
    margin-bottom: 0;
    padding: 12px 28px 12px 12px;
    box-sizing: border-box;
}

.sidebar-profile {
    background-color: rgba(38, 38, 38, 0.8);
    border-radius: 12px;
    padding: 14px 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .sidebar-profile:hover {
        background-color: rgba(38, 38, 38, 1);
        border-color: rgba(255, 255, 255, 0.08);
    }
}

.sidebar-profile.active {
    background-color: rgba(38, 38, 38, 1);
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.2);
}

.sidebar-profile-img {
    flex-shrink: 0;
}

.sidebar-profile-info {
    flex: 1;
    min-width: 0;
}

.sidebar-profile-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.sidebar-profile-link {
    font-size: 0.8125rem;
    color: #a3a3a3;
    margin: 0;
    line-height: 1.3;
}

.sidebar-profile-arrow {
    color: #737373;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .sidebar-profile:hover .sidebar-profile-arrow {
        color: #a3a3a3;
        transform: translateX(2px);
    }
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 28px 12px 12px;
    color: #e5e5e5;
    text-decoration: none;
    margin-bottom: 4px;
    border-radius: 10px;
    font-size: 0.9375rem;
    position: relative;
    background-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .sidebar-menu-item:hover {
        background-color: rgba(38, 38, 38, 0.9);
        color: #fff;
    }
}

.sidebar-menu-item.active {
    background-color: rgba(38, 38, 38, 1);
    color: #fff;
    border-left: none;
    padding-left: 12px;
}

.sidebar-menu-item.active .sidebar-menu-item-arrow {
    color: #737373;
}

.sidebar-menu-item i {
    margin-right: 12px;
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
    color: #a3a3a3;
    flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
    .sidebar-menu-item:hover i:first-of-type {
        color: #fff;
    }
}

.sidebar-menu-item-text {
    flex: 1;
    min-width: 0;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-menu-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    border-radius: 999px;
    pointer-events: none;
}

.sidebar-menu-pill--new {
    padding: 4px 8px;
    color: #000000;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sidebar-notif-count {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-right: 6px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    border: 1.5px solid #171717;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
    box-sizing: border-box;
    pointer-events: none;
}

.sidebar-menu-item.active .sidebar-notif-count {
    border-color: #262626;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.45);
}

.sidebar-menu-item-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    color: #525252;
    font-size: 0.75rem;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    margin-right: 0 !important;
    transform: translateY(-50%);
}

@media (hover: hover) and (pointer: fine) {
    .sidebar-menu-item:hover .sidebar-menu-item-arrow {
        color: #737373;
        transform: translateY(-50%) translateX(2px);
    }
}

.sidebar-menu-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    padding: 4px 8px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    color: #000000;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sidebar-menu-item.logout {
    color: #f87171;
}

.sidebar-menu-item.logout i {
    color: #f87171;
}

@media (hover: hover) and (pointer: fine) {
    .sidebar-menu-item.logout:hover {
        background-color: rgba(248, 113, 113, 0.18);
        color: #fca5a5;
    }
}

@media (hover: hover) and (pointer: fine) {
    .sidebar-menu-item.logout:hover i,
    .sidebar-menu-item.logout:hover .sidebar-menu-item-text {
        color: #fca5a5;
    }
}

.sidebar-menu-item.logout .sidebar-menu-item-arrow {
    color: #f87171;
}

@media (hover: hover) and (pointer: fine) {
    .sidebar-menu-item.logout:hover .sidebar-menu-item-arrow {
        color: #fca5a5;
        transform: translateY(-50%) translateX(2px);
    }
}


/* Sidebar scrollbar – thin and consistent on Windows & Mac */

.sidebar {
    scrollbar-width: thin;
    scrollbar-color: #404040 #171717;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: #171717;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

.sidebar::-webkit-scrollbar-thumb:active {
    background: #737373;
}

.sidebar::-webkit-scrollbar-corner {
    background: #171717;
}


/* New loading styles */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #333;
    border-top: 5px solid #C0C0C0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.user-name {
    font-size: 12px;
    color: #C0C0C0;
    margin-left: 10px;
}


/* Duplicate .tool-card:hover removed - see .tool-card block above */


/* Filter Panel Styles - Modern Design */

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

.filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 380px;
    height: 100%;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    z-index: 2999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-panel.active {
    transform: translateX(0);
}

.filter-panel-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, #1a1a1a 0%, #151515 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.filter-panel-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.3px;
}

.filter-panel-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.filter-panel-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.filter-panel-content {
    padding: 16px;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section:last-of-type {
    margin-bottom: 0;
}

.filter-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #9CA3AF;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 16px;
    color: #fff;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.filter-input::placeholder {
    color: #6B7280;
}

.filter-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    background-color: #2f2f2f;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 16px;
    color: #fff;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
}

.filter-select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    background-color: #2f2f2f;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-range .filter-input {
    flex: 1;
}

.price-separator {
    color: #6B7280;
    font-size: 18px;
    font-weight: 300;
    padding: 0 4px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    padding: 12px 0;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding-left: 4px;
    padding-right: 8px;
}

.filter-option:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.filter-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3b82f6;
    border-radius: 4px;
    flex-shrink: 0;
}

.filter-option span {
    user-select: none;
    font-weight: 400;
    color: #E5E7EB;
}

.filter-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, #1a1a1a 20%);
    padding: 16px;
}

.filter-clear-btn {
    flex: 1;
    background-color: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 20px;
    color: #E5E7EB;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-clear-btn:hover {
    background-color: #333;
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.filter-clear-btn:active {
    transform: translateY(0);
}

.filter-apply-btn {
    flex: 1;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.filter-apply-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.filter-apply-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.filter-panel::-webkit-scrollbar {
    width: 4px;
}

.filter-panel::-webkit-scrollbar-track {
    background: transparent;
}

.filter-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.filter-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* Amazon/Flipkart-style filter panel (ecom) */

.filter-panel--ecom {
    display: flex;
    flex-direction: column;
    background: #131313;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-panel--ecom .filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #131313;
    flex-shrink: 0;
}

.filter-panel--ecom .filter-panel__title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.filter-panel--ecom .filter-panel__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.filter-panel--ecom .filter-panel__close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.filter-panel--ecom .filter-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.filter-panel--ecom .filter-accordion {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-panel--ecom .filter-accordion__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #e5e7eb;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.15s;
}

.filter-panel--ecom .filter-accordion__summary::-webkit-details-marker {
    display: none;
}

.filter-panel--ecom .filter-accordion__summary:hover {
    background: rgba(255, 255, 255, 0.03);
}

.filter-panel--ecom .filter-accordion[open] .filter-accordion__icon {
    transform: rotate(180deg);
}

.filter-panel--ecom .filter-accordion__icon {
    flex-shrink: 0;
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.filter-panel--ecom .filter-accordion__content {
    padding: 0 20px 16px 20px;
}

.filter-panel--ecom .filter-panel__input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: #fff;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}

.filter-panel--ecom .filter-panel__input::placeholder {
    color: #6b7280;
}

.filter-panel--ecom .filter-panel__input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #262626;
}

.filter-panel--ecom .filter-panel__price-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-panel--ecom .filter-panel__price-row .filter-panel__input {
    flex: 1;
    min-width: 0;
}

.filter-panel--ecom .filter-panel__price-sep {
    color: #6b7280;
    font-size: 14px;
    flex-shrink: 0;
}

.filter-panel--ecom .filter-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.filter-panel--ecom .filter-panel__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #d1d5db;
    cursor: pointer;
    user-select: none;
}

.filter-panel--ecom .filter-panel__option:hover {
    color: #fff;
}

.filter-panel--ecom .filter-panel__option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
    flex-shrink: 0;
}

.filter-panel--ecom .filter-panel__select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: #fff;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filter-panel--ecom .filter-panel__select:focus {
    outline: none;
    border-color: #3b82f6;
}

.filter-panel--ecom .filter-panel__footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #131313;
    flex-shrink: 0;
}

.filter-panel--ecom .filter-panel__btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: background 0.15s, transform 0.1s;
}

.filter-panel--ecom .filter-panel__btn--primary {
    background: #2563eb;
    color: #fff;
}

.filter-panel--ecom .filter-panel__btn--primary:hover {
    background: #1d4ed8;
}

.filter-panel--ecom .filter-panel__btn--secondary {
    background: transparent;
    color: #9ca3af;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.filter-panel--ecom .filter-panel__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
}


/* Two-column filter panel: title | values */

.filter-panel--twocol .filter-panel__body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filter-panel--twocol .filter-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 16px;
    align-items: start;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-panel--twocol .filter-row:last-child {
    border-bottom: none;
}

.filter-panel--twocol .filter-row__label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    padding-top: 2px;
    flex-shrink: 0;
}

.filter-panel--twocol .filter-row__value {
    min-width: 0;
}

.filter-panel--twocol .filter-row__value .filter-panel__input,
.filter-panel--twocol .filter-row__value .filter-panel__select {
    width: 100%;
}

.filter-panel--twocol .filter-row__value .filter-panel__list {
    margin: -4px 0;
}

.filter-panel--twocol .filter-row__value .filter-panel__option {
    padding: 4px 0;
}


/* Flipkart-style filter panel: left nav (titles) + right content (values) */

.filter-panel--flipkart .filter-panel__body.filter-panel__body--flipkart {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.filter-panel--flipkart .filter-panel__header--flipkart {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-panel--flipkart .filter-panel__back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.15s;
}

.filter-panel--flipkart .filter-panel__back:hover {
    background: rgba(255, 255, 255, 0.08);
}

.filter-panel--flipkart .filter-panel__title--center {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.filter-panel--flipkart .filter-panel__header-spacer {
    width: 40px;
    flex-shrink: 0;
}

.filter-panel--flipkart .filter-panel__nav {
    width: 110px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: auto;
}

.filter-panel--flipkart .filter-panel__nav-item {
    display: block;
    width: 100%;
    padding: 14px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
}

.filter-panel--flipkart .filter-panel__nav-item:hover {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.03);
}

.filter-panel--flipkart .filter-panel__nav-item.active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.15);
}

.filter-panel--flipkart .filter-panel__content {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 16px;
}

.filter-panel--flipkart .filter-pane {
    display: none;
}

.filter-panel--flipkart .filter-pane.active {
    display: block;
}

.filter-panel--flipkart .filter-pane__search {
    position: relative;
    margin-bottom: 12px;
}

.filter-panel--flipkart .filter-pane__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 16px;
    pointer-events: none;
}

.filter-panel--flipkart .filter-pane__search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    font-size: 14px;
    color: #fff;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
}

.filter-panel--flipkart .filter-pane__search-input::placeholder {
    color: #6b7280;
}

.filter-panel--flipkart .filter-pane__search-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.filter-panel--flipkart .filter-pane__input {
    width: 100%;
    margin-top: 0;
}

.filter-panel--flipkart .filter-pane__list {
    margin-top: 8px;
}


/* Chrome, Safari, Edge, Opera */

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* Firefox */

input[type=number] {
    -moz-appearance: textfield;
}


/* ========== Toast notifications (success, error, warning – auto-dismiss) ========== */

.toast-notification-container {
    position: fixed;
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: 400px;
    margin-left: auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    animation: toastShow 0.3s ease-out;
}

.toast-notification--success {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 4px solid #22c55e;
    color: #1f2937;
}

.toast-notification--error {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 4px solid #ef4444;
    color: #1f2937;
}

.toast-notification--error .toast-notification__icon {
    color: #ef4444;
}

.toast-notification--warning {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 4px solid #f59e0b;
    color: #1f2937;
}

.toast-notification--warning .toast-notification__icon {
    color: #f59e0b;
}

.toast-notification--info {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 4px solid #0ea5e9;
    color: #1f2937;
}

.toast-notification--info .toast-notification__icon {
    color: #0ea5e9;
}

.toast-notification__icon {
    font-size: 1.4rem;
    color: #22c55e;
    flex-shrink: 0;
}

.toast-notification--success .toast-notification__icon {
    color: #22c55e;
}

.toast-notification__message {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.toast-notification__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #6b7280;
    padding: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.toast-notification__close:hover {
    color: #1f2937;
}

.toast-notification--hide {
    animation: toastHide 0.3s ease-in forwards;
}

@keyframes toastShow {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

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

@keyframes toastHide {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-12px);
    }
}


/* User avatar (initial fallback — matches reference-app) */

.user-avatar-host {
    display: inline-flex;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
}

.user-avatar-img,
.user-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-fallback {
    background-color: #374151;
    color: #ffffff;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

.user-avatar-host--sm {
    width: 32px;
    height: 32px;
}

.user-avatar-host--sm .user-avatar-fallback {
    font-size: 14px;
}

.user-avatar-host--md {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.user-avatar-host--md .user-avatar-fallback {
    font-size: 18px;
}

.user-avatar-host--xl {
    width: 64px;
    height: 64px;
    border: 1px solid #374151;
    flex-shrink: 0;
}

.user-avatar-host--xl .user-avatar-fallback {
    font-size: 24px;
}

.user-avatar-host--lg {
    width: 100%;
    height: 100%;
}

.user-avatar-host--lg .user-avatar-img,
.user-avatar-host--lg .user-avatar-fallback {
    border: 3px solid #374151;
}

.user-avatar-host--lg .user-avatar-fallback {
    font-size: 32px;
}

/* Profile page components (reusable) */

.profile-avatar-wrapper {
    width: 120px;
    height: 120px;
    padding: 4px;
    background: #1f2937;
    border-radius: 50%;
    margin: 0 auto;
    display: block;
}

.profile-stat-card {
    background-color: rgba(38, 38, 38, 0.6);
    border: 1px solid #525252;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.profile-action-card {
    background: rgba(38, 38, 38, 0.8);
    border: 1px solid #525252;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px;
    cursor: pointer;
}

.profile-action-card small {
    color: #9ca3af;
}

.profile-tool-card {
    background-color: rgba(38, 38, 38, 0.6);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #525252;
    height: 100%;
    cursor: pointer;
}

.profile-tool-card .profile-tool-img {
    height: 140px;
    background-color: #000;
    object-fit: cover;
    width: 100%;
}

.profile-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.badge-active {
    background-color: #198754;
    color: #ffffff;
}

.badge-rented {
    background-color: #f97316;
    color: #ffffff;
}

.badge-sold {
    background-color: #6b7280;
    color: #ffffff;
}

.badge-draft {
    background-color: #6c757d;
    color: #ffffff;
}

.badge-blocked {
    background-color: #dc3545;
    color: #ffffff;
}

/* Utility: animate-spin for loading buttons */
.animate-spin {
    animation: spin 1s linear infinite;
}


/* Add payment method / payment form (reusable) */

#card-element {
    /* padding: 12px 16px;
    background: #262626;
    border: 1px solid #262626;
    border-radius: 8px; */
    background: #262626;
    border: 1px solid #525252;
    border-radius: 6px;
    padding: 14px 10px;
}

#card-errors {
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

.payment-form-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}

.payment-form-checkbox-wrapper input {
    width: 18px;
    height: 18px;
    accent-color: #4b5563;
}

.payment-form-checkbox-wrapper label {
    color: #d1d5db;
    font-size: 14px;
    cursor: pointer;
}

.payment-form-security-note {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding: 16px;
    background: rgba(38, 38, 38, 0.5);
    border-radius: 12px;
    border: 1px solid #525252;
}

.payment-form-security-note i {
    color: #10b981;
    font-size: 20px;
}

.payment-form-security-note-text {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
}

.payment-form-security-note-text strong {
    color: #fff;
}


/* Profile edit (tooltrader-v1 parity) */

.profile-picture-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 20px;
}

.profile-picture-wrapper {
    position: relative;
    cursor: pointer;
}

.profile-picture-wrapper .profile-picture.user-avatar-host {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.profile-picture-wrapper .profile-picture .user-avatar-img,
.profile-picture-wrapper .profile-picture .user-avatar-fallback {
    border-radius: 50%;
}

.profile-picture-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #bdbdbd;
    color: #000;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #0D0D0D;
    transition: all 0.2s;
}

.profile-picture-edit:hover {
    background: #d0d0d0;
    transform: scale(1.05);
}

.profile-picture-wrapper.loading .profile-picture-edit {
    opacity: 0.5;
    pointer-events: none;
}

.profile-edit-form-group {
    margin-bottom: 20px;
}

.profile-edit-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.profile-edit-section-title.danger {
    color: #dc3545;
}

.profile-edit-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 6px;
}

.profile-edit-form-label .optional {
    color: #9CA3AF;
    font-weight: 400;
}

.profile-edit-form-help {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 6px;
}

/* Override legacy global input::-webkit-input-placeholder { color: #fff } on edit profile */
#profileForm input::placeholder,
#profileForm textarea::placeholder,
#profileForm input:focus::placeholder,
#profileForm textarea:focus::placeholder {
    color: #9ca3af !important;
    opacity: 1;
}

#profileForm input::-webkit-input-placeholder,
#profileForm textarea::-webkit-input-placeholder,
#profileForm input:focus::-webkit-input-placeholder,
#profileForm textarea:focus::-webkit-input-placeholder {
    color: #9ca3af !important;
    opacity: 1;
}

#profileForm input::-moz-placeholder,
#profileForm textarea::-moz-placeholder,
#profileForm input:focus::-moz-placeholder,
#profileForm textarea:focus::-moz-placeholder {
    color: #9ca3af !important;
    opacity: 1;
}

#profileForm input:focus,
#profileForm textarea:focus {
    color: #fff !important;
}

.profile-edit-verify-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #2c2c2c;
    border: 1px solid rgba(192, 192, 192, 0.3);
    border-radius: 6px;
    padding: 8px 16px;
    color: #c0c0c0;
    font-size: 14px;
    cursor: pointer;
}

.profile-edit-verify-btn:hover {
    background-color: #333;
    color: #fff;
}

.profile-edit-verify-btn--success {
    cursor: default;
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.4);
    background-color: rgba(34, 197, 94, 0.1);
}

.profile-edit-verify-btn--success:hover {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.profile-edit-verify-btn--unverified {
    cursor: default;
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.4);
    background-color: rgba(245, 158, 11, 0.1);
}

.profile-edit-verify-btn--unverified:hover {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.profile-edit-account-type-card {
    background: linear-gradient(45deg, #1A1A1A 50%, #2A2A2A 120%);
    border: 1px solid rgba(192, 192, 192, 0.3);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.profile-edit-action-button {
    width: 100%;
    border: 1px solid rgba(192, 192, 192, 0.3);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    margin-bottom: 12px;
    text-decoration: none;
    background: linear-gradient(45deg, #1A1A1A 50%, #2A2A2A 120%);
    color: inherit;
}

.profile-edit-action-button:hover {
    background: #333;
    color: inherit;
}

.profile-edit-action-button.danger {
    border-color: rgba(220, 53, 69, 0.3);
}

.profile-edit-action-button.danger .action-icon,
.profile-edit-action-button.danger .action-text,
.profile-edit-action-button.danger .action-arrow {
    color: #dc3545;
}

.profile-edit-action-button.danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}


/* ========== List Item (Create Tool) Form ========== */

.list-item-form {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 4px;
}

.list-item-form .form-group {
    margin-bottom: 1.25rem;
}

.list-item-form__row {
    margin-bottom: 1.25rem;
}

.list-item-form__row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.list-item-form__gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.list-item-form__gallery-header .form-label {
    margin-bottom: 0;
}

.list-item-form .hidden {
    display: none !important;
}

@media (max-width: 480px) {
    .list-item-form__row--2col {
        grid-template-columns: 1fr;
    }
}


/* Upload box (create tool) */

.upload-box {
    border: 2px dashed #6b7280;
    border-radius: 12px;
    padding: 2rem 1rem;
    min-height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #9ca3af;
    position: relative;
    transition: all 0.2s;
    background: #1a1a1a;
}

.upload-box:hover,
.upload-box.drag-over {
    border-color: #ff3b30;
    background: rgba(255, 59, 48, 0.08);
}

.upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-box .upload-box__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.upload-box .upload-box__plus {
    font-size: 2.5rem;
    line-height: 1;
    color: #9ca3af;
}

.upload-box .upload-box__text {
    font-size: 1rem;
    color: #9ca3af;
    margin: 0;
}


/* List item: listing type buttons */

.listing-type-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.75rem;
}

.listing-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-action {
    padding: 8px 16px;
    border-radius: 25px;
    border: 1px solid #4b5563;
    background: #1a1a1a;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-action.active {
    border-color: #ff3b30;
    background: rgba(255, 59, 48, 0.15);
    color: #fff;
}

.btn-action:hover:not(.active) {
    background: #2a2a2a;
    color: #fff;
}


/* Image gallery (create tool) */

.image-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.image-preview-container {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.image-preview-container:hover {
    border-color: #ff3b30;
}

.image-preview-container.cover {
    border-color: #ff3b30;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.25);
}

.image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    border: none;
    padding: 0;
    z-index: 2;
}

.remove-image-btn:hover {
    background: #ef4444;
}

.cover-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(255, 59, 48, 0.9);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Submit button with spinner */

.submit-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: submit-spin 0.6s linear infinite;
    vertical-align: -0.2em;
    margin-right: 0.35rem;
}

@keyframes submit-spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-loader {
    align-items: center;
}


/* Active filters bar */
.active-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0 0.25rem;
}
.active-filters-bar__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #1f1f1f;
    font-size: 0.8125rem;
    color: #e5e7eb;
    cursor: default;
    white-space: nowrap;
}
.active-filter-tag__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    font-size: 0.85rem;
    line-height: 1;
}
.active-filter-tag__remove:hover {
    color: #fff;
}

/* Results + sort bar */
.results-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    gap: 0.75rem;
}
.results-sort-bar__count {
    font-size: 0.875rem;
    color: #9ca3af;
    white-space: nowrap;
}
.results-sort-bar__sort {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.results-sort-bar__sort-label {
    font-size: 0.875rem;
    color: #9ca3af;
    white-space: nowrap;
}
.results-sort-bar__sort-select {
    font-size: 0.875rem;
    color: #e5e7eb;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    padding: 4px 8px;
    appearance: auto;
}




/* ═══════════════════════════════════════════════════════════════════
   MARKETPLACE — Mobile view parity with React Native app
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tool card: match RN MarketplaceScreen card ── */
.marketplace-tools-grid .tool-card {
    background-color: #1f1f1f;
    border: 1px solid rgba(192,192,192,0.2);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.15s;
}
.marketplace-tools-grid .tool-card:hover {
    border-color: rgba(192,192,192,0.35);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}

/* Fixed 128px image height — matches RN imageWrap */
.marketplace-tools-grid .card-img-container {
    position: relative;
    height: 128px;
    padding-top: 0;
    overflow: hidden;
    background: #111;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.marketplace-tools-grid .card-img-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badge — top-left pills like RN */
.marketplace-tools-grid .badge-status-group {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
    z-index: 2;
}
.marketplace-tools-grid .badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    line-height: 1;
}
.marketplace-tools-grid .badge-rent  { background-color: #16a34a; }
.marketplace-tools-grid .badge-sale  { background-color: #2563eb; }
.marketplace-tools-grid .badge-trade { background-color: #ea580c; }

/* Card body — RN typography */
.marketplace-tools-grid .card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.marketplace-tools-grid .tool-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 18px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}
.marketplace-tools-grid .tool-price {
    margin-top: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #c0c0c0;
    line-height: 1.3;
}
.marketplace-tools-grid .tt-status-badge {
    display: inline-block;
    width: fit-content;
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    /* margin-top: 6px; */
    white-space: nowrap;
}
.marketplace-tools-grid .tt-status-active  { background: #16a34a; color: #fff; }
.marketplace-tools-grid .tt-status-rented  { background: #ea580c; color: #fff; }
.marketplace-tools-grid .tt-status-sold    { background: #3f3f46; color: #a1a1aa; }
.marketplace-tools-grid .tool-dist {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
    line-height: 1.3;
}

.booking-tool-row {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: stretch;
}

.booking-tool-thumb {
    position: relative;
    width: 100%;
    min-height: 5rem;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: #262626;
}

.booking-tool-thumb img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Tool names on detail / rental / purchase screens — full wrap (not grid cards) */
.tool-name-wrap {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Use the space left after the sidebar; keep two columns on phones. */
.marketplace-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
@media (min-width: 640px) {
    .marketplace-tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
        gap: 14px;
    }
}
@media (min-width: 768px) {
    .marketplace-tools-grid { gap: 16px; }
}

/* ── Availability tabs — match RN pill style ── */
.mkt-avail-tabs {
    display: flex;
    gap: 8px;
    padding: 0 0 14px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.mkt-avail-tabs::-webkit-scrollbar { display: none; }
.mkt-avail-tab {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.65);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}
.mkt-avail-tab:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.28); }
.mkt-avail-tab.active {
    background: #fff;
    color: #000;
    border-color: #fff;
    font-weight: 700;
}

/* ── Results count ── */
.results-sort-bar__count {
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 500;
}

/* ── Category bar mobile: keep single row like RN — do NOT stack ── */
@media (max-width: 575px) {
    /* Tighter page padding on small screens */
    .w-full.max-w-full.mx-auto.px-4 { padding-left: 12px !important; padding-right: 12px !important; }
}

/* ── FAB: match RN "List Item" button ── */
.list-item-fab {
    position: fixed;
    bottom: calc(var(--frontend-bottom-nav-offset) + 16px);
    right: 16px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 20px;
    border-radius: 999px;
    background: #f9fafb;
    color: #000;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,0,0,0.45);
    transition: transform 0.15s, box-shadow 0.15s;
    letter-spacing: 0.01em;
    text-decoration: none;
}
.list-item-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(0,0,0,0.55); color: #000; }
.list-item-fab:active { transform: translateY(0); }
.list-item-fab i { font-size: 0.95rem; }
@media (min-width: 768px) {
    .list-item-fab { right: 20px; }
}
@media (min-width: 992px) {
    .list-item-fab { right: 24px; }
}
@media (min-width: 1200px) {
    .list-item-fab { right: 32px; }
}
@media (min-width: 1600px) {
    .list-item-fab { right: 40px; }
}
@media (max-width: 480px) {
    .list-item-fab { padding: 11px 18px; font-size: 0.8125rem; }
}

/* Profile page FAB — same position as marketplace; silver tint per RN ProfileScreen */
.list-item-fab.profile-list-fab {
    background: #c0c0c0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.list-item-fab.profile-list-fab:hover {
    background: #b8b8b8;
    color: #000;
}

/* ── Location button: green active state like RN ── */
.tt-loc-btn.active .tt-loc-icon { color: #22c55e; }
.tt-loc-btn.active { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.07); }
.tt-loc-btn.active .tt-loc-label { color: #fff; }

/* ?? Google Places Autocomplete - dark theme ????????????????????????????? */
/* Legacy Places API � pac-container is injected at <body> level by Google  */
.pac-container {
    background-color: #1c1c1c;
    border: 1px solid #3a3a3a;
    border-top: 1px solid #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    font-family: inherit;
    margin-top: 4px;
    padding: 4px 0;
    z-index: 9999;
}
.pac-container::after {
    /* "Powered by Google" logo � keep but dim to match dark bg */
    filter: brightness(0.55);
    padding: 6px 12px;
}
.pac-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid #2a2a2a;
    background: transparent;
    color: #e5e5e5;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    transition: background 0.12s;
}
.pac-item:first-child { border-top: none; }
.pac-item:hover,
.pac-item-selected,
.pac-item-selected:hover {
    background-color: #2a2a2a;
}
.pac-item-query {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    padding-right: 4px;
}
.pac-matched {
    font-weight: 700;
    color: #ffffff;
}
.pac-item span:not(.pac-item-query):not(.pac-icon-bistro):not(.pac-icon) {
    color: #9ca3af;
    font-size: 12px;
}
.pac-icon {
    filter: brightness(0) invert(0.55);
    margin-top: 2px;
    flex-shrink: 0;
}
.pac-icon-search {
    filter: brightness(0) invert(0.55);
}

/* New Places API � gmp-place-autocomplete web component */
gmp-place-autocomplete {
    --gmpx-color-surface: #1c1c1c;
    --gmpx-color-on-surface: #e5e5e5;
    --gmpx-color-on-surface-variant: #9ca3af;
    --gmpx-color-primary: #60a5fa;
    --gmpx-color-outline: #3a3a3a;
    --gmpx-font-family-base: inherit;
    --gmpx-font-size-base: 14px;
    color-scheme: dark;
    width: 100%;
    display: block;
}

/* ============================================================
   NEW MARKETPLACE CARD DESIGN (approved by Ravi 2026-07-06)
   Matches React Native ToolCard.tsx spec exactly.
   Used by: Blade tool-card, JS renderTool(), public-tool-card
   ============================================================ */

/* ── Card shell ── */
.marketplace-tool-card .tool-card {
    background-color: #161616;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #343434;
    box-shadow: 0 6px 18px rgba(0,0,0,0.55);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}
.marketplace-tool-card .tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.65);
}

/* ── Image section ── */
.mkt-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 72%;           /* aspect ratio: image is 72% of card width */
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #111;
}
.mkt-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* Type chips — top-left */
.mkt-chips-row {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 5px;
    z-index: 2;
    flex-wrap: wrap;
}
.mkt-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
    line-height: 1;
}
.mkt-chip-rent  { background: #16a34a; }
.mkt-chip-sale  { background: #2563eb; }
.mkt-chip-trade { background: #ea580c; }
.mkt-chip-sold  { background: #3f3f46; color: #e5e7eb; }

/* ── Card body ── */
.mkt-card-body {
    padding: 11px 12px 13px;
    display: flex;
    flex-direction: column;
    min-height: 172px;
    flex: 1 0 auto;
    box-sizing: border-box;
}
.mkt-title {
    color: #f9fafb;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.1px;
    min-height: 34px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* Prices flow across the card and wrap as complete amount/period pairs. */
.mkt-price-empty {
    min-height: 84px;
    flex-shrink: 0;
    margin-top: 6px;
}
.mkt-price-area,
.mkt-price-list {
    min-height: 84px;
    flex-shrink: 0;
    margin-top: 6px;
}
.mkt-price-area {
    display: flex;
    align-items: flex-start;
}
.mkt-price-list {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: baseline;
    gap: 4px 8px;
}
.mkt-price-line,
.mkt-rental-summary > span:not(.mkt-rental-divider) {
    display: inline-flex;
    align-items: baseline;
    flex: 0 0 auto;
    line-height: 20px;
    white-space: nowrap;
    color: #8b93a1;
    font-size: 10.5px;
    font-weight: 500;
}
/* Rental, mixed sale and sale-only amounts share one typography rule. */
.mkt-price-list strong {
    color: #d1d5db;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.1px;
}
/* Keep all rental tiers in the same flex flow, including narrow cards. */
.mkt-rental-summary {
    display: contents;
}
.mkt-rental-divider {
    display: none;
}
.mkt-purchase-price {
    display: inline-flex;
    align-items: baseline;
    flex: 0 0 auto;
    column-gap: 4px;
    line-height: 20px;
    color: #8b93a1;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* Trade badge */
.mkt-trade-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    color: #f59e0b;
    white-space: nowrap;
    align-self: flex-start;
}
.mkt-trade-badge::before {
    content: '⇄';
    margin-right: 5px;
    font-size: 14px;
}

/* Bottom row: exceptional status + distance/location */
.mkt-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    gap: 4px;
}

/* Status badge — plain colored text (no pill/border) */
.mkt-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-radius: 0;
    border: none;
    background: none;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.mkt-status-active {
    color: #4ade80;
}
.mkt-status-rented {
    color: #fb923c;
}
.mkt-status-sold {
    color: #a1a1aa;
}
.mkt-status-draft {
    color: #94a3b8;
}
.mkt-status-blocked {
    color: #ef4444;
}

/* Status dot — hidden; kept in CSS for Blade partials that still render it */
.mkt-status-dot { display: none; }

/* Distance/location */
.mkt-location {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex-shrink: 1;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mkt-location i {
    flex-shrink: 0;
    font-size: 12px;
}

/* ── Filter badge on filter button ── */
.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    position: absolute;
    top: -6px;
    right: -6px;
    border: 1.5px solid #0a0a0a;
    pointer-events: none;
}

/* Keep Safari from zooming editable controls as the keyboard opens. */
@supports (-webkit-touch-callout: none) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]):not([type="color"]), textarea {
        font-size: max(16px, 1em);
    }
}

/* Keep card geometry stable while Safari skips offscreen image/body rendering.
   The image uses percentage padding and the body reserves its minimum height. */
#toolsGrid .mkt-img-wrap, #toolsGrid .mkt-card-body {
    content-visibility: auto;
    contain-intrinsic-size: 0 0;
}
@media (hover: none) {
    .marketplace-tool-card .tool-card:hover { transform: none; box-shadow: 0 6px 18px rgba(0,0,0,.55); }
}

/* Verification uses the menu's icon column and a restrained secondary status. */
.sidebar-verification-item { min-height:64px; border:1px solid #2a2a2a; background:#191919; }
.sidebar-verification-item[hidden], [data-sidebar-verification-badge][hidden] { display:none !important; }
.sidebar-verification-copy { display:flex; flex-direction:column; gap:4px; white-space:normal; }
.sidebar-verification-status { display:flex; align-items:center; gap:6px; color:#a3a3a3; font-size:12px; line-height:18px; }
.sidebar-verification-dot { width:6px; height:6px; flex-shrink:0; border-radius:50%; background:#fbbf24; }
.sidebar-verification-item[data-status-tone="pending"] .sidebar-verification-dot { background:#60a5fa; }
.sidebar-verification-item:focus-visible { outline:2px solid #a3a3a3; outline-offset:2px; }

/* Keyboard focus remains visible independently of pointer hover support. */
.sidebar-menu-item:focus-visible,
.sidebar-profile:focus-visible {
    outline: 2px solid #a3a3a3;
    outline-offset: 2px;
}
