/**
 * Estilos globais do MaredeVendas.
 *
 * Estrutura:
 * 1. Variáveis CSS (tema claro/escuro via data-theme)
 * 2. Reset e tipografia base
 * 3. Layout (header, main, container)
 * 4. Componentes (cards, forms, dashboard, cart)
 *
 * Manutenção: preferir variáveis CSS a cores hardcoded.
 * Melhorias futuras: separar em arquivos por domínio (layout.css, components.css).
 */
:root,
[data-theme='light'] {
  /* Paleta Instagram — tema claro */
  --ig-purple: #833ab4;
  --ig-pink: #e1306c;
  --ig-red: #fd1d1d;
  --ig-orange: #f56040;
  --ig-yellow: #fcaf45;
  --ig-gradient: linear-gradient(135deg, #833ab4 0%, #e1306c 45%, #f56040 100%);
  --ig-gradient-subtle: linear-gradient(
    135deg,
    rgb(252 175 69 / 0.14) 0%,
    rgb(225 48 108 / 0.1) 45%,
    rgb(131 58 180 / 0.12) 100%
  );
  --primary-50: #fff0f6;
  --primary-100: #ffd6e8;
  --primary-600: #e1306c;
  --primary-700: #c13584;
  --green-600: #16a34a;
  --green-700: #15803d;
  --red-500: #ef4444;
  --amber-500: #f59e0b;
  --surface: #ffffff;
  --surface-secondary: #fafafa;
  --surface-tertiary: #f5f5f5;
  --text: #262626;
  --text-secondary: #8e8e8e;
  --text-muted: #a8a8a8;
  --border: #dbdbdb;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 25px rgb(0 0 0 / 0.1);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --header-h: 3rem;
  --font: 'Inter', system-ui, sans-serif;
  --nav-btn-color: var(--text-secondary);
  --nav-btn-bg: transparent;
  --nav-btn-border: transparent;
  --nav-btn-hover-color: var(--text);
  --nav-btn-hover-bg: var(--surface-tertiary);
  --nav-btn-active-color: var(--primary-700);
  --nav-btn-active-bg: var(--primary-50);
  --nav-btn-active-border: color-mix(in srgb, var(--primary-600) 22%, transparent);
}

[data-theme='dark'] {
  /* Paleta Twitter/X — dark mode */
  --primary-50: rgb(29 155 240 / 0.12);
  --primary-100: rgb(29 155 240 / 0.2);
  --primary-600: #1d9bf0;
  --primary-700: #1a8cd8;
  --surface: #16181c;
  --surface-secondary: #000000;
  --surface-tertiary: #202327;
  --text: #e7e9ea;
  --text-secondary: #71767b;
  --text-muted: #536471;
  --border: #2f3336;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.5);
  --nav-btn-hover-bg: rgb(231 233 234 / 0.08);
  --nav-btn-active-color: #1d9bf0;
  --nav-btn-active-bg: rgb(29 155 240 / 0.12);
  --nav-btn-active-border: rgb(29 155 240 / 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--surface-secondary);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

img { max-width: 100%; display: block; }

.hidden { display: none !important; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(12px);
}

.header--admin {
  height: auto;
}

.header__inner {
  max-width: 80rem;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
}

.logo__icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  background: var(--primary-600);
  display: grid;
  place-items: center;
  color: white;
  font-size: 0.875rem;
}

[data-theme='light'] .logo span.accent,
:root:not([data-theme='dark']) .logo span.accent {
  background: var(--ig-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme='dark'] .logo span.accent {
  color: var(--primary-600);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid var(--nav-btn-border);
  color: var(--nav-btn-color);
  background: var(--nav-btn-bg);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.nav-btn:hover {
  color: var(--nav-btn-hover-color);
  background: var(--nav-btn-hover-bg);
}

.nav-btn.active {
  color: var(--nav-btn-active-color);
  background: var(--nav-btn-active-bg);
  border-color: var(--nav-btn-active-border);
}

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

.nav-btn__icon {
  font-size: 0.875rem;
  line-height: 1;
}

.nav-btn--block { width: 100%; }

.nav-mobile__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding-bottom: 0.625rem;
  margin-bottom: 0.375rem;
  border-bottom: 1px solid var(--border);
}

.nav-mobile__actions--single {
  grid-template-columns: 1fr;
}

.nav-mobile__actions .nav-btn {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}

/* Auto-hide do header no mobile — controlado por js/header-scroll.js */
@media (max-width: 767px) {
  .header {
    transition: transform 0.25s ease;
    will-change: transform;
  }

  .header--scroll-hidden {
    transform: translateY(-100%);
    pointer-events: none;
  }

  html.header-scroll-hidden .toolbar--sticky {
    top: 0;
  }

  .nav-mobile__actions .nav-btn {
    color: var(--text);
    background: var(--surface-tertiary);
    border-color: var(--border);
  }

  .nav-mobile__actions .nav-btn:hover {
    background: color-mix(in srgb, var(--surface-tertiary) 70%, var(--text) 5%);
  }

  .nav-mobile__actions .nav-btn.active {
    color: var(--nav-btn-active-color);
    background: var(--nav-btn-active-bg);
    border-color: var(--nav-btn-active-border);
  }
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-tertiary);
  color: var(--text);
}

.icon-btn--active {
  background: var(--primary-100);
  color: var(--primary-600);
}

.header-dropdown {
  position: relative;
}

.header-dropdown__panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 13rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 50;
}

.header-dropdown.open .header-dropdown__panel {
  display: block;
}

.admin-menu__title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.375rem 0.625rem 0.5rem;
}

.admin-menu__item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

.admin-menu__item:hover,
.admin-menu__item.active {
  background: var(--primary-50);
  color: var(--primary-700);
}

[data-theme='dark'] .admin-menu__item:hover,
[data-theme='dark'] .admin-menu__item.active {
  background: var(--primary-50);
  color: var(--primary-600);
}

.admin-menu__item--muted { color: var(--text-muted); }
.admin-menu__icon { width: 1.25rem; text-align: center; }
.admin-menu__divider { height: 1px; background: var(--border); margin: 0.375rem 0; }

.admin-toolbar {
  border-top: 1px solid var(--border);
  background: var(--surface-secondary);
}

.admin-toolbar__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  overflow-x: auto;
}

.admin-toolbar__tabs {
  display: flex;
  gap: 0.375rem;
  flex-wrap: nowrap;
}

.admin-toolbar__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.admin-toolbar__tab-icon {
  line-height: 1;
}

.admin-toolbar__refresh {
  flex-shrink: 0;
}

.admin-toolbar__refresh-icon {
  line-height: 1;
}

.admin-toolbar__tab:hover,
.admin-toolbar__tab.active {
  background: var(--primary-600);
  color: white;
}

.admin-toolbar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  background: var(--amber-500);
  color: #1a1a1a;
}

.admin-toolbar__tab.active .admin-toolbar__badge {
  background: white;
  color: var(--primary-700);
}

.nav-mobile__section {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.75rem 0.75rem 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

[data-theme='light'] .btn-primary,
:root:not([data-theme='dark']) .btn-primary {
  background: var(--ig-gradient);
  color: white;
  border: none;
}

[data-theme='light'] .btn-primary:hover:not(:disabled),
:root:not([data-theme='dark']) .btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

[data-theme='dark'] .btn-primary {
  background: var(--primary-600);
  color: white;
}

[data-theme='dark'] .btn-primary:hover:not(:disabled) {
  background: var(--primary-700);
  filter: none;
}

.btn-green { background: var(--green-600); color: white; }
.btn-green:hover:not(:disabled) { background: var(--green-700); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) { background: var(--surface-tertiary); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

.btn-block { width: 100%; }

.menu-toggle { display: grid; }

.menu-toggle__icon {
  display: grid;
  gap: 0.2rem;
  width: 1.125rem;
}

.menu-toggle__icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
}

.menu-toggle--open .menu-toggle__icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle--open .menu-toggle__icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle--open .menu-toggle__icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.icon-btn--cart {
  position: relative;
}

.icon-btn__glyph {
  font-size: 1.0625rem;
  line-height: 1;
}

.icon-btn__badge {
  position: absolute;
  top: 0.125rem;
  right: 0.125rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--primary-600);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}

.header__backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  border: none;
  background: rgb(0 0 0 / 0.42);
  cursor: pointer;
}

.body--menu-open {
  overflow: hidden;
}

.nav-mobile {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 31;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 0.75rem 1rem 1rem;
  box-shadow: var(--shadow-lg);
}

.nav-mobile.open { display: block; }

.nav-mobile__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-xl);
  background: var(--surface-tertiary);
}

.nav-mobile__avatar {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--primary-100);
  font-size: 1.125rem;
}

.nav-mobile__user-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.nav-mobile__user-text strong {
  font-size: 0.9375rem;
  color: var(--text);
}

.nav-mobile__user-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-mobile__link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.6875rem 0.75rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-mobile__link-icon {
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.nav-mobile__link:hover,
.nav-mobile__link.active {
  background: var(--primary-50);
  color: var(--primary-700);
}

.nav-mobile__divider {
  height: 1px;
  margin: 0.5rem 0;
  background: var(--border);
}

.nav-mobile__footer {
  display: grid;
  gap: 0.375rem;
  margin-top: 0.5rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
}

.nav-mobile__utility {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.6875rem 0.75rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.nav-mobile__utility:hover {
  background: var(--surface-tertiary);
  color: var(--text);
}

.nav-mobile__utility--danger:hover {
  background: rgb(220 38 38 / 0.1);
  color: #dc2626;
}

.nav-mobile a:not(.nav-btn):not(.nav-mobile__link), .nav-mobile button:not(.nav-mobile__utility) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.nav-mobile a:not(.nav-btn):not(.nav-mobile__link):hover,
.nav-mobile button:not(.nav-mobile__utility):hover {
  background: var(--surface-tertiary);
  color: var(--text);
}

@media (max-width: 767px) {
  :root {
    --header-h: 3.25rem;
  }

  .header {
    transition: transform 0.25s ease;
    will-change: transform;
  }

  .header--scroll-hidden {
    transform: translateY(-100%);
    pointer-events: none;
  }

  html.header-scroll-hidden .toolbar--sticky {
    top: 0;
  }

  .logo__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 9.5rem;
  }

  .header__action--desktop {
    display: none;
  }

  .header--customer .header__actions {
    gap: 0.125rem;
  }

  .header--customer-account .customer-page .customer-tabs {
    display: none;
  }

  .customer-toolbar .admin-toolbar__inner {
    padding: 0.5rem 0.75rem;
  }

  .customer-toolbar .admin-toolbar__tabs {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: 0.125rem;
  }

  .customer-toolbar .admin-toolbar__tabs::-webkit-scrollbar {
    display: none;
  }

  .customer-toolbar .admin-toolbar__tab {
    scroll-snap-align: start;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 3.25rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.625rem;
    line-height: 1.2;
    text-align: center;
  }

  .customer-toolbar .admin-toolbar__tab-icon {
    font-size: 1.125rem;
  }

  .customer-toolbar .admin-toolbar__tab-label {
    max-width: 4.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
  .header__backdrop { display: none; }
}

/* Main */
.main { min-height: calc(100dvh - var(--header-h)); }

.container { max-width: 42rem; margin: 0 auto; padding: 0 1rem; }
.container-wide { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }

/* Search & filters */
.toolbar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0.5rem 0;
}

.toolbar--sticky {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  box-shadow: 0 1px 0 var(--border);
}

.search-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-secondary);
  font-size: 0.875rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-600);
}

.search-field {
  position: relative;
  display: block;
}

.search-field__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9375rem;
  line-height: 1;
  pointer-events: none;
  opacity: 0.55;
}

.search-field__input {
  padding-left: 2.25rem;
}

.category-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
  min-width: 0;
  flex: 1;
}

.category-scroll::-webkit-scrollbar { display: none; }

.category-scroll--fade {
  mask-image: linear-gradient(to right, transparent, #000 0.75rem, #000 calc(100% - 0.75rem), transparent);
}

.chip {
  flex-shrink: 0;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.chip:hover { border-color: var(--primary-600); color: var(--text); }
.chip.active { background: var(--primary-600); border-color: var(--primary-600); color: white; }

.chip--neighborhood.active {
  background: rgb(22 163 74);
  border-color: rgb(22 163 74);
}

.chip--category.active {
  background: var(--primary-600);
  border-color: var(--primary-600);
}

/* Home page */
.home-page {
  padding-bottom: 2rem;
}

[data-theme='light'] .home-hero,
:root:not([data-theme='dark']) .home-hero {
  background: var(--ig-gradient-subtle);
  border-bottom: 1px solid var(--border);
}

[data-theme='dark'] .home-hero {
  background: linear-gradient(135deg, rgb(29 155 240 / 0.1), var(--surface-secondary));
  border-bottom: 1px solid var(--border);
}

.home-hero__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 1rem;
}

.home-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-600);
  margin-bottom: 0.25rem;
}

.home-hero__title {
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.375rem;
}

.home-hero__location {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.home-hero__stats {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.home-hero__cta {
  flex-shrink: 0;
  white-space: nowrap;
}

.home-toolbar__inner {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.75rem 0;
}

.home-toolbar__filters {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  overflow: hidden;
  max-height: 8rem;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

/* Filtros recolhidos na home — controlado por js/home-filters-scroll.js */
.home-toolbar__filters--hidden {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .home-toolbar__filters {
    transition: none;
  }

  @media (max-width: 767px) {
    .header {
      transition: none;
    }
  }
}

.home-toolbar__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.home-toolbar__label {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  width: 4.25rem;
}

.home-content {
  padding-top: 1rem;
}

.home-tabs--pill {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 0.875rem;
  border-radius: 999px;
  background: var(--surface-tertiary);
  border: 1px solid var(--border);
}

.home-tab {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.home-tab:hover { color: var(--text); }

.home-tab.active {
  background: var(--surface);
  color: var(--primary-600);
  box-shadow: var(--shadow);
}

[data-theme='dark'] .home-tab.active {
  background: var(--surface-tertiary);
  color: var(--primary-600);
}

.home-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgb(245 158 11 / 0.2);
  color: #b45309;
}

[data-theme='light'] .home-tab.active .home-tab__count,
:root:not([data-theme='dark']) .home-tab.active .home-tab__count {
  background: rgb(225 48 108 / 0.15);
  color: var(--primary-600);
}

[data-theme='dark'] .home-tab.active .home-tab__count {
  background: var(--primary-50);
  color: var(--primary-600);
}

.home-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.home-empty__icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.home-empty h2 {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.home-empty p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  max-width: 22rem;
  margin-inline: auto;
}

.home-error {
  padding: 2rem 0;
}

.skeleton-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.skeleton-card__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(90deg, var(--surface-tertiary) 25%, var(--surface-secondary) 50%, var(--surface-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-card__lines {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-line {
  height: 0.75rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--surface-tertiary) 25%, var(--surface-secondary) 50%, var(--surface-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-line--lg { width: 75%; height: 0.875rem; }
.skeleton-line--sm { width: 45%; }

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Cards */
.home-tabs { margin-bottom: 0.75rem; padding-bottom: 0.5rem; }

.customer-register-store {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.125rem;
  border: 1px solid color-mix(in srgb, var(--primary-600) 22%, var(--border));
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary-50) 80%, var(--surface)),
    var(--surface)
  );
}

.customer-register-store__content {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  flex: 1;
  min-width: min(100%, 14rem);
}

.customer-register-store__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: var(--primary-100);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.customer-register-store__title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.125rem;
}

.customer-register-store__desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.customer-page .customer-tabs {
  margin-bottom: 1.25rem;
}

@media (max-width: 767px) {
  .customer-register-store {
    flex-direction: column;
    align-items: stretch;
  }

  .customer-register-store .btn {
    width: 100%;
  }
}

.customer-tab__icon {
  margin-right: 0.25rem;
}

.customer-feed-preview {
  padding: 0;
}

.customer-metrics {
  margin-bottom: 0.25rem;
}

.customer-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.customer-order-card {
  padding: 1rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.customer-order-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.customer-order-card__store {
  font-size: 1rem;
  font-weight: 600;
}

.customer-order-card__store a:hover {
  color: var(--primary-600);
}

.customer-order-card__meta {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.customer-order-card__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
  flex-shrink: 0;
}

.customer-order-card__total {
  font-size: 1rem;
  color: var(--primary-600);
}

.customer-order-card__items,
.customer-order-card__payment {
  margin-top: 0.625rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.customer-profile {
  display: grid;
  gap: 2rem;
}

.customer-profile__password h2 {
  font-size: 1.0625rem;
  margin-bottom: 0.375rem;
}

.customer-profile__password .form-hint {
  margin-bottom: 1rem;
}

.feed { display: flex; flex-direction: column; gap: 1rem; padding: 0.75rem 0 2rem; }

/* Feed "Para você": mobile 2 colunas; anúncios ocupam a linha inteira (2 slots). */
.feed--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.25rem 0 1.5rem;
}

.feed__item {
  min-width: 0;
  animation: feed-item-in 0.35s ease both;
}

/* Anúncio patrocinado: largura de 2 cards (mobile) ou 6 cards (desktop ≥768px). */
.feed__item--ad {
  grid-column: span 2;
}

.feed__item--store .store-card,
.feed__item--product .feed-product-card,
.feed__item--ad .feed-ad-card {
  height: 100%;
}

.feed__item--product .feed-product-card__inner {
  flex-direction: column;
  padding: 0.75rem;
}

.feed__item--product .feed-product-card__media {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.feed__item--product .feed-product-card__media-link {
  height: 100%;
}

.feed__item--product .feed-product-card__desc {
  display: none;
}

.feed__item--product .feed-product-card__footer {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.feed__item--product .feed-product-card__footer .btn {
  width: 100%;
  justify-content: center;
}

.feed__item--store .store-card__title {
  font-size: 1rem;
}

.feed__item--store .store-card__body {
  padding: 1.5rem 0.875rem 0.875rem;
}

@keyframes feed-item-in {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

.feed-label { font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); padding: 0 0.125rem 0.5rem; }

/* Desktop: grid 6 colunas — loja/produto span 2 (3 por linha); anúncio span 6 (banner). */
@media (min-width: 768px) {
  .feed--grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .feed__item--store,
  .feed__item--product {
    grid-column: span 2;
  }

  .feed__item--ad {
    grid-column: span 6;
  }

  .feed__item--product .feed-product-card__desc {
    display: -webkit-box;
  }

  .feed__item--ad .feed-ad-card__inner {
    grid-template-columns: minmax(10rem, 14rem) 1fr;
    gap: 1.25rem;
    padding: 1.125rem 1.25rem;
    min-height: 10.5rem;
    align-items: center;
  }

  .feed__item--ad .feed-ad-card__title {
    font-size: 1.125rem;
  }

  .feed__item--ad .feed-ad-card__message {
    -webkit-line-clamp: 4;
  }
}

@media (max-width: 480px) {
  .home-hero__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .home-hero__cta {
    width: 100%;
    text-align: center;
  }

  .home-toolbar__label {
    display: none;
  }
}

.store-card__plan-badge {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 2;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  background: rgb(0 0 0 / 0.45);
  backdrop-filter: blur(4px);
}

.store-card__plan-badge--premium { background: rgb(147 51 234 / 0.85); }
.store-card__plan-badge--plus { background: rgb(22 163 74 / 0.85); }

.feed-ad-card {
  position: relative;
  border: 1px solid rgb(245 158 11 / 0.45);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgb(245 158 11 / 0.08), var(--surface));
  overflow: hidden;
}

.feed-ad-card__label {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  z-index: 2;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #92400e;
  background: rgb(245 158 11 / 0.2);
}

.feed-ad-card__inner {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.875rem;
  padding: 0.875rem;
  min-height: 6.75rem;
  align-items: center;
}

.feed-ad-card__media {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-muted, #f1f5f9);
}

.feed-ad-card__media img,
.feed-ad-card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-ad-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.feed-ad-card__store {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.feed-ad-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.feed-ad-card__price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.375rem;
}

.feed-ad-card__message {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-product-card__badge--pick {
  background: rgb(99 102 241 / 0.12);
  color: #4338ca;
}

[data-theme='dark'] .feed-product-card__badge--pick {
  background: rgb(99 102 241 / 0.2);
  color: #a5b4fc;
}

@media (max-width: 767px) {
  .feed__item--ad .feed-ad-card__inner {
    grid-template-columns: 5.75rem 1fr;
    min-height: 7.25rem;
  }
}

.feed-product-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feed-product-card.out-of-stock { opacity: 0.75; }

.feed-product-card__badge {
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.feed-product-card__badge--new {
  background: var(--primary-50);
  color: var(--primary-700);
}

.feed-product-card__badge--liked {
  background: rgb(254 226 226);
  color: rgb(185 28 28);
}

[data-theme='dark'] .feed-product-card__badge--new {
  background: var(--primary-50);
  color: var(--primary-600);
}

[data-theme='dark'] .feed-product-card__badge--liked {
  background: rgb(127 29 29 / 0.25);
  color: rgb(252 165 165);
}

.feed-product-card__inner {
  display: flex;
  gap: 1rem;
  padding: 1rem;
}

.feed-product-card__media {
  position: relative;
  flex-shrink: 0;
  width: 6rem;
  height: 6rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-tertiary);
}

.feed-product-card__media-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.feed-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-product-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
}

.feed-product-card__used-tag,
.product-tag--used {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgb(120 53 15 / 0.92);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  z-index: 1;
}

[data-theme='dark'] .feed-product-card__used-tag,
[data-theme='dark'] .product-tag--used {
  background: rgb(146 64 14 / 0.95);
  color: rgb(255 237 213);
}

.feed-product-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feed-product-card__name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}

.feed-product-card__name:hover { color: var(--primary-600); }

.feed-product-card__store {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.feed-product-card__desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-product-card__footer {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.feed-product-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.feed-product-card__price {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--primary-600);
}

.feed-product-card__likes {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.store-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feed__item--store .store-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.feed__item--product .feed-product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feed__item--product .feed-product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.store-card__banner {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-tertiary);
  overflow: hidden;
}

.store-card__banner img { width: 100%; height: 100%; object-fit: cover; }

.store-card__logo {
  position: absolute;
  bottom: -1.25rem;
  left: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  border: 4px solid var(--surface);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.store-card__logo-placeholder {
  position: absolute;
  bottom: -1.25rem;
  left: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  border: 4px solid var(--surface);
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.25rem;
  box-shadow: var(--shadow);
}

.store-card__body { padding: 1.75rem 1rem 1rem; }

.store-card__title { font-size: 1.125rem; font-weight: 700; }

.store-card__category {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: white;
}

.store-card__meta {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
}

.product-card.out-of-stock { opacity: 0.6; }

.product-card__img {
  aspect-ratio: 1;
  background: var(--surface-tertiary);
  position: relative;
  overflow: hidden;
}

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

.product-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 2.5rem;
}

.product-card__oos {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 0.5);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

.product-card__type {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.product-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.product-card__name { font-weight: 600; }
.product-card__desc { margin-top: 0.25rem; font-size: 0.875rem; color: var(--text-secondary); flex: 1; }
.product-card__footer { margin-top: 0.75rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.product-card__price { font-size: 1.125rem; font-weight: 700; color: var(--primary-600); }

.product-card__engagement {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.engagement-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.engagement-btn:hover:not(:disabled) {
  border-color: var(--primary-600);
  color: var(--primary-600);
}

.engagement-btn.active {
  border-color: var(--red-500);
  color: var(--red-500);
  background: color-mix(in srgb, var(--red-500) 8%, var(--surface));
}

.engagement-btn--readonly {
  cursor: default;
}

.engagement-btn--ghost {
  background: transparent;
}

.product-comments {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-comments__status,
.product-comments__login-hint {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.product-comments__login-hint a {
  color: var(--primary-600);
  font-weight: 500;
}

.product-comment {
  font-size: 0.875rem;
}

.product-comment__meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.product-comment__meta-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.product-comment__delete {
  border: none;
  background: transparent;
  color: var(--danger-600, #dc2626);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-comment__delete:hover:not(:disabled) {
  color: var(--danger-700, #b91c1c);
}

.product-comment__delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.product-card__engagement-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  margin-left: auto;
}

.admin-product-engagement {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 7.5rem;
}

.admin-product-engagement__likes {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.admin-product-engagement__label {
  min-width: 2.5rem;
  font-size: 0.875rem;
}

.admin-product-comments {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.report-btn {
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.report-btn--overlay {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text-muted);
  font-size: 0.8125rem;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.12);
  backdrop-filter: blur(4px);
}

.report-btn--overlay:hover,
.report-btn--overlay:focus-visible {
  border-color: var(--danger-300, #fca5a5);
  color: var(--danger-600, #dc2626);
  background: var(--danger-50, #fef2f2);
  outline: none;
}

.report-btn--link {
  display: block;
  width: 100%;
  margin-top: 0.125rem;
  padding: 0.25rem 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.report-btn--link:hover,
.report-btn--link:focus-visible {
  color: var(--danger-600, #dc2626);
  outline: none;
}

.report-btn--toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.store-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.feed-product-card__actions,
.product-card__footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.product-card__footer-actions .btn {
  flex: 1;
  min-width: 0;
}

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  place-items: center;
  padding: 1rem;
}

.report-modal.report-modal--open {
  display: grid;
}

.report-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.report-modal__dialog {
  position: relative;
  width: min(100%, 28rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 1rem);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg, 0 20px 40px rgba(0, 0, 0, 0.18));
}

.report-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.report-modal__head h2 {
  margin: 0;
  font-size: 1.125rem;
}

.report-modal__close {
  border: none;
  background: transparent;
  font-size: 1.125rem;
  cursor: pointer;
  color: var(--text-muted);
}

.report-modal__target {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.report-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.report-reasons {
  border: none;
  margin: 0;
  padding: 0;
}

.report-reasons__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.report-reason {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 0.5rem);
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.report-reason:hover {
  border-color: var(--primary-300, #93c5fd);
  background: var(--surface-secondary, var(--surface));
}

.report-reason:has(input:checked) {
  border-color: var(--primary-500, #3b82f6);
  background: color-mix(in srgb, var(--primary-500, #3b82f6) 8%, var(--surface));
}

.report-reason input {
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.report-reason__label {
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.admin-report-review {
  margin-top: 0.75rem;
}

body.report-modal-open {
  overflow: hidden;
}

.product-comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.products-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.products-header__hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Store page */
.store-hero {
  position: relative;
  height: 12rem;
  background: var(--surface-tertiary);
  overflow: hidden;
}

.store-hero img { width: 100%; height: 100%; object-fit: cover; }
.store-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.6), transparent);
}

.store-hero__back {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  background: rgb(0 0 0 / 0.4);
  color: white;
  font-size: 0.875rem;
  backdrop-filter: blur(4px);
}

.store-profile {
  position: relative;
  margin-top: -3rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.store-profile__info { display: flex; align-items: flex-end; gap: 1rem; }

.store-profile__logo {
  width: 6rem;
  height: 6rem;
  border-radius: var(--radius-xl);
  border: 4px solid var(--surface);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.store-profile__logo-ph {
  width: 6rem;
  height: 6rem;
  border-radius: var(--radius-xl);
  border: 4px solid var(--surface);
  display: grid;
  place-items: center;
  color: white;
  font-size: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.store-profile__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.store-profile__details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.store-profile__name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
}

.store-profile__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.store-profile__rating {
  font-size: 0.875rem;
}

.store-profile__engagement {
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.store-profile__engagement-title {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.store-profile__engagement-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.merchant-engagement-preview .profile-stats {
  margin-top: 0.75rem;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.profile-stats--store .profile-stats__item {
  min-width: 8.5rem;
}

.profile-stats__item {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-lg, 0.75rem);
  border: 1px solid var(--border);
  background: var(--surface-secondary, var(--surface));
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.profile-stats__item--empty {
  opacity: 0.72;
}

.profile-stats__icon {
  flex-shrink: 0;
  font-size: 1.125rem;
  line-height: 1;
}

.profile-stats__copy {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.profile-stats__value {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.profile-stats--customer .profile-stats__value {
  font-size: 1rem;
}

.profile-stats__label {
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--text-muted);
}

.customer-profile__activity {
  margin-bottom: 1.25rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-secondary);
}

.customer-profile__activity h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.info-panel {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  gap: 1rem;
}

.info-panel__item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.info-panel__link {
  color: var(--primary-600);
  font-weight: 500;
  transition: color 0.15s;
}

.info-panel__link:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

.section-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }

/* Cart drawer */
@keyframes cart-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes cart-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(0 0 0 / 0.45);
  backdrop-filter: blur(6px);
  animation: cart-overlay-in 0.2s ease;
}

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  width: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: -8px 0 32px rgb(0 0 0 / 0.12);
  animation: cart-slide-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.125rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-secondary, var(--surface)) 100%);
}

.cart-drawer__title-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.cart-drawer__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-600);
}

.cart-drawer__title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.cart-drawer__store {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-drawer__header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cart-drawer__count {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-600);
  background: var(--primary-100);
}

.cart-drawer__close {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--surface-tertiary);
}

.cart-drawer__body,
.cart-drawer__checkout-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.cart-drawer__items {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.cart-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cart-item__media {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-tertiary);
  flex-shrink: 0;
}

.cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.cart-item__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cart-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.cart-item__name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

.cart-item__remove {
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.cart-item__remove:hover { color: var(--danger, #dc2626); background: rgb(220 38 38 / 0.08); }

.cart-item__unit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cart-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.cart-item__subtotal {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary-600);
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-secondary, var(--surface));
}

.cart-qty__btn {
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--text);
}

.cart-qty__btn:hover { background: var(--surface-tertiary); }

.cart-qty__value {
  min-width: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
}

.cart-drawer__footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 -4px 24px rgb(0 0 0 / 0.04);
}

.cart-drawer__footer--checkout {
  padding-top: 0.875rem;
}

.cart-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.cart-summary__row--total {
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.cart-summary__total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-600);
}

.cart-checkout-btn {
  min-height: 2.75rem;
  font-weight: 600;
}

.cart-checkout-hint {
  margin: 0.625rem 0 0;
  text-align: center;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.cart-checkout-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.cart-checkout-total strong {
  font-size: 1.125rem;
  color: var(--primary-600);
}

.cart-checkout-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.5rem;
}

.cart-checkout-form {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cart-checkout-form__section {
  margin-top: 0.25rem;
}

.cart-checkout-form__section-title {
  margin: 0 0 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.cart-empty__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.cart-empty__title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.cart-empty__text {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 16rem;
  line-height: 1.5;
}

.form-group { margin-bottom: 0.75rem; }

.checkout-payment {
  margin: 0 0 0.875rem;
  padding: 0;
  border: 0;
}

.checkout-payment__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.checkout-payment__options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkout-payment__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.checkout-payment__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkout-payment__option.active,
.checkout-payment__option:has(input:checked) {
  border-color: var(--primary-600);
  background: var(--primary-50);
  box-shadow: 0 0 0 1px var(--primary-600);
}

.checkout-payment__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.125rem;
  background: var(--surface-tertiary);
  flex-shrink: 0;
}

.checkout-payment__copy {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.checkout-payment__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.checkout-payment__hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.35;
}

[data-theme='dark'] .checkout-payment__option.active,
[data-theme='dark'] .checkout-payment__option:has(input:checked) {
  background: var(--primary-50);
}

.merchant-payment-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
}

.merchant-payment-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.merchant-payment-toggle input {
  margin-top: 0.25rem;
  accent-color: var(--primary-600);
}

.merchant-payment-toggle.active {
  border-color: var(--primary-600);
  background: var(--primary-50);
}

.merchant-payment-toggle__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.merchant-payment-toggle__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.merchant-payment-toggle__text strong {
  font-size: 0.875rem;
}

.merchant-payment-toggle__text small {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.35;
}

@media (max-width: 640px) {
  .merchant-payment-toggles { grid-template-columns: 1fr; }
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-secondary);
  font-size: 0.875rem;
}

.form-input:focus { outline: none; border-color: var(--primary-600); }

.password-field {
  position: relative;
}

.password-field__input {
  padding-right: 2.75rem;
}

.password-field__toggle {
  position: absolute;
  top: 50%;
  right: 0.25rem;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  color: var(--text-secondary);
}

.password-field__toggle:hover {
  color: var(--text);
}

.form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Auth & dashboard */
.auth-page {
  max-width: 24rem;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
}

.auth-page--with-info {
  max-width: 76rem;
  display: grid;
  gap: 1.5rem;
}

.auth-page__login {
  min-width: 0;
}

.auth-page__info {
  min-width: 0;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  scroll-margin-top: 5rem;
}

.auth-info-panel__title {
  font-size: 1.375rem;
  margin-bottom: 1rem;
}

.auth-info-panel .rules-section h3 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
}

#regras,
#planos {
  scroll-margin-top: 5rem;
}

@media (min-width: 900px) {
  .auth-page--with-info {
    grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
    align-items: start;
  }
}

.auth-card {
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
}

.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.auth-card p { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1.5rem; }
.auth-forgot {
  margin-top: 0.75rem;
  text-align: center;
}

.auth-rules-toggle {
  margin-top: 1rem;
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  text-align: center;
  color: var(--text-secondary);
}
.auth-links a:hover { color: var(--primary); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-weight: 600;
}

.btn-google:hover:not(:disabled) {
  background: var(--surface-tertiary);
  border-color: color-mix(in srgb, var(--border) 60%, var(--text) 15%);
}

[data-theme='dark'] .btn-google {
  background: var(--surface-tertiary);
}

.btn-google__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-hint--center {
  text-align: center;
  margin-top: 0.5rem;
}

.dashboard {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.dashboard__header { margin-bottom: 1.5rem; }
.dashboard__header h1 { font-size: 1.5rem; }

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.tab {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.tab.active { background: var(--primary-100); color: var(--primary-600); }
[data-theme='dark'] .tab.active { background: var(--primary-100); color: var(--primary-600); }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  padding: 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
}

.metric-card__value { font-size: 1.5rem; font-weight: 700; }
.metric-card__label { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.25rem; }

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

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-secondary); background: var(--surface-secondary); }
tr:last-child td { border-bottom: none; }

/* States */
.loading {
  display: flex;
  justify-content: center;
  padding: 3rem;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.empty-state h2 { font-size: 1.125rem; color: var(--text); margin: 0.75rem 0 0.5rem; }
.empty-state p { font-size: 0.875rem; margin-bottom: 1rem; }

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
[data-theme='dark'] .alert-error { background: rgb(185 28 28 / 0.15); border-color: rgb(185 28 28 / 0.3); }

.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.badge-pending { background: #fef3c7; color: #b45309; }
.badge-approved { background: #dcfce7; color: #15803d; }
.badge-blocked { background: #fee2e2; color: #b91c1c; }

.review-card {
  padding: 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 0.75rem;
}

.stars { color: var(--amber-500); letter-spacing: 0.05em; }

.scroll-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: 40;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.scroll-to-top--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top__icon {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-to-top {
    transition: none;
  }
}

@media (max-width: 767px) {
  .scroll-to-top {
    right: 0.875rem;
    bottom: 1rem;
  }
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--surface);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateX(-50%) translateY(0.5rem); } }

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: white;
  color: var(--primary-600);
  font-size: 0.6875rem;
  font-weight: 700;
}

/* Rules & Plans */
.rules-page {
  padding: 2rem 1rem 3rem;
  max-width: 52rem;
}

.rules-page__back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.rules-page__card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.rules-page__title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.rules-section {
  margin-bottom: 1.5rem;
}

.rules-section:last-child {
  margin-bottom: 0;
}

.rules-section h2 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.rules-section p,
.rules-section li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.rules-section ul,
.rules-section ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-secondary);
}

.plan-card--highlight {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 1px var(--primary-600);
}

.plan-card--current {
  border-color: var(--green-600);
  box-shadow: 0 0 0 1px var(--green-600);
}

.plan-card__note--current {
  color: var(--green-600);
  font-weight: 600;
}

.merchant-plans-current {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-secondary);
}

.merchant-plans-current__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.merchant-plans-current h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.plan-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.plan-card__name {
  font-size: 1.0625rem;
  font-weight: 700;
}

.plan-card__price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-600);
  white-space: nowrap;
}

.plan-card__desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.plan-card__features {
  flex: 1;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.plan-card__features li::before {
  content: '✓ ';
  color: var(--green-600);
  font-weight: 700;
}

.plan-card__note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem 0;
}

.plan-payment-info {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--surface-tertiary);
  border: 1px solid var(--border);
}

.plan-payment-info p {
  margin-bottom: 0.5rem;
}

.plan-payment-info ol {
  margin-bottom: 1rem;
}

.admin-password-form {
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-form-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.admin-form-panel summary {
  cursor: pointer;
  font-weight: 600;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-form-grid__full {
  grid-column: 1 / -1;
}

.admin-page {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.admin-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-page__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-600);
  margin-bottom: 0.25rem;
}

.admin-page__title {
  font-size: 1.5rem;
  font-weight: 700;
}

.admin-page__actions {
  flex-shrink: 0;
}

.admin-user-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.admin-page__subtitle {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.admin-fade-in {
  animation: adminFadeIn 0.25s ease-out;
}

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

.admin-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.admin-quick-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.admin-quick-card:hover {
  border-color: var(--primary-600);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.admin-quick-card strong { font-size: 0.9375rem; }
.admin-quick-card span:last-child { font-size: 0.75rem; color: var(--text-muted); }
.admin-quick-card__icon { font-size: 1.5rem; margin-bottom: 0.25rem; }
.admin-quick-card--muted:hover { border-color: var(--border); transform: none; }

.admin-metrics .metric-card--link {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.admin-metrics .metric-card--link:hover {
  border-color: var(--primary-600);
  transform: translateY(-2px);
}

.metric-card--alert {
  border-color: var(--amber-500);
  background: rgb(245 158 11 / 0.08);
}

.admin-section { margin-top: 1.5rem; }

.admin-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-section__head h2 {
  font-size: 1.0625rem;
}

.admin-section__head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.admin-list-card p {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.admin-list-card__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.admin-list-card__meta {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-list-card--highlight {
  border-color: rgb(245 158 11 / 0.45);
  background: rgb(245 158 11 / 0.05);
}

.admin-empty {
  text-align: center;
  padding: 2rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.admin-empty__icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.admin-empty h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.admin-empty p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.admin-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-stat-chip {
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
}

.admin-stat-chip--approved { border-color: rgb(22 163 74 / 0.35); color: var(--green-700, #15803d); }
.admin-stat-chip--pending { border-color: rgb(245 158 11 / 0.45); color: var(--amber-600, #d97706); }
.admin-stat-chip--blocked { border-color: rgb(239 68 68 / 0.35); color: #b91c1c; }
.admin-stat-chip--sent { border-color: rgb(59 130 246 / 0.35); color: #1d4ed8; }
.admin-stat-chip--viewed { border-color: rgb(22 163 74 / 0.35); color: var(--green-700, #15803d); }
.admin-stat-chip--order-pending { border-color: rgb(245 158 11 / 0.45); color: var(--amber-600, #d97706); }

.admin-order-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.admin-order-metric {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.admin-order-metric--highlight {
  border-color: rgb(22 163 74 / 0.35);
  background: rgb(22 163 74 / 0.05);
}

.admin-order-metric__value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.admin-order-metric--highlight .admin-order-metric__value {
  color: var(--green-700, #15803d);
}

.admin-order-metric__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.metric-card--compact .metric-card__value {
  font-size: 1.125rem;
}

.badge-order-pending { background: #fef3c7; color: #b45309; }
.badge-order-sent { background: #dbeafe; color: #1d4ed8; }
.badge-order-viewed { background: #dcfce7; color: #15803d; }

.admin-orders-table table {
  font-size: 0.875rem;
}

.admin-table-sortable {
  white-space: nowrap;
}

.admin-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}

.admin-table-sort:hover,
.admin-table-sort.active {
  color: var(--primary-600, #2563eb);
}

.admin-table-sort__icon {
  font-size: 0.75rem;
  line-height: 1;
}

.admin-orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-orders-filters {
  flex: 1 1 20rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-orders-filters__groups {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.admin-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.admin-filter-group__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.admin-filter-group--store {
  min-width: 12rem;
  flex: 1 1 12rem;
  max-width: 18rem;
}

.admin-orders-store-select {
  font-size: 0.875rem;
}

.admin-export-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-readonly-hint {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgb(59 130 246 / 0.25);
  background: rgb(59 130 246 / 0.06);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.admin-moderators-promote__hint {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.admin-moderators-promote__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  max-width: 36rem;
}

.admin-moderators-promote__form .form-group {
  flex: 1 1 16rem;
  margin-bottom: 0;
}

.admin-permission-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-permission-option {
  align-items: flex-start;
  gap: 0.625rem;
}

.admin-permission-option strong {
  display: block;
  font-size: 0.875rem;
}

.admin-permission-option small {
  display: block;
  margin-top: 0.125rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.admin-permission-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.admin-permission-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgb(59 130 246 / 0.12);
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.3;
}

.admin-permission-badge--muted {
  background: var(--surface-2);
  color: var(--text-muted);
}

.admin-moderator-permissions-form {
  max-width: 40rem;
}

.admin-moderators-table table {
  font-size: 0.875rem;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.admin-pagination--single {
  justify-content: flex-start;
}

.admin-pagination__info {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.admin-pagination__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-pagination__status {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

.admin-chart-panel {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.admin-chart-panel--compact {
  margin-top: 1rem;
}

.admin-chart-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.admin-chart-panel__head h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.admin-chart-panel__summary {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.admin-chart-panel__controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.admin-chart {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.admin-chart__plot {
  display: flex;
  align-items: flex-end;
  gap: 0.375rem;
  min-height: 180px;
  min-width: min(100%, 640px);
  padding-top: 1.25rem;
}

.admin-chart-panel--compact .admin-chart__plot {
  min-height: 140px;
}

.admin-chart__column {
  flex: 1 1 0;
  min-width: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.admin-chart__value {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-height: 0.875rem;
  text-align: center;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-chart__bar-track {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: color-mix(in srgb, var(--primary-600) 6%, transparent);
}

.admin-chart-panel--compact .admin-chart__bar-track {
  height: 90px;
}

.admin-chart__bar {
  width: 72%;
  min-height: 2px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: linear-gradient(180deg, var(--primary-600), var(--primary-700));
  transition: height 0.2s ease;
}

.admin-chart__bar--revenue {
  background: linear-gradient(180deg, #34d399, var(--green-700, #15803d));
}

.admin-chart__label {
  font-size: 0.625rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
}

.admin-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-filter-bar--compact {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.admin-filter-bar__search {
  max-width: 24rem;
}

.admin-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.admin-filter-chip {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.admin-filter-chip:hover,
.admin-filter-chip.active {
  border-color: var(--primary-600);
  background: color-mix(in srgb, var(--primary-600) 10%, transparent);
  color: var(--primary-700);
}

.admin-approval-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.admin-approval-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-approval-card__head h3 {
  font-size: 1.0625rem;
}

.admin-approval-card__head p {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.admin-approval-card__details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-approval-card__details dt {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.admin-approval-card__details dd {
  margin-top: 0.125rem;
  font-size: 0.875rem;
}

.admin-approval-card__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-account-card {
  max-width: 24rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.admin-account-card__email {
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.admin-account-card__section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.admin-account-card__divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.admin-account-card__email span {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.admin-edit-row td {
  padding: 0;
  background: var(--surface-muted, rgb(0 0 0 / 0.02));
  border-bottom: 1px solid var(--border);
}

.admin-edit-panel {
  padding: 1rem;
  margin: 0;
}

.admin-edit-panel__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-image-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-image-preview {
  display: block;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.admin-image-preview--square {
  width: 4.5rem;
  height: 4.5rem;
}

.admin-image-preview--banner {
  width: 100%;
  max-width: 20rem;
  height: 5rem;
}

.admin-image-preview--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-table-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  vertical-align: middle;
  overflow: hidden;
  font-size: 0.875rem;
}

.admin-table-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-hint--info {
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  background: rgb(59 130 246 / 0.08);
  color: var(--text-secondary);
}

.merchant-page .admin-page__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.merchant-status-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.125rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 1.25rem;
}

.merchant-status-banner__main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.merchant-status-banner__main p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.merchant-status-banner--approved {
  border-color: rgb(34 197 94 / 0.35);
  background: rgb(34 197 94 / 0.06);
}

.merchant-status-banner--pending {
  border-color: rgb(245 158 11 / 0.35);
  background: rgb(245 158 11 / 0.06);
}

.merchant-status-banner--blocked {
  border-color: rgb(239 68 68 / 0.35);
  background: rgb(239 68 68 / 0.06);
}

.merchant-metrics .metric-card__value {
  font-size: 1.25rem;
}

.merchant-alert-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.merchant-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.merchant-settings-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.merchant-settings-aside {
  position: sticky;
  top: 5.5rem;
}

.merchant-store-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.merchant-store-card__swatch {
  height: 4rem;
  border-radius: var(--radius-lg);
  margin-bottom: 0.875rem;
}

.merchant-store-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.25rem;
}

.merchant-store-card p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.merchant-store-card__plan {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.merchant-settings-main {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.merchant-settings-section h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.merchant-settings-form {
  max-width: none;
}

.merchant-toolbar .admin-toolbar__tab.active {
  color: var(--primary-600);
}

.merchant-onboarding {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.merchant-onboarding__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-size: 0.875rem;
}

.merchant-onboarding__item--done {
  border-color: rgb(34 197 94 / 0.35);
  background: rgb(34 197 94 / 0.06);
}

.merchant-onboarding__icon {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.merchant-reviews-list,
.merchant-ads-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.merchant-review-item,
.merchant-ad-item {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.merchant-review-item__meta,
.merchant-ad-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.merchant-store-card--preview {
  transition: background 0.2s ease;
}

.merchant-price-history {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.merchant-price-history li {
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .merchant-settings-layout {
    grid-template-columns: 1fr;
  }

  .merchant-settings-aside {
    position: static;
  }

  .merchant-status-banner {
    flex-direction: column;
  }
}

.merchant-branding {
  margin: 1.25rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.merchant-branding__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.admin-store-products-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.admin-store-products-nav {
  position: sticky;
  top: 5.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  max-height: calc(100vh - 7rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-store-products-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-store-products-nav__head h2 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.admin-store-products-nav__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-muted, rgb(0 0 0 / 0.04));
}

.admin-store-products-nav__search {
  font-size: 0.875rem;
}

.admin-store-products-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  overflow-y: auto;
  min-height: 0;
}

.admin-store-products-nav__empty {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.admin-store-products-nav__item.hidden {
  display: none !important;
}

.admin-store-products-nav__item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.admin-store-products-nav__item:hover {
  background: var(--surface-muted, rgb(0 0 0 / 0.04));
  border-color: var(--border);
}

.admin-store-products-nav__item.active {
  background: rgb(59 130 246 / 0.1);
  border-color: var(--primary-600);
}

.admin-store-products-nav__item-name {
  font-size: 0.875rem;
  font-weight: 600;
}

.admin-store-products-nav__item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-store-products-main {
  min-width: 0;
}

.admin-store-products-main--empty {
  padding: 2rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.admin-store-products-main__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-store-products-main__head h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.admin-store-products-main__meta {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.admin-store-products-main__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.admin-store-products-table {
  margin-top: 1.25rem;
}

@media (max-width: 900px) {
  .admin-page__head {
    flex-direction: column;
  }

  .admin-list-card,
  .admin-approval-card__head {
    flex-direction: column;
  }

  .admin-store-products-layout {
    grid-template-columns: 1fr;
  }

  .admin-store-products-nav {
    position: static;
    max-height: 16rem;
  }

  .admin-filter-bar__search {
    max-width: none;
  }

  .admin-chart-panel__controls {
    align-items: stretch;
    width: 100%;
  }

  .admin-chart__plot {
    min-width: 520px;
  }

  .admin-chart__column {
    min-width: 1.75rem;
  }

  .admin-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-pagination__controls {
    justify-content: space-between;
  }
}

.alert-success {
  background: rgb(22 163 74 / 0.12);
  color: var(--green-700);
  padding: 0.75rem;
  border-radius: var(--radius);
}

/* Merchant dashboard — mobile */
@media (max-width: 767px) {
  .merchant-page.admin-page {
    padding: 0.875rem 0.75rem 2rem;
  }

  .merchant-page .admin-page__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .merchant-page .admin-page__title {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  .merchant-page .admin-page__subtitle {
    font-size: 0.8125rem;
  }

  .merchant-page .admin-page__actions {
    width: 100%;
  }

  .merchant-page .admin-page__actions .admin-export-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  .merchant-toolbar .admin-toolbar__inner {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .merchant-toolbar .admin-toolbar__tabs {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: 0.125rem;
  }

  .merchant-toolbar .admin-toolbar__tabs::-webkit-scrollbar {
    display: none;
  }

  .merchant-toolbar .admin-toolbar__tab {
    scroll-snap-align: start;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 3.25rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.625rem;
    line-height: 1.2;
    text-align: center;
  }

  .merchant-toolbar .admin-toolbar__tab-icon {
    font-size: 1.125rem;
  }

  .merchant-toolbar .admin-toolbar__tab-label {
    max-width: 4.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .merchant-toolbar .admin-toolbar__refresh {
    min-width: 2.5rem;
    padding-inline: 0.625rem;
  }

  .merchant-toolbar .admin-toolbar__refresh-label {
    display: none;
  }

  .merchant-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    margin-bottom: 1rem;
  }

  .merchant-metrics .metric-card {
    padding: 0.75rem 0.875rem;
  }

  .merchant-metrics .metric-card__value {
    font-size: 1.0625rem;
    line-height: 1.2;
  }

  .merchant-metrics .metric-card__label {
    font-size: 0.6875rem;
    line-height: 1.3;
  }

  .merchant-page .admin-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
  }

  .merchant-page .admin-quick-card {
    padding: 0.875rem;
    min-height: 5.5rem;
  }

  .merchant-page .admin-quick-card__icon {
    font-size: 1.375rem;
  }

  .merchant-page .admin-quick-card strong {
    font-size: 0.875rem;
  }

  .merchant-status-banner {
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
  }

  .merchant-status-banner .btn {
    width: 100%;
    justify-content: center;
  }

  .merchant-alert-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
  }

  .merchant-alert-item .btn {
    width: 100%;
    justify-content: center;
  }

  .merchant-page .admin-section__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .merchant-page .admin-section__head .btn {
    width: 100%;
    justify-content: center;
  }

  .merchant-page .admin-orders-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .merchant-page .admin-orders-toolbar .btn {
    width: 100%;
    justify-content: center;
  }

  .merchant-page .admin-filter-bar--compact {
    flex-direction: column;
    align-items: stretch;
  }

  .merchant-page .admin-filter-bar__search {
    max-width: none;
    width: 100%;
  }

  .merchant-page .admin-filter-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.125rem;
  }

  .merchant-page .admin-filter-chips::-webkit-scrollbar {
    display: none;
  }

  .merchant-page .admin-filter-chip {
    flex-shrink: 0;
  }

  .merchant-plans-current {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .merchant-plans-current .btn {
    width: 100%;
    justify-content: center;
  }

  .merchant-page .plan-grid {
    grid-template-columns: 1fr;
  }

  .merchant-settings-main {
    padding: 1rem;
  }

  .merchant-page .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .merchant-page .admin-chart-panel__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .merchant-page .admin-chart-panel__controls {
    width: 100%;
    justify-content: stretch;
  }

  .merchant-page .admin-chart-panel__controls .admin-filter-chips {
    width: 100%;
  }

  .merchant-page .admin-chart__plot {
    min-width: 0;
  }

  .profile-stats {
    width: 100%;
  }

  .profile-stats__item {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
  }

  .profile-stats--store .profile-stats__item {
    min-width: 0;
  }

  .profile-stats__copy {
    align-items: flex-start;
  }

  /* Tabelas → cards empilhados */
  .admin-table--stack {
    overflow: visible;
    border: none;
    background: transparent;
  }

  .admin-table--stack table {
    font-size: 0.8125rem;
  }

  .admin-table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .admin-table--stack tbody {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
  }

  .admin-table--stack tbody tr:not(.admin-edit-row) {
    display: block;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .admin-table--stack tbody tr.admin-edit-row {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    overflow: hidden;
  }

  .admin-table--stack tbody tr.admin-edit-row td {
    display: block;
    padding: 0;
    border: none;
  }

  .admin-table--stack tbody tr.admin-edit-row .admin-edit-panel {
    border: none;
    border-radius: 0;
    margin: 0;
  }

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

  .admin-table--stack td:not([colspan]) {
    display: grid;
    grid-template-columns: minmax(4.5rem, 36%) 1fr;
    gap: 0.375rem 0.75rem;
    align-items: center;
    padding: 0.35rem 0;
    border: none;
    text-align: right;
  }

  .admin-table--stack td:not([colspan])::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    text-align: left;
  }

  .admin-table--stack td[data-label='']::before {
    content: none;
  }

  .admin-table--stack td.admin-table__primary {
    display: block;
    text-align: left;
    padding-bottom: 0.625rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
  }

  .admin-table--stack td.admin-table__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
    margin-top: 0.125rem;
    border-top: 1px solid var(--border);
  }

  .admin-table--stack td.admin-table__actions::before {
    content: none;
  }

  .admin-table--stack .admin-table-thumb {
    margin-bottom: 0.375rem;
  }
}