/* Wantable Create — Global Styles */

/* x-cloak removed — Alpine.js fully replaced with Stimulus */

/* ── Layout ── */
/* Sidebar is LIGHT (cream) in the 2026 redesign — nav-link colors are tuned for
   a light background (muted ink text, sage active state). */
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: #6B7168;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;      /* never wrap a nav label to a 2nd line */
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link:hover {
  background: #EEF1EC;
  color: #1E1E1E;
}

.nav-link.active {
  background: #57695B;
  color: #ffffff;
  border-left-color: #45514A;
}

.nav-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.65;
}

.nav-link.active .nav-icon { opacity: 1; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #A8A399;
  padding: 3px 6px;
  margin-top: 12px;
  margin-bottom: 2px;
}

/* ── Collapsible nav section buttons (production parity) ── */
.nav-section-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 3px 6px;
  margin-top: 8px;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #8B9080;
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 4px;
  transition: color 0.15s;
}
.nav-section-btn:hover { color: #57695B; }
.nav-section-btn .chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.nav-section-btn.collapsed .chevron { transform: rotate(-90deg); }

/* ── Nav badge pills ── */
.nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 9999px;
  padding: 1px 5px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
  flex-shrink: 0;
}
.nav-badge-red   { background: #A8503F; color: white; }
.nav-badge-amber { background: #B8863B; color: white; }
.nav-badge-slate { background: #565C54; color: #CDC9C0; }
.nav-badge-sage  { background: #E4EADE; color: #3F4A3A; }

/* ── Saved-filter sub-links (P9 Catalog spine: indented child of a nav item) ── */
.nav-link--sub { padding-left: 34px; font-size: 12.5px; }
.nav-badge-comingsoon { background: #45514A; color: #A8A399; font-size: 9px; letter-spacing: 0.03em; text-transform: uppercase; }

/* ── Disabled / "Coming Soon" nav items (beta sections shown but not selectable) ── */
.nav-section--disabled .nav-section-btn { cursor: default; opacity: 0.55; }
.nav-section--disabled .nav-section-btn:hover { color: inherit; }
.nav-link--disabled {
  display: flex;
  align-items: center;
  cursor: not-allowed;
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
.nav-link--disabled .nav-icon { opacity: 0.6; }

/* ══ Sidebar shell + collapse-to-icons (2026 redesign) ══════════════════════
   The sidebar is a light cream rail. Default width 232px (fits the longest label,
   "Wantable Enrichment", on one line alongside its badge). It can collapse to a
   60px icon-only rail via the app-shell Stimulus controller (persisted in
   localStorage). Collapse state lives as `.sidebar-collapsed` on the app-shell
   root (the flex wrapper), so descendant selectors below drive the whole rail. */
.app-sidebar{
  width: 232px;
  background: #FAF9F7;
  border-right: 1px solid #E4E2DC;
  transition: width 0.18s ease, transform 0.3s ease;
}

/* Collapse toggle button sits flush like a nav-link */
.app-sidebar__collapse-btn{
  background: transparent; border: none; cursor: pointer; text-align: left;
  font-family: inherit;
}
.app-sidebar__collapse-icon{ transition: transform 0.18s ease; }

/* ── Collapsed (icon-only) mode ── desktop only (lg+). On mobile the sidebar is
   an off-canvas drawer, so collapse doesn't apply there. */
@media (min-width: 1024px){
  .sidebar-collapsed .app-sidebar{ width: 60px; }

  /* Hide every text label. Labels are bare text nodes on the nav links, so we
     zero the link font-size (collapses the text) and restore the icon explicitly. */
  .sidebar-collapsed .app-sidebar .nav-link{
    font-size: 0;
    justify-content: center;
    padding-left: 0; padding-right: 0;
    gap: 0;
    border-left-color: transparent;
  }
  .sidebar-collapsed .app-sidebar .nav-icon{ width: 18px; height: 18px; }
  .sidebar-collapsed .app-sidebar .nav-badge{ display: none; }

  /* Section header buttons → thin dividers in collapsed mode (hide the label
     entirely; the icon groups below are self-evident and get hover tooltips). */
  .sidebar-collapsed .app-sidebar .nav-section-btn{
    height: 1px; padding: 0; margin: 10px 12px; overflow: hidden;
    border-top: 1px solid #E4E2DC; border-radius: 0; pointer-events: none;
  }
  .sidebar-collapsed .app-sidebar .nav-section-btn > span,
  .sidebar-collapsed .app-sidebar .nav-section-btn .chevron{ display: none; }

  /* Force all nav items visible in collapsed mode, even if the user had a section
     collapsed (the section toggle is disabled while collapsed). */
  .sidebar-collapsed .app-sidebar [data-nav-section-items]{ display: block !important; }

  /* Logo → just the mark; hide the wordmark block */
  .sidebar-collapsed .app-sidebar__logo{ justify-content: center; padding-left: 0; padding-right: 0; }
  .sidebar-collapsed .app-sidebar__brand{ display: none; }

  /* Collapse-btn: hide "Collapse" word, flip the chevron to point right */
  .sidebar-collapsed .app-sidebar__label{ display: none; }
  .sidebar-collapsed .app-sidebar__collapse-icon{ transform: rotate(180deg); }

  /* Tooltip on hover in collapsed mode — uses the link's title attr via a JS-set
     data-tip is unavailable on bare-text links, so we render the native title.
     For richer styling we show a CSS tooltip from the accessible title mirror. */
  .sidebar-collapsed .app-sidebar .nav-link{ position: relative; }
  .sidebar-collapsed .app-sidebar .nav-link:hover::after{
    content: attr(title);
    position: absolute; left: 54px; top: 50%; transform: translateY(-50%);
    background: #1E1E1E; color: #fff; font-size: 11.5px; font-weight: 500;
    padding: 5px 9px; border-radius: 6px; white-space: nowrap; z-index: 60;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18); pointer-events: none;
  }
}

/* ══ Universal bulk-select (library grids) ══════════════════════════════════
   Shared floating bar + card selection styling used by every library index that
   opts into the bulk_select mixin (poses, scenes, flatlays, models, looks,
   products, prompts, overlays). Sage palette, matches the image-manager flash. */
.bulk-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 50;
  background: #2E332C; color: #fff; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(30,30,30,0.28);
  padding: 12px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: calc(100vw - 32px);
}
.bulk-bar.hidden { display: none; }
.bulk-bar__count { font-size: 13px; font-weight: 600; }
.bulk-bar__spacer { width: 8px; }
.bulk-bar__select {
  background: #45514A; color: #fff; border: 1px solid #565C54; border-radius: 8px;
  font-size: 12px; padding: 0 10px; height: 32px; box-sizing: border-box;
}
.bulk-bar__btn {
  background: #45514A; color: #fff; border: none; border-radius: 8px;
  font-size: 12px; font-weight: 600; padding: 6px 12px; cursor: pointer;
  transition: background 0.15s;
}
.bulk-bar__btn:hover { background: #565C54; }
.bulk-bar__btn--danger { background: #A8503F; }
.bulk-bar__btn--danger:hover { background: #8A4133; }

/* Card selection affordance — a round check that appears top-left on hover, and
   stays visible when selected. Host cards must be position:relative (most already
   are via .pose-card/.scene-card/etc.; the mixin only appends the button). */
[data-bulk-id] { position: relative; }
.bulk-check {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  width: 22px; height: 22px; border-radius: 999px;
  border: 2px solid #fff; background: rgba(30,30,30,0.35);
  cursor: pointer; opacity: 0; transition: opacity 0.15s, background 0.15s;
  display: flex; align-items: center; justify-content: center;
}
[data-bulk-id]:hover .bulk-check { opacity: 1; }
.bulk-check::before { content: ""; position: absolute; inset: -11px; border-radius: 999px; } /* 44px hit area, 22px visual */
.bulk-check.on { opacity: 1; background: #57695B; border-color: #57695B; }
.bulk-check.on::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.bulk-active .bulk-check { opacity: 1; }
.bulk-bar__banner { flex: 1 0 100%; font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid #45514A; }
.bulk-bar__banner.hidden { display: none; }
.bulk-bar__banner button { background: none; border: none; color: #C2D6C6; font-size: 12px; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; }
.bulk-bar__banner button:hover { color: #fff; }
.bulk-bar input[type=date].bulk-bar__select { height: 32px; color-scheme: dark; }
.bulk-bar__due { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #C2D6C6; }
.bulk-active { padding-bottom: 96px; }
@media (max-width: 480px) { .bulk-bar { width: calc(100vw - 16px); max-width: none; bottom: 8px; } }
.bulk-bar select.bulk-bar__select, .bulk-bar__btn { height: 32px; }
.bulk-bar:has(.bulk-bar__banner) { max-width: min(760px, calc(100vw - 32px)); }
.bulk-selected { outline: 2px solid #57695B; outline-offset: 1px; border-radius: 12px; }

/* ── Cards ── */
.card {
  background: white;
  border-radius: 10px;
  border: 1px solid #E4E2DC;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(30,30,30,0.05);
}

.card-sm { padding: 16px; }

.stat-card {
  background: white;
  border-radius: 10px;
  border: 1px solid #E4E2DC;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(30,30,30,0.05);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-xs { font-size: 11px; padding: 1px 5px; }

/* ── Editorial Audit responsive title truncation ──
   The product-title cell truncates to a width that grows with viewport, so the
   grid stays single-line (no row stacking) on smaller screens. JIT-independent
   (defined here, not via arbitrary Tailwind classes that don't always compile
   from HAML under Tailwind v4). */
.editorial-title {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 1024px) { .editorial-title { max-width: 220px; } }
@media (min-width: 1280px) { .editorial-title { max-width: 320px; } }

/* ── Status pills (DESIGN.md pill system) ──
   One low-chroma pill set used across audit/status surfaces. Mirrors the
   DESIGN.md pill-* tokens (success / attention / problem / neutral). Distinct
   from .badge (brand/type tags) so status reads consistently everywhere. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  width: fit-content;
}
.pill-success   { background: #E8EFE7; color: #3F5A46; }
.pill-attention { background: #F5EFE2; color: #7E5A1E; }
.pill-problem   { background: #F5E6E2; color: #8E4335; }
.pill-neutral   { background: #F7F5F2; color: #6B7168; }

/* Imagery Status checklist icon (catalog detail drawer). Small filled circle with
   a check / dot / x; color set inline per requirement state. */
.imgstat-ico {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* Status badges — mapped to the restrained 3-tone system (gold=attention,
   green=success, clay=problem) so they harmonize with the sage shell. */
.badge-pending     { background: #F7F1E4; color: #96692D; }
.badge-generating  { background: #F7F1E4; color: #96692D; }
.badge-review      { background: #F7F1E4; color: #96692D; }
.badge-approved    { background: #EDF3EE; color: #416448; }
.badge-published   { background: #EDF3EE; color: #354F3A; }
.badge-declined    { background: #F7EAE6; color: #8A4133; }
.badge-error       { background: #A8503F; color: #ffffff; }
.src-img-broken    { display: flex; align-items: center; justify-content: center; }
.src-img-broken::after { content: "⚠ image unavailable"; font-size: 9px; color: #8A4133; text-align: center; padding: 4px; line-height: 1.2; }
.badge-uploaded    { background: #EEF1EC; color: #45514A; }
.badge-default     { background: #EFEDE7; color: #565C54; }

/* Semantic status badge aliases (match .pill-* palette but badge-sized) */
.badge-success     { background: #EDF3EE; color: #416448; }
.badge-attention   { background: #F7F1E4; color: #96692D; }
.badge-problem     { background: #F7EAE6; color: #8A4133; }
.badge-neutral     { background: #F7F5F2; color: #6B7168; }

/* Store/brand badges — kept lightly distinct but within-family (sage vs gold)
   instead of the old blue/violet/amber rainbow. */
.badge-seas        { background: #EEF1EC; color: #45514A; }
.badge-interval    { background: #F7F1E4; color: #96692D; }
.badge-wantable    { background: #EFEDE7; color: #565C54; }

/* Composition / image-type badges (Asset Library card + detail "Type" pill).
   Base .badge has no background, so a bare `badge` rendered transparent/unstyled.
   Unified to a calm sage-family scheme — the LABEL carries the type; the pill no
   longer introduces 10 competing hues. Subtle tint variation (sage / soft-gold /
   soft-green / soft-clay) keeps types visually groupable without a rainbow. */
.badge-type        { background: #EFEDE7; color: #45514A; }
.badge-type-flat_lay        { background: #EEF1EC; color: #45514A; }
.badge-type-ghost_mannequin { background: #EEF1EC; color: #607264; }
.badge-type-editorial       { background: #EFEDE7; color: #565C54; }
.badge-type-ecomm           { background: #EDF3EE; color: #416448; }
.badge-type-on_figure       { background: #EDF3EE; color: #354F3A; }
.badge-type-on_hanger       { background: #F7F1E4; color: #96692D; }
.badge-type-bts             { background: #F7F1E4; color: #785323; }
.badge-type-swatch          { background: #EEF1EC; color: #7C8B7F; }
.badge-type-video           { background: #F7EAE6; color: #8A4133; }
.badge-type-video_clip      { background: #F7EAE6; color: #8A4133; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  min-height: 32px;     /* ONE 32px control height (DESIGN.md); buttons match .input/.select */
  box-sizing: border-box;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-sm   { padding: 0 10px; min-height: 32px; font-size: 12px; }
.btn-xs   { padding: 0 10px; min-height: 32px; font-size: 12px; white-space: nowrap; }   /* ONE 32px control height: xs kept as an alias so existing markup stays valid */

.btn-primary   { background: #57695B; color: white; }
.btn-primary:hover { background: #45514A; }

.btn-warning   { background: #8F6A2A; color: white; }   /* darkened for AA contrast (#8F6A2A ≥ 4.9:1 on white) */
.btn-warning:hover { background: #7E5A1E; }

.btn-secondary { background: #F1EFEA; color: #45514A; border-color: #E4E2DC; }
.btn-secondary:hover { background: #E4E2DC; }

.btn-ghost     { background: transparent; color: #6B7168; }
.btn-ghost:hover { background: #F1EFEA; }

.btn-purple    { background: #8F6A2A; color: white; }   /* alias of btn-warning; gold, NOT purple */
.btn-purple:hover { background: #7E5A1E; }

.btn-danger    { background: #A8503F; color: white; }
.btn-danger:hover { background: #8E4335; }

/* Outline variants — bordered, white-fill action buttons used on card footers
   (e.g. Archive / Delete on Looks + Campaign cards). Use these instead of
   hand-rolling `border border-slate-200 text-slate-500 hover:bg-slate-50`. */
.btn-outline        { background: #fff; color: #6B7168; border-color: #E4E2DC; }
.btn-outline:hover  { background: #F7F5F2; color: #45514A; }
.btn-outline-danger        { background: #fff; color: #A8503F; border-color: #E4C4BC; }
.btn-outline-danger:hover  { background: #FBEFEC; color: #8E4335; }

/* ── Form inputs ── */
.input {
  padding: 7px 10px;
  border: 1px solid #E4E2DC;
  border-radius: 7px;
  font-size: 13px;
  background: white;
  transition: border-color 0.15s;
  width: 100%;
  height: 32px;         /* canonical 32px control height — DESIGN.md load-bearing rule */
  box-sizing: border-box;
}

/* The 32px rule is for single-line controls; multiline fields size to their rows. */
textarea.input {
  height: auto;
  min-height: 64px;
  line-height: 1.45;
  resize: vertical;
}

.input:focus {
  outline: none;
  border-color: #57695B;
  box-shadow: 0 0 0 3px rgba(87,105,91,0.12);
}

.input-sm { padding: 5px 8px; font-size: 12px; height: 32px; box-sizing: border-box; }

.select {
  padding: 7px 10px;
  border: 1px solid #E4E2DC;
  border-radius: 7px;
  font-size: 13px;
  background: white;
  height: 32px;         /* canonical 32px control height — matches .input */
  box-sizing: border-box;
}

/* One select look everywhere: native <select> gets the same chevron the custom
   dropdown buttons (button.select) draw with an svg, so they sit identically. */
select.select, select.bulk-bar__select {
  -webkit-appearance: none; appearance: none;
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
  padding-right: 30px; text-overflow: ellipsis; white-space: nowrap;
}
select.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8A399' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); }
select.bulk-bar__select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C2D6C6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); }
button.select { text-align: left; }

.select-sm { padding: 5px 8px; font-size: 12px; height: 32px; box-sizing: border-box; }

/* ── Utilities ── */
.fade-in {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Affiliate Portal ── */
.affiliate-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #EFEDE7;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ══════════════════════════════════════════════════════════════
   Split-Screen Auth Layout — merch.wantable.com inspired
   ══════════════════════════════════════════════════════════════ */

/* Accent color — sage (unified brand, matches the dashboard + affiliate portal).
   Was terracotta #57695B (merch-inspired) before the 2026 sage redesign. */
:root {
  --accent: #57695B;
  --accent-dark: #45514A;
}

.auth-body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

/* Full-screen split */
.auth-split-layout {
  display: flex;
  min-height: 100vh;
}

/* ── LEFT panel: lifestyle image ── */
.auth-split-left {
  flex: 0 0 60%;
  position: relative;
  background-color: #1a1a1a;
  /* auth-hero.jpg was never shipped (404). Gradient stands alone until a brand
     lifestyle photo is added back here as the first background-image layer. */
  background-image:
    linear-gradient(160deg, #1a1412 0%, #2d1f18 30%, #1e1a2e 70%, #0f1520 100%);
  background-size: cover;
  background-position: center top;
  overflow: hidden;
}

/* Full-bleed editorial mosaic (login/auth left panel) */
.auth-mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0;
  z-index: 1;
}
.auth-mosaic__tile { position: relative; overflow: hidden; background: #222; }
.auth-mosaic__tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-split-left--admin .auth-mosaic__tile img { filter: grayscale(1) contrast(1.04) brightness(.94); }

/* Vignette behind the brand text (bottom-left), keeps copy legible over any image */
.auth-split-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 0% 100%, rgba(10,8,6,.82) 0%, rgba(10,8,6,.45) 30%, rgba(10,8,6,0) 62%),
    linear-gradient(0deg, rgba(10,8,6,.55) 0%, rgba(10,8,6,0) 34%);
}
.auth-split-left--admin .auth-split-overlay {
  background:
    radial-gradient(120% 90% at 0% 100%, rgba(4,4,6,.9) 0%, rgba(4,4,6,.5) 30%, rgba(4,4,6,0) 64%),
    linear-gradient(0deg, rgba(4,4,6,.62) 0%, rgba(4,4,6,0) 36%);
}

/* Text at bottom-left of image */
.auth-split-text {
  position: absolute;
  bottom: 48px;
  left: 48px;
  right: 48px;
  z-index: 10;
}

.auth-brand-mark {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}

.brand-wantable {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.brand-create {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.auth-brand-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.80);
  line-height: 1.55;
  max-width: 440px;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* ── RIGHT panel: form ── */
.auth-split-right {
  flex: 0 0 40%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.auth-form-container {
  width: 100%;
  max-width: 380px;
}

/* ── Form heading ── */
.auth-heading {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: #1E1E1E;
  letter-spacing: -0.3px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.auth-heading .brand-create { font-size: 24px; }
/* On the white form side, "Wantable" must be dark (it's white for the dark image overlay). */
.auth-heading .brand-wantable { color: #1E1E1E; text-shadow: none; }
.auth-heading .brand-create { text-shadow: none; }

.auth-subtext {
  font-size: 14px;
  color: #6B7168;
  margin: 0 0 28px;
  line-height: 1.5;
}

/* ── Auth form inputs ── */
.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #45514A;
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.auth-input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #E4E2DC;
  border-radius: 8px;
  font-size: 14px;
  color: #1E1E1E;
  background: #F7F5F2;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(87, 105, 91, 0.14);
  background: #fff;
}

/* ── Primary submit button ── */
.auth-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  background: #1E1E1E;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.auth-btn-primary:hover {
  background: #222;
  transform: translateY(-1px);
}

/* ── Google SSO button ── */
.auth-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  background: #1E1E1E;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}

.auth-btn-google:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #CDC9C0;
  font-size: 12px;
  color: #A8A399;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E4E2DC;
}

/* ── Flash messages ── */
.auth-flash {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  font-weight: 500;
}

.auth-flash--notice, .auth-flash--success {
  background: #EDF3EE;
  color: #354F3A;
  border: 1px solid #C2D6C6;
}

.auth-flash--alert, .auth-flash--error {
  background: #F7EAE6;
  color: #6E3428;
  border: 1px solid #E4BEB2;
}

/* ── Auxiliary links ── */
.auth-aux-link {
  font-size: 13px;
  color: #6B7168;
  text-align: center;
  margin-top: 20px;
}

.auth-aux-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-aux-link a:hover { text-decoration: underline; }

.auth-note {
  font-size: 12px;
  color: #A8A399;
  text-align: center;
  margin-top: 12px;
}

.auth-field-group { margin-bottom: 16px; }

/* ── Login "keep me signed in" + forgot-password row ── */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -4px 0 18px;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #6B7168;
  cursor: pointer;
}
.auth-check input { width: 15px; height: 15px; accent-color: var(--accent); }
.auth-forgot {
  font-size: 12.5px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.auth-forgot:hover { text-decoration: underline; }

/* ── Responsive: stack on mobile ── */
@media (max-width: 820px) {
  .auth-split-layout { flex-direction: column; }
  /* Mosaic as a clean hero band; text overlay hidden (copy lives in the white form below) */
  .auth-split-left { flex: none; width: 100%; height: 32vh; min-height: 220px; }
  .auth-mosaic { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
  .auth-mosaic__tile:nth-child(n+7) { display: none; }   /* show 3x2 = 6 tiles on mobile */
  .auth-split-text { display: none; }
  .auth-split-overlay { display: none; }
  .auth-split-right { flex: 1; width: 100%; padding: 30px 22px 40px; }
  .auth-heading, .auth-heading .brand-wantable, .auth-heading .brand-create { font-size: 22px; }
  .auth-input { padding: 13px 14px; font-size: 16px; }        /* 16px avoids iOS zoom-on-focus */
  .auth-btn-primary, .auth-btn-google { padding: 14px 20px; }
  .auth-check, .auth-forgot { font-size: 13px; }
  .auth-check input { width: 18px; height: 18px; }
}
/* Short landscape phones: shrink the hero so the form is reachable */
@media (max-width: 820px) and (max-height: 560px) {
  .auth-split-left { height: 160px; min-height: 160px; }
}

/* ── Mine/All toggle ── */
.filter-toggle {
  display: inline-flex;
  border: 1px solid #E4E2DC;
  border-radius: 7px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
}

.filter-toggle a {
  padding: 5px 12px;
  color: #6B7168;
  text-decoration: none;
  background: white;
  transition: all 0.12s;
}

.filter-toggle a:hover { background: #F7F5F2; }

.filter-toggle a.active {
  background: #57695B;
  color: white;
}

/* ── Activity log ── */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #EFEDE7;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.activity-icon--created  { background: #EDF3EE; }
.activity-icon--approved { background: #EEF1EC; }
.activity-icon--declined { background: #F7EAE6; }
.activity-icon--edited   { background: #F7F1E4; }
.activity-icon--deleted  { background: #EFEDE7; }

/* ── Table utilities ── */
.tbl-header {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #6B7168;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.tbl-cell { padding: 11px 14px; font-size: 13px; color: #45514A; }
.tbl-row:hover { background: #F7F5F2; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CDC9C0; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #A8A399; }

/* ── Flash messages ── */
.flash-success { background: #EDF3EE; border: 1px solid #C2D6C6; color: #416448; }
.flash-danger  { background: #F7EAE6; border: 1px solid #E4BEB2; color: #8A4133; }
.flash-info    { background: #EEF1EC; border: 1px solid #C4D0C0; color: #45514A; }

/* ── Skeleton loader ── */
.skeleton {
  background: linear-gradient(90deg, #EFEDE7 25%, #E4E2DC 50%, #EFEDE7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Image card ── */
.img-card {
  background: #F7F5F2;
  border: 2px solid #E4E2DC;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/5;
}
.img-card img { width: 100%; height: 100%; object-fit: contain; }
.img-card.approved  { border-color: #A3C0A9; }
.img-card.declined  { border-color: #D69C8B; }
.img-card.generating { border-color: #D8BA75; }

/* ── Pipeline job card ── */
.job-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #E4E2DC;
  overflow: hidden;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.job-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.job-card.selected { border-color: #57695B; box-shadow: 0 0 0 3px rgba(87,105,91,0.15); }

/* ── Badge extra variants ── */
.badge-failed   { background: #F7EAE6; color: #8A4133; }
.badge-flat-lay { background: #F7F1E4; color: #96692D; }
.badge-ghost    { background: #EEF1EC; color: #45514A; }
.badge-lg { padding: 4px 10px; font-size: 12.5px; }

/* ── Btn extra variants ── */
.btn-success        { background: #4F7A57; color: white; border: 1px solid #416448; }
.btn-success:hover  { background: #416448; }

/* ── Feedback widget ── */
.feedback-fab {
  position: fixed; bottom: 20px; right: 20px; z-index: 50;
  width: 46px; height: 46px; border-radius: 9999px;
  background: #57695B; color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(2,132,199,.4); transition: transform .12s, background .12s;
}
.feedback-fab:hover { background: #45514A; transform: translateY(-1px); }
.feedback-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(15,23,42,.45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.feedback-backdrop.hidden { display: none; }
.feedback-panel {
  background: #fff; border-radius: 14px; width: 100%; max-width: 440px;
  padding: 20px; box-shadow: 0 20px 50px rgba(2,6,23,.3);
}
.feedback-head { display: flex; align-items: center; justify-content: space-between; }
.feedback-head h3 { font-size: 16px; font-weight: 700; color: #1E1E1E; }
.feedback-x { background: none; border: none; cursor: pointer; color: #A8A399; font-size: 16px; }
.feedback-sub { font-size: 12.5px; color: #6B7168; margin: 4px 0 14px; }
.feedback-row { margin-bottom: 12px; display: flex; flex-direction: column; gap: 5px; }
.feedback-row label { font-size: 12px; font-weight: 600; color: #565C54; }
.feedback-row select, .feedback-row input, .feedback-row textarea {
  border: 1px solid #CDC9C0; border-radius: 8px; padding: 8px 10px; font-size: 13.5px;
  width: 100%; outline: none;
}
.feedback-row select:focus, .feedback-row input:focus, .feedback-row textarea:focus { border-color: #57695B; }
.feedback-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.feedback-msg { font-size: 12px; color: #6B7168; }
.feedback-submit {
  background: #57695B; color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.feedback-submit:hover { background: #45514A; }
.feedback-submit:disabled { opacity: .6; cursor: not-allowed; }

/* FAB unread badge */
.feedback-fab { position: fixed; }
.feedback-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9999px; background: #A8503F; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.feedback-badge.hidden { display: none; }

/* Tabs */
.feedback-tabs { display: flex; gap: 4px; }
.feedback-tab {
  background: none; border: none; cursor: pointer; padding: 4px 2px;
  font-size: 15px; font-weight: 700; color: #A8A399; position: relative;
  border-bottom: 2px solid transparent; margin-right: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.feedback-tab.active { color: #1E1E1E; border-bottom-color: #57695B; }
.feedback-tab-badge {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9999px;
  background: #A8503F; color: #fff; font-size: 10px; font-weight: 700;
  line-height: 16px; text-align: center;
}
.feedback-tab-badge.hidden { display: none; }

/* Changelog list */
.changelog-empty { font-size: 12.5px; color: #A8A399; padding: 16px 0; text-align: center; }
.changelog-scroll { max-height: 340px; overflow-y: auto; padding-right: 4px; }
.changelog-load-more {
  display: block; width: 100%; margin-top: 8px; padding: 7px 12px;
  background: #EFEDE7; color: #45514A; border: 1px solid #E4E2DC; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: background .12s;
}
.changelog-load-more:hover { background: #E4E2DC; }
.changelog-item {
  display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid #EFEDE7;
}
.changelog-item:last-child { border-bottom: none; }
.changelog-item-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
  background: #F7F5F2; display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.changelog-item.is-new .changelog-item-icon { background: #EDF3EE; }
.changelog-item-body { flex: 1; min-width: 0; }
.changelog-item-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.changelog-item-title { font-size: 13.5px; font-weight: 700; color: #1E1E1E; }
.changelog-item-text { font-size: 12.5px; color: #565C54; margin: 3px 0 2px; line-height: 1.45; white-space: pre-wrap; }
.changelog-item-date { font-size: 11px; color: #A8A399; }
.changelog-new-dot {
  width: 7px; height: 7px; border-radius: 9999px; background: #4F7A57;
  display: inline-block;
}
.changelog-cat {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 1px 6px; border-radius: 9999px;
}
.changelog-cat-feature     { background: #EEF1EC; color: #45514A; }
.changelog-cat-improvement { background: #EEF1EC; color: #45514A; }
.changelog-cat-fix         { background: #F7F1E4; color: #96692D; }

/* Creation Routes table (Settings → WAM Mapping) */
.route-table { border: 1px solid #E4E2DC; border-radius: 10px; overflow-x: auto; }
@media (max-width: 767px) {
  .route-table .route-row { min-width: 720px; }
}
.route-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.8fr 1.6fr;
  gap: 8px; padding: 8px 10px; align-items: start;
  border-bottom: 1px solid #EFEDE7;
}
.route-row:last-child { border-bottom: none; }
.route-head {
  background: #F7F5F2; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; color: #6B7168;
}
.route-row:not(.route-head):nth-child(even) { background: #FAF9F7; }
.route-cell { min-width: 0; }
.route-cell .input { padding: 3px 6px; }
.route-meta { display: flex; flex-wrap: wrap; gap: 3px; }
.md-chip {
  max-width: 100%; overflow-wrap: anywhere;
  font-size: 9.5px; font-weight: 600; padding: 1px 5px; border-radius: 9999px;
  border: 1px solid #E4E2DC; background: #fff; color: #A8A399; cursor: pointer;
  transition: all .1s;
}
.md-chip:hover { border-color: #CDC9C0; }
.md-chip-on { background: #EEF1EC; border-color: #A3B29D; color: #45514A; }

/* ── Look Builder Type editor default-placement star ─────────────────────── */
.lt-star {
  font-size: 12px; line-height: 1; color: #CDC9C0; cursor: pointer;
  background: none; border: none; padding: 0 2px; transition: color .1s;
}
.lt-star:hover { color: #D0A659; }
.lt-star-on { color: #B8863B; }
.lt-row:nth-child(even) { background: #FAF9F7; }

/* ── Image lightbox / zoom (global, data-controller="lightbox") ───────────── */
[data-lightbox] { cursor: zoom-in; }
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: lb-fade 0.12s ease;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-img {
  max-width: 95vw; max-height: 92vh; object-fit: contain;
  border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute; top: 18px; right: 24px;
  background: none; border: none; color: #fff; font-size: 40px;
  line-height: 1; cursor: pointer; opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

/* ── Universal Image Manager (data-controller="image-manager") ───────────── */
.im-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.im-tile {
  position: relative; border: 2px solid #E4E2DC; border-radius: 10px;
  overflow: hidden; aspect-ratio: 1/1; background: #F7F5F2; cursor: grab;
}
.im-tile.primary { border-color: #57695B; box-shadow: 0 0 0 2px rgba(87,105,91,.25); }
.im-tile.dragging { opacity: .4; }
.im-tile.drop-target { border-color: #57695B; border-style: dashed; }
.im-tile img { width: 100%; height: 100%; object-fit: cover; }
.im-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: space-between; opacity: 0; transition: opacity .15s;
  background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 40%, transparent 70%, rgba(0,0,0,.45));
}
.im-tile:hover .im-overlay { opacity: 1; }
.im-badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 6px; background: #57695B; color: #fff;
  align-self: flex-start; margin: 4px;
}
.im-actions { display: flex; gap: 4px; padding: 4px; align-self: flex-end; }
.im-act {
  width: 24px; height: 24px; border-radius: 6px; background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center; border: none;
  cursor: pointer; font-size: 12px;
}
.im-act:hover { background: #fff; }
.im-act-danger { color: #A8503F; }
.im-dropzone {
  border: 2px dashed #CDC9C0; border-radius: 12px; padding: 24px;
  text-align: center; transition: all .15s; cursor: pointer;
}
.im-dropzone:hover, .im-dropzone.dragover { border-color: #57695B; background: #EEF1EC; }
.im-flash {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 60;
  padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.15); background: #EDF3EE; color: #354F3A;
  border: 1px solid #C2D6C6; display: none;
}
.im-flash-error { background: #F7EAE6 !important; color: #8A4133 !important; border-color: #E4BEB2 !important; }

/* Drop-zone hint: accepted types + size cap */
.im-hint { margin-top: 8px; font-size: 11px; color: #A8A399; }

/* Upload progress + error tiles (share .im-tile sizing) */
.im-tile-pending { cursor: default; display: flex; align-items: center; justify-content: center; background: #F7F5F2; }
.im-tile-pending.im-tile-error { border-color: #E4BEB2; background: #F7EAE6; }
.im-pending-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; text-align: center; }
.im-pending-label { font-size: 10px; font-weight: 600; color: #6B7168; line-height: 1.25; }
.im-tile-error .im-pending-label { color: #8A4133; }
.im-pending-name { font-size: 9px; color: #A8A399; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-pending-x { width: 22px; height: 22px; border-radius: 9999px; background: #E4BEB2; color: #8A4133; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.im-pending-dismiss { margin-top: 2px; font-size: 10px; font-weight: 600; color: #8A4133; background: transparent; border: 1px solid #E4BEB2; border-radius: 4px; padding: 2px 8px; cursor: pointer; }
.im-pending-dismiss:hover { background: #fff; }
.im-spinner { width: 22px; height: 22px; border: 3px solid #E4E2DC; border-top-color: #57695B; border-radius: 9999px; animation: im-spin 0.7s linear infinite; }
@keyframes im-spin { to { transform: rotate(360deg); } }

/* ── Unified Video Product Picker (video-picker controller) ──────────────
   Scoped .vp-* so it can't collide with page styles. Sage tokens per DESIGN.md. */
.vp-root { font-size: 13px; color: #45514A; }
.vp-label { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #6B7168; }
.vp-h { font-size: 1.0625rem; font-weight: 600; color: #45514A; margin-bottom: 4px; }
.vp-sub { color: #6B7168; font-size: .75rem; margin-bottom: 16px; }
.vp-srcbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid #E4E2DC; padding-bottom: 14px; }
.vp-srcbar .vp-label { margin-right: 4px; }
.vp-src-tab { height: 32px; padding: 0 14px; border: 1px solid #E4E2DC; background: #FFF; color: #45514A; border-radius: 7px; font-family: inherit; font-size: .75rem; font-weight: 600; cursor: pointer; transition: .12s; }
.vp-src-tab:hover { background: #F7F5F2; }
.vp-src-tab.active { background: #57695B; border-color: #57695B; color: #FFF; }
.vp-steps { display: flex; gap: 6px; margin-bottom: 20px; }
.vp-step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; background: #F7F5F2; border: 1px solid #E4E2DC; font-size: .7rem; font-weight: 600; color: #A8A399; }
.vp-step .vp-n { width: 20px; height: 20px; border-radius: 9999px; background: #E4E2DC; color: #FFF; display: flex; align-items: center; justify-content: center; font-size: .7rem; flex-shrink: 0; }
.vp-step.active { background: #EEF1EC; border-color: #7C8B7F; color: #45514A; }
.vp-step.active .vp-n { background: #57695B; }
.vp-step.done { color: #4F7A57; }
.vp-step.done .vp-n { background: #4F7A57; }
.vp-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.vp-toolbar .vp-search { flex: 1; min-width: 200px; }
.vp-field { margin-bottom: 14px; }
.vp-field label { display: block; margin-bottom: 6px; }
.vp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.vp-prod { border: 1px solid #E4E2DC; border-radius: 7px; overflow: hidden; cursor: pointer; background: #FFF; transition: .12s; text-align: left; padding: 0; font-family: inherit; }
.vp-prod:hover { border-color: #7C8B7F; box-shadow: 0 2px 8px rgba(87,105,91,.12); }
.vp-prod.selected { border-color: #57695B; box-shadow: 0 0 0 2px #EEF1EC; }
.vp-thumb { aspect-ratio: 1; background: #F7F5F2 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #A8A399; font-size: 2rem; }
.vp-meta { padding: 8px 10px; }
.vp-t { font-size: .75rem; font-weight: 600; color: #45514A; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vp-s { font-size: .7rem; color: #6B7168; margin-top: 2px; }
.vp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vp-chip { height: 32px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #E4E2DC; border-radius: 9999px; background: #FFF; cursor: pointer; font-size: .75rem; font-weight: 600; color: #45514A; font-family: inherit; transition: .12s; }
.vp-chip:hover { background: #F7F5F2; }
.vp-chip.selected { background: #EEF1EC; border-color: #57695B; color: #45514A; }
.vp-imgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.vp-cell { position: relative; aspect-ratio: 1; border: 1px solid #E4E2DC; border-radius: 7px; overflow: hidden; cursor: pointer; background: #F7F5F2 center/cover no-repeat; transition: .12s; }
.vp-cell:hover { border-color: #7C8B7F; }
.vp-cell.selected { border-color: #57695B; box-shadow: 0 0 0 2px #EEF1EC; }
.vp-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 9999px; background: rgba(255,255,255,.85); border: 1px solid #E4E2DC; display: flex; align-items: center; justify-content: center; color: #A8A399; font-size: .8rem; font-weight: 700; }
.vp-cell.selected .vp-check { background: #57695B; color: #FFF; border-color: #57695B; }
.vp-badge { position: absolute; bottom: 6px; left: 6px; font-size: .6rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: #F5EFE2; color: #7E5A1E; }
.vp-cap { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,.9); font-size: .6rem; font-weight: 600; color: #6B7168; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-pill { display: inline-block; font-size: .65rem; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: 4px; }
.vp-pill.pill-neutral { background: #F7F5F2; color: #6B7168; }
.vp-pill.pill-success { background: #E8EFE7; color: #3F5A46; }
.vp-pill.pill-attention { background: #F5EFE2; color: #7E5A1E; }
.vp-hint { font-size: .7rem; color: #6B7168; padding: 12px 0; grid-column: 1 / -1; }
.vp-selstrip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.vp-mini { width: 48px; height: 48px; border-radius: 4px; border: 1px solid #E4E2DC; background: #F7F5F2 center/cover no-repeat; position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #A8A399; }
.vp-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 9999px; background: #A8503F; color: #FFF; border: none; font-size: .7rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.vp-drop { border: 2px dashed #E4E2DC; border-radius: 10px; padding: 32px; text-align: center; color: #6B7168; background: #F7F5F2; cursor: pointer; transition: .12s; margin-bottom: 12px; }
.vp-drop:hover { border-color: #7C8B7F; color: #45514A; }
.vp-drop-big { font-size: 2rem; margin-bottom: 8px; }
.vp-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #E4E2DC; }
.vp-basket { margin-top: 16px; border-top: 1px solid #E4E2DC; padding-top: 16px; }
.vp-basket-head { font-size: .75rem; color: #6B7168; margin-bottom: 10px; }
.vp-basket-head b { color: #45514A; }
.vp-basket-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid #E4E2DC; border-radius: 7px; margin-bottom: 6px; position: relative; }
.vp-basket-label { font-size: .75rem; color: #45514A; }
.vp-src { color: #6B7168; text-transform: uppercase; font-size: .6rem; font-weight: 700; letter-spacing: .03em; }
.vp-basket-row .vp-x { position: static; }

/* ── OAuth consent (Doorkeeper /oauth/authorize) — sage/cream identity ── */
.oauth-signed-in {
  font-size: 12.5px;
  color: #6B7168;
  margin: -8px 0 16px;
}
.oauth-signed-in strong { color: #45514A; font-weight: 600; }
.oauth-consent-card {
  background: #FAF9F7;
  border: 1px solid #E4E2DC;
  border-radius: 10px;
  padding: 20px;
  margin: 4px 0 20px;
}
.oauth-consent-card--error { background: #F7EAE6; border-color: #E4BEB2; }
.oauth-consent-lede {
  font-size: 13px;
  line-height: 1.5;
  color: #45514A;
  margin: 0 0 14px;
}
.oauth-consent-lede strong { color: #1E1E1E; font-weight: 700; }
.oauth-consent-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6B7168;
  margin: 0 0 10px;
}
.oauth-scope-list { list-style: none; margin: 0; padding: 0; }
.oauth-scope-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #E4E2DC;
}
.oauth-scope-item:first-child { border-top: none; }
.oauth-scope-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #57695B;
}
.oauth-scope-text { display: flex; flex-direction: column; gap: 2px; }
.oauth-scope-title { font-size: 13px; font-weight: 600; color: #45514A; }
.oauth-scope-desc { font-size: 12px; color: #6B7168; line-height: 1.4; }
.oauth-error-detail {
  font-size: 12.5px;
  color: #6E3428;
  background: #FFFFFF;
  border: 1px solid #E4BEB2;
  border-radius: 7px;
  padding: 10px 12px;
  margin: 0;
  word-break: break-word;
  font-family: inherit;
}
.oauth-actions { display: flex; flex-direction: column; gap: 10px; }
.oauth-btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
  font-family: inherit;
}
.oauth-btn--authorize { background: #57695B; color: #FFFFFF; }
.oauth-btn--authorize:hover { background: #45514A; transform: translateY(-1px); }
.oauth-btn--deny { background: #F1EFEA; color: #45514A; border-color: #E4E2DC; }
.oauth-btn--deny:hover { background: #E4E2DC; }

/* MCP-10: Chat section soft-delete button (two-tap arm/confirm) */
.chat-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 10;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.92);
  color: #991b1b;
  border: 1px solid #E4E2DC;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.group-card:hover .chat-delete-btn,
[data-chat-item]:hover .chat-delete-btn { opacity: 1; }
.chat-delete-btn:hover { background: #fee2e2; }
.chat-delete-btn.is-armed { background: #991b1b; color: #fff; opacity: 1; border-color: #991b1b; }

/* ── Reference Picker component (2.5a) ──────────────────────────────────────
 * House rule: 32px (2rem) control heights on inputs/selects inside the picker.
 * Inside a HAML :css filter only /* */ comments are safe — never use // or /! */

/* Flat line-icon baseline — inline SVGs that replaced the chat/picker emoji.
   Inherit text color, align with adjacent text, and never shrink in flex rows. */
.ui-icon { display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }

/* Tab bar — shared class with .picker-tab already in the look builder. */
/* These declarations are additive; the look-builder's existing .picker-tab
 * rules live in looks/show.html.haml's :css block and stay there (2.5b). */
.picker-tab {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6B7168;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.picker-tab svg { width: 15px; height: 15px; flex-shrink: 0; }
.picker-tab:hover  { color: #45514A; }
.picker-tab.active { color: #57695B; border-bottom-color: #57695B; }

/* Upload drop zone */
.rp-upload-drop-zone {
  border: 2px dashed #E4E2DC;
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rp-upload-drop-zone:hover { border-color: #57695B; background: #F7F5F2; }
.rp-upload-drop-zone.dragover { border-color: #57695B; background: #EEF1EC; }

/* Demo-page event log */
.rp-event-log {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ──────────────────────────────────────────────────────────────────────────
 * Shared reference-picker component styling (Phase 2.5 parity restore).
 *
 * The old Look Builder inline picker carried these rules in looks/show.html.haml's
 * :css block; 2.5b migrated the MARKUP to the shared component but left the CSS
 * behind, so the picker grid/cards/drop-zone rendered unstyled on /chat and the
 * admin demo. These same class names (.product-card, .img-checkbox, .option-btn)
 * are ALSO defined — with different values — page-scoped in products/index,
 * ugc/single, video_projects/*, ai_models, etc. So we must NOT globalize the bare
 * names. Everything below is scoped under the component's controller attribute so
 * it only ever styles the shared picker and can't bleed onto those pages.
 * ────────────────────────────────────────────────────────────────────────── */
[data-controller~="reference-picker"] {
  /* Grid track-sizing fix: cards use an aspect-ratio img box, which has no definite
   * height during grid track-sizing and otherwise collapses every row to the
   * info-text height (the "card is a thin strip" bug). max-content + start fixes it. */
}
[data-controller~="reference-picker"] [data-rp-grid] {
  grid-auto-rows: max-content;
  align-items: start;
}
[data-controller~="reference-picker"] .product-card {
  border: 2px solid #E4E2DC;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: all .15s;
}
[data-controller~="reference-picker"] .product-card:hover {
  border-color: #57695B;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
[data-controller~="reference-picker"] .product-card.selected {
  border-color: #57695B;
  box-shadow: 0 0 0 3px rgba(87,105,91,.2);
  background: #EEF1EC;
}
[data-controller~="reference-picker"] .img-checkbox {
  border: 2px solid #E4E2DC;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all .15s;
}
[data-controller~="reference-picker"] .img-checkbox:hover { border-color: #57695B; }
[data-controller~="reference-picker"] .img-checkbox.selected {
  border-color: #57695B;
  box-shadow: 0 0 0 2px rgba(87,105,91,.3);
}
[data-controller~="reference-picker"] .img-checkbox .check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #57695B;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
[data-controller~="reference-picker"] .img-checkbox.selected .check { display: flex; }
[data-controller~="reference-picker"] .option-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 2px solid #E4E2DC;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #45514A;
  background: #fff;
  transition: all .15s ease;
}
[data-controller~="reference-picker"] .option-btn:hover { border-color: #57695B; color: #45514A; }
[data-controller~="reference-picker"] .option-btn.selected {
  border-color: #57695B;
  background: #EEF1EC;
  color: #45514A;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   Phase 0: Canonical design system additions
   All tokens inherit from DESIGN.md; no new accent hues.
   ══════════════════════════════════════════════════════════════ */

/* ── Dashboard layout primitives ──────────────────────────────
   12-column grid for the dashboard. Sections declare col-span
   and order via inline style or a view controller.            */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

/* Below 1100px everything goes full-width */
@media (max-width: 1100px) {
  .dash-grid > * { grid-column: 1 / -1 !important; }
}

/* ── Tile (dashboard attention/metric cards) ──────────────────
   Extends .stat-card: adds the left accent border that codes
   severity without introducing off-palette colors.            */
.tile {
  background: white;
  border-radius: 10px;
  border: 1px solid #E4E2DC;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(30,30,30,0.05);
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 3px solid #E4E2DC;
}
.tile--problem   { border-left-color: #A8503F; }
.tile--attention { border-left-color: #B8863B; }

.tile__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1E1E1E;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.tile__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6B7168;
  letter-spacing: 0.04em;
}
.tile__meta {
  font-size: 0.75rem;
  color: #A8A399;
}
.tile__action {
  margin-top: 10px;
}

/* ── Stack progress bar ───────────────────────────────────────
   Catalog imagery coverage: a segmented pill bar.             */
.stack {
  display: flex;
  gap: 2px;
  height: 14px;
  border-radius: 9999px;
  overflow: hidden;
  background: #F7F5F2;
}
.stack__seg { flex: none; height: 100%; }

/* ── Thumb (look/asset thumbnails) ───────────────────────────
   Fixed aspect-ratio well with skeleton background.          */
.thumb {
  aspect-ratio: 4 / 5;
  background: #F7F5F2;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Nav count (plain muted totals — NOT review-backlog badges) */
.nav-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: #A8A399;
  flex-shrink: 0;
}

/* ── Outline badge variant (M9: brand/type tags quiet style) ─
   Use .badge-outline for brand and type chips so they don't
   compete visually with status .pill-* filled badges.        */
.badge-outline {
  background: transparent;
  border: 1px solid #E4E2DC;
  color: #6B7168;
}

/* ── Contrast fixes (M3) ──────────────────────────────────────
   text-faint (#A8A399) is 2.5:1 on white — below AA.
   text-muted (#6B7168) is 5.0:1 — use this for body/labels.
   Gold as text: use #7E5A1E (4.9:1) not #B8863B (3.2:1).   */
.text-gold-aa   { color: #7E5A1E; }  /* safe gold text — use instead of text-gold/attention */
.text-muted-min { color: #6B7168; }  /* alias: always passes AA; preferred over text-faint for body */

/* ── Focus / hover state (global) ────────────────────────────
   Ensure interactive elements that can't use .input/.select
   still get the sage focus ring.                             */
.focus-sage:focus-visible,
.focus-sage:focus {
  outline: none;
  border-color: #57695B;
  box-shadow: 0 0 0 3px rgba(87,105,91,0.12);
}

/* ── Dashboard (design audit 2026-11-13) ───────────────────────────────────
   Built only from existing tokens (.card, .stat-card, .pill, .btn, sage/cream
   hex values already in this file). One 12-column grid; the view preference
   reorders sections via `order` and `grid-column` set by dashboard_view. */
.dash-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-header__right { display: flex; align-items: center; gap: 12px; }
.dash-view { display: inline-flex; align-items: center; gap: 6px; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dash-panel { grid-column: span 12; min-width: 0; }
.dash-kpis__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1024px) { .dash-kpis__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .dash-kpis__grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

.tile {
  display: flex; flex-direction: column; gap: 2px;
  background: white; border: 1px solid #E4E2DC; border-left: 3px solid #E4E2DC;
  border-radius: 10px; padding: 14px 16px; text-decoration: none;
  box-shadow: 0 1px 3px rgba(30,30,30,0.05);
}
.tile:hover { border-color: #CDC9C0; }
.tile--attention { border-left-color: #B8863B; }
.tile--problem { border-left-color: #A8503F; }
.tile__label { font-size: 12px; font-weight: 600; color: #6B7168; }
.tile__value { font-size: 1.75rem; font-weight: 700; color: #1E1E1E; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile__meta { font-size: 12px; color: #6B7168; }

.dash-pipelines__grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 1024px) { .dash-pipelines__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dash-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dash-card__actions { display: flex; gap: 8px; margin-top: 12px; }
.dash-card__actions .btn { flex: 1; justify-content: center; }

.dash-list { display: grid; gap: 6px; margin: 0; }
.dash-list > div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.dash-list dt { color: #6B7168; }
.dash-list dd { margin: 0; font-weight: 600; color: #1E1E1E; font-variant-numeric: tabular-nums; }
.dash-list dd a { color: #45514A; text-decoration: underline; text-underline-offset: 2px; }

.dash-progress__text { font-size: 12px; color: #6B7168; margin-bottom: 6px; }
.dash-progress__bar { height: 8px; border-radius: 9999px; background: #F7F5F2; overflow: hidden; margin-bottom: 12px; }
.dash-progress__fill { height: 100%; background: #57695B; border-radius: 9999px; }

.dash-note { font-size: 12.5px; padding: 8px 10px; border-radius: 6px; margin-bottom: 10px; }
.dash-note a { font-weight: 600; color: #45514A; margin-left: 4px; }
.dash-note--warn { background: #F5EFE2; color: #7E5A1E; }
.dash-note--problem { background: #F5E6E2; color: #8E4335; }

.dash-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dash-feed__row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: 8px; }
.dash-feed__row:hover { background: #F7F5F2; }
.dash-feed__thumb { width: 40px; height: 50px; border-radius: 7px; background: #F7F5F2; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.dash-feed__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dash-feed__placeholder { font-size: 11px; color: #6B7168; }
.dash-feed__body { display: flex; flex-direction: column; min-width: 0; }
.dash-feed__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.dash-summary__total { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.dash-summary__num { font-size: 1.75rem; font-weight: 700; color: #1E1E1E; font-variant-numeric: tabular-nums; }
.dash-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dash-bars li { display: grid; grid-template-columns: 110px minmax(0, 1fr) 48px; align-items: center; gap: 8px; font-size: 12px; }
.dash-bars__label { color: #6B7168; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bars__track { height: 8px; background: #F7F5F2; border-radius: 9999px; overflow: hidden; }
.dash-bars__fill { height: 100%; background: #57695B; border-radius: 9999px; }
.dash-bars__count { text-align: right; font-weight: 600; color: #1E1E1E; font-variant-numeric: tabular-nums; }
.dash-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.dash-top li { display: flex; justify-content: space-between; gap: 8px; }
.dash-top__name { min-width: 0; color: #1E1E1E; }

.dash-error { border-left: 3px solid #A8503F; }

/* ── Keyboard focus visibility for custom controls (a11y floor) ─────────────── */
.job-card:focus-within,
.product-card:focus-visible,
.img-checkbox:focus-visible {
  outline: 2px solid #57695B;
  outline-offset: 2px;
}

/* Pipeline Review one-at-a-time: stack source / result / checks below xl so the
   comparison and the actions stay close on tablet and mobile. */
@media (max-width: 1279px) {
  #one-at-a-time section > .grid { grid-template-columns: 1fr; }
}

/* Mobile containment: form controls and step pills never push main wider than the viewport. */
@media (max-width: 767px) {
  main select, main .select, main .input { max-width: 100%; min-width: 0; }
  main .step-tab { flex-shrink: 1; min-width: 0; padding-left: 10px; padding-right: 10px; }
  main .lt-star { flex-shrink: 1; }
}
@media (max-width: 767px) {
  main .grid > label { min-width: 0; }
  main .grid.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main .lt-star { margin-left: auto; padding: 0 2px; }
}
@media (max-width: 767px) {
  main .grid > label > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 0; }
}

/* ── Imagery coverage ────────────────────────────────────────────────────────
   ONE .status-* -> .pill-* mapping for every audit surface (editorial, swatch,
   vendor, row badges). Replaces the per-view %style blocks. Palette = the
   DESIGN.md pill tokens above: success / attention / problem / neutral.      */
.status-has-editorial, .status-has-swatch, .status-has_retouch, .status-complete, .status-done
  { background: #E8EFE7; color: #3F5A46; }
.status-needs-crop, .status-needs-generation, .status-needs_retouch, .status-pending_approval,
.status-seam_flagged, .status-processing, .status-generating, .status-crop, .status-generate
  { background: #F5EFE2; color: #7E5A1E; }
.status-error, .status-quarantined { background: #F5E6E2; color: #8E4335; }
.status-queued, .status-pending, .status-unscanned, .status-paused { background: #F7F5F2; color: #6B7168; }
.status-needs_retouch { background: #F7F5F2; color: #6B7168; }
.status-generating::before { content: "●"; margin-right: 4px; animation: va-pulse 1.1s ease-in-out infinite; }
@keyframes va-pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }

/* WAM crop picker (editorial + swatch modals) */
.crop-container { position: relative; display: inline-block; user-select: none; overflow: hidden; }
.crop-overlay { position: absolute; border: 2px solid #57695B; background: rgba(87,105,91,0.08); cursor: move; box-shadow: 0 0 0 9999px rgba(0,0,0,0.45); min-width: 40px; min-height: 40px; }
.crop-handle { position: absolute; width: 12px; height: 12px; background: #57695B; border: 2px solid white; border-radius: 2px; }
.crop-handle.nw { top: -6px; left: -6px; cursor: nw-resize; }
.crop-handle.ne { top: -6px; right: -6px; cursor: ne-resize; }
.crop-handle.sw { bottom: -6px; left: -6px; cursor: sw-resize; }
.crop-handle.se { bottom: -6px; right: -6px; cursor: se-resize; }

/* Vendor retouch cards */
/* Live in-flight pill: a soft pulse so a generating card never looks static/dead. */
@keyframes va-pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }
/* Method = metadata -> one quiet neutral pill; the separate "Gemini" tag flags cost. */
.method-pill { font-size: 11px; padding: 1px 6px; border-radius: 4px; font-weight: 600; background: #F7F5F2; color: #6B7168; }
.va-card.selected { outline: 2px solid #57695B; outline-offset: 1px; }
.va-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.va-img { width: 100%; aspect-ratio: 4/5; object-fit: cover; background: #F7F5F2; border-radius: 6px; }
.va-imgwrap { position: relative; }
/* Image labels sit BOTTOM-left so they never collide with the top-left select checkbox. */
.va-imglabel { position: absolute; bottom: 3px; left: 3px; font-size: 11px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: rgba(30,30,30,0.55); color: #fff; letter-spacing: 0.02em; }
.va-imglabel-done { background: #3F5A46; color: #fff; }
.va-uploaded { background: #FBFDFB; border-color: #cfe6d5; }
.va-empty { display:flex; align-items:center; justify-content:center; color:#A8A399; font-size:11px; }
.va-timeline { list-style: none; padding: 0; margin: 0; }
.va-timeline li { display: flex; align-items: baseline; gap: 8px; font-size: 12px; padding: 2px 0; }
.va-timeline .va-tl-label { width: 78px; color: #45514A; font-weight: 600; }
.va-timeline .va-tl-when { color: #7C8B7F; }
.va-timeline .va-tl-by { color: #7C8B7F; font-style: italic; }
/* Clickable stat cards act as status filters. */
.va-stat { display:block; transition: box-shadow .12s, border-color .12s; }
.va-stat:hover { border-color: #57695B; box-shadow: 0 1px 6px rgba(87,105,91,0.12); }
.va-stat.va-stat-active { border-color: #57695B; box-shadow: inset 0 0 0 1px #57695B; }

/* Coverage table */
.cov-table { width: 100%; border-collapse: collapse; min-width: 980px; }
.cov-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #6B7168; padding: 8px 10px; border-bottom: 1px solid #E4E2DC; background: #F7F5F2; white-space: nowrap; }
.cov-table td { padding: 8px 10px; border-bottom: 1px solid #EFEDE7; vertical-align: top; }
.cov-thumb { width: 40px; height: 50px; object-fit: cover; border-radius: 4px; border: 1px solid #E4E2DC; background: #F7F5F2; }
.cov-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 104px; }
.cov-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid #E4E2DC; }
.cov-tab { padding: 8px 12px; font-size: 13px; font-weight: 500; color: #6B7168; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.cov-tab:hover { color: #1E1E1E; }
.cov-tab.active { color: #1E1E1E; border-bottom-color: #57695B; font-weight: 600; }
.cov-tab .cov-tab-n { margin-left: 6px; font-size: 11px; color: #A8A399; }
.cov-chip { display: inline-flex; align-items: center; height: 32px; box-sizing: border-box; padding: 0 12px; white-space: nowrap; flex: 0 0 auto; font-size: 12px; border: 1px solid #E4E2DC; border-radius: 999px; color: #45514A; background: #fff; }
.cov-chip.active { background: #E8EFE7; border-color: #57695B; color: #3F5A46; font-weight: 600; }
@media (max-width: 640px) {
  /* One scrollable row instead of wrapping: every tab stays reachable at 390px,
     with a fade on the trailing edge as the scroll affordance and snap stops. */
  .cov-tabs {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .cov-tabs::-webkit-scrollbar { display: none; }
  .cov-tab { padding: 8px 8px; font-size: 12px; scroll-snap-align: start; }
  .cov-bulkbar { flex-wrap: wrap; }
}

/* ── My tasks / Team workload (v3 batch 2) ─────────────────────────────── */
.dash-tasks__groups { display: grid; gap: 16px; }
@media (min-width: 1024px) { .dash-tasks__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-tasks__group { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6B7168; margin: 0 0 6px; }
.dash-tasks__count { background: #EFEDE7; color: #45514A; border-radius: 9999px; padding: 0 8px; font-size: 11px; font-variant-numeric: tabular-nums; }
.dash-tasks__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dash-tasks__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px; border-radius: 8px; min-width: 0; }
.dash-tasks__row:hover { background: #F7F5F2; }
.dash-tasks__main { display: flex; flex-direction: column; min-width: 0; }
.dash-tasks__title { font-size: 13px; font-weight: 600; color: #1E1E1E; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-tasks__sub { font-size: 11.5px; color: #6B7168; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-tasks__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11.5px; color: #6B7168; flex: none; }
.dash-tasks__overdue { color: #8E4335; font-weight: 600; margin-left: 6px; }
.dash-workload { width: 100%; font-size: 13px; border-collapse: collapse; }
.dash-workload th, .dash-workload td { padding: 6px 8px; text-align: left; border-bottom: 1px solid #EFEDE7; }
.dash-workload .num { text-align: right; font-variant-numeric: tabular-nums; }
.assign-control { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.assign-control .select { height: 32px; font-size: 12px; max-width: 170px; }
.assign-chip { font-size: 11px; background: #EFEDE7; color: #45514A; border-radius: 9999px; padding: 1px 8px; white-space: nowrap; }

/* Brand multi-select dropdown (brand_multiselect_controller). Shared, compact. */
.bms { position:relative; max-width:360px; }
.bms-btn { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; height:32px; padding:0 10px; border:1px solid #E4E2DC; border-radius:7px; background:#fff; font-size:13px; color:#1E1E1E; cursor:pointer; text-align:left; }
.bms-btn:hover { border-color:#CDC9C0; }
.bms-btn:focus-visible { outline:2px solid #57695B; outline-offset:1px; }
.bms-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bms-ph { color:#A8A399; }
.bms-menu { position:absolute; z-index:40; top:36px; left:0; right:0; background:#fff; border:1px solid #E4E2DC; border-radius:8px; box-shadow:0 8px 24px rgba(30,30,30,.12); }
.bms-top { display:flex; gap:6px; padding:8px; border-bottom:1px solid #EFEDE8; }
.bms-search { flex:1; height:28px; padding:0 8px; border:1px solid #E4E2DC; border-radius:6px; font-size:12px; }
.bms-clear { font-size:12px; color:#6B7168; background:none; border:0; cursor:pointer; padding:0 4px; }
.bms-list { max-height:260px; overflow:auto; padding:4px 0; }
.bms-h { font-size:10px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:#A8A399; padding:8px 12px 4px; }
.bms .bms-row, .ml-fld .bms .bms-row { display:flex; align-items:center; gap:8px; padding:5px 12px; margin:0; font-size:13px; font-weight:400; color:#1E1E1E; text-transform:none; letter-spacing:normal; cursor:pointer; }
.bms-row:hover { background:#F7F5F2; }
.bms-row input { accent-color:#57695B; }
.bms-empty { padding:10px 12px; font-size:12px; color:#A8A399; }

/* ── Shared one-row filter bar (shared/_filter_bar) — DESIGN.md "Filter/toolbar rows" ──
   ONE row at 1280px with the sidebar open, every control 32px. Layout, left to right:
   search -> up to 3 primary filters -> "Filters N" popover -> spacer -> sort -> view toggle. */
.fbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; position: relative; min-width: 0; }
.fbar > * { flex: 0 1 auto; min-width: 0; }
.fbar .fbar-search { flex: 1 1 220px; min-width: 160px; max-width: 300px; position: relative; }
.fbar .fbar-search .input { padding-left: 30px; }
.fbar .fbar-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: #A8A399; pointer-events: none; }
.fbar .fbar-primary { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; }
.fbar .select, .fbar .input:not([type=checkbox]), .fbar .btn { height: 32px; box-sizing: border-box; }
.fbar .fbar-primary .select { width: 138px; min-width: 96px; flex: 0 1 138px; padding-top: 0; padding-bottom: 0; }
.fbar .fbar-primary > div { flex: 0 1 138px; min-width: 96px; }
.fbar .fbar-primary > div .select { width: 100%; }
.fbar .fbar-primary > div[data-controller~="brand-filter"], .fbar .fbar-primary > div { display: flex; align-items: center; }
.fbar .fbar-primary > div .select { height: 32px; padding-top: 0; padding-bottom: 0; padding-right: 10px; box-sizing: border-box; }
.fbar .fbar-primary [data-controller~="brand-filter"] > button.select { width: 100%; min-width: 0; justify-content: space-between; overflow: hidden; }
.fbar .fbar-primary [data-controller~="brand-filter"] > button.select > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fbar .fbar-primary [data-controller~="brand-filter"] > button.select > svg { flex: none; width: 12px; height: 12px; color: #A8A399; }
.fbar .fbar-primary > div[data-controller~="brand-filter"] { flex: 0 1 150px; }
.fbar .fbar-primary .select, .fbar .fbar-sort .select { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.fbar .fbar-primary select.select, .fbar .fbar-sort select.select { padding-right: 30px; }
.fbar .fbar-view { display: flex; align-items: center; min-height: 32px; }
.fbar .fbar-spacer { flex: 1 1 0; min-width: 0; }
.fbar .fbar-sort .select { width: 160px; min-width: 120px; padding-top: 0; padding-bottom: 0; }
.fbar .fbar-more { position: relative; flex: 0 0 auto; }
.fbar .fbar-more > .btn { background: #fff; color: #45514A; border-color: #E4E2DC; padding: 0 12px; white-space: nowrap; }
.fbar .fbar-more > .btn:hover, .fbar .fbar-more > .btn.is-active { border-color: #57695B; }
.fbar .fbar-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #57695B; color: #fff; font-size: 11px; font-weight: 600; }
.fbar .fbar-count.hidden { display: none; }
.fbar-pop { position: absolute; top: 38px; right: 0; z-index: 40; width: 460px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid #E4E2DC; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 16px; }
.fbar-pop.hidden { display: none; }
.fbar-pop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
.fbar-pop-grid label.fbar-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #6B7168; min-width: 0; }
.fbar-pop-grid .select, .fbar-pop-grid .input:not([type=checkbox]) { width: 100%; height: 32px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
.fbar-pop-grid .fbar-field-wide { grid-column: 1 / -1; }
.fbar-pop-grid > div { min-width: 0; }
.fbar-pop-grid [data-controller~="brand-filter"] { display: block; width: 100%; }
.fbar-pop-grid [data-controller~="brand-filter"] .select { width: 100%; }
.fbar-pop-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.fbar-chips { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-top: 8px; overflow-x: auto; min-height: 24px; }
.fbar-chips.hidden { display: none; }
.fbar-chiplist { display: flex; gap: 6px; flex-wrap: nowrap; }
.fbar-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 9999px; border: 1px solid #E4E2DC; background: #EEF1EC; color: #45514A; font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.fbar-chip:hover { border-color: #57695B; }
.fbar-clear { font-size: 12px; color: #6B7168; background: none; border: 0; cursor: pointer; text-decoration: underline; white-space: nowrap; }
.fbar-seg { display: inline-flex; height: 32px; border: 1px solid #E4E2DC; border-radius: 7px; overflow: hidden; flex: 0 0 auto; }
.fbar-seg button { display: inline-flex; align-items: center; justify-content: center; width: 34px; background: #fff; color: #6B7168; border: 0; cursor: pointer; }
.fbar-seg button[aria-pressed="true"], .fbar-seg button.is-on { background: #EFEDE7; color: #374151; }
.fbar .fbar-check { display: inline-flex; align-items: center; gap: 6px; height: 32px; font-size: 12px; color: #45514A; white-space: nowrap; cursor: pointer; }
.fbar-scroll { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.fbar-scroll > * { flex: 0 0 auto; }
@media (max-width: 767px) {
  .fbar { flex-wrap: wrap; }
  .fbar .fbar-search { flex: 1 1 100%; max-width: none; }
  .fbar .fbar-primary { flex-wrap: wrap; }
  .fbar .fbar-spacer { display: none; }
  .fbar-pop { width: calc(100vw - 32px); }
}
.fbar-pop-grid .fbar-received-range:not(.hidden) { display: flex; align-items: center; gap: 8px; }
.fbar-pop-grid .fbar-supply { display: contents; }
.fbar-pop-grid .fbar-supply > div { min-width: 0; }
.fbar-pop-grid .fbar-supply > div[data-modus-supply-target="range"] { grid-column: 1 / -1; }
.fbar-pop-grid .fbar-supply label { display: block; font-size: 12px; font-weight: 400; color: #6B7168; margin-bottom: 4px; }
.fbar-pop-grid .fbar-supply .select, .fbar-pop-grid .fbar-supply .input { width: 100% !important; min-width: 0 !important; }
.pa-btn { height: 32px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; white-space: nowrap; }
details > summary.pa-btn::-webkit-details-marker, details > summary.btn::-webkit-details-marker { display: none; }
.pa-help { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #CDC9C0; color: #6B7168; font-size: 12px; font-weight: 600; cursor: help; flex: 0 0 auto; }
.pa-help:focus-visible { outline: 2px solid #57695B; outline-offset: 2px; }
/* v3: native checkbox/radio use the sage accent, not browser blue */
input[type="checkbox"], input[type="radio"] { accent-color: #57695B; }

/* One-row choice groups (Look Builder expression + engine). Never wrap: scroll
   sideways with a soft fade at the edge so every option stays reachable. */
.chip-scroll { display:flex; flex-wrap:nowrap; gap:6px; overflow-x:auto; overscroll-behavior-x:contain;
  scrollbar-width:thin; padding:0 40px 2px 0; -webkit-mask-image:linear-gradient(to right,#000 calc(100% - 48px),transparent);
  mask-image:linear-gradient(to right,#000 calc(100% - 48px),transparent); }
.chip-scroll > * { flex:0 0 auto; white-space:nowrap; height:32px; display:inline-flex; align-items:center; }
.chip-scroll::-webkit-scrollbar { height:4px; }
.chip-scroll::-webkit-scrollbar-thumb { background:#E4E2DC; border-radius:2px; }
