/* ============================================================
   Brands — two-column master-detail (no hierarchy, no drag).
   Mirrors the Categories layout but trimmed: no drag handle,
   no tree indent, no color picker, no tax tag.
   ============================================================ */

.brand-list { list-style: none; padding: 0; margin: 0; }

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background 100ms ease;
}
.brand-list > li:last-child .brand-row { border-bottom: none; }
.brand-row:hover { background: var(--bg-hover); }

.brand-row.is-selected { background: var(--bg-hover); }
.brand-row.is-selected::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 2.5px;
  background: var(--accent);
}

.brand-row-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.brand-row-link::before {
  content: '';
  position: absolute;
  inset: 0;
  cursor: pointer;
}
.brand-row-toggle {
  position: relative;
  z-index: 1;
}

/* Initial avatar — first letter of the brand name in a soft tile. */
.brand-tile {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.brand-tile-lg {
  width: 48px; height: 48px;
  border-radius: 10px;
  font-size: 18px;
}

/* Logo thumbnail replaces the letter when a brand has an uploaded
   image. Object-fit: contain so wide / tall logos don't distort. */
.brand-tile-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.brand-row-body { flex: 1; min-width: 0; line-height: 1.3; }
.brand-row-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-row-meta {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Status toggle (shared shape with .cat-row-toggle) ──────── */
.brand-row-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  padding: 0;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.brand-row-toggle:hover { border-color: var(--accent); }
.brand-row-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.brand-row-toggle:disabled { opacity: 0.6; cursor: progress; }

.brand-row-toggle-thumb {
  display: block;
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--text-tertiary);
  transition: transform 140ms cubic-bezier(.4,0,.2,1), background 120ms ease;
}
.brand-row-toggle.is-on {
  background: var(--accent);
  border-color: var(--accent);
}
.brand-row-toggle.is-on .brand-row-toggle-thumb {
  background: #fff;
  transform: translateX(16px);
}
[dir="rtl"] .brand-row-toggle.is-on .brand-row-toggle-thumb {
  transform: translateX(-16px);
}

.brand-row.is-inactive .brand-row-name,
.brand-row.is-inactive .brand-row-meta {
  opacity: 0.55;
}

/* ── List empty state ───────────────────────────────────────── */
.brand-empty { padding: 48px 24px; text-align: center; }
.brand-empty-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.brand-empty-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.brand-empty-sub {
  font-size: 12px; color: var(--text-tertiary);
  margin-top: 6px; max-width: 280px; margin-inline: auto; line-height: 1.5;
}

/* ── Right-column editor ────────────────────────────────────── */
.brand-editor { position: sticky; top: 16px; }
.brand-editor-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.brand-editor-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.brand-editor-id   { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }
.brand-editor-id .mono { font-family: var(--font-mono); }

.brand-editor-empty { padding: 40px 24px; text-align: center; }
.brand-editor-empty-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.brand-editor-empty-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.brand-editor-empty-sub   { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

.brand-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  margin-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
