:root {
    --navy: var(--tj-brand);
    --navy-700: var(--tj-brand-hover);
    --blue: var(--tj-brand);
    --blue-500: var(--tj-brand);
    --blue-100: var(--tj-surface-muted);
    --sky: var(--tj-background);
    --gold: #f5a623;
    --teal: #12a594;
    --green: var(--tj-color-success);
    --ink: var(--tj-text-primary);
    --muted: var(--tj-text-muted);
    --line: var(--tj-border);
    --white: var(--tj-surface);
    --radius: var(--tj-r-lg);
    --radius-sm: var(--tj-r-sm);
    --shadow-sm: var(--tj-shadow-1);
    --shadow: var(--tj-shadow-2);
    --shadow-lg: 0 20px 50px rgba(11, 61, 145, .18);
    --container: 1440px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    color: var(--ink);
    background: var(--sky);
    font-size: 16px;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.5; }
:is(h1, h2, h3, h4, h5, h6)[tabindex="-1"]:focus { outline: none; }
img { max-width: 100%; display: block; }

/* Marketplace-density container: wide on desktop (up to 1440px, using the
   full width beyond that), narrows its side gutter down at each breakpoint
   instead of clamping to a small fixed width like a dashboard/admin panel. */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--tj-space-8);
}
@media (max-width: 1100px) { .container { padding-inline: var(--tj-space-6); } }
@media (max-width: 640px) { .container { padding-inline: var(--tj-space-4); } }

.section { padding-block: 64px; }
@media (max-width: 768px) { .section { padding-block: 40px; } }

/* ===== Banner carousel (full viewport width, Digikala-style) ===== */
.banner-carousel-section { width: 100%; }
.banner-carousel { position: relative; width: 100%; overflow: hidden; background: var(--sky); }
.banner-carousel__track { position: relative; width: 100%; aspect-ratio: 10 / 3; max-height: 420px; }
.banner-carousel__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.banner-carousel__slide.is-active { opacity: 1; z-index: 1; }
.banner-carousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.banner-carousel__arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(16, 35, 63, .45); color: var(--tj-on-brand); font-size: 1.4rem; line-height: 1;
    display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.banner-carousel__arrow:hover { background: rgba(16, 35, 63, .7); }
.banner-carousel__arrow--prev { inset-inline-start: 16px; }
.banner-carousel__arrow--next { inset-inline-end: 16px; }
.banner-carousel__dots { position: absolute; bottom: 14px; inset-inline-start: 0; inset-inline-end: 0; z-index: 2; display: flex; justify-content: center; gap: var(--tj-space-2); }
.banner-carousel__dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; transition: width .2s, background .2s; }
.banner-carousel__dot.is-active { width: 24px; border-radius: 5px; background: var(--tj-surface); }
@media (max-width: 720px) {
    .banner-carousel__track { aspect-ratio: 4 / 3; }
    .banner-carousel__arrow { width: 32px; height: 32px; font-size: 1.1rem; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--tj-space-2);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: .95rem;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 14px 30px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--navy); color: var(--tj-on-brand); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--navy-700); box-shadow: var(--shadow); }
.btn--gold { background: var(--gold); color: #3a2600; }
.btn--gold:hover { filter: brightness(1.05); }
.btn--outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn--outline:hover { background: var(--blue-100); }
.btn--ghost { background: var(--blue-100); color: var(--navy); }
.btn--ghost:hover { background: #d9e6ff; }
.btn--ghost-light { background: rgba(255,255,255,.15); color: var(--tj-on-brand); border: 1.5px solid rgba(255,255,255,.5); }
.btn--ghost-light:hover { background: rgba(255,255,255,.25); }
.btn--icon { position: relative; background: var(--blue-100); color: var(--navy); width: 46px; height: 46px; padding: 0; font-size: 1.2rem; border-radius: var(--tj-r-control); }
.btn__badge {
    position: absolute; top: -6px; left: -6px;
    background: var(--gold); color: #3a2600;
    font-size: .7rem; font-weight: 800;
    min-width: 20px; height: 20px; border-radius: var(--tj-r-pill);
    display: grid; place-items: center; padding: 0 5px;
}

/* ===== Header ===== */
.site-header { background: var(--tj-surface); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 50; }
.topbar { background: var(--navy); color: #dbe6ff; font-size: .82rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: 38px; }

.header__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__logo { height: 52px; width: auto; object-fit: contain; }
.brand__mark {
    width: 44px; height: 44px; border-radius: var(--tj-r-control);
    background: linear-gradient(135deg, var(--navy), var(--blue-500));
    color: var(--tj-on-brand); font-weight: 800; font-size: 1.4rem;
    display: grid; place-items: center;
}
.brand__name { font-weight: 800; font-size: 1.5rem; color: var(--navy); }

.search { flex: 1; display: flex; background: var(--sky); border: 1.5px solid var(--line); border-radius: var(--tj-r-control); overflow: hidden; }
.search__input { flex: 1; border: none; background: transparent; padding: 12px 16px; font-family: inherit; font-size: .95rem; outline: none; color: var(--ink); }
.search__btn { border: none; background: var(--navy); color: var(--tj-on-brand); padding: 0 24px; font-family: inherit; font-weight: 700; cursor: pointer; }
.search__btn:hover { background: var(--navy-700); }

.header__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn__icon { font-size: 1.1rem; }

/* Digikala-style profile shortcut */
.usermenu { position: relative; }
.usermenu__toggle { display: inline-flex; align-items: center; gap: var(--tj-space-2); }
.usermenu__avatar {
    width: 26px; height: 26px; border-radius: var(--tj-r-pill);
    background: var(--tj-surface); display: grid; place-items: center; font-size: 1rem;
}
.usermenu__avatar--lg { width: 42px; height: 42px; font-size: 1.4rem; background: var(--blue-100); }
.usermenu__caret { font-size: .7rem; opacity: .7; }
.usermenu__panel {
    position: absolute; top: calc(100% + 10px); left: 0;
    width: 240px; background: var(--tj-surface); border: 1px solid var(--line);
    border-radius: var(--tj-r-md); box-shadow: var(--shadow); padding: var(--tj-space-3);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 60;
}
.usermenu:hover .usermenu__panel,
.usermenu:focus-within .usermenu__panel { opacity: 1; visibility: visible; transform: translateY(0); }
.usermenu__head { display: flex; align-items: center; gap: 10px; padding: 6px 6px 12px; border-bottom: 1px solid var(--line); }
.usermenu__name { display: block; font-size: .95rem; color: var(--ink); }
.usermenu__phone { display: block; font-size: .8rem; color: var(--muted); }
.usermenu__links { display: flex; flex-direction: column; padding-top: var(--tj-space-2); }
.usermenu__links a,
.usermenu__links button {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 8px; border-radius: var(--tj-r-sm);
    font-family: inherit; font-size: .9rem; font-weight: 600; color: var(--ink);
    background: none; border: none; cursor: pointer; text-align:start; width: 100%;
}
.usermenu__links a:hover,
.usermenu__links button:hover { background: var(--blue-100); color: var(--navy); }
.usermenu__links button { color: #c0392b; margin-top: var(--tj-space-1); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }

.mainnav { border-top: 1px solid var(--line); }
.mainnav__inner { display: flex; align-items: center; gap: var(--tj-space-6); height: 50px; }
.mainnav__all { background: var(--blue-100); color: var(--navy); border: none; font-family: inherit; font-weight: 700; padding: 8px 16px; border-radius: var(--tj-r-sm); cursor: pointer; }
.mainnav__list { display: flex; gap: var(--tj-space-6); font-size: .92rem; font-weight: 600; color: var(--muted); }
.mainnav__list a:hover { color: var(--navy); }

/* ===== Mega-menu (همه دسته‌بندی‌ها) ===== */
.megamenu { position: relative; }
.megamenu__panel {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
    display: flex; width: 760px; max-width: 92vw; min-height: 340px;
    background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--tj-r-md);
    box-shadow: 0 20px 50px rgba(9,30,66,.18); overflow: hidden;
}
.megamenu__cats { width: 250px; border-inline-start: 1px solid var(--line); background: #fafbff; padding: 8px 0; overflow-y: auto; max-height: 420px; }
.megamenu__cats li { list-style: none; }
.megamenu__cats li a { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--ink); font-weight: 600; font-size: .9rem; }
.megamenu__cats li.is-active { background: var(--tj-surface); }
.megamenu__cats li.is-active a { color: var(--blue); }
.megamenu__ico { font-size: 1.1rem; }
.megamenu__arrow { margin-inline-start: auto; color: var(--muted); }
.megamenu__flyout { flex: 1; padding: 18px 22px; }
.megamenu__flyhead { display: flex; align-items: baseline; gap: 10px; font-size: 1.05rem; font-weight: 800; color: var(--navy); margin-bottom: 14px; }
.megamenu__flyhead small { font-size: .78rem; font-weight: 600; color: var(--blue); }
.megamenu__subs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; }
.megamenu__subs a { color: var(--muted); font-size: .9rem; padding: 5px 0; }
.megamenu__subs a:hover { color: var(--blue); }
.megamenu__empty { color: var(--muted); font-size: .85rem; }
@media (max-width: 820px) { .megamenu__panel { width: 92vw; flex-direction: column; min-height: 0; } .megamenu__cats { width: 100%; max-height: 180px; } }

/* ===== Hero ===== */
.hero {
    background:
        radial-gradient(1000px 500px at 90% -10%, rgba(47,111,237,.35), transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-700) 55%, #072559 100%);
    color: var(--tj-on-brand);
    overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-block: 64px; }
.hero__eyebrow { display: inline-block; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); padding: 6px 14px; border-radius: var(--tj-r-pill); font-size: .85rem; font-weight: 600; }
.hero__title { font-size: 2.9rem; font-weight: 800; margin-top: 18px; letter-spacing: -.5px; }
.hero__title:focus, .hero__title:focus-visible { outline: none; }
.hero__lead { color: #cfe0ff; font-size: 1.08rem; margin-top: var(--tj-space-4); max-width: 520px; }
.hero__actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero__actions .btn--outline { color: var(--tj-on-brand); border-color: rgba(255,255,255,.6); }
.hero__actions .btn--outline:hover { background: rgba(255,255,255,.12); }
.hero__stats { display: flex; gap: var(--tj-space-8); margin-top: 36px; flex-wrap: wrap; }
.hero__stat { display: flex; flex-direction: column; }
.hero__stat strong { font-size: 1.5rem; font-weight: 800; }
.hero__stat span { color: #b9ccf5; font-size: .85rem; }

.hero__card { display: flex; justify-content: center; }
.paycard {
    width: 100%; max-width: 360px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(8px);
    border-radius: var(--tj-r-lg); padding: var(--tj-space-6); color: var(--tj-on-brand);
    box-shadow: var(--shadow-lg);
}
.paycard__top { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; color: #cfe0ff; }
.paycard__chip { width: 40px; height: 40px; border-radius: var(--tj-r-sm); background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 1.2rem; }
.paycard__amount { font-size: 2rem; font-weight: 800; margin: 18px 0; }
.paycard__amount small { font-size: .95rem; font-weight: 500; color: #cfe0ff; }
.paycard__row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px dashed rgba(255,255,255,.2); font-size: .9rem; color: #dbe6ff; }
.paycard__status { color: #8ff0c8; font-weight: 700; }
.paycard__bar { height: 8px; border-radius: var(--tj-r-pill); background: rgba(255,255,255,.18); margin: 14px 0 10px; overflow: hidden; }
.paycard__bar span { display: block; height: 100%; width: 65%; background: linear-gradient(90deg, var(--gold), #ffcf6b); }
.paycard__foot { font-size: .8rem; color: #b9ccf5; }

/* ===== Trust strip ===== */
.trust {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--tj-space-4);
    background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; margin-top: -36px; position: relative; z-index: 2; box-shadow: var(--shadow);
}
.trust__item { display: flex; align-items: center; gap: var(--tj-space-3); }
.trust__item:not(:last-child) { border-inline-end: 1px solid var(--line); }
.trust__icon { font-size: 1.8rem; }
.trust__title { display: block; font-size: .98rem; }
.trust__desc { display: block; color: var(--muted); font-size: .82rem; }

/* ===== Section head ===== */
.section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.section__head--center { flex-direction: column; text-align: center; gap: 6px; }
.section__title { font-size: 2.1rem; font-weight: 800; color: var(--ink); position: relative; padding-inline-start: var(--tj-space-4); }
.section__title::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%); width: 5px; height: 28px; border-radius: 4px; background: linear-gradient(var(--navy), var(--blue-500)); }
.section__head--center .section__title { padding-inline-start: 0; }
.section__head--center .section__title::before { display: none; }
.section__link { color: var(--blue); font-weight: 700; font-size: .95rem; }
.section__sub { color: var(--muted); font-size: 1.05rem; }

/* ===== Categories ===== */
.cats { display: grid; grid-template-columns: repeat(8, 1fr); gap: 20px; }
.cat {
    background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 14px; min-height: 168px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; transition: transform .15s ease, box-shadow .2s ease, border-color .2s;
}
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-100); }
.cat__icon { font-size: 2.4rem; display: block; }
.cat__title { display: block; font-weight: 700; margin-top: var(--tj-space-3); }
.cat__count { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* ===== Products ===== */
.products { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--tj-space-6); }
.product { background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .2s ease; }
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product__media { position: relative; height: 190px; background: linear-gradient(135deg, var(--blue-100), var(--sky)); display: grid; place-items: center; overflow: hidden; }
.product__emoji { font-size: 4rem; transition: transform .25s ease; }
.product:hover .product__emoji { transform: scale(1.08); }
.product__badge { position: absolute; top: 12px; inset-inline-end: 12px; background: var(--navy); color: var(--tj-on-brand); font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: var(--tj-r-pill); }
.product__body { padding: 14px; display: flex; flex-direction: column; gap: var(--tj-space-2); flex: 1; }
.product__title { display: block; font-size: .98rem; font-weight: 700; line-height: 1.6; min-height: 3.2em; color: var(--ink); text-decoration: none; }
.product__title:hover { color: var(--blue); }
.product__media { text-decoration: none; }
.product__seller { color: var(--muted); font-size: .82rem; }
.product__rating { display: flex; align-items: center; gap: 5px; font-size: .85rem; font-weight: 700; }
.product__stars { color: var(--gold); }
.product__reviews { color: var(--muted); font-weight: 500; }
.product__installment { align-self: flex-start; background: var(--tj-success-surface); color: var(--green); font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: var(--tj-r-pill); }
.product__price { margin-top: auto; }
.product__old { color: var(--muted); text-decoration: line-through; font-size: .8rem; margin-inline-end: var(--tj-space-2); }
.product__now { font-weight: 800; font-size: 1.15rem; color: var(--navy); }
.product__now small { font-size: .78rem; font-weight: 500; color: var(--muted); }

/* ===== Market stats strip (marketplace scale, not feature badges - see
   .trust above for that) - large numbers, horizontal, no card chrome. ===== */
.marketstats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--tj-space-4);
    background: linear-gradient(120deg, var(--navy), var(--navy-700));
    border-radius: var(--radius); padding: 36px 28px; color: var(--tj-on-brand);
}
.marketstat { text-align: center; padding-inline: var(--tj-space-2); position: relative; }
.marketstat:not(:last-child)::after {
    content: ""; position: absolute; inset-inline-end: -8px; top: 10%; bottom: 10%; width: 1px; background: rgba(255,255,255,.18);
}
.marketstat strong { display: block; font-size: 2.4rem; font-weight: 800; }
.marketstat span { display: block; margin-top: 6px; color: #b9ccf5; font-size: .95rem; }

/* ===== Suppliers / featured shops grid ===== */
.suppliers { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--tj-space-6); }
.supplier {
    background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: var(--tj-space-6); display: flex; flex-direction: column; gap: 14px; min-height: 300px;
    transition: transform .15s ease, box-shadow .2s ease;
}
.supplier:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.supplier__head { display: flex; align-items: center; gap: 14px; }
.supplier__icon { width: 56px; height: 56px; border-radius: var(--tj-r-md); background: var(--blue-100); display: grid; place-items: center; font-size: 1.8rem; flex-shrink: 0; }
.supplier__name { font-weight: 800; font-size: 1.08rem; display: flex; align-items: center; gap: 6px; }
.supplier__verified { color: var(--teal); font-size: .95rem; }
.supplier__category { color: var(--muted); font-size: .85rem; }
.supplier__desc { color: var(--muted); font-size: .88rem; line-height: 1.7; flex: 1; }
.supplier__meta { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: var(--tj-space-3); }
.supplier__rating { color: var(--gold); font-weight: 700; }
.supplier__cta { margin-top: auto; }

/* ===== Procurement CTA banner (static promotional section - no backend) ===== */
.procurement {
    background: radial-gradient(900px 400px at 15% 0%, rgba(245,166,35,.18), transparent 60%), linear-gradient(135deg, #0d2c66, var(--navy));
    border-radius: 22px; padding: var(--tj-space-12); color: var(--tj-on-brand);
    display: grid; grid-template-columns: 1.3fr .7fr; gap: var(--tj-space-8); align-items: center;
}
.procurement__title { font-size: 1.9rem; font-weight: 800; }
.procurement__desc { color: #cfe0ff; margin-top: var(--tj-space-3); font-size: 1.02rem; line-height: 1.9; max-width: 560px; }
.procurement__actions { margin-top: var(--tj-space-6); }
.procurement__panel { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; padding: 20px; backdrop-filter: blur(6px); }
.procurement__row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.18); font-size: .9rem; color: #dbe6ff; }
.procurement__row:last-child { border-bottom: 0; }
@media (max-width: 992px) { .procurement { grid-template-columns: 1fr; } }

/* ===== Services ===== */
.services { background: linear-gradient(180deg, #fff, var(--sky)); padding-block: 56px; margin-top: 20px; }
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 30px; }
.service { background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px; text-align: center; position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .2s ease; }
.service:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.service::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 5px; }
.service--primary::before { background: var(--navy); }
.service--gold::before { background: var(--gold); }
.service--teal::before { background: var(--teal); }
.service__icon { font-size: 2.6rem; display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: var(--tj-r-lg); background: var(--blue-100); }
.service--gold .service__icon { background: #fdf0d8; }
.service--teal .service__icon { background: #d9f4f0; }
.service__title { font-size: 1.25rem; font-weight: 800; margin: 16px 0 8px; }
.service__desc { color: var(--muted); }
.service__link { display: inline-block; margin-top: 14px; color: var(--blue); font-weight: 700; }

/* ===== Onboarding ===== */
.onboard { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; background: var(--tj-surface); border: 1px solid var(--line); border-radius: 22px; padding: 40px; box-shadow: var(--shadow-sm); }
.onboard__intro .hero__eyebrow { background: var(--blue-100); color: var(--navy); border-color: transparent; }
.onboard__intro .section__title { margin: 16px 0 10px; }
.onboard__steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--tj-space-4); }
.step { background: var(--sky); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; }
.step__num { position: absolute; top: 16px; inset-inline-end: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--tj-on-brand); font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
.step__icon { font-size: 1.9rem; }
.step__title { display: block; font-weight: 800; margin: 8px 0 4px; }
.step__desc { color: var(--muted); font-size: .88rem; }

/* ===== CTA ===== */
.cta { background: radial-gradient(800px 300px at 10% 0%, rgba(47,111,237,.4), transparent 60%), linear-gradient(135deg, var(--navy), #072559); color: var(--tj-on-brand); border-radius: 24px; padding: 50px; text-align: center; box-shadow: var(--shadow-lg); }
.cta__title { font-size: 2rem; font-weight: 800; }
.cta__sub { color: #cfe0ff; margin-top: var(--tj-space-2); }
.cta__actions { display: flex; gap: 14px; justify-content: center; margin-top: var(--tj-space-6); flex-wrap: wrap; }

/* ===== Footer ===== */
.site-footer { background: #071d3d; color: #b9ccf5; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; padding-block: var(--tj-space-12); }
.brand--footer .brand__mark { background: var(--tj-surface); color: var(--navy); }
.brand--footer .brand__name { color: var(--tj-on-brand); }
.footer__about { margin-top: 14px; font-size: .9rem; line-height: 2; }
.footer__badges { display: flex; gap: 10px; margin-top: var(--tj-space-4); flex-wrap: wrap; }
.footer__badge { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); padding: 6px 12px; border-radius: var(--tj-r-sm); font-size: .8rem; }
.footer__title { color: var(--tj-on-brand); font-size: 1.05rem; margin-bottom: var(--tj-space-4); }
.footer__col ul { display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.footer__col a:hover { color: var(--tj-on-brand); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; padding-block: 18px; font-size: .82rem; flex-wrap: wrap; gap: var(--tj-space-2); }

/* ===== Auth / Register ===== */
.auth {
    max-width: 920px;
    margin: 48px auto;
    padding-inline: var(--tj-space-4);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    gap: var(--tj-space-6);
    align-items: stretch;
}
.auth__card { background: var(--tj-surface); border: 1px solid var(--line); border-radius: 22px; padding: 36px; box-shadow: var(--shadow); }
.auth__brand { display: inline-block; margin-bottom: 18px; }
.auth__brand img { height: 46px; }
.auth__title { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.auth__sub { color: var(--muted); margin: 8px 0 22px; }
.auth__label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: var(--tj-space-2); }
.auth__field { display: flex; align-items: center; background: var(--sky); border: 1.5px solid var(--line); border-radius: var(--tj-r-control); overflow: hidden; transition: border-color .2s; }
.auth__field:focus-within { border-color: var(--blue-500); }
.auth__field--error { border-color: #e05353; }
.auth__prefix { padding: 0 14px; color: var(--muted); font-weight: 700; border-inline-start: 1px solid var(--line); }
.auth__field[dir="ltr"] .auth__prefix { direction: ltr; unicode-bidi: isolate; border-inline-start: 0; border-right: 1px solid var(--line); padding: 0 16px; }
.auth__field[dir="ltr"] .auth__input { text-align: left; }
.auth__input { flex: 1; min-width: 0; width: 100%; border: none; background: transparent; padding: 14px 16px; font-family: inherit; font-size: 1.15rem; letter-spacing: 2px; outline: none; color: var(--ink); }
.auth__eye { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 48px; border: none; background: transparent; padding: 0 12px; min-width: 44px; min-height: 44px; align-self: stretch; cursor: pointer; color: var(--muted); user-select: none; }
.auth__eye svg { width: 22px; height: 22px; flex: none; pointer-events: none; }
.auth__eye:hover { color: var(--blue); background: #eaf0fb; }
.auth__eye:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; border-radius: var(--tj-r-sm); }
.auth__msg { display: block; font-size: .85rem; margin-top: var(--tj-space-2); }
.auth__msg--error { color: var(--tj-color-danger); }
.auth__card .btn--block { margin-top: 20px; }
.auth__terms { color: var(--muted); font-size: .8rem; margin-top: 18px; line-height: 2; }
.auth__terms a { color: var(--blue); font-weight: 600; }
.auth__mobile { font-weight: 800; color: var(--navy); }

.auth__otp { display: flex; justify-content: center; margin-bottom: 6px; }
.auth__otp-box { width: 100%; text-align: center; font-size: 1.8rem; letter-spacing: 14px; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--tj-r-control); background: var(--sky); font-family: inherit; outline: none; color: var(--ink); }
.auth__otp-box:focus { border-color: var(--blue-500); }
.auth__row { display: flex; justify-content: space-between; align-items: center; margin-top: var(--tj-space-4); }
.auth__resend, .auth__edit { display: inline-flex; align-items: center; min-height: 44px; background: none; border: none; font-family: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; padding: 0; }
.auth__resend { color: var(--blue); }
.auth__resend--wait { color: var(--muted); cursor: default; }
.auth__edit { color: var(--muted); }
.auth__success { text-align: center; }
.auth__success-icon { font-size: 3rem; display: block; margin-bottom: 10px; }

.auth__aside { min-width: 0; background: linear-gradient(145deg,var(--tj-surface-muted),var(--tj-background)); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; padding: var(--tj-space-8); display: flex; flex-direction: column; justify-content: center; }
.auth__aside-title { font-size: 1.35rem; line-height: 1.8; font-weight: 800; margin-bottom: 20px; }
.auth__benefits { display: flex; flex-direction: column; gap: 20px; font-size: .94rem; color: var(--tj-text); list-style: none; padding: 0; }
.auth__benefits li { display: flex; align-items: center; gap: var(--tj-space-3); line-height: 1.9; }
.auth__benefits svg { width: 26px; height: 26px; flex: 0 0 26px; color: var(--tj-blue-700); }

@media (max-width: 768px) {
    .auth { grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
    .auth__aside { display: none; }
    .auth__card { padding: 22px; min-width: 0; }
    .auth__input { font-size: 16px; }
    .auth__row { flex-wrap: wrap; gap: var(--tj-space-3); }
}

/* ===== Loading ===== */
.app-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 20px; }
.app-loading__logo { font-size: 2rem; font-weight: 800; color: var(--navy); }
.loading-progress { position: relative; display: block; width: 8rem; height: 8rem; }
.loading-progress circle { fill: none; stroke: #e0e9f8; stroke-width: .5rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child { stroke: var(--navy); stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; transition: stroke-dasharray .05s ease-in-out; }
.loading-progress-text { color: var(--muted); font-weight: 700; }
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "بارگذاری تجارام..."); }

#blazor-error-ui { background: #fff3cd; color: #664d03; bottom: 0; box-shadow: 0 -1px 8px rgba(0,0,0,.1); display: none; left: 0; padding: 12px 20px; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; left: 12px; top: 10px; }

/* ===== Responsive / mobile-first ===== */
@media (max-width: 1200px) {
    .cats { grid-template-columns: repeat(6, 1fr); }
    .products { grid-template-columns: repeat(4, 1fr); }
    .suppliers { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .hero__inner { grid-template-columns: 1fr; padding-block: 44px; }
    .hero__card { justify-content: flex-start; }
    .onboard { grid-template-columns: 1fr; padding: 28px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .cats { grid-template-columns: repeat(4, 1fr); }
    .products { grid-template-columns: repeat(3, 1fr); }
    .suppliers { grid-template-columns: repeat(2, 1fr); }
    .marketstats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    .header__inner { flex-wrap: wrap; gap: var(--tj-space-3); }
    .search { order: 3; flex-basis: 100%; }
    .topbar__item--hide-sm { display: none; }
    .mainnav__list { display: none; }
    .hero__title { font-size: 2.1rem; }
    .trust { grid-template-columns: 1fr 1fr; margin-top: 20px; }
    .trust__item:nth-child(2n) { border-inline-end: none; }
    .cats { grid-template-columns: repeat(3, 1fr); gap: var(--tj-space-3); }
    .products { grid-template-columns: 1fr 1fr; }
    .suppliers { grid-template-columns: 1fr 1fr; }
    .services__grid { grid-template-columns: 1fr; }
    .onboard__steps { grid-template-columns: 1fr; }
    .section__title { font-size: 1.5rem; }
    .cta { padding: 34px 20px; }
    .cta__title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .hero__stats { gap: 20px; }
    .hero__stat strong { font-size: 1.25rem; }
    .cats { grid-template-columns: repeat(2, 1fr); }
    .products { grid-template-columns: 1fr; }
    .suppliers { grid-template-columns: 1fr; }
    .marketstats { grid-template-columns: 1fr 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .brand__logo { height: 42px; }
}

/* ===== Breadcrumbs ===== */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--tj-space-2); align-items: center; font-size: .85rem; color: var(--muted); padding: 20px 0 4px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.crumbs__current { color: var(--ink); font-weight: 700; }

/* ===== Toast ===== */
.toast { position: fixed; inset-block-end: 24px; inset-inline-start: 24px; background: var(--ink); color: var(--tj-on-brand); padding: 14px 20px; border-radius: var(--tj-r-control); box-shadow: var(--shadow-lg); z-index: 60; font-size: .9rem; }
.toast a { color: #ffd98a; font-weight: 700; }

/* ===== Empty / states ===== */
.empty { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty__icon { font-size: 3.4rem; }

/* ===== Product detail (PDP) ===== */
.pdp { display: grid; grid-template-columns: 1fr 1.1fr 320px; gap: 28px; align-items: start; padding-block: 12px 20px; }
.pdp__gallery { position: sticky; top: 90px; }
.pdp__image { height: 340px; background: linear-gradient(135deg, var(--blue-100), var(--sky)); border-radius: var(--radius); display: grid; place-items: center; font-size: 8rem; }
.pdp__thumbs { display: flex; gap: 10px; margin-top: var(--tj-space-3); }
.pdp__thumb { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: var(--tj-r-control); display: grid; place-items: center; font-size: 1.8rem; cursor: pointer; }
.pdp__thumb--active { border-color: var(--blue-500); }
.pdp__badge { display: inline-block; background: var(--navy); color: var(--tj-on-brand); font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: var(--tj-r-pill); }
.pdp__title { font-size: 1.5rem; font-weight: 800; color: var(--ink); margin: 12px 0; line-height: 1.6; }
.pdp__meta { display: flex; flex-wrap: wrap; gap: var(--tj-space-4); align-items: center; padding-bottom: var(--tj-space-4); border-bottom: 1px solid var(--line); }
.pdp__seller { color: var(--muted); font-size: .9rem; }
.pdp__seller strong { color: var(--navy); }
.pdp__desc { color: var(--ink); line-height: 2.1; margin: 18px 0; }
.pdp__spectitle { font-size: 1.05rem; font-weight: 800; margin-bottom: 10px; }
.pdp__specs { width: 100%; border-collapse: collapse; }
.pdp__specs tr { border-bottom: 1px solid var(--line); }
.pdp__specs th { text-align: start; color: var(--muted); font-weight: 600; padding: 11px 0; width: 40%; font-size: .9rem; }
.pdp__specs td { padding: 11px 0; font-weight: 700; font-size: .9rem; }

.pdp__buybox { position: sticky; top: 90px; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: var(--tj-space-3); box-shadow: var(--shadow-sm); }
.buybox__seller { font-size: .9rem; }
.buybox__seller strong { color: var(--navy); }
.buybox__trust { font-size: .82rem; color: var(--muted); }
.buybox__installment { font-size: .82rem; color: var(--teal); font-weight: 700; background: #e7f7f5; padding: 8px 10px; border-radius: var(--tj-r-sm); }
.buybox__price { border-top: 1px dashed var(--line); padding-top: var(--tj-space-3); }
.buybox__old { display: flex; align-items: center; gap: var(--tj-space-2); margin-bottom: var(--tj-space-1); }
.buybox__off { background: var(--tj-danger-surface); color: var(--tj-color-danger); font-size: .74rem; font-weight: 800; padding: 2px 8px; border-radius: var(--tj-r-pill); }
.buybox__now { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.buybox__now small { font-size: .8rem; color: var(--muted); font-weight: 500; }
.buybox__added { text-align: center; color: var(--green); font-weight: 700; font-size: .85rem; }

/* ===== Quantity control ===== */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--tj-r-control); overflow: hidden; align-self: flex-start; }
.qty__btn { width: 40px; height: 40px; border: none; background: var(--sky); color: var(--navy); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.qty__btn:hover { background: var(--blue-100); }
.qty__value { min-width: 44px; text-align: center; font-weight: 800; }

/* ===== Cart / Checkout layout ===== */
.cartpage { display: grid; grid-template-columns: 1fr 340px; gap: var(--tj-space-6); align-items: start; padding-block: 8px 40px; }
.cartpage__list { display: flex; flex-direction: column; gap: var(--tj-space-4); }
.cartline { display: grid; grid-template-columns: 96px 1fr auto auto; gap: var(--tj-space-4); align-items: center; background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.cartline__media { width: 96px; height: 96px; background: linear-gradient(135deg, var(--blue-100), var(--sky)); border-radius: var(--tj-r-control); display: grid; place-items: center; font-size: 3rem; text-decoration: none; }
.cartline__title { display: block; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.7; }
.cartline__title:hover { color: var(--blue); }
.cartline__seller { color: var(--muted); font-size: .82rem; margin: 4px 0; }
.cartline__controls { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.cartline__remove { background: none; border: none; color: var(--tj-color-danger); font-family: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.cartline__price { font-weight: 800; color: var(--navy); white-space: nowrap; }
.cartline__price small { font-size: .72rem; color: var(--muted); font-weight: 500; }

/* ===== Order summary ===== */
.summary { position: sticky; top: 90px; background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.summary__title { font-size: 1.05rem; font-weight: 800; margin-bottom: 14px; }
.summary__item { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); padding: 4px 0; }
.summary__row { display: flex; justify-content: space-between; padding: 8px 0; font-size: .9rem; border-top: 1px solid var(--line); }
.summary__row--off { color: var(--green); font-weight: 700; }
.summary__total { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; margin-top: 6px; border-top: 2px solid var(--line); font-weight: 800; font-size: 1.05rem; color: var(--navy); }
.summary__total small { font-size: .75rem; color: var(--muted); font-weight: 500; }
.summary__note { font-size: .78rem; color: var(--muted); margin-top: var(--tj-space-3); line-height: 1.9; }
.summary__error { background: var(--tj-danger-surface); color: #c0392b; font-size: .82rem; font-weight: 700; padding: 10px; border-radius: var(--tj-r-sm); margin-bottom: var(--tj-space-3); }

/* ===== Checkout form ===== */
.checkout__block { background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: var(--tj-space-4); }
.checkout__title { font-size: 1.05rem; font-weight: 800; margin-bottom: var(--tj-space-4); }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.formrow { display: flex; flex-direction: column; gap: 6px; }
.formrow--full { grid-column: 1 / -1; }
.formrow label { font-size: .85rem; font-weight: 700; }
.fld { border: 1.5px solid var(--line); border-radius: var(--tj-r-sm); padding: 11px 12px; font-family: inherit; font-size: .92rem; background: var(--sky); outline: none; color: var(--ink); }
.fld:focus { border-color: var(--blue-500); }
.fld--error { border-color: #e05353; }

/* Phone input with a fixed +98 prefix; user types only the 10-digit local part. */
.phonebox { display: flex; align-items: center; background: var(--sky); border: 1.5px solid var(--line); border-radius: var(--tj-r-sm); overflow: hidden; }
.phonebox:focus-within { border-color: var(--blue-500); }
.phonebox.fld--error { border-color: #e05353; }
.phonebox__prefix { padding: 0 12px; color: var(--muted); font-weight: 700; border-inline-start: 1px solid var(--line); }
.phonebox__input { flex: 1; min-width: 0; width: 100%; border: none; background: transparent; padding: 11px 12px; font-family: inherit; font-size: .92rem; letter-spacing: 1px; outline: none; color: var(--ink); }

/* Suspended-item note shown to the owner. */
.suspend-note { margin-top: var(--tj-space-2); padding: 8px 12px; border-radius: var(--tj-r-sm); background: #fdecec; color: #c02626; font-size: .85rem; font-weight: 600; }

.pays { display: flex; flex-direction: column; gap: 10px; }
.pay { display: flex; align-items: center; gap: var(--tj-space-3); border: 1.5px solid var(--line); border-radius: var(--tj-r-control); padding: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.pay--active { border-color: var(--blue-500); background: var(--sky); }
.pay input { accent-color: var(--navy); width: 18px; height: 18px; }
.pay__icon { font-size: 1.5rem; }
.pay__text { display: flex; flex-direction: column; }
.pay__text span { font-size: .8rem; color: var(--muted); }

/* ===== Order success ===== */
.ordersuccess { text-align: center; max-width: 620px; margin: 0 auto; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ordersuccess__icon { font-size: 4rem; }
.ordersuccess__code { color: var(--navy); letter-spacing: 1px; }
.ordersuccess__text { color: var(--muted); line-height: 2.1; }
.ordersuccess__actions { display: flex; gap: var(--tj-space-3); flex-wrap: wrap; justify-content: center; margin-top: 10px; }

@media (max-width: 992px) {
    .pdp { grid-template-columns: 1fr; }
    .pdp__gallery, .pdp__buybox, .summary { position: static; }
    .cartpage { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .formgrid { grid-template-columns: 1fr; }
    .cartline { grid-template-columns: 72px 1fr; grid-template-areas: "media info" "controls price"; }
    .cartline__media { grid-area: media; width: 72px; height: 72px; font-size: 2.2rem; }
    .cartline__info { grid-area: info; }
    .cartline__controls { grid-area: controls; flex-direction: row; align-items: center; }
    .cartline__price { grid-area: price; text-align: end; }
    .toast { inset-inline: 12px; inset-block-end: 12px; text-align: center; }
}

/* ===== Profile ===== */
.profile { display: grid; grid-template-columns: 270px 1fr; gap: var(--tj-space-6); align-items: start; padding-block: 8px 40px; }
.profile__side { background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 90px; box-shadow: var(--shadow-sm); }
.profile__user { display: flex; align-items: center; gap: var(--tj-space-3); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.profile__avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-100), var(--sky)); display: grid; place-items: center; font-size: 1.6rem; }
.profile__name { display: block; font-weight: 800; }
.profile__phone { color: var(--muted); font-size: .82rem; }
.profile__badgephone { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0; }
.profile__vbadge { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: var(--tj-r-pill); background: var(--tj-success-surface); color: var(--green); }
.profile__vbadge--seller { background: var(--blue-100); color: var(--navy); }
.profile__menu { display: flex; flex-direction: column; gap: 2px; }
.profile__menugroup { font-size: .74rem; font-weight: 800; color: var(--muted); margin: 14px 0 6px; }
.profile__link { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; background: none; border: none; font-family: inherit; font-size: .9rem; font-weight: 600; color: var(--ink); padding: 10px 12px; border-radius: var(--tj-r-sm); cursor: pointer; text-decoration: none; }
.profile__link:hover { background: var(--sky); }
.profile__link--active { background: var(--navy); color: var(--tj-on-brand); }
.profile__link--logout { color: var(--tj-color-danger); }
.profile__count { margin-inline-start: auto; background: var(--gold); color: #3a2a00; font-size: .72rem; font-weight: 800; min-width: 20px; height: 20px; border-radius: var(--tj-r-pill); display: grid; place-items: center; padding: 0 6px; }
.profile__link--active .profile__count { background: var(--tj-surface); color: var(--navy); }
.profile__title { font-size: 1.35rem; font-weight: 800; margin-bottom: var(--tj-space-4); }
.profile__title--sub { font-size: 1.1rem; margin-top: 28px; }
.profile__main { min-width: 0; }
.admin-profile { --admin-sidebar-width: 270px; position: relative; transition: grid-template-columns .2s ease; }
.admin-profile--sidebar-collapsed { grid-template-columns: 1fr; }
.admin-profile--sidebar-collapsed > .profile__side { display: none; }
.admin-sidebar-toggle { position: fixed; z-index: 70; top: 50%; right: max(16px, calc((100vw - var(--container)) / 2 + 16px)); display: grid; place-items: center; width: 44px; height: 46px; padding: 0; border: 1px solid rgba(47,111,237,.22); border-radius: 9px 0 0 9px; color: rgba(11,61,145,.42); background: rgba(255,255,255,.14); box-shadow: none; backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); font-family: inherit; cursor: pointer; transform: translateY(-50%); transition: right .2s ease, width .15s ease, height .15s ease, background .15s ease; }
.admin-sidebar-toggle:hover { color: rgba(11,61,145,.66); background: rgba(235,243,255,.28); }
.admin-sidebar-toggle[aria-expanded="true"] { right: calc(max(16px, calc((100vw - var(--container)) / 2 + 16px)) + var(--admin-sidebar-width) - 17px); width: 34px; height: 34px; border-color: rgba(47,111,237,.18); border-radius: 50%; color: rgba(11,61,145,.42); background: rgba(47,111,237,.08); box-shadow: none; }
.side-panel-toggle__chevron { font-size: 1.4rem; font-weight: 900; line-height: 1; }

.dash { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.dashcard { display: flex; align-items: center; gap: var(--tj-space-3); background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--tj-space-4); box-shadow: var(--shadow-sm); border-top: 3px solid var(--blue); }
.dashcard--blue { border-top-color: var(--blue); }
.dashcard--gold { border-top-color: var(--gold); }
.dashcard--teal { border-top-color: var(--teal); }
.dashcard--green { border-top-color: var(--green); }
.dashcard__icon { font-size: 1.8rem; }
.dashcard__label { display: block; font-size: .8rem; color: var(--muted); }
.dashcard__value { font-size: 1.1rem; font-weight: 800; color: var(--navy); }
.dashcard__value small { font-size: .72rem; font-weight: 500; color: var(--muted); }

.panel { background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: var(--tj-space-4); box-shadow: var(--shadow-sm); }
.panel__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--tj-space-3); }
.panel__title { font-size: 1.05rem; font-weight: 800; }
.link { background: none; border: none; color: var(--blue); font-family: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.link--danger { color: var(--tj-color-danger); }

.orderrow { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.orderrow:last-child { border-bottom: none; }
.orderrow__emoji { width: 56px; height: 56px; border-radius: var(--tj-r-control); background: linear-gradient(135deg, var(--blue-100), var(--sky)); display: grid; place-items: center; font-size: 1.8rem; }
.orderrow__title { display: block; font-weight: 700; line-height: 1.7; }
.orderrow__meta { font-size: .8rem; color: var(--muted); }
.orderrow__side { display: flex; flex-direction: column; align-items: end; gap: 6px; }
.orderrow__amount { font-weight: 800; color: var(--navy); white-space: nowrap; }
.orderrow__amount small { font-size: .72rem; font-weight: 500; color: var(--muted); }

.chip { font-size: .74rem; font-weight: 800; padding: 3px 10px; border-radius: var(--tj-r-pill); white-space: nowrap; }
.chip--blue { background: var(--blue-100); color: var(--navy); }
.chip--gold { background: #fff3dd; color: #a86b00; }
.chip--green { background: var(--tj-success-surface); color: var(--green); }
.chip--red { background: var(--tj-danger-surface); color: var(--tj-color-danger); }

.tabs { display: flex; flex-wrap: wrap; gap: var(--tj-space-2); margin-bottom: var(--tj-space-4); }
.tabs__btn { background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--tj-r-pill); padding: 8px 16px; font-family: inherit; font-size: .85rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs__btn--active { background: var(--navy); color: var(--tj-on-brand); border-color: var(--navy); }

.addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.addrcard { background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--tj-space-4); }
.addrcard__head { display: flex; align-items: center; gap: var(--tj-space-2); font-weight: 800; margin-bottom: var(--tj-space-2); }
.addrcard__default { font-size: .7rem; background: var(--blue-100); color: var(--navy); padding: 2px 8px; border-radius: var(--tj-r-pill); }
.addrcard p { color: var(--ink); line-height: 1.9; font-size: .9rem; }
.addrcard__meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin: 10px 0; }
.addrcard__actions { display: flex; gap: 14px; }
.checkout__addresses { display: grid; grid-template-columns: 1fr 1fr; gap: var(--tj-space-3); }
.checkout__address { display: flex; align-items: flex-start; gap: var(--tj-space-3); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.checkout__address > input { margin-top: 5px; accent-color: var(--navy); }
.checkout__address--active { border-color: var(--navy); box-shadow: 0 0 0 2px var(--blue-100); }
.checkout__address-content { min-width: 0; flex: 1; }
.checkout__address-text { display: block; color: var(--ink); line-height: 1.9; font-size: .88rem; }
.checkout__address-empty { padding: 24px 12px; }
@media (max-width: 720px) { .checkout__addresses { grid-template-columns: 1fr; } }

/* ---- Address form modal + Neshan map picker ---- */
.addrmodal { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: grid; place-items: center; z-index: 1000; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.addrmodal__box { background: var(--tj-surface); border-radius: var(--radius); width: min(860px, 100%); min-width: 0; max-height: 92vh; max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))); overflow: auto; overscroll-behavior: contain; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.addrmodal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.addrmodal__head h2 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.addrmodal__close { background: none; border: none; min-width: 44px; min-height: 44px; flex-shrink: 0; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.addrmodal__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.addrmodal__foot { display: flex; justify-content: flex-end; gap: var(--tj-space-3); margin-top: var(--tj-space-4); }
.addrform { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.addrform label { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: .82rem; font-weight: 700; color: var(--ink); }
.addrform input, .addrform select, .addrform textarea { min-width: 0; max-width: 100%; }
.addrform input, .addrform textarea, .addrform select { border: 1px solid var(--line); border-radius: var(--tj-r-sm); padding: 9px 12px; min-height: 44px; background: var(--tj-surface); color: var(--ink); font-family: inherit; font-size: 1rem; }
.addrform__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.addrform__check { flex-direction: row !important; align-items: center; gap: var(--tj-space-2); font-weight: 600; }
.addrform__check input { width: auto; min-height: 0; }
.addrmap { display: flex; flex-direction: column; gap: var(--tj-space-2); min-width: 0; }
.addrmap__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--tj-space-2); font-size: .75rem; color: var(--muted); }
.addrmap__canvas { flex: 1; min-height: 300px; height: 300px; border-radius: var(--tj-r-control); border: 1px solid var(--line); overflow: hidden; }
.addrmap__coords { font-size: .78rem; color: var(--green); font-weight: 700; }
.btn--sm { padding: 6px 12px; font-size: .75rem; }
@media (max-width: 720px), (max-height: 500px) {
    .addrmodal__body, .addrform__row { grid-template-columns: minmax(0, 1fr); }
    .addrmodal__foot { position: sticky; bottom: -20px; z-index: 500; background: var(--tj-surface); border-top: 1px solid var(--line); padding: 12px 0; margin-bottom: -12px; }
    .addrmodal__foot button { flex: 1 1 0; min-width: 0; min-height: 44px; white-space: normal; }
    .addrmap__canvas { flex: none; min-height: 220px; height: clamp(220px, 40dvh, 320px); }
    .addrmap__bar button { flex-shrink: 0; min-height: 44px; }
    .addrmap .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 44px; }
}

.walletcta { display: flex; gap: var(--tj-space-3); flex-wrap: wrap; margin-bottom: var(--tj-space-4); }
.txn { display: grid; grid-template-columns: 40px 1fr auto; gap: var(--tj-space-3); align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.txn:last-child { border-bottom: none; }
.txn__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.txn__icon--in { background: var(--tj-success-surface); color: var(--green); }
.txn__icon--out { background: var(--tj-danger-surface); color: var(--tj-color-danger); }
.txn__info strong { display: block; font-size: .9rem; }
.txn__info span { font-size: .78rem; color: var(--muted); }
.txn__amount { font-weight: 800; white-space: nowrap; }
.txn__amount--in { color: var(--green); }
.txn__amount--out { color: var(--tj-color-danger); }

.dtable { width: 100%; border-collapse: collapse; }
.dtable th { text-align: start; color: var(--muted); font-size: .8rem; font-weight: 700; padding: 10px; border-bottom: 2px solid var(--line); }
.dtable td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.dtable__emoji { font-size: 1.3rem; margin-inline-end: 6px; }

.salesrow { display: grid; grid-template-columns: 48px 1fr auto auto; gap: var(--tj-space-3); align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.salesrow:last-child { border-bottom: none; }
.salesrow__emoji { width: 48px; height: 48px; border-radius: var(--tj-r-control); background: linear-gradient(135deg, var(--blue-100), var(--sky)); display: grid; place-items: center; font-size: 1.5rem; }
.salesrow__info strong { display: block; font-size: .9rem; }
.salesrow__info span { font-size: .78rem; color: var(--muted); }
.salesrow__price { font-weight: 800; color: var(--navy); white-space: nowrap; }

.reviewrow { padding: 14px 0; border-bottom: 1px solid var(--line); }
.reviewrow:last-child { border-bottom: none; }
.reviewrow__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.reviewrow__head strong { font-size: .92rem; }
.reviewrow__off { color: var(--line); }
.reviewrow p { color: var(--ink); line-height: 1.9; font-size: .88rem; }
.reviewrow__date { font-size: .76rem; color: var(--muted); }

@media (max-width: 992px) {
    .profile { grid-template-columns: 1fr; }
    .profile__side { position: static; }
    .admin-sidebar-toggle { right: 8px; }
    .admin-sidebar-toggle[aria-expanded="true"] { right: 8px; }
    .dash { grid-template-columns: 1fr 1fr; }
    .addresses { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .dash { grid-template-columns: 1fr; }
    .orderrow { grid-template-columns: 44px 1fr; }
    .orderrow__side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
    .dtable thead { display: none; }
    .dtable td { display: block; border: none; padding: 4px 0; }
    .dtable tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
}

/* ===== My Shops ===== */
.profile__hint { color: var(--muted); font-size: .88rem; line-height: 1.9; margin-bottom: var(--tj-space-4); }
.shops { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--tj-space-4); }
.shopcard { background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px; }
.shopcard__top { display: flex; align-items: center; gap: var(--tj-space-3); }
.shopcard__icon { width: 52px; height: 52px; border-radius: var(--tj-r-md); background: linear-gradient(135deg, var(--blue-100), var(--sky)); display: grid; place-items: center; font-size: 1.8rem; }
.shopcard__name { display: block; font-weight: 800; }
.shopcard__cat { font-size: .8rem; color: var(--muted); }
.shopcard__top .chip { margin-inline-start: auto; }
.shopcard__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tj-space-2); border-block: 1px solid var(--line); padding: 12px 0; }
.shopcard__stats > div { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.shopcard__label { font-size: .74rem; color: var(--muted); }
.shopcard__stats strong { font-size: .95rem; color: var(--navy); font-weight: 800; }
.shopcard__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shopcard--new { border: 2px dashed var(--line); background: var(--sky); align-items: center; justify-content: center; text-align: center; cursor: pointer; color: var(--navy); font-family: inherit; }
.shopcard--new:hover { border-color: var(--blue-500); }
.shopcard__plus { font-size: 2.2rem; font-weight: 300; line-height: 1; }

@media (max-width: 560px) {
    .shops { grid-template-columns: 1fr; }
}

/* ===== Add Product ===== */
.addp { display: grid; grid-template-columns: 1fr 340px; gap: var(--tj-space-6); align-items: start; padding-block: 8px 40px; }
.addp__side .panel { position: sticky; top: 90px; }
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--tj-space-3); margin-bottom: var(--tj-space-4); }
.media__item { position: relative; aspect-ratio: 1; border-radius: var(--tj-r-control); overflow: hidden; border: 1px solid var(--line); }
.media__item img { width: 100%; height: 100%; object-fit: cover; }
.media__item--main { border: 2px solid var(--blue-500); }
.media__tag { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; background: var(--navy); color: var(--tj-on-brand); font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: var(--tj-r-pill); }
.media__remove { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; width: 24px; height: 24px; border: none; border-radius: 50%; background: rgba(0,0,0,.6); color: var(--tj-on-brand); cursor: pointer; font-size: .8rem; }
.media__add, .media__videobtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1; border: 2px dashed var(--line); border-radius: var(--tj-r-control); background: var(--sky); cursor: pointer; color: var(--muted); font-size: .82rem; font-weight: 700; }
.media__add:hover, .media__videobtn:hover { border-color: var(--blue-500); color: var(--navy); }
.media__plus { font-size: 1.8rem; }
.media__video { margin-top: var(--tj-space-1); }
.media__videobtn { aspect-ratio: auto; padding: var(--tj-space-4); flex-direction: row; }
.media__videofile { display: flex; align-items: center; justify-content: space-between; gap: var(--tj-space-3); background: var(--sky); border: 1px solid var(--line); border-radius: var(--tj-r-control); padding: 14px 16px; font-weight: 700; }

.specrow { display: grid; grid-template-columns: 1fr 1.4fr 40px; gap: 10px; margin-bottom: 10px; }
.specrow__del { border: none; background: var(--tj-danger-surface); color: var(--tj-color-danger); border-radius: var(--tj-r-sm); cursor: pointer; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: var(--tj-space-2); margin-bottom: 14px; }
.chips__add { border: none; cursor: pointer; font-family: inherit; }

.simgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--tj-space-3); }
.simcard { display: flex; align-items: center; gap: var(--tj-space-2); border: 1.5px solid var(--line); border-radius: var(--tj-r-control); padding: 10px; background: var(--tj-surface); cursor: pointer; font-family: inherit; text-align: start; }
.simcard--on { border-color: var(--blue-500); background: var(--sky); }
.simcard__emoji { font-size: 1.5rem; }
.simcard__title { flex: 1; font-size: .8rem; font-weight: 700; line-height: 1.5; }
.simcard__check { width: 24px; height: 24px; border-radius: 50%; background: var(--blue-100); color: var(--navy); display: grid; place-items: center; font-weight: 800; }
.simcard--on .simcard__check { background: var(--navy); color: var(--tj-on-brand); }

.addp__side .formrow { margin-bottom: var(--tj-space-3); }
.addp__side .btn { margin-top: var(--tj-space-2); }

@media (max-width: 992px) {
    .addp { grid-template-columns: 1fr; }
    .addp__side .panel { position: static; }
}

/* ===== Shop form ===== */
.shopform__brand { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.shopform__logo { width: 96px; height: 96px; border-radius: 18px; background: var(--sky); border: 1px solid var(--line); display: grid; place-items: center; font-size: 2.6rem; overflow: hidden; flex-shrink: 0; }
.shopform__logo img { width: 100%; height: 100%; object-fit: cover; }
.iconpick { display: flex; flex-wrap: wrap; gap: var(--tj-space-2); margin-top: var(--tj-space-3); }
.iconpick__btn { width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: var(--tj-r-control); background: var(--tj-surface); cursor: pointer; font-size: 1.3rem; }
.iconpick__btn--on { border-color: var(--blue-500); background: var(--sky); }
.shopcard--preview { cursor: default; }
.shopcard__icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* ===== Admin panel ===== */
.btn--sm { padding: 6px 14px; font-size: .82rem; }
.fld--sm { padding: 6px 10px; font-size: .85rem; }

.adminswitch { margin: 14px 0; }
.adminswitch__label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--tj-space-3); margin-bottom: var(--tj-space-4); }
.statcard { display: flex; align-items: center; gap: var(--tj-space-3); background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--tj-space-4); box-shadow: var(--shadow-sm); }
.statcard__icon { font-size: 1.8rem; }
.statcard strong { display: block; font-size: 1.4rem; color: var(--navy); }
.statcard span { font-size: .8rem; color: var(--muted); }
.statcard--warn { background: #fff8ec; border-color: #ffe0a6; }

.atbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.atbl th { text-align: start; color: var(--muted); font-weight: 700; font-size: .78rem; padding: 8px 10px; border-bottom: 2px solid var(--line); }
.atbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atbl__emoji { font-size: 1.3rem; }
.atbl .link { margin-inline-end: 10px; }

/* ---- Admin: submenu, live search, filters, zebra rows ---- */
.profile__link--group .profile__chev { margin-inline-start: auto; font-size: .7rem; color: inherit; }
.profile__link--sub { padding-inline-start: 34px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.profile__link--sub.profile__link--active { color: var(--tj-on-brand); }

.asearch { display: flex; align-items: center; gap: var(--tj-space-2); background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--tj-r-control); padding: 4px 12px; margin-bottom: var(--tj-space-4); box-shadow: var(--shadow-sm); }
.asearch__icon { color: var(--muted); font-size: .95rem; }
.asearch__input { flex: 1; border: none !important; box-shadow: none !important; background: transparent; padding: 8px 0 !important; }
.asearch__input:focus { outline: none; }

.ufilter { display: flex; align-items: center; gap: 10px; margin-bottom: var(--tj-space-3); }
.ufilter__label { font-size: .82rem; font-weight: 700; color: var(--muted); }
.ufilter .fld { min-width: 160px; }

.atbl tbody tr:nth-child(even) { background: var(--tj-background); }
.atbl tbody tr:hover { background: var(--sky); }
.urow:nth-child(even) { background: var(--tj-background); border-radius: var(--tj-r-xs); }
.qrow:nth-child(even) { background: var(--tj-background); border-radius: var(--tj-r-xs); }
.urow:nth-child(even), .qrow:nth-child(even) { padding-inline: 10px; }

.addrow { display: flex; gap: var(--tj-space-2); margin-top: 14px; flex-wrap: wrap; }
.addrow .fld { flex: 1; min-width: 120px; }
.addrow__icon { flex: 0 0 60px !important; min-width: 60px !important; text-align: center; }

.qrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tj-space-3); padding: 16px 0; border-bottom: 1px solid var(--line); }
.qrow:last-child { border-bottom: none; }
.qrow__icon { flex: 0 0 40px; font-size: 1.6rem; width: 40px; text-align: center; }
.qrow__info { flex: 1 1 calc(100% - 52px); min-width: 0; display: flex; flex-direction: column; gap: var(--tj-space-1); overflow-wrap: anywhere; }
.qrow > .btn { flex: 0 0 auto; max-width: 100%; white-space: nowrap; }
.qrow > .fld { flex: 1 1 220px; width: auto; min-width: 0; max-width: 100%; }
.qrow__info strong { color: var(--ink); }
.qrow__info span { font-size: .8rem; color: var(--muted); }
.banner-admin__thumb { width: 80px; height: 24px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

.urow { padding: 14px 0; border-bottom: 1px solid var(--line); }
.urow:last-child { border-bottom: none; }
.urow__head { display: flex; align-items: center; gap: var(--tj-space-3); }
.urow__info { flex: 1; display: flex; flex-direction: column; }
.urow__info span { font-size: .8rem; color: var(--muted); }
.urow__groups { margin-top: 10px; display: flex; flex-wrap: wrap; gap: var(--tj-space-2); align-items: center; }
.urow__glabel { font-size: .78rem; color: var(--muted); font-weight: 700; }
.gchk { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; padding: 5px 10px; border: 1.5px solid var(--line); border-radius: var(--tj-r-pill); cursor: pointer; background: var(--tj-surface); }
.gchk--on { border-color: var(--blue-500); background: var(--sky); color: var(--navy); font-weight: 700; }
.gchk input { accent-color: var(--navy); }

.urow__info .chip { align-self: flex-start; margin-top: var(--tj-space-1); }
.urow__admin { margin-top: 10px; display: flex; flex-wrap: wrap; gap: var(--tj-space-2); align-items: center; }
.urow__admin .fld { flex: 1; min-width: 140px; }
.user-accordion.urow { padding: 0; border: 1px solid var(--line); border-radius: var(--tj-r-md); margin-block: 10px; background: var(--tj-surface); overflow: clip; }
.user-accordion > .user-accordion__summary { display: flex; align-items: center; gap: var(--tj-space-4); min-height: 76px; padding: 14px 18px; cursor: pointer; list-style: none; }
.user-accordion__summary::-webkit-details-marker { display: none; }
.user-accordion__summary::marker { content: ""; }
.user-accordion__summary:hover { background: var(--tj-background); }
.user-accordion__summary:focus-visible, .admin-disclosure > summary:focus-visible { outline: 2px solid var(--blue-500); outline-offset: -3px; border-radius: var(--tj-r-control); }
.user-accordion__identity { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: var(--tj-space-1); overflow-wrap: anywhere; }
.user-accordion__identity bdi { align-self: flex-start; color: var(--muted); font-size: .82rem; }
.user-accordion__badges { display: flex; align-items: center; gap: var(--tj-space-2); flex-wrap: wrap; font-size: .8rem; }
.user-accordion__role, .user-accordion__count { color: var(--muted); }
.user-accordion__chevron { font-size: 1.3rem; width: 24px; flex: 0 0 24px; text-align: center; color: var(--navy); transition: transform .15s; }
.user-accordion[open] > summary .user-accordion__chevron { transform: rotate(180deg); }
.user-accordion__body { padding: 18px; border-top: 1px solid var(--line); }
.user-accordion__body .urow__head { flex-wrap: wrap; }
.user-accordion__search { display: grid; gap: 6px; margin-top: 18px; }
.user-accordion__search label { font-size: .85rem; font-weight: 700; }
.user-accordion__search .fld { width: 100%; min-width: 0; }
.user-accordion__search .profile__hint { margin: 0; font-size: .78rem; }
.user-directory-filters { flex-wrap: wrap; gap: 10px; }
.user-directory-filters > input { flex: 1 1 240px; min-width: 0; }
.user-directory-filters > select { max-width: 100%; }
.user-accordion__links { display: flex; flex: 1; flex-wrap: wrap; gap: var(--tj-space-3); }
.user-accordion__body .urow__head > select { width: auto; min-width: 150px; max-width: 100%; }
.user-accordion .gchk { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.user-accordion .gchk input { flex: 0 0 18px; width: 18px; height: 18px; }
.admin-disclosure { border: 1px solid var(--line); border-radius: var(--tj-r-md); padding: 12px 16px; margin-block: var(--tj-space-3); background: var(--tj-surface); }
.admin-disclosure > summary { cursor: pointer; padding: 8px 0; font-weight: 700; }
.admin-disclosure > .device-panel { margin: 12px 0 0; box-shadow: none; }
@media (max-width: 600px) {
  .user-accordion > .user-accordion__summary { display: grid; grid-template-columns: minmax(0,1fr) 24px; gap: 8px 12px; padding: var(--tj-space-3); }
  .user-accordion__badges { grid-column: 1; grid-row: 2; }
  .user-accordion__chevron { grid-column: 2; grid-row: 1 / 3; }
  .user-accordion__body { padding: var(--tj-space-3); }
  .user-accordion__body .urow__head > select { width: 100%; }
  .user-accordion .urow__admin .fld { min-width: 0; flex-basis: 100%; }
}

.secrow { display: flex; align-items: center; justify-content: space-between; gap: var(--tj-space-3); }
.secrow p { margin: 4px 0 0; }

.chip__x { border: none; background: none; cursor: pointer; color: inherit; font-size: .8rem; padding: 0 0 0 4px; }
.panel--reset { text-align: center; box-shadow: none; background: transparent; border: none; }

/* ---- Order status stepper (graphical) ---- */
.ostep { display: flex; align-items: flex-start; gap: 0; margin: 16px 0 6px; padding: 4px 2px; }
.ostep__item { display: flex; flex-direction: column; align-items: center; gap: var(--tj-space-2); flex: 0 0 auto; width: 92px; text-align: center; }
.ostep__node { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem;
    background: var(--tj-surface); border: 2px solid var(--line); color: var(--muted); transition: all .25s ease; }
.ostep__node--active { border-color: var(--navy); color: var(--navy); background: var(--blue-100); box-shadow: 0 0 0 4px rgba(11,61,145,.12); }
.ostep__node--done { border-color: var(--green); background: var(--green); color: var(--tj-on-brand); }
.ostep__label { font-size: .74rem; font-weight: 700; color: var(--muted); line-height: 1.5; }
.ostep__item:has(.ostep__node--active) .ostep__label { color: var(--navy); }
.ostep__item:has(.ostep__node--done) .ostep__label { color: var(--green); }
.ostep__bar { flex: 1 1 auto; height: 3px; background: var(--line); margin-top: 21px; border-radius: 2px; min-width: 18px; }
.ostep__bar--done { background: var(--green); }

@media (max-width: 640px) {
    .ostep { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .ostep__bar { display: none; }
    .ostep__item { width: 46%; }
}

/* ---- Sales order card (seller view) ---- */
.salecard { border: 1px solid var(--line); border-radius: 16px; padding: var(--tj-space-4); margin-bottom: var(--tj-space-4); background: var(--tj-surface); }
.salecard__head { display: grid; grid-template-columns: 48px 1fr auto; gap: var(--tj-space-3); align-items: center; }
.salecard__emoji { width: 48px; height: 48px; border-radius: var(--tj-r-control); background: linear-gradient(135deg, var(--blue-100), var(--sky)); display: grid; place-items: center; font-size: 1.5rem; }
.salecard__title strong { display: block; font-size: .95rem; }
.salecard__meta { font-size: .78rem; color: var(--muted); }
.salecard__price { font-weight: 800; color: var(--navy); white-space: nowrap; }
.salecard__price small { font-size: .72rem; font-weight: 500; color: var(--muted); }
.buyerbox { margin: 12px 0; padding: 12px 14px; background: var(--sky); border-radius: var(--tj-r-control); display: grid; gap: 6px; }
.buyerbox__row { display: flex; gap: 10px; font-size: .84rem; }
.buyerbox__k { color: var(--muted); font-weight: 700; min-width: 96px; }
.buyerbox__v { color: var(--navy); font-weight: 600; }
.salecard__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tj-space-2); margin-top: var(--tj-space-2); padding-top: var(--tj-space-3); border-top: 1px dashed var(--line); }
.salecard__actions-label { font-size: .82rem; font-weight: 700; color: var(--muted); }
.chipbtn { background: var(--tj-surface); border: 1px solid var(--line); border-radius: var(--tj-r-pill); padding: 6px 14px; font-family: inherit; font-size: .8rem; font-weight: 700; color: var(--muted); cursor: pointer; transition: all .2s ease; }
.chipbtn:hover { border-color: var(--navy); color: var(--navy); }
.chipbtn--active { background: var(--navy); color: var(--tj-on-brand); border-color: var(--navy); }

/* ---- Buyer order card ---- */
.obuy { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; background: var(--tj-surface); }
.obuy__head { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; }
.obuy__emoji { width: 56px; height: 56px; border-radius: var(--tj-r-control); background: linear-gradient(135deg, var(--blue-100), var(--sky)); display: grid; place-items: center; font-size: 1.8rem; }
.obuy__title { display: block; font-weight: 700; line-height: 1.7; }
.obuy__meta { font-size: .8rem; color: var(--muted); }
.obuy__amount { font-weight: 800; color: var(--navy); white-space: nowrap; }
.obuy__amount small { font-size: .72rem; font-weight: 500; color: var(--muted); }

@media (max-width: 640px) {
    .salecard__head, .obuy__head { grid-template-columns: 44px 1fr; }
    .salecard__price, .obuy__amount { grid-column: 1 / -1; }
    .buyerbox__row { flex-direction: column; gap: 2px; }
}

/* ---- Favorite (wishlist) button ---- */
.pdp__titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tj-space-3); }
.favbtn { display: inline-flex; align-items: center; gap: 6px; background: var(--tj-surface); border: 1.5px solid var(--line); border-radius: var(--tj-r-pill);
    padding: 8px 14px; font-family: inherit; font-size: .85rem; font-weight: 700; color: var(--muted); cursor: pointer; transition: all .2s ease; white-space: nowrap; }
.favbtn:hover { border-color: var(--tj-color-danger); color: var(--tj-color-danger); }
.favbtn--on { border-color: #ffc2c2; background: #fff0f0; color: var(--tj-color-danger); }
.favbtn__icon { font-size: 1.05rem; line-height: 1; }
.favbtn--corner { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; padding: 6px 8px; border-radius: 50%; }
.product { position: relative; }

/* ---- Admin user detail page ---- */
.udetail { display: grid; gap: var(--tj-space-4); margin: 16px 0 40px; }
.udetail__head { display: flex; align-items: center; gap: 14px; }
.udetail__avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--blue-100); display: grid; place-items: center; font-size: 1.8rem; }
.udetail__id { flex: 1; }
.udetail__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--tj-space-3); margin-top: var(--tj-space-2); }
.udetail__cell { display: flex; flex-direction: column; gap: var(--tj-space-1); padding: 10px 12px; background: var(--sky); border-radius: var(--tj-r-control); }
.udetail__k { font-size: .76rem; color: var(--muted); font-weight: 700; }
.udetail__v { font-weight: 700; color: var(--navy); }
.udetail__chips { display: flex; flex-wrap: wrap; gap: var(--tj-space-2); }

/* ---- Special-offer badge (tied to IsSpecial only) ---- */
.product__badge--special, .pdp__badge--special {
    background: linear-gradient(135deg, #ff6a00, #ff2d55) !important;
    color: #fff !important; font-weight: 800; box-shadow: 0 4px 12px rgba(255,45,85,.35);
}

/* ---- Live "time in current status" + status log ---- */
.stagelive { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tj-space-2); margin: 4px 0 10px; padding: 8px 12px;
    background: var(--sky); border-radius: var(--tj-r-sm); font-size: .82rem; }
.stagelive__k { color: var(--muted); font-weight: 700; }
.stagelive__v { color: var(--navy); font-weight: 800; }
.stagelive__log { margin-inline-start: auto; }

.loghead { display: flex; align-items: center; gap: var(--tj-space-3); margin-bottom: 14px; }
.loghead__emoji { width: 44px; height: 44px; border-radius: var(--tj-r-control); background: linear-gradient(135deg, var(--blue-100), var(--sky)); display: grid; place-items: center; font-size: 1.4rem; }
.loghead strong { display: block; }

.logtable { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--tj-r-control); overflow: hidden; }
.logtable__row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--tj-space-2); padding: 10px 12px; font-size: .82rem; border-bottom: 1px solid var(--line); align-items: center; }
.logtable__row:last-child { border-bottom: none; }
.logtable__row--head { background: var(--sky); color: var(--muted); font-weight: 700; }
.logtable__row--current { background: #fffaf0; }
.logtable__stage { font-weight: 700; color: var(--navy); }

@media (max-width: 640px) {
    .logtable__row { grid-template-columns: 1fr 1fr; }
    .logtable__row--head { display: none; }
    .logtable__stage { grid-column: 1 / -1; }
}

/* ---- Account settings (Digikala-style field grid) ---- */
.acctgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--tj-surface); }
.acctfield { position: relative; padding: 16px 46px 16px 16px; border-bottom: 1px solid var(--line); }
.acctfield:nth-child(odd) { border-inline-end: 1px solid var(--line); }
.acctfield__label { color: var(--muted); font-size: .82rem; margin-bottom: var(--tj-space-2); display: flex; align-items: center; gap: 6px; }
.acctfield__value { color: var(--navy); font-weight: 700; font-size: .95rem; word-break: break-word; }
.acctfield__value--empty { color: var(--tj-text-muted); font-weight: 500; }
.acctfield__act { position: absolute; inset-inline-end: 14px; top: 16px; width: 30px; height: 30px; border-radius: var(--tj-r-xs);
    border: 1px solid var(--line); background: var(--tj-surface); color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; display: grid; place-items: center; }
.acctfield__act:hover { color: var(--navy); border-color: var(--navy); }
.acctfield__act--lock { cursor: default; opacity: .55; }
.vbadge { background: #e7f7ed; color: #1a9d54; font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: var(--tj-r-pill); }

.req { color: #ef4444; }
.identity-modal { width: min(760px, 100%); }
.identity-modal .addrmodal__body { display: block; }
.identity-modal .profile__hint { margin: 0 0 18px; }
.identity-modal .addrform { gap: 14px; }
.identity-modal .addrform__row { grid-template-columns: 160px minmax(0, 1fr); align-items: center; }
.identity-modal .addrform__row > label { display: inline-flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--tj-space-1); margin: 0; white-space: nowrap; }
.identity-modal .birth-date-row { align-items: start; }
.identity-modal .birth-date-row > label { margin-top: 14px; }
.identity-modal .req { display: inline; margin: 0; line-height: 1; }
.identity-modal .fld { width: 100%; min-width: 0; }
.identity-modal .solar-date-input { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--tj-r-sm); background: var(--tj-background); color: var(--ink); font: inherit; cursor: pointer; }
.identity-modal .birth-date-control { min-width: 0; width: 100%; }
.identity-modal .solar-calendar { box-sizing: border-box; width: 100%; min-width: 0; margin-top: 10px; padding: var(--tj-space-3); border: 1px solid var(--line); border-radius: var(--tj-r-md); background: var(--tj-surface); box-shadow: 0 12px 35px rgba(25,52,91,.12); }
.identity-modal .solar-calendar__nav { display: grid; grid-template-columns: 32px minmax(0,1fr) minmax(0,1fr) 32px; align-items: center; gap: 6px; margin-bottom: var(--tj-space-3); }
.identity-modal .solar-calendar__nav button, .identity-modal .solar-calendar__nav select { height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--tj-background); color: var(--ink); font: inherit; }
.identity-modal .solar-calendar__nav button { cursor: pointer; font-size: 1.2rem; }
.identity-modal .solar-calendar__week, .identity-modal .solar-calendar__days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: var(--tj-space-1); text-align: center; }
.identity-modal .solar-calendar__week { margin-bottom: 5px; color: var(--muted); font-size: .78rem; }
.identity-modal .solar-calendar__days button { width: 100%; height: 38px; aspect-ratio: auto; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.identity-modal .solar-calendar__days button:hover { background: var(--tj-surface-muted); }
.identity-modal .solar-calendar__days button.is-selected { background: var(--navy); color: var(--tj-on-brand); }
.identity-modal .solar-calendar__nav select { min-width: 0; width: 100%; }
.identity-modal .solar-date-input { box-sizing: border-box; }
.identity-modal .solar-calendar__days button:disabled { opacity: .35; cursor: default; }
.email-modal { width: min(560px,100%); box-sizing: border-box; }
.email-modal .addrform, .email-modal .addrform__row { display: block; }
.email-modal .fld { width: 100%; min-width: 0; box-sizing: border-box; margin-top: var(--tj-space-2); font-size: 1rem; min-height: 50px; }
.email-modal small { display: block; margin-top: var(--tj-space-2); color: var(--muted); }
@media (max-width: 600px) {
    .identity-modal .addrform__row { grid-template-columns: 1fr; gap: 7px; }
    .identity-modal .birth-date-row > label { margin-top: 0; }
    .identity-modal .solar-calendar__nav { grid-template-columns: 30px minmax(0,1fr) minmax(0,1fr) 30px; }
}
.formerror { background: #fdecec; color: #c0392b; border-radius: var(--tj-r-sm); padding: 8px 12px; font-size: .82rem; margin-top: 10px; }
.checkline { display: flex; align-items: center; gap: var(--tj-space-2); font-size: .9rem; color: var(--navy); margin: 6px 0; cursor: pointer; }
.checkline input { width: 18px; height: 18px; }
.checkline--box { border: 1px solid var(--line); border-radius: var(--tj-r-sm); padding: var(--tj-space-3); margin: 8px 0; }
.triselect { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--tj-space-2); }
.searchbox { margin-bottom: var(--tj-space-3); }
.optlist { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--tj-r-control); }
.optlist__item { text-align: start; padding: 11px 14px; background: var(--tj-surface); border: none; border-bottom: 1px solid var(--line); cursor: pointer; font-size: .9rem; color: var(--navy); }
.optlist__item:last-child { border-bottom: none; }
.optlist__item:hover { background: var(--sky); }
.optlist__item--active { background: var(--blue-100); font-weight: 800; }
.radioline { display: flex; gap: var(--tj-space-3); align-items: flex-start; border: 1px solid var(--line); border-radius: var(--tj-r-control); padding: 14px; margin: 10px 0; cursor: pointer; }
.radioline--active { border-color: var(--navy); background: var(--sky); }
.radioline input { margin-top: var(--tj-space-1); width: 18px; height: 18px; }
.radioline strong { display: block; color: var(--navy); margin-bottom: var(--tj-space-1); }
.radioline span { color: var(--muted); font-size: .8rem; line-height: 1.6; }

@media (max-width: 640px) {
    .acctgrid { grid-template-columns: 1fr; }
    .acctfield:nth-child(odd) { border-inline-end: none; }
    .triselect { grid-template-columns: 1fr; }
}

/* ---- Customer order tracking ---- */
.otrack { margin: 18px 0 10px; }
.otrack__scroller, .osub__scroller, .oreturn__scroller { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.otrack__steps { min-width: 760px; display: grid; grid-template-columns: repeat(7, minmax(96px, 1fr)); direction:inherit; padding: 8px 0 12px; }
.otrack__step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 0 6px; border: 0; background: transparent; color: #9aa6b8; font-family: inherit; opacity: 1; }
.otrack__step:not(:last-child)::before { content: ""; position: absolute; z-index: 0; top: 29px; left: -50%; width: 100%; height: 4px; background: var(--tj-border); }
.otrack__step--completed:not(:last-child)::before { background: var(--green); }
.otrack__step--current:not(:last-child)::before { background: linear-gradient(90deg, var(--tj-border) 0 50%, var(--blue-500) 50% 100%); }
.otrack__step--cancelled:not(:last-child)::before { background: linear-gradient(90deg, var(--tj-border) 0 50%, var(--tj-color-danger) 50% 100%); }
.otrack__step--return:not(:last-child)::before { background: linear-gradient(90deg, var(--tj-border) 0 50%, #f59e0b 50% 100%); }
.otrack__node { position: relative; z-index: 1; width: 58px; height: 58px; border: 4px solid var(--tj-border); border-radius: 50%; display: grid; place-items: center; color: #98a4b5; background: var(--tj-surface); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.otrack__step--completed { color: var(--green); }
.otrack__step--completed .otrack__node { border-color: var(--green); color: var(--green); background: #effaf4; }
.otrack__step--current { color: var(--blue-500); cursor: pointer; }
.otrack__step--current .otrack__node { border-color: var(--blue-500); color: var(--blue-500); background: var(--tj-surface-muted); animation: order-stage-pulse 2s ease-out infinite; }
.otrack__step--current:hover .otrack__node { transform: translateY(-2px); }
.otrack__step--cancelled { color: var(--tj-color-danger); cursor: pointer; }
.otrack__step--cancelled .otrack__node { border-color: var(--tj-color-danger); color: var(--tj-color-danger); background: var(--tj-danger-surface); }
.otrack__step--return { color: #d97706; cursor: pointer; }
.otrack__step--return .otrack__node { border-color: #f59e0b; color: #d97706; background: #fff8e8; }
.otrack__check { position: absolute; top: -6px; inset-inline-end: -6px; width: 22px; height: 22px; border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; color: var(--tj-on-brand); background: var(--green); }
.otrack__check .mud-icon-root { font-size: 15px; }
.otrack__title { margin-top: 5px; font-size: .84rem; font-weight: 800; white-space: nowrap; color: currentColor; }
.otrack__reached { min-height: 21px; font-size: .78rem; font-weight: 800; color: currentColor; }
.otrack__duration { max-width: 118px; font-size: .68rem; line-height: 1.6; color: var(--muted); text-align: center; }

@keyframes order-stage-pulse {
    0% { box-shadow: 0 0 0 0 rgba(47,111,237,.35); }
    70% { box-shadow: 0 0 0 12px rgba(47,111,237,0); }
    100% { box-shadow: 0 0 0 0 rgba(47,111,237,0); }
}

.osub { margin: 4px 0 14px; padding: var(--tj-space-4); border: 1px solid #cfe0ff; border-radius: var(--tj-r-md); background: var(--tj-background); }
.osub__head { display: flex; justify-content: space-between; gap: var(--tj-space-3); align-items: flex-start; margin-bottom: 14px; }
.osub__head strong, .osub__head span { display: block; }
.osub__head strong { color: var(--navy); }
.osub__head span { color: var(--muted); font-size: .76rem; }
.osub__close { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--tj-r-xs); background: var(--tj-surface); color: var(--muted); font-family: inherit; font-size: 1.2rem; cursor: pointer; }
.osub__items { min-width: max-content; display: flex; direction:inherit; align-items: flex-start; padding: 5px 0; }
.osub__item { position: relative; width: 170px; display: grid; justify-items: center; gap: var(--tj-space-1); color: #9aa6b8; text-align: center; }
.osub__item:not(:last-child)::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 2px; background: var(--tj-border); }
.osub__dot { position: relative; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid var(--tj-border); border-radius: 50%; background: var(--tj-surface); }
.osub__item--completed { color: var(--green); }
.osub__item--completed .osub__dot { border-color: var(--green); color: var(--green); }
.osub__item--completed:not(:last-child)::before { background: var(--green); }
.osub__item--current { color: var(--blue-500); }
.osub__item--current .osub__dot { border-color: var(--blue-500); color: var(--blue-500); }
.osub__item strong { max-width: 160px; font-size: .8rem; }
.osub__item > span:last-child { font-size: .7rem; color: var(--muted); }

.otracknote { display: flex; align-items: center; gap: 10px; margin-top: var(--tj-space-3); padding: 12px 14px; border-radius: var(--tj-r-control); }
.otracknote strong, .otracknote span { display: block; }
.otracknote span { font-size: .78rem; }
.otracknote--cancelled { color: var(--tj-color-danger); border: 1px solid #ffc9cf; background: var(--tj-danger-surface); }
.oreturn { margin-top: var(--tj-space-3); padding: 14px; border: 1px solid #fed7aa; border-radius: var(--tj-r-md); background: #fffaf1; }
.oreturn__head { display: flex; align-items: center; gap: var(--tj-space-2); margin-bottom: var(--tj-space-3); color: #b45309; }
.oreturn__steps { min-width: 650px; display: grid; grid-template-columns: repeat(5, 1fr); direction:inherit; }
.oreturn__step { position: relative; display: grid; justify-items: center; gap: 5px; color: #a8a29e; font-size: .75rem; }
.oreturn__step:not(:last-child)::before { content: ""; position: absolute; top: 18px; left: -50%; width: 100%; height: 3px; background: #e7e5e4; }
.oreturn__step > span { position: relative; z-index: 1; width: 38px; height: 38px; border: 2px solid currentColor; border-radius: 50%; display: grid; place-items: center; background: var(--tj-surface); }
.oreturn__step--completed, .oreturn__step--current { color: #d97706; }
.oreturn__step--completed:not(:last-child)::before { background: #f59e0b; }

.internalflow { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--tj-r-control); background: var(--tj-surface); }
.internalflow summary { color: var(--navy); font-size: .82rem; font-weight: 800; cursor: pointer; }
.internalflow__items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.internalflow__item { padding: 4px 9px; border: 1px solid var(--line); border-radius: var(--tj-r-pill); color: #9aa6b8; background: var(--tj-background); font-size: .7rem; }
.internalflow__item--passed { color: #16834d; border-color: #bce8d0; background: #effaf4; }
.internalflow__item--current { color: var(--tj-on-brand); border-color: var(--blue-500); background: var(--blue-500); box-shadow: 0 4px 12px rgba(47,111,237,.2); }
.salecard__noaction { font-size: .78rem; color: var(--muted); }
.tabs--scroll { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.tabs--scroll .tabs__btn { flex: 0 0 auto; }

@media (prefers-reduced-motion: reduce) {
    .otrack__step--current .otrack__node { animation: none; }
}

@media (max-width: 900px) {
    .otrack__scroller { margin-inline: 0; padding-inline: var(--tj-space-2); max-width: 100%; scroll-snap-type: inline proximity; }
    .otrack__step { scroll-snap-align: center; }
}

@media (max-width: 640px) {
    .otrack { margin-top: 14px; }
    .otrack__steps { min-width: 735px; }
    .otrack__node { width: 52px; height: 52px; }
    .otrack__step:not(:last-child)::before { top: 26px; }
    .otrack__title { font-size: .78rem; }
    .otrack__duration { font-size: .65rem; }
    .osub { padding: var(--tj-space-3); }
    .stagelive__log { margin-inline-start: 0; }
}

.adminorder__head { display: flex; justify-content: space-between; align-items: center; gap: var(--tj-space-3); margin-bottom: var(--tj-space-3); }
.adminorder__head strong, .adminorder__head span { display: block; }
.adminorder__head > div > span { color: var(--muted); font-size: .78rem; }
.adminorder__history { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--tj-space-2); max-height: 280px; overflow-y: auto; margin: 14px 0; padding: 10px; border-radius: var(--tj-r-control); background: var(--sky); }
.adminorder__event { display: grid; gap: 2px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--tj-r-sm); background: var(--tj-surface); }
.adminorder__event strong { color: var(--navy); font-size: .78rem; }
.adminorder__event span { color: var(--muted); font-size: .68rem; }

@media (max-width: 640px) {
    .adminorder__head { align-items: flex-start; flex-direction: column; }
}

/* Admin order state-machine workflow */
.admin-orders-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.admin-orders-title .profile__title { margin-bottom: 5px; }
.admin-order-picker { display: grid; gap: 6px; min-width: min(360px, 100%); color: var(--muted); font-size: .76rem; font-weight: 800; }
.admin-order-picker .fld { min-width: 300px; background: var(--tj-surface); }
.workflow-shell { display: grid; gap: var(--tj-space-4); color: var(--navy); }
.workflow-current { position: relative; display: grid; grid-template-columns: auto minmax(220px, 1.3fr) repeat(2, minmax(150px, .65fr)); align-items: center; gap: 18px; overflow: hidden; padding: 22px 24px; border: 1px solid #bed4fb; border-radius: 18px; background: linear-gradient(115deg, #f7fbff 0%, #fff 58%, #edf5ff 100%); box-shadow: 0 12px 30px rgba(29, 78, 216, .08); }
.workflow-current::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, #60a5fa, var(--tj-brand), #60a5fa); }
.workflow-current__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--tj-r-lg); color: var(--tj-on-brand); background: linear-gradient(145deg, #3b82f6, var(--tj-brand)); box-shadow: 0 10px 24px rgba(37, 99, 235, .25); font-size: 1.55rem; }
.workflow-current__main { display: grid; gap: var(--tj-space-1); }
.workflow-current__main > span, .workflow-current__metric > span { color: var(--tj-text-muted); font-size: .72rem; font-weight: 700; }
.workflow-current__main > strong { color: #0f2b59; font-size: 1.25rem; }
.workflow-current__main > small { color: #527099; font-size: .75rem; }
.workflow-current__metric { display: grid; gap: 5px; min-height: 48px; padding-right: 18px; border-right: 1px solid #dbe7f7; }
.workflow-current__metric strong { color: #173967; font-size: .92rem; }
.workflow-info { display: grid; grid-template-columns: repeat(5, 1fr); padding: 14px 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--tj-surface); }
.workflow-info > div { display: grid; gap: var(--tj-space-1); padding: 2px 16px; border-left: 1px solid var(--line); }
.workflow-info > div:last-child { border-left: 0; }
.workflow-info span { color: var(--muted); font-size: .68rem; }
.workflow-info strong { overflow: hidden; color: var(--navy); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.workflow-section, .workflow-actions, .workflow-history { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--tj-surface); box-shadow: 0 8px 24px rgba(15, 42, 85, .045); }
.workflow-section__head { display: flex; align-items: center; justify-content: space-between; gap: var(--tj-space-4); margin-bottom: 18px; }
.workflow-section__head > div { display: grid; gap: 3px; }
.workflow-section__head span { color: #6a83a8; font-size: .69rem; font-weight: 700; }
.workflow-section__head h2 { margin: 0; color: #102b55; font-size: 1rem; }
.workflow-section__hint { padding: 6px 10px; border-radius: var(--tj-r-xs); background: #f5f8fc; }
.snake-flow { overflow-x: auto; padding: 16px 34px 8px; scrollbar-width: thin; }
.snake-row { position: relative; display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 54px; min-width: 850px; margin-bottom: 54px; direction: ltr; }
.snake-row:last-child { margin-bottom: 0; }
.snake-row:nth-child(1)::after, .snake-row:nth-child(2)::after { content: ""; position: absolute; z-index: 0; top: 50%; width: 28px; height: calc(100% + 54px); border: 2px solid #8cb9f9; }
.snake-row:nth-child(1)::after { right: -28px; border-left: 0; border-radius: 0 32px 32px 0; }
.snake-row:nth-child(2)::after { left: -28px; border-right: 0; border-radius: 32px 0 0 32px; }
.snake-node { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; min-height: 142px; padding: 15px 10px 11px; border: 1px solid #d8e1ed; border-radius: 16px; background: var(--tj-background); color: #8694a8; direction:rtl; transition: transform .2s ease, box-shadow .2s ease; }
.snake-node:not(:last-child)::after { content: ""; position: absolute; z-index: -1; top: 50%; right: -55px; width: 55px; height: 2px; background: #a9c8f4; }
.snake-row:not(.snake-row--reverse) .snake-node:not(:last-child)::before { content: ""; position: absolute; top: calc(50% - 4px); right: -55px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid #5e9cf1; }
.snake-row--reverse .snake-node:not(:first-child)::before { content: ""; position: absolute; top: calc(50% - 4px); left: -55px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 7px solid #5e9cf1; }
.snake-node__number { position: absolute; top: -10px; right: 12px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 2px solid #fff; border-radius: var(--tj-r-pill); color: var(--tj-on-brand); background: #aab4c3; font-size: .62rem; font-weight: 900; box-shadow: 0 2px 8px rgba(15, 42, 85, .14); }
.snake-node__icon { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #d4dde9; border-radius: 50%; color: #8190a6; background: var(--tj-surface); font-size: 1.05rem; font-weight: 900; }
.snake-node > strong { min-height: 20px; color: inherit; font-size: .76rem; text-align: center; }
.snake-node__times { display: grid; gap: 2px; width: 100%; padding-top: 7px; border-top: 1px dashed currentColor; opacity: .8; }
.snake-node__times span { display: flex; justify-content: space-between; gap: 5px; font-size: .56rem; }
.snake-node__times b { overflow: hidden; max-width: 100px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.snake-node.is-completed { border-color: #a8e2c3; color: #10884c; background: #f0fbf5; }
.snake-node.is-completed .snake-node__icon, .snake-node.is-completed .snake-node__number { border-color: #b3e8ca; color: #078245; background: #e5f8ed; }
.snake-node.is-current { z-index: 3; border: 2px solid var(--tj-brand); color: #124ea4; background: var(--tj-surface-muted); transform: scale(1.08); box-shadow: 0 0 0 7px rgba(45, 121, 238, .08), 0 14px 30px rgba(31, 100, 210, .18); animation: workflow-pulse 2s ease-in-out infinite; }
.snake-node.is-current .snake-node__icon, .snake-node.is-current .snake-node__number { border-color: var(--tj-brand); color: var(--tj-on-brand); background: var(--tj-brand); }
.snake-node.is-danger { border-color: #f3b9bd; color: #d6323c; background: #fff6f6; }
.snake-node.is-danger .snake-node__icon, .snake-node.is-danger .snake-node__number { border-color: #f2b2b7; color: #d92f3b; background: var(--tj-surface); }
.snake-node.is-danger.is-current { border-color: var(--tj-brand); color: #124ea4; background: var(--tj-surface-muted); box-shadow: 0 0 0 5px rgba(239, 68, 68, .12), 0 14px 30px rgba(31, 100, 210, .18); }
.snake-node.is-danger.is-current .snake-node__icon, .snake-node.is-danger.is-current .snake-node__number { color: var(--tj-on-brand); background: var(--tj-brand); border-color: var(--tj-brand); }
.snake-node.is-return:not(.is-current) { border-color: #d9c7f5; color: #7650bd; background: #faf7ff; }
.snake-node.is-return:not(.is-current) .snake-node__icon, .snake-node.is-return:not(.is-current) .snake-node__number { border-color: #d6c2f4; color: #6f46b6; background: #f5efff; }
.snake-node--compact { min-height: 125px; padding-top: 13px; }
.snake-node--compact::after, .snake-node--compact::before { display: none; }
@keyframes workflow-pulse { 0%, 100% { box-shadow: 0 0 0 6px rgba(45, 121, 238, .07), 0 14px 30px rgba(31, 100, 210, .16); } 50% { box-shadow: 0 0 0 11px rgba(45, 121, 238, .025), 0 18px 36px rgba(31, 100, 210, .21); } }
.workflow-section--branches { background: linear-gradient(180deg, #fff, #fbfcff); }
.workflow-branches { display: grid; grid-template-columns: minmax(250px, .75fr) minmax(530px, 2fr); gap: 14px; }
.workflow-branch-card, .workflow-return { padding: 15px; border: 1px solid #e1e7f0; border-radius: var(--tj-r-md); background: var(--tj-surface); }
.workflow-branch-card header, .workflow-return header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: var(--tj-space-2); }
.workflow-branch-card header strong, .workflow-return header strong { color: #19365f; font-size: .82rem; }
.workflow-branch-card__badge, .workflow-return header span { color: #7487a4; font-size: .64rem; font-weight: 700; }
.workflow-branch-origin, .workflow-return__start { position: relative; width: max-content; margin: 0 auto 28px; padding: 5px 10px; border-radius: var(--tj-r-pill); color: #617696; background: #f2f5f9; font-size: .64rem; font-weight: 700; }
.workflow-branch-origin::after, .workflow-return__start::after { content: ""; position: absolute; top: 100%; left: 50%; width: 1px; height: 28px; border-left: 2px dashed #9eabc0; }
.workflow-branch-line { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.workflow-branch-line--single { grid-template-columns: minmax(170px, 220px); justify-content: center; }
.workflow-return { margin-top: 14px; }
.workflow-return header > div { display: grid; gap: 2px; }
.workflow-return header small { color: var(--muted); font-size: .67rem; }
.workflow-return__request { position: relative; width: min(210px, 100%); margin: 0 auto 32px; }
.workflow-return__request::after { content: ""; position: absolute; top: 100%; left: 50%; height: 32px; border-left: 2px dashed #8b5bd1; }
.workflow-return__split { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(580px, 2fr); gap: 50px; position: relative; }
.workflow-return__split::before { content: ""; position: absolute; top: -17px; right: 12%; left: 12%; border-top: 2px dashed #8b5bd1; }
.workflow-return__rejected, .workflow-return__approved { position: relative; }
.workflow-return__rejected::before, .workflow-return__approved::before { content: ""; position: absolute; bottom: 100%; left: 50%; height: 17px; border-left: 2px dashed #8b5bd1; }
.workflow-return__approved { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.workflow-return__approved .snake-node:not(:last-child)::after { display: block; z-index: 0; top: 50%; right: auto; left: calc(100% + 1px); width: 20px; height: 0; border-top: 2px dashed #8b5bd1; background: none; }
.workflow-bottom { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(500px, 1.5fr); gap: var(--tj-space-4); align-items: start; }
.workflow-actions__list { display: grid; gap: 9px; }
.workflow-action { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 13px; border: 1px solid; border-radius: 11px; background: var(--tj-surface); font-family: inherit; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.workflow-action:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 7px 17px rgba(15, 42, 85, .08); }
.workflow-action:disabled { opacity: .55; cursor: wait; }
.workflow-action > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--tj-r-xs); color: var(--tj-on-brand); background: var(--workflow-action-color); font-weight: 900; }
.workflow-action strong { color: var(--workflow-action-color); font-family: inherit; font-size: .75rem; }
.workflow-action--success { --workflow-action-color: #12834c; border-color: #a5dfbf; background: #f2fbf6; }
.workflow-action--warning { --workflow-action-color: #c56b08; border-color: #f6c88e; background: #fffaf1; }
.workflow-action--danger { --workflow-action-color: #d72f3a; border-color: #f2afb4; background: #fff7f7; }
.workflow-action--return { --workflow-action-color: #7045b5; border-color: #d4bdf2; background: #faf7ff; }
.workflow-actions__empty { padding: var(--tj-space-4); border: 1px dashed #cbd5e1; border-radius: 11px; color: #708198; background: var(--tj-background); font-size: .76rem; text-align: center; }
.workflow-actions__note { margin: 14px 0 0; padding: 9px 10px; border-radius: 9px; color: #5b7190; background: #eff6ff; font-size: .65rem; line-height: 1.8; }
.workflow-history ol { position: relative; display: grid; gap: 0; max-height: 420px; margin: 0; padding: 0 0 0 8px; overflow-y: auto; overscroll-behavior: contain; list-style: none; scrollbar-width: thin; scrollbar-color: #9eb2ce #edf2f8; }
.workflow-history ol::-webkit-scrollbar { width: 7px; }
.workflow-history ol::-webkit-scrollbar-track { border-radius: var(--tj-r-xs); background: #edf2f8; }
.workflow-history ol::-webkit-scrollbar-thumb { border-radius: var(--tj-r-xs); background: #9eb2ce; }
.workflow-history ol::before { content: ""; position: absolute; top: 10px; right: 6px; bottom: 10px; width: 2px; background: var(--tj-border); }
.workflow-history li { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 0 25px 15px 0; }
.workflow-history li:last-child { padding-bottom: 0; }
.workflow-history__dot { position: absolute; z-index: 1; top: 6px; right: 0; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: #95a3b6; box-shadow: 0 0 0 1px #c9d4e2; }
.workflow-history li.is-current .workflow-history__dot { background: #2777ec; box-shadow: 0 0 0 3px rgba(39,119,236,.13); }
.workflow-history time { color: #71829a; font-size: .64rem; direction: ltr; text-align:start; }
.workflow-history li > div { display: grid; gap: 2px; }
.workflow-history strong { color: #17365f; font-size: .75rem; }
.workflow-history small { color: var(--muted); font-size: .64rem; }

@media (max-width: 1100px) {
    .workflow-current { grid-template-columns: auto 1fr 1fr; }
    .workflow-current__metric:last-child { grid-column: 2 / -1; }
    .workflow-info { grid-template-columns: repeat(3, 1fr); }
    .workflow-branches, .workflow-bottom { grid-template-columns: 1fr; }
    .workflow-return__split { grid-template-columns: 190px minmax(580px, 1fr); overflow-x: auto; }
}

@media (max-width: 700px) {
    .admin-orders-title { align-items: stretch; flex-direction: column; }
    .admin-order-picker, .admin-order-picker .fld { min-width: 0; width: 100%; }
    .workflow-current { grid-template-columns: auto 1fr; padding: 18px; }
    .workflow-current__metric { grid-column: 1 / -1; padding: 10px 0 0; border-top: 1px solid #dbe7f7; border-right: 0; }
    .workflow-current__metric:last-child { grid-column: 1 / -1; }
    .workflow-info { grid-template-columns: 1fr 1fr; }
    .workflow-info > div { padding: var(--tj-space-2); border-left: 0; border-bottom: 1px solid var(--line); }
    .workflow-section, .workflow-actions, .workflow-history { padding: 14px; }
    .workflow-section__head { align-items: flex-start; flex-direction: column; }
    .workflow-branch-line { grid-template-columns: 1fr 1fr; }
    .workflow-branches { grid-template-columns: 1fr; }
    .workflow-return__split { grid-template-columns: 170px minmax(580px, 1fr); }
    .workflow-history li { grid-template-columns: 75px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .snake-node.is-current { animation: none; }
}

/* ---- Marketplace browse and category page ---- */
.marketbrowse { padding-block: 10px 44px; }
.browsehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin: 8px 0 18px; }
.browsehead h1 { color: var(--ink); font-size: 1.55rem; }
.browsehead p { margin: 3px 0 0; color: var(--muted); font-size: .88rem; }
.browsehead__market { padding: 6px 12px; border: 1px solid #cfe0ff; border-radius: var(--tj-r-pill); color: var(--navy); background: var(--tj-background); font-size: .75rem; font-weight: 800; }

.sortbar { position: sticky; top: 167px; z-index: 18; display: flex; align-items: center; gap: var(--tj-space-3); min-height: 54px; margin-bottom: var(--tj-space-3); padding: 0 14px; border: 1px solid var(--line); border-radius: var(--tj-r-md); background: rgba(255,255,255,.96); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); }
.sortbar__label { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: .82rem; font-weight: 800; }
.sortbar__items { display: flex; align-items: stretch; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sortbar__items::-webkit-scrollbar { display: none; }
.sortbar__item { position: relative; flex: 0 0 auto; min-height: 52px; padding: 0 11px; border: 0; background: transparent; color: var(--muted); font-family: inherit; font-size: .75rem; white-space: nowrap; cursor: pointer; transition: color .18s ease, background .18s ease; }
.sortbar__item:hover { color: var(--blue); background: var(--sky); }
.sortbar__item--active { color: var(--blue); font-weight: 800; }
.sortbar__item--active::after { content: ""; position: absolute; right: 9px; bottom: 0; left: 9px; height: 3px; border-radius: 3px 3px 0 0; background: var(--blue-500); }

.quickfilters { display: flex; gap: var(--tj-space-2); margin-bottom: var(--tj-space-4); padding-bottom: 2px; overflow-x: auto; scrollbar-width: thin; }
.quickfilter { flex: 0 0 auto; padding: 8px 13px; border: 1px solid var(--line); border-radius: var(--tj-r-pill); background: var(--tj-surface); color: var(--ink); font-family: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; box-shadow: 0 2px 7px rgba(11,61,145,.04); transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease; }
.quickfilter:hover { transform: translateY(-1px); border-color: #a9c4f5; color: var(--blue); }
.quickfilter--active { border-color: var(--blue-500); color: var(--blue); background: var(--blue-100); }

.browsegrid { --browse-filter-width: 320px; position: relative; display: grid; grid-template-columns: var(--browse-filter-width) minmax(0, 1fr); gap: 20px; align-items: start; direction:inherit; transition: grid-template-columns .2s ease; }
.browse-filter-tab { position: fixed; z-index: 70; top: 50%; right: max(16px, calc((100vw - var(--container)) / 2 + 16px)); display: grid; place-items: center; width: 44px; height: 46px; padding: 0; border: 1px solid rgba(47,111,237,.22); border-radius: 9px 0 0 9px; color: rgba(11,61,145,.42); background: rgba(255,255,255,.14); box-shadow: none; backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); font-family: inherit; cursor: pointer; transform: translateY(-50%); transition: right .2s ease, width .15s ease, height .15s ease, background .15s ease; }
.browse-filter-tab:hover { color: rgba(11,61,145,.66); background: rgba(235,243,255,.28); }
.browse-filter-tab[aria-expanded="true"] { right: calc(max(16px, calc((100vw - var(--container)) / 2 + 16px)) + var(--browse-filter-width) - 17px); width: 34px; height: 34px; border-color: rgba(47,111,237,.18); border-radius: 50%; color: rgba(11,61,145,.42); background: rgba(47,111,237,.08); box-shadow: none; }
@media (min-width: 901px) {
    .browsegrid--filters-collapsed { grid-template-columns: minmax(0, 1fr); }
    .browsegrid--filters-collapsed .filterbox { display: none; }
}
.filterbox { position: sticky; top: 233px; max-height: calc(100vh - 245px); overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--tj-surface); box-shadow: var(--shadow-sm); scrollbar-width: thin; }
.filterbox__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--tj-space-2); min-height: 54px; padding: 0 15px; border-bottom: 1px solid var(--line); background: var(--tj-surface); }
.filterbox__head strong { margin-inline-end: auto; color: var(--ink); font-size: 1rem; }
.filterbox__close { display: none; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--tj-r-xs); background: var(--tj-surface); color: var(--muted); font-family: inherit; font-size: 1.15rem; cursor: pointer; }
.filtergroup { border-bottom: 1px solid var(--line); }
.filtergroup:last-of-type { border-bottom: 0; }
.filtergroup summary { position: relative; padding: 13px 16px; color: var(--ink); font-size: .84rem; font-weight: 800; cursor: pointer; list-style: none; }
.filtergroup summary::-webkit-details-marker { display: none; }
.filtergroup summary::after { content: "+"; position: absolute; inset-inline-end: 16px; color: var(--muted); font-size: 1rem; font-weight: 500; }
.filtergroup[open] summary::after { content: "−"; }
.filtergroup__body { padding: 0 16px 15px; }
.filterchecks { display: grid; gap: var(--tj-space-2); }
.filterchecks--inline { grid-template-columns: 1fr 1fr; }
.filterchecks--scroll { max-height: 170px; margin-top: 10px; overflow-y: auto; }
.filterchecks label { display: flex; align-items: center; gap: var(--tj-space-2); color: #415371; font-size: .79rem; cursor: pointer; }
.filterchecks input { width: 16px; height: 16px; accent-color: var(--blue-500); }
.filtersearch, .filterselects input, .pricefields input { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--tj-surface); color: var(--ink); font-family: inherit; font-size: .75rem; outline: none; }
.filtersearch { padding: 0 10px; }
.filtersearch:focus, .filterselects input:focus, .pricefields input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(47,111,237,.08); }
.filterselects { display: grid; gap: var(--tj-space-2); }
.filterselects input { padding: 0 9px; }
.pricefields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--tj-space-2); }
.pricefields label { color: var(--muted); font-size: .68rem; }
.pricefields input { display: block; margin-top: var(--tj-space-1); padding: 0 7px; direction: ltr; text-align:start; }
.priceslider { width: 100%; margin-top: var(--tj-space-3); accent-color: var(--blue-500); }
.filterhint { display: block; color: var(--muted); font-size: .7rem; text-align: center; }
.ratingchoices { display: grid; gap: 6px; }
.ratingchoice { padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--tj-surface); color: var(--muted); font-family: inherit; font-size: .76rem; text-align:start; cursor: pointer; }
.ratingchoice span { color: var(--gold); }
.ratingchoice--active { border-color: var(--blue-500); color: var(--blue); background: var(--blue-100); }
.filterapply { position: sticky; bottom: 0; min-height: 46px; border-radius: 0 0 15px 15px; }
.filtertoggle { display: none; }

.browsecontent { min-width: 0; direction:inherit; }
.activefilters { display: flex; align-items: center; gap: 7px; margin-bottom: var(--tj-space-3); padding: 10px 12px; overflow-x: auto; border: 1px dashed #c8d8ee; border-radius: var(--tj-r-control); background: var(--tj-background); }
.activefilters > span { flex: 0 0 auto; color: var(--muted); font-size: .75rem; font-weight: 700; }
.activefilters button { flex: 0 0 auto; padding: 5px 10px; border: 1px solid #cfe0ff; border-radius: var(--tj-r-pill); background: var(--tj-surface); color: var(--navy); font-family: inherit; font-size: .72rem; cursor: pointer; }
.activefilters b { margin-inline-start: var(--tj-space-1); color: var(--tj-color-danger); }
.resultmeta { display: flex; justify-content: space-between; align-items: center; min-height: 40px; margin-bottom: var(--tj-space-2); color: var(--muted); font-size: .75rem; }
.resultmeta strong { color: var(--ink); }

.marketproducts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--tj-space-3); }
.marketcard { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--tj-surface); box-shadow: 0 3px 12px rgba(11,61,145,.05); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.marketcard:hover { transform: translateY(-4px); border-color: #c5d7f2; box-shadow: var(--shadow); }
.marketcard--service { border-color: #cae8e2; }
.marketcard__media { position: relative; height: 168px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 70% 25%, #fff 0 7%, transparent 8%), linear-gradient(145deg, var(--tj-surface-muted), var(--tj-background)); }
.marketcard--service .marketcard__media { background: radial-gradient(circle at 70% 25%, #fff 0 7%, transparent 8%), linear-gradient(145deg, #e5f7f3, #f7fffd); }
.marketcard__emoji { font-size: 4.2rem; filter: drop-shadow(0 10px 12px rgba(16,35,63,.12)); transition: transform .2s ease; }
.marketcard:hover .marketcard__emoji { transform: scale(1.05); }
.marketcard__kind { position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 9px; border-radius: var(--tj-r-pill); color: var(--navy); background: rgba(255,255,255,.9); font-size: .65rem; font-weight: 800; }
.marketcard--service .marketcard__kind { color: #087c70; }
.marketcard__discount { position: absolute; bottom: 10px; inset-inline-end: 10px; padding: 3px 8px; border-radius: var(--tj-r-pill); color: var(--tj-on-brand); background: #e53935; font-size: .72rem; font-weight: 800; }
.marketcard__tools { position: absolute; z-index: 2; top: 10px; inset-inline-end: 10px; display: grid; gap: 6px; }
.markettool { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(228,235,245,.95); border-radius: 9px; color: var(--muted); background: rgba(255,255,255,.94); cursor: pointer; box-shadow: 0 2px 7px rgba(16,35,63,.08); }
.markettool:hover, .markettool--active { color: #e53958; border-color: #ffc5cf; }
.markettool:nth-child(2).markettool--active { color: var(--blue); border-color: #bdd2fb; }
.marketcard__body { display: flex; flex-direction: column; min-height: 310px; padding: var(--tj-space-3); }
.marketcard__badges { display: flex; flex-wrap: wrap; gap: var(--tj-space-1); min-height: 23px; margin-bottom: 5px; }
.marketcard__badges span { padding: 2px 6px; border-radius: 5px; color: #31567f; background: var(--tj-surface-muted); font-size: .58rem; font-weight: 800; }
.marketcard--service .marketcard__badges span { color: #087c70; background: #e7f7f3; }
.marketcard__title { min-height: 48px; color: var(--ink); font-size: .82rem; font-weight: 800; line-height: 1.75; }
.marketcard__title:hover { color: var(--blue); }
.marketcard__seller { display: flex; align-items: center; gap: 3px; margin-top: 5px; color: var(--muted); font-size: .7rem; }
.marketcard__seller .mud-icon-root { color: var(--blue-500); font-size: 16px; }
.marketcard__stats { display: flex; justify-content: space-between; gap: 6px; margin-top: 7px; color: var(--muted); font-size: .68rem; }
.marketcard__rating { color: #8a6400; font-weight: 800; }
.marketcard__price { display: grid; gap: 1px; margin-top: auto; padding-top: 10px; text-align: left; direction: ltr; }
.marketcard__price del { color: #9ca8b8; font-size: .68rem; }
.marketcard__price strong { color: var(--navy); font-size: .93rem; }
.marketcard__price small { color: var(--muted); font-size: .62rem; }
.marketcard__price span { color: #7b8798; font-size: .62rem; }
.marketcard__action { min-height: 39px; margin-top: 9px; padding: 7px; border-radius: var(--tj-r-sm); font-size: .72rem; }
.marketcard--service .marketcard__action { background: #0b8f80; }
.marketcard--service .marketcard__action:hover { background: #08786c; }

@media (max-width: 1100px) {
    .marketproducts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .browsegrid { --browse-filter-width: 290px; }
}

@media (max-width: 900px) {
    .sortbar { position: static; }
    .browsegrid { display: block; }
    .browse-filter-tab { display: none; }
    .filtertoggle { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--tj-space-3); padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--tj-r-sm); color: var(--navy); background: var(--tj-surface); font-family: inherit; font-weight: 800; cursor: pointer; }
    .filterbox { display: none; position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(360px, 92vw); max-height: none; border-radius: 0; box-shadow: -18px 0 50px rgba(16,35,63,.22); }
    .filterbox--open { display: block; }
    .filterbox__close { display: grid; place-items: center; }
    .filterbox__head { min-height: 60px; }
    .filterapply { border-radius: 0; }
    .marketproducts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .browsehead { align-items: flex-start; flex-direction: column; }
    .browsehead h1 { font-size: 1.25rem; }
    .sortbar { align-items: flex-start; flex-direction: column; gap: 2px; padding: 8px 10px 0; }
    .sortbar__items { width: 100%; }
    .marketproducts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .marketcard__media { height: 145px; }
    .marketcard__emoji { font-size: 3.5rem; }
    .marketcard__body { min-height: 300px; padding: 10px; }
}

@media (max-width: 430px) {
    .marketbrowse { padding-inline: 10px; }
    .marketcard__media { height: 132px; }
    .marketcard__tools { top: 7px; inset-inline-end: 7px; }
    .markettool { width: 29px; height: 29px; }
    .marketcard__body { min-height: 292px; }
    .marketcard__badges span:nth-child(n+3) { display: none; }
    .marketcard__title { font-size: .76rem; }
    .marketcard__action { font-size: .67rem; }
}

/* ---- Real-time messages and notifications ---- */
.notify { position: relative; }
.notify__toggle { position: relative; }
.notify__panel { position: absolute; z-index: 90; top: calc(100% + 10px); left: 0; width: min(390px, 92vw); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--tj-surface); box-shadow: 0 18px 48px rgba(16,35,63,.18); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
.notify:hover .notify__panel, .notify:focus-within .notify__panel { opacity: 1; visibility: visible; transform: translateY(0); }
.notify__head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid var(--line); }
.notify__head strong { color: var(--ink); }
.notify__head button { border: 0; background: transparent; color: var(--blue); font-family: inherit; font-size:var(--tj-type-help); cursor: pointer; min-height:44px;}
.notify__list { max-height: 390px; overflow-y: auto; }
.notify__item { width: 100%; display: grid; grid-template-columns: 8px 1fr; gap: 9px; padding: 12px 14px; border: 0; border-bottom: 1px solid #eef2f7; background: var(--tj-surface); color: var(--ink); font-family: inherit; text-align:start; cursor: pointer; }
.notify__item:hover { background: var(--tj-background); }
.notify__item--unread { background: var(--tj-surface-muted); }
.notify__dot { width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: transparent; }
.notify__item--unread .notify__dot { background: var(--blue-500); }
.notify__item strong, .notify__item small, .notify__item time { display: block; }
.notify__item strong { font-size: .8rem; }
.notify__item small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: .72rem; line-height: 1.7; text-overflow: ellipsis; white-space: nowrap; }
.notify__item time { margin-top: var(--tj-space-1); color: #97a3b5; font-size: .62rem; }
.notify__empty { padding: 28px 15px; color: var(--muted); font-size: .8rem; text-align: center; }
.notify__all { display: block; padding: 11px; color: var(--blue); background: #fbfdff; font-size: .75rem; font-weight: 800; text-align: center; }

.messages-page { padding-block: 20px 44px; }
.messages-state { min-height: 380px; display: grid; place-items: center; align-content: center; gap: var(--tj-space-3); color: var(--muted); text-align: center; }
.messages-state--card { max-width: 620px; min-height: 330px; margin: 30px auto; padding: 35px; border: 1px solid var(--line); border-radius: var(--tj-r-lg); background: var(--tj-surface); box-shadow: var(--shadow-sm); }
.messages-state--card h1, .messages-state--card h2, .messages-state--card p { margin: 0; }
.messages-state--card h1, .messages-state--card h2 { color: var(--ink); }
.messages-state__icon { font-size: 3.2rem; }
.messages-shell { height: min(720px, calc(100vh - 210px)); min-height: 570px; display: grid; grid-template-columns: 350px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--tj-r-lg); background: var(--tj-surface); box-shadow: 0 12px 36px rgba(16,35,63,.09); direction:inherit; }
.messages-list { min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: #fbfcfe; }
.messages-list__head { min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 12px 17px; border-bottom: 1px solid var(--line); background: var(--tj-surface); }
.messages-list__head h1 { margin: 0; color: var(--ink); font-size: 1.2rem; }
.messages-list__head span { color: var(--muted); font-size: .72rem; }
.messages-refresh { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--tj-r-sm); background: var(--tj-surface); color: var(--blue); font-size: 1.15rem; cursor: pointer; }
.messages-monitor { padding: 9px 13px; color: #8a6100; background: #fff8df; font-size: .69rem; font-weight: 700; }
.messages-list__items { flex: 1; min-height: 0; overflow-y: auto; }
.conversation-card { position: relative; width: 100%; min-height: 92px; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; padding: 13px; border: 0; border-bottom: 1px solid var(--tj-border); background: transparent; color: var(--ink); font-family: inherit; text-align:start; cursor: pointer; transition: background .16s ease; }
.conversation-card:hover { background: #f3f7fc; }
.conversation-card--active { background: #eaf2ff; box-shadow: inset -3px 0 var(--blue-500); }
.conversation-card__avatar, .chat-head__avatar { border-radius: 50%; display: grid; place-items: center; color: var(--tj-on-brand); background: linear-gradient(135deg, var(--navy), var(--blue-500)); font-weight: 900; }
.conversation-card__avatar { width: 46px; height: 46px; font-size: 1.05rem; }
.conversation-card__body { min-width: 0; display: grid; gap: 3px; }
.conversation-card__top, .conversation-card__bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--tj-space-2); }
.conversation-card__top strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.conversation-card__top time { flex: 0 0 auto; color: #94a0b1; font-size: .63rem; }
.conversation-card__context { overflow: hidden; color: var(--blue); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.conversation-card__bottom small { overflow: hidden; color: var(--muted); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.conversation-card__bottom b { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: var(--tj-r-pill); color: var(--tj-on-brand); background: var(--blue-500); font-size: .64rem; }
.presence { position: absolute; top: 49px; right: 47px; width: 11px; height: 11px; border: 2px solid #fbfcfe; border-radius: 50%; background: #aab4c2; }
.presence--online { background: #16a565; }
.messages-empty { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 25px; color: var(--muted); text-align: center; }
.messages-empty span { font-size: 2.5rem; }
.messages-empty strong { color: var(--ink); }
.messages-empty small { max-width: 280px; line-height: 1.8; }
.messages-empty--wide { height: 100%; }
.messages-chat { min-width: 0; display: flex; flex-direction: column; background: var(--tj-background); }
.chat-head { min-height: 76px; display: flex; align-items: center; gap: 11px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--tj-surface); }
.chat-head__back { display: none; width: 44px; height: 44px; border: 0; border-radius: 9px; background: var(--sky); color: var(--navy); font-family: inherit; cursor: pointer; min-height:44px;}
.chat-head__avatar { width: 44px; height: 44px; }
.chat-head__identity { min-width: 0; display: grid; }
.chat-head__identity strong { color: var(--ink); font-size: .9rem; }
.chat-head__identity small { color: var(--muted); font-size: .67rem; }
.chat-head__identity small.is-online { color: #158957; }
.chat-head__context { min-width: 0; margin-inline-start: auto; padding: 7px 10px; border: 1px solid #d7e4f7; border-radius: 9px; background: var(--tj-background); color: var(--blue); font-size: .7rem; }
.chat-head__context a, .chat-head__context span { display: block; max-width: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-messages { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; padding: 18px; }
.chat-start { align-self: center; display: grid; justify-items: center; gap: 5px; margin: auto; padding: 18px 25px; border: 1px solid #dce7f6; border-radius: var(--tj-r-md); color: var(--muted); background: rgba(255,255,255,.78); text-align: center; }
.chat-start span { font-size: 2rem; }
.chat-start strong { color: var(--ink); font-size: .82rem; }
.chat-start small { font-size: .68rem; }
.message-bubble { align-self: flex-start; max-width: min(72%, 620px); padding: 9px 12px 6px; border: 1px solid #e1e7ef; border-radius: 14px 14px 4px 14px; background: var(--tj-surface); box-shadow: 0 2px 8px rgba(16,35,63,.04); }
.message-bubble--mine { align-self: flex-end; border-color: #c6dafa; border-radius: 14px 14px 14px 4px; background: #e7f0ff; }
.message-bubble--removed { color: #8994a4; background: #f1f3f6; font-style: italic; }
.message-bubble__sender { display: block; margin-bottom: 3px; color: var(--blue); font-size: .66rem; }
.message-bubble p { margin: 0; color: var(--ink); font-size: .82rem; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble footer { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 3px; color: #8793a3; font-size: .58rem; direction: ltr; }
.message-read { color: var(--blue); letter-spacing: -3px; }
.message-remove { margin-top: 7px; padding: 4px 7px; border: 1px solid #f5c2c7; border-radius: 7px; color: var(--tj-color-danger); background: #fff6f7; font-family: inherit; font-size:var(--tj-type-help); cursor: pointer; min-height:44px;}
.message-images { display: grid; grid-template-columns: repeat(2, minmax(100px, 1fr)); gap: 5px; margin-top: 6px; }
.message-images img { width: 100%; max-height: 220px; display: block; object-fit: cover; border-radius: 9px; }
.chat-composer { padding: 10px 14px 9px; border-top: 1px solid var(--line); background: var(--tj-surface); }
.chat-composer__row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: end; gap: var(--tj-space-2); }
.chat-composer textarea { min-height:44px; max-height: 120px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--tj-r-control); font-family: inherit; font-size:var(--tj-type-help); outline: none; }
.chat-composer textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(47,111,237,.08); }
.chat-attach { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--tj-surface); font-size: 1.15rem; cursor: pointer; }
.chat-attach input { display: none; }
.chat-send { min-height: 42px; padding: 0 18px; border: 0; border-radius: 11px; color: var(--tj-on-brand); background: var(--blue-500); font-family: inherit; font-weight: 800; cursor: pointer; }
.chat-send:disabled { opacity: .6; cursor: wait; }
.chat-safe { display: block; margin-top: 6px; color: #98a4b5; font-size: .59rem; text-align: center; }
.chat-files { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 7px; }
.chat-files span { flex: 0 0 auto; padding: 5px 9px; border-radius: var(--tj-r-xs); color: #31567f; background: var(--tj-surface-muted); font-size: .65rem; }
.chat-files button { margin-inline-start: 5px; border: 0; background: transparent; color: var(--tj-color-danger); cursor: pointer; }
.chat-admin-note { padding: var(--tj-space-3); border-top: 1px solid #ecdba5; color: #7a5d08; background: #fff9e7; font-size: .72rem; text-align: center; }
.buybox__message { margin-top: var(--tj-space-2); }
.obuy__message { display: flex; justify-content: flex-end; margin-top: 10px; }
.profile__conversation-error { margin-bottom: var(--tj-space-3); }

.notifications-page { max-width: 900px; padding-block: 24px 55px; }
.notifications-page__head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.notifications-page__head h1 { margin: 0; color: var(--ink); font-size: 1.45rem; }
.notifications-page__head p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.notification-feed { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--tj-surface); box-shadow: var(--shadow-sm); }
.notification-feed__item { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) 8px; align-items: center; gap: var(--tj-space-3); padding: var(--tj-space-4); border: 0; border-bottom: 1px solid var(--tj-border); background: var(--tj-surface); color: var(--ink); font-family: inherit; text-align:start; cursor: pointer; }
.notification-feed__item:last-child { border-bottom: 0; }
.notification-feed__item:hover { background: var(--tj-background); }
.notification-feed__item--unread { background: var(--tj-surface-muted); }
.notification-feed__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--tj-surface); box-shadow: inset 0 0 0 1px #dce6f3; font-size: 1.15rem; }
.notification-feed__body { min-width: 0; display: grid; gap: 3px; }
.notification-feed__body strong { font-size: .86rem; }
.notification-feed__body span { overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.notification-feed__body time { color: #98a4b4; font-size: .64rem; }
.notification-feed__item > i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-500); }

@media (max-width: 800px) {
    .messages-page { padding: 10px 0 25px; }
    .messages-shell { height: calc(100vh - 170px); min-height: 520px; grid-template-columns: 1fr; border-inline: 0; border-radius: 0; }
    .messages-list { border-left: 0; }
    .messages-shell--list .messages-chat { display: none; }
    .messages-shell--conversation .messages-list { display: none; }
    .chat-head__back { display: grid; place-items: center; min-height:44px;}
    .chat-head__context { max-width: 35%; }
    .message-bubble { max-width: 86%; }
    .notify__panel { position: fixed; top: 112px; right: 4vw; left: 4vw; width: auto; }
}

@media (max-width: 520px) {
    .messages-shell { height: calc(100vh - 145px); }
    .chat-head { padding-inline: 10px; }
    .chat-head__context { display: none; }
    .chat-messages { padding: 12px 9px; }
    .message-bubble { max-width: 92%; }
    .chat-composer { padding-inline: var(--tj-space-2); }
    .chat-composer__row { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 5px; }
    .chat-attach { width: 38px; }
    .chat-send { padding-inline: var(--tj-space-3); }
    .notifications-page__head { align-items: flex-start; flex-direction: column; }
    .notification-feed__item { grid-template-columns: 38px minmax(0, 1fr) 7px; padding: 12px 10px; }
    .notification-feed__icon { width: 38px; height: 38px; }
}

.product-community { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 28px 48px; }
.community-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--tj-r-lg); background: var(--tj-surface); box-shadow: var(--shadow-sm); }
.community-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.community-panel__head h2 { margin: 3px 0 0; color: var(--ink); font-size: 1.25rem; }
.community-panel__eyebrow { color: var(--blue); font-size: .7rem; font-weight: 800; }
.community-count { padding: 7px 12px; border-radius: var(--tj-r-pill); color: var(--blue); background: var(--sky); font-size: .75rem; font-weight: 800; }
.rating-summary { min-width: 145px; display: grid; justify-items: end; }
.rating-summary strong { color: var(--ink); font-size: 1.55rem; }
.rating-summary__stars, .review-card__stars { color: #f3a712; letter-spacing: 2px; direction: ltr; }
.rating-summary small { color: var(--muted); font-size: .68rem; }
.community-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px 14px; padding: 20px 24px; background: var(--tj-background); border-bottom: 1px solid var(--line); }
.community-compose h3, .community-compose small, .community-compose .form-error, .community-compose .form-success, .community-compose .rating-picker { grid-column: 1 / -1; }
.community-compose h3 { margin: 0; color: var(--ink); font-size: .92rem; }
.community-compose small { color: var(--muted); font-size: .65rem; }
.community-textarea { min-height: 82px; resize: vertical; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--tj-r-control); font-family: inherit; line-height: 1.9; outline: none; }
.community-textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(47,111,237,.08); }
.rating-picker { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; direction: ltr; }
.rating-picker__star { padding: 0 2px; border: 0; color: #cbd3df; background: transparent; font-size: 1.65rem; cursor: pointer; }
.rating-picker__star--on { color: #f3a712; }
.form-success { color: #147a50; font-size: .75rem; font-weight: 700; }
.review-list, .question-list { padding: 0 24px; }
.review-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--tj-space-3); padding: 20px 0; border-bottom: 1px solid var(--tj-border); }
.review-card:last-child { border-bottom: 0; }
.review-card__avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--tj-on-brand); background: linear-gradient(135deg, var(--navy), var(--blue-500)); font-weight: 900; }
.review-card__body header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-card__body header strong { color: var(--ink); font-size: .85rem; }
.review-card__body time { color: var(--muted); font-size: .63rem; }
.review-card__body p, .answer-card p { margin: 7px 0 0; color: #33445d; font-size: .8rem; line-height: 2; white-space: pre-wrap; }
.review-card__stars { margin-top: 2px; font-size: .8rem; }
.community-empty { padding: 34px 16px; color: var(--muted); font-size: .8rem; text-align: center; }
.question-card { padding: 22px 0; border-bottom: 1px solid var(--tj-border); }
.question-card:last-child { border-bottom: 0; }
.question-card__head { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: start; }
.question-card__mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--blue); background: var(--sky); font-size: 1rem; font-weight: 900; }
.question-card__head div { display: grid; gap: var(--tj-space-1); }
.question-card__head strong { color: var(--ink); font-size: .88rem; line-height: 1.9; }
.question-card__head small, .question-card__empty { color: var(--muted); font-size: .65rem; }
.answer-list { display: grid; gap: 9px; margin: 14px 48px 0 0; }
.answer-card { display: grid; grid-template-columns: 3px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: var(--tj-r-control); background: var(--tj-background); }
.answer-card__line { border-radius: var(--tj-r-pill); background: #a8b5c7; }
.answer-card--seller { background: var(--tj-surface-muted); }
.answer-card--seller .answer-card__line { background: var(--blue-500); }
.answer-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.answer-card header strong { color: var(--blue); font-size: .72rem; }
.answer-card header span { color: var(--muted); font-size: .61rem; }
.community-more { justify-self: start; border: 0; color: var(--blue); background: transparent; font-family: inherit; font-size:var(--tj-type-help); font-weight: 800; cursor: pointer; min-height:44px;}
.answer-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--tj-space-2); margin: 14px 48px 0 0; }
.moderation-row { display: grid; gap: 10px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.moderation-row:last-child { border-bottom: 0; }
.moderation-row__head { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; }
.moderation-row__icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--tj-r-sm); color: var(--blue); background: var(--sky); font-weight: 900; }
.moderation-row__head div { display: grid; gap: 2px; }
.moderation-row__head strong { color: var(--ink); font-size: .8rem; }
.moderation-row__head span { color: var(--muted); font-size: .67rem; }
.moderation-row p, .moderation-row blockquote { margin: 0; padding: 10px 12px; border-radius: var(--tj-r-sm); color: #33445d; background: var(--tj-background); font-size: .76rem; line-height: 1.9; }
.moderation-row blockquote { border-right: 3px solid #a8b5c7; }
.moderation-row__actions { display: flex; justify-content: flex-end; gap: var(--tj-space-2); }

@media (max-width: 700px) {
    .community-panel__head { align-items: flex-start; padding: 17px 15px; }
    .community-compose { grid-template-columns: 1fr; padding: 16px 15px; }
    .community-compose > * { grid-column: 1; }
    .review-list, .question-list { padding-inline: 15px; }
    .review-card__body header, .answer-card header { align-items: flex-start; flex-direction: column; gap: 2px; }
    .answer-list, .answer-compose { margin-right: 0; }
    .answer-compose { grid-template-columns: 1fr; }
    .rating-summary { min-width: auto; }
}

.entity-icon__image { width: 1.5em; height: 1.5em; display: inline-block; object-fit: contain; vertical-align: middle; }
.cat__icon .entity-icon__image, .shopcard__icon .entity-icon__image { width: 48px; height: 48px; }
.pay__icon .entity-icon__image, .trust__icon .entity-icon__image, .service__icon .entity-icon__image { width: 34px; height: 34px; }
.megamenu__ico .entity-icon__image, .qrow__icon .entity-icon__image, .atbl__emoji .entity-icon__image { width: 28px; height: 28px; }
.cat--disabled, .pay--disabled, .filter-option--disabled, .megamenu__cats .is-disabled { opacity: .55; cursor: not-allowed; }
.pay--disabled { border-style: dashed; }
.megamenu__disabled { min-height: 44px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: var(--tj-space-2); padding: 8px 12px; color: var(--muted); }
.megamenu__disabled small { font-size: .6rem; }
.admin-editrow { margin-block: 14px; padding: var(--tj-space-3); border-radius: var(--tj-r-control); background: var(--tj-background); }
.admin-editrow .entity-icon__image, .addrow > .entity-icon__image { width: 34px; height: 34px; }

.order-search-panel { display: grid; gap: var(--tj-space-3); margin-bottom: var(--tj-space-4); }
.order-search-simple { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.order-search-advanced { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)) auto; gap: 9px; align-items: center; padding-top: var(--tj-space-3); border-top: 1px solid var(--line); }
.persian-range-picker { position: relative; min-width: 0; }
.persian-range-picker__trigger { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--tj-space-2); width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--tj-r-sm); color: var(--ink); background: var(--tj-surface); font-family: inherit; text-align:start; cursor: pointer; }
.persian-range-picker__trigger strong { overflow: hidden; font-size: .7rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.persian-range-picker__trigger small { color: var(--blue); font-size: .65rem; }
.persian-range-picker__popup { position: absolute; z-index: 40; inset-block-start: calc(100% + 7px); inset-inline-start: 0; width: min(330px, calc(100vw - 36px)); padding: 14px; border: 1px solid var(--tj-border); border-radius: 15px; background: var(--tj-surface); box-shadow: 0 18px 44px rgba(15, 42, 85, .18); }
.persian-range-picker__head { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: var(--tj-space-2); margin-bottom: 10px; }
.persian-range-picker__head strong { color: var(--navy); font-size: .8rem; text-align: center; }
.persian-range-picker__head button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--tj-border); border-radius: 9px; color: var(--navy); background: var(--tj-background); font-family: inherit; font-size: 1rem; cursor: pointer; }
.persian-range-picker__weekdays, .persian-range-picker__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--tj-space-1); }
.persian-range-picker__weekdays { margin-bottom: 5px; color: var(--muted); font-size: .6rem; text-align: center; }
.persian-range-picker__day { display: grid; place-items: center; min-width: 0; height: 34px; padding: 0; border: 0; border-radius: 9px; color: #35455d; background: transparent; font-family: inherit; font-size: .7rem; cursor: pointer; }
.persian-range-picker__day:hover { background: var(--blue-100); }
.persian-range-picker__day.is-in-range { border-radius: 4px; background: #eaf2ff; }
.persian-range-picker__day.is-selected { color: var(--tj-on-brand); background: var(--blue); font-weight: 900; }
.persian-range-picker__day.is-today:not(.is-selected) { box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }
.persian-range-picker__day.is-empty { cursor: default; }
.persian-range-picker__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--tj-border); color: var(--muted); font-size: .62rem; }
.order-amount-filter { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(250px, 340px) minmax(220px, 1fr) auto; gap: var(--tj-space-4); align-items: end; padding: 12px 14px; border: 1px solid #e2e8f1; border-radius: var(--tj-r-control); background: var(--tj-background); }
.order-amount-filter .priceslider { margin: 0 0 8px; }
.order-amount-filter .filterhint { align-self: center; white-space: nowrap; }
.list-pager { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: var(--tj-space-3); padding: 10px 12px; border: 1px solid #e2e8f1; border-radius: var(--tj-r-control); background: var(--tj-surface); }
.list-pager__summary, .list-pager__summary label, .list-pager__nav { display: flex; align-items: center; gap: var(--tj-space-2); }
.list-pager__summary { color: var(--muted); font-size: .68rem; }
.list-pager__summary strong { color: var(--navy); }
.list-pager__summary select { min-width: 64px; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--tj-r-xs); color: var(--ink); background: var(--tj-surface); font-family: inherit; }
.list-pager__nav button { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--tj-border); border-radius: var(--tj-r-xs); color: var(--navy); background: var(--tj-surface); font-family: inherit; font-size: .68rem; cursor: pointer; }
.list-pager__nav button:hover:not(:disabled), .list-pager__nav button.is-active { border-color: var(--blue); color: var(--tj-on-brand); background: var(--blue); }
.list-pager__nav button:disabled { opacity: .42; cursor: default; }
.admin-order-table, .seller-order-table, .profile-order-table { padding: 0; overflow-x: auto; overflow-y: visible; scrollbar-gutter: stable; }
.admin-order-table__head, .admin-order-table__row { display: grid; grid-template-columns: 1.05fr 1fr 1fr .65fr 1.4fr .9fr 1.1fr 1.15fr 1.05fr 28px; gap: 10px; align-items: center; min-width: 1250px; }
.seller-order-table__head, .seller-order-table__row { display: grid; grid-template-columns: 1.05fr 1fr .95fr 1.15fr .7fr .9fr 1.05fr 1.05fr 28px; gap: 10px; align-items: center; min-width: 1100px; }
.profile-order-table__head, .profile-order-table__row { display: grid; grid-template-columns: 1.05fr 1.4fr 1.4fr .65fr .9fr .9fr 1.05fr 1.05fr 28px; gap: 10px; align-items: center; min-width: 1150px; }
.admin-order-table__head, .seller-order-table__head, .profile-order-table__head { padding: 13px 16px; color: #65758d; background: var(--tj-background); border-bottom: 1px solid var(--line); font-size: .65rem; font-weight: 800; }
.admin-order-table__head button, .seller-order-table__head button, .profile-order-table__head button { display: inline-flex; align-items: center; gap: var(--tj-space-1); padding: 0; border: 0; color: inherit; background: none; font-family: inherit; font-size: inherit; font-weight: inherit; text-align:start; cursor: pointer; }
.admin-order-table__head button small, .seller-order-table__head button small, .profile-order-table__head button small { color: var(--blue); font-size: .55rem; }
.admin-order-table__row, .seller-order-table__row, .profile-order-table__row { width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--tj-border); color: #35455d; background: var(--tj-surface); font-family: inherit; font-size: .7rem; text-align:start; cursor: pointer; transition: background .18s ease; }
.admin-order-table__row--alt, .seller-order-table__row--alt, .profile-order-table__row--alt { background: var(--tj-background); }
.admin-order-table__row:hover, .seller-order-table__row:hover, .profile-order-table__row:hover, .admin-order-table__row.is-expanded, .seller-order-table__row.is-expanded, .profile-order-table__row.is-expanded { background: #eaf2ff; }
.admin-order-table__row strong, .seller-order-table__row strong, .profile-order-table__row strong { color: var(--ink); }
.admin-order-table__chevron, .admin-order-table__row > span:last-child, .seller-order-table__row > span:last-child, .profile-order-table__row > span:last-child { color: var(--blue); font-size: 1rem; text-align: center; transition: transform .18s ease; }
.admin-order-table__row.is-expanded .admin-order-table__chevron, .seller-order-table__row.is-expanded > span:last-child, .profile-order-table__row.is-expanded > span:last-child { transform: rotate(180deg); }
.admin-order-table__detail, .seller-order-table__detail, .profile-order-table__detail { display: grid; gap: var(--tj-space-4); min-width: 0; padding: 18px; border-bottom: 1px solid var(--line); background: var(--tj-background); }
.admin-order-table__detail .workflow-shell, .seller-order-table__detail .workflow-shell, .profile-order-table__detail .workflow-shell { min-width: 0; max-width: 100%; }
.admin-order-overview { display: grid; grid-template-columns: .8fr .8fr 2fr 1fr; gap: 10px; }
.admin-order-overview > div { display: grid; gap: var(--tj-space-1); padding: 11px 12px; border: 1px solid #e6ebf2; border-radius: 11px; background: var(--tj-surface); }
.admin-order-overview small { color: var(--muted); font-size: .6rem; }
.admin-order-overview strong { color: var(--ink); font-size: .72rem; line-height: 1.8; }
.admin-order-line, .buyer-order-line { display: grid; gap: 14px; padding: 14px; border: 1px solid var(--tj-border); border-radius: 16px; background: var(--tj-surface); }
.admin-order-line__head, .buyer-order-line__head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-bottom: var(--tj-space-3); border-bottom: 1px solid var(--tj-border); }
.admin-order-line__head > div, .buyer-order-line__head > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: .68rem; }
.admin-order-line__head strong, .buyer-order-line__head strong { color: var(--ink); font-size: .8rem; }
.admin-order-line__emoji { font-size: 1.5rem; }
.buyer-order-line + .buyer-order-line { margin-top: 2px; }
.order-item-list { overflow: hidden; border: 1px solid var(--tj-border); border-radius: 13px; background: var(--tj-surface); }
.order-item-list__head, .order-item-list__row { display: grid; grid-template-columns: minmax(220px, 1.6fr) minmax(110px, .75fr) minmax(145px, .9fr) minmax(135px, .85fr) 28px; gap: 10px; align-items: center; }
.order-item-list__head { padding: 9px 13px; color: var(--muted); background: #edf3fa; font-size: .62rem; font-weight: 800; }
.order-item-list__row { width: 100%; min-height: 58px; padding: 9px 13px; border: 0; border-top: 1px solid var(--tj-border); color: var(--ink); background: var(--tj-surface); font-family: inherit; font-size: .68rem; text-align:start; cursor: pointer; }
.order-item-list__row:nth-of-type(4n + 2) { background: var(--tj-background); }
.order-item-list__row:hover, .order-item-list__row.is-expanded { background: #f0f6ff; }
.order-item-list__product { display: flex; align-items: center; gap: var(--tj-space-2); min-width: 0; }
.order-item-list__product b { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; background: var(--sky); font-size: 1.15rem; }
.order-item-list__product strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-item-list__product small { flex: 0 0 auto; color: var(--muted); }
.order-item-list__chevron { color: var(--blue); font-size: 1rem; text-align: center; transition: transform .15s ease; }
.order-item-list__row.is-expanded .order-item-list__chevron { transform: rotate(180deg); }
.order-item-list__detail { padding: var(--tj-space-3); border-top: 1px solid #dbe5f1; background: #f6f9fd; }
.order-item-list__detail .admin-order-line, .order-item-list__detail .buyer-order-line { margin: 0; }
.product-history { margin-block: 18px; overflow: hidden; border: 1px solid var(--tj-border); border-radius: 16px; background: var(--tj-surface); box-shadow: 0 8px 24px rgba(25, 46, 78, .06); }
.product-history__toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 16px 18px; border: 0; color: var(--ink); background: var(--tj-surface); font-family: inherit; text-align:start; cursor: pointer; }
.product-history__toggle > span:first-child { display: grid; gap: var(--tj-space-1); }
.product-history__toggle strong { font-size: .84rem; }
.product-history__toggle small { color: var(--muted); font-size: .64rem; }
.product-history__chevron { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--blue); background: var(--sky); font-size: 1.05rem; }
.product-history__body { display: grid; gap: var(--tj-space-3); padding: 0 18px 18px; border-top: 1px solid var(--tj-border); background: var(--tj-background); }
.product-history__event { margin-top: 14px; overflow: hidden; border: 1px solid #e1e7ef; border-radius: 13px; background: var(--tj-surface); }
.product-history__event > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 13px; border-bottom: 1px solid var(--tj-border); color: var(--navy); background: #f5f8fc; font-size: .68rem; }
.product-history__event > header span { color: var(--muted); font-size: .62rem; }
.product-history__changes { display: grid; }
.product-history__change { display: grid; grid-template-columns: minmax(130px, .45fr) 1.55fr; gap: 14px; align-items: start; padding: 11px 13px; border-bottom: 1px solid #f0f3f7; font-size: .68rem; }
.product-history__change:last-child { border-bottom: 0; }
.product-history__change > strong { color: var(--ink); }
.product-history__change > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; line-height: 1.8; }
.product-history__old, .product-history__new { overflow-wrap: anywhere; padding: 3px 7px; border-radius: 7px; }
.product-history__old { color: #8f3d43; background: var(--tj-danger-surface); text-decoration: line-through; }
.product-history__new { color: #16704b; background: #eaf8f1; }
.product-history__arrow { color: var(--muted); }
.product-history__empty { padding: 26px; color: var(--muted); text-align: center; font-size: .72rem; }
.price-history-chart { margin-top: 14px; padding: var(--tj-space-4); border: 1px solid #e1e7ef; border-radius: var(--tj-r-md); background: var(--tj-surface); }
.price-history-chart > header { display: flex; justify-content: space-between; align-items: center; gap: var(--tj-space-4); }
.price-history-chart > header div { display: grid; gap: 3px; }
.price-history-chart > header div strong { color: var(--ink); font-size: .86rem; }
.price-history-chart > header span { color: var(--muted); font-size: .64rem; }
.price-history-chart > header > strong { color: var(--green); font-size: .86rem; white-space: nowrap; }
.price-history-chart svg { display: block; width: 100%; height: auto; margin-top: var(--tj-space-3); overflow: visible; }
.price-history-chart__grid { stroke: #e8edf4; stroke-width: 1; stroke-dasharray: 5 7; }
.price-history-chart__line { fill: none; stroke: #078be8; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.price-history-chart__point { fill: #fff; stroke: #078be8; stroke-width: 4; }
.price-history-chart__axis { fill: #718096; font-family: inherit; font-size: 16px; text-anchor: end; }
.price-history-chart__date { fill: #718096; font-family: inherit; font-size: 15px; text-anchor: middle; }
.price-history-chart > footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; padding-top: var(--tj-space-2); border-top: 1px solid var(--tj-border); color: var(--muted); font-size: .64rem; }
.price-history-chart > footer span { display: flex; align-items: center; gap: 5px; }
.price-history-chart > footer i { width: 8px; height: 8px; border-radius: 50%; background: #90a4bd; }
.price-history-chart > footer span:nth-child(2) i { background: var(--green); }
.price-history-chart > footer span:nth-child(3) i { background: #078be8; }
.price-history-chart > footer strong { color: var(--ink); }
.addp-history { margin-top: -2px; margin-bottom: 28px; }
.addp--readonly .addp__main input, .addp--readonly .addp__main select, .addp--readonly .addp__main textarea, .addp--readonly .addp__main button, .addp--readonly .addp__main label, .addp--readonly .addp__side input, .addp--readonly .addp__side label { pointer-events: none; opacity: .72; }

.dashboard-trends { display: grid; gap: var(--tj-space-4); margin-bottom: 20px; padding: 18px; border: 1px solid var(--tj-border); border-radius: 18px; background: linear-gradient(135deg, #fff, var(--tj-background)); box-shadow: 0 10px 28px rgba(25, 46, 78, .06); }
.dashboard-trends__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--tj-space-4); }
.dashboard-trends__head > div { display: grid; gap: var(--tj-space-1); }
.dashboard-trends__head h2 { margin: 0; color: var(--ink); font-size: 1rem; }
.dashboard-trends__head p { margin: 0; color: var(--muted); font-size: .68rem; }
.dashboard-trends__range { display: grid; grid-template-columns: auto minmax(125px, 150px); align-items: center; gap: var(--tj-space-2); color: var(--muted); font-size: .66rem; }
.dashboard-trends__range .fld { min-height: 38px; padding-block: 6px; }
.dashboard-trends__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tj-space-3); }
.dashboard-trend-card { min-width: 0; padding: 15px; overflow: hidden; border: 1px solid var(--tj-border); border-radius: 15px; background: rgba(255,255,255,.92); }
.dashboard-trend-card__head { display: flex; align-items: center; gap: 10px; }
.dashboard-trend-card__head > div { display: grid; gap: 2px; }
.dashboard-trend-card__head span { color: var(--muted); font-size: .66rem; }
.dashboard-trend-card__head strong { color: var(--ink); font-size: .95rem; }
.dashboard-trend-card__icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; background: var(--sky); font-size: 1.15rem !important; }
.dashboard-trend-card__chart { display: block; width: 100%; height: 116px; margin-top: var(--tj-space-2); overflow: visible; }
.dashboard-trend-card__gridline { stroke: #e9eef5; stroke-width: 1; stroke-dasharray: 4 6; }
.dashboard-trend-card__dates { display: flex; justify-content: space-between; padding-top: var(--tj-space-1); color: var(--muted); font-size: .58rem; }
.dashboard-trend-card__empty { display: grid; place-items: center; min-height: 140px; color: var(--muted); font-size: .68rem; }

@media (max-width: 1100px) {
    .order-search-advanced { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-order-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .dashboard-trends { padding: 13px; }
    .dashboard-trends__head { align-items: stretch; flex-direction: column; }
    .dashboard-trends__range { grid-template-columns: auto minmax(0, 1fr); }
    .dashboard-trends__grid { grid-template-columns: 1fr; }
    .order-search-simple, .order-search-advanced, .order-amount-filter { grid-template-columns: 1fr; }
    .order-amount-filter .filterhint { white-space: normal; }
    .list-pager { align-items: stretch; flex-direction: column; }
    .list-pager__nav { flex-wrap: wrap; }
    .product-history__change { grid-template-columns: 1fr; gap: 6px; }
    .product-history__body { padding-inline: 10px; }
    .order-item-list { overflow-x: auto; }
    .order-item-list__head, .order-item-list__row { min-width: 720px; }
    .order-item-list__detail { min-width: 0; width: 100%; box-sizing: border-box; position: sticky; inset-inline-start: 0; }
    .admin-order-table__detail, .seller-order-table__detail, .profile-order-table__detail { padding: 10px; }
    .admin-order-overview { grid-template-columns: 1fr; }
    .admin-order-line__head, .buyer-order-line__head { align-items: flex-start; flex-direction: column; }
}

/* Pruned order workflow: avoid empty columns and dangling connectors. */
.workflow-branches.workflow-branches--single { grid-template-columns: minmax(0, 1fr); }
.workflow-branch-line.workflow-branch-line--adaptive { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.workflow-return__split.workflow-return__split--single { grid-template-columns: minmax(0, 1fr); gap: 0; }
.workflow-return__split--single::before { display: none; }
.workflow-return__split--single .workflow-return__rejected { max-width: 220px; margin: 0 auto; width: 100%; }
.workflow-return__split--single .workflow-return__approved { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.snake-row:last-child::after { display: none; }
