:root {
    --bg-app: #F9F9F8;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F4F4F2;
    --row-hover: #F7F7F5;

    --border-light: #EBEBEB;
    --border-med: #E0E0E0;
    --border-dark: #CFCFCF;

    --ink-100: #111111;
    --ink-70: #5E5E5E;
    --ink-40: #9CA3AF;
    --ink-10: #E5E7EB;

    --accent: #2F5CD6;
    --accent-dim: #EFF4FF;

    --success: #10B981;
    --success-bg: #ECFDF5;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;

    --val-positive: #168F49;
    --val-negative: #D13434;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.04);
    --shadow-float: 0 10px 30px -10px rgba(0,0,0,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-100);
    background: var(--bg-app);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 16px;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
}

/* Lucide replaces these placeholders after Turbo renders. Reserve their box and
   keep the empty element invisible so repeated import-status refreshes do not flash. */
i[data-lucide] {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  visibility: hidden;
}

.t-display { font-size: 36px; line-height: 1.1; letter-spacing: -0.04em; font-weight: 500; margin-top: -0.1em; }
.t-h1 { font-size: 24px; line-height: 1.2; letter-spacing: -0.03em; font-weight: 500; margin-top: -0.1em; }
.t-h2 { font-size: 18px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; }
.t-section { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; margin: 64px 0 24px 0; border-bottom: 1px solid var(--border-light); padding-bottom: 12px; }
.t-caps { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--ink-40); }
.t-body { font-size: 14px; line-height: 1.6; color: var(--ink-70); max-width: 65ch; }
.t-reading { font-size: 15px; line-height: 1.65; color: var(--ink-70); max-width: 60ch; }
.t-mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: -0.02em; }
.t-num { font-variant-numeric: tabular-nums; }
.t-emphasis { color: var(--ink-100); font-weight: 500; }

.main-content { flex: 1; padding: 32px 40px; min-width: 0; overflow-y: auto; height: 100%; display: flex; flex-direction: column; }
.detail-view { flex: 1; }

.page-header { margin-bottom: 24px; }
.title-bar { display: flex; align-items: center; gap: 16px; }
.title-bar h1 { margin: 0; flex: 1; }
.title-bar-leading { flex-shrink: 0; font-size: 13px; color: var(--accent); }
.title-bar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.title-back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-70); }
.title-back-link:hover { color: var(--ink-100); text-decoration: none; }
.title-back-link svg { width: 14px; height: 14px; }

.sidebar { width: 260px; height: 100%; background: var(--bg-subtle); border-right: 1px solid var(--border-light); padding: 20px 16px; display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; overflow-y: auto; }
.sidebar-header { display: flex; justify-content: flex-start; align-items: center; padding: 14px 8px 4px; margin-bottom: 20px; }
.sidebar-wordmark {
  color: var(--ink-100);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 24px;
}
.sidebar-store-name { padding: 6px 8px; margin-bottom: 4px; }
.store-name-text { font-size: 13px; font-weight: 500; color: var(--ink-100); }
.sidebar-storefront-link { display: block; padding: 0 8px 10px; font-size: 11px; color: var(--ink-40); text-decoration: none; }
.sidebar-storefront-link:hover { color: var(--accent); text-decoration: none; }

.store-switcher { margin-bottom: 8px; position: relative; }
.store-switcher summary { list-style: none; cursor: pointer; outline: none; padding: 6px 8px; border-radius: var(--radius-md); transition: background 0.1s; }
.store-switcher summary::-webkit-details-marker { display: none; }
.store-switcher summary:hover { background: var(--border-light); }
.store-switcher-current { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.store-switcher-icon, .store-switcher-icon svg { width: 12px !important; height: 12px !important; color: var(--ink-40); }
.store-switcher-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--bg-surface); border: 1px solid var(--border-med); border-radius: var(--radius-md); box-shadow: var(--shadow-float); padding: 4px; z-index: 100; }
.store-switcher[open] summary { background: var(--border-light); }
.store-option { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 10px; border: none; background: none; cursor: pointer; border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-100); text-align: left; transition: background 0.1s; }
.store-option:hover { background: var(--row-hover); }
.store-option--active { font-weight: 500; }
.store-option-check, .store-option-check svg { width: 10px !important; height: 10px !important; color: var(--accent); }
.sidebar-nav { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-label { padding: 0 8px 4px; font-size: 10px; line-height: 1; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 600; color: var(--ink-40); }
.nav-icon { width: 16px !important; height: 16px !important; stroke-width: 1.75; flex-shrink: 0; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-70); text-decoration: none; transition: background 0.1s, color 0.1s; }
.nav-item:hover { background: var(--bg-surface); color: var(--ink-100); text-decoration: none; }
.nav-item.active { background: var(--bg-surface); color: var(--ink-100); font-weight: 500; }
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-light); }
.user-info { padding: 4px 8px; }
.user-name { font-size: 12px; color: var(--ink-40); }

.app-shell { display: flex; width: 100%; height: 100%; background: var(--bg-surface); border-radius: var(--radius-lg); box-shadow: 0 8px 30px rgba(0,0,0,0.04); border: 1px solid var(--border-med); overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 16px; font-size: 13px; font-weight: 500; line-height: 1; border-radius: var(--radius-sm); border: 1px solid var(--border-med); background: var(--bg-surface); color: var(--ink-100); cursor: pointer; transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--bg-subtle); border-color: var(--ink-70); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink-70) 12%, transparent); text-decoration: none; }
.btn-primary { background: var(--ink-100); border-color: var(--ink-100); color: #FFFFFF; }
.btn-primary:hover { background: #292929; border-color: #292929; box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-70); }
.btn:disabled, .btn[aria-disabled="true"] {
  border-color: var(--border-med); background: var(--bg-subtle); color: var(--ink-40);
  box-shadow: none; opacity: 1; cursor: not-allowed; transform: none;
}
.btn:disabled:hover, .btn[aria-disabled="true"]:hover {
  border-color: var(--border-med); background: var(--bg-subtle); color: var(--ink-40);
  box-shadow: none; transform: none;
}
.btn-icon svg, .btn > svg { width: 14px; height: 14px; flex: 0 0 auto; stroke-width: 1.8; }
.btn-icon-only {
  width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent;
  color: var(--ink-40); cursor: pointer;
}
.btn-icon-only:hover { border-color: var(--border-light); background: var(--bg-subtle); color: var(--ink-100); }
.btn-icon-only svg { width: 15px; height: 15px; }
.btn-ghost:hover { background: var(--bg-subtle); color: var(--ink-100); border-color: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #FFFFFF; }
.btn-danger:hover { opacity: 0.9; }

.input { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; font-size: 13px; line-height: 1; color: var(--ink-100); background: var(--bg-surface); border: 1px solid var(--border-med); border-radius: var(--radius-sm); outline: none; transition: border-color 0.15s, box-shadow 0.15s; width: 100%; }
.input::placeholder { color: var(--ink-40); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 92, 214, 0.12); }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.data-table thead th { padding: 10px 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-40); border-bottom: 1px solid var(--border-light); background: var(--bg-surface); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.data-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); color: var(--ink-100); vertical-align: middle; }

.data-table tbody tr:hover { background: var(--row-hover); }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; font-size: 11px; font-weight: 500; line-height: 1; border-radius: 9999px; white-space: nowrap; gap: 4px; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--bg-subtle); color: var(--ink-70); }

.metric-card { padding: 16px 20px; background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 2px; }
.metric-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.metric-card-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-40); }
.metric-card-icon { width: 14px; height: 14px; color: var(--ink-40); flex-shrink: 0; }
.metric-card-value { font-family: var(--font-mono); font-size: 24px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink-100); font-variant-numeric: tabular-nums; line-height: 1.1; }
.metric-card-unit { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-40); margin-top: 2px; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; color: var(--ink-40); }
.empty-state-icon { margin-bottom: 12px; opacity: 0.5; }
.empty-state-title { font-size: 14px; font-weight: 500; color: var(--ink-70); margin-bottom: 4px; }
.empty-state-text { font-size: 13px; color: var(--ink-40); max-width: 32ch; }

.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.kpi-row--auto { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.dashboard-combined { background: var(--bg-subtle); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 20px 24px; margin-bottom: 32px; display: flex; align-items: center; gap: 24px; overflow: hidden; }
.dashboard-combined-body { flex: 1; min-width: 0; }
.dashboard-combined .kpi-row { margin-bottom: 0; }
.dashboard-combined-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-40); margin: 0 0 14px; }
.dashboard-combined-image { flex-shrink: 0; align-self: flex-end; height: 120px; width: auto; display: block; }
.dashboard-store-section { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border-light); }
.dashboard-store-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.dashboard-store-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dashboard-store-meta { display: flex; align-items: center; gap: 8px; }
.dashboard-store-icon { width: 16px; height: 16px; color: var(--ink-40); }
.dashboard-store-name { font-size: 14px; font-weight: 600; color: var(--ink-100); margin: 0; }
.dashboard-store-name-btn { background: none; border: none; padding: 0; font-size: 14px; font-weight: 600; color: var(--ink-100); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; transition: text-decoration-color 0.15s; }
.dashboard-store-name-btn:hover { text-decoration-color: var(--ink-100); }
.dashboard-store-currency { font-size: 11px; color: var(--ink-40); background: var(--bg-subtle); border: 1px solid var(--border-light); border-radius: 3px; padding: 1px 5px; }
.nav-item--dashboard { border-bottom: 1px solid var(--border-light); margin-bottom: 4px; padding-bottom: 8px; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.meta-grid .t-caps { display: block; margin-bottom: 4px; }
.meta-grid p { font-size: 13px; color: var(--ink-100); }

.form-stack { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 500; color: var(--ink-70); }
.form-actions { display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border-light); }

.alert-banner { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; margin-bottom: 16px; }
.alert-danger { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.1); }
.alert-success { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; background: var(--success-bg); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.1); }

.auth-body { background: var(--bg-subtle); min-height: 100vh; display: block; height: auto; overflow: auto; padding: 0; }
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { background: var(--bg-surface); border: 1px solid var(--border-med); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 400px; box-shadow: var(--shadow-md); }
.auth-brand { font-size: 16px; font-weight: 600; color: var(--ink-100); letter-spacing: -0.02em; margin-bottom: 32px; }

/* ---- Sign in layout ---- */
.auth-split {
  min-height: 100vh; position: relative;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 9%; background: var(--bg-subtle);
}
.auth-split-illustration {
  position: absolute; left: 0; bottom: 0;
  pointer-events: none;
}
.auth-illustration { display: block; width: auto; height: auto; }
.auth-split-form { width: 380px; position: relative; z-index: 1; }
.auth-split-form .auth-card { max-width: 100%; }
.auth-wordmark {
  color: var(--ink-100);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 26px;
  margin-bottom: 32px;
}
@media (max-width: 800px) {
  .auth-split { justify-content: center; padding-right: 0; padding: 40px 24px; }
  .auth-split-illustration { display: none; }
  .auth-split-form { width: 100%; max-width: 380px; }
}

/* ============================================================
   Croco Store catalog operations — fCore Design
   ============================================================ */
.workspace-header { margin-bottom: 22px; }
.workspace-breadcrumb {
  display: flex; align-items: center; gap: 7px; margin-bottom: 12px;
  font-size: 11px; color: var(--ink-40);
}
.workspace-breadcrumb a { color: var(--ink-40); }
.workspace-breadcrumb a:hover { color: var(--ink-100); text-decoration: none; }
.workspace-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.workspace-title-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.workspace-title {
  margin: 0; font-size: 30px; line-height: 1.05; font-weight: 500;
  letter-spacing: -0.045em; color: var(--ink-100);
}
.workspace-sku { color: var(--ink-40); }
.kind-chip, .locale-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border: 1px solid var(--border-med); border-radius: var(--radius-sm);
  color: var(--ink-70); background: var(--bg-surface);
  font-size: 10px; line-height: 1; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.locale-chip.is-primary { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

.product-workspace { min-width: 0; }
.workspace-tabs {
  display: flex; align-items: center; gap: 2px; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; overscroll-behavior-inline: contain;
  border-bottom: 1px solid var(--border-light); margin: 0 0 24px;
}
.workspace-tabs::-webkit-scrollbar { display: none; }
.workspace-tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px;
  color: var(--ink-40); font-size: 12px; font-weight: 500; white-space: nowrap; text-decoration: none;
}
.workspace-tab svg { width: 14px; height: 14px; stroke-width: 1.75; }
.workspace-tab:hover { color: var(--ink-100); text-decoration: none; }
.workspace-tab.is-active { color: var(--ink-100); }
.workspace-tab.is-active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  background: var(--ink-100);
}
.workspace-body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; align-items: start; }
.workspace-main { min-width: 0; }
.product-workspace--content .workspace-body { display: block; }
.product-workspace--content .workspace-main { width: 100%; }
.workspace-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.workspace-heading { font-size: 20px; line-height: 1.2; font-weight: 500; letter-spacing: -.025em; }
.workspace-panel {
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); padding: 20px;
}
.workspace-panel--hero {
  min-height: 144px; display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: linear-gradient(115deg, var(--bg-subtle), var(--bg-surface));
}
.workspace-panel--upload { border-style: dashed; border-color: var(--border-dark); }
.workspace-panel-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border-light);
}
.workspace-panel-header h2 { margin: 0 0 3px; font-size: 14px; line-height: 1.3; font-weight: 500; letter-spacing: -.015em; }
.workspace-panel-header p:not(.panel-eyebrow) { font-size: 12px; color: var(--ink-40); }
.panel-eyebrow {
  margin: 0 0 5px; font-size: 10px; line-height: 1; text-transform: uppercase;
  letter-spacing: .09em; font-weight: 600; color: var(--ink-40);
}
.workspace-empty { padding: 26px 0; color: var(--ink-40); text-align: center; font-size: 12px; }

.workspace-inspector {
  position: sticky; top: 8px; display: flex; flex-direction: column;
  background: var(--bg-subtle); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); overflow: hidden;
}
.inspector-block { padding: 15px 16px; border-bottom: 1px solid var(--border-light); }
.inspector-block p { font-size: 12px; color: var(--ink-70); margin-top: 3px; }
.inspector-status { display: flex; align-items: center; gap: 8px; }
.inspector-status strong { font-size: 13px; font-weight: 500; }
.inspector-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 9px; }
.inspector-link { display: block; padding: 13px 16px; font-size: 11px; color: var(--ink-70); }
.inspector-link:hover { color: var(--ink-100); text-decoration: none; background: var(--row-hover); }
.status-dot {
  display: inline-block; width: 7px; height: 7px; flex: 0 0 7px;
  border-radius: 50%; background: var(--ink-40);
}
.status-dot--success { background: var(--success); }
.status-dot--warning { background: var(--warning); }
.status-dot--danger { background: var(--danger); }
.progress-track { position: relative; height: 4px; border-radius: 4px; overflow: hidden; background: var(--border-med); }
.progress-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--ink-100); }

.readiness-ring {
  --progress: 0; width: 88px; height: 88px; flex: 0 0 88px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--ink-100) calc(var(--progress) * 1%), var(--border-med) 0);
  position: relative;
}
.readiness-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg-surface); }
.readiness-ring strong { position: relative; font-size: 14px; font-weight: 500; }
.overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; }
.overview-metric { display: flex; align-items: center; gap: 11px; min-height: 78px; padding: 14px 16px; background: var(--bg-surface); border-right: 1px solid var(--border-light); }
.overview-metric:last-child { border-right: 0; }
.overview-metric > svg { width: 15px; height: 15px; color: var(--ink-40); }
.overview-metric span { display: block; font-size: 17px; font-weight: 500; }
.overview-metric p { font-size: 11px; color: var(--ink-40); }
.check-list { display: flex; flex-direction: column; }
.check-row { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--border-light); }
.check-row:last-child { border-bottom: 0; }
.check-row > svg { width: 15px; height: 15px; color: var(--warning); }
.check-row.is-ready > svg { color: var(--success); }
.check-row strong { font-size: 12px; font-weight: 500; }
.check-row p { font-size: 11px; color: var(--ink-40); }
.check-row a { font-size: 11px; color: var(--ink-40); }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; }
.definition-grid dt { margin-bottom: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-40); font-weight: 600; }
.definition-grid dd { font-size: 12px; color: var(--ink-100); overflow-wrap: anywhere; }

.type-picker { max-width: 980px; margin: 0 auto; padding: 18px 0 40px; }
.type-picker-intro { max-width: 590px; margin-bottom: 28px; }
.type-picker-intro .workspace-heading { margin-bottom: 10px; font-size: 26px; letter-spacing: -.04em; }
.type-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.type-card {
  min-height: 126px; display: grid; grid-template-columns: 38px 1fr 18px; align-items: start; gap: 14px;
  padding: 20px; border: 1px solid var(--border-med); border-radius: var(--radius-md);
  background: var(--bg-surface); color: var(--ink-100); text-decoration: none; transition: border-color .12s, background-color .12s, box-shadow .12s;
}
.type-card:last-child { grid-column: 1 / -1; }
.type-card:hover { border-color: var(--ink-70); background: var(--bg-subtle); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink-70) 8%, transparent); text-decoration: none; }
.type-card-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--bg-subtle); }
.type-card-icon svg, .type-card-arrow { width: 16px; height: 16px; color: var(--ink-40); }
.type-card h3 { margin: 1px 0 7px; font-size: 14px; font-weight: 500; }
.type-card p { max-width: 44ch; font-size: 12px; line-height: 1.5; color: var(--ink-40); }
.quick-import-panel { margin-bottom: 32px; padding: 0; overflow: hidden; border-color: var(--border-med); }
.quick-import-panel .workspace-panel-header { margin: 0; padding: 18px 20px; border-bottom: 1px solid var(--border-light); }
.status-inline { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-40); font-size: 10px; white-space: nowrap; }
.status-inline svg { width: 14px; height: 14px; color: var(--success); }
.quick-import-form { padding: 20px; }
.file-drop {
  position: relative; min-height: 78px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 14px; border: 1px dashed var(--border-dark); border-radius: var(--radius-md);
  background: var(--bg-subtle); cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s;
}
.file-drop:hover, .file-drop.dragover { border-color: var(--accent); background: var(--accent-dim); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); }
.file-drop.has-file { border-style: solid; border-color: var(--border-med); background: var(--bg-surface); }
.file-drop-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); color: var(--ink-40); }
.file-drop-icon svg { width: 18px; height: 18px; }
.file-drop.has-file .file-drop-icon { color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, var(--border-light)); }
.file-drop-copy { min-width: 0; }
.file-drop-text { display: block; max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.file-drop-hint { display: block; margin-top: 4px; color: var(--ink-40); font-size: 11px; line-height: 1.45; }
.file-drop-action { pointer-events: none; white-space: nowrap; }
.file-drop-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.quick-import-controls { display: grid; grid-template-columns: minmax(190px, 260px) 1fr auto; align-items: end; gap: 16px; padding-top: 14px; }
.quick-import-controls .form-group { margin: 0; }

.creation-wizard { max-width: 1120px; margin: 0 auto; }
.wizard-rail { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 22px; border-bottom: 1px solid var(--border-light); }
.wizard-step { position: relative; display: flex; align-items: center; gap: 7px; padding: 0 4px 12px; color: var(--ink-40); font-size: 11px; }
.wizard-step span { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--border-med); border-radius: 50%; font-family: var(--font-mono); font-size: 9px; }
.wizard-step.is-current { color: var(--ink-100); }
.wizard-step.is-current::after { content: ""; position: absolute; height: 2px; left: 0; right: 0; bottom: -1px; background: var(--ink-100); }
.wizard-step.is-complete span { color: var(--success); border-color: var(--success); }
.wizard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: start; gap: 22px; }
.wizard-summary { position: sticky; top: 8px; padding: 18px; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-subtle); }
.wizard-kind-mark { display: flex; align-items: center; gap: 9px; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.wizard-kind-mark svg { width: 18px; height: 18px; color: var(--ink-40); }
.wizard-kind-mark strong { font-size: 13px; font-weight: 500; }
.wizard-summary dl { padding: 12px 0; }
.wizard-summary dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 11px; }
.wizard-summary dt { color: var(--ink-40); }
.wizard-summary dd { color: var(--ink-100); }
.wizard-summary > p { padding-top: 12px; border-top: 1px solid var(--border-light); color: var(--ink-40); font-size: 11px; line-height: 1.5; }

.field-grid { display: grid; gap: 14px 16px; }
.field-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-span-2 { grid-column: span 2; }
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.field-label-row .form-label { margin: 0; }
.input--large { height: 38px; font-size: 15px; letter-spacing: -.015em; }
.input--textarea { height: auto; min-height: 76px; padding: 9px 10px; line-height: 1.5; resize: vertical; }
.input--file { height: auto; min-height: 34px; padding: 5px 7px; }
.input--price { width: 96px; text-align: right; }
.editor-field { min-height: 150px; border-color: var(--border-med); border-radius: var(--radius-sm); }
.segmented-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.segmented-choice label { cursor: pointer; }
.segmented-choice input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-choice span {
  min-height: 70px; display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 13px 15px; border: 1px solid var(--border-med); border-radius: var(--radius-sm);
}
.segmented-choice input:checked + span { border-color: var(--ink-100); box-shadow: inset 0 0 0 1px var(--ink-100); background: var(--bg-subtle); }
.segmented-choice strong { font-size: 12px; font-weight: 500; }
.segmented-choice small { font-size: 11px; color: var(--ink-40); }
.toggle-field { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 12px; color: var(--ink-70); }
.toggle-field input { accent-color: var(--ink-100); }
.workspace-action-bar {
  position: sticky; bottom: 0; z-index: 8; min-height: 58px; margin-top: 18px; padding: 11px 14px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px;
  border: 1px solid var(--border-med); border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-surface) 94%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow-float);
}
.workspace-action-bar.is-inline { position: static; min-height: 0; margin-top: 16px; padding: 12px 0 0; border: 0; border-top: 1px solid var(--border-light); border-radius: 0; box-shadow: none; background: transparent; backdrop-filter: none; }

.workspace-table { width: 100%; border-collapse: collapse; text-align: left; }
.workspace-table th {
  height: 34px; padding: 0 10px; border-bottom: 1px solid var(--border-med);
  color: var(--ink-40); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; white-space: nowrap;
}
.workspace-table td { min-height: 46px; padding: 9px 10px; border-bottom: 1px solid var(--border-light); font-size: 12px; vertical-align: middle; }
.workspace-table--compact td { padding-top: 6px; padding-bottom: 6px; }
.workspace-table tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.status-with-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-70); font-size: 11px; }
.status-with-dot i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

.upload-dropzone {
  min-height: 128px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1px dashed var(--border-dark); border-radius: var(--radius-md); background: var(--bg-subtle); cursor: pointer;
}
.upload-dropzone:hover { border-color: var(--ink-70); }
.upload-dropzone > svg { width: 23px; height: 23px; margin-bottom: 4px; color: var(--ink-40); }
.upload-dropzone strong { font-size: 12px; font-weight: 500; }
.upload-dropzone span { font-size: 11px; color: var(--ink-40); }
.upload-dropzone--large { min-height: 230px; padding: 28px; }
.upload-dropzone--large .input--file { width: auto; margin-top: 12px; background: var(--bg-surface); }
.media-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.media-strip figure { overflow: hidden; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.media-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.media-strip figcaption { overflow: hidden; padding: 7px; font-size: 10px; color: var(--ink-40); text-overflow: ellipsis; white-space: nowrap; }

.section-list, .file-list { display: flex; flex-direction: column; }
.section-row, .file-row { border-bottom: 1px solid var(--border-light); }
.section-row:last-child, .file-row:last-child { border-bottom: 0; }
.section-row > summary, .file-row > summary {
  min-height: 52px; display: grid; align-items: center; gap: 10px; cursor: pointer; list-style: none;
}
.section-row > summary { grid-template-columns: 24px 130px 1fr auto; }
.file-row > summary { grid-template-columns: 34px 1fr auto 44px; }
.section-row > summary::-webkit-details-marker, .file-row > summary::-webkit-details-marker, .section-add > summary::-webkit-details-marker { display: none; }
.section-row > summary strong, .file-row > summary strong { font-size: 12px; font-weight: 500; }
.section-row > summary > span:not(.drag-handle, .badge) { color: var(--ink-40); font-size: 11px; }
.drag-handle { color: var(--ink-40); letter-spacing: -2px; }
.section-editor, .file-editor { margin: 0 0 14px 34px; padding: 16px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.section-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.section-add { margin-top: 15px; }
.section-add > summary { width: max-content; }
.section-add[open] > summary { margin-bottom: 10px; }
.file-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.file-icon svg { width: 14px; height: 14px; color: var(--ink-40); }
.file-row summary p { margin-top: 2px; color: var(--ink-40); }
.version-history { margin-top: 14px; border-top: 1px solid var(--border-light); padding-top: 12px; }
.version-history > div { display: grid; grid-template-columns: 36px 1fr auto 90px; gap: 10px; padding: 6px 0; font-size: 11px; }
.version-history > div span { color: var(--ink-40); }
.trash-row { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border-light); }
.trash-row:last-child { border-bottom: 0; }
.trash-row strong { font-size: 12px; font-weight: 500; }
.trash-row p { font-size: 11px; color: var(--ink-40); }

.import-progress-row {
  display: grid; grid-template-columns: 8px minmax(130px, 1fr) 100px minmax(100px, 1fr) 38px;
  align-items: center; gap: 10px; min-height: 42px; color: var(--ink-70); font-size: 11px;
}
.import-progress-row:hover { color: var(--ink-100); text-decoration: none; }
.import-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 22px; align-items: start; max-width: 980px; margin: 0 auto; }
.import-inspector { position: sticky; }
.import-gates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.import-gates > div { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.import-gates svg { width: 14px; height: 14px; color: var(--success); }
.import-gates span { display: flex; flex-direction: column; }
.import-gates strong { font-size: 11px; font-weight: 500; }
.import-gates small { font-size: 9px; color: var(--ink-40); }
.pipeline-step { display: grid; grid-template-columns: 23px 1fr; align-items: center; gap: 5px; padding: 4px 0; }
.pipeline-step span { color: var(--ink-40); font-size: 9px; }
.pipeline-step p { margin: 0; }
.import-commit-form { display: contents; }
.import-commit-status {
  position: fixed; inset: 0; z-index: 1200;
  display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--ink-100) 28%, transparent); backdrop-filter: blur(3px);
}
.import-commit-status[hidden] { display: none; }
.import-commit-status__dialog {
  width: min(500px, 100%); display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 14px;
  padding: 22px; border: 1px solid var(--border-med); border-radius: var(--radius-lg);
  background: var(--bg-surface); box-shadow: var(--shadow-float);
}
.import-commit-status__indicator {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent-dim);
}
.import-commit-status__indicator span {
  width: 16px; height: 16px; border: 1.5px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent); border-radius: 50%; animation: import-spin .7s linear infinite;
}
.import-commit-status strong { display: block; margin: 1px 0 4px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.import-commit-status p { color: var(--ink-70); font-size: 12px; line-height: 1.55; }
.import-commit-progress {
  grid-column: 1 / -1; height: 4px; margin-top: 5px; overflow: hidden;
  border-radius: 999px; background: var(--bg-subtle);
}
.import-commit-progress span {
  display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent);
  transition: width .24s ease;
}
.import-commit-progress-meta {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.import-commit-stage { display: flex; align-items: center; gap: 7px; color: var(--ink-40); font-size: 10px; }
.import-commit-stage::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.import-commit-progress-meta > strong { color: var(--ink-70); font-size: 10px; font-weight: 500; }
.is-spinning { animation: import-spin .7s linear infinite; }
@keyframes import-spin { to { transform: rotate(360deg); } }
body.has-modal .turbo-progress-bar { display: none; }
.multipart-progress {
  position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--ink-100) 28%, transparent); backdrop-filter: blur(3px);
}
.multipart-progress[hidden] { display: none; }
.multipart-progress.is-error { color: var(--danger); }
.multipart-progress.is-error .progress-fill { background: var(--danger); }
.multipart-progress__dialog {
  width: min(500px, 100%); display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; gap: 14px;
  padding: 22px; border: 1px solid var(--border-med); border-radius: var(--radius-lg);
  background: var(--bg-surface); box-shadow: var(--shadow-float);
}
.multipart-progress__indicator {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-dim);
}
.multipart-progress__indicator span {
  width: 16px; height: 16px; border: 1.5px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent); border-radius: 50%; animation: import-spin .7s linear infinite;
}
.multipart-progress__dialog strong { display: block; margin: 1px 0 4px; color: var(--ink-100); font-size: 15px; font-weight: 600; }
.multipart-progress__dialog p { color: var(--ink-70); font-size: 12px; line-height: 1.55; }
.multipart-progress__dialog .progress-track { grid-column: 1 / 3; align-self: center; height: 4px; }
.multipart-progress__dialog > .t-mono { align-self: center; color: var(--ink-70); font-size: 10px; }
.multipart-progress__dismiss { grid-column: 1 / -1; justify-self: end; }
.multipart-progress__dismiss[hidden] { display: none; }
.multipart-progress.is-error .multipart-progress__indicator { background: var(--danger-bg); }
.multipart-progress.is-error .multipart-progress__indicator span { animation: none; border-color: var(--danger); }
.archive-upload-card { padding: 0; overflow: hidden; }
.archive-upload-card .workspace-panel-header { margin: 0; padding: 20px 22px 17px; border-bottom: 1px solid var(--border-light); }
.archive-upload-form { padding: 20px 22px 22px; }
.archive-upload-form .workspace-action-bar { margin-top: 18px; }
.archive-import-note {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; margin-top: 16px; padding: 12px 14px;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle);
}
.archive-import-note svg { width: 15px; height: 15px; color: var(--success); }
.archive-import-note strong { display: block; font-size: 11px; font-weight: 600; }
.archive-import-note p { margin-top: 2px; color: var(--ink-40); font-size: 10px; line-height: 1.5; }

.channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.channel-card { min-height: 72px; display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.channel-card strong { font-size: 12px; font-weight: 500; }
.channel-card p { margin-top: 2px; font-size: 10px; color: var(--ink-40); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--border-light)); }
.danger-actions { display: flex; justify-content: space-between; gap: 10px; }
.activity-list { display: flex; flex-direction: column; }
.activity-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 11px; min-height: 52px; border-bottom: 1px solid var(--border-light); }
.activity-row:last-child { border-bottom: 0; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-dark); }
.activity-row strong { font-size: 12px; font-weight: 500; }
.activity-row p { font-size: 10px; color: var(--ink-40); }
.activity-row time { color: var(--ink-40); font-size: 10px; }

.catalog-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; }
.catalog-summary > div { min-height: 74px; padding: 14px 16px; display: grid; grid-template-columns: 18px 1fr; align-items: center; column-gap: 9px; border-right: 1px solid var(--border-light); background: var(--bg-surface); }
.catalog-summary > div:last-child { border-right: 0; }
.catalog-summary svg { grid-row: span 2; width: 15px; height: 15px; color: var(--ink-40); }
.catalog-summary span { align-self: end; font-size: 16px; font-weight: 500; }
.catalog-summary p { align-self: start; color: var(--ink-40); font-size: 10px; }
.catalog-toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.catalog-search { width: min(280px, 34vw); height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--border-med); border-radius: var(--radius-sm); background: var(--bg-surface); }
.catalog-search svg { width: 13px; height: 13px; color: var(--ink-40); }
.catalog-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink-100); background: transparent; font-size: 11px; }
.catalog-search input::-webkit-search-cancel-button { display: none; }
.catalog-search-clear {
  width: 20px; height: 20px; display: grid; flex: 0 0 20px; place-items: center;
  border-radius: var(--radius-sm); color: var(--ink-40); transition: background .12s, color .12s;
}
.catalog-search-clear:hover { background: var(--bg-subtle); color: var(--ink-100); text-decoration: none; }
.catalog-search-clear svg { width: 11px; height: 11px; stroke-width: 2; }
.catalog-kind-filters { flex: 1; display: flex; align-items: center; gap: 2px; overflow-x: auto; }
.catalog-filter { height: 28px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: var(--radius-sm); color: var(--ink-40); font-size: 10px; white-space: nowrap; }
.catalog-filter:hover, .catalog-filter.is-active { color: var(--ink-100); background: var(--bg-subtle); text-decoration: none; }
.catalog-panel { padding: 0; overflow: hidden; }
.catalog-table td { height: 58px; }
.catalog-table .kind-chip {
  height: 18px; padding: 0 5px; border-radius: 3px;
  font-size: 8px; letter-spacing: .055em;
}
.catalog-sort {
  display: inline-flex; align-items: center; gap: 4px;
  color: inherit; white-space: nowrap; text-decoration: none;
}
.catalog-sort:hover, .catalog-sort.is-active { color: var(--ink-100); text-decoration: none; }
.catalog-sort svg { width: 11px; height: 11px; stroke-width: 1.8; opacity: .55; }
.catalog-sort.is-active svg { color: var(--accent); opacity: 1; }
.catalog-product-cell { display: flex; align-items: center; gap: 10px; color: var(--ink-100); }
.catalog-product-cell:hover { text-decoration: none; }
.catalog-product-cell strong { display: block; max-width: 260px; overflow: hidden; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.catalog-product-cell span { display: block; margin-top: 2px; color: var(--ink-40); font-size: 9px; }
.catalog-thumb { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-subtle); }
.catalog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.catalog-thumb svg { width: 14px; height: 14px; color: var(--ink-40); }
.catalog-label-cell {
  display: inline-block; max-width: 170px; overflow: hidden;
  color: var(--ink-70); font-size: 11px; text-overflow: ellipsis; white-space: nowrap;
}
.catalog-label-cell:hover { color: var(--ink-100); text-decoration: none; }
.catalog-label-empty { color: var(--ink-40); }
.catalog-readiness { min-width: 94px; display: grid; grid-template-columns: 1fr 30px; align-items: center; gap: 7px; }
.catalog-readiness span { color: var(--ink-40); font-size: 9px; }
.catalog-date { color: var(--ink-40); font-size: 9px; white-space: nowrap; }
.catalog-empty { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.catalog-empty > svg { width: 24px; height: 24px; margin-bottom: 13px; color: var(--ink-40); }
.catalog-empty h2 { margin-bottom: 4px; font-size: 14px; font-weight: 500; }
.catalog-empty p { margin-bottom: 16px; color: var(--ink-40); font-size: 11px; }
.status-with-dot i.status-dot--warning { background: var(--warning); }
.status-with-dot i.status-dot--danger { background: var(--danger); }
.command-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.command-metric { min-height: 116px; padding: 16px; display: grid; grid-template-columns: 1fr 18px; align-content: space-between; gap: 6px; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface); }
.command-metric strong { display: block; margin-top: 6px; font-size: 21px; font-weight: 500; letter-spacing: -.035em; }
.command-metric > svg { width: 16px; height: 16px; color: var(--ink-40); }
.command-metric > p { grid-column: 1 / -1; color: var(--ink-40); font-size: 10px; }
.command-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr); gap: 16px; align-items: start; }
.workspace-panel-header > a { color: var(--ink-40); font-size: 10px; }
.command-list { display: flex; flex-direction: column; }
.command-row { min-height: 54px; display: grid; grid-template-columns: 90px 1fr 120px; align-items: center; gap: 10px; border-bottom: 1px solid var(--border-light); color: var(--ink-100); }
.command-row:last-child { border-bottom: 0; }
.command-row:hover { text-decoration: none; background: var(--row-hover); }
.command-row strong { display: block; font-size: 11px; font-weight: 500; }
.command-row p { margin-top: 2px; color: var(--ink-40); font-size: 9px; }
.command-row--import { grid-template-columns: 8px 1fr auto; }
.type-mix { display: flex; flex-direction: column; }
.type-mix > a { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border-light); color: var(--ink-100); }
.type-mix > a:last-child { border-bottom: 0; }
.type-mix > a:hover { text-decoration: none; background: var(--row-hover); }
.type-mix strong { font-size: 12px; font-weight: 500; }
.settings-shell { max-width: 840px; }
.settings-workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.settings-workspace > .workspace-panel-header, .settings-workspace > .t-section, .settings-workspace > .form-actions,
.settings-workspace > .alert-banner, .settings-workspace > .settings-locale-note,
.settings-workspace > .llm-settings { grid-column: 1 / -1; }
.settings-workspace > .t-section { margin: 38px 0 4px; }
.settings-workspace textarea.input { height: auto; min-height: 82px; padding-block: 8px; line-height: 1.45; }
.settings-check-row { min-height: 34px; display: flex; gap: 18px; align-items: center; }
.settings-locale-note { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.settings-locale-note .status-dot { margin-top: 5px; }
.settings-locale-note strong { display: block; font-size: 11px; font-weight: 500; }
.settings-locale-note p { margin-top: 2px; color: var(--ink-40); font-size: 10px; }
.llm-settings { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.llm-connection-card, .llm-prompts-card {
  padding: 18px; border: 1px solid var(--border-light); border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.llm-settings-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border-light);
}
.llm-settings-heading h3 { margin-top: 3px; font-size: 14px; font-weight: 500; letter-spacing: -.015em; }
.llm-settings-heading > p { max-width: 310px; color: var(--ink-40); font-size: 11px; line-height: 1.5; text-align: right; }
.llm-connection-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; }
.llm-model-test-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px;
  margin-top: 14px;
}
.llm-model-field { display: flex; align-items: center; gap: 8px; }
.llm-model-field .btn { flex: 0 0 auto; }
.llm-test-button { margin-bottom: 0; }
.llm-test-feedback {
  position: relative; margin-top: 14px; padding: 11px 12px 11px 34px;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  background: var(--bg-subtle); color: var(--ink-70); font-size: 11px; line-height: 1.5;
}
.llm-test-feedback[hidden] { display: none; }
.llm-test-feedback::before {
  content: ""; position: absolute; left: 14px; top: 16px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-40);
}
.llm-test-feedback.is-testing::before { background: var(--warning); animation: llm-status-pulse 1s ease-in-out infinite; }
.llm-test-feedback.is-success { border-color: color-mix(in srgb, var(--success) 24%, var(--border-light)); background: var(--success-bg); color: var(--ink-100); }
.llm-test-feedback.is-success::before { background: var(--success); }
.llm-test-feedback.is-error { border-color: color-mix(in srgb, var(--danger) 24%, var(--border-light)); background: var(--danger-bg); color: var(--danger); }
.llm-test-feedback.is-error::before { background: var(--danger); }
.llm-prompts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
@keyframes llm-status-pulse { 50% { opacity: .35; } }
.model-browser-page { max-width: 820px; padding: 0; overflow: hidden; }
.model-browser-page__header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 20px 24px; border-bottom: 1px solid var(--border-light); }
.model-browser-page__header h2 { margin: 4px 0 6px; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; font-weight: 500; }
.model-browser-page__header p:last-child { color: var(--ink-40); font-size: 12px; }
.model-browser-page__search { display: flex; gap: 8px; padding: 16px 24px; border-bottom: 1px solid var(--border-light); background: var(--bg-subtle); }
.model-browser-page__search .input-icon-wrapper { flex: 1; }
.model-browser-page__search .input { width: 100%; }
.model-browser-page__tier { padding: 18px 24px 0; }
.model-browser-page__tier:last-child { padding-bottom: 24px; }
.model-browser-page__tier + .model-browser-page__tier { margin-top: 8px; }
.model-browser-page__tier-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.model-browser-page__tier-heading h3 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-40); }
.model-browser-page__tier-heading span { color: var(--ink-40); font-size: 11px; }
.model-browser-page__list { border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; }
.model-browser-page__item { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; gap: 12px; align-items: center; min-width: 0; padding: 10px 12px; border-bottom: 1px solid var(--border-light); color: inherit; text-decoration: none; }
.model-browser-page__item:last-child { border-bottom: 0; }
.model-browser-page__item:hover { background: var(--row-hover); text-decoration: none; }
.model-browser-page__item > div { min-width: 0; }
.model-browser-page__item strong, .model-browser-page__item div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-browser-page__item strong { font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.model-browser-page__item div > span { margin-top: 2px; color: var(--ink-40); font-size: 10px; }
.model-browser-page__item > svg { width: 14px; height: 14px; color: var(--ink-40); }
.model-tier-badge, .llm-model-row__tier { min-width: 38px; padding: 2px 6px; border-radius: var(--radius-sm); font-size: 9px; font-weight: 600; letter-spacing: .05em; text-align: center; text-transform: uppercase; }
.model-tier-badge.is-free, .llm-model-row__tier.is-free { color: var(--success); background: var(--success-bg); }
.model-tier-badge.is-paid, .llm-model-row__tier.is-paid { color: var(--ink-70); background: var(--bg-subtle); }
.model-browser-page__empty { padding: 18px; border: 1px dashed var(--border-light); border-radius: var(--radius-sm); color: var(--ink-40); text-align: center; }
.llm-model-dialog {
  width: min(640px, 100%); height: min(680px, calc(100vh - 48px)); display: grid;
  grid-template-rows: auto auto minmax(160px, 1fr) auto; overflow: hidden;
  border: 1px solid var(--border-med); border-radius: var(--radius-lg); background: var(--bg-surface); box-shadow: var(--shadow-float);
}
.llm-model-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px 17px; border-bottom: 1px solid var(--border-light); }
.llm-model-dialog__head strong { display: block; margin-top: 2px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.llm-model-dialog__head p { max-width: 52ch; margin-top: 4px; color: var(--ink-40); font-size: 11px; line-height: 1.45; }
.llm-model-dialog__toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 22px; }
.llm-model-dialog__search { margin: 0; }
.llm-model-dialog__count { color: var(--ink-40); font-size: 10px; white-space: nowrap; }
.input-icon-wrapper { position: relative; }
.input-icon-wrapper > svg { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; color: var(--ink-40); transform: translateY(-50%); pointer-events: none; }
.input-icon-wrapper > .input { width: 100%; padding-left: 32px; }
.llm-model-dialog__list {
  min-height: 0; margin: 0 22px; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface);
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink-40) 58%, transparent) transparent;
}
.llm-model-dialog__list::-webkit-scrollbar { width: 8px; background: transparent; }
.llm-model-dialog__list::-webkit-scrollbar-track { background: transparent; }
.llm-model-dialog__list::-webkit-scrollbar-thumb {
  border: 2px solid transparent; border-radius: 999px;
  background: color-mix(in srgb, var(--ink-40) 48%, transparent); background-clip: padding-box;
}
.llm-model-dialog__list::-webkit-scrollbar-corner { background: transparent; }
.model-tier-label {
  position: sticky; top: 0; z-index: 1; padding: 8px 12px;
  border-bottom: 1px solid var(--border-light); background: color-mix(in srgb, var(--bg-subtle) 94%, transparent);
  backdrop-filter: blur(8px); color: var(--ink-40); font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.llm-model-row {
  width: 100%; min-width: 0; min-height: 52px; display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 12px;
  padding: 9px 12px; border: 0; border-bottom: 1px solid var(--border-light); background: var(--bg-surface); color: var(--ink-100);
  text-align: left; cursor: pointer; transition: background-color .12s ease, box-shadow .12s ease;
}
.llm-model-row:last-child { border-bottom: 0; }
.llm-model-row:hover { background: var(--row-hover); }
.llm-model-row.is-keyboard-active { outline: none; background: var(--row-hover); box-shadow: inset 0 0 0 1px var(--accent); }
.llm-model-row.is-active { background: var(--accent-dim); box-shadow: inset 2px 0 var(--accent); }
.llm-model-row__copy, .llm-model-row__id, .llm-model-row__name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.llm-model-row__id { font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.llm-model-row.is-active .llm-model-row__id { color: var(--accent); }
.llm-model-row__name { margin-top: 2px; color: var(--ink-40); font-size: 10px; }
.llm-model-row__selected { width: 14px; height: 14px; color: transparent; }
.llm-model-row.is-active .llm-model-row__selected { color: var(--accent); }
.llm-model-message {
  min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 36px 20px; color: var(--ink-40); text-align: center;
}
.llm-model-message svg { width: 18px; height: 18px; }
.llm-model-message p { max-width: 44ch; font-size: 11px; line-height: 1.5; }
.llm-model-message.is-error { color: var(--danger); }
.llm-model-dialog__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--border-light); color: var(--ink-40); font-size: 10px; }
.llm-model-dialog__foot kbd { padding: 1px 5px; border: 1px solid var(--border-med); border-bottom-color: var(--border-dark); border-radius: 3px; background: var(--bg-subtle); font: inherit; color: var(--ink-70); }
.source-chip { display: inline-flex; align-items: center; gap: 5px; color: var(--success); font-size: 10px; font-weight: 500; }
.source-chip svg { width: 12px; height: 12px; }
.analysis-facts { margin-top: 18px; overflow: hidden; border: 1px solid var(--border-light); border-radius: var(--radius-md); }
.analysis-facts__label { grid-column: 1 / -1; display: flex !important; align-items: center; gap: 7px; padding: 9px 12px !important; background: var(--bg-subtle); color: var(--ink-40); font-size: 10px; }
.analysis-facts__label svg { width: 13px; height: 13px; }
.analysis-facts > div:not(.analysis-facts__label) { display: grid; grid-template-columns: minmax(130px, .4fr) 1fr; gap: 16px; padding: 8px 12px; border-top: 1px solid var(--border-light); font-size: 11px; }
.analysis-facts > div:not(.analysis-facts__label) span { color: var(--ink-40); }
.analysis-facts > div:not(.analysis-facts__label) strong { overflow-wrap: anywhere; font-weight: 500; }
.review-warning { display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 12px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--border-light)); border-radius: var(--radius-md); background: var(--warning-bg); }
.review-warning > svg { width: 18px; height: 18px; margin-top: 1px; color: var(--warning); }
.review-warning strong { display: block; font-size: 12px; font-weight: 600; }
.review-warning p { margin-top: 3px; color: var(--ink-70); font-size: 11px; line-height: 1.55; }
@media (max-width: 720px) {
  .model-browser-page__header, .model-browser-page__search { flex-direction: column; }
  .model-browser-page__search > * { width: 100%; }
  .llm-model-dialog__foot { align-items: flex-start; flex-direction: column; }
  .llm-connection-grid, .llm-model-test-row, .llm-prompts-grid { grid-template-columns: 1fr; }
  .llm-test-button { width: 100%; }
  .llm-settings-heading { flex-direction: column; gap: 5px; }
  .llm-settings-heading > p { text-align: left; }
}

@media (max-width: 1080px) {
  .workspace-body { grid-template-columns: 1fr; }
  .workspace-inspector { position: static; display: grid; grid-template-columns: repeat(4, 1fr); }
  .inspector-link { display: none; }
  .wizard-layout, .import-layout { grid-template-columns: 1fr; }
  .wizard-summary, .import-inspector { position: static; }
  .command-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  body { padding: 0; height: auto; min-height: 100vh; overflow: auto; }
  .app-shell { min-height: 100vh; border-radius: 0; border: 0; }
  .sidebar { width: 72px; padding-inline: 10px; }
  .sidebar-wordmark, .sidebar-store-name, .sidebar-storefront-link, .nav-group-label, .nav-item span, .sidebar-footer { display: none; }
  .nav-item { justify-content: center; padding: 9px; }
  .main-content { padding: 24px 20px; }
  .workspace-title-row { align-items: flex-start; flex-direction: column; }
  .overview-metrics, .import-gates { grid-template-columns: repeat(2, 1fr); }
  .field-grid--3 { grid-template-columns: 1fr 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .command-metrics { grid-template-columns: repeat(2, 1fr); }
  .catalog-summary { grid-template-columns: repeat(2, 1fr); }
  .catalog-summary > div:nth-child(2) { border-right: 0; }
  .catalog-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--border-light); }
}
@media (max-width: 560px) {
  .sidebar { display: none; }
  .main-content { padding: 20px 14px; }
  .type-card-grid, .field-grid--2, .field-grid--3, .segmented-choice { grid-template-columns: 1fr; }
  .type-card:last-child, .field-span-2 { grid-column: span 1; }
  .wizard-rail { grid-template-columns: 1fr; }
  .wizard-step:not(.is-current) { display: none; }
  .overview-metrics, .workspace-inspector { grid-template-columns: repeat(2, 1fr); }
  .workspace-panel { padding: 16px; }
  .workspace-panel--hero { align-items: flex-start; }
  .definition-grid { grid-template-columns: 1fr; }
  .quick-import-panel { padding: 0; }
  .quick-import-panel .workspace-panel-header { align-items: flex-start; flex-direction: column; }
  .quick-import-controls { grid-template-columns: 1fr; }
  .quick-import-controls .multipart-progress { margin: 0; }
  .quick-import-controls .btn { width: 100%; }
}

/* ---- Home / landing page ---- */
.home-page {
  min-height: 100vh; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-subtle);
}
.home-logo-wrap { display: flex; align-items: center; justify-content: center; }
.home-logo-link { display: block; cursor: pointer; }

/* Per-letter sweep animation */
.home-logo { display: block; }
.home-logo path {
  fill: #5E5E5E; stroke: #5E5E5E;
  transition: fill 0.4s, stroke 0.4s;
}
.home-logo-link:hover .letter-c { animation: letter-wave 1.6s ease-in-out infinite 0s; }
.home-logo-link:hover .letter-o { animation: letter-wave 1.6s ease-in-out infinite 0.18s; }
.home-logo-link:hover .letter-r { animation: letter-wave 1.6s ease-in-out infinite 0.36s; }
.home-logo-link:hover .letter-e { animation: letter-wave 1.6s ease-in-out infinite 0.54s; }
@keyframes letter-wave {
  0%, 100% { fill: #5E5E5E; stroke: #5E5E5E; }
  20%       { fill: #e8504a; stroke: #e8504a; }
  40%       { fill: #f5a623; stroke: #f5a623; }
  60%       { fill: #4a90d9; stroke: #4a90d9; }
  80%       { fill: #7b5ea7; stroke: #7b5ea7; }
}

.home-versions {
  position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%);
  display: grid; grid-template-columns: auto auto auto;
  gap: 3px 0;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-40);
  white-space: nowrap; z-index: 2;
}
.home-versions .v-label { text-align: right; padding-right: 6px; }
.home-versions .v-sep   { text-align: center; padding: 0 4px; }
.home-versions .v-val   { text-align: left; }
.home-illustration {
  position: absolute; bottom: 0; right: 0;
  height: 38vh; max-height: 300px; width: auto;
  object-fit: contain; pointer-events: none; z-index: 1;
}

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--ink-100); color: #FFFFFF; padding: 12px 16px; border-radius: var(--radius-md); font-size: 13px; box-shadow: var(--shadow-float); z-index: 1100; display: flex; align-items: center; gap: 8px; animation: toast-in 0.2s ease-out; }
.toast--danger { max-width: min(520px, calc(100vw - 32px)); background: var(--danger); }
.toast > svg { width: 16px; height: 16px; flex: 0 0 auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-light); }
.tab { padding: 10px 16px; font-size: 13px; font-weight: 500; color: var(--ink-70); border-bottom: 2px solid transparent; cursor: pointer; transition: color 0.15s, border-color 0.15s; text-decoration: none; margin-bottom: -1px; }
.tab:hover { color: var(--ink-100); text-decoration: none; }
.tab.active { color: var(--ink-100); border-bottom-color: var(--ink-100); }

.pagination { display: flex; align-items: center; gap: 4px; }
.pagination-page { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; font-size: 13px; border-radius: var(--radius-sm); border: 1px solid var(--border-light); background: var(--bg-surface); color: var(--ink-70); cursor: pointer; transition: background 0.1s, border-color 0.1s; text-decoration: none; }
.pagination-page:hover { background: var(--bg-subtle); border-color: var(--border-med); text-decoration: none; }
.pagination-page.active { background: var(--ink-100); border-color: var(--ink-100); color: #FFFFFF; font-weight: 500; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; backdrop-filter: blur(2px); }
.modal-overlay[hidden] { display: none !important; }
body.has-modal { overflow: hidden; }
.modal { background: var(--bg-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.modal-body { padding: 16px 24px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 24px 20px; }

.filter-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-md); margin-bottom: 16px; }

.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-40); }
.breadcrumbs a { color: var(--ink-40); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink-70); text-decoration: underline; }

.dropdown-menu-wrapper { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; top: 100%; right: 0; background: var(--bg-surface); border: 1px solid var(--border-med); border-radius: var(--radius-md); box-shadow: var(--shadow-float); min-width: 180px; padding: 4px; z-index: 100; }
.dropdown-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; color: var(--ink-100); border-radius: var(--radius-sm); text-decoration: none; cursor: pointer; }
.dropdown-item:hover { background: var(--bg-subtle); text-decoration: none; }

/* ─── Product form ───────────────────────────── */
.product-form { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; max-width: 1040px; }
.product-form-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.product-form-aside { display: flex; flex-direction: column; gap: 16px; }
.form-panel { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 20px 24px; }
.form-panel-title { font-size: 13px; font-weight: 600; color: var(--ink-70); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.form-panel .form-group { margin-bottom: 14px; }
.form-panel .form-group:last-child { margin-bottom: 0; }
.form-label { font-size: 12px; font-weight: 500; color: var(--ink-70); display: block; margin-bottom: 6px; }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; display: block; }
select.input { cursor: pointer; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239CA3AF' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.upload-dropzone { border: 1.5px dashed var(--border-med); border-radius: var(--radius-md); padding: 32px 24px; text-align: center; cursor: pointer; transition: all 0.15s; display: flex; flex-direction: column; align-items: center; }
.upload-dropzone:hover { border-color: var(--accent); background: var(--accent-dim); }
.image-grid-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; margin-top: 16px; }
.image-thumb { position: relative; aspect-ratio: 1; background: var(--bg-subtle); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-light); }
.image-remove-btn { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; background: rgba(0,0,0,0.5); border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; padding: 0; line-height: 1; }
.image-remove-btn:hover { background: var(--danger); }
.collection-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 4px 0; }
.product-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.product-actions-bar { display: flex; align-items: center; gap: 8px; padding: 16px 0 0; border-top: 1px solid var(--border-light); margin-top: 24px; }
.variant-edit-cell { padding: 12px 16px !important; background: var(--accent-dim); }
.product-images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.product-description { font-size: 14px; line-height: 1.65; color: var(--ink-70); max-width: 65ch; }
.product-description p { margin-bottom: 12px; }
.product-description p:last-child { margin-bottom: 0; }

/* Product editor */
.product-editor-header__context {
  margin-top: 7px; color: var(--ink-40); font-size: 12px;
}
.status-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-70); font-size: 11px;
}
.product-editor {
  min-width: 0; padding-bottom: 74px;
}
.system-field {
  min-height: 44px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.system-field > svg {
  width: 16px;
  height: 16px;
  color: var(--ink-40);
}
.system-field strong,
.system-field small {
  display: block;
}
.system-field strong {
  color: var(--ink-70);
  font-size: 10px;
  font-weight: 500;
}
.system-field small {
  margin-top: 2px;
  color: var(--ink-40);
  font-size: 8px;
  line-height: 1.4;
}
.technical-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--ink-40);
  font-size: 8px;
  font-weight: 500;
  white-space: nowrap;
}
.technical-badge svg {
  width: 11px;
  height: 11px;
}
.field-technical-note {
  margin-left: 4px;
  color: var(--ink-40);
  font-size: 7px;
  font-weight: 400;
  text-transform: none;
}
.variant-auto-sku {
  min-width: 110px;
}
.variant-auto-sku__value {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--ink-40);
  font-size: 9px;
}
.variant-auto-sku > small {
  display: block;
  margin-top: 3px;
  color: var(--ink-40);
  font-size: 7px;
}
.product-editor-errors {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px;
  margin-bottom: 16px; padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--danger) 24%, var(--border-light));
  border-radius: var(--radius-md); background: var(--danger-bg); color: #991b1b;
  font-size: 11px; line-height: 1.5;
}
.product-editor-errors > svg { width: 16px; height: 16px; margin-top: 1px; }
.product-editor-errors strong { font-size: 12px; font-weight: 600; }
.product-editor-errors ul { margin: 4px 0 0; padding-left: 16px; }
.product-editor-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 286px;
  align-items: start; gap: 22px;
}
.product-editor-main {
  display: flex; min-width: 0; flex-direction: column; gap: 16px;
}
.product-editor-section { padding: 0; overflow: hidden; }
.product-editor-section > .workspace-panel-header {
  margin: 0; padding: 18px 20px; background: var(--bg-surface);
}
.product-editor-section > .field-grid,
.product-editor-section > .product-editor-copy-grid,
.product-editor-section > .product-editor-seo-grid {
  padding: 20px;
}
.product-editor-section > .field-grid + .product-editor-immutable {
  margin-top: 0;
}
.product-editor-slug {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch;
}
.product-editor-slug > span {
  display: flex; align-items: center; padding: 0 9px;
  border: 1px solid var(--border-med); border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--bg-subtle); color: var(--ink-40);
  font: 10px var(--font-mono);
}
.product-editor-slug .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.product-editor-immutable {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border-light); background: var(--bg-subtle);
}
.product-editor-immutable > div {
  min-width: 0; padding: 14px 20px;
}
.product-editor-immutable > div + div { border-left: 1px solid var(--border-light); }
.product-editor-immutable strong {
  display: block; color: var(--ink-100); font-size: 12px; font-weight: 500;
}
.product-editor-immutable small {
  display: block; margin-top: 3px; color: var(--ink-40); font-size: 9px; line-height: 1.45;
}
.product-editor-locales { display: flex; align-items: center; gap: 5px; }
.locale-chip.is-complete {
  border-color: color-mix(in srgb, var(--success) 45%, var(--border-med));
  background: var(--success-bg); color: var(--success);
}
.product-editor-copy-grid,
.product-editor-seo-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
}
.product-editor-locale { min-width: 0; }
.product-editor-locale:first-child { padding-right: 20px; }
.product-editor-locale + .product-editor-locale {
  padding-left: 20px; border-left: 1px solid var(--border-light);
}
.product-editor-locale__heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 38px; margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.product-editor-locale__heading .panel-eyebrow { margin-bottom: 3px; }
.product-editor-locale__heading strong { font-size: 12px; font-weight: 500; }
.product-editor-locale .form-group + .form-group { margin-top: 14px; }
.product-editor-locale trix-editor {
  min-height: 244px; max-height: 380px; overflow-y: auto;
}
.product-editor-translation { min-height: 244px; }
.product-editor-translation-note {
  display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 4px 7px;
  margin-top: 10px; padding: 10px;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  background: var(--bg-subtle); color: var(--ink-40);
  font-size: 9px; line-height: 1.45;
}
.product-editor-translation-note > svg { width: 13px; height: 13px; }
.product-editor-translation-note a {
  grid-column: 2; width: fit-content; color: var(--ink-70); font-weight: 500;
}
.product-editor-translation-note a:hover { color: var(--accent); text-decoration: none; }
.product-editor-collections {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px;
}
.product-editor-collections label {
  display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 8px 10px;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  color: var(--ink-70); cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.product-editor-collections label:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border-med));
  background: var(--accent-dim);
}
.product-editor-collections input { accent-color: var(--accent); }
.product-editor-collections span { display: flex; min-width: 0; flex-direction: column; }
.product-editor-collections strong {
  overflow: hidden; color: var(--ink-100); font-size: 10px; font-weight: 500;
  text-overflow: ellipsis; white-space: nowrap;
}
.product-editor-collections small { margin-top: 2px; color: var(--ink-40); font-size: 8px; }
.product-editor-inspector {
  position: sticky; top: 8px; min-width: 0; overflow: hidden;
  border: 1px solid var(--border-med); border-radius: var(--radius-md);
  background: var(--bg-surface); box-shadow: var(--shadow-sm);
}
.product-editor-cover {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 16px; border-bottom: 1px solid var(--border-light);
}
.product-editor-cover > img,
.product-editor-cover__empty {
  width: 52px; height: 52px; display: grid; place-items: center;
  overflow: hidden; border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); background: var(--bg-subtle);
}
.product-editor-cover > img { object-fit: cover; }
.product-editor-cover__empty { color: var(--ink-40); }
.product-editor-cover__empty svg { width: 16px; height: 16px; }
.product-editor-cover__empty span { margin-top: -7px; font-size: 7px; }
.product-editor-cover > div:last-child { min-width: 0; }
.product-editor-cover strong,
.product-editor-cover small {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-editor-cover strong { font-size: 11px; font-weight: 500; }
.product-editor-cover small { margin-top: 3px; color: var(--ink-40); font-size: 8px; }
.product-editor-readiness,
.product-editor-inspector__section,
.product-editor-facts {
  padding: 15px 16px; border-bottom: 1px solid var(--border-light);
}
.product-editor-facts { border-bottom: 0; }
.product-editor-inspector__heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.product-editor-inspector__heading .panel-eyebrow { margin-bottom: 3px; }
.product-editor-inspector__heading strong { font-size: 11px; font-weight: 500; }
.product-editor-inspector__heading > .t-mono { color: var(--ink-40); font-size: 10px; }
.product-editor-checks { margin-top: 11px; }
.product-editor-check {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) 12px; align-items: center; gap: 8px;
  min-height: 42px; padding: 6px 0; border-top: 1px solid var(--border-light);
  color: var(--ink-70); text-decoration: none;
}
.product-editor-check:hover { color: var(--ink-100); text-decoration: none; }
.product-editor-check > svg { width: 13px; height: 13px; color: var(--warning); }
.product-editor-check > svg:last-child { width: 11px; height: 11px; color: var(--ink-40); }
.product-editor-check.is-ready > svg:first-child { color: var(--success); }
.product-editor-check span { min-width: 0; }
.product-editor-check strong,
.product-editor-check small { display: block; }
.product-editor-check strong { font-size: 10px; font-weight: 500; }
.product-editor-check small {
  margin-top: 1px; overflow: hidden; color: var(--ink-40); font-size: 8px;
  line-height: 1.35; text-overflow: ellipsis; white-space: nowrap;
}
.product-editor-shortcuts { display: flex; flex-direction: column; }
.product-editor-shortcuts > a {
  display: grid; grid-template-columns: 15px minmax(0, 1fr) 12px; align-items: center; gap: 8px;
  min-height: 43px; border-top: 1px solid var(--border-light);
  color: var(--ink-70); text-decoration: none;
}
.product-editor-shortcuts > a:hover { color: var(--ink-100); text-decoration: none; }
.product-editor-shortcuts svg { width: 13px; height: 13px; color: var(--ink-40); }
.product-editor-shortcuts svg:last-child { width: 10px; height: 10px; }
.product-editor-shortcuts span { min-width: 0; }
.product-editor-shortcuts strong,
.product-editor-shortcuts small { display: block; }
.product-editor-shortcuts strong { font-size: 10px; font-weight: 500; }
.product-editor-shortcuts small { margin-top: 1px; color: var(--ink-40); font-size: 8px; }
.product-editor-facts dl { display: flex; flex-direction: column; }
.product-editor-facts dl > div {
  display: grid; grid-template-columns: 1fr minmax(0, 1.4fr); gap: 12px;
  padding: 5px 0; font-size: 9px;
}
.product-editor-facts dt { color: var(--ink-40); }
.product-editor-facts dd {
  overflow: hidden; color: var(--ink-70); text-align: right;
  text-overflow: ellipsis; white-space: nowrap;
}
.product-editor-action-bar {
  position: fixed; right: 17px; bottom: 17px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: min(760px, calc(100vw - 330px)); min-height: 54px; padding: 10px 12px 10px 15px;
  border: 1px solid var(--border-med); border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-surface) 94%, transparent);
  box-shadow: var(--shadow-float); backdrop-filter: blur(14px);
}
.product-editor-save-state {
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink-40); font-size: 10px;
}
.product-editor-actions { display: flex; align-items: center; gap: 6px; }
.product-ai-dialog { max-width: 560px; overflow: hidden; }
.product-ai-dialog .modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border-light); }
.product-ai-dialog .modal-body { padding: 18px 20px; }
.product-ai-dialog .modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); background: var(--bg-subtle); }
.product-ai-dialog__title { display: flex; align-items: center; gap: 11px; }
.product-ai-dialog__title > span {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--radius-sm); background: var(--accent-dim); color: var(--accent);
}
.product-ai-dialog__title svg { width: 15px; height: 15px; }
.product-ai-dialog__title h2 {
  margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -.02em;
}
.product-ai-dialog__title p { margin-top: 3px; color: var(--ink-40); font-size: 9px; }
.product-ai-brief { min-height: 138px; }
.product-ai-instructions {
  margin-top: 14px; border: 1px solid var(--border-light); border-radius: var(--radius-sm);
}
.product-ai-instructions > summary {
  display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 10px;
  color: var(--ink-70); font-size: 10px; cursor: pointer; list-style: none;
}
.product-ai-instructions > summary::-webkit-details-marker { display: none; }
.product-ai-instructions > summary:hover { background: var(--bg-subtle); color: var(--ink-100); }
.product-ai-instructions > summary svg { width: 13px; height: 13px; color: var(--ink-40); }
.product-ai-instructions > .form-group {
  padding: 12px; border-top: 1px solid var(--border-light); background: var(--bg-subtle);
}
.product-ai-instructions textarea { background: var(--bg-surface); font-size: 9px; }
.product-ai-status:empty { display: none; }
.product-ai-status:not(:empty) { margin-top: 14px; }

/* Product editor — compact fCore workspaces */
.product-editor {
  padding-bottom: 18px;
}
.product-editor-layout {
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 18px;
}
.product-editor-main {
  gap: 12px;
}
.product-editor-section > .workspace-panel-header {
  min-height: 72px;
  padding: 14px 18px;
}
.product-editor-section > .workspace-panel-header h2 {
  font-size: 15px;
  letter-spacing: -.015em;
}
.product-editor-section > .workspace-panel-header p:last-child {
  margin-top: 3px;
  max-width: 72ch;
  font-size: 9px;
  line-height: 1.45;
}
.product-editor-section > .field-grid {
  padding: 16px 18px;
}
.product-editor-section > .field-grid > .form-group > .form-label {
  margin-bottom: 0;
}
.product-editor-section > .field-grid > .form-group > .field-label-row,
.product-editor-section > .field-grid > .form-group > .field-label-row .helper-link {
  line-height: 18px;
}
.product-editor-section .input--large {
  height: 36px;
  font-size: 13px;
}
.product-editor-section textarea.input {
  line-height: 1.55;
}
.product-editor-immutable > div {
  padding: 11px 18px;
}
.product-editor-action-bar {
  position: static;
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  box-shadow: none;
  backdrop-filter: none;
}
.product-editor-lifecycle {
  border-bottom: 0;
}
.product-editor-lifecycle__action {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--ink-70);
  font-size: 10px;
  text-decoration: none;
}
.product-editor-lifecycle__action:hover {
  color: var(--ink-100);
  text-decoration: none;
}
.product-editor-lifecycle__action + .product-editor-lifecycle__action {
  border-top: 1px solid var(--border-light);
}
.product-editor-lifecycle__action svg {
  width: 13px;
  height: 13px;
  color: var(--ink-40);
}
.product-editor-lifecycle__action.is-danger,
.product-editor-lifecycle__action.is-danger svg {
  color: var(--danger);
}

.product-editor-locale-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(68px, 1fr));
  padding: 3px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.product-editor-locale-tabs button {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  border: 0;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--ink-40);
  cursor: pointer;
  font: inherit;
}
.product-editor-locale-tabs button:hover {
  color: var(--ink-70);
}
.product-editor-locale-tabs button.is-active {
  background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--border-light), var(--shadow-sm);
  color: var(--ink-100);
}
.product-editor-locale-tabs span {
  font: 600 9px var(--font-mono);
  letter-spacing: .08em;
}
.product-editor-locale-tabs small {
  font-size: 8px;
}
.product-editor-locale-panel {
  max-width: 840px;
  padding: 16px 18px 18px;
}
.product-editor-locale-panel[hidden] {
  display: none;
}
.product-editor-locale-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.product-editor-locale-panel__head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.product-editor-locale-panel__head .panel-eyebrow {
  margin: 0;
}
.product-editor-locale-panel__head strong {
  font-size: 11px;
  font-weight: 500;
}
.product-editor-copy .form-group + .form-group {
  margin-top: 12px;
}
.product-editor-copy trix-toolbar {
  overflow: visible;
}
.product-editor-copy trix-toolbar .trix-button-row {
  flex-wrap: wrap;
  overflow: visible;
}
.product-editor-copy trix-toolbar .trix-button-group {
  margin-bottom: 3px;
}
.product-copy-editor {
  min-height: 164px;
  max-height: 280px;
  overflow-y: auto;
}
.product-copy-translation {
  min-height: 164px;
  max-height: 280px;
}
.product-editor-shared-title {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--ink-40);
}
.product-editor-shared-title > svg {
  width: 13px;
  height: 13px;
}
.product-editor-shared-title small,
.product-editor-shared-title strong {
  display: block;
}
.product-editor-shared-title small {
  font-size: 8px;
}
.product-editor-shared-title strong {
  margin-top: 2px;
  color: var(--ink-70);
  font-size: 10px;
  font-weight: 500;
}
.product-editor-translation-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.product-editor-translation-tools > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--ink-40);
  font-size: 9px;
}
.product-editor-translation-tools svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}
.product-editor-seo-details {
  margin-top: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}
.product-editor-seo-details > summary {
  display: grid;
  grid-template-columns: 14px 1fr 12px;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  color: var(--ink-70);
  cursor: pointer;
  font-size: 10px;
  list-style: none;
}
.product-editor-seo-details > summary::-webkit-details-marker {
  display: none;
}
.product-editor-seo-details > summary:hover {
  background: var(--bg-subtle);
}
.product-editor-seo-details > summary svg {
  width: 12px;
  height: 12px;
  color: var(--ink-40);
}
.product-editor-seo-details[open] > summary svg:last-child {
  transform: rotate(180deg);
}
.product-editor-seo-details > .field-grid {
  padding: 12px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.product-media-count {
  color: var(--ink-40);
  font-size: 9px;
  white-space: nowrap;
}
.product-media-block {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--border-light);
}
.product-media-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}
.product-media-block__head h3 {
  font-size: 11px;
  font-weight: 550;
}
.product-media-block__head p {
  margin-top: 3px;
  color: var(--ink-40);
  font-size: 8px;
  line-height: 1.45;
}
.product-artwork-layout {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 14px;
}
.product-cover-stage {
  min-width: 0;
}
.product-cover-stage > img,
.product-cover-stage__empty {
  width: 100%;
  aspect-ratio: 1;
  margin-top: 7px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.product-cover-stage > img {
  display: block;
  object-fit: cover;
}
.product-cover-stage__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--ink-40);
  text-align: center;
}
.product-cover-stage__empty svg {
  width: 21px;
  height: 21px;
}
.product-cover-stage__empty strong {
  color: var(--ink-70);
  font-size: 9px;
  font-weight: 500;
}
.product-cover-stage__empty span,
.product-cover-stage > small {
  color: var(--ink-40);
  font-size: 7px;
  line-height: 1.4;
}
.product-cover-stage > small {
  display: block;
  margin-top: 6px;
}
.product-artwork-gallery,
.product-artwork-previews {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 9px;
}
.product-artwork-previews {
  display: contents;
}
.product-artwork-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  transition: border-color .12s, opacity .12s;
}
.product-artwork-card.is-cover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border-med));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent);
}
.product-artwork-card.is-replacing {
  border-color: color-mix(in srgb, var(--warning) 55%, var(--border-med));
}
.product-artwork-card.is-removed {
  opacity: .52;
  background: var(--bg-subtle);
}
.product-artwork-card__preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
}
.product-artwork-card__preview > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.product-cover-radio {
  position: absolute;
  left: 7px;
  bottom: 7px;
  cursor: pointer;
}
.product-cover-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.product-cover-radio span,
.product-artwork-new-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  background: rgba(19, 22, 26, .78);
  color: #fff;
  backdrop-filter: blur(8px);
  font-size: 8px;
}
.product-cover-radio svg {
  width: 10px;
  height: 10px;
}
.product-artwork-card.is-cover .product-cover-radio span {
  background: var(--accent);
}
.product-artwork-new-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: var(--success);
}
.product-artwork-card__fields {
  padding: 9px;
}
.product-artwork-card__fields .form-label {
  margin-bottom: 4px;
  font-size: 8px;
}
.product-artwork-card__fields .input {
  height: 30px;
  font-size: 9px;
}
.product-artwork-card__meta {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--ink-40);
  font-size: 7px;
}
.product-artwork-card__meta span:first-child,
.product-artwork-filename {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-artwork-filename {
  display: block;
  font-size: 9px;
  font-weight: 500;
}
.product-media-row-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 7px;
}
.product-media-row-actions .btn {
  min-height: 25px;
}
.product-media-row-actions .btn svg {
  width: 11px;
  height: 11px;
}
.product-media-remove {
  color: var(--ink-40);
}
.product-media-remove:hover {
  background: var(--danger-bg);
  color: var(--danger);
}
.product-media-empty {
  grid-column: 1 / -1;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px dashed var(--border-med);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--ink-40);
  cursor: pointer;
  text-align: center;
  transition: border-color .12s, background-color .12s;
}
.product-media-empty:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.product-media-empty svg {
  width: 20px;
  height: 20px;
}
.product-media-empty strong {
  color: var(--ink-70);
  font-size: 10px;
  font-weight: 500;
}
.product-media-empty span {
  font-size: 8px;
}

.product-demo-list {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}
.product-demo-row {
  display: grid;
  grid-template-columns: 28px minmax(120px, 1fr) 75px auto;
  align-items: center;
  gap: 8px 9px;
  min-width: 0;
  padding: 10px;
  transition: opacity .12s, background-color .12s;
}
.product-demo-row + .product-demo-row {
  border-top: 1px solid var(--border-light);
}
.product-demo-row > audio {
  display: none;
}
.product-demo-row.is-removed {
  opacity: .48;
  background: var(--bg-subtle);
}
.product-demo-row.is-replacing {
  background: color-mix(in srgb, var(--warning-bg) 45%, var(--bg-surface));
}
.product-demo-play {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-med);
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--ink-70);
  cursor: pointer;
}
.product-demo-play:hover,
.product-demo-play.is-playing {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.product-demo-play svg {
  width: 11px;
  height: 11px;
}
.product-demo-play svg[hidden] {
  display: none;
}
.product-demo-progress {
  --progress: 0%;
  position: relative;
  height: 32px;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.product-demo-progress:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
.product-demo-waveform {
  position: absolute;
  inset: 2px 0;
  width: 100%;
  height: calc(100% - 4px);
  color: var(--ink-40);
  opacity: .58;
}
.product-demo-waveform path {
  fill: currentColor;
}
.product-demo-progress:hover .product-demo-waveform {
  opacity: .78;
}
.product-demo-waveform--played {
  color: var(--accent);
  opacity: 1;
  clip-path: inset(0 calc(100% - var(--progress)) 0 0);
}
.product-demo-waveform-status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  color: var(--ink-40);
  font-size: 6px;
  letter-spacing: .05em;
}
.product-demo-waveform-status[hidden] {
  display: none;
}
.product-demo-time {
  color: var(--ink-40);
  font-size: 7px;
  white-space: nowrap;
}
.product-demo-fields {
  grid-column: 1 / 4;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px;
  gap: 8px;
}
.product-demo-fields .form-label {
  margin-bottom: 3px;
  font-size: 8px;
}
.product-demo-fields .input {
  height: 29px;
  font-size: 9px;
}
.product-demo-file {
  grid-column: 4;
  grid-row: 2;
  min-width: 120px;
  max-width: 180px;
}
.product-demo-file span,
.product-demo-file small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-demo-file span {
  color: var(--ink-70);
  font-size: 7px;
}
.product-demo-file small {
  margin-top: 2px;
  color: var(--ink-40);
  font-size: 7px;
}
.product-demo-row > .product-media-row-actions {
  grid-column: 4;
  grid-row: 1;
  margin: 0;
  justify-content: flex-end;
}
.product-demo-replace span {
  max-width: 94px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-demo-new-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.product-demo-new-files[hidden] {
  display: none;
}
.product-demo-new-files > span {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  padding: 6px 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.product-demo-new-files svg {
  width: 11px;
  height: 11px;
  color: var(--ink-40);
}
.product-demo-new-files strong {
  overflow: hidden;
  font-size: 8px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-demo-new-files small {
  color: var(--success);
  font-size: 7px;
}

@media (max-width: 1180px) {
  .product-editor-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .product-artwork-gallery { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .product-editor-layout { grid-template-columns: 1fr; }
  .product-editor-inspector { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-editor-cover, .product-editor-readiness { border-right: 1px solid var(--border-light); }
  .product-editor-inspector__section { border-bottom: 0; }
}
@media (max-width: 760px) {
  .product-editor-copy-grid,
  .product-editor-seo-grid,
  .product-editor-immutable,
  .product-editor-inspector { grid-template-columns: 1fr; }
  .product-editor-locale:first-child { padding: 0 0 20px; }
  .product-editor-locale + .product-editor-locale {
    padding: 20px 0 0; border-top: 1px solid var(--border-light); border-left: 0;
  }
  .product-editor-immutable > div + div { border-top: 1px solid var(--border-light); border-left: 0; }
  .product-editor-collections { grid-template-columns: 1fr; }
  .product-editor-cover, .product-editor-readiness { border-right: 0; }
  .product-editor-inspector > section:not(:last-child) { border-bottom: 1px solid var(--border-light); }
  .product-artwork-layout { grid-template-columns: 120px minmax(0, 1fr); }
  .product-demo-row { grid-template-columns: 28px minmax(90px, 1fr) 70px; }
  .product-demo-row > .product-media-row-actions,
  .product-demo-file { grid-column: 1 / -1; }
  .product-demo-row > .product-media-row-actions { grid-row: 3; justify-content: flex-start; }
  .product-demo-file { grid-row: 4; max-width: none; }
}
@media (max-width: 560px) {
  .product-editor-section > .workspace-panel-header { align-items: stretch; flex-direction: column; }
  .product-editor-section > .workspace-panel-header .btn { width: 100%; }
  .product-editor-action-bar { align-items: stretch; flex-direction: column; }
  .product-editor-save-state { padding-left: 4px; }
  .product-editor-actions { width: 100%; }
  .product-editor-actions .btn { flex: 1; }
  .product-editor-locale-tabs { width: 100%; }
  .product-editor-translation-tools { align-items: stretch; flex-direction: column; }
  .product-artwork-layout { grid-template-columns: 1fr; }
  .product-cover-stage { max-width: 180px; }
  .product-artwork-gallery { grid-template-columns: 1fr; }
  .product-media-block__head { align-items: stretch; flex-direction: column; }
  .product-media-block__head .btn { width: 100%; }
}

/* Product detail page */
.detail-content { display: flex; flex-direction: column; gap: 16px; }
.meta-grid--4col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.meta-value { font-size: 13px; color: var(--ink-100); margin-top: 6px; }
.meta-value.t-mono { font-size: 12px; }
.panel-header-row { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); margin-bottom: 16px; }
.empty-state-inline { font-size: 13px; color: var(--ink-40); padding: 12px 0; }
.variant-inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.variant-inline-form-actions { display: flex; gap: 8px; padding-bottom: 1px; }
.variant-add-form { margin-top: 16px; padding: 16px 20px; background: var(--bg-subtle); border-radius: var(--radius-md); border: 1px solid var(--border-light); }
.data-table--compact thead th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-40); font-weight: 600; padding: 6px 12px; }
.data-table--compact td { padding: 7px 12px; font-size: 13px; }

/* ─── Trix / ActionText ──────────────────────────────── */

trix-toolbar {
  background: var(--bg-subtle);
  border-color: var(--border-light);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 4px 8px;
}
trix-toolbar .trix-button-group {
  border-color: var(--border-light);
  margin-bottom: 4px;
}
trix-toolbar .trix-button {
  border-bottom-color: var(--border-light);
  color: var(--ink-70);
}
trix-toolbar .trix-button:not(:disabled):hover { background: var(--border-light); }
trix-toolbar .trix-button.trix-active { background: var(--accent-dim); color: var(--accent); }
trix-toolbar .trix-button--icon::before { opacity: 0.55; }
trix-toolbar .trix-button--icon:not(:disabled):hover::before,
trix-toolbar .trix-button--icon.trix-active::before { opacity: 1; }

trix-editor {
  border-color: var(--border-med);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 10px 12px;
  min-height: 160px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--ink-100);
  line-height: 1.6;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
trix-editor:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 92, 214, 0.12);
}

/* ─── Orders ─────────────────────────────────────────── */

.orders-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.orders-metric { display: flex; flex-direction: column; gap: 4px; }
.metric-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-40); }
.metric-card-value { font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric-card-link { font-size: 11px; color: var(--accent); text-decoration: none; margin-top: 2px; }
.metric-card-link:hover { text-decoration: underline; }

.table-toolbar { margin-bottom: 16px; }
.table-toolbar-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Date Range Picker */
.drp-wrapper { position: relative; flex-shrink: 0; }
.drp-trigger { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; }
.drp-trigger i[data-lucide] { width: 14px; height: 14px; flex-shrink: 0; }
.drp-trigger--active { border-color: var(--ink-100); color: var(--ink-100); }

.drp-dropdown {
  position: fixed;
  z-index: 300;
  background: var(--bg-surface);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  display: flex;
  min-width: 660px;
}

.drp-presets {
  width: 164px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drp-preset-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--ink-70);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.drp-preset-btn:hover { background: var(--bg-subtle); color: var(--ink-100); }
.drp-preset-btn--active { background: var(--bg-subtle); color: var(--ink-100); font-weight: 500; }

.drp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drp-calendars { display: flex; gap: 0; padding: 16px 20px 12px; }
.drp-calendar { flex: 1; }
.drp-calendar + .drp-calendar { border-left: 1px solid var(--border-light); padding-left: 20px; margin-left: 4px; }

.drp-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.drp-cal-title { font-size: 13px; font-weight: 500; color: var(--ink-100); }
.drp-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  cursor: pointer;
  color: var(--ink-70);
  transition: background 0.1s, color 0.1s;
}
.drp-nav:hover { background: var(--bg-subtle); color: var(--ink-100); }
.drp-nav i[data-lucide] { width: 13px; height: 13px; pointer-events: none; }

.drp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 30px);
  gap: 1px 0;
}
.drp-dow {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-40);
  text-transform: uppercase;
}
.drp-day {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-70);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.1s, color 0.1s;
  position: relative;
}
.drp-day:hover:not(.drp-day--start):not(.drp-day--end):not(.drp-day--empty) {
  background: var(--bg-subtle);
  color: var(--ink-100);
}
.drp-day--empty { pointer-events: none; }
.drp-day--today { font-weight: 600; color: var(--ink-100); }
.drp-day--today::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--danger);
}
.drp-day--in-range {
  background: var(--bg-subtle);
  border-radius: 0;
  color: var(--ink-100);
}
.drp-day--start,
.drp-day--end {
  background: var(--ink-100);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 500;
  z-index: 1;
}
.drp-day--start.drp-day--in-range,
.drp-day--end.drp-day--in-range { border-radius: var(--radius-sm); }
.drp-day--today.drp-day--start::after,
.drp-day--today.drp-day--end::after { background: #fff; }

.drp-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
}
.drp-footer-icon { width: 14px; height: 14px; color: var(--ink-40); flex-shrink: 0; }
.drp-range-display { font-size: 13px; color: var(--ink-70); }
.drp-apply-btn { background: var(--ink-100); color: #fff; border-color: var(--ink-100); }
.drp-apply-btn:hover { background: #2a2a2a; border-color: #2a2a2a; }

/* Status Filter Dropdown */
.sf-wrapper { position: relative; flex-shrink: 0; }
.sf-trigger { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; }
.sf-trigger i[data-lucide] { width: 14px; height: 14px; flex-shrink: 0; }
.sf-trigger--active { border-color: var(--ink-100); color: var(--ink-100); }
.sf-dropdown {
  position: fixed;
  z-index: 300;
  background: var(--bg-surface);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  min-width: 160px;
  padding: 6px;
}
.sf-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--ink-70);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.sf-option:hover { background: var(--bg-subtle); color: var(--ink-100); }
.sf-option--active { background: var(--bg-subtle); color: var(--ink-100); font-weight: 500; }
.sf-option i[data-lucide],
.sf-option svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--ink-40); }
.sf-option--active i[data-lucide],
.sf-option--active svg { color: var(--ink-100); }
.sf-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

.order-row--action td:first-child { font-weight: 600; }
.sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.sort-link:hover { color: var(--ink-100); }
.sort-arrow { color: var(--ink-40); font-size: 10px; }
.th-sorted .sort-arrow { color: var(--accent); }
.th-sorted { color: var(--ink-100); }
.order-number-link { color: var(--ink-100); text-decoration: none; }
.order-number-link:hover { color: var(--accent); }

/* Status timeline */
.status-timeline-wrap { margin-bottom: 24px; }
.status-timeline { display: flex; align-items: flex-start; }
.status-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.status-step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-med); flex-shrink: 0; margin-top: 2px; }
.status-step.done .status-step-dot { background: var(--success); }
.status-step.active .status-step-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(47,92,214,0.15); }
.status-step-label { font-size: 11px; color: var(--ink-40); white-space: nowrap; }
.status-step.done .status-step-label { color: var(--success); }
.status-step.active .status-step-label { color: var(--accent); font-weight: 600; }
.status-connector { flex: 1; height: 1px; background: var(--border-light); margin-top: 7px; min-width: 40px; }
.status-connector.done { background: var(--success); }

/* Order layout */
.order-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.order-main { display: flex; flex-direction: column; gap: 16px; }
.order-aside { display: flex; flex-direction: column; gap: 16px; }

/* Order totals */
.order-totals { border-top: 1px solid var(--border-light); margin-top: 12px; padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.order-totals-row { display: flex; justify-content: space-between; font-size: 13px; }
.order-totals-final { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; padding-top: 8px; border-top: 1px solid var(--border-light); margin-top: 4px; }

/* Notes */
.notes-timeline { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.note-item { padding: 10px 12px; background: var(--bg-subtle); border-radius: var(--radius-sm); border-left: 2px solid var(--border-med); }
.note-body { font-size: 13px; color: var(--ink-100); line-height: 1.5; }
.note-meta { font-size: 11px; color: var(--ink-40); margin-top: 4px; }

/* Action form */
.action-form { display: flex; flex-direction: column; gap: 0; }
.action-form .form-group { margin-bottom: 10px; }
.action-form-footer { display: flex; gap: 8px; align-items: center; margin-top: 4px; }

/* Address */
.order-address { font-style: normal; font-size: 13px; line-height: 1.6; color: var(--ink-100); }

/* QR scanner modal */
.qr-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: flex; align-items: center; justify-content: center; }
.qr-modal-overlay[hidden] { display: none !important; }
.qr-modal { background: var(--bg-surface); border-radius: var(--radius-lg); padding: 20px; width: 360px; max-width: 90vw; box-shadow: var(--shadow-float); }
.qr-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.qr-modal-status { font-size: 12px; color: var(--ink-40); text-align: center; margin-top: 8px; }

/* ─── Storefront ─────────────────────────────────────── */

.sf-body { display: block; padding: 0; height: auto; min-height: 100vh; overflow: auto; background: #fff; }

.sf-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-light); }
.sf-header-inner { max-width: 1280px; margin: 0 auto; padding: 12px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sf-logo { font-size: 18px; font-weight: 600; color: var(--ink-100); text-decoration: none; letter-spacing: -0.02em; }
.sf-nav { display: flex; align-items: center; gap: 20px; width: 100%; }
.sf-nav-link { color: var(--ink-70); text-decoration: none; font-size: 13px; font-weight: 500; transition: color 0.15s; }
.sf-nav-link:hover { color: var(--ink-100); }
.sf-nav-cart { margin-left: auto; }
.sf-nav-cart svg { width: 18px; height: 18px; }

.sf-main { min-height: calc(100vh - 80px - 60px); }

.sf-footer { border-top: 1px solid var(--border-light); padding: 20px 24px; }
.sf-footer-inner { max-width: 1280px; margin: 0 auto; }
.sf-footer-copy { font-size: 13px; color: var(--ink-40); }

.sf-container { max-width: 1440px; margin: 0 auto; padding: 40px 48px; }

.sf-toast { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); border-radius: var(--radius-md); padding: 12px 20px; margin: 16px 24px 0; font-size: 14px; font-weight: 500; }

/* Hero */
.sf-hero { background: var(--bg-subtle); padding: 80px 0; }
.sf-hero .sf-container { padding-top: 0; padding-bottom: 0; }
.sf-hero-title { font-size: 48px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink-100); margin-bottom: 16px; }
.sf-hero-sub { font-size: 18px; color: var(--ink-70); margin-bottom: 32px; max-width: 640px; }

/* Buttons */
.sf-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: all 0.15s; white-space: nowrap; }
.sf-btn-primary { background: var(--ink-100); color: #fff; }
.sf-btn-primary:hover { background: #333; }
.sf-btn-secondary { background: var(--bg-subtle); color: var(--ink-100); border-color: var(--border-med); }
.sf-btn-secondary:hover { background: var(--border-light); }
.sf-btn-ghost { background: transparent; color: var(--ink-70); }
.sf-btn-ghost:hover { color: var(--ink-100); }
.sf-btn-full { width: 100%; justify-content: center; }
.sf-btn-sm { padding: 6px 12px; font-size: 13px; }
.sf-btn-lg { padding: 14px 28px; font-size: 16px; }

/* Section */
.sf-section { padding: 60px 0; border-top: 1px solid var(--border-light); }
.sf-section:first-of-type { border-top: none; }
.sf-section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; }
.sf-section-title { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 32px; }
.sf-section-header .sf-section-title { margin-bottom: 0; }
.sf-link { font-size: 14px; color: var(--ink-70); text-decoration: none; }
.sf-link:hover { color: var(--ink-100); }

/* Store picker */
.sf-stores-picker { max-width: 600px; }
.sf-stores-title { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 32px; }
.sf-stores-grid { display: flex; flex-direction: column; gap: 12px; }
.sf-store-card { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border: 1px solid var(--border-med); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink-100); transition: all 0.15s; background: var(--bg-surface); }
.sf-store-card:hover { border-color: var(--border-dark); background: var(--bg-subtle); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border-dark) 24%, transparent); }

/* ---- Labels / suppliers ---- */
.label-admin-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start; gap: 20px;
}
.label-inspector { position: sticky; top: 0; min-width: 0; }
.label-inspector-card { padding: 0; overflow: hidden; border-color: var(--border-med); box-shadow: var(--shadow-sm); }
.label-inspector-card > .workspace-panel-header { padding: 17px 18px; border-bottom: 1px solid var(--border-light); }
.label-form { display: flex; flex-direction: column; gap: 13px; padding: 18px; }
.label-toolbar { grid-template-columns: minmax(240px, 1fr) 150px auto; }
.label-status-select { width: 150px; }
.label-directory-panel { padding: 0; overflow: hidden; }
.label-directory-panel > .workspace-panel-header { margin: 0; padding: 18px 20px; }
.label-directory-panel .table-scroll { padding: 0 10px 10px; }
.label-table th:first-child, .label-table td:first-child { min-width: 220px; }
.label-table tbody tr.is-selected { background: var(--accent-dim); }
.label-name-link { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-100); text-decoration: none; }
.label-name-link:hover { color: var(--ink-100); text-decoration: none; }
.label-name-link > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.label-name-link strong { font-size: 12px; font-weight: 500; }
.label-name-link small { max-width: 190px; overflow: hidden; color: var(--ink-40); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.label-monogram {
  width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center;
  overflow: hidden; border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  background: var(--bg-subtle); color: var(--ink-70); font-family: var(--font-mono);
  font-size: 9px; font-weight: 600; letter-spacing: .02em;
}
.label-monogram.is-large { width: 52px; height: 52px; flex-basis: 52px; border-radius: var(--radius-md); font-size: 12px; }
.label-monogram.has-image { background: var(--bg-surface); }
.label-monogram img { width: 100%; height: 100%; display: block; object-fit: contain; }
.label-state {
  display: inline-flex; align-items: center; gap: 6px; color: var(--success);
  font-size: 10px; font-weight: 500;
}
.label-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.label-state.is-inactive { color: var(--ink-40); }
.label-logo-field { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 11px; }
.label-logo-field .input--file { width: 100%; }
.label-remove-logo, .label-active-toggle {
  display: inline-flex; align-items: center; gap: 7px; color: var(--ink-70); font-size: 11px;
}
.label-remove-logo input, .label-active-toggle input { accent-color: var(--ink-100); }
.label-danger-zone {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 14px 18px; border-top: 1px solid var(--border-light); background: var(--bg-subtle);
}
.label-danger-zone strong { display: block; font-size: 11px; font-weight: 500; }
.label-danger-zone p { max-width: 190px; margin-top: 2px; color: var(--ink-40); font-size: 9px; line-height: 1.45; }
.label-danger-zone form { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.label-merge-zone form { min-width: 145px; }
.btn-full { width: 100%; }

.label-profile-identity {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center; gap: 18px; padding: 20px;
}
.label-profile-logo {
  width: 72px; height: 72px; display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--border-med); border-radius: var(--radius-md); background: var(--bg-subtle);
  color: var(--ink-70); font-family: var(--font-mono); font-size: 16px; font-weight: 600;
}
.label-profile-logo.has-image { background: var(--bg-surface); }
.label-profile-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.label-profile-heading { min-width: 0; }
.label-profile-heading > div { display: flex; align-items: center; gap: 12px; }
.label-profile-heading h2 { font-size: 18px; font-weight: 560; letter-spacing: -.025em; }
.label-profile-heading p {
  max-width: 720px; margin-top: 7px; color: var(--ink-40); font-size: 11px; line-height: 1.55;
}
.label-profile-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.label-profile-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start; gap: 20px;
}
.label-profile-catalog { padding: 0; overflow: hidden; }
.label-profile-catalog > .workspace-panel-header { margin: 0; padding: 18px 20px; }
.label-profile-catalog .table-scroll { padding: 0 10px 10px; }
.label-products-table th:first-child, .label-products-table td:first-child { min-width: 230px; }
.label-product-link { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-100); text-decoration: none; }
.label-product-link:hover { color: var(--ink-100); text-decoration: none; }
.label-product-link > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.label-product-link strong { max-width: 260px; overflow: hidden; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.label-product-link small { max-width: 260px; overflow: hidden; color: var(--ink-40); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.label-product-cover {
  width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; overflow: hidden;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm);
  background: var(--bg-subtle); color: var(--ink-70);
}
.label-product-cover.has-image { background: var(--bg-surface); }
.label-product-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.label-product-cover svg { width: 13px; height: 13px; stroke-width: 1.7; }
.label-product-date { color: var(--ink-40); white-space: nowrap; }
.label-profile-sidebar { min-width: 0; }
.label-profile-card { padding: 0; overflow: hidden; }
.label-profile-card > .workspace-panel-header { margin: 0; padding: 16px 18px; }
.label-detail-row {
  display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px;
  padding: 11px 18px; border-top: 1px solid var(--border-light); font-size: 10px;
}
.label-detail-row > span { color: var(--ink-40); }
.label-detail-row strong, .label-detail-row a {
  min-width: 0; overflow: hidden; color: var(--ink-100); font-weight: 500; text-align: right; text-overflow: ellipsis; white-space: nowrap;
}
.label-detail-row a:hover { color: var(--accent); text-decoration: none; }
.label-profile-notes { padding: 15px 18px 18px; border-top: 1px solid var(--border-light); color: var(--ink-70); font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.label-profile-notes.is-empty { color: var(--ink-40); }
.label-profile-empty { min-height: 230px; }

@media (max-width: 1050px) {
  .label-admin-layout { grid-template-columns: 1fr; }
  .label-inspector { position: static; }
  .label-profile-layout { grid-template-columns: 1fr; }
  .label-profile-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .label-profile-identity { grid-template-columns: 56px minmax(0, 1fr); }
  .label-profile-logo { width: 56px; height: 56px; }
  .label-profile-identity > .kind-chip { display: none; }
  .label-profile-heading > div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .label-profile-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .label-profile-sidebar { grid-template-columns: 1fr; }
}

.sf-preview-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 24px;
  color: #17140c;
  background: #f4cf65;
  border-bottom: 1px solid #c39c34;
  box-shadow: 0 5px 18px rgb(23 20 12 / 12%);
}

.sf-preview-banner > svg { width: 18px; height: 18px; flex: 0 0 auto; }
.sf-preview-banner div { display: grid; gap: 1px; }
.sf-preview-banner strong { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.sf-preview-banner span { font-size: 11px; opacity: .72; }

.sf-preview-purchase-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid var(--border-med);
  border-radius: var(--radius-md);
  color: var(--ink-70);
  background: var(--bg-subtle);
  font-size: 13px;
}

.sf-preview-purchase-lock > svg { width: 16px; height: 16px; }

.import-localization {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.import-localization__actions {
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.import-localization__editor-heading { min-height: 22px; }
.sf-store-card-icon { width: 44px; height: 44px; background: var(--bg-subtle); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sf-store-card-icon svg { width: 20px; height: 20px; color: var(--ink-70); }
.sf-store-card-body { flex: 1; }
.sf-store-card-name { font-size: 16px; font-weight: 600; }
.sf-store-card-currency { font-size: 13px; color: var(--ink-40); margin-top: 2px; font-family: var(--font-mono); }
.sf-store-card-arrow { color: var(--ink-40); }
.sf-store-card-arrow svg { width: 18px; height: 18px; }

/* Collections grid */
.sf-collections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.sf-collection-card { display: flex; align-items: center; justify-content: space-between; padding: 20px; border: 1px solid var(--border-med); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink-100); background: var(--bg-surface); transition: all 0.15s; }
.sf-collection-card:hover { border-color: var(--border-dark); box-shadow: var(--shadow-md); }
.sf-collection-card-name { font-size: 15px; font-weight: 600; }
.sf-collection-card-count { font-size: 12px; color: var(--ink-40); margin-top: 4px; display: block; }
.sf-collection-card-arrow svg { width: 16px; height: 16px; color: var(--ink-40); }

/* Product grid */
.sf-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.sf-product-card { text-decoration: none; color: var(--ink-100); display: block; }
.sf-product-card:hover .sf-product-card-image { border-color: var(--border-dark); }
.sf-product-card-image { aspect-ratio: 1; background: var(--bg-subtle); border-radius: var(--radius-lg); border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; transition: border-color 0.15s; overflow: hidden; }
.sf-product-placeholder-icon svg { width: 36px; height: 36px; color: var(--ink-10); stroke-width: 1; }
.sf-product-placeholder-icon-lg svg { width: 64px; height: 64px; color: var(--ink-10); stroke-width: 1; }
.sf-product-card-type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-40); margin-bottom: 4px; }
.sf-product-card-title { font-size: 14px; font-weight: 500; margin-bottom: 6px; line-height: 1.3; }
.sf-price { font-size: 14px; font-weight: 500; font-family: var(--font-mono); color: var(--ink-100); }

/* Page header */
.sf-page-header { margin-bottom: 32px; }
.sf-page-title { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.sf-page-meta { font-size: 14px; color: var(--ink-40); }
.sf-page-description { font-size: 16px; color: var(--ink-70); margin-top: 8px; }

/* Empty state */
.sf-empty { text-align: center; padding: 80px 40px; color: var(--ink-40); }
.sf-empty-icon svg { width: 48px; height: 48px; margin: 0 auto 16px; display: block; }
.sf-empty p { font-size: 16px; margin-bottom: 24px; }

/* Product detail */
.sf-product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 768px) { .sf-product-detail-grid { grid-template-columns: 1fr; } }
.sf-product-image-placeholder { aspect-ratio: 1; background: var(--bg-subtle); border: 1px solid var(--border-light); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; }
.sf-product-detail-type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-40); margin-bottom: 8px; }
.sf-product-detail-title { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.sf-product-detail-vendor { font-size: 14px; color: var(--ink-40); margin-bottom: 20px; }
.sf-product-detail-description { font-size: 15px; line-height: 1.65; color: var(--ink-70); margin-bottom: 24px; }
.sf-product-detail-price { margin-bottom: 24px; }
.sf-price-lg { font-size: 24px; font-weight: 600; font-family: var(--font-mono); }
.sf-add-to-cart-form .sf-btn { margin-top: 4px; }
.sf-variant-selector { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.sf-variant-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--border-med); border-radius: var(--radius-md); }
.sf-variant-info { display: flex; gap: 16px; align-items: center; }
.sf-variant-title { font-size: 14px; font-weight: 500; }
.sf-variant-price { font-size: 14px; font-family: var(--font-mono); color: var(--ink-70); }
.sf-variant-oos { font-size: 12px; color: var(--danger); }
.sf-product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.sf-tag { font-size: 12px; padding: 3px 10px; background: var(--bg-subtle); border-radius: 20px; color: var(--ink-70); }

/* Cart */
.sf-cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
@media (max-width: 900px) { .sf-cart-layout { grid-template-columns: 1fr; } }
.sf-cart-items { display: flex; flex-direction: column; gap: 16px; }
.sf-cart-item { display: grid; grid-template-columns: 72px 1fr auto auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.sf-cart-item-image { width: 72px; height: 72px; background: var(--bg-subtle); border: 1px solid var(--border-light); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sf-cart-item-title { font-size: 14px; font-weight: 500; }
.sf-cart-item-variant { font-size: 13px; color: var(--ink-40); margin-top: 2px; }
.sf-cart-item-price { font-size: 13px; color: var(--ink-70); font-family: var(--font-mono); margin-top: 4px; }
.sf-cart-item-actions { display: flex; align-items: center; gap: 8px; }
.sf-qty-controls { display: flex; align-items: center; gap: 0; border: 1px solid var(--border-med); border-radius: var(--radius-md); overflow: hidden; }
.sf-qty-btn { width: 32px; height: 32px; border: none; background: var(--bg-subtle); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: background 0.1s; }
.sf-qty-btn:hover { background: var(--border-light); }
.sf-qty-value { width: 36px; text-align: center; font-size: 14px; font-weight: 500; }
.sf-cart-remove { width: 32px; height: 32px; border: none; background: none; cursor: pointer; color: var(--ink-40); display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); transition: color 0.1s, background 0.1s; }
.sf-cart-remove:hover { color: var(--danger); background: var(--danger-bg); }
.sf-cart-remove svg { width: 15px; height: 15px; }
.sf-cart-item-total { font-size: 14px; font-weight: 600; font-family: var(--font-mono); min-width: 80px; text-align: right; }
.sf-cart-summary-card { background: var(--bg-subtle); border: 1px solid var(--border-med); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 80px; }
.sf-cart-summary-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.sf-cart-summary-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-70); }
.sf-cart-summary-shipping { color: var(--ink-40); }
.sf-cart-summary-divider { height: 1px; background: var(--border-med); margin: 4px 0; }
.sf-cart-summary-total { font-size: 15px; font-weight: 600; color: var(--ink-100); }
.sf-text-muted { color: var(--ink-40); }

/* Checkout */
.sf-checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 48px; align-items: start; }
@media (max-width: 900px) { .sf-checkout-layout { grid-template-columns: 1fr; } }
.sf-form-section { margin-bottom: 32px; }
.sf-form-section-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.sf-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.sf-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sf-label { font-size: 13px; font-weight: 500; color: var(--ink-70); }
.sf-input { height: 40px; border: 1px solid var(--border-med); border-radius: var(--radius-md); padding: 0 12px; font-size: 14px; font-family: var(--font-sans); color: var(--ink-100); background: var(--bg-surface); transition: border-color 0.15s; outline: none; }
.sf-input:focus { border-color: var(--ink-100); }
.sf-checkout-item { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 8px 0; font-size: 13px; }
.sf-checkout-item-info { display: flex; flex-direction: column; gap: 2px; }
.sf-checkout-item-name { font-weight: 500; }
.sf-checkout-item-variant { color: var(--ink-40); }
.sf-checkout-item-qty { color: var(--ink-40); }
.sf-checkout-item-price { font-family: var(--font-mono); font-weight: 500; white-space: nowrap; }

/* Order confirmation */
.sf-order-confirmation { max-width: 640px; margin: 0 auto; }
.sf-confirmation-header { text-align: center; padding: 48px 0 40px; }
.sf-confirmation-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; background: var(--success-bg); border-radius: 50%; margin-bottom: 20px; }
.sf-confirmation-icon svg { width: 36px; height: 36px; color: var(--success); }
.sf-confirmation-title { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.sf-confirmation-sub { font-size: 16px; color: var(--ink-70); }
.sf-order-number { font-size: 14px; color: var(--ink-40); font-family: var(--font-mono); margin-top: 8px; }
.sf-confirmation-body { border-top: 1px solid var(--border-light); }
.sf-confirmation-section { padding: 32px 0; border-bottom: 1px solid var(--border-light); }
.sf-confirmation-section-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.sf-confirmation-item { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.sf-confirmation-item-info { display: flex; flex-direction: column; gap: 2px; }
.sf-confirmation-item-title { font-weight: 500; }
.sf-confirmation-item-qty { font-size: 13px; color: var(--ink-40); }
.sf-confirmation-item-price { font-family: var(--font-mono); font-weight: 500; }
.sf-confirmation-total { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--border-light); font-size: 15px; font-weight: 600; }
.sf-address-block p { font-size: 14px; line-height: 1.7; color: var(--ink-70); }
.sf-confirmation-actions { padding: 32px 0; text-align: center; }

/* ── Bulk select ─────────────────────────────────────────────────────────── */
.th-check, .td-check { width: 40px; padding: 0 4px 0 16px !important; }
.th-check input, .td-check input { cursor: pointer; accent-color: var(--accent); width: 15px; height: 15px; }
tr:has(.bulk-check-row:checked) td { background: var(--accent-dim, #EFF4FF); }

.bulk-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--ink-100);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px -4px rgba(0,0,0,.35);
  z-index: 200;
  white-space: nowrap;
  animation: bulk-bar-in .15s ease;
}
@keyframes bulk-bar-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.bulk-bar-count { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.55); padding: 0 6px; }
.bulk-bar-divider { width: 1px; height: 16px; background: rgba(255,255,255,.15); margin: 0 4px; }
.bulk-bar-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .1s;
}
.bulk-bar-btn:hover { background: rgba(255,255,255,.12); }
.bulk-bar-btn--danger { color: #ff8a8a; }
.bulk-bar-btn--danger:hover { background: rgba(239,68,68,.2); }
/* ===== Sample content pipeline (admin) ===== */
.upload-dropzone.is-dragover,
.sample-upload-target.is-dragover { border-color: var(--accent); background: var(--accent-dim); }
.upload-progress { display: flex; flex-direction: column; gap: 6px; }
.upload-row { display: grid; grid-template-columns: 1fr 120px 64px; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-70); }
.upload-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-row-track { height: 5px; background: var(--bg-subtle); border-radius: 100px; overflow: hidden; }
.upload-row-bar { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.upload-row-state { font-family: var(--font-mono); font-size: 11px; color: var(--ink-40); text-align: right; }
.upload-row[data-state="done"] .upload-row-state { color: var(--success); }
.upload-row[data-state="error"] .upload-row-state { color: var(--danger); }

.sample-library-subtitle { margin-top: 7px; color: var(--ink-40); font-size: 12px; }
.sample-library-stack { display: flex; flex-direction: column; gap: 16px; }

.sample-library-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 28px;
}
.sample-library-entry__identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sample-library-entry__identity h2 { margin: 0 0 3px; font-size: 14px; font-weight: 500; letter-spacing: -.015em; }
.sample-library-entry__identity p:not(.panel-eyebrow) { color: var(--ink-40); font-size: 12px; }
.sample-library-entry__icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px;
  border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-subtle); color: var(--ink-70);
}
.sample-library-entry__icon svg { width: 18px; height: 18px; stroke-width: 1.75; }
.sample-library-entry__metrics { display: flex; align-items: center; }
.sample-library-entry__metrics div { min-width: 66px; padding: 0 16px; border-left: 1px solid var(--border-light); }
.sample-library-entry__metrics dt {
  color: var(--ink-40); font-size: 9px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.sample-library-entry__metrics dd {
  margin-top: 4px; color: var(--ink-100); font-family: var(--font-mono); font-size: 15px; letter-spacing: -.03em;
}

.sample-library-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface);
}
.sample-summary-metric {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 10px;
  min-height: 72px; padding: 13px 16px; border-right: 1px solid var(--border-light);
}
.sample-summary-metric:last-child { border-right: 0; }
.sample-summary-metric > svg { width: 17px; height: 17px; color: var(--ink-40); stroke-width: 1.75; }
.sample-summary-metric > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 3px 10px; min-width: 0; }
.sample-summary-label {
  grid-column: 1 / -1; color: var(--ink-40); font-size: 9px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.sample-summary-value { color: var(--ink-100); font-size: 19px; line-height: 1; letter-spacing: -.04em; font-weight: 500; }
.sample-summary-metric small { overflow: hidden; color: var(--ink-40); font-size: 9px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }

.sample-upload-panel { padding: 0; overflow: hidden; }
.sample-upload-target {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  min-height: 82px; padding: 15px 18px; cursor: pointer; transition: background .15s, border-color .15s;
}
.sample-upload-target:hover { background: var(--bg-subtle); }
.sample-upload-icon {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px dashed var(--border-dark); border-radius: var(--radius-md); color: var(--ink-40); background: var(--bg-surface);
}
.sample-upload-icon svg { width: 18px; height: 18px; stroke-width: 1.75; }
.sample-upload-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sample-upload-copy strong { color: var(--ink-100); font-size: 12px; font-weight: 500; }
.sample-upload-copy span { overflow: hidden; color: var(--ink-40); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sample-upload-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.sample-upload-progress:empty { display: none; }
.sample-upload-progress { padding: 12px 18px; border-top: 1px solid var(--border-light); }
.sample-upload-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 52px; padding: 9px 18px; border-top: 1px solid var(--border-light); background: var(--bg-subtle);
}
.sample-upload-footer p { display: flex; align-items: center; gap: 7px; color: var(--ink-40); font-size: 10px; }
.sample-upload-footer p svg { width: 13px; height: 13px; }

.sample-publish-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 13px 16px; border: 1px solid color-mix(in srgb, var(--success) 24%, var(--border-light));
  border-radius: var(--radius-md); background: var(--success-bg);
}
.sample-publish-bar > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sample-publish-bar p { color: var(--ink-70); font-size: 11px; }

.sample-status { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-70); font-size: 10px; white-space: nowrap; }
.sample-status-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--ink-40); }
.sample-status-dot--success { background: var(--success); box-shadow: 0 0 0 2px color-mix(in srgb, var(--success) 16%, transparent); }
.sample-status-dot--warning { background: var(--warning); }
.sample-status-dot--danger { background: var(--danger); }
.sample-status-dot--neutral { background: var(--ink-40); }

.sample-library-panel { padding: 0; overflow: hidden; }
.sample-library-panel__header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 18px 20px; border-bottom: 1px solid var(--border-light);
}
.sample-library-panel__header h2 { margin: 0 0 3px; font-size: 14px; line-height: 1.3; font-weight: 500; letter-spacing: -.015em; }
.sample-library-panel__header p:not(.panel-eyebrow) { color: var(--ink-40); font-size: 10px; }
.sample-library-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.sample-inline-search {
  position: relative; display: flex; align-items: center; width: min(260px, 28vw); height: 32px;
  border: 1px solid var(--border-med); border-radius: var(--radius-sm); background: var(--bg-surface);
  transition: border-color .12s, box-shadow .12s;
}
.sample-inline-search:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}
.sample-inline-search > svg {
  position: absolute; left: 9px; width: 13px; height: 13px; color: var(--ink-40); pointer-events: none;
}
.sample-inline-search input {
  width: 100%; height: 100%; padding: 0 30px; border: 0; outline: 0; background: transparent;
  color: var(--ink-100); font: 11px var(--font-sans);
}
.sample-inline-search input::placeholder { color: var(--ink-40); }
.sample-inline-search__clear {
  position: absolute; right: 5px; display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: var(--radius-sm); color: var(--ink-40); transition: background .12s, color .12s;
}
.sample-inline-search__clear:hover { background: var(--bg-subtle); color: var(--ink-100); }
.sample-inline-search__clear svg { width: 12px; height: 12px; }
.sample-analyze-button { white-space: nowrap; }
.sample-library-count { color: var(--ink-40); font-size: 10px; white-space: nowrap; }
.sample-processing-progress {
  width: 150px; display: grid; grid-template-columns: 1fr; justify-items: end; gap: 6px;
}
.sample-processing-progress .progress-track { width: 100%; height: 4px; }
.sample-processing-progress span { color: var(--ink-40); font-size: 9px; }
.sample-pagination {
  min-height: 58px; display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 12px 18px; border-top: 1px solid var(--border-light);
}
.sample-pagination__position { min-width: 92px; color: var(--ink-40); font-size: 10px; text-align: center; }
.sample-pagination .is-disabled { opacity: .45; pointer-events: none; }
.sample-library-columns,
.sample-record-summary {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(180px, 1fr) minmax(120px, .65fr) minmax(120px, .7fr) 92px 18px;
  align-items: center; gap: 14px;
}
.sample-library-columns {
  min-height: 34px; padding: 0 16px; border-bottom: 1px solid var(--border-med); background: var(--bg-subtle);
  color: var(--ink-40); font-size: 9px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.sample-sort-header {
  display: inline-flex; align-items: center; gap: 5px; width: max-content; color: inherit;
  transition: color .12s;
}
.sample-sort-header:hover,
.sample-sort-header.is-active { color: var(--ink-100); }
.sample-sort-header svg { width: 10px; height: 10px; opacity: 0; stroke-width: 2; }
.sample-sort-header:hover svg,
.sample-sort-header.is-active svg { opacity: 1; }
.sample-record { border-bottom: 1px solid var(--border-light); }
.sample-record:last-child { border-bottom: 0; }
.sample-record > summary { list-style: none; }
.sample-record > summary::-webkit-details-marker { display: none; }
.sample-record-summary {
  min-height: 62px; padding: 9px 16px; cursor: pointer; transition: background .12s;
}
.sample-record-summary:hover { background: var(--row-hover); }
.sample-record[open] > .sample-record-summary { background: var(--bg-subtle); border-bottom: 1px solid var(--border-light); }
.sample-record-chevron { width: 14px; height: 14px; color: var(--ink-40); transition: transform .15s; }
.sample-record[open] .sample-record-chevron { transform: rotate(180deg); }
.sample-virtual-list { position: relative; min-height: 124px; }
.sample-virtual-list__viewport { position: relative; contain: layout style; }
.sample-virtual-list__spacer { width: 1px; min-height: 1px; pointer-events: none; }
.sample-virtual-list__items { position: absolute; inset: 0 0 auto; }
.sample-virtual-row {
  position: absolute; inset: 0 0 auto; width: 100%; height: 62px; min-height: 62px;
  background: var(--bg-surface); will-change: transform; contain: strict;
}
.sample-virtual-row:hover { background: var(--row-hover); }
.sample-virtual-row.is-playing { background: color-mix(in srgb, var(--accent-dim) 44%, var(--bg-surface)); }
.sample-virtual-row.is-playing .sample-preview-play { display: none; }
.sample-virtual-row.is-playing .sample-preview-stop { display: inline-flex; }
.sample-virtual-row.is-playing .sample-preview-button {
  border-color: var(--ink-100); background: var(--ink-100); color: var(--bg-surface);
}
.sample-virtual-row.has-audio-error .sample-preview-button {
  border-color: var(--danger); color: var(--danger); background: var(--danger-bg);
}
.sample-row-open {
  width: 24px; height: 24px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-40);
  cursor: pointer; transition: color .12s, background-color .12s;
}
.sample-row-open:hover { color: var(--ink-100); background: var(--bg-subtle); }
.sample-row-open svg { width: 13px; height: 13px; }
.sample-virtual-list__loading {
  position: absolute; inset: 34px 0 0; min-height: 90px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg-surface); color: var(--ink-40); font: 10px var(--font-mono);
}
.sample-virtual-list__loading[hidden] { display: none; }
.sample-virtual-list__loading svg { width: 14px; height: 14px; animation: spin .8s linear infinite; }
.sample-virtual-list__loading.is-error { color: var(--danger); }
.sample-virtual-list__loading.is-error svg { animation: none; }
.sample-editor-modal {
  position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--ink-100) 28%, transparent); backdrop-filter: blur(3px);
}
.sample-editor-modal[hidden] { display: none; }
.sample-editor-modal__dialog {
  width: min(980px, 100%); max-height: min(820px, calc(100vh - 48px)); overflow: auto;
  border: 1px solid var(--border-med); border-radius: var(--radius-lg);
  background: var(--bg-surface); box-shadow: var(--shadow-float);
}
.sample-editor-modal__header {
  position: sticky; top: 0; z-index: 2; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px 18px; border-bottom: 1px solid var(--border-light); background: var(--bg-surface);
}
.sample-editor-modal__header .panel-eyebrow { margin-bottom: 2px; }
.sample-editor-modal__header strong { display: block; font-size: 13px; font-weight: 600; }
.sample-editor-modal__header .icon-btn { display: grid; place-items: center; }
.sample-record-editor-shell { min-height: 72px; }
.sample-record-editor-loading {
  min-height: 72px; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--ink-40); font: 10px var(--font-mono);
}
.sample-record-editor-loading svg { width: 14px; height: 14px; animation: spin .8s linear infinite; }

.sample-preview { display: grid; grid-template-columns: 24px minmax(72px, 1fr); align-items: center; gap: 8px; min-width: 0; }
.sample-preview audio { display: none; }
.sample-preview-button {
  display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: 1px solid var(--border-med); border-radius: var(--radius-sm); background: var(--bg-surface);
  color: var(--ink-70); cursor: pointer; transition: border-color .12s, background .12s, color .12s;
}
.sample-preview-button:hover { border-color: var(--border-dark); background: var(--bg-subtle); color: var(--ink-100); }
.sample-preview-button:focus:not(:focus-visible),
.sample-preview-wave:focus:not(:focus-visible) { outline: none; }
.sample-preview-button:focus-visible,
.sample-preview-wave:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sample-preview-button svg { width: 11px; height: 11px; stroke-width: 2; }
.sample-preview-stop { display: none; width: 9px !important; height: 9px !important; }
.sample-preview[data-playing="true"] .sample-preview-play { display: none; }
.sample-preview[data-playing="true"] .sample-preview-stop { display: block; }
.sample-preview[data-playing="true"] .sample-preview-button { border-color: var(--ink-100); background: var(--ink-100); color: var(--bg-surface); }
.sample-preview[data-audio-error="true"] .sample-preview-button {
  border-color: var(--danger); color: var(--danger); background: var(--danger-bg);
}
.sample-preview-error {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.sample-preview-wave {
  width: 100%; height: 28px; min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
}
.sample-preview-wave .iqs-wave { position: relative; display: block; width: 100%; height: 28px; }
.sample-preview-wave .iqs-wave svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.sample-preview-wave .iqs-wave-base { fill: var(--border-dark); opacity: .62; }
.sample-preview-wave:hover .iqs-wave-base { fill: var(--ink-40); opacity: .78; }
.sample-preview-wave .iqs-wave-fill {
  fill: var(--accent); clip-path: inset(0 calc(100% - var(--wave-progress, 0%)) 0 0);
}
.sample-preview-wave .iqs-wave-empty {
  height: 28px; border-radius: 2px; opacity: .5;
  background: repeating-linear-gradient(90deg, var(--border-med) 0 2px, transparent 2px 5px);
}
.sample-preview--disabled .sample-preview-button { cursor: default; color: var(--ink-40); background: var(--bg-subtle); }
.sample-preview--disabled .sample-preview-wave { cursor: default; }

.sample-record-identity,
.sample-record-musical { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sample-record-identity strong,
.sample-record-musical strong {
  overflow: hidden; color: var(--ink-100); font-size: 11px; font-weight: 500; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap;
}
.sample-record-identity span,
.sample-record-musical span { overflow: hidden; color: var(--ink-40); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sample-record-tags { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.sample-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-surface);
  color: var(--ink-70); font-size: 9px; white-space: nowrap;
}
.sample-tag--more { color: var(--ink-40); background: var(--bg-subtle); }
.sample-cell-empty { color: var(--ink-40); font-size: 9px; }

.sample-record-editor { padding: 18px 20px; background: var(--bg-surface); }
.sample-analysis {
  margin-bottom: 16px; overflow: hidden; border: 1px solid var(--border-light);
  border-radius: var(--radius-md); background: var(--bg-subtle);
}
.sample-analysis__heading {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 50px; padding: 10px 12px; border-bottom: 1px solid var(--border-light);
}
.sample-analysis__heading > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px; min-width: 0; }
.sample-analysis__heading .panel-eyebrow { grid-column: 1 / -1; margin: 0; }
.sample-analysis__heading strong { color: var(--ink-100); font-size: 11px; font-weight: 500; }
.sample-analysis__heading > div > span { overflow: hidden; color: var(--ink-40); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sample-analysis__grid { display: grid; grid-template-columns: .65fr .5fr .65fr 1fr 1.2fr; }
.sample-analysis-cell {
  display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 58px; padding: 10px 12px;
  border-right: 1px solid var(--border-light);
}
.sample-analysis-cell:last-child { border-right: 0; }
.sample-analysis-cell > span {
  color: var(--ink-40); font-size: 8px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.sample-analysis-cell strong {
  overflow: hidden; color: var(--ink-100); font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap;
}
.sample-analysis-cell small { color: var(--ink-40); font: 8px var(--font-mono); white-space: nowrap; }
.sample-analysis__pending { display: flex; align-items: center; gap: 8px; padding: 11px 12px; color: var(--ink-40); font-size: 10px; }
.sample-analysis__pending svg { width: 13px; height: 13px; }
.sample-edit-form { display: grid; grid-template-columns: 1.5fr repeat(5, minmax(72px, .65fr)); gap: 12px; }
.sample-edit-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sample-edit-field > span {
  color: var(--ink-40); font-size: 9px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
}
.sample-edit-field .input { width: 100%; height: 32px; font-size: 11px; }
.sample-field--wide { grid-column: span 3; }
.sample-edit-submit { display: flex; align-items: flex-end; justify-content: flex-end; grid-column: span 3; }
.sample-record-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--border-light);
}
.sample-record-actions > div:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sample-record-id { overflow: hidden; color: var(--ink-40); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sample-record-index-note { overflow: hidden; color: var(--ink-40); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sample-record-buttons { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.sample-record-buttons form { margin: 0; }
.sample-replacement-form { display: inline-flex; }
.sample-replace-button { position: relative; overflow: hidden; cursor: pointer; }
.sample-replacement-input {
  position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none;
}
.sample-delete-button { color: var(--danger); }
.sample-delete-button:hover { background: var(--danger-bg); color: var(--danger); }

@media (max-width: 1160px) {
  .sample-library-columns,
  .sample-record-summary { grid-template-columns: minmax(140px, .9fr) minmax(170px, 1fr) minmax(110px, .65fr) 84px 18px; }
  .sample-library-columns > :nth-child(4),
  .sample-record-summary > :nth-child(4) { display: none; }
  .sample-edit-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sample-field--name { grid-column: span 2; }
  .sample-field--wide { grid-column: span 3; }
  .sample-edit-submit { grid-column: span 3; }
  .sample-analysis__grid { grid-template-columns: repeat(3, 1fr); }
  .sample-analysis-cell:nth-child(3) { border-right: 0; }
  .sample-analysis-cell:nth-child(n+4) { border-top: 1px solid var(--border-light); }
  .sample-library-panel__header { align-items: stretch; flex-direction: column; }
  .sample-library-tools { justify-content: flex-start; flex-wrap: wrap; }
  .sample-inline-search { width: min(360px, 100%); }
}

@media (max-width: 820px) {
  .sample-library-entry { grid-template-columns: 1fr auto; }
  .sample-library-entry__metrics { grid-column: 1 / -1; order: 3; border-top: 1px solid var(--border-light); padding-top: 14px; }
  .sample-library-entry__metrics div:first-child { padding-left: 0; border-left: 0; }
  .sample-library-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sample-summary-metric:nth-child(2) { border-right: 0; }
  .sample-summary-metric:nth-child(-n+2) { border-bottom: 1px solid var(--border-light); }
  .sample-library-columns { display: none; }
  .sample-record-summary {
    grid-template-columns: minmax(120px, .8fr) minmax(170px, 1fr) 84px 18px;
    min-height: 68px;
  }
  .sample-record-summary > :nth-child(3),
  .sample-record-summary > :nth-child(4) { display: none; }
  .sample-upload-target { grid-template-columns: 38px minmax(0, 1fr); }
  .sample-upload-choose { display: none; }
}

@media (max-width: 560px) {
  .sample-library-entry { grid-template-columns: 1fr; }
  .sample-library-entry > .btn { width: 100%; }
  .sample-library-entry__metrics { grid-column: auto; }
  .sample-library-summary { grid-template-columns: 1fr 1fr; }
  .sample-summary-metric { grid-template-columns: 22px minmax(0, 1fr); padding: 12px; }
  .sample-upload-target { grid-template-columns: 32px minmax(0, 1fr); min-height: 72px; padding: 12px; }
  .sample-upload-icon { width: 32px; height: 32px; }
  .sample-upload-copy span { white-space: normal; }
  .sample-upload-footer { align-items: stretch; flex-direction: column; }
  .sample-upload-footer .btn { width: 100%; }
  .sample-publish-bar { align-items: stretch; flex-direction: column; }
  .sample-publish-bar > div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .sample-publish-bar .btn { width: 100%; }
  .sample-record-summary { grid-template-columns: minmax(96px, .8fr) minmax(120px, 1fr) 18px; gap: 10px; padding-inline: 12px; }
  .sample-record-summary > :nth-child(5) { display: none; }
  .sample-preview { grid-template-columns: 24px minmax(58px, 1fr); gap: 6px; }
  .sample-record-editor { padding: 16px 12px; }
  .sample-analysis__grid { grid-template-columns: 1fr 1fr; }
  .sample-analysis-cell { border-top: 1px solid var(--border-light); }
  .sample-analysis-cell:nth-child(even) { border-right: 0; }
  .sample-analysis-cell:first-child,
  .sample-analysis-cell:nth-child(2) { border-top: 0; }
  .sample-analysis__heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .sample-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sample-field--name, .sample-field--wide, .sample-edit-submit { grid-column: span 2; }
  .sample-edit-submit .btn { width: 100%; }
  .sample-record-actions { align-items: stretch; flex-direction: column; }
  .sample-record-buttons { justify-content: flex-start; }
}

.secure-file-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border-med);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--ink-70);
  font-size: 13px;
  line-height: 1.5;
}
.secure-file-notice .btn { flex: 0 0 auto; }

/* ===== Managed genres & styles ===== */
.genre-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}
.genre-inspector { position: sticky; top: 0; min-width: 0; }
.genre-inspector-card { padding: 0; overflow: hidden; border-color: var(--border-med); box-shadow: var(--shadow-sm); }
.genre-inspector-card > .workspace-panel-header { padding: 17px 18px; border-bottom: 1px solid var(--border-light); }
.genre-toolbar { margin-bottom: 0; }
.genre-toolbar .catalog-search { flex: 1; width: auto; }
.genre-status-select { width: 142px; height: 32px; }
.genre-tree-panel { padding: 0; overflow: hidden; }
.genre-tree-panel > .workspace-panel-header { padding: 18px 20px; border-bottom: 1px solid var(--border-light); }
.genre-empty { min-height: 260px; }
.genre-tree { display: flex; flex-direction: column; }
.genre-tree-group { border-bottom: 1px solid var(--border-light); }
.genre-tree-group:last-child { border-bottom: 0; }
.genre-tree-group > summary {
  min-height: 48px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto 84px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
}
.genre-tree-group > summary::-webkit-details-marker { display: none; }
.genre-tree-group > summary:hover { background: var(--row-hover); }
.genre-tree-chevron { width: 13px; height: 13px; color: var(--ink-40); transition: transform .1s ease; }
.genre-tree-group[open] .genre-tree-chevron { transform: rotate(90deg); }
.genre-tree-name { overflow: hidden; color: var(--ink-100); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.genre-tree-name:hover { color: var(--accent); text-decoration: none; }
.genre-status {
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border-light));
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.genre-status.is-inactive { border-color: var(--border-light); background: var(--bg-subtle); color: var(--ink-40); }
.genre-count { color: var(--ink-40); font-size: 9px; text-align: right; }
.genre-tree-children { margin: 0 14px 10px 30px; border-left: 1px solid var(--border-med); }
.genre-tree-child,
.genre-tree-add {
  min-height: 35px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 70px 24px;
  align-items: center;
  gap: 7px;
  margin-left: -1px;
  padding: 0 10px;
  border-left: 1px solid transparent;
  color: var(--ink-70);
}
.genre-tree-child:hover,
.genre-tree-child.is-selected { border-left-color: var(--accent); background: var(--accent-dim); color: var(--ink-100); text-decoration: none; }
.genre-tree-child svg,
.genre-tree-add svg { width: 12px; height: 12px; color: var(--ink-40); }
.genre-tree-child small { color: var(--ink-40); font-size: 9px; }
.genre-tree-child .t-mono { color: var(--ink-40); font-size: 9px; text-align: right; }
.genre-tree-add { grid-template-columns: 16px 1fr; color: var(--ink-40); font-size: 10px; }
.genre-tree-add:hover { color: var(--accent); text-decoration: none; }
.genre-ranking th:first-child,
.genre-ranking td:first-child { width: 44px; color: var(--ink-40); }
.genre-form { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.genre-form .field-grid { gap: 10px; }
.genre-active-toggle {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-70);
  font-size: 10px;
}
.genre-active-toggle input { accent-color: var(--accent); }
.genre-danger-zone {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-top: 1px solid var(--border-light);
}
.genre-danger-zone strong { display: block; font-size: 11px; font-weight: 500; }
.genre-danger-zone p { max-width: 190px; margin-top: 2px; color: var(--ink-40); font-size: 9px; line-height: 1.45; }
.genre-danger-zone form { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.genre-merge-zone { background: var(--bg-subtle); }
.genre-merge-zone select { width: 144px; height: 30px; font-size: 10px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { cursor: not-allowed; opacity: .42; }

@media (max-width: 1100px) {
  .genre-admin-layout { grid-template-columns: 1fr; }
  .genre-inspector { position: static; }
}

@media (max-width: 700px) {
  .genre-summary { grid-template-columns: repeat(2, 1fr); }
  .genre-summary > div:nth-child(2) { border-right: 0; }
  .genre-toolbar { align-items: stretch; flex-direction: column; }
  .genre-toolbar .catalog-search, .genre-status-select { width: 100%; }
  .genre-tree-group > summary { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .genre-count { display: none; }
}

.product-genres-panel { padding: 0; overflow: hidden; }
.product-genres-panel > .workspace-panel-header { padding: 18px 20px; border-bottom: 1px solid var(--border-light); }
.genre-assignment-group { padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.genre-assignment-group > .form-label { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.genre-assignment-group > .form-label em {
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 8px;
  font-style: normal;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.genre-assignment-group > .form-label small { color: var(--ink-40); font-size: 9px; font-weight: 400; }
.genre-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.genre-choice {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.genre-choice:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 45%, var(--border-light)); background: var(--accent-dim); }
.genre-choice input, .genre-chip-choices input { accent-color: var(--accent); }
.genre-choice strong { display: block; font-size: 11px; font-weight: 500; }
.genre-choice small { display: block; margin-top: 1px; color: var(--ink-40); font-size: 8px; }
.genre-chip-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.genre-chip-choices label { cursor: pointer; }
.genre-chip-choices input { position: absolute; opacity: 0; pointer-events: none; }
.genre-chip-choices span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  color: var(--ink-70);
  font-size: 10px;
}
.genre-chip-choices span small { color: var(--ink-40); font-size: 8px; }
.genre-chip-choices input:checked + span { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.genre-inline-create { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 16px 20px; background: var(--bg-subtle); }
.genre-inline-create .helper-text { grid-column: 1 / -1; margin: -3px 0 0; }
.genre-assignment-empty { display: flex; align-items: flex-start; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.genre-assignment-empty svg { width: 15px; height: 15px; color: var(--ink-40); }
.genre-assignment-empty strong { display: block; font-size: 11px; font-weight: 500; }
.genre-assignment-empty p { margin-top: 2px; color: var(--ink-40); font-size: 9px; }

@media (max-width: 760px) {
  .genre-choice-grid { grid-template-columns: 1fr; }
  .genre-inline-create { grid-template-columns: 1fr; }
}

.catalog-genre-select { width: 150px; height: 32px; font-size: 10px; }
.catalog-genre-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.catalog-genre-more { align-self: center; color: var(--ink-40); font-size: 9px; }
.import-genre-review { padding: 14px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.import-genre-review > .field-label-row { align-items: flex-start; margin-bottom: 10px; }
.import-genre-review > .field-label-row a { color: var(--ink-40); font-size: 9px; }
.import-genre-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.import-subgenres { margin-top: 9px; }
.import-genre-create { margin-top: 12px; }

@media (max-width: 760px) {
  .import-genre-grid { grid-template-columns: 1fr; }
  .catalog-genre-select { width: 100%; }
}
