:root {
  --bg: #120805;
  --bg-soft: #1a0c07;
  --surface: rgba(35, 18, 12, .78);
  --surface-solid: #111827;
  --surface-2: #2b160e;
  --border: rgba(148, 163, 184, .16);
  --border-strong: rgba(249, 115, 22, .4);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #dc2626;
  --primary-2: #f97316;
  --primary-soft: rgba(220, 38, 38, .15);
  --success: #22c55e;
  --danger: #f43f5e;
  --warning: #f59e0b;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(249, 115, 22, .12), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(220, 38, 38, .10), transparent 28%),
    var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), 760px); margin-inline: auto; }
.narrow-wide { width: min(calc(100% - 40px), 980px); margin-inline: auto; }
.section { padding: 78px 0; position: relative; }
.page-section { min-height: 68vh; padding-top: 62px; }
.no-top { padding-top: 0; }
.preline { white-space: pre-line; }

.ambient { position: fixed; width: 420px; height: 420px; border-radius: 50%; filter: blur(100px); opacity: .10; pointer-events: none; z-index: -1; }
.ambient-one { background: #b91c1c; top: 10%; left: -240px; }
.ambient-two { background: #ea580c; right: -260px; top: 55%; }
.glass-card { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(18px); }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(148, 163, 184, .10); background: rgba(7, 10, 19, .80); backdrop-filter: blur(20px); }
.nav-wrap { min-height: 74px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; line-height: 1; }
.brand-logo { width: auto; max-width: none; height: auto; object-fit: contain; }
.brand-logo-header { width: 158px; }
.brand-logo-footer { width: 224px; }
.main-nav { display: flex; align-items: center; gap: 25px; margin-right: auto; }
.main-nav a { color: var(--muted); font-size: 14px; font-weight: 600; transition: .2s ease; }
.main-nav a:hover, .main-nav a.active { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 24px; }
.cart-link { color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 4px; }
.cart-link span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 999px; color: #fff; background: var(--primary); font-size: 11px; }
.user-chip { max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #cbd5e1; font-size: 13px; }
.inline-form { display: inline; margin: 0; }

.btn { border: 1px solid transparent; border-radius: 12px; min-height: 46px; padding: 0 20px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 14px 32px rgba(249, 115, 22, .24); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: #e2e8f0; border-color: var(--border); background: rgba(255, 255, 255, .025); }
.btn-ghost:hover { border-color: rgba(249, 115, 22, .45); background: rgba(220, 38, 38, .08); }
.btn-danger { color: #fff; background: rgba(244, 63, 94, .14); border-color: rgba(244, 63, 94, .25); }
.btn-light { color: #7f1d1d; background: #fff; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { width: 42px; height: 42px; border: 1px solid rgba(249, 115, 22, .28); border-radius: 12px; color: #fff; background: var(--primary-soft); font-size: 22px; display: grid; place-items: center; }
.text-button { border: 0; padding: 0; background: none; color: #f97316; font-weight: 600; }
.text-link { color: #f97316; font-weight: 600; }
.danger-text { color: #fb7185; }

.flash-wrap { padding-top: 18px; }
.alert { padding: 13px 16px; border-radius: 13px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 14px; border: 1px solid; }
.alert button { border: 0; color: inherit; background: transparent; font-size: 20px; }
.alert-success { color: #bbf7d0; border-color: rgba(34, 197, 94, .28); background: rgba(34, 197, 94, .10); }
.alert-error { color: #fecdd3; border-color: rgba(244, 63, 94, .3); background: rgba(244, 63, 94, .10); }

.hero { padding: 90px 0 74px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 70px; }
.hero-copy h1 { max-width: 760px; margin: 14px 0 20px; font-size: clamp(44px, 6vw, 74px); line-height: 1.03; letter-spacing: -3.7px; }
.hero-copy h1 span { background: linear-gradient(90deg, #fdba74, #fb7185); -webkit-background-clip: text; color: transparent; }
.hero-copy > p { max-width: 650px; color: var(--muted); font-size: 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #f97316; font-size: 11px; font-weight: 800; letter-spacing: 1.7px; }
.eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }
.eyebrow.danger { color: #fb7185; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; color: #94a3b8; font-size: 12px; }
.hero-panel { position: relative; min-height: 430px; padding: 38px; border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-panel::before { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, rgba(220, 38, 38, .12), transparent 50%); }
.orb { position: absolute; width: 240px; height: 240px; border-radius: 50%; right: -30px; top: -20px; background: radial-gradient(circle at 35% 35%, #fed7aa, #dc2626 35%, #7f1d1d 70%, transparent 72%); filter: drop-shadow(0 30px 40px rgba(185, 28, 28, .3)); opacity: .75; }
.panel-tag { position: relative; color: #fdba74; font-size: 12px; font-weight: 700; }
.hero-panel h2 { position: relative; max-width: 440px; margin: 10px 0 24px; font-size: 32px; line-height: 1.15; letter-spacing: -1.3px; }
.feature-mini-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.feature-mini-grid div { padding: 13px 10px; background: rgba(255, 255, 255, .035); border: 1px solid var(--border); border-radius: 12px; }
.feature-mini-grid strong, .feature-mini-grid span { display: block; }
.feature-mini-grid strong { font-size: 16px; }
.feature-mini-grid span { margin-top: 2px; color: var(--muted); font-size: 10px; }

.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 30px; }
.section-heading h1, .section-heading h2 { margin: 7px 0 0; line-height: 1.15; letter-spacing: -1.3px; }
.section-heading h1 { font-size: clamp(34px, 4.5vw, 52px); }
.section-heading h2 { font-size: clamp(28px, 3.5vw, 40px); }
.section-heading p { color: var(--muted); margin: 8px 0 0; }
.section-heading.centered { justify-content: center; text-align: center; }
.subheading { margin-top: 45px; margin-bottom: 18px; }
.subheading h2 { font-size: 24px; }

.flash-section { background: linear-gradient(180deg, rgba(244, 63, 94, .04), transparent); border-block: 1px solid rgba(244, 63, 94, .08); }
.countdown { display: flex; align-items: center; gap: 7px; }
.countdown b { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(244, 63, 94, .28); color: #fecdd3; background: rgba(244, 63, 94, .08); }

.catalog-filter { display: grid; grid-template-columns: 1fr 220px auto; gap: 12px; padding: 14px; border-radius: 17px; margin-bottom: 28px; }
input, textarea, select { width: 100%; color: #f8fafc; background: #1b0d08; border: 1px solid rgba(148, 163, 184, .2); border-radius: 11px; outline: 0; transition: border-color .2s ease, box-shadow .2s ease; }
input, select { min-height: 46px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #526077; }
input:focus, textarea:focus, select:focus { border-color: rgba(249, 115, 22, .7); box-shadow: 0 0 0 3px rgba(220, 38, 38, .10); }
select option { background: #111827; }
label { display: grid; gap: 7px; color: #cbd5e1; font-size: 13px; font-weight: 600; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.product-card { min-width: 0; background: rgba(17, 24, 39, .72); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.product-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: 0 20px 50px rgba(0, 0, 0, .28); }
.product-image { aspect-ratio: 1.35; display: block; position: relative; overflow: hidden; background: #21110b; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-image img { transform: scale(1.035); }
.discount-badge, .free-badge { position: absolute; top: 12px; padding: 5px 9px; border-radius: 9px; color: #fff; font-size: 10px; font-weight: 800; box-shadow: 0 5px 14px rgba(0,0,0,.2); }
.discount-badge { left: 12px; background: #e11d48; }
.discount-badge.large { font-size: 12px; top: 18px; left: 18px; }
.free-badge { right: 12px; background: #16a34a; }
.product-body { padding: 17px; }
.category-label { color: #f97316; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.product-body h3 { height: 48px; overflow: hidden; margin: 8px 0 7px; font-size: 16px; line-height: 1.45; }
.product-body h3 a:hover { color: #fdba74; }
.product-body p { height: 41px; overflow: hidden; margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.rating-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #94a3b8; font-size: 11px; }
.rating-row span:first-child { color: #fbbf24; }
.price-row { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border); display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.price-row del { display: block; color: #64748b; font-size: 10px; }
.price-row strong { display: block; font-size: 16px; color: #fff; }

.empty-state { padding: 62px 28px; border-radius: var(--radius); text-align: center; }
.empty-state h2, .empty-state h3 { margin: 0 0 8px; }
.empty-state p { color: var(--muted); margin: 0 0 22px; }

.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--border); border-radius: 15px; background: rgba(17, 24, 39, .64); padding: 0 20px; }
.faq-list summary { padding: 18px 0; cursor: pointer; font-weight: 700; }
.faq-list p { color: var(--muted); margin: 0 0 20px; }
.cta-card { padding: 44px 48px; border-radius: 28px; display: flex; justify-content: space-between; align-items: center; gap: 30px; background: linear-gradient(135deg, #b91c1c, #9a3412); box-shadow: 0 30px 80px rgba(249, 115, 22, .3); }
.cta-card h2 { margin: 7px 0; font-size: 34px; }
.cta-card p { margin: 0; color: #fed7aa; }
.cta-card .eyebrow { color: #fee2e2; }

.auth-section { min-height: 72vh; padding: 70px 20px; display: grid; place-items: center; }
.auth-card { width: min(100%, 520px); padding: 34px; border-radius: 24px; }
.auth-logo { width: min(230px, 68%); margin: 0 auto 24px; display: block; line-height: 0; }
.auth-logo img { width: 100%; height: auto; display: block; object-fit: contain; }
.small-card { width: min(100%, 460px); }
.auth-heading { margin-bottom: 26px; }
.auth-heading h1 { margin: 7px 0 8px; font-size: 34px; letter-spacing: -1.3px; }
.auth-heading p, .auth-switch { color: var(--muted); font-size: 13px; }
.auth-switch { text-align: center; margin: 20px 0 0; }
.auth-switch a { color: #f97316; font-weight: 700; }
.form-stack { display: grid; gap: 16px; }
.center-form { text-align: center; margin-top: 18px; }
.captcha-block {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dbe2ea;
  border-radius: 18px;
  color: #111827;
  background: #f8fafc;
}
.captcha-preview-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: stretch; }
.captcha-image { min-width: 0; height: 104px; overflow: hidden; border: 2px solid #dbe2ea; border-radius: 16px; background: #f8fafc; }
.captcha-image img { width: 100%; height: 100%; object-fit: fill; }
.captcha-refresh {
  min-width: 126px;
  padding: 0 18px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #111827;
  background: #fff;
  font-weight: 800;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.captcha-refresh:hover { border-color: #fb923c; background: #fff7ed; transform: translateY(-1px); }
.captcha-label { gap: 9px; color: #111827; font-size: 14px; font-weight: 800; }
.captcha-input {
  min-height: 62px;
  border: 2px solid #fb923c;
  border-radius: 14px;
  color: #111827;
  background: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 5px;
  text-transform: uppercase;
  box-shadow: 0 0 0 5px rgba(249, 115, 22, .10);
}
.captcha-input::placeholder { color: #7c8798; letter-spacing: 4px; opacity: 1; }
.captcha-help { margin: -2px 0 0; color: #64748b; font-size: 13px; font-weight: 500; }
.otp-input { text-align: center; font-size: 28px; letter-spacing: 10px; font-weight: 800; }

.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 55px; align-items: center; }
.detail-image { border-radius: 24px; overflow: hidden; position: relative; min-height: 470px; }
.detail-image img { width: 100%; height: 100%; min-height: 470px; object-fit: cover; }
.detail-copy h1 { margin: 8px 0 12px; font-size: clamp(38px, 5vw, 58px); line-height: 1.06; letter-spacing: -2.7px; }
.detail-rating { max-width: 440px; }
.detail-copy .lead { color: var(--muted); font-size: 16px; }
.detail-price { margin: 24px 0 20px; }
.detail-price del { display: block; color: #64748b; }
.detail-price strong { font-size: 32px; }
.stock-line { display: flex; gap: 20px; color: var(--muted); font-size: 13px; }
.status-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 12px rgba(34, 197, 94, .8); }
.buy-form { display: grid; grid-template-columns: 105px 1fr; align-items: end; gap: 12px; margin-top: 24px; }
.benefit-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; color: #94a3b8; font-size: 11px; }
.detail-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.content-card, .form-card, .summary-card, .table-card { border-radius: var(--radius); }
.content-card, .form-card { padding: 27px; }
.content-card h2, .content-card h3, .form-card h2, .summary-card h2 { margin-top: 0; }
.content-card .preline { color: #cbd5e1; }
dl { margin: 0; }
dl div { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 15px; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 600; }
.review-list { display: grid; gap: 14px; }
.review-card { padding: 22px; border-radius: 16px; }
.review-card > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.review-card p { color: #cbd5e1; }
.review-card small { color: var(--muted); }
.stars { color: #fbbf24; letter-spacing: 2px; }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.cart-list { padding: 20px; border-radius: var(--radius); }
.cart-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) 74px auto auto; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cart-item:first-of-type { padding-top: 0; }
.cart-item img { width: 76px; height: 64px; object-fit: cover; border-radius: 10px; }
.cart-copy { min-width: 0; display: grid; gap: 3px; }
.cart-copy strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-copy span { color: var(--muted); font-size: 12px; }
.qty-input { min-height: 40px; }
.summary-card { position: sticky; top: 96px; padding: 25px; }
.summary-line { padding: 11px 0; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); }
.summary-line strong { color: #fff; }
.summary-line.total { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--border); color: #fff; font-size: 16px; }
.summary-card .btn { margin-top: 12px; }
.mini-order-list { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.mini-order-list div { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.mini-order-list strong { color: #e2e8f0; white-space: nowrap; }
.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
.notice { padding: 13px 15px; border-radius: 12px; color: #cbd5e1; background: rgba(249, 115, 22, .08); border: 1px solid rgba(249, 115, 22, .18); font-size: 12px; }
.danger-notice { background: rgba(244, 63, 94, .08); border-color: rgba(244, 63, 94, .2); }
.tiny-copy { color: var(--muted); font-size: 10px; text-align: center; }

.payment-card { padding: 34px; border-radius: 24px; text-align: center; }
.payment-card h1 { margin: 12px 0 4px; }
.payment-card > p { color: var(--muted); }
.qr-image { width: 300px; max-width: 100%; padding: 12px; margin: 24px auto 12px; border-radius: 16px; background: #fff; }
.payment-number { margin: 24px 0; padding: 18px; display: grid; gap: 6px; border-radius: 14px; background: rgba(255,255,255,.035); }
.payment-number span { color: var(--muted); font-size: 12px; }
.payment-number strong { font-size: 21px; word-break: break-all; }
.payment-summary { margin: 22px 0; text-align: left; }
.payment-summary div { padding: 9px 0; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); }
.payment-summary .total { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); color: #fff; }
.expiry { font-size: 12px; }
.success-icon { width: 76px; height: 76px; margin: 24px auto 14px; display: grid; place-items: center; border-radius: 50%; color: #bbf7d0; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .3); font-size: 32px; }

.status-pill { display: inline-flex; align-items: center; justify-content: center; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.status-pending { color: #fde68a; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .2); }
.status-paid { color: #fed7aa; background: rgba(249, 115, 22, .12); border: 1px solid rgba(249, 115, 22, .2); }
.status-completed { color: #bbf7d0; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .2); }
.status-cancelled, .status-expired { color: #fecdd3; background: rgba(244, 63, 94, .12); border: 1px solid rgba(244, 63, 94, .2); }
.status-manual_review { color: #fee2e2; background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .2); }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stat-card { min-height: 150px; padding: 22px; border-radius: 17px; display: flex; flex-direction: column; align-items: flex-start; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { margin: 7px 0 auto; font-size: 28px; letter-spacing: -1px; }
.stat-card a { color: #f97316; font-size: 12px; }
.stat-card small { color: var(--muted); }
.table-card { padding: 8px; overflow: hidden; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px 13px; text-align: left; border-bottom: 1px solid var(--border); font-size: 12px; vertical-align: middle; }
th { color: #64748b; font-size: 10px; text-transform: uppercase; letter-spacing: .8px; }
td { color: #cbd5e1; }
tbody tr:last-child td { border-bottom: 0; }
td a { color: #f97316; font-weight: 600; }
.table-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.table-product { display: flex; align-items: center; gap: 10px; min-width: 230px; }
.table-product img { width: 48px; height: 42px; border-radius: 8px; object-fit: cover; }
.table-product div { min-width: 0; }
.table-product strong, .table-product small { display: block; }
.table-product small { color: var(--muted); }

.order-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.order-card { padding: 22px; border-radius: 18px; }
.order-card-head, .order-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.order-card-head h3 { margin: 3px 0 0; font-size: 16px; }
.order-card-head small, .order-card-foot small { color: var(--muted); }
.order-items-preview { display: grid; gap: 9px; padding: 18px 0; margin: 16px 0; border-block: 1px solid var(--border); }
.order-items-preview div { display: flex; align-items: center; gap: 10px; color: #cbd5e1; font-size: 12px; }
.order-items-preview img { width: 40px; height: 34px; object-fit: cover; border-radius: 7px; }
.order-card-foot > div { display: grid; }
.order-detail-items { display: grid; gap: 18px; }
.order-detail-items article { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.order-detail-items article:last-child { border-bottom: 0; }
.order-detail-items img { width: 74px; height: 64px; object-fit: cover; border-radius: 10px; }
.order-detail-items article > div { display: grid; gap: 4px; }
.order-detail-items article span { color: var(--muted); font-size: 12px; }
.fulfillment-box { margin-top: 10px; padding: 13px; border-radius: 11px; color: #d1fae5; background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .17); font-size: 12px; }
.fulfillment-box strong { display: block; margin-bottom: 5px; }
.review-form { margin-top: 10px; }
.review-form summary { color: #f97316; cursor: pointer; font-size: 12px; font-weight: 700; }
.review-form form { margin-top: 13px; }
.voucher-chip { display: inline-block; padding: 5px 9px; border-radius: 8px; color: #fdba74; background: rgba(220, 38, 38, .10); border: 1px dashed rgba(251, 146, 60, .3); font-size: 11px; font-weight: 700; }

.wallet-hero { padding: 34px; border-radius: 24px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; position: relative; background: linear-gradient(135deg, rgba(249,115,22,.34), rgba(220,38,38,.15)); }
.wallet-hero h1 { margin: 8px 0 4px; font-size: clamp(38px, 6vw, 62px); letter-spacing: -2.5px; }
.wallet-hero p { margin: 0; color: #fdba74; }
.wallet-icon { width: 130px; height: 130px; display: grid; place-items: center; border-radius: 36px; color: #fff; background: linear-gradient(135deg, #fb923c, #c2410c); box-shadow: 0 28px 65px rgba(249, 115, 22, .42); font-size: 52px; font-weight: 800; transform: rotate(8deg); }
.amount-credit { color: #86efac; }
.amount-debit { color: #fda4af; }

.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.admin-heading h1 { margin: 7px 0 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -1.8px; }
.admin-links, .action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.admin-stats .stat-card { min-height: 130px; }
.admin-stats .stat-card strong { font-size: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.check-group { display: flex; flex-wrap: wrap; gap: 24px; }
.filter-inline select { min-width: 180px; }
.user-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.user-admin-card { padding: 22px; border-radius: 18px; }
.user-admin-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--primary-soft); color: #fdba74; font-weight: 800; }
.user-admin-head h3 { margin: 0; }
.user-admin-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.wallet-balance { display: flex; justify-content: space-between; gap: 20px; margin: 19px 0; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.03); }
.wallet-balance span { color: var(--muted); font-size: 12px; }
.wallet-adjust-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.wallet-adjust-form input[name="note"] { grid-column: 1 / -1; }
.wallet-adjust-form button { grid-column: 1 / -1; }

.error-card { width: min(100%, 600px); padding: 45px; border-radius: 24px; text-align: center; }
.error-code { display: block; color: #f97316; font-size: 70px; line-height: 1; font-weight: 800; letter-spacing: -5px; }
.error-card h1 { margin: 18px 0 8px; }
.error-card p { color: var(--muted); margin-bottom: 24px; }

.site-footer { padding: 60px 0 25px; margin-top: 30px; border-top: 1px solid rgba(148, 163, 184, .10); background: rgba(3, 5, 12, .5); }
.footer-grid { display: grid; grid-template-columns: 1.5fr .7fr .7fr; gap: 60px; }
.footer-grid p { max-width: 460px; color: var(--muted); font-size: 13px; }
.footer-grid h4 { margin: 0 0 13px; }
.footer-grid > div:not(:first-child) { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-grid > div:not(:first-child) a, .footer-grid > div:not(:first-child) span { color: var(--muted); font-size: 12px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--border); color: #64748b; font-size: 11px; }

@media (max-width: 1060px) {
  .brand-logo-header { width: 144px; }
  .main-nav { gap: 16px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid { gap: 35px; }
  .feature-mini-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .container, .narrow, .narrow-wide { width: min(calc(100% - 28px), var(--container)); }
  .nav-wrap { min-height: 68px; gap: 14px; }
  .nav-toggle { display: block; margin-left: auto; }
  .main-nav { display: none; position: absolute; top: 68px; left: 14px; right: 14px; padding: 16px; flex-direction: column; align-items: stretch; border: 1px solid var(--border); border-radius: 14px; background: #1b0d08; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .nav-actions .user-chip, .nav-actions .cart-link { display: none; }
  .hero { padding-top: 65px; }
  .hero-grid, .product-detail-grid, .checkout-layout, .detail-content-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { letter-spacing: -2.6px; }
  .hero-panel { min-height: 350px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-card { position: static; }
  .detail-image, .detail-image img { min-height: 400px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-grid, .user-admin-grid { grid-template-columns: 1fr; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-links { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .section { padding: 58px 0; }
  .page-section { padding-top: 44px; }
  .brand-logo-header { width: 136px; }
  .brand-logo-footer { width: 204px; }
  .nav-actions .btn-primary { display: none; }
  .nav-actions { gap: 5px; }
  .hero { padding: 50px 0 55px; }
  .hero-grid { gap: 34px; }
  .hero-copy h1 { font-size: 43px; letter-spacing: -2.8px; }
  .hero-copy > p { font-size: 15px; }
  .hero-actions { flex-direction: column; }
  .trust-row { gap: 8px 14px; }
  .hero-panel { min-height: 325px; padding: 25px; border-radius: 23px; }
  .hero-panel h2 { font-size: 25px; }
  .orb { width: 200px; height: 200px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading h1 { font-size: 36px; }
  .countdown b { width: 42px; height: 42px; }
  .catalog-filter { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-image { aspect-ratio: 1.15; }
  .product-body { padding: 12px; }
  .product-body h3 { height: 40px; font-size: 13px; line-height: 1.5; }
  .product-body p { display: none; }
  .rating-row { font-size: 9px; }
  .price-row { margin-top: 9px; padding-top: 9px; }
  .price-row strong { font-size: 13px; }
  .price-row .icon-btn { width: 34px; height: 34px; font-size: 18px; border-radius: 9px; }
  .cta-card { padding: 30px 24px; align-items: flex-start; flex-direction: column; }
  .cta-card h2 { font-size: 28px; }
  .auth-section { padding: 45px 14px; }
  .auth-card { padding: 24px 18px; }
  .auth-heading h1 { font-size: 29px; }
  .captcha-block { padding: 14px; }
  .captcha-preview-row { grid-template-columns: minmax(0, 1fr) 108px; gap: 10px; }
  .captcha-image { width: 100%; height: 88px; }
  .captcha-refresh { min-width: 0; padding: 0 11px; font-size: 12px; }
  .captcha-input { min-height: 56px; font-size: 16px; letter-spacing: 4px; }
  .product-detail-grid { gap: 30px; }
  .detail-image, .detail-image img { min-height: 320px; }
  .detail-copy h1 { font-size: 39px; letter-spacing: -2px; }
  .detail-price strong { font-size: 27px; }
  .stock-line, .benefit-list { align-items: flex-start; flex-direction: column; gap: 7px; }
  .buy-form { grid-template-columns: 90px 1fr; }
  .content-card, .form-card, .summary-card { padding: 20px; }
  .cart-list { padding: 14px; }
  .cart-item { grid-template-columns: 58px minmax(0,1fr) 58px; gap: 10px; }
  .cart-item img { width: 58px; height: 52px; }
  .cart-item > strong { grid-column: 2 / 3; }
  .cart-item .text-button { grid-column: 3 / 4; grid-row: 2; }
  .payment-card { padding: 25px 18px; }
  .stats-grid, .admin-stats { grid-template-columns: 1fr; }
  .stat-card { min-height: 120px; }
  .order-card { padding: 17px; }
  .order-card-head, .order-card-foot { align-items: flex-start; }
  .order-detail-items article { grid-template-columns: 58px minmax(0, 1fr); }
  .order-detail-items article > strong { grid-column: 2; }
  .order-detail-items img { width: 58px; height: 52px; }
  .wallet-hero { padding: 25px 20px; }
  .wallet-icon { width: 74px; height: 74px; border-radius: 22px; font-size: 30px; }
  .wallet-hero h1 { font-size: 34px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .wallet-adjust-form { grid-template-columns: 1fr; }
  .wallet-adjust-form input[name="note"], .wallet-adjust-form button { grid-column: auto; }
  .user-admin-head { grid-template-columns: 42px minmax(0,1fr); }
  .user-admin-head .status-pill { grid-column: 2; justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid > div:first-child { grid-column: auto; }
}

/* Light interface */
:root {
  --bg: #f7f8fc;
  --bg-soft: #fff7ed;
  --surface: rgba(255, 255, 255, .92);
  --surface-solid: #ffffff;
  --surface-2: #f1f5f9;
  --border: rgba(15, 23, 42, .10);
  --border-strong: rgba(249, 115, 22, .38);
  --text: #111827;
  --muted: #64748b;
  --primary: #dc2626;
  --primary-2: #f97316;
  --primary-soft: rgba(220, 38, 38, .10);
  --success: #16a34a;
  --danger: #e11d48;
  --warning: #d97706;
  --shadow: 0 20px 55px rgba(15, 23, 42, .09);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(249, 115, 22, .10), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(239, 68, 68, .08), transparent 28%),
    var(--bg);
}

.ambient { opacity: .07; }
.glass-card { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.site-header { border-bottom-color: rgba(15, 23, 42, .08); background: rgba(255, 255, 255, .88); box-shadow: 0 8px 30px rgba(15, 23, 42, .04); }
.brand > span:last-child > span { color: #b91c1c; }
.main-nav a:hover, .main-nav a.active { color: #111827; }
.nav-toggle { color: #111827; }
.user-chip { color: #334155; }
.user-chip { max-width: 170px; display: inline-flex; align-items: center; gap: 8px; overflow: visible; }
.user-chip-avatar { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); font-size: 12px; font-weight: 800; }
.user-chip-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-chip-name { min-width: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-chip { padding: 7px 10px; border-radius: 10px; background: #f1f5f9; }
.btn-ghost { color: #334155; border-color: rgba(15, 23, 42, .12); background: rgba(255, 255, 255, .76); }
.btn-ghost:hover { color: #7f1d1d; border-color: rgba(220, 38, 38, .32); background: #fff7ed; }
.btn-danger { color: #be123c; background: #fff1f2; border-color: #fecdd3; }
.btn-light { color: #7f1d1d; background: #fff; }
.icon-btn { color: #991b1b; background: #fff7ed; }
.text-button, .text-link, .stat-card a, td a, .review-form summary { color: #b91c1c; }
.danger-text { color: #be123c; }
.alert-success { color: #166534; border-color: #bbf7d0; background: #f0fdf4; }
.alert-error { color: #be123c; border-color: #fecdd3; background: #fff1f2; }
.hero-copy h1 span { background: linear-gradient(90deg, #b91c1c, #f97316); -webkit-background-clip: text; color: transparent; }
.eyebrow, .category-label, .auth-switch a { color: #b91c1c; }
.trust-row { color: #64748b; }
.hero-panel { background: rgba(255, 255, 255, .82); }
.hero-panel::before { background: linear-gradient(150deg, rgba(220, 38, 38, .10), transparent 55%); }
.panel-tag { color: #b91c1c; }
.feature-mini-grid div { background: rgba(248, 250, 252, .92); }
.countdown b { color: #be123c; background: #fff1f2; }
input, textarea, select { color: #111827; background: #fff; border-color: rgba(15, 23, 42, .14); }
input::placeholder, textarea::placeholder { color: #94a3b8; }
select option { color: #111827; background: #fff; }
label { color: #334155; }
.readonly-input { color: #64748b; background: #f8fafc; cursor: not-allowed; }
.product-card { background: #fff; box-shadow: 0 12px 32px rgba(15, 23, 42, .05); }
.product-card:hover { box-shadow: 0 20px 45px rgba(15, 23, 42, .11); }
.product-image { background: #eef2f7; }
.product-body h3 a:hover { color: #b91c1c; }
.rating-row { color: #64748b; }
.price-row strong { color: #111827; }
.faq-list details { background: #fff; }
.cta-card { color: #fff; }
.cta-card h2 { color: #fff; }
.auth-card { background: rgba(255, 255, 255, .95); }
.detail-copy .lead, .content-card .preline, .review-card p { color: #475569; }
.summary-line strong, .summary-line.total, .payment-summary .total { color: #111827; }
.mini-order-list strong { color: #334155; }
.notice { color: #334155; background: #fff7ed; border-color: #fed7aa; }
.danger-notice { color: #9f1239; background: #fff1f2; border-color: #fecdd3; }
.payment-number { background: #f8fafc; }
.status-pending { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.status-paid { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.status-completed { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.status-cancelled, .status-expired { color: #be123c; background: #fff1f2; border-color: #fecdd3; }
.status-manual_review { color: #9a3412; background: #fff7ed; border-color: #fee2e2; }
td { color: #334155; }
th { color: #64748b; }
.order-items-preview div { color: #334155; }
.fulfillment-box { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.voucher-chip { color: #b91c1c; background: #fff7ed; border-color: #fdba74; }
.wallet-hero { background: linear-gradient(135deg, #ffedd5, #fff7ed); }
.wallet-hero p { color: #b91c1c; }
.amount-credit { color: #15803d; }
.amount-debit { color: #be123c; }
.avatar { color: #b91c1c; }
.wallet-balance { background: #f8fafc; }
.error-code { color: #b91c1c; }
.site-footer { border-top-color: rgba(15, 23, 42, .08); background: rgba(255, 255, 255, .72); }
.footer-grid a:hover { color: #111827; }

/* User dashboard and profile */
.account-heading { align-items: center; }
.account-overview { display: grid; gap: 18px; }
.profile-compact { min-height: 112px; padding: 20px 22px; border-radius: 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.profile-compact > div:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.profile-compact strong { font-size: 17px; }
.profile-compact span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-compact small { color: #15803d; font-size: 11px; }
.profile-compact > a { color: #b91c1c; font-size: 12px; font-weight: 700; }
.account-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.account-stats .stat-card { min-height: 142px; }
.account-stats .stat-card strong { font-size: clamp(22px, 2.5vw, 28px); }
.account-dashboard-stats { margin-top: 4px; }
.account-dashboard-stats .stat-card { min-height: 158px; }
.order-log-heading { align-items: flex-end; }
.order-log-heading h2 { margin-top: 8px; }
.account-order-log td:first-child strong { color: #1e293b; }
.account-order-log td:last-child a { color: #b91c1c; font-weight: 700; }

.profile-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 22px; align-items: start; }
.profile-sidebar { position: sticky; top: 96px; padding: 28px; border-radius: 22px; text-align: center; }
.profile-sidebar h2 { margin: 16px 0 3px; font-size: 24px; }
.profile-sidebar > p { margin: 0 0 12px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.profile-sidebar .profile-bio { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--border); color: #475569; line-height: 1.7; }
.profile-avatar { display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 14px 34px rgba(249, 115, 22, .20); font-weight: 800; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-medium { width: 62px; height: 62px; font-size: 22px; }
.profile-avatar-large { width: 132px; height: 132px; margin: 0 auto; border: 5px solid #fff; font-size: 44px; }
.profile-meta { margin-top: 22px; text-align: left; }
.profile-meta div { padding: 12px 0; }
.profile-meta dt { font-size: 11px; }
.profile-meta dd { max-width: 150px; text-align: right; font-size: 12px; }
.profile-content { display: grid; gap: 22px; }
.profile-content .form-card { padding: 30px; }
.card-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.card-heading h2 { margin: 7px 0 4px; font-size: 26px; }
.card-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.avatar-controls { padding: 18px; border: 1px dashed rgba(249, 115, 22, .28); border-radius: 15px; background: #fffaf5; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 18px; }
.avatar-controls > div:first-child { display: grid; }
.avatar-controls strong { font-size: 13px; }
.avatar-controls small { color: var(--muted); font-size: 11px; }
.avatar-message { grid-column: 1 / -1; min-height: 18px; margin: 0; color: #15803d; font-size: 11px; }
.avatar-message.error { color: #be123c; }
.file-button { cursor: pointer; }
.form-stack label small { color: var(--muted); font-size: 10px; font-weight: 500; }

@media (max-width: 1060px) {
  .account-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-layout { grid-template-columns: 270px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .main-nav { background: #fff; box-shadow: var(--shadow); }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .profile-sidebar { display: grid; grid-template-columns: auto minmax(0, 1fr); text-align: left; column-gap: 18px; }
  .profile-sidebar .profile-avatar { grid-row: 1 / 5; margin: 0; }
  .profile-sidebar h2 { margin-top: 8px; }
  .profile-sidebar > p, .profile-sidebar .status-pill { justify-self: start; }
  .profile-sidebar .profile-bio, .profile-meta { grid-column: 1 / -1; }
  .profile-meta dd { max-width: none; }
}

@media (max-width: 560px) {
  .user-chip-name { display: none; }
  .user-chip { max-width: none; }
  .user-chip-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .account-heading .btn { width: 100%; }
  .profile-compact { grid-template-columns: auto minmax(0, 1fr); padding: 17px; }
  .profile-compact > a { grid-column: 2; }
  .account-stats { grid-template-columns: 1fr; }
  .profile-sidebar { display: block; text-align: center; }
  .profile-sidebar .profile-avatar { margin: 0 auto; }
  .profile-sidebar > p { justify-self: auto; }
  .profile-sidebar .status-pill { justify-self: auto; }
  .profile-sidebar .profile-bio { text-align: center; }
  .profile-content .form-card { padding: 22px 17px; }
  .avatar-controls { grid-template-columns: 1fr; }
  .avatar-controls .action-row { width: 100%; }
  .avatar-controls .action-row .btn { flex: 1; }
  .avatar-message { grid-column: auto; }
  .card-heading h2 { font-size: 23px; }
}

/* Marketplace SVG icon system and mobile navigation */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.svg-icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-icon-label, .main-nav a, .cart-link, .trust-row span, .rating-row span:first-child, .eyebrow, .profile-compact small { display: inline-flex; align-items: center; gap: 7px; }
.btn-icon-label .svg-icon, .btn .svg-icon { width: 18px; height: 18px; }
.main-nav { gap: 18px; }
.main-nav a { gap: 6px; }
.main-nav a .svg-icon { width: 17px; height: 17px; }
.nav-toggle { width: 40px; height: 40px; align-items: center; justify-content: center; }
.cart-link { position: relative; padding: 8px 5px; }
.cart-link .svg-icon { width: 21px; height: 21px; }
.cart-link .cart-link-label { display: inline; min-width: 0; height: auto; padding: 0; margin: 0; border-radius: 0; color: inherit; background: transparent; font-size: inherit; }
.cart-link b { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 999px; color: #fff; background: var(--primary); font-size: 10px; line-height: 1; }
.header-logout .btn { padding-inline: 12px; }
.mobile-market-nav { display: none; }
.trust-row span { gap: 5px; }
.trust-row .svg-icon { width: 16px; height: 16px; color: #16a34a; }
.feature-mini-grid div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; }
.feature-mini-grid div .svg-icon { width: 18px; height: 18px; grid-row: 1 / 3; color: #b91c1c; }
.feature-mini-grid div strong, .feature-mini-grid div span { grid-column: 2; }
.search-input-wrap { position: relative; min-width: 0; }
.search-input-wrap .svg-icon { position: absolute; z-index: 1; left: 14px; top: 50%; width: 18px; height: 18px; color: #94a3b8; transform: translateY(-50%); pointer-events: none; }
.search-input-wrap input { padding-left: 42px; }
.discount-badge, .free-badge { display: inline-flex; align-items: center; gap: 4px; }
.discount-badge .svg-icon, .free-badge .svg-icon { width: 12px; height: 12px; }
.rating-row span:first-child .svg-icon { width: 14px; height: 14px; fill: currentColor; }
.icon-btn { position: relative; }
.icon-btn .svg-icon { width: 21px; height: 21px; }
.icon-btn-plus { position: absolute; right: 6px; top: 3px; width: 13px; height: 13px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); font-size: 10px; font-weight: 800; line-height: 1; }
.empty-state-icon { width: 48px; height: 48px; margin: 0 auto 15px; color: #dc2626; }
.profile-compact small .svg-icon { width: 14px; height: 14px; }
.market-stat-card { position: relative; padding-top: 62px; }
.market-stat-card > .market-icon { position: absolute; left: 20px; top: 18px; }
.market-icon { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 14px; }
.market-icon .svg-icon { width: 21px; height: 21px; }
.market-icon-purple { color: #b91c1c; background: #ffedd5; }
.market-icon-blue { color: #ea580c; background: #ffedd5; }
.market-icon-green { color: #15803d; background: #dcfce7; }
.market-icon-orange { color: #c2410c; background: #ffedd5; }
.status-processing { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }

/* Marketplace wallet */
.wallet-page { padding-bottom: 90px; }
.wallet-page-heading { align-items: center; }
.wallet-market-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 20px; align-items: stretch; }
.wallet-balance-card { min-height: 280px; padding: 30px; overflow: hidden; position: relative; display: flex; flex-direction: column; border-radius: 26px; color: #fff; background: linear-gradient(135deg, #b91c1c 0%, #f97316 55%, #ea580c 100%); box-shadow: 0 24px 55px rgba(249, 115, 22, .24); }
.wallet-balance-card::before, .wallet-balance-card::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); }
.wallet-balance-card::before { width: 240px; height: 240px; right: -105px; top: -90px; }
.wallet-balance-card::after { width: 170px; height: 170px; right: 35px; bottom: -120px; }
.wallet-card-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; color: #ffedd5; font-size: 13px; font-weight: 700; }
.wallet-card-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.16); backdrop-filter: blur(8px); }
.wallet-card-brand { width: min(100%, 330px); padding: 8px 12px; border: 1px solid rgba(255,255,255,.42); border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 12px 28px rgba(127,29,29,.16); backdrop-filter: blur(10px); }
.wallet-card-brand-image { display: block; width: 100%; height: auto; object-fit: contain; }
.wallet-balance-card > strong { position: relative; z-index: 1; margin-top: 30px; font-size: clamp(32px, 4vw, 47px); letter-spacing: -2px; line-height: 1.1; }
.wallet-balance-card > p { position: relative; z-index: 1; margin: 9px 0 25px; color: #fed7aa; font-size: 13px; }
.wallet-card-actions { position: relative; z-index: 1; display: flex; gap: 10px; margin-top: auto; }
.wallet-card-actions a { min-height: 42px; padding: 0 15px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 700; }
.wallet-card-actions a:hover { background: rgba(255,255,255,.20); }
.wallet-card-actions .svg-icon { width: 17px; height: 17px; }
.wallet-summary-grid { display: grid; gap: 12px; }
.wallet-summary-card { min-height: 82px; padding: 17px 19px; border-radius: 18px; display: flex; align-items: center; gap: 14px; }
.wallet-summary-card div { min-width: 0; display: grid; gap: 2px; }
.wallet-summary-card small { color: var(--muted); font-size: 11px; }
.wallet-summary-card strong { overflow: hidden; color: #111827; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 22px; align-items: start; }
.topup-card, .topup-list-card { padding: 27px; border-radius: 22px; }
.compact-card-heading { align-items: flex-start; margin-bottom: 22px; }
.compact-card-heading h2 { margin-top: 5px; font-size: 25px; }
.compact-card-heading p { max-width: 450px; }
.topup-form { gap: 18px; }
.money-input-wrap { position: relative; }
.money-input-wrap > span { position: absolute; z-index: 1; left: 14px; top: 50%; color: #475569; font-size: 15px; font-weight: 800; transform: translateY(-50%); }
.money-input-wrap input { min-height: 56px; padding-left: 45px; font-size: 19px; font-weight: 800; }
.topup-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.topup-presets button { min-height: 42px; padding: 7px; border: 1px solid #e2e8f0; border-radius: 11px; color: #334155; background: #fff; font-size: 11px; font-weight: 700; transition: .2s ease; }
.topup-presets button:hover, .topup-presets button.active { color: #b91c1c; border-color: #f97316; background: #fff7ed; }
.secure-payment-note { padding: 13px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #ffedd5; border-radius: 13px; color: #9a3412; background: #fff7ed; font-size: 11px; line-height: 1.55; }
.secure-payment-note .svg-icon { width: 19px; height: 19px; margin-top: 1px; }
.topup-list { display: grid; }
.topup-list-item { min-width: 0; padding: 14px 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.topup-list-item:last-child { border-bottom: 0; }
.topup-list-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: #c2410c; background: #ffedd5; }
.topup-list-icon.success { color: #15803d; background: #dcfce7; }
.topup-list-icon .svg-icon { width: 19px; height: 19px; }
.topup-list-item > div:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.topup-list-item strong { font-size: 14px; }
.topup-list-item small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.topup-list-action { display: grid; justify-items: end; gap: 4px; }
.topup-list-action a { color: #b91c1c; font-size: 10px; font-weight: 700; }
.topup-list-action .status-pill { font-size: 8px; }
.mini-empty-state { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; }
.mini-empty-state .svg-icon { width: 48px; height: 48px; color: #f97316; }
.mini-empty-state p { margin: 0; font-size: 12px; }
.wallet-history-section { scroll-margin-top: 100px; }
.wallet-history-heading { align-items: center; }
.wallet-history-tabs { padding: 4px; display: inline-flex; gap: 3px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.wallet-history-tabs button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 9px; color: #64748b; background: transparent; font-size: 11px; font-weight: 700; }
.wallet-history-tabs button.active { color: #fff; background: #b91c1c; box-shadow: 0 7px 18px rgba(185,28,28,.20); }
.wallet-history-list { overflow: hidden; border-radius: 20px; }
.wallet-history-item { min-width: 0; padding: 18px 20px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); }
.wallet-history-item:last-of-type { border-bottom: 0; }
.wallet-history-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; }
.wallet-history-icon.credit { color: #15803d; background: #dcfce7; }
.wallet-history-icon.debit { color: #be123c; background: #ffe4e6; }
.wallet-history-icon .svg-icon { width: 20px; height: 20px; }
.wallet-history-copy { min-width: 0; display: grid; gap: 1px; }
.wallet-history-copy strong { color: #1e293b; font-size: 13px; }
.wallet-history-copy span { color: #64748b; font-size: 10px; }
.wallet-history-copy small { overflow: hidden; color: #94a3b8; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-history-amount { display: grid; justify-items: end; gap: 2px; text-align: right; }
.wallet-history-amount strong { font-size: 14px; }
.wallet-history-amount small { color: #94a3b8; font-size: 9px; }
.wallet-filter-empty { padding: 34px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.topup-payment-card { position: relative; }
.payment-title-icon { width: 54px; height: 54px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 18px; color: #b91c1c; background: #ffedd5; }
.payment-title-icon .svg-icon { width: 27px; height: 27px; }
.topup-payment-card .success-icon { display: grid; place-items: center; color: #16a34a; background: transparent; }
.topup-payment-card .success-icon .svg-icon { width: 74px; height: 74px; }

@media (max-width: 980px) {
  .wallet-market-grid { grid-template-columns: 1fr 330px; }
  .wallet-content-grid { grid-template-columns: 1fr; }
  .topup-list-card { order: -1; }
}

@media (max-width: 820px) {
  .market-shell.has-mobile-market-nav { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .market-shell .site-footer { margin-bottom: 0; }
  .market-shell .main-nav { display: none; }
  .market-shell .nav-wrap { min-height: 64px; gap: 12px; }
  .market-shell .nav-actions { margin-left: auto; }
  .market-shell .header-logout { display: none; }
  .mobile-market-nav { position: fixed; z-index: 80; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); min-height: 66px; padding: 7px 5px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch; border: 1px solid rgba(15,23,42,.10); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 18px 50px rgba(15,23,42,.18); backdrop-filter: blur(18px); }
  .mobile-market-nav > a { min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 14px; color: #64748b; font-size: 9px; font-weight: 700; }
  .mobile-market-nav > a.active { color: #b91c1c; background: #fff7ed; }
  .mobile-market-nav .svg-icon { width: 22px; height: 22px; }
  .mobile-nav-icon { position: relative; display: inline-flex; }
  .mobile-nav-icon b { position: absolute; right: -10px; top: -7px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 999px; color: #fff; background: #e11d48; font-size: 8px; line-height: 1; }
  .wallet-market-grid { grid-template-columns: 1fr; }
  .wallet-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wallet-summary-card { min-height: 112px; padding: 15px 12px; flex-direction: column; align-items: flex-start; }
  .wallet-summary-card strong { font-size: 15px; }
}

@media (max-width: 560px) {
  .market-shell .container { width: min(calc(100% - 24px), var(--container)); }
  .market-shell .site-header .brand-logo-header { width: 132px; }
  .market-shell .cart-link-label { display: none; }
  .market-shell .cart-link { width: 38px; height: 38px; justify-content: center; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
  .market-shell .cart-link b { position: absolute; right: -5px; top: -5px; border: 2px solid #fff; }
  .market-shell .nav-actions > .btn-ghost { min-height: 38px; padding: 0 12px; }
  .market-shell .user-chip { display: none; }
  .mobile-market-nav { left: 8px; right: 8px; bottom: max(7px, env(safe-area-inset-bottom)); border-radius: 18px; }
  .wallet-page-heading .btn { width: 100%; }
  .wallet-balance-card { min-height: 250px; padding: 24px 21px; border-radius: 22px; }
  .wallet-balance-card > strong { font-size: 34px; }
  .wallet-summary-grid { grid-template-columns: 1fr; }
  .wallet-summary-card { min-height: 76px; flex-direction: row; align-items: center; }
  .wallet-summary-card strong { font-size: 18px; }
  .topup-card, .topup-list-card { padding: 22px 16px; }
  .topup-presets { grid-template-columns: repeat(2, 1fr); }
  .topup-list-item { grid-template-columns: auto minmax(0, 1fr); }
  .topup-list-action { grid-column: 2; display: flex; justify-content: space-between; align-items: center; width: 100%; }
  .wallet-history-heading { align-items: stretch; }
  .wallet-history-tabs { width: 100%; }
  .wallet-history-tabs button { flex: 1; padding-inline: 7px; }
  .wallet-history-item { padding: 15px 13px; grid-template-columns: auto minmax(0, 1fr); }
  .wallet-history-amount { grid-column: 2; display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; }
  .wallet-history-icon { width: 39px; height: 39px; }
  .feature-mini-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-filter .search-input-wrap { grid-column: 1; }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pagination span {
  color: var(--muted, #64748b);
  font-size: .92rem;
}

.shipping-fields {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, .25);
}

.admin-shell .table-card .action-row input[name="notes"] {
  min-width: 180px;
  flex: 1 1 180px;
}


.responsive-menu-overlay,
.responsive-menu-drawer { display: none; }

@media (max-width: 1024px) {
  body.responsive-menu-open { overflow: hidden; }

  .nav-wrap { min-height: 68px; gap: 14px; }
  .main-nav,
  .nav-actions { display: none; }

  .nav-toggle {
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 0;
    display: inline-grid !important;
    place-items: center;
    border: 1px solid rgba(185, 28, 28, .16);
    border-radius: 13px;
    color: #991b1b;
    background: linear-gradient(145deg, #fff, #fff7ed);
    box-shadow: 0 9px 24px rgba(153, 27, 27, .10);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  }

  .nav-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(185, 28, 28, .30);
    box-shadow: 0 12px 28px rgba(153, 27, 27, .15);
  }

  .nav-toggle .svg-icon { width: 22px; height: 22px; }

  .responsive-menu-overlay {
    position: fixed;
    z-index: 110;
    inset: 0;
    display: block;
    opacity: 0;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(4px);
    transition: opacity .24s ease;
  }

  .responsive-menu-overlay[hidden] { display: none; }
  .responsive-menu-overlay.open { opacity: 1; }

  .responsive-menu-drawer {
    position: fixed;
    z-index: 120;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(390px, 88vw);
    padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-left: 1px solid rgba(15, 23, 42, .08);
    border-radius: 28px 0 0 28px;
    color: #0f172a;
    background:
      radial-gradient(circle at 100% 0%, rgba(220, 38, 38, .12), transparent 32%),
      #fff;
    box-shadow: -24px 0 70px rgba(15, 23, 42, .20);
    transform: translateX(110%);
    visibility: hidden;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility .28s ease;
  }

  .responsive-menu-drawer.open {
    visibility: visible;
    transform: translateX(0);
  }

  .responsive-menu-header {
    padding: 3px 2px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #e2e8f0;
  }

  .responsive-menu-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .responsive-menu-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 3px solid #ffedd5;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #f97316);
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(185, 28, 28, .18);
  }

  .responsive-menu-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .responsive-menu-avatar.guest-avatar { color: #b91c1c; background: #fff7ed; box-shadow: none; }
  .responsive-menu-avatar.guest-avatar .svg-icon { width: 22px; height: 22px; }

  .responsive-menu-identity > span:last-child {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .responsive-menu-identity strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .responsive-menu-identity small { color: #64748b; font-size: 10px; }

  .responsive-menu-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #475569;
    background: #f8fafc;
    font-size: 27px;
    line-height: 1;
  }

  .responsive-menu-close:hover { color: #b91c1c; border-color: #fed7aa; background: #fff7ed; }

  .responsive-menu-links {
    padding: 18px 0;
    display: grid;
    gap: 8px;
  }

  .responsive-menu-links > a {
    min-width: 0;
    padding: 11px;
    display: grid;
    grid-template-columns: 43px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: #334155;
    transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease;
  }

  .responsive-menu-links > a:hover {
    transform: translateX(-2px);
    color: #991b1b;
    border-color: #ffedd5;
    background: #fffaf5;
  }

  .responsive-menu-links > a.active {
    color: #991b1b;
    border-color: #fed7aa;
    background: linear-gradient(135deg, #fff7ed, #fff7ed);
  }

  .responsive-menu-links > a > span:nth-child(2) { min-width: 0; display: grid; gap: 1px; }
  .responsive-menu-links strong { font-size: 13px; line-height: 1.35; }
  .responsive-menu-links small { overflow: hidden; color: #94a3b8; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

  .responsive-menu-link-icon {
    position: relative;
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #b91c1c;
    background: #fff7ed;
  }

  .responsive-menu-link-icon .svg-icon { width: 20px; height: 20px; }
  .responsive-menu-links > a.active .responsive-menu-link-icon { color: #fff; background: linear-gradient(135deg, #dc2626, #f97316); box-shadow: 0 8px 20px rgba(185, 28, 28, .18); }

  .responsive-menu-link-icon b {
    position: absolute;
    right: -5px;
    top: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #e11d48;
    font-size: 8px;
    line-height: 1;
  }

  .responsive-menu-arrow { width: 16px; height: 16px; color: #cbd5e1; }
  .responsive-menu-links > a:hover .responsive-menu-arrow,
  .responsive-menu-links > a.active .responsive-menu-arrow { color: #dc2626; }

  .responsive-menu-admin-link { margin-top: 4px; }
  .responsive-menu-admin-link .responsive-menu-link-icon { color: #fff; background: linear-gradient(135deg, #0f172a, #334155); }

  .responsive-menu-footer {
    margin-top: auto;
    padding-top: 17px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    border-top: 1px solid #e2e8f0;
  }

  .responsive-menu-footer form { grid-column: 1 / -1; }
  .responsive-menu-footer .btn { width: 100%; min-height: 44px; padding-inline: 12px; }

  .responsive-menu-logout {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #fecdd3;
    border-radius: 14px;
    color: #be123c;
    background: #fff1f2;
    font-size: 13px;
    font-weight: 800;
  }

  .responsive-menu-logout:hover { border-color: #fda4af; background: #ffe4e6; }
  .responsive-menu-logout .svg-icon { width: 18px; height: 18px; }
}

@media (max-width: 560px) {
  .nav-wrap { min-height: 62px; }
  .nav-toggle { width: 40px; height: 40px; border-radius: 12px; }
  .responsive-menu-drawer { width: min(360px, 92vw); padding-inline: 15px; border-radius: 24px 0 0 24px; }
  .responsive-menu-links { gap: 6px; }
  .responsive-menu-links > a { padding: 9px; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; border-radius: 14px; }
  .responsive-menu-link-icon { width: 40px; height: 40px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .responsive-menu-overlay,
  .responsive-menu-drawer,
  .responsive-menu-links > a,
  .nav-toggle { transition: none; }
}

.user-admin-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.status-pill.role-admin {
  background: rgba(185, 28, 28, .12);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, .24);
}

.status-pill.role-user {
  background: rgba(249, 115, 22, .10);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, .22);
}

.user-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.user-admin-actions form {
  margin: 0;
}

.current-admin-note {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(185, 28, 28, .08);
  color: #fdba74;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .user-admin-badges {
    grid-column: 2;
    justify-content: flex-start;
  }

  .user-admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .user-admin-actions form,
  .user-admin-actions .btn,
  .user-admin-actions .text-button,
  .current-admin-note {
    width: 100%;
  }

  .user-admin-actions .btn,
  .user-admin-actions .text-button {
    justify-content: center;
    text-align: center;
  }
}

/* Account profile dashboard */
.account-profile-dashboard {
  padding-top: 34px;
  padding-bottom: 90px;
}

.account-profile-container {
  width: min(calc(100% - 40px), 1080px);
  display: grid;
  gap: 28px;
}

.account-profile-hero {
  width: min(100%, 760px);
  margin-inline: auto;
  padding: 42px 48px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .06);
}

.account-profile-avatar {
  width: 146px;
  height: 146px;
  padding: 7px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  color: #fff;
  background: #fff;
  box-shadow: 0 8px 25px rgba(15, 23, 42, .08);
}

.account-profile-avatar img,
.account-profile-avatar > span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.account-profile-avatar img {
  object-fit: cover;
}

.account-profile-avatar > span {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #f97316);
  font-size: 48px;
  font-weight: 800;
}

.account-profile-kicker {
  margin-top: 28px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2.2px;
}

.account-profile-hero h1 {
  max-width: 100%;
  margin: 10px 0 0;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -1.6px;
}

.account-profile-badges {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.account-verified-badge {
  min-height: 44px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 14px;
  font-weight: 800;
}

.account-verified-badge .svg-icon {
  width: 19px;
  height: 19px;
}

.account-unverified-badge {
  color: #92400e;
  background: #fffbeb;
}

.account-profile-description {
  max-width: 610px;
  margin: 20px auto 0;
  color: #64748b;
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.65;
}

.account-profile-meta {
  width: min(100%, 520px);
  margin: 22px auto 0;
  display: grid;
  gap: 10px;
}

.account-profile-meta div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.account-profile-meta dt,
.account-profile-meta dd {
  margin: 0;
}

.account-profile-meta dt {
  height: 24px;
  display: grid;
  place-items: center;
  color: #64748b;
}

.account-profile-meta dt .svg-icon {
  width: 19px;
  height: 19px;
}

.account-profile-meta dd {
  min-width: 0;
  color: #64748b;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.account-profile-actions {
  width: 100%;
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.account-profile-primary-action,
.account-profile-secondary-action {
  min-height: 58px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 800;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.account-profile-primary-action:hover,
.account-profile-secondary-action:hover {
  transform: translateY(-2px);
}

.account-profile-primary-action {
  color: #fff;
  background: #111827;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .14);
}

.account-profile-primary-action:hover {
  background: #1e293b;
  box-shadow: 0 18px 34px rgba(15, 23, 42, .18);
}

.account-profile-secondary-action {
  color: #111827;
  border: 1.5px solid #cbd5e1;
  background: #fff;
}

.account-profile-secondary-action:hover {
  border-color: #fb923c;
  background: #fffaf5;
}

.account-profile-primary-action .svg-icon,
.account-profile-secondary-action .svg-icon {
  width: 22px;
  height: 22px;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.account-summary-card {
  min-height: 118px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 22px;
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .045);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.account-summary-card:hover {
  transform: translateY(-3px);
  border-color: #fed7aa;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.account-summary-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 17px;
}

.account-summary-icon .svg-icon {
  width: 27px;
  height: 27px;
}

.account-summary-icon-purple {
  color: #dc2626;
  background: #f0efff;
}

.account-summary-icon-green {
  color: #047857;
  background: #ecfdf5;
}

.account-summary-icon-orange {
  color: #c2410c;
  background: #fff7ed;
}

.account-summary-icon-blue {
  color: #ea580c;
  background: #fff7ed;
}

.account-summary-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-summary-copy small {
  color: #64748b;
  font-size: 12px;
}

.account-summary-copy strong {
  color: #111827;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.7px;
}

.account-activity-card {
  padding: 34px 36px 10px;
  border-radius: 28px;
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .055);
}

.account-activity-header {
  padding: 0 0 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.account-activity-header span {
  color: #dc2626;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.account-activity-header h2 {
  margin: 8px 0 0;
  color: #111827;
  font-size: clamp(26px, 3.5vw, 36px);
  line-height: 1.15;
  letter-spacing: -1.2px;
}

.account-activity-header > a {
  margin-top: 3px;
  color: #dc2626;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.account-order-list {
  display: grid;
}

.account-order-item {
  min-width: 0;
  padding: 24px 4px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-top: 1px solid #e5e7eb;
  transition: background .18s ease, padding .18s ease;
}

.account-order-item:first-child {
  border-top: 0;
}

.account-order-item:hover {
  margin-inline: -12px;
  padding-inline: 16px;
  border-radius: 18px;
  background: #fffaf5;
}

.account-order-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #dc2626;
  background: #fff7ed;
}

.account-order-icon .svg-icon {
  width: 27px;
  height: 27px;
}

.account-order-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.account-order-title {
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-order-meta {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-order-payment {
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.account-order-payment > strong {
  color: #111827;
  font-size: 17px;
  line-height: 1.2;
}

.account-order-payment .status-pill {
  min-height: 30px;
  padding: 5px 12px;
  border: 0;
  font-size: 9px;
  letter-spacing: .55px;
}

.account-order-payment .status-paid,
.account-order-payment .status-completed {
  color: #15803d;
  background: #dcfce7;
}

.account-order-payment .status-pending {
  color: #b45309;
  background: #fef3c7;
}

.account-order-payment .status-processing,
.account-order-payment .status-manual_review {
  color: #991b1b;
  background: #ffedd5;
}

.account-order-payment .status-cancelled,
.account-order-payment .status-expired {
  color: #be123c;
  background: #ffe4e6;
}

.account-order-arrow {
  width: 23px;
  height: 23px;
  color: #94a3b8;
}

.account-activity-empty {
  min-height: 330px;
  padding: 40px 20px 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-top: 1px solid #e5e7eb;
}

.account-activity-empty h3 {
  margin: 18px 0 4px;
  color: #111827;
  font-size: 22px;
}

.account-activity-empty p {
  margin: 0 0 22px;
  color: #64748b;
}

@media (max-width: 960px) {
  .account-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .account-profile-dashboard {
    padding-top: 18px;
    padding-bottom: 70px;
  }

  .account-profile-container {
    width: min(calc(100% - 28px), 1080px);
    gap: 20px;
  }

  .account-profile-hero {
    padding: 34px 24px;
    border-radius: 24px;
  }

  .account-profile-avatar {
    width: 132px;
    height: 132px;
  }

  .account-profile-kicker {
    margin-top: 24px;
  }

  .account-profile-actions {
    grid-template-columns: 1fr;
  }

  .account-activity-card {
    padding: 28px 24px 4px;
    border-radius: 24px;
  }
}

@media (max-width: 560px) {
  .account-profile-dashboard {
    padding-top: 10px;
  }

  .account-profile-container {
    width: min(calc(100% - 20px), 1080px);
    gap: 18px;
  }

  .account-profile-hero {
    padding: 30px 20px 24px;
    border-radius: 22px;
  }

  .account-profile-avatar {
    width: 118px;
    height: 118px;
    padding: 6px;
  }

  .account-profile-avatar > span {
    font-size: 40px;
  }

  .account-profile-kicker {
    margin-top: 22px;
    font-size: 12px;
  }

  .account-profile-hero h1 {
    font-size: 31px;
  }

  .account-verified-badge {
    min-height: 40px;
    padding-inline: 16px;
    font-size: 12px;
  }

  .account-profile-description {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.65;
  }

  .account-profile-meta {
    margin-top: 18px;
    gap: 12px;
  }

  .account-profile-meta div {
    align-items: flex-start;
  }

  .account-profile-meta dd {
    font-size: 12px;
    text-align: left;
  }

  .account-profile-actions {
    margin-top: 24px;
    gap: 10px;
  }

  .account-profile-primary-action,
  .account-profile-secondary-action {
    min-height: 54px;
    border-radius: 16px;
    font-size: 14px;
  }

  .account-summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .account-summary-card {
    min-height: 96px;
    padding: 16px;
    border-radius: 20px;
  }

  .account-summary-icon {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border-radius: 15px;
  }

  .account-summary-icon .svg-icon {
    width: 24px;
    height: 24px;
  }

  .account-summary-copy small {
    font-size: 11px;
  }

  .account-summary-copy strong {
    font-size: 24px;
  }

  .account-activity-card {
    padding: 24px 18px 0;
    border-radius: 22px;
  }

  .account-activity-header {
    padding-bottom: 14px;
  }

  .account-activity-header span {
    font-size: 10px;
  }

  .account-activity-header h2 {
    margin-top: 6px;
    font-size: 25px;
  }

  .account-activity-header > a {
    font-size: 12px;
  }

  .account-order-item {
    padding: 20px 0;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .account-order-item:hover {
    margin-inline: -8px;
    padding-inline: 8px;
  }

  .account-order-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .account-order-icon .svg-icon {
    width: 23px;
    height: 23px;
  }

  .account-order-title {
    font-size: 14px;
  }

  .account-order-meta {
    font-size: 10px;
  }

  .account-order-payment {
    margin-top: 7px;
    gap: 7px;
  }

  .account-order-payment > strong {
    font-size: 15px;
  }

  .account-order-payment .status-pill {
    min-height: 27px;
    padding-inline: 9px;
    font-size: 8px;
  }

  .account-order-arrow {
    width: 19px;
    height: 19px;
  }
}

@media (max-width: 560px) {
  .account-order-payment {
    align-items: flex-start;
    flex-direction: column;
  }
}


.admin-shell .main-nav {
  gap: 10px;
}

.admin-shell .main-nav a {
  gap: 5px;
  font-size: 12px;
}

.digital-product-fields[hidden] {
  display: none;
}
.header-notification-link {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  color: var(--text, #111827);
  background: rgba(255, 255, 255, 0.86);
}

.header-notification-link .svg-icon {
  width: 20px;
  height: 20px;
}

.header-notification-link b {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.product-card {
  position: relative;
}

.product-card-actions-top {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
}

.product-card-actions-top form {
  margin: 0;
}

.wishlist-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}

.wishlist-button .svg-icon {
  width: 20px;
  height: 20px;
}

.wishlist-button.active {
  color: #dc2626;
  background: #fff1f2;
  border-color: #fecdd3;
}

.wishlist-button.active .svg-icon {
  fill: currentColor;
}

.product-label-row,
.detail-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.digital-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f97316;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.digital-label .svg-icon {
  width: 14px;
  height: 14px;
}

.catalog-filter-advanced {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(140px, 1fr));
  gap: 12px;
  align-items: center;
}

.catalog-search-wide {
  grid-column: span 2;
}

.catalog-filter-advanced > input,
.catalog-filter-advanced > select {
  min-height: 46px;
}

.catalog-stock-filter {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: #fff;
}

.catalog-filter-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.notification-list,
.ticket-list {
  display: grid;
  gap: 14px;
}

.notification-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
}

.notification-card.unread {
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.9), rgba(255, 255, 255, 0.96));
}

.notification-icon {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: #fff7ed;
  color: #f97316;
}

.notification-icon .svg-icon {
  width: 23px;
  height: 23px;
}

.notification-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.notification-title-row h3 {
  margin: 0;
}

.notification-title-row time {
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
}

.notification-card p {
  margin: 7px 0 12px;
  color: #64748b;
}

.notification-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.notification-actions form {
  margin: 0;
}

.ticket-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  color: inherit;
}

.ticket-card h3 {
  margin: 5px 0 6px;
}

.ticket-card p {
  margin: 0;
  color: #64748b;
}

.ticket-number {
  color: #f97316;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ticket-card-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.priority-high,
.priority-urgent {
  background: #fff1f2;
  color: #be123c;
}

.priority-low {
  background: #f0fdf4;
  color: #15803d;
}

.conversation-card {
  padding: 24px;
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.conversation-message {
  width: min(82%, 720px);
  padding: 16px 18px;
  border-radius: 18px;
  background: #f8fafc;
}

.conversation-message.admin-message {
  margin-left: auto;
  background: #fff7ed;
  border-bottom-right-radius: 5px;
}

.conversation-message.user-message {
  border-bottom-left-radius: 5px;
}

.conversation-message header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.conversation-message header span {
  color: #94a3b8;
  font-size: 11px;
}

.admin-ticket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.analytics-panel {
  padding: 24px;
}

.analytics-wide {
  grid-column: span 2;
}

.admin-analytics-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-analytics-stats .stat-card small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 11px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 5px 0 0;
}

.revenue-bars {
  display: grid;
  gap: 10px;
}

.revenue-bar-row {
  display: grid;
  grid-template-columns: 48px minmax(100px, 1fr) 120px 60px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.revenue-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.revenue-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97316, #dc2626);
}

.revenue-bar-row small {
  color: #94a3b8;
}

.metric-list {
  display: grid;
  gap: 0;
}

.metric-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f7;
}

.metric-list > div:last-child {
  border-bottom: 0;
}

.metric-list small {
  grid-column: 1 / -1;
  color: #94a3b8;
}

.period-filter select {
  min-width: 140px;
}

.loyalty-referral-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.loyalty-card,
.referral-card {
  padding: 24px;
}

.loyalty-card p,
.referral-card p {
  color: #64748b;
  line-height: 1.65;
}

.feature-card-icon {
  width: 30px;
  height: 30px;
  color: #f97316;
}

.loyalty-redeem-form {
  display: flex;
  gap: 10px;
  margin: 18px 0 12px;
}

.loyalty-redeem-form input {
  min-width: 0;
  flex: 1;
}

.referral-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  margin-top: 18px;
  border: 1px dashed #fdba74;
  border-radius: 14px;
  background: #fffaf5;
}

.referral-code-box code {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.referral-stats,
.user-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

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

.referral-stats span,
.user-metrics-row > div {
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
}

.referral-stats strong,
.user-metrics-row strong {
  display: block;
  color: #111827;
  font-size: 17px;
}

.permission-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  margin-top: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fafafa;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.permission-grid .check-row {
  align-items: flex-start;
  font-size: 12px;
}

.digital-product-fields {
  padding: 20px;
  border: 1px solid #dbe2ea;
  border-radius: 18px;
  background: #fafcff;
}

.digital-product-fields legend {
  padding: 0 8px;
  color: #f97316;
  font-weight: 800;
}

.current-digital-asset {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  overflow-wrap: anywhere;
}

.product-delivery-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.serial-key-code,
.serial-key-list code {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  background: #111827;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
}

.serial-key-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.digital-delivery-box {
  display: grid;
  gap: 12px;
}

.detail-purchase-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-purchase-actions .buy-form {
  flex: 1;
}

.status-open,
.status-in_progress {
  background: #fff7ed;
  color: #c2410c;
}

.status-resolved {
  background: #ecfdf5;
  color: #047857;
}

.status-closed,
.status-disabled {
  background: #f1f5f9;
  color: #475569;
}

.status-available {
  background: #ecfdf5;
  color: #047857;
}

.status-assigned {
  background: #fff7ed;
  color: #c2410c;
}

.positive-text {
  color: #15803d !important;
}

.optional-label {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
}

.compact-filter {
  grid-template-columns: minmax(180px, 260px) auto;
  justify-content: start;
}

.compact-empty {
  min-height: 120px;
}

@media (max-width: 1100px) {
  .catalog-filter-advanced {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-search-wide {
    grid-column: span 3;
  }

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

  .analytics-wide {
    grid-column: span 2;
  }
}

@media (max-width: 800px) {
  .catalog-filter-advanced,
  .analytics-grid,
  .admin-analytics-stats,
  .loyalty-referral-grid,
  .admin-ticket-layout {
    grid-template-columns: 1fr;
  }

  .catalog-search-wide,
  .analytics-wide {
    grid-column: span 1;
  }

  .catalog-filter-actions {
    justify-content: stretch;
  }

  .catalog-filter-actions > * {
    flex: 1;
  }

  .revenue-bar-row {
    grid-template-columns: 42px minmax(80px, 1fr) 100px;
  }

  .revenue-bar-row small {
    display: none;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .header-notification-link {
    display: none;
  }
}

@media (max-width: 560px) {
  .notification-card {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 16px;
  }

  .notification-icon {
    width: 42px;
    height: 42px;
  }

  .notification-title-row,
  .ticket-card,
  .conversation-message header,
  .detail-purchase-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-title-row time {
    white-space: normal;
  }

  .ticket-card-status {
    width: 100%;
  }

  .conversation-message {
    width: 100%;
  }

  .loyalty-redeem-form,
  .referral-code-box {
    align-items: stretch;
    flex-direction: column;
  }

  .user-metrics-row,
  .referral-stats {
    grid-template-columns: 1fr;
  }

  .revenue-bar-row {
    grid-template-columns: 38px minmax(60px, 1fr) 88px;
    font-size: 10px;
  }
}

/* Password recovery and responsive analytics dashboard */
.auth-form-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.auth-form-meta a {
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

.analytics-heading > div > p {
  margin: 8px 0 0;
  color: #64748b;
}

.period-filter {
  display: grid;
  gap: 7px;
  min-width: 190px;
}

.period-filter label {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.period-filter select {
  width: 100%;
}

.analytics-stat-card {
  min-width: 0;
}

.analytics-stat-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.analytics-panel {
  min-width: 0;
  border-radius: 20px;
}

.panel-heading p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 12px;
}

.chart-period-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 11px;
  font-weight: 800;
}

.sales-chart-wrap {
  position: relative;
  width: 100%;
  height: 330px;
}

.chart-legend-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #64748b;
  font-size: 11px;
}

.chart-legend-note span {
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: #f97316;
}

.analytics-order-table td:first-child strong {
  color: #7f1d1d;
}

.top-product-list > div > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 800px) {
  .admin-analytics-page {
    padding-top: 32px;
  }

  .analytics-heading {
    gap: 18px;
    margin-bottom: 22px;
  }

  .analytics-heading h1 {
    font-size: clamp(30px, 9vw, 40px);
    line-height: 1.05;
  }

  .period-filter {
    width: 100%;
    min-width: 0;
  }

  .admin-analytics-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .admin-analytics-stats .analytics-stat-card {
    min-height: 118px;
    padding: 16px;
    border-radius: 16px;
  }

  .admin-analytics-stats .analytics-stat-card strong {
    margin-top: 8px;
    font-size: clamp(20px, 6vw, 26px);
    line-height: 1.1;
  }

  .analytics-stat-primary,
  .admin-analytics-stats .analytics-stat-card:last-child {
    grid-column: 1 / -1;
  }

  .analytics-stat-primary strong {
    font-size: clamp(25px, 8vw, 32px) !important;
  }

  .analytics-grid {
    gap: 12px;
    margin-top: 12px;
  }

  .analytics-panel {
    padding: 18px;
    border-radius: 17px;
  }

  .panel-heading {
    gap: 12px;
    margin-bottom: 16px;
  }

  .panel-heading h2 {
    font-size: 20px;
  }

  .sales-chart-wrap {
    height: 250px;
  }

  .metric-list > div {
    gap: 6px 10px;
    padding: 11px 0;
  }

  .metric-list > div > strong {
    text-align: right;
  }

  .analytics-order-table {
    overflow: visible;
  }

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

  .analytics-order-table thead {
    display: none;
  }

  .analytics-order-table tbody {
    display: grid;
    gap: 12px;
  }

  .analytics-order-table tr {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
  }

  .analytics-order-table td {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .analytics-order-table td:last-child {
    border-bottom: 0;
  }

  .analytics-order-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .analytics-order-table .table-sub {
    display: block;
    margin-top: 3px;
  }

  .analytics-order-table .status-pill {
    justify-self: end;
  }
}

@media (max-width: 420px) {
  .admin-analytics-stats .analytics-stat-card {
    padding: 14px;
  }

  .admin-analytics-stats .analytics-stat-card span,
  .admin-analytics-stats .analytics-stat-card small {
    font-size: 10px;
  }

  .analytics-panel {
    padding: 16px;
  }

  .sales-chart-wrap {
    height: 220px;
  }

  .chart-period-badge {
    padding: 6px 8px;
  }

  .analytics-order-table td {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
  }
}

/* Analytics dashboard layout fix v2 */
.admin-shell,
.admin-shell .site-header,
.admin-shell .admin-analytics-page {
  width: 100%;
  max-width: none;
}

.admin-analytics-page {
  overflow-x: clip;
}

.admin-analytics-page .analytics-container {
  width: min(calc(100% - 32px), 1180px);
  max-width: 1180px;
}

.analytics-heading {
  align-items: flex-end;
}

.analytics-heading-copy {
  min-width: 0;
}

.analytics-heading-copy h1 {
  line-height: 1.05;
}

.analytics-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(270px, .9fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}

.analytics-side-stack {
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.analytics-bottom-grid {
  display: grid;
  grid-template-columns: minmax(270px, .9fr) minmax(0, 2.1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.sales-chart-panel,
.recent-orders-panel,
.compact-analytics-panel {
  min-width: 0;
}

.chart-panel-heading {
  margin-bottom: 14px;
}

.chart-summary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.chart-summary-row > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(249, 115, 22, .12);
  border-radius: 14px;
  background: linear-gradient(145deg, #fffaf5, #fff7ed);
}

.chart-summary-row span,
.chart-summary-row strong {
  display: block;
}

.chart-summary-row span {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.chart-summary-row strong {
  margin-top: 4px;
  color: #431407;
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sales-chart-wrap {
  min-width: 0;
  height: 300px;
}

.sales-chart-wrap canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
}

.compact-analytics-panel .panel-heading {
  margin-bottom: 10px;
}

.compact-analytics-panel .metric-list > div {
  min-width: 0;
}

.status-metric-list .status-pill {
  text-transform: uppercase;
}

.payment-metric-list > div,
.top-product-list > div {
  grid-template-columns: minmax(0, 1fr) auto;
}

.payment-metric-list > div small,
.top-product-list > div small {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .analytics-overview-grid,
  .analytics-bottom-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .analytics-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .analytics-bottom-grid .recent-orders-panel {
    grid-row: 1;
  }
}

@media (max-width: 800px) {
  .admin-analytics-page {
    padding: 26px 0 44px;
  }

  .admin-analytics-page .analytics-container {
    width: min(calc(100% - 24px), 1180px);
  }

  .analytics-heading {
    width: 100%;
    gap: 16px;
    margin-bottom: 18px;
  }

  .analytics-heading h1 {
    margin-top: 5px;
    font-size: clamp(28px, 7.5vw, 36px);
    letter-spacing: -1.35px;
  }

  .analytics-heading > div > p {
    max-width: 34rem;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.55;
  }

  .period-filter {
    gap: 5px;
  }

  .period-filter select {
    min-height: 44px;
  }

  .admin-analytics-stats {
    gap: 9px;
  }

  .admin-analytics-stats .analytics-stat-card {
    min-height: 104px;
    padding: 14px;
  }

  .admin-analytics-stats .analytics-stat-card strong {
    margin: 5px 0 auto;
    font-size: clamp(20px, 5.8vw, 25px);
  }

  .admin-analytics-stats .analytics-stat-card small {
    margin-top: 6px;
    line-height: 1.35;
  }

  .analytics-overview-grid,
  .analytics-bottom-grid {
    gap: 12px;
    margin-top: 12px;
  }

  .analytics-side-stack {
    gap: 12px;
  }

  .analytics-panel {
    padding: 17px;
  }

  .chart-summary-row {
    margin-bottom: 14px;
  }

  .sales-chart-wrap {
    height: 230px;
  }
}

@media (max-width: 600px) {
  .analytics-side-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .analytics-bottom-grid .recent-orders-panel {
    grid-row: auto;
  }
}

@media (max-width: 480px) {
  .admin-analytics-page .analytics-container {
    width: calc(100% - 20px);
  }

  .admin-analytics-page {
    padding-top: 22px;
  }

  .analytics-heading {
    gap: 13px;
  }

  .analytics-heading h1 {
    font-size: 27px;
  }

  .analytics-heading > div > p {
    font-size: 12px;
  }

  .admin-analytics-stats {
    gap: 8px;
  }

  .admin-analytics-stats .analytics-stat-card {
    min-height: 98px;
    padding: 13px;
    border-radius: 15px;
  }

  .admin-analytics-stats .analytics-stat-card span,
  .admin-analytics-stats .analytics-stat-card small {
    font-size: 9px;
  }

  .admin-analytics-stats .analytics-stat-primary strong {
    font-size: 26px !important;
  }

  .analytics-panel {
    padding: 15px;
    border-radius: 16px;
  }

  .panel-heading h2 {
    font-size: 19px;
  }

  .panel-heading p {
    font-size: 11px;
  }

  .chart-period-badge {
    padding: 5px 8px;
    font-size: 10px;
  }

  .chart-summary-row {
    gap: 8px;
  }

  .chart-summary-row > div {
    padding: 10px 11px;
    border-radius: 12px;
  }

  .chart-summary-row span {
    font-size: 8px;
  }

  .chart-summary-row strong {
    font-size: 14px;
  }

  .sales-chart-wrap {
    height: 205px;
  }

  .chart-legend-note {
    margin-top: 10px;
    font-size: 10px;
  }

  .metric-list > div {
    padding: 10px 0;
  }

  .analytics-order-table tr {
    padding: 8px 12px;
  }

  .analytics-order-table td {
    grid-template-columns: 68px minmax(0, 1fr);
    padding: 8px 0;
    font-size: 11px;
  }
}

/* Dashboard recent orders mobile overflow fix v3 */
.recent-orders-panel,
.recent-orders-panel .responsive-table,
.recent-orders-panel .analytics-order-table,
.recent-orders-panel .analytics-order-table table,
.recent-orders-panel .analytics-order-table tbody,
.recent-orders-panel .analytics-order-table tr,
.recent-orders-panel .analytics-order-table td {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.recent-orders-panel .panel-heading {
  flex-wrap: wrap;
}

.recent-orders-panel .panel-heading > div {
  min-width: 0;
  flex: 1 1 180px;
}

.recent-orders-panel .panel-heading a {
  flex: 0 1 auto;
  max-width: 100%;
}

@media (max-width: 800px) {
  .recent-orders-panel {
    overflow: hidden;
  }

  .analytics-order-table tbody {
    width: 100%;
  }

  .analytics-order-table tr {
    width: 100%;
    padding: 10px 12px;
    overflow: hidden;
  }

  .analytics-order-table td {
    width: 100%;
    grid-template-columns: 72px minmax(0, 1fr);
    text-align: left;
  }

  .analytics-order-table td > strong,
  .analytics-order-table td > small,
  .analytics-order-table td > span,
  .analytics-order-table td > div,
  .analytics-order-table td > p {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .analytics-order-table .status-pill {
    justify-self: start;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .recent-orders-panel .panel-heading {
    gap: 8px;
    margin-bottom: 14px;
  }

  .recent-orders-panel .panel-heading a {
    font-size: 13px;
  }

  .analytics-order-table tr {
    padding: 10px;
    border-radius: 12px;
  }

  .analytics-order-table td {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    font-size: 11px;
  }

  .analytics-order-table td::before {
    font-size: 10px;
  }
}
