:root {
  --purple: #6819b1;
  --purple-dark: #2d0747;
  --purple-deep: #170920;
  --purple-light: #8f35d3;
  --gold: #f2bd2e;
  --gold-light: #ffd86b;
  --paper: #ffffff;
  --canvas: #f7f3fa;
  --ink: #1c1421;
  --muted: #6e6472;
  --line: #e4dce8;
  --success: #207a4b;
  --danger: #a92f40;
  --shadow: 0 24px 70px rgba(35, 9, 49, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; }
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 200; padding: 10px 14px; color: #fff; background: var(--purple); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 10px max(20px, calc((100vw - 1180px) / 2)); color: #fff; background: rgba(23,9,32,.96); border-bottom: 1px solid rgba(242,189,46,.22); backdrop-filter: blur(15px); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { width: 58px; height: 58px; object-fit: cover; border: 1px solid rgba(242,189,46,.35); border-radius: 11px; }
.brand > span { display: flex; flex-direction: column; line-height: 1.05; }
.brand b { font-size: 17px; letter-spacing: -.02em; }
.brand small { margin-top: 5px; color: var(--gold); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a, .nav-link { padding: 7px 0; color: rgba(255,255,255,.78); background: none; border: 0; font-size: 14px; font-weight: 750; }
.site-header nav a:hover, .nav-link:hover { color: var(--gold); }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; font-weight: 850; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-2px); }
.button:disabled { cursor: wait; opacity: .6; transform: none; }
.button--small { min-height: 42px; padding-inline: 16px; font-size: 14px; }
.button--gold { color: #251600; background: var(--gold); box-shadow: 0 9px 25px rgba(242,189,46,.17); }
.button--gold:hover { background: var(--gold-light); }
.button--purple { color: #fff; background: var(--purple); }
.button--purple:hover { background: var(--purple-light); }
.button--outline-dark { color: var(--purple); background: #fff; border-color: rgba(104,25,177,.3); }
.button--full { width: 100%; }
.text-button { padding: 0; color: var(--purple); background: none; border: 0; font-size: 14px; font-weight: 850; }

.market-head { position: relative; color: #fff; background-color: var(--purple-deep); background-image: linear-gradient(90deg, rgba(23,9,32,.78) 0%, rgba(45,7,71,.48) 55%, rgba(23,9,32,.42) 100%), url("/assets/trenton-makes.jpeg"); background-position: center 31%; background-size: cover; background-repeat: no-repeat; overflow: hidden; }
.market-head::after { content: ""; position: absolute; inset: 0; opacity: .06; background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(to right, #000, transparent 85%); }
.market-head__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.35fr .65fr; gap: 50px; align-items: center; min-height: 240px; padding-block: 30px; }
.eyebrow, .kicker { color: var(--gold); font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow i { width: 8px; height: 8px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 5px rgba(242,189,46,.1); }
.market-head h1 { margin: 14px 0 8px; font-size: clamp(42px, 5.4vw, 62px); line-height: .98; letter-spacing: -.06em; }
.market-head h1 em { color: var(--gold); font-style: normal; }
.market-head p { max-width: 650px; margin: 0; color: rgba(255,255,255,.72); font-size: 18px; line-height: 1.5; }
.market-head h1, .market-head p, .market-head .eyebrow { text-shadow: 0 2px 18px rgba(0,0,0,.88); }
.quick-actions { display: grid; gap: 10px; }
.quick-action { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 13px; color: #fff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; text-align: left; transition: .18s ease; }
.quick-action:hover { background: rgba(255,255,255,.12); border-color: rgba(242,189,46,.5); transform: translateX(3px); }
.quick-action > span { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; color: var(--purple-deep); background: var(--gold); border-radius: 50%; font-size: 20px; font-weight: 900; }
.quick-action b { align-self: end; font-size: 15px; }
.quick-action small { align-self: start; margin-top: 3px; color: rgba(255,255,255,.57); font-size: 13px; }

.marketplace { padding-block: 42px 95px; }
.market-tools { position: sticky; top: 92px; z-index: 20; margin-bottom: 40px; padding: 16px; background: rgba(255,255,255,.93); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 45px rgba(39,18,50,.1); backdrop-filter: blur(14px); }
.categories { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.category { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-height: 44px; padding: 0 14px; color: var(--ink); background: #f7f2f9; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 800; }
.category:hover { border-color: rgba(104,25,177,.4); }
.category small { display: grid; place-items: center; min-width: 25px; height: 25px; padding-inline: 6px; color: var(--muted); background: #fff; border-radius: 999px; font-size: 12px; }
.category.active { color: #fff; background: var(--purple); border-color: var(--purple); }
.category.active small { color: var(--ink); background: var(--gold); }
.toolbar { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 12px; }
.search-box, .sort-box { display: flex; align-items: center; min-height: 50px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.search-box { gap: 11px; padding: 0 14px; }
.search-box:focus-within, .sort-box:focus-within { border-color: rgba(104,25,177,.55); box-shadow: 0 0 0 3px rgba(104,25,177,.08); }
.search-box svg { width: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.search-box input { width: 100%; color: var(--ink); background: transparent; border: 0; outline: none; }
.sort-box { gap: 9px; padding: 0 12px 0 15px; }
.sort-box span { color: var(--muted); font-size: 13px; font-weight: 800; }
.sort-box select { color: var(--ink); background: transparent; border: 0; outline: none; font-size: 14px; font-weight: 800; }
.listing-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.listing-heading .kicker { color: var(--purple); }
.listing-heading h2 { margin: 8px 0 0; font-size: clamp(34px, 4vw, 50px); line-height: 1; letter-spacing: -.055em; }
.connection-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
.connection-status i { width: 8px; height: 8px; background: #aaa2b0; border-radius: 50%; }
.connection-status.online { color: var(--success); }
.connection-status.online i { background: var(--success); box-shadow: 0 0 0 4px rgba(32,122,75,.1); }
.connection-status.offline { color: var(--danger); }
.connection-status.offline i { background: var(--danger); }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 260px; color: var(--muted); }
.loading-state > span { width: 22px; height: 22px; border: 2px solid rgba(104,25,177,.2); border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.listing-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 17px; transition: .22s ease; }
.listing-card:hover { border-color: rgba(104,25,177,.34); box-shadow: 0 19px 45px rgba(47,18,63,.12); transform: translateY(-4px); }
.card-open { width: 100%; padding: 0; color: inherit; background: transparent; border: 0; text-align: left; }
.card-media { position: relative; display: grid; place-items: center; width: 100%; height: auto; aspect-ratio: 1 / 1; color: #fff; background: linear-gradient(145deg, var(--purple-dark), var(--purple-light)); overflow: hidden; }
.card-media.furniture { background: linear-gradient(145deg, #3b1257, #9b46cf); }
.card-media.electronics { background: linear-gradient(145deg, #200a48, #704bd1); }
.card-media.appliances { background: linear-gradient(145deg, #351054, #b076d8); }
.card-media.tools { background: linear-gradient(145deg, #2e1745, #8155a8); }
.card-media.real-estate { background: linear-gradient(145deg, #3d1768, #b17a2f); }
.card-media.services { background: linear-gradient(145deg, #21092f, #6819b1); }
.card-media.other { background: linear-gradient(145deg, #4c0c7c, #a250db); }
.card-media::before { content: ""; position: absolute; width: 230px; height: 230px; border: 1px solid rgba(242,189,46,.32); border-radius: 50%; }
.card-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.media-monogram { position: relative; z-index: 1; display: grid; place-items: center; width: 84px; height: 84px; color: var(--gold); border: 2px solid rgba(242,189,46,.62); border-radius: 50%; font-size: 24px; font-weight: 950; }
.card-tag { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 6px 9px; color: #2c1a00; background: var(--gold); border-radius: 999px; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.photo-count { position: absolute; right: 12px; bottom: 12px; z-index: 2; padding: 6px 9px; color: #fff; background: rgba(23,9,32,.82); border-radius: 999px; font-size: 11px; font-weight: 850; }
.card-body { padding: 19px; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.card-body h3 { margin: 11px 0 8px; font-size: 19px; line-height: 1.25; letter-spacing: -.025em; }
.trust-badge { display: inline-flex; align-items: center; width: max-content; margin: 0 0 8px; padding: 5px 8px; color: #27603f; background: #e5f7ec; border: 1px solid #bfe5ce; border-radius: 999px; font-size: 11px; font-weight: 900; }
.trust-badge--large { margin: -9px 0 15px; font-size: 12px; }
.card-body > p { min-height: 48px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.card-foot strong { font-size: 20px; }
.card-foot span { color: var(--purple); font-size: 13px; font-weight: 900; }
.empty-state { padding: 72px 20px; text-align: center; }
.empty-state > div { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto; color: var(--gold); background: var(--purple); border-radius: 50%; font-weight: 950; }
.empty-state h3 { margin: 18px 0 7px; font-size: 25px; }
.empty-state p { margin: 0 0 23px; color: var(--muted); }

.how-it-works { margin-bottom: 75px; padding: clamp(34px,5vw,62px); color: #fff; background: var(--purple-deep); border-radius: 26px; }
.how-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.how-heading h2 { max-width: 650px; margin: 9px 0 0; font-size: clamp(34px,4vw,52px); line-height: 1; letter-spacing: -.05em; }
.step-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 11px; margin-top: 38px; }
.step-grid article { padding: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 15px; }
.step-grid article > span { color: var(--gold); font-size: 13px; font-weight: 900; }
.step-grid h3 { margin: 23px 0 8px; font-size: 18px; }
.step-grid p { margin: 0; color: rgba(255,255,255,.62); font-size: 14px; line-height: 1.55; }

.site-footer { color: #fff; background: #0e0514; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 120px; }
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-brand img { width: 58px; height: 58px; object-fit: cover; border-radius: 10px; }
.footer-brand > span { display: flex; flex-direction: column; }
.footer-brand b { font-size: 15px; }
.footer-brand small { margin-top: 4px; color: rgba(255,255,255,.5); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.footer-links button { padding: 5px 0; color: rgba(255,255,255,.65); background: none; border: 0; font-size: 13px; }
.footer-links button:hover { color: var(--gold); }

.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(10,3,15,.7); backdrop-filter: blur(5px); }
.drawer { position: fixed; top: 0; right: 0; z-index: 61; width: min(560px,100%); height: 100%; padding: 18px; overflow-y: auto; color: var(--ink); background: var(--paper); box-shadow: -30px 0 90px rgba(0,0,0,.3); transform: translateX(105%); transition: transform .28s ease; }
.drawer.open { transform: translateX(0); }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; color: inherit; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 50%; font-size: 25px; line-height: 1; }
.drawer-close { position: sticky; top: 0; z-index: 4; margin-left: auto; }
.drawer-media { height: auto; aspect-ratio: 1 / 1; margin-top: -42px; border-radius: 18px; }
.gallery-thumbnails { display: flex; gap: 8px; margin: 10px 2px 0; overflow-x: auto; }
.gallery-thumb { flex: 0 0 68px; width: 68px; height: 68px; padding: 3px; background: #fff; border: 2px solid transparent; border-radius: 9px; }
.gallery-thumb.active { border-color: var(--gold); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; background: #eee7f1; border-radius: 5px; }
.drawer-main { padding: 27px 12px; }
.drawer-kicker { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 13px; }
.drawer-main .kicker { color: var(--purple); }
.drawer-main h2 { margin: 12px 0 8px; font-size: 34px; line-height: 1.08; letter-spacing: -.045em; }
.drawer-price { display: block; margin: 21px 0; color: var(--purple); font-size: 31px; }
.drawer-description { color: var(--muted); line-height: 1.68; white-space: pre-line; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 22px 0; }
.detail-grid div { padding: 15px; background: #f4eff6; border-radius: 11px; }
.detail-grid small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.detail-grid strong { display: block; margin-top: 6px; font-size: 14px; }
.drawer-actions { display: grid; gap: 9px; }
.report-link { justify-self: center; padding: 8px; color: var(--danger); background: none; border: 0; font-size: 13px; font-weight: 800; }
.safety-note { margin: 14px 0 0; padding: 14px; color: #695014; background: #fff2c7; border: 1px solid #f4dda0; border-radius: 9px; font-size: 13px; line-height: 1.5; }

.modal, .admin-modal, .policy-modal { width: min(800px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; color: var(--ink); background: var(--paper); border: 0; border-radius: 23px; box-shadow: var(--shadow); }
.admin-modal { width: min(1120px, calc(100% - 28px)); }
.policy-modal { width: min(700px, calc(100% - 28px)); }
.modal::backdrop, .admin-modal::backdrop, .policy-modal::backdrop { background: rgba(10,3,15,.75); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 16px; right: 16px; z-index: 3; }
.modal-header { padding: 34px 70px 25px 34px; border-bottom: 1px solid var(--line); }
.modal-header .kicker, .admin-header .kicker, .policy-content .kicker { color: var(--purple); }
.modal-header h2, .admin-header h2, .policy-content h2 { margin: 9px 0 6px; font-size: 31px; line-height: 1.1; letter-spacing: -.04em; }
.modal-header p, .admin-header p { margin: 0; color: var(--muted); font-size: 14px; }
.listing-form { padding: 28px 34px 34px; }
.listing-form label { display: grid; gap: 7px; margin-bottom: 15px; color: #554b5b; font-size: 14px; font-weight: 800; }
.listing-form input, .listing-form select, .listing-form textarea { width: 100%; padding: 12px 13px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; outline: none; resize: vertical; }
.listing-form input:focus, .listing-form select:focus, .listing-form textarea:focus { border-color: rgba(104,25,177,.6); box-shadow: 0 0 0 3px rgba(104,25,177,.09); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.photo-field small { color: var(--muted); font-size: 12px; font-weight: 500; }
.listing-form label > small { color: var(--muted); font-size: 12px; font-weight: 500; }
.photo-preview-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: -2px 0 18px; }
.photo-preview { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #eee7f1; border: 1px solid var(--line); border-radius: 12px; }
.photo-preview img { width: 100%; height: 100%; object-fit: contain; }
.photo-preview span { position: absolute; left: 8px; bottom: 8px; padding: 5px 7px; color: #fff; background: rgba(23,9,32,.82); border-radius: 6px; font-size: 11px; font-weight: 850; }
.photo-preview button { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 29px; height: 29px; padding: 0; color: #fff; background: rgba(169,47,64,.94); border: 0; border-radius: 50%; font-size: 18px; font-weight: 800; }
.category-fields { margin: 3px 0 5px; padding: 17px 17px 2px; background: #f4eff6; border: 1px solid var(--line); border-radius: 12px; }
.submission-preview { margin: 24px 0 18px; padding: 18px; background: #f4eff6; border: 1px solid var(--line); border-radius: 14px; }
.submission-preview > .kicker { color: var(--purple); }
.submission-preview > h3 { margin: 6px 0 14px; font-size: 20px; }
.preview-card { max-width: 390px; margin: 0 auto; pointer-events: none; }
.receipt-actions { display: grid; justify-items: center; gap: 12px; margin: 0 auto 22px; }
.form-divider { display: flex; align-items: center; justify-content: space-between; margin: 23px 0 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-divider span { color: var(--purple); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.form-divider small { color: var(--success); font-size: 12px; font-weight: 800; }
.seller-identity-note { margin: 0 0 16px; padding: 11px 13px; color: #4f335f; background: #f4eff6; border-left: 3px solid var(--gold); border-radius: 7px; font-size: 12px; line-height: 1.5; }
.seller-identity-note a { color: var(--purple); font-weight: 900; text-decoration: underline; }
.listing-form .consent { display: flex; align-items: start; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.45; }
.consent input { width: auto; margin-top: 3px; accent-color: var(--purple); }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }
.form-status { min-height: 21px; margin: 3px 0 8px; color: var(--danger); font-size: 13px; }
.success-panel { padding: 65px 30px; text-align: center; }
.success-panel > span { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 20px; color: var(--ink); background: var(--gold); border-radius: 50%; font-size: 28px; font-weight: 900; }
.success-panel h3 { margin: 0 0 8px; font-size: 31px; }
.success-panel p { max-width: 530px; margin: 0 auto 22px; color: var(--muted); line-height: 1.55; }
.success-panel > small { display: block; margin: 10px 0 24px; color: var(--muted); font-size: 12px; }
.manage-code { display: flex; align-items: center; justify-content: center; gap: 9px; max-width: 440px; margin: 0 auto; padding: 12px; background: #f4eff6; border: 1px solid var(--line); border-radius: 11px; }
.manage-code code { color: var(--purple); font-size: clamp(18px,4vw,25px); font-weight: 900; letter-spacing: .06em; }
.manage-code button { padding: 8px 10px; color: #fff; background: var(--purple); border: 0; border-radius: 7px; font-size: 12px; font-weight: 850; }

.manage-panel { padding: 30px 34px 36px; }
.manage-title { display: flex; justify-content: space-between; gap: 20px; }
.manage-title h3 { margin: 11px 0 5px; font-size: 27px; letter-spacing: -.035em; }
.manage-title p, .manage-description { color: var(--muted); }
.status-badge { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.status-pending { color: #745700; background: #fff0b5; }
.status-approved { color: #fff; background: var(--success); }
.status-sold { color: #fff; background: var(--purple); }
.status-rejected { color: #fff; background: var(--danger); }
.manage-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 24px 0; }
.manage-stats div { padding: 18px; background: #f4eff6; border-radius: 11px; }
.manage-stats strong { display: block; color: var(--purple); font-size: 28px; }
.manage-stats span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.manage-description { line-height: 1.6; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0; }
.manage-note { color: #745700; background: #fff0b5; border-radius: 9px; padding: 13px; }
.seller-edit-form { padding: 0; }
.seller-edit-heading { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.seller-edit-heading .kicker { color: var(--purple); }
.seller-edit-heading h3 { margin: 8px 0 6px; font-size: 27px; letter-spacing: -.035em; }
.seller-edit-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.seller-edit-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 34px 70px 26px 34px; border-bottom: 1px solid var(--line); }
.admin-shell { padding: 25px 34px 34px; }
.admin-stats { display: grid; grid-template-columns: repeat(6,1fr); gap: 9px; }
.admin-stat { padding: 16px; background: #f4eff6; border-radius: 11px; }
.admin-stat strong { display: block; color: var(--purple); font-size: 26px; }
.admin-stat span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.admin-tabs { display: flex; gap: 7px; margin: 23px 0 13px; padding-bottom: 4px; overflow-x: auto; }
.admin-tabs button { flex: 0 0 auto; padding: 9px 13px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 800; }
.admin-tabs button.active { color: #fff; background: var(--purple); border-color: var(--purple); }
.admin-list { display: grid; gap: 9px; }
.admin-item { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.admin-item.handled { opacity: .68; }
.admin-item h3 { margin: 5px 0; font-size: 16px; }
.admin-item p { margin: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.admin-item small { color: var(--purple); font-size: 12px; font-weight: 850; }
.admin-item a { color: var(--purple); text-decoration: underline; }
.admin-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.admin-actions button, .mini-link { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 10px; border: 0; border-radius: 7px; font-size: 12px; font-weight: 900; text-decoration: none !important; }
.approve { color: #fff; background: var(--success); }
.reject, .delete { color: #fff; background: var(--danger); }
.archive { color: var(--ink); background: var(--gold); }
.verify { color: #fff; background: var(--purple); }
.code-reset { color: var(--purple); background: #eee3f5; border: 1px solid #d5bce5 !important; }
.moderation-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.moderation-flags span { padding: 6px 8px; color: #7b2b1d; background: #ffe8df; border: 1px solid #f2bfae; border-radius: 7px; font-size: 12px; font-weight: 850; }
.admin-details { padding: 9px 11px; color: #4f335f !important; background: #f4eff6; border-radius: 7px; font-weight: 750; }
.mini-link { color: #fff !important; background: var(--purple); }
.admin-empty { padding: 45px 18px; color: var(--muted); text-align: center; }
.analytics-dashboard { display: grid; gap: 18px; }
.analytics-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(125px,1fr)); gap: 9px; }
.analytics-card { padding: 16px; background: linear-gradient(145deg,#321248,#6819b1); border: 1px solid rgba(242,189,46,.22); border-radius: 12px; }
.analytics-card span, .analytics-card small { display: block; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.analytics-card strong { display: block; margin: 5px 0 2px; color: var(--gold); font-size: 27px; }
.analytics-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0; padding: 13px 15px; color: #5c4670; background: #fff9e9; border-left: 3px solid var(--gold); border-radius: 7px; font-size: 13px; line-height: 1.55; }
.analytics-reset { flex: 0 0 auto; padding: 8px 11px; color: #fff; background: var(--danger); border: 0; border-radius: 7px; font-size: 12px; font-weight: 900; }
.analytics-panels { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(420px,1.2fr); gap: 12px; }
.analytics-panel { min-width: 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.analytics-panel > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.analytics-panel h3 { margin: 5px 0 0; font-size: 20px; }
.analytics-panel > header > small { color: var(--muted); font-size: 12px; }
.analytics-chart-panel > header { align-items: center; }
.analytics-chart-panel > header > div:first-child > small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.analytics-chart-controls { display: flex; align-items: end; flex: 0 0 auto; gap: 10px; }
.analytics-chart-controls > div { display: grid; gap: 5px; }
.analytics-chart-controls > div > small { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.analytics-chart-switch { display: inline-flex; flex: 0 0 auto; gap: 4px; padding: 4px; background: #f4eff6; border: 1px solid var(--line); border-radius: 10px; }
.analytics-chart-switch button { min-width: 58px; padding: 8px 11px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; font-size: 13px; font-weight: 900; }
.analytics-chart-switch button.active { color: #fff; background: var(--purple); box-shadow: 0 3px 10px rgba(104,25,177,.22); }
#analytics-chart-display { min-height: 390px; padding-top: 12px; }
.analytics-chart-frame { width: 100%; overflow-x: auto; }
.analytics-chart { display: block; width: 100%; min-width: 680px; height: auto; }
.chart-grid-line { stroke: #e8e0ec; stroke-width: 1; }
.chart-axis-line { stroke: #ad9bb8; stroke-width: 1.5; }
.chart-axis-label { fill: #766b7c; font-family: Arial,sans-serif; font-size: 11px; font-weight: 700; }
.analytics-chart-legend { display: flex; justify-content: center; gap: 22px; margin-top: -5px; color: var(--muted); font-size: 13px; }
.analytics-chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.analytics-chart-legend i { width: 12px; height: 12px; border-radius: 3px; }
.analytics-days, .analytics-listings { display: grid; gap: 3px; margin-top: 11px; }
.analytics-day { display: grid; grid-template-columns: 48px minmax(90px,1fr) 72px 72px; align-items: center; gap: 9px; min-height: 32px; font-size: 12px; }
.analytics-day > span { color: var(--muted); font-weight: 800; }
.analytics-day meter { width: 100%; height: 10px; accent-color: var(--purple); }
.analytics-day strong { text-align: right; }
.analytics-day small { color: var(--muted); text-align: right; }
.analytics-listing { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 3px; border-bottom: 1px solid var(--line); }
.analytics-listing:last-child { border-bottom: 0; }
.analytics-rank { display: grid; place-items: center; width: 27px; height: 27px; color: var(--purple); background: #f4eff6; border-radius: 50%; font-size: 12px; font-weight: 900; }
.analytics-listing strong, .analytics-listing small { display: block; }
.analytics-listing > div > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.analytics-listing > div > small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.analytics-listing-numbers { text-align: right; }
.analytics-listing-numbers > strong { color: var(--purple); font-size: 13px !important; }
.analytics-panel--wide { grid-column: 1 / -1; }
.analytics-searches { display: grid; gap: 3px; margin-top: 11px; }
.analytics-search { display: grid; grid-template-columns: 30px minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 10px 3px; border-bottom: 1px solid var(--line); font-size: 13px; }
.analytics-search:last-child { border-bottom: 0; }
.analytics-search > span { color: var(--purple); font-weight: 850; }
.analytics-search > small { color: var(--muted); }
.analytics-empty { margin: 0; padding: 28px 8px; color: var(--muted); text-align: center; font-size: 13px; }
.admin-locked { padding: 80px 25px; text-align: center; }
.admin-locked > span { display: grid; place-items: center; width: 65px; height: 65px; margin: 0 auto 18px; color: var(--gold); background: var(--purple); border-radius: 50%; font-weight: 950; }
.admin-locked h3 { margin: 0 0 7px; font-size: 25px; }
.admin-locked p { margin: 0; color: var(--muted); }

.policy-content { padding: 45px 46px; }
.policy-content h2 { font-size: 36px; }
.policy-content h3 { margin: 27px 0 7px; color: var(--purple); font-size: 18px; }
.policy-content p { margin: 0 0 12px; color: var(--muted); line-height: 1.7; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 120; max-width: calc(100% - 30px); padding: 12px 17px; color: #fff; background: var(--purple-deep); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; box-shadow: 0 15px 40px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transform: translate(-50%,20px); transition: .24s ease; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 980px) {
  .market-head__grid { grid-template-columns: 1fr; gap: 28px; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .listing-grid { grid-template-columns: repeat(2,1fr); }
  .step-grid { grid-template-columns: repeat(2,1fr); }
  .admin-stats { grid-template-columns: repeat(3,1fr); }
  .analytics-summary { grid-template-columns: repeat(3,1fr); }
  .analytics-panels { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 28px,1180px); }
  .site-header { min-height: 74px; padding-inline: 14px; }
  .brand img { width: 50px; height: 50px; }
  .brand b { font-size: 14px; }
  .brand small { font-size: 10px; }
  .site-header nav { gap: 12px; }
  .site-header nav > a, .site-header nav > .nav-link[data-open-manage] { display: none; }
  .site-header .button--small { min-height: 40px; padding-inline: 12px; }
  .market-head__grid { min-height: 0; padding-block: 30px; }
  .market-head { background-image: linear-gradient(rgba(23,9,32,.66), rgba(23,9,32,.56)), url("/assets/trenton-makes.jpeg"); background-position: center; }
  .market-head h1 { font-size: clamp(43px,14vw,62px); }
  .market-head p { font-size: 16px; }
  .quick-actions { grid-template-columns: 1fr; }
  .marketplace { padding-block: 26px 70px; }
  .market-tools { top: 82px; margin-inline: -2px; padding: 12px; }
  .toolbar { grid-template-columns: 1fr; }
  .sort-box { justify-content: space-between; }
  .listing-heading { align-items: start; flex-direction: column; }
  .listing-grid { grid-template-columns: 1fr; }
  .card-media { height: auto; }
  .step-grid { grid-template-columns: 1fr; }
  .how-it-works { width: calc(100% - 28px); padding: 34px 22px; }
  .footer-inner { align-items: flex-start; flex-direction: column; padding-block: 26px; }
  .footer-links { justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .manage-stats { grid-template-columns: 1fr; }
  .photo-preview-grid { grid-template-columns: repeat(2,1fr); }
  .modal-header, .admin-header { padding: 32px 62px 22px 22px; }
  .listing-form, .manage-panel, .admin-shell { padding: 23px 22px 27px; }
  .admin-header { align-items: flex-start; flex-direction: column; }
  .admin-stats { grid-template-columns: repeat(2,1fr); }
  .analytics-summary { grid-template-columns: repeat(2,1fr); }
  .analytics-note { align-items: stretch; flex-direction: column; }
  .analytics-chart-panel > header { align-items: stretch; flex-direction: column; }
  .analytics-chart-controls { align-items: stretch; flex-wrap: wrap; }
  .analytics-chart-switch { align-self: flex-start; }
  #analytics-chart-display { min-height: 340px; }
  .analytics-day { grid-template-columns: 42px minmax(70px,1fr) 64px; }
  .analytics-day small { display: none; }
  .analytics-listing { grid-template-columns: 30px minmax(0,1fr); }
  .analytics-listing-numbers { grid-column: 2; text-align: left; }
  .analytics-search { grid-template-columns: 30px minmax(0,1fr); }
  .analytics-search > span:not(.analytics-rank), .analytics-search > small { grid-column: 2; }
  .admin-item { grid-template-columns: 1fr; }
  .admin-actions { justify-content: flex-start; }
  .policy-content { padding: 42px 24px 30px; }
  .policy-content h2 { font-size: 31px; }
}

@media (max-width: 430px) {
  .brand b { display: none; }
  .brand small { margin: 0; font-size: 11px; }
  .site-header nav { gap: 9px; }
  .site-header #admin-button { font-size: 13px; }
  .market-head h1 { font-size: 45px; }
  .market-tools { position: relative; top: auto; }
  .drawer { padding: 12px; }
  .drawer-media { height: auto; }
  .drawer-main h2 { font-size: 29px; }
  .detail-grid { grid-template-columns: 1fr; }
  .manage-code { align-items: stretch; flex-direction: column; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
