/* ==========================================================================
   Passa Preço — Design System & Stylesheet Consolidado
   Dark Mode First • Server-Side Rendered • Zero Bloat
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variáveis e Tokens de Design
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;
  --bg-page: #0c0d10;
  --bg-card: #141518;
  --bg-card-hover: #191a1e;
  --bg-card-champion: #121715;
  --bg-surface: #16171b;
  --bg-input: #1e1f24;

  --border-subtle: #222327;
  --border-card: #282932;
  --border-hover: #32343c;
  --border-champion: rgba(255, 255, 255, 0.2);

  --text-white: #ffffff;
  --text-primary: #f3f4f6;
  --text-secondary: #d4d4d8;
  --text-muted: #71717a;
  --text-dim: #52525b;
  --text-champion: #ffffff;

  --badge-no-discount-bg: rgba(255, 255, 255, 0.05);
  --badge-no-discount-text: #a1a1aa;
  --badge-no-discount-border: rgba(255, 255, 255, 0.1);

  --badge-discount-bg: rgba(255, 255, 255, 0.08);
  --badge-discount-text: #ffffff;
  --badge-discount-border: rgba(255, 255, 255, 0.15);

  --dock-bg: #202126;
  --dock-border: #32343e;

  --sidebar-width: 272px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Reset & Estrutura Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color-scheme: dark;
  font-family: var(--font-sans);
}

body.dark-theme {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==========================================================================
   2. Layout: App Shell & Sidebar (Espelho da interface de referência)
   ========================================================================== */

.app-shell {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  background-color: var(--bg-page);
  position: relative;
  overflow: hidden;
}

/* Sidebar Fixa à Esquerda */
.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  height: 100vh;
  max-height: 100vh;
  flex-shrink: 0;
  background-color: #121316;
  border-right: 1px solid #1c1d22;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 12px 1rem 12px;
  z-index: 50;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
  user-select: none;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-width: none;
}

.app-sidebar::-webkit-scrollbar {
  display: none;
}

/* Sidebar Recolhida (Rail de Ícones Perfeitamente Alinhados) */
.sidebar-collapsed .app-sidebar {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
}

/* Sidebar Top Bar com Logo e Ícone de Alternar */
.sidebar-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  min-height: 40px;
  margin-bottom: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  padding: 0 4px;
  height: 40px;
  border-radius: 8px;
  transition: opacity 0.15s ease;
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-brand:hover {
  opacity: 0.88;
}

.sidebar-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  display: block;
  flex-shrink: 0;
}


.sidebar-collapsed .sidebar-brand {
  display: none;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: #d4d4d8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  padding: 0;
  margin-left: auto;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

.sidebar-toggle-btn:active {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Menu de Navegação da Sidebar */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  height: 40px;
  width: 100%;
  padding: 0;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-menu-item:hover:not(.active) {
  color: #f3f4f6;
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-menu-item.active {
  background-color: #222329;
  color: #ffffff;
  font-weight: 500;
}

.sidebar-icon-box {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}

.sidebar-icon-box svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: inherit;
}

.sidebar-label {
  white-space: nowrap;
  margin-left: 0.5rem;
  opacity: 1;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.sidebar-collapsed .sidebar-label {
  opacity: 0;
  pointer-events: none;
}

/* Tooltip ao passar o mouse quando recolhido */
.sidebar-collapsed .sidebar-menu-item:hover::after,
.sidebar-collapsed .sidebar-profile-card:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background-color: #1c1d22;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.15s ease-out;
}

/* Bloco de Pesquisas Recentes */
.sidebar-recents-block {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin-bottom: 1rem;
  opacity: 1;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed .sidebar-recents-block {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  margin: 0;
  visibility: hidden;
}

.recents-header-title {
  font-size: 0.8125rem;
  color: #71717a;
  font-weight: 500;
  margin-bottom: 0.65rem;
  padding-left: 0.6rem;
  white-space: nowrap;
}

.recents-items-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 4px;
  padding-bottom: 14px;
}

.recents-items-scroll::-webkit-scrollbar {
  width: 4px;
}

.recents-items-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.recents-items-scroll::-webkit-scrollbar-thumb {
  background: #25272e;
  border-radius: 9999px;
}

.recent-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
  line-height: 1.4;
  position: relative;
  gap: 0.35rem;
}

.recent-search-row:hover,
.recent-search-row.has-menu-open {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.recent-search-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-search-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.recent-search-row:hover .recent-search-actions,
.recent-search-row.has-menu-open .recent-search-actions,
.recent-search-row.is-pinned .recent-search-actions {
  opacity: 1;
}

.recent-action-btn {
  background: transparent;
  border: none;
  padding: 2px 4px;
  border-radius: 4px;
  color: #71717a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease;
  line-height: 1;
}

.recent-action-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.recent-action-btn.pin-btn.is-pinned {
  color: #d4d4d8;
  opacity: 1;
}

/* On pinned rows, keep the pin icon visible even without hover */
.recent-search-row.is-pinned .pin-btn {
  color: #e4e4e7;
}

.recent-search-row.is-pinned:not(:hover):not(.has-menu-open) .dots-btn {
  opacity: 0;
  pointer-events: none;
}

/* Dropdown Context Menu for Three Dots (Global Fixed Floating) */
.recent-menu-dropdown {
  position: fixed;
  z-index: 999999;
  min-width: 145px;
  background-color: #1a1c22;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.35rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: fadeIn 0.12s ease-out;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recent-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  color: #d1d5db;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.recent-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.recent-menu-item.danger {
  color: #f87171;
}

.recent-menu-item.danger:hover {
  background-color: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ==============================================================================
   Sidebar Footer — User Profile Pill & Multi-Tenant Actions
   ============================================================================== */
.sidebar-footer {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.35rem 0.35rem 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
}

.sidebar-profile-card {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  border-radius: 12px;
  background-color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  box-sizing: border-box;
  user-select: none;
}

.sidebar-profile-card:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.sidebar-profile-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 6px;
  transition: opacity 0.15s ease;
}

.sidebar-profile-user:hover .sidebar-profile-name {
  color: #ffffff;
}

.sidebar-avatar-wrapper {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  background-color: #1a1b22;
}

.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1;
  user-select: none;
  text-transform: uppercase;
}

.sidebar-avatar-wrapper .avatar-initials {
  font-size: 0.7rem;
}

.profile-menu-avatar-box .avatar-initials {
  font-size: 0.85rem;
}

.vercel-avatar-circle .avatar-initials {
  width: 100%;
  height: 100%;
  font-size: 1.35rem;
}

.avatar-preview-hidden {
  display: none;
}

.collapsed-notif-indicator {
  display: none;
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #2563eb;
  border: 2px solid #0f1015;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.8);
}

.sidebar-collapsed .collapsed-notif-indicator {
  display: block;
}

.sidebar-profile-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.sidebar-profile-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
  line-height: 1.25;
}

.sidebar-profile-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.sidebar-profile-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  font-family: inherit;
}

.sidebar-profile-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Bolinha azul de notificação (exata ao print do usuário) */
.profile-notif-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #2563eb;
  border: 2px solid #0f1015;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.9);
  pointer-events: none;
}

/* Estado Recolhido da Sidebar */
.sidebar-collapsed .sidebar-profile-meta,
.sidebar-collapsed .sidebar-profile-actions {
  display: none !important;
}

.sidebar-collapsed .sidebar-profile-card {
  justify-content: center;
  padding: 4px 0;
}

.sidebar-collapsed .sidebar-profile-user {
  justify-content: center;
  padding: 0;
  width: 100%;
}

.sidebar-collapsed .sidebar-profile-user:hover::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background-color: #1c1d22;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.15s ease-out;
}

/* ==============================================================================
   Menu Flutuante do Perfil e Multi-Tenant
   ============================================================================== */
.floating-profile-menu {
  display: flex;
  flex-direction: column;
  width: 270px;
  background-color: #16171d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.75rem;
  box-sizing: border-box;
  animation: fadeIn 0.15s ease-out;
}

.profile-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-menu-avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.profile-menu-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-menu-avatar-box .avatar-initials.profile-menu-avatar {
  object-fit: unset;
}

.profile-menu-user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.profile-menu-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-menu-email {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-menu-section-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #a1a1aa;
  margin: 0.85rem 0.45rem 0.3rem;
}

.profile-menu-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.08);
  margin: 0.55rem 0;
}

.profile-menu-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
}

.profile-menu-action:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.profile-menu-action.danger {
  color: #f87171;
}

.profile-menu-action.danger:hover {
  background-color: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ==============================================================================
   Dropdown Flutuante de Notificações (Sino 🔔)
   ============================================================================== */
.floating-notifications-dropdown {
  display: flex;
  flex-direction: column;
  width: 340px;
  max-width: calc(100vw - 24px);
  max-height: 440px;
  background-color: #16171d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(255, 255, 255, 0.02);
}

.notif-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-header-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
}

.notif-unread-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #2563eb;
  padding: 2px 7px;
  border-radius: 10px;
}

.notif-mark-read-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
  font-family: inherit;
}

.notif-mark-read-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

.notif-items-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 380px;
}

.notif-item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: background-color 0.15s ease;
  position: relative;
}

.notif-item-row:last-child {
  border-bottom: none;
}

.notif-item-row:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.notif-item-row.unread {
  background-color: rgba(37, 99, 235, 0.05);
}

.notif-item-row.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background-color: #2563eb;
}

.notif-item-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #94a3b8;
  margin-top: 2px;
}

.notif-item-row.unread .notif-item-icon-box {
  background-color: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.3);
  color: #60a5fa;
}

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.notif-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-time {
  font-size: 0.7rem;
  color: #64748b;
  flex-shrink: 0;
}

.notif-item-msg {
  font-size: 0.77rem;
  color: #94a3b8;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Área de Conteúdo Principal */
.app-main-content {
  flex: 1;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #0c0d10;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.app-main-content::-webkit-scrollbar {
  width: 6px;
}

.app-main-content::-webkit-scrollbar-track {
  background: transparent;
}

.app-main-content::-webkit-scrollbar-thumb {
  background: #25272e;
  border-radius: 9999px;
}

.app-main-content::-webkit-scrollbar-thumb:hover {
  background: #353842;
}

/* Cabeçalho Superior com Seletor à Direita */
/* Cabeçalho Superior com Seletor à Direita */
.app-top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem 0.5rem 2rem;
  width: 100%;
  min-height: 56px;
  background-color: rgba(12, 13, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.top-header-left {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.mobile-sidebar-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #d4d4d8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.top-header-right {
  margin-left: auto;
  flex: 0 0 auto;
}

.main-body-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 5rem 2rem;
  position: relative;
  min-width: 0;
  box-sizing: border-box;
}

/* Wide layout for the bulk comparison workspace to avoid table & card cutoff */
.main-body-container.main-body-wide,
.main-body-container:has(.bulk-workspace-container) {
  max-width: 1440px;
  align-items: stretch;
  padding: 0 1.5rem 5rem 1.5rem;
}

@media (max-width: 768px) {
  .main-body-container.main-body-wide,
  .main-body-container:has(.bulk-workspace-container) {
    padding: 0 0.75rem 4rem 0.75rem;
  }
}

/* Container do Seletor de Localização */
.location-wrapper {
  position: relative;
  margin-left: auto;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #e4e4e7;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
}

.location-pill:hover {
  background-color: #1a1b20;
  border-color: #2a2c35;
  color: #ffffff;
}

.location-pin {
  color: #9ca3af;
  flex-shrink: 0;
}

.location-chevron {
  color: #71717a;
  flex-shrink: 0;
  margin-left: 0.1rem;
}

/* Dropdown de Cidades (Espelhado na Referência Visual) */
.city-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  width: 320px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 12px 10px 8px 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.15s ease-out;
}

.city-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #202228;
  border: 1px solid #2d303a;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.625rem;
}

.city-search-icon {
  color: #71717a;
  flex-shrink: 0;
}

.city-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.8125rem;
  color: #ffffff;
  font-family: inherit;
}

.city-search-input::placeholder {
  color: #636674;
}

.city-section-title {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #71717a;
  padding: 0.25rem 0.5rem 0.35rem 0.5rem;
}

.geo-location-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #e4e4e7;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.12s;
  font-family: inherit;
  margin-bottom: 0.25rem;
}

.geo-location-btn:hover {
  background-color: #22242c;
  color: #ffffff;
}

.geo-location-btn svg {
  color: #9ca3af;
  flex-shrink: 0;
}

.city-divider {
  border: none;
  border-top: 1px solid #262730;
  margin: 0.35rem 0 0.5rem 0;
}

.cities-scroll-list {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 2px;
}

.cities-scroll-list::-webkit-scrollbar {
  width: 5px;
}

.cities-scroll-list::-webkit-scrollbar-track {
  background: transparent;
}

.cities-scroll-list::-webkit-scrollbar-thumb {
  background: #2f313c;
  border-radius: 9999px;
}

.city-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.625rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: #d4d4d8;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.city-item:hover {
  background-color: #22242c;
  color: #ffffff;
}

.city-item.selected {
  background-color: #242630;
  color: #ffffff;
  font-weight: 500;
}

.city-check-icon {
  display: none;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
}

.city-item.selected .city-check-icon {
  display: inline-block;
}

/* --------------------------------------------------------------------------
   4. Tela Inicial Padrão (Hero Empty State)
   -------------------------------------------------------------------------- */
.main-view-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#results-container {
  width: 100%;
}

.results-container-inner {
  width: 100%;
}

.hero-empty-state {
  min-height: calc(82vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 1rem;
  animation: fadeIn 0.25s ease-out;
}

.hero-tagline {
  font-size: 1.55rem;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: -0.015em;
  margin-bottom: 1.75rem;
  line-height: 1.35;
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .hero-tagline {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }
}

.hero-search-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

#product-mode-container,
#store-mode-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.hero-search-bar-wrap,
.hero-input-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.hero-input-field {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 48px;
  background-color: #212226;
  border: 1px solid #282a32;
  border-radius: 12px;
  padding: 0 1.25rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hero-input-field::placeholder {
  color: #63656f;
}

.hero-input-field:focus {
  border-color: #42444f;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.hero-scanner-btn,
.hero-search-circle-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.hero-scanner-btn:hover,
.hero-search-circle-btn:hover {
  background-color: #f4f4f5;
}

.hero-scanner-btn:active,
.hero-search-circle-btn:active {
  opacity: 0.88;
}

/* Responsividade Mobile Geral */
@media (max-width: 768px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  body.dark-theme {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  .app-shell {
    height: auto;
    max-height: none;
    width: 100%;
    overflow: visible;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.85);
    z-index: 400;
  }

  .sidebar-mobile-open .app-sidebar {
    transform: translateX(0);
    width: 280px;
    min-width: 280px;
    padding: 1.25rem 1rem 1rem 1rem;
  }

  .sidebar-mobile-open .sidebar-menu-item span,
  .sidebar-mobile-open .sidebar-recents-block,
  .sidebar-mobile-open .sidebar-profile-meta,
  .sidebar-mobile-open .sidebar-profile-actions {
    display: flex !important;
  }

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

  .app-main-content {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .app-top-header {
    padding: 1rem 1rem 0.5rem 1rem;
  }

  .main-body-container {
    padding: 0 1rem 6.5rem 1rem;
  }

  .hero-search-bar-wrap,
  .hero-input-group {
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   5. Cabeçalho de Resultados & Grid de Lojas (3 Colunas)
   -------------------------------------------------------------------------- */
.product-header {
  margin-top: 2.75rem;
  margin-bottom: 2rem;
  overflow: visible;
}

.product-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  overflow: visible;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .product-title {
    font-size: 1.35rem;
  }
}

.product-subtitle {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.ai-desc-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: 0.15rem;
  color: #d4d4d8;
  cursor: help;
  outline: none;
  z-index: 220;
}

.ai-desc-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.85rem);
  transform: translateX(-50%);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #ffffff;
  color: #18181b;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 220;
}

.ai-desc-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 0.55rem;
  height: 0.55rem;
  background: #ffffff;
  transform: translate(-50%, -45%) rotate(45deg);
}

.ai-desc-mark:hover .ai-desc-tip,
.ai-desc-mark:focus .ai-desc-tip,
.ai-desc-mark:focus-visible .ai-desc-tip {
  opacity: 1;
  visibility: visible;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.results-count {
  font-size: 0.875rem;
  color: #a1a1aa;
}

.results-count strong {
  font-weight: 700;
  color: #ffffff;
}

.results-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}


.sort-wrapper {
  position: relative;
}

.sort-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.875rem;
  background-color: #18191e;
  border: 1px solid #26272e;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #d4d4d8;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.sort-selector:hover {
  background-color: #22232a;
  border-color: #353640;
}

.sort-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  min-width: 170px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: fadeIn 0.15s ease-out;
}

.sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #d4d4d8;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.sort-item:hover {
  background-color: #22242c;
  color: #ffffff;
}

.sort-item.selected {
  color: #ffffff;
  font-weight: 500;
}

.sort-check-icon {
  display: none;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  margin-left: 0.75rem;
}

.sort-item.selected .sort-check-icon {
  display: inline-block;
}

.cards-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  animation: fadeIn 0.25s ease-out;
}

@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* Card de Loja */
.store-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  min-height: 270px;
  box-sizing: border-box;
}

.store-card.best-deal {
  border: 1.5px solid var(--border-champion);
  background: var(--bg-card-champion);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.store-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.store-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: #202126;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a1a1aa;
  flex-shrink: 0;
}

.store-title-wrap {
  flex: 1;
  min-width: 0;
}

.store-name-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f4f4f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.store-address-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
  min-height: 52px;
}

.address-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #d4d4d8;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pin-icon {
  color: #71717a;
  flex-shrink: 0;
}

.address-subline {
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.distance-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 400;
}

.dist-icon {
  color: #71717a;
  flex-shrink: 0;
}

.card-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 0.625rem 0 0.875rem 0;
}

.pricing-block {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.pricing-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

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

.discount-badge {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  line-height: 1.4;
}

.discount-badge.no-discount {
  background: var(--badge-no-discount-bg);
  color: var(--badge-no-discount-text);
  border: 1px solid var(--badge-no-discount-border);
}

.discount-badge.with-discount {
  background: var(--badge-discount-bg);
  color: var(--badge-discount-text);
  border: 1px solid var(--badge-discount-border);
}

.pricing-main-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}

.price-left {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.currency-symbol {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.best-deal .currency-symbol {
  color: var(--text-champion);
}

.price-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1;
}

.price-value.champion-price {
  color: var(--text-champion);
}

.unit-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: 0.15rem;
}

.registered-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.reg-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.reg-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: #d1d5db;
}

.reg-rel {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.card-comparison-footer {
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.35;
}

.card-comparison-footer.champion-footer {
  color: var(--text-champion);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Skeleton Screen & Shimmer Animation (Carregamento Idêntico aos Cards Reais)
   -------------------------------------------------------------------------- */
@keyframes skeletonShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.09) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

.skeleton-results-container {
  animation: fadeIn 0.15s ease-out;
}

.store-card.skeleton-card {
  pointer-events: none;
  user-select: none;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  min-height: 270px;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   6. Layout Transitions & Barra de Busca Flutuante Inferior (Bottom Dock)
   -------------------------------------------------------------------------- */
.bottom-dock-container {
  position: fixed;
  bottom: 1.75rem;
  left: calc(var(--sidebar-width) + (100% - var(--sidebar-width)) / 2);
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(100% - 2rem);
  max-width: 480px;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed .bottom-dock-container {
  left: calc(64px + (100% - 64px) / 2) !important;
}

@media (max-width: 768px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 400;
    width: 280px;
    min-width: 280px;
    max-width: 85vw;
    margin-left: 0 !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  }

  .sidebar-mobile-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .sidebar-mobile-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-sidebar-toggle {
    display: flex !important;
  }

  .bottom-dock-container,
  .sidebar-collapsed .bottom-dock-container {
    left: 50% !important;
  }
}

/* Prevenção de Flickeio na Inicialização */
html.sidebar-init-collapsed .app-sidebar {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  transition: none !important;
}

html.sidebar-init-collapsed .sidebar-label,
html.sidebar-init-collapsed .sidebar-recents-block {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

html.sidebar-init-collapsed .bottom-dock-container {
  left: calc(64px + (100% - 64px) / 2) !important;
  transition: none !important;
}

.dock-floating-form {
  width: 100%;
  background: var(--dock-bg);
  border: 1px solid var(--dock-border);
  border-radius: 9999px;
  padding: 0.35rem 0.45rem 0.35rem 1.25rem;
  display: flex;
  align-items: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dock-floating-form:focus-within {
  border-color: #4b4e5d;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.dock-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.9375rem;
  font-family: inherit;
  letter-spacing: 0.02em;
  min-width: 0;
}

.dock-input-field::placeholder {
  color: #52525b;
}

.dock-search-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dock-search-circle-btn:hover {
  background: #f4f4f5;
}

/* --------------------------------------------------------------------------
   7. Indicadores de Carregamento & Skeletons
   -------------------------------------------------------------------------- */
.htmx-indicator {
  display: none !important;
}

.htmx-indicator.htmx-request,
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-flex !important;
}

/* --------------------------------------------------------------------------
   8. Alertas e Estados de Erro
   -------------------------------------------------------------------------- */
.results-wrapper {
  animation: fadeIn 0.25s ease-out;
}

.alert-card {
  background: #171315;
  border: 1px solid #381e22;
  border-radius: 18px;
  padding: 2.25rem 2rem;
  text-align: center;
  max-width: 580px;
  margin: 2.5rem auto;
}

.alert-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.alert-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.alert-desc {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ==========================================================================
   9. Etapa 2: Modos de Busca, Combustíveis, Filtros Fiscais & Paginação
   ========================================================================== */

/* Search Mode Tabs (Produtos vs Combustíveis) */
.search-mode-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.mode-tab {
  background: #18191e;
  border: 1px solid #282a32;
  color: var(--text-muted);
  border-radius: 9999px;
  padding: 0.5rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.mode-tab:hover {
  color: var(--text-primary);
  border-color: #3b3d49;
  background: #1e2026;
}

.mode-tab.active {
  background: #22242c;
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Location Criteria Bar */
.location-criteria-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}

.criteria-label {
  color: var(--text-muted);
}

.criteria-pills {
  display: flex;
  gap: 0.35rem;
  background: #141519;
  padding: 0.25rem;
  border-radius: 9999px;
  border: 1px solid #23252d;
}

.criteria-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.criteria-pill:hover {
  color: var(--text-primary);
}

.criteria-pill.active {
  background: #252833;
  color: var(--text-white);
}

/* Criteria Extra Inputs (CNPJ, Geolocation) */
.criteria-extra-panel {
  width: 100%;
  max-width: 580px;
  margin: 0 auto 1rem auto;
}

.criteria-text-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.criteria-text-input:focus {
  border-color: var(--text-champion);
}

.geo-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 120px;
  gap: 0.5rem;
}

/* Advanced Filters Toggle & Panel */
/* Fiscal Search Mode (Dedicated Tab Panel) */
#fiscal-mode-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fiscal-card-panel {
  background: rgba(18, 19, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  width: 100%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
  box-sizing: border-box;
}

.fiscal-form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.fiscal-field-full {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fiscal-fields-half-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.fiscal-field-half {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fiscal-label {
  font-size: 0.8125rem;
  color: #a1a1aa;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fiscal-req {
  color: #ef4444;
  font-weight: 600;
}

.fiscal-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.fiscal-input-icon {
  position: absolute;
  left: 0.9rem;
  color: #71717a;
  pointer-events: none;
  flex-shrink: 0;
}

.fiscal-input-field {
  width: 100%;
  background: rgba(10, 11, 14, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 0.75rem 0.95rem 0.75rem 2.6rem;
  color: #ffffff;
  font-size: 0.875rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.fiscal-input-field::placeholder {
  color: #52525b;
}

.fiscal-input-field:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
  background: rgba(15, 16, 20, 0.95);
}

.fiscal-hint {
  font-size: 0.72rem;
  color: #71717a;
  line-height: 1.4;
  margin-top: 0.25rem;
}

.fiscal-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.fiscal-legal-badge {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
}

.fiscal-legal-badge svg {
  flex-shrink: 0;
  color: #71717a;
  margin-top: 2px;
}

.fiscal-badge-text {
  font-size: 0.75rem;
  color: #71717a;
  line-height: 1.45;
}

.fiscal-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  color: #09090b;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: opacity 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.fiscal-submit-btn:hover {
  background-color: #f4f4f5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.fiscal-submit-btn:active {
  opacity: 0.88;
}

@media (max-width: 640px) {
  .fiscal-fields-half-row {
    grid-template-columns: 1fr;
  }
  .fiscal-actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  .fiscal-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Fuel Mode Grid & Cards (Matches Reference Visual Target) */
#fuel-mode-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fuel-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

@media (max-width: 720px) {
  .fuel-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.fuel-card-btn {
  background-color: #17181c;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  font-family: inherit;
}

.fuel-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.fuel-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background-color: #24252a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a1a1aa;
  flex-shrink: 0;
}

.fuel-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.fuel-card-desc {
  font-size: 0.875rem;
  font-weight: 400;
  color: #71717a;
  line-height: 1.4;
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  gap: 1rem;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pagination-records {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: 0.35rem;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.pagination-inline-form {
  display: inline;
}

.pagination-btn {
  background: #1f2027;
  border: 1px solid #30323c;
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.45rem 0.95rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(.disabled) {
  background: #282a35;
  border-color: #424553;
  color: var(--text-white);
}

.pagination-btn.disabled, .pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   Bulk matrix price comparison workspace
   ========================================================================== */

.bulk-workspace-container {
  width: 100%;
  max-width: 1400px;
  min-width: 0;
  box-sizing: border-box;
  align-self: stretch;
  margin: 0 auto;
  padding: 1.75rem 0.5rem 5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.bulk-header-section {
  width: 100%;
  box-sizing: border-box;
  padding: 0.25rem 0;
}

.bulk-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.bulk-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 860px;
}

.bulk-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1080px) {
  .bulk-setup-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.bulk-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.bulk-card:hover {
  border-color: var(--border-hover);
}

@media (max-width: 640px) {
  .bulk-card {
    padding: 1.25rem 1rem;
  }
}

.bulk-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bulk-step-number {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bulk-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-white);
}

.bulk-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.bulk-tabs-row {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-surface);
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .bulk-tabs-row {
    flex-direction: column;
  }
}

.bulk-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.bulk-tab-btn:hover {
  color: var(--text-primary);
}

.bulk-tab-btn.active {
  background: var(--bg-card-hover);
  color: var(--text-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.bulk-dropzone {
  border: 2px dashed #343744;
  border-radius: 12px;
  padding: 2.25rem 1.25rem;
  text-align: center;
  cursor: pointer;
  background: rgba(22, 23, 27, 0.6);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  box-sizing: border-box;
}

.bulk-dropzone:hover, .bulk-dropzone.drag-over {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

.dropzone-icon {
  color: #a1a1aa;
}

.dropzone-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.dropzone-hint {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.bulk-template-download-box {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: rgba(30, 31, 36, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 520px) {
  .bulk-template-download-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

.template-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.template-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-white);
}

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

.bulk-download-template-btn {
  background: #1f2937;
  color: #9ca3af;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.bulk-download-template-btn:hover {
  background: #374151;
  color: var(--text-white);
  border-color: #4b5563;
}

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

.bulk-textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.bulk-textarea:focus {
  outline: none;
  border-color: #10b981;
}

.textarea-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.bulk-textarea-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Step 2: CNPJ Registration Card (Clean 2-Tier Responsive Layout)
   ========================================================================== */

.cnpj-registration-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cnpj-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  box-sizing: border-box;
}

.cnpj-input-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.cnpj-field-wrap {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.cnpj-field-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #71717a;
  pointer-events: none;
}

.cnpj-main-input {
  width: 100%;
  box-sizing: border-box;
  padding-left: 2.5rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.875rem !important;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.cnpj-action-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.cnpj-name-wrap {
  flex: 1;
  min-width: 0;
}

.cnpj-name-input {
  width: 100%;
  box-sizing: border-box;
}

.bulk-add-comp-btn {
  background: #ffffff;
  color: #0c0d10;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.6rem 1.15rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.bulk-add-comp-btn:hover {
  background: #e4e4e7;
}

@media (max-width: 500px) {
  .cnpj-action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .bulk-add-comp-btn {
    width: 100%;
    justify-content: center;
  }
}

.custom-input, .custom-select {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.8125rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-input:focus, .custom-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.cnpj-helper-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
  width: 100%;
  box-sizing: border-box;
}

.cnpj-hint-text {
  flex: 1;
  min-width: 180px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-toggle-multi {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-toggle-multi:hover {
  text-decoration: underline;
}

.multi-cnpj-panel {
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed #374151;
  border-radius: 10px;
  padding: 0.85rem;
  margin-top: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.multi-cnpj-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.btn-add-batch {
  background: #ffffff;
  color: #0c0d10;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-add-batch:hover {
  background: #e4e4e7;
}

.btn-cancel-batch {
  background: transparent;
  border: 1px solid #4b5563;
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-cancel-batch:hover {
  color: var(--text-white);
  border-color: #9ca3af;
}

.active-competitors-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 600;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
  box-sizing: border-box;
}

.clear-comp-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.clear-comp-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  text-decoration: none;
}

.competitor-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  min-height: 48px;
  width: 100%;
  box-sizing: border-box;
}

.empty-chips-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

.comp-chip {
  background: rgba(30, 31, 36, 0.95);
  border: 1px solid #374151;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s ease;
}

.comp-chip:hover {
  border-color: #4b5563;
}

.chip-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
}

.chip-cnpj {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip-name-sub {
  font-size: 0.75rem;
  color: var(--text-white);
  font-weight: 600;
  padding-left: 0.45rem;
  border-left: 1px solid #4b5563;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-type-badge {
  font-size: 0.65rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip-remove {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.chip-remove:hover {
  color: #ef4444;
}

/* ==========================================================================
   Action & Status Bars
   ========================================================================== */

.bulk-action-bar {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
  width: 100%;
}

.bulk-header-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.bulk-run-btn {
  background: #ffffff;
  color: #0c0d10;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: all 0.15s ease;
}

.bulk-run-btn:hover:not(:disabled) {
  background: #f4f4f5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

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

@media (max-width: 480px) {
  .bulk-run-btn {
    width: 100%;
  }
}

.bulk-status-box {
  background: var(--bg-card);
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.status-spinner-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bulk-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.status-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-white);
}

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

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.bulk-error-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Analytical Results Section & KPIs
   ========================================================================== */

.bulk-results-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1080px) {
  .kpi-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .kpi-cards-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  box-sizing: border-box;
}

.kpi-card.highlight-cyan {
  border-color: rgba(6, 182, 212, 0.3);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.08), transparent);
}

.kpi-card.highlight-red {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), transparent);
}

.kpi-card.highlight-green {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

.kpi-label {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
}

.kpi-sub {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.matrix-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.matrix-search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  flex: 1;
  min-width: 260px;
  max-width: 480px;
  box-sizing: border-box;
}

.matrix-search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.matrix-filter-input {
  background: transparent;
  border: none;
  color: var(--text-white);
  font-size: 0.8125rem;
  width: 100%;
}

.matrix-filter-input:focus {
  outline: none;
}

.matrix-actions-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.export-excel-btn {
  background: #1e2025;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.export-excel-btn:hover {
  background: #272a31;
  border-color: rgba(255, 255, 255, 0.2);
}

.export-google-btn {
  background: #1e2025;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.export-google-btn:hover:not(:disabled) {
  background: #272a31;
  border-color: rgba(255, 255, 255, 0.2);
}

.export-google-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.bulk-export-card {
  background: var(--surface-card, #13151a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.bulk-export-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.bulk-export-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bulk-export-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white, #ffffff);
  margin: 0 0 0.25rem 0;
}

.bulk-export-desc {
  font-size: 0.9rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

.bulk-export-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.export-large-btn {
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .matrix-search-box {
    max-width: 100%;
    width: 100%;
  }
  .matrix-actions-wrap {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .export-excel-btn,
  .export-google-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Matrix Comparison Table & Strict Horizontal Scroll Containment
   ========================================================================== */

.matrix-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.matrix-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.matrix-table-wrapper::-webkit-scrollbar-track {
  background: #101217;
  border-radius: 4px;
}

.matrix-table-wrapper::-webkit-scrollbar-thumb {
  background: #2b303d;
  border-radius: 4px;
}

.matrix-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #52525b;
}

.matrix-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
  text-align: left;
}

.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0f172a;
  color: #cbd5e1;
  font-weight: 700;
  padding: 0.875rem 1rem;
  border-bottom: 2px solid #334155;
  white-space: nowrap;
}

/* Sticky first column (GTIN / EAN) for effortless matrix navigation */
.matrix-table th.col-gtin,
.matrix-table td.col-gtin {
  position: sticky;
  left: 0;
  z-index: 2;
}

.matrix-table th.col-gtin {
  background: #0f172a;
  z-index: 5;
}

.matrix-table td.col-gtin {
  background: #14151a;
  box-shadow: 3px 0 6px rgba(0, 0, 0, 0.4);
}

.matrix-table tr:hover td.col-gtin {
  background: #1f222b;
}

.col-gtin {
  width: 140px;
  min-width: 135px;
  white-space: nowrap;
}

.col-desc {
  min-width: 240px;
  max-width: 380px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

.col-price {
  width: 115px;
  min-width: 110px;
  white-space: nowrap;
}

.col-store {
  min-width: 150px;
  max-width: 220px;
}

.col-diff {
  width: 100px;
  min-width: 95px;
  white-space: nowrap;
}

.matrix-table th.comp-col-header {
  background: #113c38;
  color: #e2e8f0;
  min-width: 180px;
  max-width: 240px;
  vertical-align: top;
  padding: 0.75rem 1rem;
}

.comp-header-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffffff;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.comp-col-cnpj {
  font-size: 0.7rem;
  color: #a7f3d0;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 4px;
}

.matrix-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
  background: var(--bg-card);
}

.matrix-table tr:hover td {
  background: var(--bg-card-hover);
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.font-mono {
  font-family: monospace;
}

.text-cyan {
  color: #38bdf8;
}

.text-green {
  color: #ffffff;
}

.text-muted {
  color: var(--text-muted);
}

.font-bold {
  font-weight: 700;
}

.store-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comp-cell {
  min-width: 180px;
  white-space: nowrap;
  vertical-align: middle;
}

.comp-price-val {
  font-weight: 700;
  font-size: 0.875rem;
}

.comp-date-sub {
  font-size: 0.675rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.badge-status {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.badge-threat {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-advantage {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-tied {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-nodata {
  background: rgba(113, 113, 122, 0.12);
  color: #71717a;
}

.badge-lowest-star {
  color: #eab308;
  font-size: 0.875rem;
}

.market-badge {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}


/* --------------------------------------------------------------------------
   Dedicated Community Statistics & Telemetry Workspace (/stats)
   -------------------------------------------------------------------------- */
.stats-workspace-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  animation: fadeIn 0.3s ease-out;
}

.stats-header-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.stats-header-left {
  max-width: 720px;
}

.stats-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  margin-bottom: 0.85rem;
}

.stats-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.stats-live-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #34d399;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stats-main-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.stats-main-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.stats-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.stats-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.ranking-range {
  position: relative;
  z-index: 40;
  margin: -0.35rem 0 1.75rem;
  max-width: 560px;
}

.ranking-range-bar {
  display: flex;
  align-items: stretch;
  min-height: 40px;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  background: #0c0c0c;
  overflow: hidden;
}

.ranking-range-preset,
.ranking-range-dates {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  background: transparent;
  color: #ededed;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  min-width: 0;
}

.ranking-range-preset {
  padding: 0 0.85rem 0 0.8rem;
  border-right: 1px solid #3a3a3a;
  flex: 1 1 190px;
}

.ranking-range-preset span,
.ranking-range-dates span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-range-chevron {
  margin-left: auto;
  color: #a1a1aa;
  flex-shrink: 0;
}

.ranking-range-dates {
  padding: 0 0.95rem;
  color: #d4d4d8;
  flex: 1.3 1 230px;
}

.ranking-range-preset svg,
.ranking-range-dates svg {
  color: #a1a1aa;
  flex-shrink: 0;
}

.ranking-range-preset:hover,
.ranking-range-dates:hover,
.ranking-range-preset.is-open,
.ranking-range-dates.is-open {
  background: #161616;
}

.ranking-range-preset:focus-visible,
.ranking-range-dates:focus-visible {
  outline: 1px solid #ffffff;
  outline-offset: -1px;
}

.ranking-preset-menu[hidden],
.ranking-calendar[hidden] {
  display: none !important;
}

.ranking-preset-menu,
.ranking-calendar {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 120;
  background: #0a0a0a;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.ranking-preset-menu {
  left: 0;
  display: flex;
  width: min(520px, calc(100vw - 2rem));
  padding: 0.45rem;
}

.ranking-preset-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 210px;
  flex-shrink: 0;
  padding-right: 0.35rem;
}

.ranking-preset-option,
.ranking-hint-chip,
.ranking-cal-nav button,
.ranking-cal-day,
.ranking-cal-apply {
  font: inherit;
  cursor: pointer;
}

.ranking-preset-option {
  text-align: left;
  border: 0;
  background: transparent;
  color: #f5f5f5;
  border-radius: 8px;
  padding: 0.62rem 0.75rem;
  font-size: 0.92rem;
}

.ranking-preset-option:hover,
.ranking-preset-option.is-selected,
.ranking-hint-chip.is-selected {
  background: #1c1c1c;
}

.ranking-preset-hints {
  flex: 1;
  padding: 0.7rem 0.75rem 0.8rem 0.85rem;
  border-left: 1px solid #222;
}

.ranking-preset-hints p {
  margin: 0 0 0.7rem;
  color: #a1a1aa;
  font-size: 0.82rem;
}

.ranking-hint-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ranking-hint-chip {
  border: 1px solid #333;
  background: #141414;
  color: #ededed;
  border-radius: 8px;
  padding: 0.32rem 0.6rem;
  font-size: 0.82rem;
}

.ranking-hint-chip:hover {
  border-color: #555;
}

.ranking-calendar {
  right: 0;
  width: min(320px, calc(100vw - 2rem));
  padding: 0.9rem 0.9rem 0.7rem;
}

.ranking-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.ranking-cal-head strong {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.ranking-cal-nav {
  display: flex;
  gap: 0.2rem;
}

.ranking-cal-nav button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #d4d4d8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ranking-cal-nav button:hover {
  background: #1c1c1c;
}

.ranking-cal-week,
.ranking-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.ranking-cal-week {
  margin-bottom: 0.25rem;
}

.ranking-cal-week span {
  text-align: center;
  color: #8a8a8a;
  font-size: 0.75rem;
  font-weight: 600;
}

.ranking-cal-day {
  height: 36px;
  border: 0;
  background: transparent;
  color: #f3f3f3;
  padding: 0;
}

.ranking-cal-day span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.ranking-cal-day.is-outside,
.ranking-cal-day.is-future {
  color: #5c5c5c;
}

.ranking-cal-day.is-in-range {
  background: #2a2a2a;
}

.ranking-cal-day.is-start {
  border-radius: 8px 0 0 8px;
}

.ranking-cal-day.is-end {
  border-radius: 0 8px 8px 0;
}

.ranking-cal-day.is-start.is-end {
  border-radius: 8px;
  background: transparent;
}

.ranking-cal-day.is-start span,
.ranking-cal-day.is-end span {
  background: #fff;
  color: #111;
}

.ranking-cal-day:hover:not(:disabled) span {
  background: #2a2a2a;
}

.ranking-cal-day.is-start:hover span,
.ranking-cal-day.is-end:hover span {
  background: #fff;
}

.ranking-cal-day:disabled {
  cursor: default;
}

.ranking-cal-field {
  display: block;
  margin-top: 0.85rem;
  color: #a1a1aa;
  font-size: 0.82rem;
}

.ranking-cal-field input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  background: transparent;
  color: #fff;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.92rem;
}

.ranking-cal-apply {
  width: 100%;
  margin-top: 0.85rem;
  border: 1px solid #3a3a3a;
  background: transparent;
  color: #fff;
  border-radius: 8px;
  padding: 0.62rem 0.8rem;
  font-size: 0.95rem;
}

.ranking-cal-apply:hover {
  background: #161616;
}

.ranking-cal-zone {
  margin: 0.7rem 0 0.15rem;
  text-align: center;
  color: #8a8a8a;
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .ranking-range-bar {
    flex-direction: column;
  }

  .ranking-range-preset {
    border-right: 0;
    border-bottom: 1px solid #3a3a3a;
    min-height: 40px;
  }

  .ranking-preset-menu {
    flex-direction: column;
    width: min(320px, calc(100vw - 2rem));
  }

  .ranking-preset-list {
    width: auto;
    padding-right: 0;
  }

  .ranking-preset-hints {
    border-left: 0;
    border-top: 1px solid #222;
  }
}

/* KPI Cards */
.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.stats-kpi-card {
  background: rgba(20, 21, 24, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease,
              border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stats-kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.4);
}

.stats-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.stats-kpi-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.icon-searches {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.25);
}

.icon-products {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.25);
}

.icon-invoices {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.25);
}

.icon-stores {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.25);
}

.stats-kpi-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.stats-kpi-body {
  display: flex;
  flex-direction: column;
}

.stats-kpi-value {
  font-size: 2.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.35rem;
}

.stats-kpi-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f3f4f6;
  margin-bottom: 0.35rem;
}

.stats-kpi-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Content Grid: Categories + Recent Searches */
.stats-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.stats-recent-card {
  order: 1;
}

.stats-category-card {
  order: 2;
}

.stats-section-card {
  background: rgba(20, 21, 24, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.stats-section-header {
  margin-bottom: 1.5rem;
}

.stats-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.015em;
  margin-bottom: 0.25rem;
}

.stats-section-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Category List */
.stats-category-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.stats-cat-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stats-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-cat-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-cat-icon {
  font-size: 0.95rem;
}

.stats-cat-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: #e4e4e7;
}

.stats-cat-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: #a1a1aa;
  font-variant-numeric: tabular-nums;
}

.stats-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
}

.stats-progress-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-product {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.bar-fuel {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.bar-store {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.bar-fiscal {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.stats-info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.stats-info-note svg {
  color: #a1a1aa;
  min-width: 16px;
  margin-top: 2px;
}

/* Recent Searches Table */
.stats-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.stats-table th {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stats-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.84rem;
  vertical-align: middle;
}

.stats-table-row:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.td-rank {
  width: 3rem;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.td-product-code {
  max-width: 160px;
  font-variant-numeric: tabular-nums;
}

.td-query-term {
  max-width: 320px;
}

.query-term-text {
  font-weight: 500;
  color: #ffffff;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-product {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.badge-fuel {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.badge-store {
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.badge-fiscal {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.municipality-tag {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.results-positive {
  font-weight: 600;
  color: #34d399;
  font-size: 0.8rem;
}

.results-zero {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.time-relative {
  color: var(--text-muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.stats-empty-notice,
.stats-unavailable-card {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.stats-unavailable-card svg {
  color: #f59e0b;
  margin-bottom: 1rem;
}

.stats-unavailable-card h3 {
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

@media (max-width: 1024px) {
  .stats-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .stats-kpi-grid {
    grid-template-columns: 1fr;
  }

  .stats-header-section {
    flex-direction: column;
    gap: 1rem;
  }

  .stats-back-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==============================================================================
   Settings & Profile Management View (Vercel Standardized Design)
   ============================================================================== */

.settings-page-wrapper,
.settings-workspace-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1rem 5rem;
  box-sizing: border-box;
}

/* Header Banner */
.settings-header-banner,
.settings-header-section {
  margin-bottom: 2rem;
}

.settings-main-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0 0 0.4rem;
}

.settings-main-subtitle {
  font-size: 0.875rem;
  color: #888888;
  margin: 0;
  line-height: 1.5;
}

/* Notice Banner */
.settings-notice-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.75rem;
  animation: slideDownFade 0.2s ease-out;
}

.settings-notice-banner.is-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.settings-notice-banner.is-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.notice-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.notice-text {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
}

.notice-close-btn {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.notice-close-btn:hover {
  opacity: 1;
}

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

/* Passa Preço Navigation Tabs (Underline Style with Brand Colors) */
.settings-tabs-nav {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.settings-tabs-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.15rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.18s ease;
  white-space: nowrap;
  position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
}

.settings-tab-btn:hover {
  color: #ffffff;
}

.settings-tab-btn svg {
  stroke: currentColor;
  opacity: 0.7;
  transition: all 0.18s ease;
}

.settings-tab-btn:hover svg {
  opacity: 1;
}

.settings-tab-btn.active {
  color: #ffffff;
  border-bottom: 2px solid #ffffff;
  font-weight: 600;
}

.settings-tab-btn.active svg {
  stroke: #ffffff;
  opacity: 1;
}

/* Tab Panes (All guaranteed 100% fixed width) */
.settings-tab-pane {
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.settings-tab-pane.active {
  display: block;
  animation: fadeInPane 0.15s ease-out;
}

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

/* Passa Preço Card Structure */
.settings-card {
  width: 100%;
  background: #151720;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.settings-card-body {
  padding: 24px;
  box-sizing: border-box;
}

.settings-card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.settings-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.settings-card-subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

/* Avatar circular preview */
.vercel-avatar-circle {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(37, 99, 235, 0.45);
  background-color: #1e212b;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(37, 99, 235, 0.2);
  flex-shrink: 0;
}

.vercel-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Card Footer */
.settings-card-footer {
  background: rgba(15, 16, 21, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 24px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-sizing: border-box;
}

.settings-footer-text {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
  flex: 1;
}

.settings-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Passa Preço Action Buttons */
.vercel-btn-save,
.settings-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: #0f1015;
  border: 1px solid #ffffff;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 7px 18px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.vercel-btn-save:hover,
.settings-submit-btn:hover {
  background: #e8e8ec;
  border-color: #e8e8ec;
  color: #0f1015;
}

.vercel-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.vercel-btn-secondary:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Form Controls */
.vercel-form-group {
  margin-bottom: 1.25rem;
}

.vercel-form-group:last-child {
  margin-bottom: 0;
}

.vercel-form-label,
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 6px;
}

.vercel-input,
.vercel-select,
.settings-input,
.settings-select {
  width: 100%;
  max-width: 480px;
  background-color: #0f1015;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  padding: 8px 12px;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.vercel-select,
.settings-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  line-height: 20px;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.5 5.25 7 8.75 10.5 5.25' stroke='%23a1a1aa' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
}

.vercel-input:focus,
.vercel-select:focus,
.settings-input:focus,
.settings-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
  background-color: #12141c;
}

.password-field {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.password-field .vercel-input {
  width: 100%;
  max-width: none;
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #a1a1aa;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: #ffffff;
  outline: none;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

.vercel-input.is-readonly,
.settings-input.is-readonly {
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.06);
  cursor: not-allowed;
}

.vercel-form-grid-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .vercel-form-grid-two {
    grid-template-columns: 1fr;
  }

  .vercel-input,
  .vercel-select,
  .settings-input,
  .settings-select,
  .password-field {
    max-width: 100%;
  }

  .settings-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .settings-footer-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==============================================================================
   Toasts (Sonner-style, bottom-right)
   ============================================================================== */

.toast-region {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  max-width: 380px;
  padding: 12px 14px;
  background: #151720;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color: #f1f5f9;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.toast-leaving {
  opacity: 0;
  transform: translateX(16px);
}

.toast-icon {
  display: flex;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: #4ade80;
}

.toast-error .toast-icon {
  color: #f87171;
}

.toast-text {
  flex: 1;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.15s ease;
}

.toast-close:hover {
  color: #ffffff;
}

@media (max-width: 640px) {
  .toast-region {
    left: 16px;
    right: 16px;
    bottom: 16px;
    align-items: stretch;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   Auth Pages (Login & Register)
   -------------------------------------------------------------------------- */
.auth-body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(59, 130, 246, 0.08), transparent 100%),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(16, 185, 129, 0.05), transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-primary);
}

.auth-wrapper {
  width: 100%;
  max-width: 440px;
  padding: 24px 16px;
  margin: auto;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(255, 255, 255, 0.05) inset;
  display: flex;
  flex-direction: column;
}

.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  text-decoration: none;
}

.auth-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-forgot-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.auth-forgot-link:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.15s ease;
}

.auth-input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-input:hover {
  border-color: var(--border-hover);
}

.auth-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  background: #18191e;
}

.auth-input-wrapper:focus-within .auth-input-icon {
  color: #ffffff;
}

.auth-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  margin-top: 6px;
  background: #ffffff;
  color: #0c0d10;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: background-color 0.15s ease;
}

.auth-submit-btn:hover {
  background: #f1f5f9;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.auth-link {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.auth-link:hover {
  color: #93c5fd;
}


.store-directory-note {
  margin: 0.85rem 0 0.15rem;
  color: #a1a1aa;
  font-size: 0.82rem;
  line-height: 1.45;
}

/* ==========================================================================
   Competitor Management & Toggle Switch (Colossus + Settings)
   ========================================================================== */

/* Toggle Switch Widget */
.comp-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.comp-toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.comp-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.comp-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comp-toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #f8fafc;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.comp-toggle-switch input:checked + .comp-toggle-slider {
  background-color: #22c55e;
  border-color: #22c55e;
}

.comp-toggle-switch input:checked + .comp-toggle-slider:before {
  transform: translateX(18px);
}

.comp-toggle-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.comp-toggle-switch input:checked ~ .comp-toggle-text,
.comp-toggle-wrap:has(input:checked) .comp-toggle-text {
  color: #22c55e;
  font-weight: 600;
}

/* Competitor List in Settings */
.settings-comp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.settings-comp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.18s ease;
}

.settings-comp-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.settings-comp-row.is-inactive {
  opacity: 0.55;
  background: rgba(15, 17, 23, 0.6);
  border-color: rgba(255, 255, 255, 0.04);
}

.settings-comp-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.settings-comp-header-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-comp-cnpj {
  font-size: 0.95rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.02em;
}

.settings-comp-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.settings-comp-name {
  font-size: 0.875rem;
  color: #e2e8f0;
  font-weight: 500;
}

.settings-comp-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.settings-comp-del-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.settings-comp-del-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

.settings-empty-comp {
  text-align: center;
  padding: 3rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.settings-empty-comp-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.settings-empty-comp-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.settings-empty-comp-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 440px;
  margin: 0 auto;
}

/* Colossus Step 2 Chip enhancements */
.comp-chip.is-inactive {
  opacity: 0.45;
  filter: grayscale(40%);
  border-color: #27272a;
}

.chip-status-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.chip-status-tag.active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.chip-status-tag.inactive {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chip-status-tag:hover {
  filter: brightness(1.2);
}

.bulk-settings-shortcut-btn {
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}

.bulk-settings-shortcut-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
