/**
 * Seller centre styles.
 *
 * Scoped to .sel-* so it never leaks into the public catalog. Relies on the
 * custom properties declared in b2b.css, which always loads first.
 */

/* ---------- Tab bar ---------- */

.sel-navbar {
	background: #fff;
	border-bottom: 1px solid var(--b2b-line);
	position: sticky;
	top: 0;
	z-index: 20;
}

.sel-tabs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.sel-tabs::-webkit-scrollbar {
	display: none;
}

.sel-tab {
	display: inline-block;
	padding: 15px 14px 13px;
	font-size: 14px;
	font-weight: 600;
	color: var(--b2b-muted);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

.sel-tab:hover {
	color: var(--b2b-ink);
}

.sel-tab.is-active {
	color: var(--b2b-brand);
	border-bottom-color: var(--b2b-brand);
}

/* ---------- Banners ---------- */

.sel-banner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px;
	border-radius: var(--b2b-radius);
	margin-bottom: 20px;
	border: 1px solid var(--b2b-line);
	background: #fff;
}

.sel-banner strong {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
}

.sel-banner p {
	margin: 0;
	font-size: 14px;
	color: var(--b2b-muted);
}

.sel-banner--warn {
	background: #fffbeb;
	border-color: #fde68a;
}

.sel-banner--warn strong {
	color: #92400e;
}

.sel-banner--bad {
	background: #fef2f2;
	border-color: #fecaca;
}

.sel-banner--bad strong {
	color: #991b1b;
}

.sel-banner__note {
	margin-top: 8px !important;
	padding: 10px 12px;
	background: rgba(255, 255, 255, .7);
	border-radius: 8px;
	font-size: 13px !important;
	color: #7f1d1d !important;
}

/* ---------- Status pills ---------- */

.sel-pill {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .02em;
	white-space: nowrap;
}

.sel-pill--good {
	background: #ecfdf5;
	color: #047857;
}

.sel-pill--warn {
	background: #fffbeb;
	color: #b45309;
}

.sel-pill--bad {
	background: #fef2f2;
	color: #b91c1c;
}

.sel-pill--muted {
	background: #f1f5f9;
	color: #475569;
}

/* ---------- Stats ---------- */

.sel-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 26px;
}

.sel-stat {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--b2b-line);
	border-radius: var(--b2b-radius);
	text-decoration: none;
	transition: border-color .15s ease, transform .15s ease;
}

.sel-stat:hover {
	border-color: #cbd5e1;
	transform: translateY(-1px);
}

.sel-stat__value {
	font-size: 24px;
	font-weight: 800;
	color: var(--b2b-ink);
	line-height: 1.1;
}

.sel-stat__label {
	font-size: 12.5px;
	color: var(--b2b-muted);
}

/* ---------- Two column layout ---------- */

.sel-cols {
	display: grid;
	grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
	gap: 26px;
	align-items: start;
}

.sel-side {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.sel-stack {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* ---------- Panels ---------- */

.sel-panel {
	background: #fff;
	border: 1px solid var(--b2b-line);
	border-radius: var(--b2b-radius);
	padding: 22px;
}

.sel-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.sel-panel__head h2,
.sel-panel__title {
	font-size: 16px;
	font-weight: 700;
	margin: 0;
}

.sel-panel__sub {
	margin: 4px 0 18px;
	font-size: 13.5px;
	color: var(--b2b-muted);
}

/* ---------- Compact list ---------- */

.sel-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sel-list__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 13px 0;
	border-top: 1px solid #eef2f7;
}

.sel-list__item:first-child {
	border-top: 0;
	padding-top: 0;
}

.sel-list__thumb {
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	border-radius: 9px;
	overflow: hidden;
	background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	color: #94a3b8;
	font-size: 18px;
}

.sel-list__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sel-list__body {
	flex: 1 1 auto;
	min-width: 0;
}

.sel-list__title {
	display: block;
	font-weight: 600;
	font-size: 14.5px;
	color: var(--b2b-ink);
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sel-list__title:hover {
	color: var(--b2b-brand);
}

.sel-list__meta {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	color: var(--b2b-muted);
}

/* ---------- Definition list ---------- */

.sel-dl {
	margin: 0 0 16px;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 8px 14px;
	font-size: 13.5px;
}

.sel-dl dt {
	color: var(--b2b-muted);
}

.sel-dl dd {
	margin: 0;
	color: var(--b2b-ink);
	font-weight: 600;
	text-align: right;
	overflow-wrap: anywhere;
}

/* ---------- Misc ---------- */

.sel-help {
	font-size: 12.5px;
	color: var(--b2b-muted);
	margin: 6px 0 0;
	line-height: 1.5;
}

.b2b-muted-line {
	color: var(--b2b-muted);
	font-size: 13px;
}

.sel-logout {
	margin: 0;
}

.sel-check {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 14px 0 0;
	font-size: 13.5px;
	color: var(--b2b-muted);
	cursor: pointer;
}

.sel-check input {
	width: 16px;
	height: 16px;
}

/* ---------- Empty states ---------- */

.sel-empty {
	text-align: center;
	padding: 30px 20px;
	border: 1px dashed #cbd5e1;
	border-radius: var(--b2b-radius);
	background: #fff;
}

.sel-empty h2 {
	margin: 0 0 6px;
	font-size: 17px;
}

.sel-empty p {
	margin: 0 0 14px;
	color: var(--b2b-muted);
	font-size: 14px;
}

.sel-empty--lg {
	padding: 56px 24px;
}

/* ---------- Auth pages ---------- */

.sel-auth {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: 30px;
	align-items: start;
}

.sel-auth--narrow {
	grid-template-columns: minmax(0, 460px);
	justify-content: center;
}

.sel-auth__title {
	margin: 0 0 4px;
	font-size: 20px;
	font-weight: 800;
}

.sel-auth__sub {
	margin: 0 0 18px;
	font-size: 13.5px;
	color: var(--b2b-muted);
}

.sel-footnote {
	margin: 18px 0 0;
	text-align: center;
	font-size: 13px;
	color: var(--b2b-muted);
}

/* ---------- Product table ---------- */

.sel-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.sel-filters {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.sel-filter {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 13px;
	border-radius: 999px;
	border: 1px solid var(--b2b-line);
	background: #fff;
	font-size: 13px;
	font-weight: 600;
	color: var(--b2b-muted);
	text-decoration: none;
}

.sel-filter:hover {
	border-color: #cbd5e1;
	color: var(--b2b-ink);
}

.sel-filter.is-active {
	background: var(--b2b-ink);
	border-color: var(--b2b-ink);
	color: #fff;
}

.sel-filter__count {
	font-size: 11.5px;
	padding: 1px 6px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
}

.sel-filter.is-active .sel-filter__count {
	background: rgba(255, 255, 255, .18);
	color: #fff;
}

.sel-table-wrap {
	background: #fff;
	border: 1px solid var(--b2b-line);
	border-radius: var(--b2b-radius);
	overflow: hidden;
}

.sel-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.sel-table th {
	text-align: left;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--b2b-muted);
	background: #f8fafc;
	padding: 11px 16px;
	border-bottom: 1px solid var(--b2b-line);
	font-weight: 700;
}

.sel-table td {
	padding: 14px 16px;
	border-bottom: 1px solid #eef2f7;
	vertical-align: middle;
	color: #334155;
}

.sel-table tbody tr:last-child td {
	border-bottom: 0;
}

/* Keep dates and action labels on one line; they wrap awkwardly otherwise. */
.sel-table td[data-label="Updated"] {
	white-space: nowrap;
}

.sel-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sel-note {
	margin: 8px 0 0;
	padding: 9px 11px;
	background: #fef2f2;
	border-left: 3px solid #f87171;
	border-radius: 0 6px 6px 0;
	font-size: 12.5px;
	color: #991b1b;
}

.sel-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.sel-inline-form {
	margin: 0;
}

.sel-link-danger {
	background: none;
	border: 0;
	padding: 6px 2px;
	font-size: 13px;
	font-weight: 600;
	color: #b91c1c;
	cursor: pointer;
	text-decoration: underline;
}

.sel-link-danger:hover {
	color: #7f1d1d;
}

.sel-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 22px;
}

.sel-pager__info {
	font-size: 13px;
	color: var(--b2b-muted);
}

/* ---------- Upload ---------- */

.sel-upload-block {
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid var(--b2b-line);
}

.sel-upload-block__title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
}

.sel-upload-block__hint {
	margin: 0 0 14px;
	font-size: 13px;
	color: var(--b2b-muted);
}

.sel-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
	gap: 10px;
	margin-bottom: 14px;
}

.sel-gallery__item {
	position: relative;
	margin: 0;
	border: 1px solid var(--b2b-line);
	border-radius: 10px;
	overflow: hidden;
	background: #f8fafc;
}

.sel-gallery__item img {
	display: block;
	width: 100%;
	height: 96px;
	object-fit: cover;
}

.sel-gallery__remove {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 8px;
	font-size: 12px;
	color: #b91c1c;
	background: #fff;
	cursor: pointer;
	border-top: 1px solid var(--b2b-line);
}

.sel-gallery__remove input {
	width: 14px;
	height: 14px;
}

.sel-gallery__badge {
	position: absolute;
	top: 6px;
	left: 6px;
	padding: 2px 7px;
	border-radius: 999px;
	background: rgba(15, 23, 42, .78);
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .04em;
}

.sel-drop {
	border: 1.5px dashed #cbd5e1;
	border-radius: 12px;
	padding: 18px;
	background: #f8fafc;
}

.sel-drop.is-error {
	border-color: #fca5a5;
	background: #fef2f2;
}

.sel-drop input[type="file"] {
	display: block;
	width: 100%;
	font-size: 13px;
	color: #334155;
}

.sel-drop input[type="file"]::file-selector-button {
	margin-right: 12px;
	padding: 8px 14px;
	border: 1px solid var(--b2b-line);
	border-radius: 8px;
	background: #fff;
	font-size: 13px;
	font-weight: 600;
	color: var(--b2b-ink);
	cursor: pointer;
}

.sel-drop__hint {
	margin: 10px 0 0;
	font-size: 12.5px;
	color: var(--b2b-muted);
}

.sel-drop__list {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	font-size: 12.5px;
	color: #475569;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sel-drop__list li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 4px 0;
	border-top: 1px dotted #e2e8f0;
}

.sel-drop__list li:first-child {
	border-top: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
	.sel-cols,
	.sel-auth {
		grid-template-columns: minmax(0, 1fr);
	}

	.sel-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.sel-table thead {
		display: none;
	}

	.sel-table,
	.sel-table tbody,
	.sel-table tr,
	.sel-table td {
		display: block;
		width: 100%;
	}

	.sel-table tr {
		padding: 14px 16px;
		border-bottom: 1px solid var(--b2b-line);
	}

	.sel-table tbody tr:last-child {
		border-bottom: 0;
	}

	.sel-table td {
		border: 0;
		padding: 4px 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
	}

	.sel-table td::before {
		content: attr(data-label);
		font-size: 11.5px;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: .05em;
		color: var(--b2b-muted);
	}

	.sel-table td[data-label="Product"] {
		display: block;
	}

	/* Single-line truncation clips inside the card on narrow screens; wrap instead. */
	.sel-list__title {
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
		line-height: 1.35;
	}

	.sel-table td[data-label="Product"]::before,
	.sel-table td[data-label="Actions"]::before {
		display: none;
	}

	.sel-table td[data-label="Actions"] {
		justify-content: flex-start;
		padding-top: 10px;
	}

	.sel-note {
		margin-top: 10px;
	}

	.sel-toolbar {
		align-items: stretch;
	}

	.sel-toolbar .b2b-btn {
		width: 100%;
		text-align: center;
	}
}

@media (max-width: 520px) {
	.sel-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.sel-stat {
		padding: 13px 14px;
	}

	.sel-stat__value {
		font-size: 20px;
	}

	.sel-panel {
		padding: 17px;
	}
}

/* ------------------------------------------------------------------
 * Account type picker (supplier / buyer) on the registration form.
 * ------------------------------------------------------------------ */

.sel-type-field {
	margin: 0 0 22px;
	padding: 0;
	border: 0;
}

.sel-type-legend {
	margin: 0 0 10px;
	padding: 0;
	font-size: 13px;
	font-weight: 650;
	color: #0f172a;
}

.sel-type-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.sel-type {
	position: relative;
	display: block;
	padding: 14px 14px 14px 42px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #ffffff;
	cursor: pointer;
	transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.sel-type:hover {
	border-color: #fdba74;
	background: #fffbf7;
}

.sel-type input {
	position: absolute;
	top: 16px;
	left: 14px;
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: #ea580c;
	cursor: pointer;
}

.sel-type input:checked ~ .sel-type__body .sel-type__title {
	color: #c2410c;
}

.sel-type:has(input:checked) {
	border-color: #ea580c;
	background: #fff7ed;
	box-shadow: 0 0 0 1px #ea580c inset;
}

.sel-type:has(input:focus-visible) {
	outline: 2px solid #ea580c;
	outline-offset: 2px;
}

.sel-type__body {
	display: block;
}

.sel-type__title {
	display: block;
	font-size: 13.5px;
	font-weight: 650;
	color: #0f172a;
}

.sel-type__desc {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	line-height: 1.55;
	color: #64748b;
}

.sel-type.is-disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

@media (max-width: 560px) {
	.sel-type-grid {
		grid-template-columns: 1fr;
	}
}

/* Buyer-side request cards (buyer board + dashboard). */
.sel-req {
	display: block;
	padding: 16px 18px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #ffffff;
	text-decoration: none;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.sel-req:hover {
	border-color: #fdba74;
	box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.35);
}

.sel-req__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.sel-req__title {
	margin: 0;
	font-size: 15px;
	font-weight: 650;
	color: #0f172a;
	line-height: 1.4;
}

.sel-req__meta {
	margin: 6px 0 0;
	font-size: 12.5px;
	color: #64748b;
	line-height: 1.6;
}

.sel-req__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.sel-req__fact {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
	font-size: 11.5px;
	font-weight: 500;
}

.sel-req__summary {
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.6;
	color: #475569;
}

.sel-req-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Public request board cards. */
.b2b-req-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	height: 100%;
	padding: 18px;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #ffffff;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.b2b-req-card:hover {
	border-color: #fdba74;
	box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.4);
}

.b2b-req-card__cat {
	align-self: flex-start;
	padding: 3px 9px;
	border-radius: 999px;
	background: #fff7ed;
	color: #c2410c;
	font-size: 11px;
	font-weight: 600;
}

.b2b-req-card__title {
	margin: 0;
	font-size: 15.5px;
	font-weight: 650;
	line-height: 1.4;
}

.b2b-req-card__title a {
	color: #0f172a;
	text-decoration: none;
}

.b2b-req-card__title a:hover {
	color: #c2410c;
}

.b2b-req-card__summary {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: #64748b;
}

.b2b-req-card__facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: 4px 0 0;
	padding: 10px 0 0;
	border-top: 1px solid #f1f5f9;
}

.b2b-req-card__facts div {
	min-width: 0;
}

.b2b-req-card__facts dt {
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #94a3b8;
}

.b2b-req-card__facts dd {
	margin: 2px 0 0;
	font-size: 12.5px;
	font-weight: 600;
	color: #334155;
	overflow-wrap: anywhere;
}

.b2b-req-card__foot {
	margin-top: auto;
	padding-top: 12px;
}

.sel-type-field .sel-help {
	margin: 10px 0 0;
}

.sel-type-field .sel-help {
	margin: 10px 0 0;
}
