/* Essence & Beauty wholesale — shared design tokens + storefront + admin */
:root {
  --bone: #f9f6f1;
  --paper: #ffffff;
  --sand: #efe8de;
  --line: #e4dccf;
  --line-strong: #cfc3b1;
  --ink: #1f1b17;
  --ink-2: #4a423a;
  --muted: #7d7266;
  --clay: #7a6047;
  --clay-dark: #5e4935;
  --gold: #9b764e;
  --gold-soft: #f3ebe0;
  --ok: #2f7a4f;
  --ok-bg: #e7f3ec;
  --warn: #9a6a12;
  --warn-bg: #fbf1dc;
  --bad: #a8382c;
  --bad-bg: #fbe9e6;
  --info: #3d5f86;
  --info-bg: #e8eff7;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(31, 27, 23, 0.05), 0 4px 16px rgba(31, 27, 23, 0.05);
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Playfair Display', Georgia, serif;
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bone); font-size: 15px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .76rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--gold); font-weight: 600; }

/* ------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-weight: 500; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; min-height: 42px; }
.btn:hover { background: var(--clay-dark); border-color: var(--clay-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--ink); background: var(--paper); }
.btn.gold { background: var(--clay); border-color: var(--clay); }
.btn.gold:hover { background: var(--clay-dark); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); padding: 8px 10px; }
.btn.ghost:hover { background: var(--sand); }
.btn.sm { padding: 6px 12px; min-height: 32px; font-size: .86rem; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--clay); text-decoration: underline; cursor: pointer; }

label { display: block; font-size: .84rem; font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line-strong); background: var(--paper); border-radius: var(--radius-sm); padding: 9px 12px; min-height: 42px; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus, .btn:focus-visible, a:focus-visible, .chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.input.sm { min-height: 34px; padding: 5px 9px; font-size: .9rem; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); cursor: pointer; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.qty { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--paper); }
.qty button { border: 0; background: none; width: 38px; cursor: pointer; font-size: 1.1rem; }
.qty input { width: 64px; border: 0; text-align: center; min-height: 40px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.flush { padding: 0; }
.card h3 { margin-bottom: 12px; }
.notice { border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; border: 1px solid transparent; }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: #f0dcae; }
.notice.bad { background: var(--bad-bg); color: var(--bad); border-color: #f2c9c2; }
.notice.ok { background: var(--ok-bg); color: var(--ok); border-color: #c6e3d1; }
.notice.info { background: var(--info-bg); color: var(--info); border-color: #cddcec; }

.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: .74rem; font-weight: 600; white-space: nowrap; background: var(--sand); color: var(--ink-2); }
.badge.in_stock, .badge.ok, .badge.Applied, .badge.Accepted, .badge.Fulfilled, .badge.Received { background: var(--ok-bg); color: var(--ok); }
.badge.limited, .badge.warn, .badge.Reviewing, .badge.Countered, .badge.Processing, .badge.Sent, .badge.PartiallyApplied, .badge.PartiallyFulfilled { background: var(--warn-bg); color: var(--warn); }
.badge.out_of_stock, .badge.unavailable, .badge.bad, .badge.Failed, .badge.Rejected, .badge.Cancelled, .badge.Expired { background: var(--bad-bg); color: var(--bad); }
.badge.info, .badge.New, .badge.Submitted, .badge.Uploaded, .badge.Approved, .badge.Pending, .badge.Confirmed, .badge.UnderReview { background: var(--info-bg); color: var(--info); }
.badge.ConvertedtoOrder { background: var(--ink); color: #fff; }
.badge.RolledBack { background: var(--sand); color: var(--ink-2); }
.badge.dark { background: var(--ink); color: #fff; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fcfaf7; white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #fcfaf6; }
.thumb { width: 44px; height: 44px; flex-shrink: 0; border-radius: 6px; object-fit: cover; background: var(--sand); }
.noimg.thumb { font-size: .9rem; }
.change-old { color: var(--muted); text-decoration: line-through; }
.change-new { color: var(--ink); font-weight: 600; }
.up { color: var(--bad); }
.down { color: var(--ok); }

.toast-host { position: fixed; z-index: 100; bottom: 16px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 440px); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: .92rem; animation: pop .18s ease-out; }
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal-back { position: fixed; inset: 0; background: rgba(31, 27, 23, .45); z-index: 90; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--paper); border-radius: 14px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal.wide { width: min(920px, 100%); }
@keyframes fade { from { opacity: 0; } }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--clay); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 24px 0; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 16px; }
.tab { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tab.active { color: var(--ink); border-bottom-color: var(--clay); }
.tab .count { font-size: .74rem; background: var(--sand); padding: 1px 7px; border-radius: 999px; margin-left: 4px; }

/* =============================================================== STORE */
.announce { background: var(--ink); color: #e9dfd2; font-size: .8rem; text-align: center; padding: 7px 16px; letter-spacing: .02em; position: relative; }
.announce-back { color: #fff; font-weight: 600; text-decoration: none; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
.announce-back:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .announce-back { position: static; transform: none; display: block; margin-bottom: 2px; }
}
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .bar { display: flex; align-items: center; gap: 20px; height: 70px; }
.brand-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-logo img { height: 34px; width: auto; }
.brand-logo .wordmark { font-family: var(--display); font-size: 1.2rem; line-height: 1; }
.brand-logo .wordmark small { display: block; font-family: var(--font); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.search { flex: 1; max-width: 560px; position: relative; }
.search input { width: 100%; border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 44px 10px 18px; background: var(--bone); min-height: 44px; }
.search input:focus { background: var(--paper); outline: 2px solid var(--gold); outline-offset: 0; }
.search button { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 38px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; cursor: pointer; }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .9rem; border: 0; background: none; cursor: pointer; }
.icon-btn:hover { background: var(--sand); }
.icon-btn svg { width: 20px; height: 20px; }
.cart-count { position: absolute; top: 2px; right: 2px; background: var(--clay); color: #fff; border-radius: 999px; font-size: .68rem; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; font-weight: 600; }
.site-nav { border-top: 1px solid var(--line); }
.site-nav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.site-nav a { padding: 11px 14px; text-decoration: none; font-size: .88rem; color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { color: var(--ink); border-bottom-color: var(--clay); }
@media (max-width: 760px) {
  .site-header .bar { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .brand-logo .wordmark small { display: none; }
  .icon-btn .label { display: none; }
}

.hero { background: linear-gradient(135deg, #efe6da 0%, #f9f6f1 60%); border-bottom: 1px solid var(--line); }
.hero .container { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); margin-bottom: 14px; }
.hero p.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 36em; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.hero-stat b { display: block; font-family: var(--display); font-size: 1.8rem; font-weight: 500; }
.hero-stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 860px) { .hero .container { grid-template-columns: 1fr; padding-top: 32px; padding-bottom: 32px; gap: 24px; } }

.section { padding: 44px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.source-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.source-tile { display: block; text-decoration: none; background: var(--ink); color: #fff; border-radius: 14px; padding: 28px; position: relative; overflow: hidden; min-height: 150px; }
.source-tile.alt { background: var(--clay); }
.source-tile h3 { font-size: 1.6rem; margin-bottom: 6px; }
.source-tile p { opacity: .8; margin: 0; }
.source-tile .arrow { position: absolute; right: 24px; bottom: 22px; font-size: 1.4rem; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; text-decoration: none; transition: border-color .15s, transform .15s; }
.cat-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.cat-card b { display: block; font-weight: 600; }
.cat-card span { font-size: .8rem; color: var(--muted); }
@media (max-width: 640px) { .source-tiles { grid-template-columns: 1fr; } }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .products { grid-template-columns: 1fr 1fr; gap: 10px; } }
.pcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.pcard:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.pcard .img { aspect-ratio: 1; background: #f4efe8; display: block; position: relative; }
.pcard .img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; mix-blend-mode: multiply; }
.pcard .img .flags { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.pcard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard .brand { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 600; }
.pcard .name { font-size: .92rem; line-height: 1.35; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pcard .name:hover { text-decoration: underline; }
.pcard .variant { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.price { font-weight: 700; font-size: 1.1rem; }
.price small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.msrp { color: var(--muted); font-size: .8rem; }
.pcard .actions { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 10px; }
.pcard .actions .btn { min-height: 36px; padding: 6px 10px; font-size: .84rem; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--line-strong); font-family: var(--display); font-size: 2rem; }

.shop { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding-top: 28px; padding-bottom: 48px; }
.filters { position: sticky; top: 130px; align-self: start; max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 6px; }
.filters h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
.filters .opt { display: flex; justify-content: space-between; gap: 6px; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: .9rem; text-decoration: none; }
.filters .opt:hover { background: var(--sand); }
.filters .opt.on { background: var(--ink); color: #fff; }
.filters .opt .n { color: var(--muted); font-size: .78rem; }
.filters .opt.on .n { color: #cfc3b1; }
.filters .brand-list { max-height: 260px; overflow-y: auto; }
.shop-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line-strong); background: var(--paper); border-radius: 999px; padding: 4px 12px; font-size: .82rem; cursor: pointer; }
.filter-toggle { display: none; }
@media (max-width: 900px) {
  .shop { grid-template-columns: 1fr; padding-top: 16px; }
  .filters { position: fixed; inset: 0 30% 0 0; min-width: 280px; max-height: none; top: 0; background: var(--paper); z-index: 80; padding: 20px; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow); }
  .filters.open { transform: none; }
  .filter-toggle { display: inline-flex; }
}

.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 28px; padding-bottom: 28px; }
.gallery .main { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .thumbs button { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); padding: 4px; cursor: pointer; }
.gallery .thumbs button.on { border-color: var(--ink); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pdp .info h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.pdp .price-big { font-size: 2rem; font-weight: 700; }
.buy-box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 20px 0; }
.buy-box .row { gap: 10px; }
.specs { width: 100%; border-collapse: collapse; font-size: .92rem; }
.specs th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 12px 8px 0; width: 38%; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs td { padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 820px) { .pdp { grid-template-columns: 1fr; gap: 20px; padding-top: 16px; } }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; padding-top: 28px; padding-bottom: 48px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line img, .cart-line .noimg { width: 84px; height: 84px; object-fit: contain; background: #f4efe8; border-radius: 8px; font-size: 1.2rem; }
.cart-line .meta { min-width: 0; }
.cart-line .line-total { text-align: right; font-weight: 600; }
.summary { position: sticky; top: 130px; }
.summary .line { display: flex; justify-content: space-between; padding: 6px 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 1.15rem; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } .summary { position: static; } .cart-line { grid-template-columns: 64px 1fr; } .cart-line img, .cart-line .noimg { width: 64px; height: 64px; } .cart-line .line-total { grid-column: 2; text-align: left; } }

.auth-wrap { max-width: 440px; margin: 48px auto; }
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding-top: 28px; padding-bottom: 48px; }
.account-nav a { display: block; padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--ink-2); }
.account-nav a.active, .account-nav a:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 760px) { .account-layout { grid-template-columns: 1fr; } .account-nav { display: flex; gap: 4px; overflow-x: auto; } .account-nav a { white-space: nowrap; } }

.thread { display: grid; gap: 10px; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--paper); max-width: 560px; }
.msg.admin { background: var(--gold-soft); border-color: #e6d5bf; margin-left: auto; }
.msg.system { background: var(--sand); margin: 0 auto; font-size: .86rem; }
.msg .who { font-size: .76rem; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.msg .what { font-weight: 600; margin: 2px 0; }

.site-footer { background: var(--ink); color: #cfc3b1; padding: 36px 0; margin-top: 40px; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* =============================================================== ADMIN */
.admin-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #d9cfc2; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.admin-side .logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; text-decoration: none; font-family: var(--display); font-size: 1.05rem; }
.admin-side .logo img { height: 30px; filter: brightness(0) invert(1); }
.admin-side nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: #d9cfc2; font-size: .92rem; }
.admin-side nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-side nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.admin-side nav .count { background: var(--clay); color: #fff; font-size: .7rem; border-radius: 999px; padding: 1px 7px; }
.admin-side .section-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: #8f8477; margin: 16px 12px 6px; }
.admin-side .me { margin-top: auto; padding: 12px; font-size: .82rem; border-top: 1px solid rgba(255,255,255,.1); }
.admin-main { min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.admin-top h1 { font-size: 1.35rem; margin: 0; }
.admin-content { padding: 24px; max-width: 1400px; }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; left: 0; top: 0; width: 260px; z-index: 85; transform: translateX(-105%); transition: transform .2s; }
  .admin-side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .menu-btn { display: inline-flex; }
  .admin-content { padding: 16px; }
  .admin-top { padding: 12px 16px; }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; display: block; }
a.kpi:hover { border-color: var(--gold); }
.kpi .label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.kpi .value { font-family: var(--display); font-size: 1.9rem; line-height: 1.2; }
.kpi .sub { font-size: .8rem; color: var(--muted); }
.kpi.alert { border-color: #f0dcae; background: var(--warn-bg); }
.kpi.bad { border-color: #f2c9c2; background: var(--bad-bg); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; min-width: 140px; }
.toolbar .search-input { flex: 1; min-width: 200px; }
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.map-select { min-width: 170px; }
.row-errors { color: var(--bad); font-size: .84rem; margin: 2px 0 0; padding-left: 18px; }
.row-warnings { color: var(--warn); font-size: .84rem; margin: 2px 0 0; padding-left: 18px; }
.changes { font-size: .84rem; }
.changes div { white-space: nowrap; }
.status-flow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.status-flow .step { padding: 3px 10px; border-radius: 999px; background: var(--sand); }
.status-flow .step.done { background: var(--ok-bg); color: var(--ok); }
.status-flow .step.now { background: var(--ink); color: #fff; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.admin-login .card { width: min(420px, 100%); }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 24px; text-align: center; background: var(--bone); cursor: pointer; }
.dropzone.drag { border-color: var(--clay); background: var(--gold-soft); }

/* ======================================================= PRIVATE ACCESS */
.hero.private { background: radial-gradient(1200px 500px at 10% 0%, #efe3d3 0%, transparent 60%), linear-gradient(135deg, #f3ece2 0%, var(--bone) 70%); }
.hero.private h1 { max-width: 16em; }
.hero-panel { background: var(--ink); color: #f3ebe0; border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.hero-points { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; }
.hero-points li { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
.hero-points li:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-points b { font-family: var(--display); font-weight: 500; font-size: 1.15rem; }
.hero-points span { color: #cfc3b1; font-size: .88rem; }
.steps .card { position: relative; }
.step-n { font-family: var(--display); font-size: 2rem; color: var(--gold); line-height: 1; margin-bottom: 8px; }
.cta-band { background: var(--gold-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-band h2 { margin-top: 6px; }
.cta-band p { max-width: 36em; margin: 0 auto 18px; }
.locked { display: flex; gap: 10px; align-items: flex-start; color: var(--clay-dark); background: var(--gold-soft); border: 1px solid #e6d5bf; border-radius: var(--radius-sm); padding: 12px 14px; }
.locked svg { flex-shrink: 0; margin-top: 2px; }
.locked-title { font-weight: 600; font-size: .92rem; }
.locked-sub { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.locked.compact { padding: 7px 9px; gap: 7px; width: 100%; }
.locked.compact .locked-title { font-size: .76rem; font-weight: 500; line-height: 1.35; }
.locked.compact .locked-sub { font-size: .72rem; }
.pcard .actions.single { grid-template-columns: 1fr; }
.members-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--ink); color: #f3ebe0; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.members-banner .muted { color: #cfc3b1; display: block; font-size: .86rem; }
.members-banner .btn.secondary { color: #fff; border-color: rgba(255,255,255,.4); }
.gate { padding: 36px 28px; }
.gate-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--gold-soft); color: var(--clay); display: grid; place-items: center; margin: 0 auto 12px; }
.gate-icon svg { width: 24px; height: 24px; }
.apply-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 36px; padding-top: 32px; padding-bottom: 48px; align-items: start; }
.apply-intro { position: sticky; top: 130px; }
.perks { padding-left: 18px; margin: 0 0 16px; display: grid; gap: 8px; }
.span-2 { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status-card h2 { font-size: 1.5rem; }
.timeline { margin-top: 16px; border-left: 2px solid var(--line); padding-left: 14px; display: grid; gap: 8px; font-size: .9rem; }
.timeline .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin: 0 8px 1px -19px; }
.site-nav a.nav-apply { color: var(--clay); font-weight: 600; }
@media (max-width: 860px) { .apply-layout { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; } .apply-intro { position: static; } }
@media (max-width: 480px) { .hide-sm { display: none; } }
.badge.MoreInformationRequired { background: var(--warn-bg); color: var(--warn); }
.badge.Deleted { background: var(--bad-bg); color: var(--bad); }
.field-editor td { vertical-align: middle; }
.field-editor .input.sm { min-width: 90px; }

/* Small supplier thumbnails: show near their real size instead of stretching them blurry. */
.pcard .img { display: grid; place-items: center; }
.pcard .img img.lowres { width: min(100%, 135px); height: auto; padding: 0; }
.gallery .main img.lowres { width: min(100%, 180px); height: auto; padding: 0; }
.cart-line img.lowres, .thumb.lowres { object-fit: contain; }
.msrp-public { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.case-pack { font-size: .76rem; color: var(--clay); font-weight: 600; }
