/**
 * Pollygram Admin — light premium sports-commerce dashboard
 * Shopify / Stripe–inspired clarity · refined dark sidebar · red accent
 */

:root {
  /* Canvas */
  --adm-canvas: #f5f7fb;
  --adm-canvas-warm: #faf9f7;
  --adm-surface: #ffffff;
  --adm-surface-muted: #f8fafc;

  /* Sidebar (refined dark) */
  --adm-sidebar: #111827;
  --adm-sidebar-hover: #1f2937;
  --adm-sidebar-active: rgba(185, 28, 28, 0.22);
  --adm-sidebar-border: rgba(255, 255, 255, 0.06);
  --adm-sidebar-text: #e5e7eb;
  --adm-sidebar-text-muted: #9ca3af;

  /* Text */
  --adm-text: #1f2937;
  --adm-text-secondary: #374151;
  --adm-muted: #64748b;
  --adm-border: #e8ecf2;
  --adm-border-soft: #eef2f7;

  /* Accent */
  --adm-accent: #b91c1c;
  --adm-accent-deep: #991b1b;
  --adm-accent-hover: #dc2626;
  --adm-accent-soft: rgba(185, 28, 28, 0.10);
  --adm-accent-ring: rgba(185, 28, 28, 0.22);
  --adm-gold: #b45309;
  --adm-gold-soft: rgba(180, 83, 9, 0.08);

  --adm-radius: 18px;
  --adm-radius-sm: 12px;
  --adm-radius-xs: 10px;

  --adm-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  --adm-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --adm-shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.1);
  --adm-shadow-red: 0 8px 28px rgba(185, 28, 28, 0.35);
  --adm-shadow-red-lg: 0 12px 40px rgba(185, 28, 28, 0.42);

  --adm-font: "Inter", system-ui, -apple-system, sans-serif;
  --adm-display: "Space Grotesk", var(--adm-font);
  --adm-sidebar-w: 272px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body.adm-body {
  margin: 0;
  font-family: var(--adm-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--adm-text);
  background: var(--adm-canvas);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.adm-hidden {
  display: none !important;
}

/* ——— Login ——— */
.adm-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(100% 70% at 50% -15%, rgba(185, 28, 28, 0.07), transparent 55%),
    linear-gradient(180deg, var(--adm-canvas-warm) 0%, var(--adm-canvas) 100%);
}

.adm-login-card {
  width: min(440px, 100%);
  background: var(--adm-surface);
  border: 1px solid var(--adm-border-soft);
  border-radius: var(--adm-radius);
  padding: 36px;
  box-shadow: var(--adm-shadow-md);
}

.adm-login-brand {
  font-family: var(--adm-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #111827;
}

.adm-login-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--adm-accent);
  margin: 8px 0 28px;
}

.adm-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--adm-muted);
  margin-bottom: 8px;
}

.adm-input,
.adm-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--adm-radius-sm);
  border: 1px solid var(--adm-border);
  background: var(--adm-surface);
  color: var(--adm-text);
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.adm-input:hover,
.adm-textarea:hover {
  border-color: #dce3ed;
}

.adm-input:focus,
.adm-textarea:focus {
  border-color: rgba(185, 28, 28, 0.45);
  box-shadow: 0 0 0 4px var(--adm-accent-ring);
}

.adm-textarea {
  resize: vertical;
  min-height: 96px;
}

.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--adm-radius-sm);
  font-family: var(--adm-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.adm-btn:active {
  transform: scale(0.98);
}

.adm-btn-primary {
  background: var(--adm-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.25);
}

.adm-btn-primary:hover:not(:disabled) {
  background: var(--adm-accent-hover);
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.32);
}

.adm-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.adm-btn-ghost {
  background: var(--adm-surface);
  color: var(--adm-text-secondary);
  border: 1px solid var(--adm-border);
  box-shadow: var(--adm-shadow);
}

.adm-btn-ghost:hover {
  background: var(--adm-surface-muted);
  border-color: #d1d9e6;
  color: var(--adm-text);
}

.adm-login-error {
  color: #b91c1c;
  font-size: 13px;
  min-height: 20px;
  margin-top: 10px;
}

.adm-note {
  font-size: 13px;
  color: var(--adm-muted);
  margin-top: 16px;
  line-height: 1.6;
}

.adm-note code {
  font-size: 12px;
  background: var(--adm-surface-muted);
  border: 1px solid var(--adm-border-soft);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--adm-text-secondary);
}

/* ——— App shell ——— */
.adm-app {
  display: grid;
  grid-template-columns: var(--adm-sidebar-w) 1fr;
  grid-template-rows: 60px 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  min-height: 100vh;
}

.adm-topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 16px;
  background: var(--adm-surface);
  border-bottom: 1px solid var(--adm-border-soft);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.adm-topbar-title {
  font-family: var(--adm-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  color: #111827;
}

.adm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-demo-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
  color: var(--adm-accent-deep);
  border: 1px solid rgba(185, 28, 28, 0.2);
}

.adm-demo-pill.adm-hidden {
  display: none;
}

/* Sidebar */
.adm-sidebar {
  grid-area: sidebar;
  background: var(--adm-sidebar);
  border-right: 1px solid var(--adm-sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 20px 0 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  transition: transform 0.25s ease;
}

.adm-sidebar-brand {
  padding: 8px 20px 22px;
  border-bottom: 1px solid var(--adm-sidebar-border);
  margin-bottom: 14px;
}

.adm-sidebar-brand-line {
  font-family: var(--adm-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--adm-sidebar-text);
}

.adm-sidebar-brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--adm-sidebar-text-muted);
  margin-top: 6px;
}

.adm-nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
  padding: 14px 20px 8px;
}

.adm-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 12px;
  width: calc(100% - 24px);
  padding: 11px 20px;
  border: none;
  border-radius: var(--adm-radius-sm);
  background: transparent;
  color: var(--adm-sidebar-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  border-left: 3px solid transparent;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.adm-nav-btn:hover {
  background: var(--adm-sidebar-hover);
  color: var(--adm-sidebar-text);
}

.adm-nav-btn.active {
  background: var(--adm-sidebar-active);
  color: #fef2f2;
  border-left-color: #ef4444;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.15);
}

.adm-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.88;
}

.adm-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 96px;
  left: 16px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--adm-border);
  background: var(--adm-surface);
  color: var(--adm-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--adm-shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.adm-sidebar-toggle:hover {
  box-shadow: var(--adm-shadow-lg);
}

.adm-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.adm-sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Main */
.adm-main {
  grid-area: main;
  padding: 32px 36px 128px;
  overflow-x: hidden;
  background: var(--adm-canvas);
}

.adm-panel {
  display: none;
  animation: admFade 0.24s ease;
}

.adm-panel.active {
  display: block;
}

@keyframes admFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.adm-page-head {
  margin-bottom: 28px;
}

.adm-page-title {
  font-family: var(--adm-display);
  font-weight: 600;
  font-size: clamp(1.65rem, 2.5vw, 2rem);
  letter-spacing: -0.035em;
  color: #111827;
  margin: 0 0 10px;
  line-height: 1.2;
}

.adm-page-desc {
  margin: 0;
  font-size: 14px;
  color: var(--adm-muted);
  max-width: 58ch;
  line-height: 1.6;
}

/* Cards */
.adm-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border-soft);
  border-radius: var(--adm-radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--adm-shadow);
}

.adm-card-title {
  font-family: var(--adm-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--adm-muted);
  margin-bottom: 16px;
}

.adm-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.adm-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* Metric cards */
.adm-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.adm-metric {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border-soft);
  border-radius: var(--adm-radius);
  padding: 20px 20px 18px 22px;
  padding-left: 72px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--adm-shadow);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.adm-metric:hover {
  box-shadow: var(--adm-shadow-md);
  transform: translateY(-2px);
}

.adm-metric::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 22px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fef2f2 0%, #fff 55%, var(--adm-gold-soft) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 10px rgba(15, 23, 42, 0.06);
  pointer-events: none;
}

.adm-metric:nth-child(2)::before {
  background: linear-gradient(145deg, #eff6ff 0%, #fff 60%, rgba(185, 28, 28, 0.06) 100%);
}

.adm-metric:nth-child(3)::before {
  background: linear-gradient(145deg, #fffbeb 0%, #fff 55%, var(--adm-gold-soft) 100%);
}

.adm-metric:nth-child(4)::before {
  background: linear-gradient(145deg, #f8fafc 0%, #fff 50%, #f1f5f9 100%);
}

.adm-metric:nth-child(5)::before {
  background: linear-gradient(145deg, #ecfdf5 0%, #fff 55%, rgba(16, 185, 129, 0.06) 100%);
}

.adm-metric::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 52%;
  height: 100%;
  background: radial-gradient(circle at 100% 0%, rgba(185, 28, 28, 0.06), transparent 62%);
  pointer-events: none;
}

.adm-metric-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--adm-muted);
  margin-bottom: 8px;
}

.adm-metric-value {
  font-family: var(--adm-display);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #111827;
  line-height: 1.15;
}

.adm-metric-hint {
  font-size: 12px;
  color: var(--adm-muted);
  margin-top: 8px;
  line-height: 1.45;
}

/* Products — inventory list + modal */
.adm-product-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-bottom: 14px;
}

.adm-product-toolbar-hint {
  margin: 0;
  font-size: 13px;
  color: var(--adm-muted);
  max-width: 46ch;
  line-height: 1.5;
}

.adm-product-inventory {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border-soft);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  overflow: hidden;
}

.adm-product-list-head {
  display: grid;
  grid-template-columns: 52px minmax(140px, 1.4fr) 100px 92px 88px minmax(168px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--adm-muted);
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--adm-border-soft);
}

.adm-product-list-head__actions {
  text-align: right;
}

.adm-product-list {
  display: flex;
  flex-direction: column;
}

.adm-product-row {
  display: grid;
  grid-template-columns: 52px minmax(140px, 1.4fr) 100px 92px 88px minmax(168px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--adm-border-soft);
  background: var(--adm-surface);
  transition: background 0.18s ease;
}

.adm-product-row:last-child {
  border-bottom: none;
}

.adm-product-row:hover {
  background: #f8fafc;
}

.adm-product-row__thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--adm-surface-muted);
  border: 1px solid var(--adm-border-soft);
  flex-shrink: 0;
}

.adm-product-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.adm-product-row__thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--adm-muted);
}

.adm-product-row__main {
  min-width: 0;
}

.adm-product-row__title {
  font-family: var(--adm-display);
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-product-row__sub {
  font-size: 12px;
  color: var(--adm-muted);
  margin-top: 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.adm-product-row__cell {
  font-size: 13px;
  color: var(--adm-text-secondary);
}

.adm-product-row__badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  background: #fef2f2;
  color: var(--adm-accent-deep);
  border: 1px solid rgba(185, 28, 28, 0.15);
  justify-self: start;
}

.adm-product-row__badge--empty {
  background: transparent;
  border-color: transparent;
  color: var(--adm-muted);
  font-weight: 500;
}

.adm-product-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.adm-product-empty {
  padding: 36px 24px;
  text-align: center;
}

.adm-product-empty__title {
  font-family: var(--adm-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: #111827;
  margin: 0 0 8px;
}

.adm-product-empty__hint {
  margin: 0 auto;
  max-width: 36ch;
}

/* Products — search + category pills + grouped inventory */
.adm-product-filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.adm-product-search-label {
  display: block;
  max-width: min(520px, 100%);
}

.adm-product-search-label__text {
  margin-bottom: 8px;
}

.adm-product-search {
  width: 100%;
}

.adm-product-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.adm-product-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--adm-border);
  background: var(--adm-surface);
  font-family: var(--adm-font);
  font-size: 12px;
  font-weight: 600;
  color: var(--adm-text-secondary);
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.adm-product-pill:hover {
  border-color: rgba(185, 28, 28, 0.35);
  background: #fff;
}

.adm-product-pill--active {
  border-color: rgba(185, 28, 28, 0.45);
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.12), rgba(185, 28, 28, 0.06));
  color: var(--adm-accent-deep);
  box-shadow: 0 2px 10px rgba(185, 28, 28, 0.12);
}

.adm-product-pill__count {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--adm-surface-muted);
  color: var(--adm-muted);
}

.adm-product-pill--active .adm-product-pill__count {
  background: rgba(185, 28, 28, 0.15);
  color: var(--adm-accent-deep);
}

.adm-product-list--by-category {
  gap: 0;
}

.adm-product-cat {
  margin-bottom: 16px;
  border-radius: var(--adm-radius-sm);
  border: 1px solid var(--adm-border-soft);
  background: linear-gradient(180deg, #fafbfc 0%, var(--adm-surface) 100%);
  box-shadow: var(--adm-shadow);
  overflow: hidden;
}

.adm-product-cat:last-child {
  margin-bottom: 0;
}

.adm-product-cat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--adm-border-soft);
}

.adm-product-cat__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.adm-product-cat__toggle:focus-visible {
  outline: 2px solid rgba(185, 28, 28, 0.45);
  outline-offset: 3px;
  border-radius: 10px;
}

.adm-product-cat__chev {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--adm-muted);
  transition: transform 0.22s ease;
}

.adm-product-cat--collapsed .adm-product-cat__chev {
  transform: rotate(-90deg);
}

.adm-product-cat__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  min-width: 0;
}

.adm-product-cat__title {
  font-family: var(--adm-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: #111827;
}

.adm-product-cat__count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--adm-muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border-soft);
}

.adm-product-cat__add {
  flex-shrink: 0;
}

.adm-product-cat__body {
  background: var(--adm-surface);
}

.adm-product-cat--collapsed .adm-product-cat__body {
  display: none;
}

.adm-product-list-head--section {
  grid-template-columns: 52px minmax(140px, 1.4fr) 92px 88px minmax(168px, auto);
}

.adm-product-row.adm-product-row--in-section {
  grid-template-columns: 52px minmax(140px, 1.4fr) 92px 88px minmax(168px, auto);
}

.adm-product-cat__empty {
  padding: 22px 16px 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--adm-muted);
  border-top: 1px dashed var(--adm-border-soft);
}

.adm-field--inline-check {
  display: flex;
  align-items: center;
  min-height: 48px;
}

.adm-label--checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  color: var(--adm-text);
}

.adm-label--checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--adm-accent);
}

.adm-product-row--dragging {
  opacity: 0.55;
  outline: 2px dashed var(--adm-accent);
}

.adm-product-list .adm-product-row[draggable='true'] {
  cursor: grab;
}

.adm-product-list .adm-product-row[draggable='true']:active {
  cursor: grabbing;
}

.adm-btn-xs {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--adm-radius-xs);
}

@media (max-width: 960px) {
  .adm-product-list-head {
    display: none;
  }

  .adm-product-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 14px;
    padding: 14px;
  }

  .adm-product-row__thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }

  .adm-product-row__main {
    flex: 1;
    min-width: 0;
  }

  .adm-product-row__cell {
    flex: 1 1 42%;
    min-width: 100px;
    font-size: 12px;
  }

  .adm-product-row__cell--category::before {
    content: "Category";
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--adm-muted);
    margin-bottom: 4px;
  }

  .adm-product-row__cell--price::before {
    content: "Price";
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--adm-muted);
    margin-bottom: 4px;
  }

  .adm-product-filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .adm-product-filter-pills::-webkit-scrollbar {
    display: none;
  }

  .adm-product-cat__header {
    align-items: flex-start;
  }

  .adm-product-row__badge {
    flex: 1 1 auto;
  }

  .adm-product-row__actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid var(--adm-border-soft);
  }
}

/* Product modal */
body.adm-modal-open {
  overflow: hidden;
}

.adm-modal-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
}

.adm-modal-root.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.adm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.adm-modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--adm-surface);
  border-radius: var(--adm-radius);
  border: 1px solid var(--adm-border-soft);
  box-shadow: var(--adm-shadow-lg);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition:
    transform 0.32s cubic-bezier(0.34, 1.15, 0.64, 1),
    opacity 0.28s ease;
}

.adm-modal-root.is-open .adm-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.adm-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--adm-border-soft);
}

.adm-modal__title {
  font-family: var(--adm-display);
  font-size: clamp(1.35rem, 2.5vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #111827;
  margin: 0 0 6px;
}

.adm-modal__subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--adm-muted);
  line-height: 1.5;
  max-width: 52ch;
}

.adm-modal__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--adm-radius-sm);
  background: var(--adm-surface-muted);
  color: var(--adm-text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.adm-modal__close:hover {
  background: #f1f5f9;
  color: #111827;
}

.adm-modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.adm-modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--adm-border-soft);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.adm-modal-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

@media (max-width: 640px) {
  .adm-modal-grid-2 {
    grid-template-columns: 1fr;
  }

  /* Bottom-sheet style — thumb-friendly on phones */
  .adm-modal-root {
    align-items: flex-end;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .adm-modal {
    width: 100%;
    max-width: 100%;
    max-height: min(96dvh, 100%);
    border-radius: 20px 20px 0 0;
    transform: translateY(105%);
  }

  .adm-modal-root.is-open .adm-modal {
    transform: translateY(0);
  }

  .adm-modal__header {
    padding: 18px 18px 14px;
  }

  .adm-modal__body {
    padding: 16px 18px 20px;
  }

  .adm-modal__footer {
    padding: 14px 18px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .adm-modal__close {
    width: 48px;
    height: 48px;
    font-size: 26px;
  }

  .adm-modal-image-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .adm-modal-root,
  .adm-modal {
    transition-duration: 0.01ms !important;
  }

  .adm-modal {
    transform: none !important;
  }

  .adm-modal-root.is-open .adm-modal {
    transform: none !important;
  }
}

.adm-modal-image-section {
  margin-top: 4px;
}

.adm-modal-image-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: start;
}

.adm-modal-preview {
  aspect-ratio: 4/3;
  border-radius: var(--adm-radius-sm);
  border: 1px dashed #cbd5e1;
  background: var(--adm-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.adm-modal-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.adm-modal-preview-placeholder {
  font-size: 12px;
  color: var(--adm-muted);
  text-align: center;
  padding: 12px;
  line-height: 1.45;
}

.adm-modal-preview-placeholder--error {
  color: #b91c1c;
}

.adm-field-error {
  font-size: 13px;
  font-weight: 600;
  color: #b91c1c;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--adm-radius-xs);
  background: #fef2f2;
  border: 1px solid rgba(185, 28, 28, 0.2);
}

.adm-input--error {
  border-color: rgba(185, 28, 28, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12) !important;
}

.adm-req {
  color: var(--adm-accent);
}

.adm-field {
  margin-bottom: 14px;
}

.adm-field:last-child {
  margin-bottom: 0;
}

.adm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--adm-border-soft);
  border-radius: var(--adm-radius);
  background: var(--adm-surface);
  box-shadow: var(--adm-shadow);
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.adm-table th,
.adm-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--adm-border-soft);
}

.adm-table th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--adm-muted);
  background: linear-gradient(180deg, #fafbfc 0%, #f4f6f9 100%);
}

.adm-table tbody tr {
  background: var(--adm-surface);
  transition: background 0.15s ease;
}

.adm-table tbody tr:hover td {
  background: #f8fafc;
}

.adm-table tbody tr:last-child td {
  border-bottom: none;
}

.adm-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.adm-badge-warn {
  background: #fffbeb;
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.25);
}

.adm-wa-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.adm-seo-preview {
  border: 1px solid var(--adm-border-soft);
  border-radius: var(--adm-radius-sm);
  padding: 16px 18px;
  background: var(--adm-surface-muted);
  margin-top: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.adm-seo-preview-url {
  font-size: 12px;
  color: #15803d;
  margin-bottom: 6px;
}

.adm-seo-preview-title {
  font-family: var(--adm-display);
  font-size: 16px;
  color: #1d4ed8;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.adm-seo-preview-desc {
  font-size: 13px;
  color: var(--adm-text-secondary);
  line-height: 1.5;
}

/* Category rows */
.adm-cat-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--adm-border-soft);
}

.adm-cat-row:last-child {
  border-bottom: none;
}

.adm-promo-list .adm-card {
  padding: 16px 18px;
}

/* Floating save */
.adm-save-float {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.adm-save-status {
  font-size: 12px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border-soft);
  color: var(--adm-muted);
  box-shadow: var(--adm-shadow-md);
}

.adm-save-status.is-dirty {
  color: #b45309;
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.35);
}

.adm-save-status.is-saving {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: rgba(59, 130, 246, 0.25);
}

.adm-save-status.is-ok {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.25);
}

.adm-fab-save {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(165deg, var(--adm-accent-hover) 0%, var(--adm-accent) 45%, var(--adm-accent-deep) 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    var(--adm-shadow-red),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.adm-fab-save:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    var(--adm-shadow-red-lg),
    0 0 32px rgba(185, 28, 28, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  filter: brightness(1.05);
}

.adm-fab-save:active:not(:disabled) {
  transform: translateY(-1px) scale(1.01);
}

.adm-fab-save:disabled {
  opacity: 0.55;
  cursor: wait;
  filter: grayscale(0.15);
  box-shadow: var(--adm-shadow);
}

/* Demo alert */
.adm-alert {
  padding: 14px 18px;
  border-radius: var(--adm-radius-sm);
  background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 100%);
  border: 1px solid rgba(185, 28, 28, 0.18);
  color: var(--adm-accent-deep);
  font-size: 13px;
  margin-bottom: 22px;
  line-height: 1.5;
}

/* Mobile */
@media (max-width: 960px) {
  .adm-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .adm-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 88vw);
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: var(--adm-shadow-lg);
    z-index: 55;
  }

  .adm-sidebar.is-open {
    transform: translateX(0);
  }

  .adm-topbar {
    flex-shrink: 0;
  }

  .adm-main {
    flex: 1;
    padding: 22px 18px 132px;
    min-width: 0;
  }

  .adm-sidebar-toggle {
    display: flex;
  }

  .adm-sidebar-overlay {
    display: block;
  }

  .adm-grid-2,
  .adm-grid-3 {
    grid-template-columns: 1fr;
  }

  .adm-save-float {
    right: 18px;
    bottom: 18px;
  }

  .adm-cat-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 961px) {
  .adm-sidebar-overlay.is-visible {
    display: none !important;
  }
}

/* ——— Leads & Sales CRM ——— */
.adm-sales-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.adm-metric--sales .adm-metric-value {
  font-size: 1.35rem;
}

.adm-lead-notifs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 12px 16px;
  border-radius: var(--adm-radius-sm);
  background: color-mix(in srgb, var(--adm-accent) 8%, var(--adm-surface));
  border: 1px solid color-mix(in srgb, var(--adm-accent) 18%, var(--adm-border));
  font-size: 13px;
  color: var(--adm-text-secondary);
  margin-bottom: 16px;
}

.adm-lead-notifs__item strong {
  color: var(--adm-accent);
}

.adm-leads-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.adm-leads-view-toggle {
  display: flex;
  gap: 8px;
}

.adm-leads-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
}

.adm-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.adm-filter-field--grow {
  flex: 1 1 200px;
}

.adm-filter-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.adm-input--sm {
  min-height: 40px;
  font-size: 13px;
  padding: 8px 12px;
}

.adm-analytics-card {
  margin-bottom: 16px;
}

.adm-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.adm-analytics-subtitle {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--adm-muted);
  margin: 0 0 8px;
}

.adm-analytics-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--adm-text-secondary);
  line-height: 1.5;
}

.adm-analytics-empty {
  list-style: none;
  margin-left: -18px;
  color: var(--adm-muted);
}

.adm-revenue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.adm-metric--revenue .adm-metric-value {
  font-size: 1.15rem;
  font-weight: 700;
}

.adm-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.adm-status-badge--new {
  background: color-mix(in srgb, #3b82f6 18%, transparent);
  color: #1e40af;
}
.adm-status-badge--contacted {
  background: color-mix(in srgb, #8b5cf6 16%, transparent);
  color: #5b21b6;
}
.adm-status-badge--quote_sent {
  background: color-mix(in srgb, var(--adm-gold) 20%, transparent);
  color: #92400e;
}
.adm-status-badge--negotiating {
  background: color-mix(in srgb, #f59e0b 22%, transparent);
  color: #b45309;
}
.adm-status-badge--won {
  background: color-mix(in srgb, #22c55e 22%, transparent);
  color: #166534;
}
.adm-status-badge--lost {
  background: color-mix(in srgb, #94a3b8 25%, transparent);
  color: #475569;
}

.adm-td-clip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.adm-th-actions {
  min-width: 200px;
}

.adm-kanban-wrap {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
}

.adm-kanban-col {
  flex: 0 0 min(280px, 85vw);
  background: var(--adm-surface-muted);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-sm);
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 560px);
}

.adm-kanban-col-head {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--adm-muted);
  border-bottom: 1px solid var(--adm-border);
}

.adm-kanban-col-body {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
}

.adm-kanban-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: grab;
  box-shadow: var(--adm-shadow);
}

.adm-kanban-card-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.adm-kanban-card-meta {
  font-size: 11px;
  color: var(--adm-muted);
  line-height: 1.35;
}

.adm-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.adm-timeline-item {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--adm-border-soft);
}

.adm-timeline-time {
  font-size: 11px;
  color: var(--adm-muted);
}

.adm-modal--wide {
  max-width: min(760px, 96vw);
}

.adm-modal__footer--split {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.adm-modal__footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.adm-btn-danger-text {
  color: var(--adm-accent) !important;
  border-color: color-mix(in srgb, var(--adm-accent) 35%, var(--adm-border)) !important;
}

@media (max-width: 720px) {
  .adm-leads-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .adm-filter-field,
  .adm-filter-field--grow {
    width: 100%;
  }

  .adm-kanban-wrap {
    flex-direction: column;
    overflow: visible;
  }

  .adm-kanban-col {
    flex: 1 1 auto;
    max-width: 100%;
    max-height: none;
  }
}
