/*
 * Sajilo Shopping Core – component styles.
 * Uses the design tokens defined by the Sajilo theme (with fallbacks) so the
 * marketplace UI also works under other themes.
 */
:root {
	--sj-primary: var(--primary, #ff5a1f);
	--sj-primary-dark: var(--primary-dark, #e04a12);
	--sj-secondary: var(--secondary, #1e2a78);
	--sj-accent: var(--accent, #ffb800);
	--sj-bg: var(--background, #f6f7fb);
	--sj-surface: var(--surface, #ffffff);
	--sj-text: var(--text, #1a1d29);
	--sj-muted: var(--text-muted, #5f6577);
	--sj-border: var(--border, #e6e8f0);
	--sj-success: var(--success, #16a34a);
	--sj-warning: var(--warning, #d97706);
	--sj-error: var(--error, #dc2626);
	--sj-radius: var(--radius, 12px);
	--sj-radius-sm: var(--radius-sm, 8px);
	--sj-shadow: var(--shadow, 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06));
	--sj-chart-1: var(--primary, #ff5a1f);
	--sj-chart-2: var(--secondary, #1e2a78);
	--sj-chart-3: var(--success, #16a34a);
}

/* Buttons ----------------------------------------------------------------- */
.sj-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 1px solid var(--sj-border); border-radius: var(--sj-radius-sm); background: var(--sj-surface); color: var(--sj-text); font: inherit; font-weight: 600; font-size: .9rem; line-height: 1; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.sj-btn:hover { border-color: var(--sj-primary); color: var(--sj-primary); }
.sj-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--sj-primary) 40%, transparent); outline-offset: 2px; }
.sj-btn--primary { background: var(--sj-primary); border-color: var(--sj-primary); color: #fff; }
.sj-btn--primary:hover { background: var(--sj-primary-dark); border-color: var(--sj-primary-dark); color: #fff; }
.sj-btn--ghost { background: transparent; }
.sj-btn--sm { min-height: 32px; padding: 0 12px; font-size: .82rem; }
.sj-btn--lg { min-height: 48px; padding: 0 24px; font-size: 1rem; }
.sj-btn[disabled], .sj-btn.is-loading { opacity: .6; pointer-events: none; }
.sj-btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sj-spin .7s linear infinite; }
.sj-link { background: none; border: 0; padding: 0; color: var(--sj-primary); font: inherit; cursor: pointer; text-decoration: underline; }
@keyframes sj-spin { to { transform: rotate(360deg); } }

/* Panels, alerts, status ---------------------------------------------------- */
.sj-panel { background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 20px; margin-bottom: 20px; }
.sj-panel h3 { margin-top: 0; font-size: 1rem; }
.sj-center { text-align: center; }
.sj-center .sj-btn { margin: 4px; }
.sj-muted { color: var(--sj-muted); }
.sj-hint { display: block; color: var(--sj-muted); font-size: .8rem; margin-top: 4px; }
.sj-alert { border-radius: var(--sj-radius-sm); padding: 12px 14px; margin: 0 0 16px; border: 1px solid; font-size: .92rem; }
.sj-alert ul { margin: 6px 0 0 18px; }
.sj-alert--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.sj-alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.sj-alert--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.sj-alert--info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.sj-status { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: #f1f2f6; color: var(--sj-muted); white-space: nowrap; }
.sj-status--completed, .sj-status--available, .sj-status--publish, .sj-status--approved { background: #dcfce7; color: #166534; }
.sj-status--processing, .sj-status--packed, .sj-status--pending, .sj-status--on-hold { background: #fef3c7; color: #92400e; }
.sj-status--shipped, .sj-status--out-for-delivery { background: #dbeafe; color: #1e40af; }
.sj-status--cancelled, .sj-status--failed, .sj-status--refunded, .sj-status--rejected, .sj-status--outofstock { background: #fee2e2; color: #991b1b; }
.sj-neg { color: var(--sj-error); }
.sj-pos { color: var(--sj-success); }
.sj-count { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--sj-primary); color: #fff; font-size: .7rem; font-weight: 700; align-items: center; justify-content: center; }
.sj-empty-state { text-align: center; padding: 40px 16px; background: var(--sj-surface); border: 1px dashed var(--sj-border); border-radius: var(--sj-radius); }
.sj-empty-state__icon { font-size: 2.2rem; margin-bottom: 8px; }
.sj-empty-text { color: var(--sj-muted); }
.sj-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.sj-section-head h2, .sj-section-head h3 { margin: 0; }
.sj-verified { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: var(--sj-success); color: #fff; font-size: 11px; align-items: center; justify-content: center; vertical-align: middle; margin-left: 4px; }
.sj-verified-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; background: #dcfce7; color: #166534; font-size: .75rem; font-weight: 700; vertical-align: middle; margin-left: 8px; }
.sj-stars-inline { color: #f59e0b; font-weight: 600; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.sj-hp { position: absolute !important; left: -9999px; }

/* Forms --------------------------------------------------------------------- */
.sj-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.sj-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sj-field--wide { grid-column: 1 / -1; }
.sj-field label, .sj-fieldset legend { font-weight: 600; font-size: .88rem; }
.sj-form input[type=text], .sj-form input[type=email], .sj-form input[type=tel], .sj-form input[type=password], .sj-form input[type=number], .sj-form input[type=search], .sj-form input:not([type]), .sj-form select, .sj-form textarea,
.sj-qa textarea, .sj-qa input[type=text], .sj-inbox textarea, .sj-modal textarea, .sj-rate-form textarea, .sj-vorder__status input, .sj-vorder__status select, .sj-store-filter input, .sj-store-filter select, .sj-vendors__search input {
	width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--sj-border); border-radius: var(--sj-radius-sm); background: #fff; color: var(--sj-text); font: inherit; font-size: .95rem; box-sizing: border-box;
}
.sj-form textarea, .sj-qa textarea, .sj-inbox textarea, .sj-modal textarea { min-height: 80px; resize: vertical; }
.sj-form input:focus, .sj-form select:focus, .sj-form textarea:focus, .sj-qa textarea:focus, .sj-inbox textarea:focus, .sj-modal textarea:focus { outline: none; border-color: var(--sj-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sj-primary) 18%, transparent); }
.sj-form [aria-invalid=true] { border-color: var(--sj-error); }
.sj-field-error { color: var(--sj-error); font-size: .8rem; }
.sj-fieldset { border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 18px; margin: 0 0 18px; background: var(--sj-surface); }
.sj-fieldset legend { padding: 0 8px; font-size: 1rem; }
.sj-input-prefix { display: flex; border: 1px solid var(--sj-border); border-radius: var(--sj-radius-sm); overflow: hidden; background: #fff; }
.sj-input-prefix span { padding: 10px; background: var(--sj-bg); color: var(--sj-muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; display: flex; align-items: center; }
.sj-input-prefix input { border: 0 !important; box-shadow: none !important; min-width: 0; }
.sj-check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 18px; }
.sj-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--sj-primary); }

/* Become a seller ------------------------------------------------------------ */
.sj-seller-reg { max-width: 920px; margin: 0 auto; }
.sj-seller-reg__intro { background: linear-gradient(135deg, var(--sj-secondary), color-mix(in srgb, var(--sj-secondary) 70%, var(--sj-primary))); color: #fff; border-radius: var(--sj-radius); padding: 24px; margin-bottom: 20px; }
.sj-seller-reg__intro h2 { margin: 0 0 8px; color: #fff; }
.sj-seller-reg__intro .sj-muted, .sj-seller-reg__intro a { color: #e0e4ff; }
.sj-benefits { margin: 0 0 8px; padding-left: 20px; }
.sj-success-panel { text-align: center; padding: 40px 20px; }
.sj-success-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #dcfce7; color: var(--sj-success); font-size: 32px; display: flex; align-items: center; justify-content: center; }

/* Toasts / modal / compare bar ------------------------------------------------ */
.sj-toasts { position: fixed; z-index: 100000; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.sj-toast { background: #1a1d29; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.sj-toast.is-in { opacity: 1; transform: none; }
.sj-toast--error { background: var(--sj-error); }
.sj-no-scroll { overflow: hidden; }
.sj-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.sj-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 18, 30, .55); }
.sj-modal__dialog { position: relative; background: var(--sj-surface); border-radius: var(--sj-radius); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.sj-modal__dialog--wide { width: min(960px, 100%); }
.sj-modal__close { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--sj-muted); border-radius: 50%; }
.sj-modal__close:hover { background: var(--sj-bg); }
.sj-modal__title { margin: 0 0 4px; font-size: 1.2rem; }
.sj-modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.sj-compare-bar { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 9990; display: flex; gap: 10px; align-items: center; background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: 999px; padding: 6px 6px 6px 16px; box-shadow: var(--sj-shadow); font-weight: 600; }
.sj-compare-bar__clear { border: 0; background: var(--sj-bg); border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 18px; }
@media (min-width: 992px) { .sj-toasts { bottom: 24px; } .sj-compare-bar { bottom: 24px; } }

/* Skeleton ------------------------------------------------------------------- */
.sj-skeleton { min-height: 120px; border-radius: var(--sj-radius); background: linear-gradient(90deg, #eef0f5 25%, #f7f8fb 37%, #eef0f5 63%); background-size: 400% 100%; animation: sj-shimmer 1.3s ease infinite; }
.sj-skeleton--grid { min-height: 300px; }
.sj-skeleton--table { min-height: 360px; }
@keyframes sj-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Stat cards + charts ---------------------------------------------------------- */
/* Stat cards: 2 columns on phones, 3 on larger screens (9 cards = 3 full rows); the compact set is 4 across. */
.sj-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.sj-stat-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 640px) {
	.sj-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.sj-stat-grid > :last-child:nth-child(odd) { grid-column: auto; }
}
@media (min-width: 900px) { .sj-stat-grid--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sj-stat-card { position: relative; background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.sj-stat-card.is-highlight { background: linear-gradient(135deg, var(--sj-primary), color-mix(in srgb, var(--sj-primary) 70%, #ffb800)); border-color: transparent; color: #fff; }
.sj-stat-card__icon { position: absolute; top: 12px; right: 12px; opacity: .5; }
.sj-stat-card__icon svg { width: 18px; height: 18px; }
.sj-stat-card__label { font-size: .78rem; color: var(--sj-muted); }
.sj-stat-card.is-highlight .sj-stat-card__label { color: rgba(255,255,255,.85); }
.sj-stat-card__value { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; overflow-wrap: break-word; line-height: 1.25; }
.sj-stat-card__label { padding-right: 26px; }
@media (max-width: 479px) { .sj-stat-card { padding: 12px; } .sj-stat-card__value { font-size: 1.02rem; } .sj-stat-card__label { font-size: .74rem; } }
.sj-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sj-chart-grid .sj-panel--wide { grid-column: 1 / -1; }
.sj-chart { position: relative; min-height: 200px; }
.sj-chart__grid { stroke: #eceef3; }
.sj-chart__axis, .sj-chart__label, .sj-chart__value { fill: #7a8093; font-size: 11px; }
.sj-chart__line { fill: none !important; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.sj-chart__area { opacity: .12; stroke: none !important; }
.sj-chart__guide { stroke: #c9ccd6; stroke-dasharray: 3 3; }
.sj-chart__empty { fill: #a0a5b0; font-size: 13px; }
.sj-c1 { stroke: var(--sj-chart-1); fill: var(--sj-chart-1); }
.sj-c2 { stroke: var(--sj-chart-2); fill: var(--sj-chart-2); }
.sj-c3 { stroke: var(--sj-chart-3); fill: var(--sj-chart-3); }
.sj-chart__tip { position: absolute; pointer-events: none; background: #1a1d29; color: #fff; font-size: 12px; line-height: 1.45; padding: 6px 10px; border-radius: 8px; white-space: nowrap; z-index: 5; }
.sj-chart__legend { display: flex; gap: 14px; font-size: 12px; color: var(--sj-muted); margin-top: 6px; }
.sj-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.sj-dot.sj-c1 { background: var(--sj-chart-1); } .sj-dot.sj-c2 { background: var(--sj-chart-2); } .sj-dot.sj-c3 { background: var(--sj-chart-3); }

/* Tables (stack on mobile) ------------------------------------------------------ */
.sj-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sj-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sj-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--sj-muted); padding: 10px 12px; border-bottom: 1px solid var(--sj-border); background: var(--sj-bg); }
.sj-table td { padding: 12px; border-bottom: 1px solid var(--sj-border); vertical-align: top; }
.sj-table code { font-size: .78rem; background: var(--sj-bg); padding: 2px 6px; border-radius: 4px; }

/* Wallet ---------------------------------------------------------------------- */
.sj-balance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.sj-balance { min-width: 0; }
.sj-balance { background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.sj-balance span { font-size: .8rem; color: var(--sj-muted); }
.sj-balance strong { font-size: 1.25rem; }
.sj-balance small { color: var(--sj-muted); font-size: .72rem; }
.sj-balance--main { grid-column: 1 / -1; background: linear-gradient(135deg, var(--sj-secondary), color-mix(in srgb, var(--sj-secondary) 60%, var(--sj-primary))); border: 0; color: #fff; }
.sj-balance--main span { color: rgba(255,255,255,.8); }
.sj-balance--main strong { font-size: 2rem; }
.sj-wallet__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.sj-wallet .sj-field { margin-bottom: 12px; }
.sj-wd-list { list-style: none; margin: 0; padding: 0; }
.sj-wd-list > li { margin: 0 !important; padding: 12px 0 !important; border-bottom: 1px solid var(--sj-border); display: flex; flex-direction: column; gap: 4px; }
.sj-wd-list > li:last-child { border-bottom: 0; }
.sj-wd-list > li > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.sj-inline-filter select { min-height: 36px; border-radius: var(--sj-radius-sm); border: 1px solid var(--sj-border); padding: 0 8px; }

/* Vendor orders ------------------------------------------------------------------ */
.sj-vorder { background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); margin-bottom: 14px; overflow: hidden; }
.sj-vorder__head, .sj-vorder__foot { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 16px; }
.sj-vorder__head { background: var(--sj-bg); }
.sj-vorder__foot { border-top: 1px solid var(--sj-border); justify-content: space-between; font-size: .88rem; }
.sj-vorder__status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sj-vorder__status select, .sj-vorder__status input { width: auto; min-height: 34px; padding: 4px 8px; font-size: .85rem; }
.sj-vorder__status input { max-width: 130px; }
.sj-vorder__status { margin-left: auto; }
.sj-vorder__status select, .sj-vorder__status input[type=text] { width: auto !important; flex: 0 1 auto; }
.sj-vorder__status input[type=text] { flex: 1 1 110px; max-width: 160px !important; min-width: 0; }
@media (max-width: 767px) { .sj-vorder__status { margin-left: 0; width: 100%; } .sj-vorder__status select, .sj-vorder__status input[type=text] { flex: 1 1 100%; max-width: none !important; width: 100% !important; } .sj-vorder__status .sj-btn { width: 100%; } }
.sj-mini-orders { list-style: none; margin: 0; padding: 0; }
.sj-mini-orders li { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--sj-border); font-size: .9rem; }
.sj-pager { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
.sj-pager .page-numbers { padding: 6px 10px; border: 1px solid var(--sj-border); border-radius: 6px; text-decoration: none; }
.sj-pager .current { background: var(--sj-primary); color: #fff; border-color: var(--sj-primary); }

/* Seller Center (standalone) -------------------------------------------------- */
.sj-seller-center { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.sj-sc-nav { background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 12px; position: sticky; top: 90px; }
.sj-sc-nav__store { padding: 8px 10px 12px; border-bottom: 1px solid var(--sj-border); margin-bottom: 8px; display: flex; flex-direction: column; }
.sj-sc-nav__store a { font-size: .82rem; }
.sj-sc-nav__list { list-style: none; margin: 0; padding: 0; }
.sj-sc-nav__list a { display: flex; justify-content: space-between; padding: 10px; border-radius: var(--sj-radius-sm); text-decoration: none; color: var(--sj-text); font-weight: 500; }
.sj-sc-nav__list a:hover { background: var(--sj-bg); }
.sj-sc-nav__list a.is-active { background: color-mix(in srgb, var(--sj-primary) 10%, #fff); color: var(--sj-primary); }
.sj-sc-nav__select { display: none; }

/* Notifications, inbox --------------------------------------------------------- */
.sj-note-list { list-style: none; margin: 0; padding: 0; background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); }
.sj-note { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--sj-border); }
.sj-note:last-child { border-bottom: 0; }
.sj-note__dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: transparent; flex: none; }
.sj-note.is-unread .sj-note__dot { background: var(--sj-primary); }
.sj-note.is-unread { background: color-mix(in srgb, var(--sj-primary) 4%, #fff); }
.sj-note-list > .sj-note { margin: 0 !important; padding: 14px 16px !important; }
.sj-note__body { flex: 1 1 auto; min-width: 0; }
.sj-note__body strong { display: block; color: var(--sj-text); font-size: .92rem; line-height: 1.35; }
.sj-note__body p { margin: 2px 0 0; color: var(--sj-muted); font-size: .88rem; }
.sj-note__body a, .dokan-dashboard .dokan-dashboard-content .sj-note__body a { color: inherit !important; text-decoration: none; }
.sj-note__body a:hover strong { color: var(--sj-primary); }
.sj-note__body time { display: block; margin-top: 4px; font-size: .75rem; color: var(--sj-muted); }
.sj-inbox { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 460px; background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); overflow: hidden; }
.sj-inbox__threads { border-right: 1px solid var(--sj-border); overflow-y: auto; max-height: 560px; }
.sj-inbox__threads ul { list-style: none; margin: 0; padding: 0; }
.sj-inbox__threads .sj-empty-text { padding: 16px; }
.sj-inbox__thread { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--sj-border); background: none; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; cursor: pointer; font: inherit; color: inherit; }
.sj-inbox__thread small, .sj-inbox__thread time { grid-column: 1 / -1; color: var(--sj-muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sj-inbox__thread.is-active, .sj-inbox__thread:hover { background: var(--sj-bg); }
.sj-inbox__chat { display: flex; flex-direction: column; min-width: 0; }
.sj-inbox__messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; max-height: 460px; background: var(--sj-bg); }
.sj-bubble { max-width: 78%; align-self: flex-start; background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.sj-bubble.is-mine { align-self: flex-end; background: var(--sj-primary); color: #fff; border-color: var(--sj-primary); border-radius: 14px 14px 4px 14px; }
.sj-bubble p { margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.sj-bubble time { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; }
.sj-inbox__compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--sj-border); background: var(--sj-surface); }
.sj-inbox__compose textarea { min-height: 44px !important; }

/* Account overview --------------------------------------------------------------- */
.sj-account-hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.sj-account-hello h2 { margin: 0; }
.sj-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.sj-card-stat { background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 16px; text-decoration: none; color: var(--sj-text); display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s; }
.sj-card-stat:hover { border-color: var(--sj-primary); transform: translateY(-1px); }
.sj-card-stat__value { font-size: 1.6rem; font-weight: 800; }
.sj-card-stat__label { color: var(--sj-muted); font-size: .85rem; }
.sj-order-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.sj-order-card { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius-sm); text-decoration: none; color: var(--sj-text); }
.sj-order-card__num { font-weight: 700; }
.sj-order-card__date { color: var(--sj-muted); font-size: .85rem; }
.sj-order-card__total { font-weight: 700; }

/* Wishlist, coupons, reviews ----------------------------------------------------- */
.sj-wishlist__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sj-wishlist__row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 10px; }
.sj-wishlist__img img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--sj-radius-sm); }
.sj-wishlist__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sj-wishlist__info a { color: var(--sj-text); font-weight: 600; text-decoration: none; }
.sj-wishlist__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sj-in-stock { color: var(--sj-success); }
.sj-out-stock { color: var(--sj-error); }
.sj-coupon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sj-coupon { display: flex; border-radius: var(--sj-radius); overflow: hidden; border: 1px solid var(--sj-border); background: var(--sj-surface); }
.sj-coupon__value { background: var(--sj-primary); color: #fff; font-weight: 800; font-size: 1.3rem; padding: 16px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 96px; border-right: 2px dashed rgba(255,255,255,.6); }
.sj-coupon__value small { font-size: .7rem; }
.sj-coupon__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.sj-coupon__body p { margin: 0; }
.sj-coupon__body small { color: var(--sj-muted); }
.sj-coupon__code { margin-top: 4px; align-self: flex-start; border: 1px dashed var(--sj-primary); background: color-mix(in srgb, var(--sj-primary) 6%, #fff); color: var(--sj-primary); font-weight: 800; letter-spacing: .06em; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-family: inherit; }
.sj-coupon__code span { font-weight: 500; letter-spacing: 0; font-size: .75rem; margin-left: 6px; color: var(--sj-muted); }
.sj-review-list { list-style: none; margin: 0; padding: 0; }
.sj-review-list > li { padding: 14px 0; border-bottom: 1px solid var(--sj-border); }
.sj-review-list__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sj-review-title { margin: 4px 0; }
.sj-review-images { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.sj-review-images img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }

/* Rate vendor --------------------------------------------------------------------- */
.sj-rate-vendors { margin-top: 24px; }
.sj-rate-form h3 { margin-top: 0; }
.sj-star-input { border: 0; padding: 0; margin: 0 0 8px; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 2px; flex-wrap: wrap; }
.sj-star-input legend { float: left; width: 160px; font-size: .88rem; }
.sj-star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sj-star-input label { font-size: 1.5rem; color: #d4d6de; cursor: pointer; line-height: 1; }
.sj-star-input input:checked ~ label, .sj-star-input label:hover, .sj-star-input label:hover ~ label { color: #f59e0b; }
.sj-star-input input:focus-visible + label { outline: 2px solid var(--sj-primary); border-radius: 4px; }

/* Order tracking ---------------------------------------------------------------- */
.sj-tracking { background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 20px; margin-bottom: 24px; }
.sj-tracking h2 { margin-top: 0; font-size: 1.1rem; }
.sj-timeline { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); counter-reset: step; }
.sj-timeline__step { position: relative; text-align: center; padding-top: 30px; font-size: .78rem; color: var(--sj-muted); }
.sj-timeline__step::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 3px; background: var(--sj-border); }
.sj-timeline__step:first-child::before { display: none; }
.sj-timeline__step.is-done::before { background: var(--sj-success); }
.sj-timeline__dot { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--sj-border); z-index: 1; }
.sj-timeline__step.is-done .sj-timeline__dot { background: var(--sj-success); border-color: var(--sj-success); }
.sj-timeline__step.is-done .sj-timeline__dot::after { content: "✓"; color: #fff; font-size: 11px; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.sj-timeline__step.is-done .sj-timeline__label { color: var(--sj-text); font-weight: 600; }
.sj-timeline__label { display: block; }
.sj-timeline__time { display: block; font-size: .7rem; margin-top: 2px; }
.sj-shipments { margin-top: 16px; }
.sj-shipment { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--sj-border); }

/* Q&A ----------------------------------------------------------------------------- */
.sj-qa__ask { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 16px; }
.sj-qa__ask textarea { flex: 1; }
.sj-qa__list { list-style: none; margin: 0; padding: 0; }
.sj-qa__item { padding: 14px 0; border-bottom: 1px solid var(--sj-border); }
.sj-qa__q { margin: 0; font-weight: 600; }
.sj-qa__a { margin: 8px 0 0; }
.sj-qa__meta { margin: 2px 0 0 30px; font-size: .78rem; color: var(--sj-muted); }
.sj-qa__tag { display: inline-flex; width: 22px; height: 22px; border-radius: 6px; background: var(--sj-secondary); color: #fff; font-size: .75rem; font-weight: 700; align-items: center; justify-content: center; margin-right: 6px; }
.sj-qa__tag--a { background: var(--sj-success); }
.sj-qa__answer { display: flex; gap: 6px; margin-top: 8px; }
.sj-info-list { padding-left: 18px; }
.sj-info-list li { margin-bottom: 6px; }

/* Store header ----------------------------------------------------------------------- */
.sj-store-head { background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); overflow: hidden; margin-bottom: 20px; }
.sj-store-head__cover { height: clamp(120px, 22vw, 260px); background: linear-gradient(135deg, var(--sj-secondary), var(--sj-primary)); background-size: cover; background-position: center; }
.sj-store-head__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: end; padding: 0 20px 16px; }
.sj-store-head__logo { width: 104px; height: 104px; border-radius: 20px; border: 4px solid var(--sj-surface); margin-top: -52px; background: var(--sj-bg); overflow: hidden; box-shadow: var(--sj-shadow); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800; color: var(--sj-primary); }
.sj-store-head__logo img { width: 100%; height: 100%; object-fit: cover; }
.sj-store-head__name { margin: 12px 0 6px; font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
.sj-store-head__stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--sj-muted); }
.sj-store-head__stats strong { color: var(--sj-text); }
.sj-store-head__stats svg { width: 14px; height: 14px; vertical-align: -2px; }
.sj-store-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sj-store-tabs { display: flex; gap: 4px; padding: 0 12px; border-top: 1px solid var(--sj-border); overflow-x: auto; scrollbar-width: none; }
.sj-store-tabs::-webkit-scrollbar { display: none; }
.sj-store-tabs a { padding: 14px 12px; color: var(--sj-muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.sj-store-tabs a.is-active, .sj-store-tabs a:hover { color: var(--sj-primary); border-color: var(--sj-primary); }
.sj-store-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.sj-store-filter input { flex: 1 1 220px; width: auto; }
.sj-store-filter select { width: auto; }
.sj-store-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sj-store-cat { background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 14px; text-align: center; text-decoration: none; color: var(--sj-text); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.sj-store-cat img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.sj-store-cat small { color: var(--sj-muted); }
.sj-rating-summary { display: flex; gap: 24px; align-items: center; background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.sj-rating-summary__big { font-size: 3rem; font-weight: 800; line-height: 1; }
.sj-rating-summary__big small { font-size: 1rem; color: var(--sj-muted); }
.sj-rating-summary dl { margin: 0; flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.sj-rating-summary dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; align-items: center; }
.sj-rating-summary dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.sj-meter { flex: 1; height: 8px; border-radius: 99px; background: var(--sj-bg); overflow: hidden; }
.sj-meter span { display: block; height: 100%; background: #f59e0b; }

/* Vendor cards ------------------------------------------------------------------------ */
.sj-vendor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.sj-vendor-card { background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.sj-vendor-card:hover { box-shadow: var(--sj-shadow); transform: translateY(-2px); }
.sj-vendor-card__link { text-decoration: none; color: inherit; display: block; }
.sj-vendor-card__banner { height: 84px; background: linear-gradient(135deg, var(--sj-secondary), var(--sj-primary)); background-size: cover; background-position: center; }
.sj-vendor-card__body { padding: 0 16px 16px; }
.sj-vendor-card__logo { display: flex; width: 64px; height: 64px; margin-top: -32px; border-radius: 16px; border: 3px solid var(--sj-surface); background: var(--sj-bg); overflow: hidden; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5rem; color: var(--sj-primary); }
.sj-vendor-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.sj-vendor-card__name { margin: 8px 0 4px; font-size: 1rem; }
.sj-vendor-card__meta { margin: 0; font-size: .82rem; color: var(--sj-muted); }
.sj-vendors__search { display: flex; gap: 8px; margin-bottom: 20px; max-width: 520px; }

/* Compare ---------------------------------------------------------------------------- */
.sj-compare-table { border-collapse: collapse; min-width: 100%; background: var(--sj-surface); }
.sj-compare-table th, .sj-compare-table td { border: 1px solid var(--sj-border); padding: 12px; vertical-align: top; text-align: left; min-width: 180px; }
.sj-compare-table th { background: var(--sj-bg); width: 140px; min-width: 120px; font-size: .85rem; position: sticky; left: 0; z-index: 1; }
.sj-compare-table img { width: 140px; height: 140px; object-fit: cover; border-radius: var(--sj-radius-sm); display: block; margin-bottom: 8px; }
.sj-compare__name { display: block; font-weight: 700; color: var(--sj-text); text-decoration: none; margin-bottom: 4px; }

/* Contact ---------------------------------------------------------------------------- */
.sj-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
.sj-contact__info { display: flex; flex-direction: column; gap: 14px; }
.sj-contact__item { display: flex; gap: 12px; background: var(--sj-surface); border: 1px solid var(--sj-border); border-radius: var(--sj-radius); padding: 14px; }
.sj-contact__item svg { width: 22px; height: 22px; color: var(--sj-primary); flex: none; }
.sj-contact__item div { display: flex; flex-direction: column; }
.sj-contact__social { display: flex; gap: 10px; flex-wrap: wrap; }
.sj-contact__map { margin-top: 24px; border-radius: var(--sj-radius); overflow: hidden; }
.sj-contact__map iframe { width: 100%; height: 360px; border: 0; display: block; }
.sj-track { max-width: 900px; margin: 0 auto; }

/* Quick view ------------------------------------------------------------------------- */
.sj-qv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.sj-qv__media { position: relative; }
.sj-qv__img { width: 100%; height: auto; border-radius: var(--sj-radius); background: var(--sj-bg); }
.sj-qv__thumbs { display: flex; gap: 6px; margin-top: 8px; }
.sj-qv__thumbs button { border: 1px solid var(--sj-border); border-radius: 8px; padding: 0; background: none; cursor: pointer; overflow: hidden; width: 56px; height: 56px; }
.sj-qv__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.sj-qv__vendor { font-size: .85rem; color: var(--sj-primary); text-decoration: none; font-weight: 600; }
.sj-qv__title { margin: 4px 0 8px; font-size: 1.3rem; }
.sj-qv__price { font-size: 1.4rem; font-weight: 800; color: var(--sj-primary); margin: 8px 0; }
.sj-qv__stock.in { color: var(--sj-success); } .sj-qv__stock.out { color: var(--sj-error); }
.sj-qv__cart { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.sj-qv__cart .quantity input { width: 70px; min-height: 42px; text-align: center; border: 1px solid var(--sj-border); border-radius: var(--sj-radius-sm); }

/* Responsive ---------------------------------------------------------------------------- */
@media (max-width: 991px) {
	.sj-seller-center { grid-template-columns: minmax(0, 1fr); }
	.sj-sc-nav { position: static; }
	.sj-sc-nav__list { display: none; }
	.sj-sc-nav__select { display: block; width: 100%; min-height: 42px; border-radius: var(--sj-radius-sm); border: 1px solid var(--sj-border); padding: 0 10px; }
	.sj-chart-grid, .sj-wallet__cols, .sj-contact { grid-template-columns: minmax(0, 1fr); }
	.sj-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.sj-form-grid { grid-template-columns: minmax(0, 1fr); }
	.sj-balance--main { grid-column: 1 / -1; }
	.sj-inbox { grid-template-columns: minmax(0, 1fr); }
	.sj-inbox__threads { border-right: 0; border-bottom: 1px solid var(--sj-border); max-height: 240px; }
	.sj-inbox.has-active .sj-inbox__threads { max-height: 140px; }
	.sj-store-head__bar { grid-template-columns: auto minmax(0, 1fr); padding: 0 14px 14px; }
	.sj-store-head__logo { width: 80px; height: 80px; margin-top: -40px; }
	.sj-store-head__actions { grid-column: 1 / -1; }
	.sj-store-head__actions .sj-btn { flex: 1; }
	.sj-qv { grid-template-columns: minmax(0, 1fr); }
	.sj-order-card { grid-template-columns: minmax(0, 1fr) auto; }
	.sj-wishlist__row { grid-template-columns: 64px minmax(0, 1fr); }
	.sj-wishlist__actions { grid-column: 1 / -1; justify-content: stretch; }
	.sj-wishlist__actions .sj-btn { flex: 1; }
	.sj-qa__ask { flex-direction: column; align-items: stretch; }
	.sj-timeline { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.sj-timeline__step { text-align: left; padding: 0 0 18px 34px; }
	.sj-timeline__step::before { left: 10px; top: -50%; width: 3px; height: 100%; }
	.sj-timeline__dot { left: 11px; top: 0; }
	/* Stacked tables: each row becomes a card. */
	.sj-table--stack thead { display: none; }
	.sj-table--stack tr { display: block; border: 1px solid var(--sj-border); border-radius: var(--sj-radius-sm); margin-bottom: 10px; padding: 6px 12px; background: var(--sj-surface); }
	.sj-table--stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 0; text-align: right; }
	.sj-table--stack td::before { content: attr(data-label); font-weight: 600; color: var(--sj-muted); text-align: left; }
	.sj-vorder .sj-table thead { display: none; }
	.sj-vorder .sj-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--sj-border); }
	.sj-vorder .sj-table td { display: flex; justify-content: space-between; border: 0; padding: 4px 12px; }
	.sj-vorder .sj-table td::before { content: attr(data-label); color: var(--sj-muted); }
	.sj-rating-summary dl > div { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Keep amounts readable inside marketplace dashboards that restyle prices. */
.sj-balance strong, .sj-balance strong .woocommerce-Price-amount, .sj-balance strong bdi { font-size: 1.25rem !important; font-weight: 800 !important; color: inherit !important; }
.sj-balance--main strong, .sj-balance--main strong .woocommerce-Price-amount, .sj-balance--main strong bdi { font-size: 2rem !important; color: #fff !important; }
.sj-stat-card__value .woocommerce-Price-amount, .sj-stat-card__value bdi { font-size: inherit !important; color: inherit !important; }
@media (max-width: 767px) {
	.sj-balance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sj-balance-grid > .sj-balance:last-child:nth-child(even) { grid-column: 1 / -1; } /* main card + odd count of small cards */
	.sj-balance { padding: 12px; }
	.sj-balance strong, .sj-balance strong .woocommerce-Price-amount, .sj-balance strong bdi { font-size: 1.02rem !important; }
	.sj-balance--main strong, .sj-balance--main strong .woocommerce-Price-amount, .sj-balance--main strong bdi { font-size: 1.6rem !important; }
}
.sj-qv__price { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.sj-qv__price ins { text-decoration: none; order: -1; }
.sj-qv__price del { color: var(--sj-muted); font-size: 1rem; font-weight: 500; }
.sj-qv__price a, .sj-qv__price .amount { text-decoration: none; }
