/* 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-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: 5px 8px;
}
.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.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-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: 10px; padding: 1px 5px; }

/* 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; }

/* 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: 7px 14px;
  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: 5px 10px; font-size: 12px; }
.btn-xs   { padding: 3px 8px; font-size: 11.5px; }

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

.btn-warning   { background: #B8863B; color: white; }
.btn-warning:hover { background: #96692D; }

.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: #B8863B; color: white; }
.btn-purple:hover { background: #96692D; }

.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%;
}

.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; }

.select {
  padding: 7px 10px;
  border: 1px solid #E4E2DC;
  border-radius: 7px;
  font-size: 13px;
  background: white;
}

.select-sm { padding: 5px 8px; font-size: 12px; }

/* ── 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: hidden; }
.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 {
  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; }
