/* ==========================================================================
   Wear Human — artist studio + admin console
   ========================================================================== */

body.console { background: var(--paper); }
.console-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100dvh; }

/* Sidebar */
.side {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 28px;
  padding: 22px 16px 18px; background: var(--paper-2); border-right: 1px solid var(--line); overflow-y: auto;
}
.side .brand { padding: 4px 10px; }
.side__role { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.side__role strong { display: block; font-weight: 500; font-size: 14px; line-height: 1.2; }
.side__role span { font-size: 12px; color: var(--muted); }
.side nav { display: grid; gap: 2px; }
.side nav .label { padding: 14px 12px 6px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 0; font-size: 14.5px; color: var(--ink-2); transition: background-color .3s var(--ease), color .3s var(--ease); }
.side nav a:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.side nav a.is-active { background: var(--ink); color: var(--paper); }
.side nav a .count { margin-left: auto; font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 0; background: var(--accent); color: #fff; }
.side nav a.is-active .count { background: var(--paper); color: var(--ink); }
.page-title h1 { font-family: var(--grotesk) !important; font-weight: 300; text-transform: uppercase; letter-spacing: -.03em !important; }
.page-title h1 em { font-family: var(--grotesk); text-transform: none; }
.stat__value { font-family: var(--grotesk) !important; font-weight: 300; }
.panel__head h2 { font-family: var(--grotesk) !important; font-weight: 400; text-transform: uppercase; font-size: 18px !important; letter-spacing: -.01em; }
.auth__card h1 { font-family: var(--grotesk); font-weight: 300; text-transform: uppercase; letter-spacing: -.03em; }
.side__foot { margin-top: auto; display: grid; gap: 4px; }
.side__foot a, .side__foot button { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 0; font-size: 14px; color: var(--muted); width: 100%; text-align: left; }
.side__foot a:hover, .side__foot button:hover { background: rgba(255,255,255,.06); color: var(--ink); }

.console-top { display: none; }
@media (max-width: 960px) {
  .console-shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 70; transform: translateX(-105%); transition: transform .5s var(--ease-spring); box-shadow: 20px 0 60px -30px rgba(0,0,0,.3); }
  .side-open .side { transform: none; }
  .side-scrim { position: fixed; inset: 0; z-index: 65; background: rgba(255,255,255,.3); opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
  .side-open .side-scrim { opacity: 1; pointer-events: auto; }
  .console-top { display: flex; position: sticky; top: 0; z-index: 50; align-items: center; justify-content: space-between; height: 60px; padding: 0 16px; background: rgba(0,0,0,.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .console-top button { width: 40px; height: 40px; border-radius: 0; box-shadow: inset 0 0 0 1px var(--line-2); display: grid; place-items: center; }
}

/* Main */
.console-main { padding: clamp(24px, 3.5vw, 48px) clamp(16px, 3.5vw, 56px) 96px; min-width: 0; }
.page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 40px); }
.page-title h1 { font-family: var(--grotesk); font-weight: 400; font-size: clamp(38px, 4.4vw, 60px); line-height: .98; letter-spacing: -.025em; }
.page-title h1 em { font-style: normal; }
.page-title .crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.page-title .crumbs a:hover { color: var(--ink); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Panels */
.panel { padding: 5px; border-radius: 0; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.panel > .panel__core { border-radius: 0; background: var(--card); box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 1px 2px rgba(255,255,255,.03); padding: clamp(18px, 2.2vw, 28px); }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.panel__head h2 { font-family: var(--grotesk); font-weight: 400; font-size: 26px; line-height: 1.1; }
.panel__head p { font-size: 13.5px; color: var(--muted); }
.panel--flush > .panel__core { padding: 0; overflow: hidden; }
.panel--flush .panel__head { padding: 20px 24px 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 2vw, 24px); }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 24px); align-items: start; }
.cols--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cols, .cols--even { grid-template-columns: minmax(0, 1fr); } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: clamp(16px, 2vw, 24px); }
.stat { padding: 20px 20px 18px; border-radius: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 10px; align-content: space-between; min-height: 132px; position: relative; transition: transform .5s var(--ease-spring), box-shadow .4s var(--ease); }
a.stat:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), 0 12px 30px -18px rgba(255,255,255,.25); }
.stat__label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.stat__value { font-family: var(--grotesk); font-size: clamp(32px, 2.6vw, 44px); line-height: .95; letter-spacing: -.02em; overflow-wrap: anywhere; }
.stat__hint { font-size: 12.5px; color: var(--muted); }
.stat--dark { background: var(--ink); color: var(--paper); box-shadow: none; }
.stat--dark .stat__label, .stat--dark .stat__hint { color: rgba(0,0,0,.6); }
.stat--alert .stat__label::after { content: ''; width: 7px; height: 7px; border-radius: 0; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .25s var(--ease); }
.table tbody tr:hover { background: rgba(255,255,255,.02); }
.table .num { font-family: var(--mono); text-align: right; white-space: nowrap; font-size: 13.5px; }
.table th.num { text-align: right; }
.table .row-link { font-weight: 500; }
.table .row-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.table .sub { display: block; font-size: 12.5px; color: var(--muted); }
.thumb { width: 52px; aspect-ratio: 4 / 5; border-radius: 0; background: var(--paper-2); position: relative; overflow: hidden; flex: none; }
.thumb .tee { position: absolute; inset: 5%; width: auto; height: auto; }
.thumb .tee--photo { inset: 0; }
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cell-product { display: flex; align-items: center; gap: 14px; min-width: 220px; }

/* Tabs */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 0; background: rgba(255,255,255,.045); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; margin-bottom: 18px; width: max-content; }
.tabs a { padding: 7px 14px; border-radius: 0; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { background: rgba(255,255,255,.06); }
.tabs a.is-active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(255,255,255,.08); }
.tabs a .n { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* Lists */
.list { display: grid; }
.list__item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list__item:last-child { border-bottom: 0; }
.list__item .grow { flex: 1; min-width: 0; }
.list__item strong { font-weight: 500; display: block; }
.list__item .sub { font-size: 13px; color: var(--muted); }

/* Key/value */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 20px; font-size: 14.5px; margin: 0; }
.kv dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.kv dd { margin: 0; word-break: break-word; }

/* Commission box */
.commission { display: grid; gap: 0; border-radius: 0; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.commission__row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--line); }
.commission__row span:last-child { font-family: var(--mono); }
.commission__row--artist { background: var(--ink); color: var(--paper); border: 0; font-weight: 500; }
.commission__row--artist span:last-child { font-family: var(--grotesk); font-size: 26px; font-weight: 400; line-height: 1; }
.commission__error { padding: 12px 16px; font-size: 13.5px; background: var(--bad-bg); color: var(--bad); }

/* Review media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.media-tile { display: grid; gap: 8px; }
.media-tile__img { aspect-ratio: 4 / 5; border-radius: 0; background: var(--paper-2); position: relative; overflow: hidden; display: grid; place-items: center; }
.media-tile__img img { width: 100%; height: 100%; object-fit: contain; }
.media-tile__img .tee { position: absolute; inset: 6%; width: auto; height: auto; }
.media-tile__img.is-checker { background-color: #141414; background-image: linear-gradient(45deg, #1C1C1C 25%, transparent 25%), linear-gradient(-45deg, #1C1C1C 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #1C1C1C 75%), linear-gradient(-45deg, transparent 75%, #1C1C1C 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.media-tile__meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }

/* Timeline log */
.log { display: grid; gap: 0; }
.log__item { display: grid; grid-template-columns: 14px 1fr; gap: 14px; padding-bottom: 18px; position: relative; }
.log__item::before { content: ''; width: 9px; height: 9px; border-radius: 0; background: var(--ink); margin-top: 6px; }
.log__item::after { content: ''; position: absolute; left: 4px; top: 20px; bottom: 0; width: 1px; background: var(--line-2); }
.log__item:last-child::after { display: none; }
.log__item p { font-size: 14px; }
.log__item .sub { font-size: 12.5px; color: var(--muted); }
.log__comment { margin-top: 6px; padding: 10px 12px; border-radius: 0; background: var(--paper); font-size: 14px; }

/* Onboarding checklist */
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps__item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.steps__item:first-child { border-top: 0; padding-top: 0; }
.steps__item .grow { display: grid; gap: 2px; min-width: 0; }
.steps__item strong { font-size: 14.5px; font-weight: 600; }
.steps__item .sub { font-size: 12.5px; color: var(--muted); }
.steps__mark { flex: none; display: grid; place-items: center; width: 26px; height: 26px; font-size: 12px; font-family: var(--mono, monospace); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.steps__item.is-current .steps__mark { background: var(--ink); color: var(--paper); box-shadow: none; }
.steps__item.is-done .steps__mark { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.steps__item.is-done strong { color: var(--muted); text-decoration: line-through; }
.steps__item.is-upcoming { opacity: .6; }
@media (max-width: 640px) { .steps__item { flex-wrap: wrap; } .steps__item .btn-plain { margin-left: 40px; } }

/* Callouts */
.callout { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 0; font-size: 14.5px; line-height: 1.5; }
.callout--warn { background: var(--warn-bg); color: var(--warn); }
.callout--bad { background: var(--bad-bg); color: var(--bad); }
.callout--ok { background: var(--ok-bg); color: var(--ok); }
.callout--info { background: var(--info-bg); color: var(--info); }
.callout--ink { background: var(--ink); color: var(--paper); }
.callout strong { font-weight: 600; }
.callout .grow { flex: 1; }

.secret { font-family: var(--mono); font-size: 18px; letter-spacing: .02em; padding: 12px 16px; border-radius: 0; background: rgba(0,0,0,.12); display: inline-block; user-select: all; }

.action-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-plain { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 0; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color .3s var(--ease); background: transparent; }
.btn-plain:hover { background: var(--card); }
.btn-plain--danger { color: var(--bad); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.btn-plain--danger:hover { background: var(--bad-bg); }
.btn-plain--solid { background: var(--ink); color: var(--paper); box-shadow: none; }
.btn-plain--solid:hover { background: #000; }

.search { display: flex; gap: 8px; align-items: center; }
.search .input { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 0; width: 240px; }
.filter-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.filter-row .tabs { margin-bottom: 0; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-picker input { position: absolute; opacity: 0; pointer-events: none; }
.tag-picker label { padding: 7px 13px; border-radius: 0; font-size: 13px; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: all .25s var(--ease); user-select: none; }
.tag-picker label:hover { background: var(--card); }
.tag-picker input:checked + label { background: var(--ink); color: var(--paper); box-shadow: none; }
.tag-picker input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches label { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 0; font-size: 13.5px; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; }
.swatches label i { width: 24px; height: 24px; border-radius: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.swatches input:checked + label { box-shadow: inset 0 0 0 2px var(--ink); background: var(--card); }

.preview-sticky { position: sticky; top: 24px; display: grid; gap: 14px; }
.preview-stage { aspect-ratio: 4 / 5; border-radius: 0; background: var(--paper-2); position: relative; overflow: hidden; }
.preview-stage .tee { position: absolute; inset: 7%; width: auto; height: auto; }
.preview-stage .tee--photo { inset: 0; }

.download { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 0; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .3s var(--ease); }
.download:hover { background: var(--paper-3); }
.download .ic { width: 44px; height: 44px; border-radius: 0; display: grid; place-items: center; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.download strong { font-weight: 500; display: block; }
.download .sub { font-size: 13px; color: var(--muted); }
.download .i:last-child { margin-left: auto; }

/* Auth */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth__art { position: relative; background: var(--night); color: #FFFFFF; padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth__art .tee { position: absolute; width: 70%; left: 15%; top: 18%; height: auto; opacity: .95; }
.auth__art blockquote { position: relative; font-weight: 300; letter-spacing: -.02em; font-family: var(--grotesk); font-size: clamp(30px, 3vw, 44px); line-height: 1.05; max-width: 14em; }
.auth__art blockquote em { color: #FFFFFF; }
.auth__form { display: grid; place-items: center; padding: 40px 20px; }
.auth__card { width: min(420px, 100%); display: grid; gap: 26px; }
.auth__card h1 { font-family: var(--grotesk); font-weight: 400; font-size: 52px; line-height: .95; letter-spacing: -.025em; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__art { display: none; } }

@media (max-width: 640px) {
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .search .input { width: 100%; }
  .table td, .table th { padding: 12px 10px; }
}

/* Collections */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pick { position: relative; display: grid; gap: 8px; padding: 8px; border: 1px solid var(--line); cursor: pointer; transition: border-color .3s var(--ease), background-color .3s var(--ease); }
.pick input { position: absolute; top: 12px; left: 12px; z-index: 2; width: 18px; height: 18px; accent-color: var(--accent); }
.pick:has(input:checked) { border-color: var(--ink); background: var(--paper-3); }
.pick__img { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.pick__img .tee:not(.tee--photo) { position: absolute; inset: 6%; width: auto; height: auto; }
.pick__img .tee--photo { position: absolute; inset: 0; }
.pick__meta { display: grid; gap: 6px; font-size: 13px; }
.pick__meta strong { font-weight: 500; }
.coll-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.coll-admin { display: grid; gap: 10px; padding: 10px; border: 1px solid var(--line); background: var(--paper-2); transition: border-color .3s var(--ease); }
.coll-admin:hover { border-color: var(--line-3); }
.coll-admin__img { position: relative; aspect-ratio: 5 / 4; overflow: hidden; }
.coll-admin__img .tee:not(.tee--photo) { position: absolute; inset: 8% 22%; width: auto; height: auto; }
.coll-admin__img .tee--photo { position: absolute; inset: 0; }
.coll-admin__meta strong { display: block; font-weight: 500; }
.coll-admin__meta .sub { font-size: 12.5px; color: var(--muted); }
.coll-admin .badge { justify-self: start; }

.side .brand .logo--long, .console-top .logo--long { height: 15px; }
.auth__art .brand .logo--long { height: 20px; }
.auth__icon { position: relative; height: 40px; color: var(--accent); }
.auth__art blockquote em { font-style: normal; font-weight: 200; }

.back-files { border-top: 1px solid var(--line); padding-top: 14px; }
.back-files summary { cursor: pointer; list-style: none; }
.back-files summary::before { content: '+ '; }
.back-files[open] summary::before { content: '− '; }

/* Artwork placement editor */
.pz { display: grid; gap: 14px; }
.pz__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pz__tabs { display: inline-flex; box-shadow: inset 0 0 0 1px var(--line-2); }
.pz__tabs button { padding: 8px 16px; font-family: var(--grotesk); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.pz__tabs button.is-on { background: var(--ink); color: var(--paper); }
.pz__stage { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1; overflow: hidden; justify-self: center; }
.pz__tee { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.pz.is-dark .pz__art { mix-blend-mode: normal; }
.pz__art { position: absolute; object-fit: fill; pointer-events: none; mix-blend-mode: multiply; transition: left .35s var(--ease), top .35s var(--ease), width .35s var(--ease), height .35s var(--ease); }
/* Bounding box: visible only while hovering the tee or adjusting */
.pz__box { position: absolute; border: 1.5px dashed #D2451E; opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; z-index: 2; }
.pz__box span { position: absolute; left: 0; top: -20px; font-family: var(--grotesk); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: #111; }
.pz__stage:hover .pz__box, .pz.is-adjusting .pz__box { opacity: 1; }
.pz__empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; font-size: 13px; color: #111; background: rgba(255,255,255,.7); padding: 8px 12px; }
.pz__controls { display: grid; grid-template-columns: 1fr auto; gap: 18px 24px; align-items: end; }
.pz__controls input[type=range] { width: 100%; accent-color: var(--ink); }
.pz__align { display: grid; grid-template-columns: repeat(3, 34px); gap: 4px; }
.pz__align button { width: 34px; height: 34px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-2); }
.pz__align button i { width: 8px; height: 8px; background: var(--muted); }
.pz__align button:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.pz__align button.is-on { background: var(--ink); }
.pz__align button.is-on i { background: var(--paper); }
.pz__buttons { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .pz__controls { grid-template-columns: 1fr; } }
.table tr.is-clickable { cursor: pointer; }
.table tr.is-clickable:hover td { background: var(--paper-3); }
