@font-face {
    font-family: "IRANSans";
    src: url("../fonts/IRANSans.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IRANSansNumbers";
    src: url("../fonts/IRANSansNumbers-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --vstore-bg: #f2f4ff;
    --vstore-nav: #0f172a;
    --vstore-primary: #0d6efd;
    --vstore-card: #ffffff;
    --vstore-shadow: 0 14px 35px rgba(15, 23, 42, 0.1);
    --vstore-nav-height: 4.25rem;
    --app-bottom-nav-space: 0px;
    --sticky-submit-bar-space: 0px;
    --sticky-submit-bar-gap: 0.9rem;
    --vstore-content-bottom-gap: 1rem;
}

* {
    font-family: IRANSans, IRANSansNumbers, sans-serif;
}

body {
    background:
        radial-gradient(circle at 10% 6%, rgba(9, 35, 119, 0.24) 0, transparent 38%),
        radial-gradient(circle at 88% 16%, rgba(147, 51, 234, 0.26) 0, transparent 34%),
        radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.14) 0, transparent 36%),
        var(--vstore-bg);
    min-height: 100vh;
    padding-top: var(--vstore-nav-height);
}

body > main.container {
    padding-top: 0.65rem !important;
}

body > main.container::after {
    content: "";
    display: block;
    height: var(--vstore-content-bottom-gap);
}

.vstore-nav {
    background-color: var(--vstore-nav);
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.28);
    position: fixed !important;
    top: 0;
    inset-inline: 0;
    z-index: 1050;
    min-height: var(--vstore-nav-height);
    display: flex;
    align-items: center;
}

.vstore-nav .container {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.vstore-nav .navbar-brand {
    font-size: 1rem;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
}

.site-logo {
    display: block;
    height: 36px;
    width: auto;
    object-fit: contain;
}

.vstore-toggler {
    margin-inline-start: auto;
    position: relative;
}

.drawer-pending-badge {
    position: absolute;
    top: -0.45rem;
    inset-inline-end: -0.45rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.32rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #dc2626;
    border: 2px solid #0f172a;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.header-sublinks-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-inline-start: auto;
    margin-inline-end: 0.45rem;
    min-width: 0;
}

.header-sublink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.35);
    border-radius: 999px;
    padding: 0.26rem 0.72rem;
    font-size: 0.76rem;
    line-height: 1.2;
    transition: all 0.18s ease;
}

.header-sublink:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.52);
}

.header-sublink:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 1px;
}

@media (max-width: 575.98px) {
    .vstore-nav .container {
        flex-wrap: nowrap;
        gap: 0.35rem;
    }

    .header-sublinks-wrap {
        flex: 1 1 auto;
        max-width: calc(100vw - 7.25rem);
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        gap: 0.25rem;
        margin-inline-start: 0.25rem;
        margin-inline-end: 0.25rem;
        padding-bottom: 0.1rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .header-sublinks-wrap::-webkit-scrollbar {
        display: none;
    }

    .header-sublink {
        flex: 0 0 auto;
        padding: 0.2rem 0.42rem;
        font-size: 0.62rem;
        line-height: 1.15;
    }
}

@media (display-mode: standalone) {
    :root {
        --vstore-nav-height: calc(4.25rem + env(safe-area-inset-top));
    }

    .vstore-nav {
        padding-top: env(safe-area-inset-top);
    }

    body > main.container {
        padding-top: 0.85rem !important;
    }

    body > main.container::after {
        height: calc(var(--vstore-content-bottom-gap) + 0.35rem);
    }
}

.app-bottom-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1040;
    background: #f8fafc;
    border-top: 1px solid #dbe1ea;
    box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.08);
}

.app-bottom-nav-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.2rem;
    padding: 0.45rem 0.35rem calc(0.45rem + env(safe-area-inset-bottom));
}

.app-bottom-link {
    text-decoration: none;
    color: #6b7280;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.22rem;
    padding: 0.28rem 0.2rem 0.34rem;
    border-radius: 0.65rem;
    transition: color 0.18s ease, background-color 0.18s ease;
    flex: 1 1 0;
    min-width: 0;
    min-height: 3.55rem;
}

.app-bottom-link[data-tab-id="sales"] {
    order: 1;
}

.app-bottom-link[data-tab-id="products"] {
    order: 2;
}

.app-bottom-link[data-tab-id="club"] {
    order: 3;
}

.app-bottom-link[data-tab-id="ai"],
.app-bottom-link[data-tab-id="smart_seller"] {
    order: 4;
}

.app-bottom-link[data-tab-id="store"] {
    order: 5;
}

.app-bottom-link:hover {
    color: #111827;
    background: #eef2f7;
}

.app-bottom-link.active {
    color: #111827;
    font-weight: 700;
}

.app-bottom-link.locked {
    color: #9ca3af;
    opacity: 0.68;
    cursor: pointer;
}

.app-bottom-lock-badge {
    position: absolute;
    top: -0.18rem;
    inset-inline-end: -0.15rem;
    width: 0.82rem;
    height: 0.82rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #fff;
}

.app-bottom-lock-badge svg {
    width: 0.5rem;
    height: 0.5rem;
}

.app-bottom-icon {
    width: 1.4rem;
    height: 1.4rem;
    display: inline-flex;
    position: relative;
}

.app-bottom-icon svg {
    width: 100%;
    height: 100%;
}

.app-bottom-badge {
    position: absolute;
    top: -0.42rem;
    left: -0.55rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    border: 2px solid #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 0.88rem;
    text-align: center;
}

.app-bottom-text {
    font-size: 0.68rem;
    line-height: 1.05;
    white-space: normal;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-wrap: balance;
    max-width: 100%;
    min-height: calc(2 * 1.05em);
}

.vstore-drawer.offcanvas-end {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

.vstore-drawer.offcanvas-end.show,
.vstore-drawer.offcanvas-end.showing {
    transform: none;
}

.drawer-links .nav-link {
    color: #e2e8f0;
    padding: 0.5rem 0.25rem;
}

.drawer-links .nav-link:hover {
    color: #ffffff;
}

.has-app-bottom-nav main {
    padding-bottom: 5.8rem !important;
}

.app-sticky-submit-bar[hidden] {
    display: none !important;
}

.app-sticky-submit-bar {
    display: none;
}

@media (max-width: 991.98px) {
    body.has-sticky-submit-bar > main.container {
        padding-bottom: calc(
            var(--app-bottom-nav-space) +
            var(--sticky-submit-bar-space) +
            env(safe-area-inset-bottom) +
            var(--sticky-submit-bar-gap)
        ) !important;
    }

    body.has-sticky-submit-bar .app-sticky-submit-form {
        scroll-padding-bottom: calc(
            var(--app-bottom-nav-space) +
            var(--sticky-submit-bar-space) +
            env(safe-area-inset-bottom) +
            var(--sticky-submit-bar-gap)
        );
        padding-bottom: calc(
            var(--sticky-submit-bar-space) +
            env(safe-area-inset-bottom) +
            var(--sticky-submit-bar-gap)
        );
    }

    body.has-sticky-submit-bar .app-sticky-submit-source {
        display: none !important;
    }

    .app-sticky-submit-bar {
        display: block;
        position: fixed;
        inset-inline: 0;
        bottom: calc(var(--app-bottom-nav-space) + env(safe-area-inset-bottom));
        z-index: 1035;
        padding: 0.65rem 0.75rem;
        pointer-events: none;
    }

    .app-sticky-submit-bar-inner {
        max-width: 760px;
        margin: 0 auto;
        background: rgba(248, 250, 252, 0.96);
        border: 1px solid #dbe1ea;
        border-radius: 14px;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
        padding: 0.65rem;
        pointer-events: auto;
        backdrop-filter: blur(8px);
    }

    .app-sticky-submit-bar .btn {
        width: 100%;
        min-height: 2.85rem;
    }
}

.drawer-seller-card {
    padding: 0.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.drawer-seller-card .seller-header-text h6 {
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.drawer-seller-card .seller-header-text .small {
    color: #cbd5e1;
}

.seller-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: nowrap;
}

.seller-avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex: 0 0 auto;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.seller-profile-preview {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    flex: 0 0 auto;
}

.seller-header-text {
    flex: 1;
    min-width: 0;
}

#id_barcode_value::placeholder {
    font-size: 0.8rem;
}

#productSearch::placeholder {
    font-size: 0.78rem;
}

#storeAddSearch::placeholder {
    font-size: 0.78rem;
}

input[name="customer_q"]::placeholder {
    font-size: 0.78rem;
}

.money-words-hint {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.5;
}

/* Smaller helper/error texts shown below form fields across the app */
form .form-text,
form .text-danger.small,
form .small.text-secondary.mt-1,
form .small.text-secondary.mt-2 {
    font-size: 0.72rem !important;
    line-height: 1.35;
}

form .form-label {
    font-size: 0.82rem;
    margin-bottom: 0.32rem;
}

.hero-card,
.auth-card,
.panel-card {
    background: var(--vstore-card);
    border-radius: 18px;
    box-shadow: var(--vstore-shadow);
}

.auth-card {
    max-width: 420px;
}

.h2-md {
    font-size: 1.55rem;
}

/* Global heading standard inside cards */
.panel-card :is(h1, h2, h3, h4, h5, h6) {
    font-size: 1rem !important;
}

/* Global data text size for tables and form content */
table.table :is(th, td) {
    font-size: 0.80rem !important;
}

form :is(input, select, textarea, .form-control, .form-select, .form-check-label) {
    font-size: 0.80rem !important;
}

@media (max-width: 991.98px) {
    form :is(input, select, textarea, .form-control, .form-select) {
        font-size: 16px !important;
    }
}

@media (min-width: 768px) {
    .h2-md {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .seller-avatar,
    .seller-profile-preview {
        width: 62px;
        height: 62px;
    }

    .seller-avatar {
        font-size: 1.3rem;
    }
}

.inventory-product-name,
.inventory-product-category,
.inventory-code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-product-name {
    font-size: 0.82rem;
}

/* Adjust font size for the specific section user pointed to */
body > main > div:nth-child(3) > div:nth-child(1) > section {
    font-size: 0.80rem !important;
}

.dashboard-product-list .list-group-item,
.dashboard-product-list .fw-semibold,
.dashboard-product-list strong {
    font-size: 0.80rem !important;
}

.dashboard-product-list .small.text-secondary {
    font-size: 0.72rem !important;
}

/* Dashboard first row, 4th card (cashflow) font size normalization */
body > main > div:nth-child(1) > div:nth-child(4) > section,
body > main > div:nth-child(1) > div:nth-child(4) > section .small,
body > main > div:nth-child(1) > div:nth-child(4) > section strong {
    font-size: 0.80rem !important;
}

/* Dashboard first row, 3rd card font size normalization */
body > main > div:nth-child(1) > div:nth-child(3) > section,
body > main > div:nth-child(1) > div:nth-child(3) > section .small,
body > main > div:nth-child(1) > div:nth-child(3) > section .h6,
body > main > div:nth-child(1) > div:nth-child(3) > section strong {
    font-size: 0.80rem !important;
}

.inventory-code {
    font-size: 0.68rem;
}

.inventory-purchase-price {
    font-size: 0.78rem;
}

.inventory-price-buy,
.inventory-price-sell {
    font-size: 0.76rem;
    line-height: 1.25;
}

.inventory-actions .inventory-action-btn {
    min-width: 74px;
}

.inventory-table thead th {
    font-size: 0.82rem;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .inventory-actions form,
    .inventory-actions .inventory-action-btn {
        width: 100%;
    }
}

@media (min-width: 768px) {
    .inventory-table {
        table-layout: fixed;
    }

    .inventory-col-code {
        width: 22%;
    }

    .inventory-col-name {
        width: 34%;
    }

    .inventory-col-qty {
        width: 10%;
    }

    .inventory-col-price {
        width: 16%;
    }

    .inventory-col-actions {
        width: 18%;
    }
}

.supply-chat-page {
    max-width: 860px;
    margin-inline: auto;
    overflow: hidden;
    background: #f6f8fb;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

body:has(.supply-chat-page) {
    overflow: hidden;
}

body:has(.supply-chat-page) > main.container {
    height: calc(100dvh - var(--vstore-nav-height));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

body.has-app-bottom-nav:has(.supply-chat-page) > main.container {
    height: calc(100dvh - var(--vstore-nav-height) - 6rem);
}

body:has(.supply-chat-page) > main.container > .mb-3 {
    flex: 0 0 auto;
}

body:has(.supply-chat-page) > main.container > .supply-chat-page {
    flex: 1 1 auto;
}

.supply-offer-row {
    cursor: pointer;
}

.supply-offer-row:hover > * {
    background-color: #f8fafc;
}

.supply-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #dbe4f0;
    background: #ffffff;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

.supply-chat-peer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.supply-chat-peer-link {
    color: inherit;
    text-decoration: none;
    width: 100%;
}

.supply-chat-peer-link:hover {
    color: inherit;
}

.supply-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #ffffff;
    background: #2563eb;
    font-weight: 700;
    overflow: hidden;
}

.supply-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.supply-chat-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.supply-chat-subtitle,
.supply-chat-product {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.supply-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.supply-chat-decision {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.supply-chat-offer-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #dbe4f0;
    background: #f8fafc;
    flex: 0 0 auto;
}

.supply-chat-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
    background:
        linear-gradient(rgba(246, 248, 251, 0.9), rgba(246, 248, 251, 0.9)),
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.08), transparent 24%),
        radial-gradient(circle at 80% 10%, rgba(34, 197, 94, 0.08), transparent 22%);
}

#supplyChatMessages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.supply-chat-message {
    max-width: min(78%, 620px);
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 0.7rem 0.8rem;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.supply-chat-message.incoming {
    align-self: flex-start;
    border-bottom-right-radius: 14px;
    border-bottom-left-radius: 4px;
    background: #ffffff;
}

.supply-chat-message.outgoing {
    align-self: flex-end;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 4px;
    background: #dcf8c6;
    border-color: #b7e8a6;
}

.supply-chat-offer-message {
    max-width: min(84%, 680px);
}

.supply-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    color: #64748b;
}

.supply-chat-body {
    font-size: 0.86rem;
    line-height: 1.9;
    color: #1f2937;
}

.supply-offer-summary-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.supply-offer-summary-grid {
    display: grid;
    grid-template-columns: minmax(110px, auto) 1fr;
    gap: 0.35rem 0.75rem;
    font-size: 0.82rem;
}

.supply-offer-summary-grid span {
    color: #64748b;
}

.supply-chat-image {
    display: block;
    max-width: 260px;
    max-height: 260px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #dbe4f0;
}

.supply-file-card {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    max-width: 280px;
    padding: 0.6rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.68);
    text-decoration: none;
}

.supply-file-card:hover {
    color: #0f172a;
    background: #ffffff;
}

.supply-file-icon {
    min-width: 42px;
    min-height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #475569;
    font-size: 0.72rem;
}

.supply-file-card strong,
.supply-file-card small {
    display: block;
}

.supply-file-card small {
    color: #64748b;
}

.supply-chat-composer {
    display: block;
    padding: 0.85rem 1rem;
    border-top: 1px solid #dbe4f0;
    background: #ffffff;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

.supply-composer-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.supply-chat-inputs {
    min-width: 0;
}

.supply-chat-inputs textarea,
.supply-chat-inputs input[type="text"] {
    min-height: 48px;
    max-height: 120px;
    resize: vertical;
    border-radius: 20px;
    padding: 0.65rem 0.9rem;
}

.supply-file-picker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    border: 1px solid #dbe4f0;
    border-radius: 50%;
    color: #475569;
    background: #f8fafc;
    font-size: 0.72rem;
    cursor: pointer;
    white-space: nowrap;
}

.supply-file-picker input[type="file"] {
    display: none;
}

.supply-send-button {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #2563eb;
    font-weight: 700;
    font-size: 0.75rem;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.supply-send-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.supply-send-button:active {
    transform: translateY(0);
}

.supply-send-button:disabled,
.supply-send-button.is-sending {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.supply-chat-errors {
    display: grid;
    gap: 0.25rem;
    margin-top: 0.45rem;
    color: #dc2626;
    font-size: 0.78rem;
}

.supply-contact-card {
    max-width: 760px;
    margin-inline: auto;
}

.supply-contact-hero {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.supply-contact-avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex: 0 0 auto;
}

.supply-contact-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.5rem;
}

.supply-contact-grid {
    display: grid;
    gap: 0.75rem;
}

.supply-contact-grid > div {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.supply-contact-grid span {
    color: #64748b;
    font-size: 0.78rem;
}

.supply-contact-grid strong {
    color: #111827;
    font-size: 0.88rem;
    line-height: 1.8;
    white-space: pre-line;
}

@media (max-width: 767.98px) {
    .supply-chat-header,
    .supply-chat-composer {
        padding-inline: 0.75rem;
    }

    .supply-chat-header {
        align-items: center;
    }

    .supply-chat-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .supply-chat-offer-bar {
        grid-template-columns: 1fr;
        align-items: start;
        padding-inline: 0.75rem;
    }

    .supply-chat-thread {
        padding: 0.75rem;
    }

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

    body:has(.supply-chat-page) > main.container {
        height: calc(100dvh - var(--vstore-nav-height));
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
    }

    body.has-app-bottom-nav:has(.supply-chat-page) > main.container {
        height: calc(100dvh - var(--vstore-nav-height) - 5.75rem);
    }

    .supply-chat-message {
        max-width: 92%;
    }

    .supply-composer-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.45rem;
        align-items: center;
    }

    .supply-file-picker {
        width: 44px;
        height: 44px;
        font-size: 0.68rem;
    }

    .supply-send-button {
        width: 44px;
        height: 44px;
        font-size: 0.7rem;
    }
}

.wholesale-shortage-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #dbe4f0;
    background: #f8fafc;
}

.wholesale-image-frame {
    width: 52px;
    height: 52px;
    margin-inline-start: auto;
    border-radius: 10px;
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wholesale-image-frame .wholesale-shortage-thumb {
    display: block;
    opacity: 0;
    transition: opacity 0.15s ease;
    border: 0;
    border-radius: 0;
}

.wholesale-image-state {
    padding: 0 0.25rem;
    color: #64748b;
    font-size: 0.62rem;
    line-height: 1.25;
    text-align: center;
}

.wholesale-shortage-thumb.placeholder-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 700;
}

.wholesale-shortage-list {
    background: #f7f7f7;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.wholesale-shortage-item {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #222;
    text-decoration: none;
    direction: ltr;
    background: #fff;
}

.wholesale-shortage-item:last-child {
    border-bottom: 0;
}

.wholesale-shortage-item:hover {
    background: #f8fafc;
}

.wholesale-shortage-media {
    position: relative;
    width: 112px;
    height: 112px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #dbe4f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wholesale-shortage-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.wholesale-shortage-body {
    direction: rtl;
    text-align: right;
    min-width: 0;
}

.wholesale-shortage-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.55;
    margin: 0 0 6px;
    color: #111827;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wholesale-shortage-meta,
.wholesale-shortage-shop {
    font-size: 0.8rem;
    line-height: 1.65;
}

.wholesale-shortage-meta {
    color: #64748b;
}

.wholesale-shortage-shop {
    color: #0f172a;
    font-weight: 700;
    font-size: 0.58rem;
    margin-top: 2px;
}

.wholesale-shop-address {
    display: block;
    color: #64748b;
    font-weight: 500;
    font-size: 0.58rem;
    line-height: 1.55;
    margin-top: 1px;
}

.wholesale-shortage-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    margin-top: 5px;
    flex-wrap: wrap;
}

.wholesale-city-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.5;
}

.supply-offer-row {
    cursor: pointer;
}

.supply-offer-row-unread > td {
    background: #ecfdf5 !important;
    border-color: #bbf7d0 !important;
}

.supply-offer-row-unread .fw-semibold::before {
    content: "";
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-left: 0.35rem;
    border-radius: 999px;
    background: #16a34a;
    vertical-align: middle;
}

@media (max-width: 575.98px) {
    .wholesale-shortage-item {
        grid-template-columns: 96px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .wholesale-shortage-media {
        width: 96px;
        height: 96px;
    }
}

.wholesale-detail-gallery {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.wholesale-detail-image {
    width: 100%;
    max-height: 520px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.placeholder-detail-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 3rem;
    font-weight: 800;
}

@media (min-width: 992px) {
    .wholesale-detail-image {
        aspect-ratio: 16 / 9;
    }
}

/* RTL alignment for bootstrap-select generated controls. */
.bootstrap-select,
.bootstrap-select > .dropdown-toggle {
    width: 100% !important;
}

.bootstrap-select > .dropdown-toggle {
    direction: rtl;
    text-align: right;
    min-height: calc(1.5em + 0.75rem + 2px);
}

.bootstrap-select .filter-option {
    direction: rtl;
    text-align: right !important;
}

.bootstrap-select .filter-option-inner,
.bootstrap-select .filter-option-inner-inner {
    direction: rtl;
    text-align: right !important;
    width: 100%;
}

.bootstrap-select .filter-option-inner-inner {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bootstrap-select .dropdown-menu,
.bootstrap-select .dropdown-menu .dropdown-item {
    direction: rtl;
    text-align: right;
}

.bootstrap-select .dropdown-menu {
    max-width: 100%;
}

.bootstrap-select .dropdown-menu .dropdown-item .text {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.bootstrap-select .bs-searchbox input {
    direction: rtl;
    text-align: right;
}
