/* store_manager.css - the creator's Store Manager. Dark, in the BlackTieVIP palette; responsive
   from 320px (the nav becomes a scrolling tab strip on narrow screens). */
:root {
    --m-bg: #080a0b;
    --m-ink: #0d1011;
    --m-panel: #131718;
    --m-raised: #191e1f;
    --m-line: rgba(244, 239, 230, .1);
    --m-line-strong: rgba(244, 239, 230, .2);
    --m-text: #f4efe6;
    --m-soft: #d8d1c4;
    --m-muted: #9d988f;
    --m-gold: #c7a45f;
    --m-gold-bright: #ead39d;
    --m-danger: #e0868d;
    --m-warn: #f1c27d;
    --m-ok: #8fbf9b;
    --m-display: 'Cormorant Garamond', Georgia, serif;
    --m-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
    --m-gutter: 16px;
    color-scheme: dark;
}
@media (min-width: 900px) { :root { --m-gutter: 28px; } }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--m-bg); -webkit-text-size-adjust: 100%; }
body.sm-body { margin: 0; background: var(--m-bg); color: var(--m-text); font: 400 15px/1.55 var(--m-sans); -webkit-font-smoothing: antialiased; }
a { color: var(--m-gold-bright); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--m-gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- frame */
.sm-header { position: sticky; top: 0; z-index: 30; background: rgba(8, 10, 11, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--m-line); padding-top: env(safe-area-inset-top); }
.sm-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--m-gutter); }
.sm-logo { font: 600 1.5rem/1 var(--m-display); color: var(--m-gold); text-decoration: none; white-space: nowrap; }
.sm-logo span { font: 500 .78rem/1 var(--m-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--m-soft); margin-left: 8px; }
.sm-header-links { display: flex; gap: 8px; }
.sm-shell { display: block; }
@media (min-width: 900px) { .sm-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); } }
.sm-nav { display: flex; gap: 4px; overflow-x: auto; padding: 10px var(--m-gutter); border-bottom: 1px solid var(--m-line); scrollbar-width: none; position: sticky; top: 57px; z-index: 20; background: var(--m-bg); }
.sm-nav::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .sm-nav { flex-direction: column; border-bottom: 0; border-right: 1px solid var(--m-line); min-height: calc(100vh - 58px); padding: 22px 12px; overflow: visible; top: 58px; align-self: start; } }
.sm-nav a { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; border-radius: 10px; color: var(--m-soft); text-decoration: none; white-space: nowrap; }
.sm-nav a:hover { background: var(--m-panel); color: var(--m-text); }
.sm-nav a.active { background: var(--m-raised); color: var(--m-text); box-shadow: inset 2px 0 0 var(--m-gold); }
.sm-nav-badge { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--m-gold); color: #111; font-size: .75rem; font-weight: 600; text-align: center; }
.sm-main { padding: 22px var(--m-gutter) 80px; max-width: 1180px; outline: none; min-width: 0; }
.sm-nav[hidden] + .sm-main { grid-column: 1 / -1; margin: 0 auto; width: 100%; }

/* ---------------------------------------------------------------- type and blocks */
.sm-title { font: 600 clamp(1.9rem, 4vw, 2.5rem)/1.08 var(--m-display); margin: 0; overflow-wrap: anywhere; }
.sm-eyebrow { margin: 0 0 4px; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--m-gold); }
.sm-lead { color: var(--m-soft); max-width: 70ch; margin: 0 0 18px; }
.sm-muted { color: var(--m-muted); }
.small { font-size: .85rem; }
.sm-hint { color: var(--m-muted); font-size: .86rem; margin: 6px 0 0; }
.sm-error { color: var(--m-danger); min-height: 0; margin: 6px 0; }
.sm-error:empty { display: none; }
.sm-back { display: inline-block; margin-bottom: 6px; color: var(--m-muted); text-decoration: none; font-size: .9rem; }
.sm-back:hover { color: var(--m-text); }
.sm-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.sm-card { border: 1px solid var(--m-line); border-radius: 14px; background: var(--m-ink); padding: 18px; margin: 0 0 16px; min-width: 0; }
fieldset.sm-card { margin: 0 0 16px; }
.sm-card-title { font: 600 1.35rem/1.2 var(--m-display); margin: 0 0 12px; padding: 0; }
.sm-narrow { max-width: 620px; }
.sm-banner { border: 1px solid rgba(199, 164, 95, .35); background: rgba(199, 164, 95, .08); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; color: var(--m-soft); }
.sm-banner.warn { border-color: rgba(241, 194, 125, .45); background: rgba(241, 194, 125, .08); }
.sm-banner.danger { border-color: rgba(224, 134, 141, .45); background: rgba(224, 134, 141, .08); }
.sm-banner p { margin: 6px 0 0; }
.sm-grid-2, .sm-grid-3, .sm-grid-4 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-bottom: 16px; }
.sm-grid-2.tight, .sm-grid-3.tight { margin-bottom: 0; }
@media (min-width: 640px) { .sm-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sm-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .sm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sm-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sm-grid-2 > .sm-card { margin-bottom: 0; }
.sm-grid-2 .sm-table { min-width: 0; }
.sm-stat { display: grid; gap: 2px; padding: 16px; border: 1px solid var(--m-line); border-radius: 14px; background: var(--m-ink); text-decoration: none; color: var(--m-text); }
a.sm-stat:hover { border-color: rgba(199, 164, 95, .45); }
.sm-stat-num { font: 600 1.6rem/1.15 var(--m-sans); font-variant-numeric: tabular-nums lining-nums; }
.sm-stat-label { color: var(--m-muted); font-size: .88rem; }
.sm-dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin: 0 0 12px; }
.sm-dl dt { color: var(--m-muted); }
.sm-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sm-dl.compact { gap: 4px 12px; font-size: .9rem; }
.sm-dl .ok, .sm-earn.ok { color: var(--m-ok); }
.sm-earn.bad { color: var(--m-danger); }

/* ---------------------------------------------------------------- controls */
.sm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--m-line-strong);
    background: var(--m-panel); color: var(--m-text); text-decoration: none; cursor: pointer; font-weight: 500; white-space: nowrap; transition: border-color .15s ease, background-color .15s ease; }
.sm-btn:hover { border-color: var(--m-gold); }
.sm-btn:disabled { opacity: .45; cursor: not-allowed; }
.sm-btn-primary { background: var(--m-gold); border-color: var(--m-gold); color: #111; }
.sm-btn-primary:hover { background: var(--m-gold-bright); }
.sm-btn-quiet { background: transparent; }
.sm-btn-danger { background: #8e3a41; border-color: #8e3a41; }
.sm-btn-danger-quiet { background: transparent; color: var(--m-danger); }
.sm-btn-small { min-height: 34px; padding: 5px 12px; font-size: .88rem; }
.sm-icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--m-line-strong); background: var(--m-panel); cursor: pointer; line-height: 1; }
.sm-icon-btn:disabled { opacity: .3; cursor: default; }
.sm-icon-btn.danger { color: var(--m-danger); }
.sm-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sm-actions.end { justify-content: flex-end; }
.sm-field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.sm-label { font-size: .84rem; color: var(--m-soft); font-weight: 500; }
.sm-field input, .sm-field select, .sm-field textarea, .sm-link-row input, .sm-variant-row input, .sm-card select, .sm-options input, .sm-checks + input, input[type="search"] {
    width: 100%; min-height: 42px; padding: 9px 12px; background: var(--m-panel); border: 1px solid var(--m-line-strong); border-radius: 10px; }
.sm-field textarea { resize: vertical; }
.sm-field input[type="color"] { width: 72px; padding: 4px; }
.sm-check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; cursor: pointer; line-height: 1.45; }
.sm-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--m-gold); }
.sm-checks { display: grid; gap: 2px; }
.sm-scroll { max-height: 260px; overflow-y: auto; padding: 6px 8px; border: 1px solid var(--m-line); border-radius: 10px; margin: 8px 0; }
.sm-plain { border: 0; padding: 0; margin: 0 0 12px; }
.sm-upload { position: relative; overflow: hidden; }
.sm-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sm-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; border: 1px solid var(--m-line-strong); color: var(--m-soft); white-space: nowrap; }
.sm-pill.ok, .sm-pill.status-open, .sm-pill.status-active, .sm-pill.order-delivered, .sm-pill.earn-available, .sm-pill.earn-paid, .sm-pill.payout-paid { border-color: rgba(143, 191, 155, .5); color: var(--m-ok); }
.sm-pill.warn, .sm-pill.status-vacation, .sm-pill.order-paid, .sm-pill.order-partially_shipped, .sm-pill.earn-on_hold, .sm-pill.earn-withheld { border-color: rgba(241, 194, 125, .5); color: var(--m-warn); }
.sm-pill.danger, .sm-pill.status-removed, .sm-pill.status-suspended, .sm-pill.status-revoked, .sm-pill.order-cancelled, .sm-pill.order-refunded, .sm-pill.earn-reversed { border-color: rgba(224, 134, 141, .5); color: var(--m-danger); }
.sm-pill.quiet { color: var(--m-muted); }
.sm-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sm-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sm-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.sm-tabs a { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--m-line); color: var(--m-soft); text-decoration: none; }
.sm-tabs a.active { background: var(--m-text); color: var(--m-bg); border-color: var(--m-text); }

/* ---------------------------------------------------------------- gate */
.sm-gate { max-width: 860px; }
.sm-gate .sm-lead { margin-top: 10px; }
.sm-agreement { max-height: 55vh; overflow-y: auto; border: 1px solid var(--m-line-strong); border-radius: 14px; background: var(--m-ink); padding: 8px 20px; margin: 16px 0 8px; overscroll-behavior: contain; }
.sm-agreement .legal-title { font: 600 1.8rem/1.1 var(--m-display); color: var(--m-gold); margin: 10px 0 4px; }
.sm-agreement .legal-subtitle, .sm-agreement .legal-version { color: var(--m-muted); font-size: .85rem; margin: 0 0 12px; }
.sm-agreement h2 { font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; margin: 22px 0 8px; color: var(--m-text); }
.sm-agreement h3 { font-size: .95rem; margin: 14px 0 6px; }
.sm-agreement p, .sm-agreement li { color: var(--m-soft); font-size: .92rem; }
.sm-agreement .legal-beta, .sm-agreement .legal-contact { border: 1px solid var(--m-line); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.sm-gate-form { display: grid; gap: 6px; margin-top: 12px; }
.sm-gate-form .sm-field input { max-width: 420px; }
.sm-agreement-note { margin-top: 24px; }

/* ---------------------------------------------------------------- overview */
.sm-checklist { border: 1px solid rgba(241, 194, 125, .4); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; }
.sm-checklist h3 { margin: 0 0 6px; font-size: 1rem; }
.sm-checklist ul { margin: 0; padding-left: 18px; color: var(--m-soft); }
.sm-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.sm-qr { margin-top: 12px; display: grid; gap: 10px; justify-items: start; }
.sm-qr img { background: #fff; border-radius: 10px; padding: 6px; }

/* ---------------------------------------------------------------- products */
.sm-product-list, .sm-simple-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sm-product-row { display: grid; grid-template-columns: auto 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--m-line); border-radius: 14px; background: var(--m-ink); }
.sm-product-row > .sm-product-meta, .sm-product-row > .sm-actions { grid-column: 2 / -1; }
@media (min-width: 960px) { .sm-product-row { grid-template-columns: auto 64px minmax(0, 1fr) 150px auto; } .sm-product-row > .sm-product-meta, .sm-product-row > .sm-actions { grid-column: auto; } }
.sm-reorder { display: grid; gap: 4px; }
.sm-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--m-line); }
.sm-thumb-empty { background: linear-gradient(135deg, var(--m-panel), var(--m-raised)); border-radius: 10px; min-height: 64px; }
.sm-product-title { font-weight: 500; color: var(--m-text); text-decoration: none; overflow-wrap: anywhere; }
.sm-product-title:hover { text-decoration: underline; }
.sm-product-meta { display: grid; gap: 2px; font-size: .9rem; }
.sm-simple-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--m-line); border-radius: 12px; background: var(--m-ink); flex-wrap: wrap; }
.sm-simple-list li.voided { opacity: .6; }
.sm-grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sm-grow p { margin: 2px 0 0; }
.sm-attest { border: 1px solid rgba(199, 164, 95, .35); border-radius: 12px; padding: 10px 14px; background: rgba(199, 164, 95, .06); margin-bottom: 10px; }
.sm-options { display: grid; gap: 8px; margin: 10px 0; }
.sm-option-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.sm-variants { display: grid; gap: 6px; margin-top: 14px; overflow-x: auto; }
.sm-variant-row { display: grid; grid-template-columns: minmax(110px, 1.4fr) minmax(80px, 1fr) minmax(90px, 1fr) minmax(80px, .8fr) 48px; gap: 8px; align-items: center; min-width: 520px; }
.sm-variant-row.head { color: var(--m-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.sm-variant-row input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; justify-self: center; accent-color: var(--m-gold); }
.sm-variant-label { overflow-wrap: anywhere; }
.sm-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.sm-photo { margin: 0; width: 132px; display: grid; gap: 6px; }
.sm-photo img { width: 132px; height: 132px; object-fit: cover; border-radius: 10px; border: 1px solid var(--m-line); }
.sm-catalog { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sm-catalog-card { display: grid; gap: 8px; align-content: start; margin: 0; }
.sm-catalog-card img, .sm-catalog-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.sm-catalog-card h3 { margin: 4px 0 0; font-size: 1.05rem; }
.sm-catalog-card p { margin: 0; }
.sm-catalog-summary { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.sm-catalog-summary img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.sm-catalog-summary p { margin: 2px 0; }
.sm-artwork { display: grid; gap: 10px; }
.sm-artwork img, .sm-artwork .sm-thumb-empty { border-radius: 12px; border: 1px solid var(--m-line); object-fit: cover; }
.sm-artwork.logo img, .sm-artwork.logo .sm-thumb-empty { width: 120px; height: 120px; border-radius: 50%; }
.sm-artwork.banner img, .sm-artwork.banner .sm-thumb-empty { width: 100%; aspect-ratio: 16 / 5; }

/* ---------------------------------------------------------------- tables, orders, charts */
.sm-table-wrap { overflow-x: auto; border: 1px solid var(--m-line); border-radius: 12px; }
.sm-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.sm-table th, .sm-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--m-line); vertical-align: top; }
.sm-table th { color: var(--m-muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; background: var(--m-panel); }
.sm-table tr:last-child td { border-bottom: 0; }
.sm-table td.neg { color: var(--m-danger); }
.sm-table .sm-pill { margin: 0 4px 4px 0; }
.sm-clickable { cursor: pointer; }
.sm-clickable:hover td { background: var(--m-panel); }
.sm-address { font-style: normal; line-height: 1.6; margin-bottom: 8px; white-space: pre-line; }
.sm-chart { width: 100%; height: auto; }
.sm-chart rect { fill: var(--m-gold); opacity: .85; }
.sm-chart rect:hover { opacity: 1; }
.sm-chart-axis { fill: var(--m-muted); font-size: 11px; font-family: var(--m-sans); }
.sm-slip { display: none; }

/* ---------------------------------------------------------------- dialogs and toast */
.sm-dialog { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--m-line-strong); border-radius: 16px; background: var(--m-panel); color: var(--m-text); padding: 22px; }
.sm-dialog.wide { width: min(640px, calc(100vw - 32px)); }
.sm-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.sm-dialog h2 { font: 600 1.6rem/1.2 var(--m-display); margin: 0 0 8px; }
.sm-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 60;
    background: var(--m-text); color: var(--m-bg); padding: 12px 18px; border-radius: 10px; max-width: calc(100vw - 32px); font-weight: 500; transition: opacity .2s ease, transform .2s ease; }
.sm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.sm-toast.error { background: #f3d2d4; color: #3a0d10; }

@media print {
    body.sm-body { background: #fff; color: #000; }
    .sm-header, .sm-nav, .sm-toast, .sm-main > *:not(.sm-slip) { display: none !important; }
    .sm-slip { display: block !important; color: #000; font: 12pt/1.5 Arial, sans-serif; }
    .sm-slip p { white-space: pre-line; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.sm-steps { color: var(--m-soft); padding-left: 20px; margin: 0 0 12px; display: grid; gap: 6px; }
.sm-contract { max-height: 45vh; }
.sm-contract h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 6px; color: var(--m-text); }
.sm-contract p, .sm-contract li { color: var(--m-soft); font-size: .9rem; }
button.sm-btn { font: inherit; }
