/* =========================================================
   Marketplace Hub — Core Components
   Theme: Teal + Neon Purple on Black
   ========================================================= */

:root {
	--mph-teal: #23a79a;
	--mph-teal-bright: #2cc3b5;
	--mph-teal-dark: #178a80;
	--mph-purple: #b026ff;
	--mph-purple-bright: #d47fff;
	--mph-purple-dark: #8a14e0;
	--mph-black: #0b0f11;
	--mph-surface: #14191c;
	--mph-surface-2: #1b2327;
	--mph-border: #263338;
	--mph-text: #d7e2e0;
	--mph-text-muted: #8ba09c;
	--mph-danger: #e5484d;
	--mph-warn: #f5a524;
	--mph-ok: #46a758;
	--mph-radius: 12px;
}

/* ---------- Base ---------- */
.mph-empty { color: var(--mph-text-muted); padding: 24px 0; text-align: center; }

.mph-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 8px;
	border: 1px solid transparent;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
	transition: all .15s ease;
	line-height: 1.4;
	background: var(--mph-surface-2);
	color: var(--mph-text);
}
.mph-btn:hover { filter: brightness(1.1); color: var(--mph-text); }
.mph-btn-primary { background: linear-gradient(135deg, var(--mph-teal-bright), var(--mph-teal)); color: #03110f; border-color: var(--mph-teal); }
.mph-btn-primary:hover { color: #03110f; box-shadow: 0 0 0 3px rgba(35,167,154,.25); }
.mph-btn-ghost { background: transparent; border-color: var(--mph-border); }
.mph-btn-danger { background: transparent; border-color: var(--mph-danger); color: var(--mph-danger); }
.mph-btn-block { display: block; width: 100%; text-align: center; margin-top: 10px; }
.mph-btn-small { padding: 6px 12px; font-size: 13px; }
.mph-btn-lg { padding: 14px 28px; font-size: 16px; }

.mph-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	background: var(--mph-surface-2);
	color: var(--mph-text-muted);
	border: 1px solid var(--mph-border);
}
.mph-badge-live, .mph-badge-active, .mph-badge-paid, .mph-badge-completed { background: rgba(35,167,154,.15); color: var(--mph-teal-bright); border-color: var(--mph-teal); }
.mph-badge-sold, .mph-badge-ended, .mph-badge-expired, .mph-badge-mph-refunded { background: rgba(229,72,77,.12); color: var(--mph-danger); border-color: var(--mph-danger); }
.mph-badge-scheduled, .mph-badge-pending, .mph-badge-mph-pending { background: rgba(245,165,36,.14); color: var(--mph-warn); border-color: var(--mph-warn); }
.mph-badge-shipped, .mph-badge-mph-shipped { background: rgba(35,167,154,.15); color: var(--mph-teal-bright); border-color: var(--mph-teal); }
.mph-badge-mph-cancelled { background: rgba(229,72,77,.12); color: var(--mph-danger); border-color: var(--mph-danger); }
.mph-badge-accepted { background: rgba(70,167,88,.15); color: var(--mph-ok); border-color: var(--mph-ok); }
.mph-badge-declined { background: rgba(229,72,77,.12); color: var(--mph-danger); border-color: var(--mph-danger); }

/* ---------- Grid ---------- */
.mph-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(4, 1fr);
}
.mph-grid-3 { grid-template-columns: repeat(3, 1fr); }

.mph-card {
	background: var(--mph-surface);
	border: 1px solid var(--mph-border);
	border-radius: var(--mph-radius);
	overflow: hidden;
	transition: transform .15s ease, border-color .15s ease;
}
.mph-card:hover { transform: translateY(-3px); border-color: var(--mph-teal); }
.mph-card-media {
	position: relative;
	display: block;
	aspect-ratio: 1/1;
	background: var(--mph-surface-2);
	overflow: hidden;
}
.mph-card-media img { width: 100%; height: 100%; object-fit: cover; }
.mph-card-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	background: var(--mph-black);
	color: var(--mph-teal-bright);
	border: 1px solid var(--mph-teal);
}
.mph-badge-sale { background: var(--mph-danger); color: #fff; border: none; }
.mph-wish-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--mph-border);
	background: rgba(11,15,17,.85);
	color: var(--mph-text-muted);
	font-size: 17px;
	cursor: pointer;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .15s ease;
}
.mph-wish-btn:hover { color: var(--mph-danger); }
.mph-wish-btn.is-saved { color: var(--mph-danger); border-color: var(--mph-danger); }
.mph-card-body { padding: 12px 14px 14px; }
.mph-card-title { margin: 0 0 8px; font-size: 15px; line-height: 1.35; }
.mph-card-title a { color: var(--mph-text); text-decoration: none; }
.mph-card-title a:hover { color: var(--mph-teal-bright); }
.mph-card-price { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mph-card-price small { color: var(--mph-text-muted); font-weight: 400; font-size: 12px; }
.mph-price-old { color: var(--mph-text-muted); font-weight: 400; font-size: 13px; }
.mph-price-now, .mph-current-bid { color: var(--mph-teal-bright); }
.mph-card-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--mph-text-muted); }
.mph-card-rating { margin-top: 6px; font-size: 12px; color: var(--mph-text-muted); }
.mph-card-time { font-size: 12px; color: var(--mph-warn); margin-top: 2px; }

/* ---------- Stars ---------- */
.mph-stars { color: var(--mph-warn); letter-spacing: 2px; font-size: 14px; }
.mph-star.half { opacity: .55; }

/* ---------- Chips / sort ---------- */
.mph-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.mph-chip {
	padding: 7px 16px;
	border-radius: 999px;
	border: 1px solid var(--mph-border);
	background: var(--mph-surface);
	color: var(--mph-text);
	font-size: 13px;
	text-decoration: none;
	transition: all .15s ease;
}
.mph-chip:hover { border-color: var(--mph-teal); color: var(--mph-teal-bright); }
.mph-chip.is-active { background: var(--mph-teal); color: #03110f; border-color: var(--mph-teal); font-weight: 600; }
.mph-chip-ghost { background: transparent; }
.mph-sort-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; font-size: 13px; color: var(--mph-text-muted); flex-wrap: wrap; }
.mph-sort-row a { color: var(--mph-text); text-decoration: none; padding: 4px 10px; border-radius: 6px; }
.mph-sort-row a:hover { color: var(--mph-teal-bright); }
.mph-sort-row a.is-active { background: var(--mph-surface-2); color: var(--mph-teal-bright); }
.mph-sort-select { background: var(--mph-surface-2); color: var(--mph-text); border: 1px solid var(--mph-border); border-radius: 8px; padding: 8px 12px; }

/* ---------- Search ---------- */
.mph-market-search { display: flex; gap: 10px; margin: 16px 0; }
.mph-market-search input { flex: 1; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--mph-border); background: var(--mph-surface); color: var(--mph-text); }
.mph-market-search button { padding: 12px 22px; border-radius: 10px; border: none; background: var(--mph-teal); color: #03110f; font-weight: 700; cursor: pointer; }

/* ---------- Shop layout ---------- */
.mph-shop { display: grid; grid-template-columns: 250px 1fr; gap: 28px; }
.mph-shop-sidebar { align-self: start; position: sticky; top: 96px; }
.mph-shop-sidebar h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--mph-text-muted); margin: 20px 0 10px; }
.mph-shop-sidebar h3:first-child { margin-top: 0; }
.mph-dept-list, .mph-filter-list { list-style: none; margin: 0; padding: 0; }
.mph-dept-list li { margin: 2px 0; }
.mph-dept-list a { color: var(--mph-text); text-decoration: none; font-size: 14px; display: block; padding: 6px 8px; border-radius: 6px; }
.mph-dept-list a:hover { background: var(--mph-surface-2); color: var(--mph-teal-bright); }
.mph-dept-list a.is-active { color: var(--mph-teal-bright); background: var(--mph-surface-2); }
.mph-dept-list a span { color: var(--mph-text-muted); font-size: 12px; }
.mph-dept-list ul { list-style: none; padding-left: 16px; }
.mph-filter-list label { display: flex; align-items: center; gap: 8px; padding: 5px 8px; cursor: pointer; font-size: 14px; color: var(--mph-text); }
.mph-filter-list input[type="radio"] { accent-color: var(--mph-teal); }
.mph-price-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.mph-price-filter input { width: 70px; padding: 8px; border-radius: 8px; border: 1px solid var(--mph-border); background: var(--mph-surface); color: var(--mph-text); }
.mph-price-filter button { padding: 8px 14px; border-radius: 8px; border: none; background: var(--mph-teal); color: #03110f; font-weight: 700; cursor: pointer; }
.mph-shop-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.mph-shop-toolbar h2 { margin: 0; font-size: 22px; }
.mph-shop-count { color: var(--mph-text-muted); font-size: 13px; margin: 0 0 14px; }

/* ---------- Auctions header ---------- */
.mph-auctions-header h2 { margin: 0 0 6px; font-size: 24px; }
.mph-auctions-header p { color: var(--mph-text-muted); margin: 0 0 10px; }

/* ---------- Cart ---------- */
.mph-empty-state { text-align: center; padding: 60px 20px; }
.mph-empty-state p { color: var(--mph-text-muted); margin-bottom: 20px; }
.mph-cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.mph-cart-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 16px; background: var(--mph-surface); border: 1px solid var(--mph-border); border-radius: var(--mph-radius); padding: 14px; margin-bottom: 12px; }
.mph-cart-item-media img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; }
.mph-cart-item-info h4 { margin: 0 0 4px; font-size: 15px; }
.mph-cart-item-info h4 a { color: var(--mph-text); text-decoration: none; }
.mph-cart-item-info h4 a:hover { color: var(--mph-teal-bright); }
.mph-cart-item-meta, .mph-cart-item-ship { color: var(--mph-text-muted); font-size: 13px; margin: 2px 0; }
.mph-cart-item-seller { font-size: 13px; margin: 0 0 4px; }
.mph-cart-item-price { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mph-qty { display: flex; align-items: center; gap: 4px; }
.mph-qty-btn { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--mph-border); background: var(--mph-surface-2); color: var(--mph-text); cursor: pointer; }
.mph-qty-input { width: 48px; height: 30px; text-align: center; border: 1px solid var(--mph-border); background: var(--mph-black); color: var(--mph-text); border-radius: 6px; }
.mph-line-total { font-weight: 700; color: #fff; font-size: 16px; }
.mph-remove-btn { background: none; border: none; color: var(--mph-danger); cursor: pointer; font-size: 13px; }
.mph-cart-summary, .mph-checkout-summary {
	background: var(--mph-surface);
	border: 1px solid var(--mph-border);
	border-radius: var(--mph-radius);
	padding: 20px;
	position: sticky;
	top: 96px;
}
.mph-cart-summary h3, .mph-checkout-summary h3 { margin: 0 0 14px; }
.mph-summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--mph-text); font-size: 14px; border-bottom: 1px dashed var(--mph-border); }
.mph-summary-total { font-weight: 700; font-size: 17px; border: none; color: var(--mph-teal-bright); }

/* ---------- Checkout ---------- */
.mph-checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.mph-checkout-fields { display: flex; flex-direction: column; gap: 12px; }
.mph-checkout-fields h3 { margin: 8px 0 4px; }
.mph-checkout-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mph-text-muted); }
.mph-checkout-fields input { padding: 11px 14px; border-radius: 8px; border: 1px solid var(--mph-border); background: var(--mph-surface); color: var(--mph-text); }
.mph-payment-options { display: flex; flex-direction: column; gap: 8px; }
.mph-payment-option {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: var(--mph-surface);
	border: 1px solid var(--mph-border);
	border-radius: 10px;
	cursor: pointer;
	font-size: 14px !important;
	color: var(--mph-text) !important;
}
.mph-payment-option:has(input:checked) { border-color: var(--mph-teal); }
.mph-payment-option input { accent-color: var(--mph-teal); }
.mph-payment-details { margin-top: 12px; }
.mph-checkout-item { display: flex; gap: 14px; align-items: center; background: var(--mph-surface); border: 1px solid var(--mph-border); border-radius: var(--mph-radius); padding: 14px; margin-bottom: 18px; }
.mph-checkout-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.mph-checkout-item h4 { margin: 0 0 4px; }
.mph-checkout-note { color: var(--mph-text-muted); font-size: 12px; margin-top: 12px; text-align: center; }
.mph-error-text { color: var(--mph-danger); font-size: 13px; margin-top: 8px; }
.mph-error-box { background: rgba(229,72,77,.1); border: 1px solid var(--mph-danger); color: var(--mph-danger); padding: 14px; border-radius: 10px; margin: 14px 0; }

/* ---------- Login required ---------- */
.mph-login-required { text-align: center; padding: 60px 20px; }
.mph-login-required h2 { margin-bottom: 6px; }
.mph-login-required p { color: var(--mph-text-muted); margin-bottom: 18px; }
.mph-gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Account ---------- */
.mph-account-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.mph-account-header .mph-avatar img { border-radius: 50%; border: 2px solid var(--mph-teal); }
.mph-account-header h2 { margin: 0 0 4px; }
.mph-account-header .mph-btn { margin-left: auto; }
.mph-account-rating { color: var(--mph-text-muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.mph-account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.mph-account-nav { display: flex; flex-direction: column; gap: 4px; }
.mph-account-nav a { padding: 10px 14px; border-radius: 8px; color: var(--mph-text); text-decoration: none; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.mph-account-nav a:hover { background: var(--mph-surface-2); }
.mph-account-nav a.is-active { background: rgba(35,167,154,.15); color: var(--mph-teal-bright); font-weight: 600; }
.mph-unread-badge { background: var(--mph-teal); color: #03110f; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 8px; }
.mph-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.mph-stat { background: var(--mph-surface); border: 1px solid var(--mph-border); border-radius: var(--mph-radius); padding: 18px; text-align: center; }
.mph-stat strong { display: block; font-size: 26px; color: var(--mph-teal-bright); }
.mph-stat span { color: var(--mph-text-muted); font-size: 13px; }
.mph-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mph-table th { text-align: left; color: var(--mph-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; padding: 10px; border-bottom: 1px solid var(--mph-border); }
.mph-table td { padding: 12px 10px; border-bottom: 1px solid var(--mph-border); vertical-align: middle; }
.mph-table a { color: var(--mph-text); text-decoration: none; }
.mph-table a:hover { color: var(--mph-teal-bright); }
.mph-tabs-inline { display: flex; gap: 8px; margin-bottom: 14px; }
.mph-tabs-inline a { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--mph-border); text-decoration: none; color: var(--mph-text); font-size: 13px; }
.mph-tabs-inline a.is-active { background: var(--mph-teal); color: #03110f; border-color: var(--mph-teal); }
.mph-offer-row { display: flex; justify-content: space-between; gap: 16px; background: var(--mph-surface); border: 1px solid var(--mph-border); border-radius: 10px; padding: 14px; margin-bottom: 10px; font-size: 14px; }
.mph-offer-actions { display: flex; gap: 8px; align-items: center; }
.mph-review-row { background: var(--mph-surface); border: 1px solid var(--mph-border); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.mph-review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mph-review-row p { margin: 6px 0; }
.mph-review-row small { color: var(--mph-text-muted); }
.mph-quick-links { list-style: none; padding: 0; }
.mph-quick-links li { margin: 6px 0; }
.mph-quick-links a { color: var(--mph-teal-bright); text-decoration: none; }
.mph-profile-form { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.mph-profile-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mph-text-muted); }
.mph-profile-form input, .mph-profile-form textarea { padding: 11px 14px; border-radius: 8px; border: 1px solid var(--mph-border); background: var(--mph-surface); color: var(--mph-text); }
.mph-notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; }
.mph-notice-success { background: rgba(70,167,88,.12); border: 1px solid var(--mph-ok); color: var(--mph-ok); }

/* ---------- Sell form ---------- */
.mph-sell-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.mph-sell-fields { display: flex; flex-direction: column; gap: 14px; }
.mph-sell-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mph-text-muted); }
.mph-sell-fields input, .mph-sell-fields select, .mph-sell-fields textarea { padding: 11px 14px; border-radius: 8px; border: 1px solid var(--mph-border); background: var(--mph-surface); color: var(--mph-text); }
.mph-field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mph-field-full { display: flex !important; flex-direction: column !important; }
.mph-upload-zone {
	border: 2px dashed var(--mph-border);
	border-radius: 10px;
	padding: 26px;
	text-align: center;
	cursor: pointer;
	color: var(--mph-text-muted);
	transition: border-color .15s ease;
}
.mph-upload-zone:hover, .mph-upload-zone.is-dragging { border-color: var(--mph-teal); color: var(--mph-teal-bright); }
.mph-upload-zone input[type="file"] { display: none; }
.mph-image-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.mph-uploaded-img { position: relative; border-radius: 8px; overflow: hidden; }
.mph-uploaded-img img { width: 100%; height: 88px; object-fit: cover; }
.mph-uploaded-img.is-featured::after { content: "★"; position: absolute; top: 4px; left: 4px; color: var(--mph-warn); font-size: 16px; }
.mph-del-img { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(11,15,17,.85); color: #fff; cursor: pointer; line-height: 1; }
.mph-sell-side { align-self: start; position: sticky; top: 96px; }
.mph-sell-side h3 { margin: 0 0 12px; }
.mph-preview-card { background: var(--mph-surface); border: 1px solid var(--mph-border); border-radius: var(--mph-radius); overflow: hidden; }
.mph-preview-img img, .mph-preview-img .mph-no-image { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.mph-preview-body { padding: 12px 14px; }
.mph-preview-body h4 { margin: 0 0 8px; }
.mph-fee-note { color: var(--mph-text-muted); font-size: 12px; margin-top: 12px; }
.mph-sell-submit { margin-top: 24px; text-align: right; }

/* ---------- Messenger ---------- */
.mph-messenger { display: grid; grid-template-columns: 320px 1fr; height: 640px; border: 1px solid var(--mph-border); border-radius: var(--mph-radius); overflow: hidden; background: var(--mph-surface); }
.mph-messenger-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mph-conv-pane { border-right: 1px solid var(--mph-border); background: var(--mph-surface-2); }
.mph-conv-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--mph-border); }
.mph-conv-pane-head strong { font-size: 15px; color: var(--mph-text); }
.mph-conv-search { margin: 10px 12px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--mph-border); background: var(--mph-surface); color: var(--mph-text); font-size: 13px; }
.mph-conv-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 0 8px 10px; }
.mph-conv-item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; text-decoration: none; position: relative; }
.mph-conv-item:hover { background: var(--mph-surface); }
.mph-conv-item.is-active { background: rgba(35,167,154,.14); }
.mph-conv-avatar { flex-shrink: 0; }
.mph-conv-avatar img { border-radius: 50%; display: block; }
.mph-conv-body { flex: 1; min-width: 0; }
.mph-conv-name { display: block; color: var(--mph-text); font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mph-conv-listing { display: block; color: var(--mph-teal); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mph-conv-preview { display: block; color: var(--mph-text-muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mph-conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.mph-conv-time { color: var(--mph-text-muted); font-size: 11px; }

.mph-thread-pane { background: var(--mph-surface); }
.mph-thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--mph-border); }
.mph-thread-avatar img { border-radius: 50%; display: block; }
.mph-thread-info { flex: 1; min-width: 0; }
.mph-thread-name { display: block; font-size: 15px; color: var(--mph-text); }
.mph-thread-status { display: flex; align-items: center; gap: 6px; color: var(--mph-text-muted); font-size: 12px; }
.mph-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; display: inline-block; }
.mph-online-dot.is-offline { background: #9aa5ae; }
.mph-thread-listing { font-size: 12px; color: var(--mph-teal); text-decoration: none; flex-shrink: 0; }
.mph-thread-listing:hover { text-decoration: underline; }

.mph-thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.mph-date-sep { display: flex; justify-content: center; margin: 10px 0 4px; }
.mph-date-sep span { background: var(--mph-surface-2); border: 1px solid var(--mph-border); color: var(--mph-text-muted); font-size: 11px; font-weight: 600; padding: 3px 12px; border-radius: 999px; }
.mph-msg { display: flex; gap: 8px; max-width: 75%; align-self: flex-start; }
.mph-msg.is-mine { align-self: flex-end; flex-direction: row-reverse; }
.mph-msg-avatar { flex-shrink: 0; align-self: flex-end; }
.mph-msg-avatar img { border-radius: 50%; display: block; }
.mph-msg-bubble { display: flex; flex-direction: column; min-width: 0; }
.mph-msg-body { background: var(--mph-surface-2); border: 1px solid var(--mph-border); border-radius: 14px 14px 14px 2px; padding: 10px 14px; font-size: 14px; word-break: break-word; }
.mph-msg.is-mine .mph-msg-body { background: var(--mph-teal); color: #03110f; border-color: var(--mph-teal); border-radius: 14px 14px 2px 14px; }
.mph-msg-meta { display: flex; align-items: center; gap: 6px; margin: 4px 6px 0; color: var(--mph-text-muted); font-size: 11px; }
.mph-msg.is-mine .mph-msg-meta { justify-content: flex-end; }
.mph-msg-tick { color: var(--mph-text-muted); font-weight: 700; }
.mph-msg-tick.is-read { color: #2ecc71; }
.mph-msg-attach { display: block; overflow: hidden; margin-bottom: 4px; }
.mph-msg-attach img { display: block; max-width: 240px; max-height: 240px; border-radius: 12px; object-fit: cover; }

.mph-composer { border-top: 1px solid var(--mph-border); padding: 12px 14px; background: var(--mph-surface-2); }
.mph-composer-row { display: flex; gap: 10px; align-items: flex-end; }
.mph-attach-btn { flex-shrink: 0; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--mph-surface); border: 1px solid var(--mph-border); color: var(--mph-teal); font-size: 22px; line-height: 1; cursor: pointer; }
.mph-attach-btn:hover { border-color: var(--mph-teal); }
.mph-composer textarea { flex: 1; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--mph-border); background: var(--mph-surface); color: var(--mph-text); resize: none; font-size: 14px; max-height: 120px; }
.mph-attach-preview { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mph-attach-preview[hidden] { display: none; }
.mph-typing-hint[hidden] { display: none; }
.mph-attach-preview-img img { max-width: 120px; max-height: 90px; border-radius: 8px; display: block; }
.mph-attach-preview-remove { cursor: pointer; color: var(--mph-text-muted); font-size: 20px; line-height: 1; }
.mph-attach-preview-remove:hover { color: #e74c3c; }
.mph-attach-uploading { color: var(--mph-text-muted); font-size: 13px; margin: 0; }
.mph-typing-hint { margin: 8px 4px 0; color: var(--mph-text-muted); font-size: 12px; }

.mph-thread-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--mph-text-muted); }

.mph-nm-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; }
.mph-nm-modal[hidden] { display: none; }
.mph-nm-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.mph-nm-panel { position: relative; width: 100%; max-width: 460px; background: var(--mph-surface); border-radius: var(--mph-radius); box-shadow: 0 24px 60px rgba(0,0,0,.3); overflow: hidden; }
.mph-nm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--mph-border); }
.mph-nm-head strong { color: var(--mph-text); }
.mph-nm-close { background: none; border: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--mph-text-muted); }
.mph-member-search { margin: 14px 16px; width: calc(100% - 32px); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--mph-border); background: var(--mph-surface-2); color: var(--mph-text); font-size: 14px; }
.mph-member-results { padding: 0 8px 12px; max-height: 300px; overflow-y: auto; }
.mph-member-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: none; background: none; cursor: pointer; text-align: left; border-radius: 8px; font-size: 14px; color: var(--mph-text); }
.mph-member-row:hover { background: var(--mph-surface-2); }
.mph-member-row img { border-radius: 50%; }
.mph-new-msg-btn { white-space: nowrap; }
.mph-thread-empty p { margin: 0; }

/* ---------- Listing single extras (plugin bits) ---------- */
.mph-seller-box { background: var(--mph-surface); border: 1px solid var(--mph-border); border-radius: var(--mph-radius); padding: 16px; }
.mph-seller-box .mph-btn { width: 100%; text-align: center; margin-top: 8px; }

/* ---------- Pagination ---------- */
.mph-pagination, .nav-links { display: flex; gap: 6px; margin: 28px 0; justify-content: center; flex-wrap: wrap; }
.mph-pagination .page-numbers, .nav-links .page-numbers { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--mph-border); color: var(--mph-text); text-decoration: none; }
.mph-pagination .page-numbers.current, .nav-links .page-numbers.current { background: var(--mph-teal); color: #03110f; border-color: var(--mph-teal); }

/* ---------- Registration ---------- */
.mph-register-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; max-width: 1080px; margin: 0 auto; }
.mph-register-intro h1 { margin: 0 0 8px; }
.mph-register-intro > p { color: var(--mph-text-muted); margin: 0 0 20px; }
.mph-register-tier { background: var(--mph-surface); border: 1px solid var(--mph-border); border-left: 3px solid var(--mph-teal); border-radius: var(--mph-radius); padding: 16px 18px; margin-bottom: 14px; }
.mph-register-tier h3 { margin: 0 0 8px; font-size: 15px; color: var(--mph-teal-bright); }
.mph-register-tier ul { margin: 0; padding-left: 18px; }
.mph-register-tier li { color: var(--mph-text-muted); font-size: 14px; margin: 4px 0; }
.mph-register-note { font-size: 13px; }
.mph-register-form-wrap { background: var(--mph-surface); border: 1px solid var(--mph-border); border-radius: var(--mph-radius); padding: 24px; }
.mph-register-form { display: flex; flex-direction: column; gap: 14px; }
.mph-register-form h2 { margin: 0 0 4px; }
.mph-register-form label, .mph-wallet-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mph-text-muted); }
.mph-register-form input, .mph-wallet-form input, .mph-wallet-form select { padding: 11px 14px; border-radius: 8px; border: 1px solid var(--mph-border); background: var(--mph-surface-2); color: var(--mph-text); }
.mph-register-roles { border: 1px solid var(--mph-border); border-radius: var(--mph-radius); padding: 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mph-register-roles legend { padding: 0 6px; font-size: 12px; color: var(--mph-text-muted); }
.mph-role-option { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.mph-role-option input { margin-top: 4px; }
.mph-role-option strong { color: var(--mph-text); display: block; }
.mph-role-option small { color: var(--mph-text-muted); }
.mph-register-message, .mph-wallet-message, .mph-avatar-message { font-size: 13px; min-height: 18px; margin: 0; color: var(--mph-ok); }
.mph-register-message.mph-error, .mph-wallet-message.mph-error, .mph-avatar-message.mph-error { color: var(--mph-danger); }

/* ---------- Wallet ---------- */
.mph-wallet-note { color: var(--mph-text-muted); font-size: 13px; margin-top: 0; }
.mph-wallet-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 24px; }
.mph-wallet-card { background: linear-gradient(135deg, var(--mph-surface-2), var(--mph-surface)); border: 1px solid var(--mph-border); border-radius: var(--mph-radius); padding: 16px; position: relative; }
.mph-wallet-card.is-default { border-color: var(--mph-teal); box-shadow: 0 0 0 1px var(--mph-teal) inset; }
.mph-wallet-card-brand { color: var(--mph-teal-bright); font-weight: 700; letter-spacing: .5px; }
.mph-wallet-card-number { color: var(--mph-text); font-size: 16px; letter-spacing: 1px; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.mph-wallet-card-meta { color: var(--mph-text-muted); font-size: 13px; }
.mph-wallet-card-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mph-wallet-expiry { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Profile avatar ---------- */
.mph-avatar-uploader { display: flex; align-items: center; gap: 16px; background: var(--mph-surface); border: 1px solid var(--mph-border); border-radius: var(--mph-radius); padding: 16px; margin-bottom: 22px; }
.mph-avatar-uploader .mph-avatar { flex-shrink: 0; }
.mph-avatar-uploader .mph-avatar img { border-radius: 50%; display: block; }
.mph-avatar-uploader p { margin: 0 0 8px; color: var(--mph-text-muted); font-size: 13px; }
.mph-avatar-btn { cursor: pointer; display: inline-block; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.mph-grid { grid-template-columns: repeat(3, 1fr); }
	.mph-shop, .mph-sell-layout, .mph-cart-layout, .mph-checkout-layout, .mph-account-layout { grid-template-columns: 1fr; }
	.mph-shop-sidebar { position: static; }
	.mph-account-nav { flex-direction: row; flex-wrap: wrap; }
	.mph-register-page { grid-template-columns: 1fr; gap: 24px; }
	.mph-messenger { grid-template-columns: 1fr; height: auto; }
	.mph-conv-pane { border-right: none; border-bottom: 1px solid var(--mph-border); max-height: 280px; }
	.mph-thread-pane { min-height: 480px; }
	.mph-thread { max-height: 420px; }
}
@media (max-width: 720px) {
	.mph-grid, .mph-grid-3 { grid-template-columns: repeat(2, 1fr); }
	.mph-field-row { grid-template-columns: 1fr; }
	.mph-image-grid { grid-template-columns: repeat(3, 1fr); }
	.mph-cart-item { grid-template-columns: 70px 1fr; }
	.mph-cart-item-price { grid-column: 2; align-items: flex-start; }
	.mph-stat-grid { grid-template-columns: repeat(2, 1fr); }
	.mph-account-header .mph-btn { margin-left: 0; }
}
