/* ==========================================================================
   VIDDA LEILÃO — CAMADA VISUAL MODERNA
   Carregada depois de style.css: redefine tokens e componentes sem alterar a lógica.
   ========================================================================== */

:root {
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Mirador', 'Playfair Display', Georgia, serif;

  --bg-body: #f3f5f7;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --bg-subtle: #f6f8f9;
  --bg-muted: #eef2f4;
  --bg-table-stripe: #f8fafb;

  --line: #e7ebee;
  --line-strong: #d9dfe3;
  --border-color: var(--line);
  --border-light: var(--line-strong);

  --text-main: #10282e;
  --text-muted: #566d74;
  --text-dim: #8b9ca2;

  --teal-50: #eaf6f6;
  --teal-100: #d4eeee;
  --teal-600: #009a9c;
  --teal-700: #007c7e;
  --teal-800: #005866;
  --brand-gradient: linear-gradient(135deg, #007c7e, #009a9c);
  --brand-gradient-hover: linear-gradient(135deg, #005866, #007c7e);

  --shadow-xs: 0 1px 2px rgba(16, 40, 48, 0.05);
  --shadow-sm: 0 1px 2px rgba(16, 40, 48, 0.04), 0 2px 10px rgba(16, 40, 48, 0.04);
  --shadow-md: 0 2px 6px rgba(16, 40, 48, 0.05), 0 8px 24px rgba(16, 40, 48, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 40, 48, 0.12);

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* --- Base --- */
body {
  background: var(--bg-body);
  background-image: none;
  font-size: 14px;
  letter-spacing: -0.005em;
  font-feature-settings: "cv11", "ss01";
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.brand-text h1,
.fullpage-title {
  font-family: var(--font-brand);
}

::selection {
  background: var(--teal-100);
}

.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.glass-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

/* --- Botões --- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.84rem;
  border-radius: var(--radius-md);
  padding: 0.55rem 1rem;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(0, 88, 102, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-gradient-hover);
  box-shadow: 0 4px 12px rgba(0, 124, 126, 0.25);
  transform: none;
}

.btn-outline,
.btn-secondary {
  background: #fff;
  color: var(--text-main);
  border-color: var(--line-strong);
}

.btn-outline:hover:not(:disabled),
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: #c9d1d6;
  color: var(--text-main);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-muted);
  color: var(--text-main);
}

.btn-danger-ghost {
  color: #be123c;
}

.btn-danger-ghost:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.08);
  color: #9f1239;
}

.btn-sm {
  padding: 0.42rem 0.75rem;
  font-size: 0.8rem;
}

.btn-icon {
  padding: 0.45rem;
}

.btn-sm.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.4rem;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--teal-700);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-link svg {
  width: 14px;
  height: 14px;
}

.btn-link:hover {
  background: var(--teal-50);
  color: var(--teal-800);
}

/* --- Campos --- */
.custom-input,
.custom-select {
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  background-color: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.custom-select {
  padding-right: 2.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23708890' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 0.7rem center;
}

.custom-input:hover,
.custom-select:hover {
  border-color: #c5ced3;
}

.custom-input:focus,
.custom-select:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(0, 154, 156, 0.14);
}

.custom-input::placeholder {
  color: #9aabb0;
}

.input-sm,
.select-sm,
.table-filter-item .custom-input.input-sm {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.select-sm {
  padding-right: 1.9rem;
}

.filter-group {
  gap: 0.4rem;
  min-width: 0;
}

.filter-group label,
.multi-check-label {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
}

.filter-hint {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-dim);
}

.select-with-icon {
  position: relative;
}

.select-with-icon > svg,
.select-with-icon > .input-prefix {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-dim);
}

.select-with-icon > svg {
  width: 15px;
  height: 15px;
}

.select-with-icon > .input-prefix {
  font-size: 0.8rem;
  font-weight: 600;
}

.select-with-icon > .custom-select,
.select-with-icon > .custom-input {
  width: 100%;
  padding-left: 2.2rem;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-input-wrap > svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input-wrap > .custom-input {
  padding-left: 2.75rem;
}

.search-input-sm > svg {
  left: 0.75rem;
  width: 15px;
  height: 15px;
}

.search-input-sm > .custom-input {
  min-height: 36px;
  padding-left: 2.2rem;
  font-size: 0.82rem;
}

/* --- Cabeçalho --- */
.top-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0;
}

.header-container {
  height: 64px;
  gap: 1.25rem;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.brand {
  gap: 0.6rem;
  flex-shrink: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
}

.brand-icon img {
  filter: none;
}

.brand-text h1 {
  font-size: 1.12rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.header-container {
  position: relative;
}

/* Centralizado na largura toda do header, independente da largura da marca e dos botões de conta. */
.header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.header-nav-link {
  padding: 0.35rem 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.header-nav-link:hover {
  color: var(--text-main);
}

.header-nav-link.active {
  color: var(--teal-700);
  font-weight: 600;
  border-bottom-color: var(--teal-700);
}

/* Páginas do app: repetem o espaçamento do .container */
.app-page {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

body:not([data-page="buscar"]) .quick-nav,
body:not([data-page="buscar"]) .profile-update-fab {
  display: none !important;
}

.home-hero {
  margin-top: 2rem;
  padding: 3rem 2rem;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.home-hero h2 {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.home-hero p {
  max-width: 40rem;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
}

.home-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#pageHome .home-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
  background:
    radial-gradient(ellipse at top, rgba(0, 154, 156, 0.08), transparent 65%),
    #fff;
}

#pageHome .home-hero h2 {
  max-width: 44rem;
  margin: 0 auto 0.85rem;
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

#pageHome .home-hero p {
  max-width: 42rem;
  margin-bottom: 2.25rem;
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  line-height: 1.6;
}

.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.home-search-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  border-radius: var(--radius-md);
}

.home-search-field > label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.home-search .custom-input,
.home-search .custom-select {
  width: 100%;
  min-height: 50px;
  font-size: 0.92rem;
}

.home-search-field.needs-attention {
  animation: brand-picker-flag 0.8s ease-in-out 3;
}

.home-search-submit {
  white-space: nowrap;
}

.home-search-detailed {
  margin-top: 1rem;
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .home-search {
    grid-template-columns: 1fr 1fr;
  }

  .home-search-modelo,
  .home-search-submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .home-search {
    grid-template-columns: 1fr;
  }
}

.home-section-title {
  margin-bottom: 1.1rem;
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.home-categorias {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.home-categoria {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-align: left;
  font-family: var(--font-body);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-fast);
}

.home-categoria:hover {
  transform: translateY(-3px);
  border-color: var(--teal-100);
  box-shadow: var(--shadow-md);
}

.home-categoria img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-subtle);
}

.home-categoria-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.15rem 1.2rem;
}

.home-categoria-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.home-categoria-text {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.home-motivos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.home-motivo {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.35rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.home-motivo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.35rem;
  border-radius: var(--radius-md);
  background: var(--teal-50);
  color: var(--teal-700);
}

.home-motivo-icon svg {
  width: 20px;
  height: 20px;
}

.home-motivo h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

.home-motivo p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Planos (base de referência: textos e preços ainda provisórios) */
.home-planos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 1rem;
}

.home-plano {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.6rem 1.4rem 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.home-plano.is-destaque {
  border: 1.5px solid var(--teal-600);
  box-shadow: var(--shadow-md);
}

.home-plano-badge {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.home-plano-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.home-plano-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.home-plano-preco {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin: 0.4rem 0;
}

.home-plano-preco .valor {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.home-plano-preco .periodo {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.home-plano-beneficios {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  padding: 0.9rem 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.home-plano-beneficios li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--text-main);
}

.home-plano-beneficios svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 0.1rem;
  color: var(--teal-600);
}

.home-plano-btn {
  width: 100%;
  min-height: 44px;
  margin-top: auto;
}

/* Como funciona */
.home-etapas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.home-etapa {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

/* Linha ligando as etapas, atrás dos ícones */
.home-etapa:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(1.5rem + 28px);
  left: calc(50% + 40px);
  width: calc(100% - 80px + 1rem);
  border-top: 2px dashed var(--teal-100);
}

.home-etapa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 0.4rem;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-700);
}

.home-etapa-icon svg {
  width: 24px;
  height: 24px;
}

.home-etapa-num {
  position: absolute;
  top: 1.25rem;
  left: calc(50% + 14px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 1;
}

.home-etapa h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
}

.home-etapa p {
  max-width: 18rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Perguntas frequentes */
.home-faq {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.home-faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-normal);
}

.home-faq-item:hover,
.home-faq-item[open] {
  border-color: var(--teal-100);
}

.home-faq-item[open] {
  box-shadow: var(--shadow-md);
}

.home-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.home-faq-item summary::-webkit-details-marker {
  display: none;
}

.home-faq-item summary:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
  border-radius: var(--radius-lg);
}

.home-faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--teal-700);
  transition: transform var(--transition-normal);
}

.home-faq-item[open] .home-faq-chevron {
  transform: rotate(180deg);
}

.home-faq-item p {
  max-width: 78ch;
  padding: 0 1.25rem 1.2rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
  animation: home-faq-reveal 0.25s ease;
}

.home-faq-more {
  margin-top: 1rem;
  font-size: 0.86rem;
}

.faq-contato {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.4rem;
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-lg);
}

.faq-grupos .faq-contato {
  margin-top: 0;
}

.faq-contato-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: var(--teal-700);
}

.faq-contato-icon svg {
  width: 20px;
  height: 20px;
}

.faq-contato-body {
  min-width: 0;
}

.faq-contato-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--text-main);
}

.faq-contato-body p {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.faq-contato-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
}

.faq-contato-links a {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teal-700);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.faq-contato-links a:hover,
.faq-contato-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-contato-links small,
.site-footer-mail small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

@media (max-width: 520px) {
  .faq-contato {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* --- Página de perguntas frequentes --- */
.faq-hero p {
  margin-bottom: 0;
}

.faq-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.faq-nav {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.faq-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  background: none;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.faq-nav-item svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: var(--teal-600);
}

.faq-nav-item:hover,
.faq-nav-item:focus-visible {
  background: var(--teal-50);
  color: var(--teal-800);
}

.faq-grupos {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.faq-grupo {
  scroll-margin-top: 84px;
}

.faq-grupo-head {
  margin-bottom: 1rem;
}

.faq-grupo-head h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.faq-grupo-head p {
  margin-top: 0.25rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .faq-nav {
    top: 64px;
    z-index: 5;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .faq-nav-item {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .faq-grupo {
    scroll-margin-top: 140px;
  }
}

/* --- Página de planos --- */
.planos-hero {
  background:
    radial-gradient(ellipse at top, rgba(0, 154, 156, 0.08), transparent 65%),
    #fff;
}

.planos-hero p {
  margin-bottom: 1.25rem;
}

.planos-selos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.planos-selos li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--teal-800);
}

.planos-selos svg {
  width: 17px;
  height: 17px;
  color: var(--teal-600);
}

.planos-tabela-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.planos-tabela {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.planos-tabela th,
.planos-tabela td {
  padding: 0.85rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  color: var(--text-main);
}

.planos-tabela tbody th[scope="row"],
.planos-tabela-recurso {
  text-align: left;
  font-weight: 500;
}

.planos-tabela tbody th[scope="row"] {
  width: 32%;
}

.planos-tabela thead th {
  position: relative;
  padding-top: 1.6rem;
  padding-bottom: 1.1rem;
  vertical-align: bottom;
}

.planos-tabela-recurso {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.planos-col-nome {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.planos-col-preco {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-700);
}

.planos-col-preco small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
}

.planos-col-badge {
  position: absolute;
  top: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.planos-tabela .is-destaque {
  background: var(--teal-50);
}

.planos-grupo th {
  padding: 0.6rem 1rem;
  background: #f7faf9;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-800);
}

.planos-tabela tbody tr:not(.planos-grupo):hover th,
.planos-tabela tbody tr:not(.planos-grupo):hover td:not(.is-destaque) {
  background: #fbfdfc;
}

.planos-sim,
.planos-nao {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.planos-sim {
  color: var(--teal-600);
}

.planos-nao {
  color: var(--text-dim);
  opacity: 0.6;
}

.planos-tabela tfoot td {
  padding: 1rem;
  border-bottom: none;
}

.planos-tabela-btn {
  width: 100%;
  min-height: 40px;
  font-size: 0.85rem;
}

.planos-garantia {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.6rem 1.75rem;
  background: linear-gradient(135deg, var(--teal-50), #fff);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-lg);
}

.planos-garantia-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
}

.planos-garantia-icon svg {
  width: 24px;
  height: 24px;
}

.planos-garantia h3 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.planos-garantia p {
  max-width: 78ch;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.planos-garantia .planos-garantia-nota {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.planos-duvidas {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .planos-garantia {
    flex-direction: column;
    padding: 1.35rem;
  }

  .planos-tabela tbody th[scope="row"],
  .planos-tabela thead .planos-tabela-recurso,
  .planos-tabela tfoot td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
  }
}

/* Páginas ainda sem conteúdo (Termos, Privacidade) */
.page-placeholder {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* --- Rodapé (todas as páginas) --- */
#appShell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#appShell > main {
  flex: 1 0 auto;
}

.site-footer {
  background: var(--teal-800);
  background: linear-gradient(180deg, #0d3a42, #0a2d33);
  color: rgba(255, 255, 255, 0.72);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
}

.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.site-footer-brand .brand-icon img {
  filter: none;
}

.site-footer-logo {
  font-family: var(--font-brand);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  white-space: nowrap;
}

.site-footer-logo span {
  color: #5fd3d4;
}

.site-footer-brand p {
  max-width: 22rem;
  font-size: 0.86rem;
  line-height: 1.55;
}

.site-footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.site-footer-col h4 {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.site-footer-col button {
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.site-footer-col button:hover,
.site-footer-col button:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-mail {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 100%;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color var(--transition-fast);
}

.site-footer-mail:hover,
.site-footer-mail:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-mail span {
  min-width: 0;
}

.site-footer-mail small {
  color: rgba(255, 255, 255, 0.5);
}

.site-footer-contato svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 0.15rem;
  color: #5fd3d4;
}

.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 900px) {
  .site-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
  }
}

@keyframes home-faq-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-faq-chevron,
  .home-faq-item p {
    transition: none;
    animation: none;
  }
}

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

@media (max-width: 860px) {
  .home-planos,
  .home-etapas {
    grid-template-columns: 1fr;
  }

  .home-plano.is-destaque {
    margin-top: 0.5rem;
  }

  .home-etapa:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 760px) {
  .home-categorias,
  .home-motivos {
    grid-template-columns: 1fr;
  }

  .home-categoria {
    flex-direction: row;
  }

  .home-categoria img {
    width: 40%;
    aspect-ratio: 4 / 3;
  }

  .home-categoria-body {
    justify-content: center;
  }
}

.logout-card {
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.logout-card .auth-subtitle {
  margin: 0 0 0.5rem;
}

#broadSearchModal .logout-card {
  max-width: 440px;
}

.auth-field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.auth-field-hint.hidden {
  display: none;
}

#pageLeiloeiros .section-container {
  margin-top: 1.5rem;
}

.leiloeiros-intro {
  margin: -0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.leiloeiro-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-width: 0;
}

.leiloeiro-favicon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: contain;
}

.leiloeiro-favicon.is-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  color: var(--teal-700);
  font-weight: 700;
}

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

.leiloeiro-info strong {
  font-size: 0.92rem;
  color: var(--text-main);
}

.leiloeiro-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.leiloeiro-card .btn {
  flex-shrink: 0;
}

.header-controls {
  flex-shrink: 0;
  margin-left: auto;
}

.user-session-box {
  gap: 0.75rem;
  padding: 0;
  background: transparent;
  border: none;
  max-width: none;
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  min-width: 0;
}

.user-meta-label {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.user-email-label {
  max-width: 200px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
}

.user-session-box .btn svg {
  width: 15px;
  height: 15px;
  color: currentColor;
}

/* --- Layout geral --- */
.dashboard-body {
  padding: 0 0 4rem;
}

.container {
  gap: 2.25rem;
}

.alert-banner {
  margin-top: 1.25rem;
  border-radius: var(--radius-lg);
}

/* --- Pesquisa de oportunidades (faixa branca integrada à página) --- */
.search-panel-section {
  position: relative;
  padding: 1.75rem 0 1.5rem;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 0 0 100vmax #fff, 0 1px 0 100vmax var(--line);
  clip-path: inset(0 -100vmax -1px);
}

.search-panel-header {
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.search-panel-title {
  display: block;
}

.search-panel-title h2 {
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.search-panel-subtitle {
  margin-top: 0.25rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.search-panel-section.is-collapsed {
  padding-bottom: 1.5rem;
}

/* Perfis salvos */
.profile-bar {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-left: auto;
}

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

.profile-field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
}

.profile-field-label svg {
  width: 14px;
  height: 14px;
  color: var(--teal-700);
}

/* Campo + botão grudados: deixa claro que um age sobre o outro. */
.input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-group:hover {
  border-color: #c5ced3;
}

.input-group:focus-within {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(0, 154, 156, 0.14);
}

.input-group > .custom-input,
.input-group > .custom-select {
  border: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  box-shadow: none;
  background-color: transparent;
}

.input-group > .custom-input:focus,
.input-group > .custom-select:focus {
  box-shadow: none;
}

.input-group > #selectFilterProfile {
  width: 240px;
}

.input-group > #inputProfileName {
  width: 210px;
}

.input-group-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  border: none;
  border-left: 1px solid var(--line);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.input-group-btn svg {
  width: 16px;
  height: 16px;
}

.btn-delete-profile {
  color: #be123c;
}

.btn-delete-profile:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.08);
  color: #9f1239;
}

.btn-delete-profile:disabled {
  color: #c3cdd2;
  cursor: not-allowed;
}

.input-group > .btn-save-profile {
  margin: -1px -1px -1px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.btn-save-profile {
  min-height: 40px;
  padding: 0.55rem 1rem;
  background: var(--brand-gradient);
  box-shadow: none;
}

.btn-save-profile:hover:not(:disabled) {
  background: var(--brand-gradient-hover);
  box-shadow: none;
}

/* Busca principal */
.search-hero {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

.search-input-main {
  min-height: 50px;
  font-size: 0.98rem;
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--teal-600);
}

.search-input-main:hover {
  border-color: var(--teal-700);
}

.search-input-main:focus {
  background-color: #fff;
}

.search-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Visitante: Favoritos e alerta ficam ocultos, e a caixa vazia não pode sobrar ao lado da busca. */
.search-actions:not(:has(> :not(.hidden))) {
  display: none;
}

.search-submit {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.search-submit > .btn-search-hero {
  width: min(100%, 480px);
  min-height: 52px;
  font-size: 0.98rem;
}

.btn-search-hero,
.btn-search-db {
  width: auto;
  min-height: 50px;
  padding: 0 1.35rem;
  font-size: 0.9rem;
  letter-spacing: 0;
  border-radius: var(--radius-md);
}

.btn-search-hero {
  background: var(--brand-gradient);
  box-shadow: 0 2px 8px rgba(0, 124, 126, 0.25);
}

.btn-search-hero:hover:not(:disabled) {
  transform: none;
  background: var(--brand-gradient-hover);
  box-shadow: 0 6px 16px rgba(0, 124, 126, 0.3);
}

.btn-search-hero svg,
.btn-search-db svg {
  width: 17px;
  height: 17px;
}

.search-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
}

.search-hero-meta .filter-hint {
  margin: 0;
  color: var(--color-amber);
}

.search-hero-meta .sync-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
}

.sync-status svg {
  width: 14px;
  height: 14px;
}

.sync-status.is-running svg {
  animation: spin 1.2s linear infinite;
}

.search-hero-meta:not(:has(.filter-hint:not(.hidden))) {
  display: none;
}

.advanced-switch {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
}

.advanced-switch .filter-hint {
  margin: 0;
}

.advanced-switch .search-encerrados-check {
  align-self: flex-start;
}

/* Interruptor */
.switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.switch-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #cfd8dc;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast);
}

.switch-toggle input:checked + .switch-track {
  background: var(--teal-600);
}

.switch-toggle input:checked + .switch-track::after {
  transform: translateX(14px);
}

.switch-toggle input:focus-visible + .switch-track {
  box-shadow: 0 0 0 3px rgba(0, 154, 156, 0.2);
}

.switch-toggle:has(input:checked) {
  color: var(--text-main);
}

/* Filtros ativos */
.active-filters {
  display: flex;
  align-items: center;
  gap: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.6rem 0.55rem 0.85rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
}

.active-filters-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  align-self: flex-start;
  padding-top: 0.3rem;
}

.active-filters-label svg {
  width: 14px;
  height: 14px;
}

.active-filters-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.active-filters .btn-link {
  align-self: flex-start;
}

.active-filters-empty {
  padding: 0.3rem 0;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.active-filters.is-empty #btnClearFilters {
  opacity: 0.55;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.25rem 0.2rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
}

.active-chip.is-brand,
.active-chip.is-source {
  background: var(--teal-50);
  box-shadow: inset 0 0 0 1px rgba(0, 154, 156, 0.25);
  color: var(--teal-800);
}

.active-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.active-chip-remove:hover {
  background: rgba(16, 40, 48, 0.08);
  color: var(--text-main);
}

/* Filtros principais */
.primary-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.1rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}

/* Todo o painel de filtros ocupa a mesma largura, centralizado (forma de retângulo). */
.search-body {
  --filters-width: 960px;
}

/* Carros / Motos / Caminhões acima dos filtros ativos */
.tipo-veiculo-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 1rem;
}

.tipo-veiculo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.7rem 1rem;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast),
    color var(--transition-fast), box-shadow var(--transition-normal);
}

.tipo-veiculo-btn svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--teal-600);
}

.tipo-veiculo-btn:hover {
  border-color: var(--teal-100);
  box-shadow: var(--shadow-md);
}

.tipo-veiculo-btn:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
}

.tipo-veiculo-btn.is-active {
  background: var(--teal-50);
  border-color: var(--teal-600);
  color: var(--teal-800);
  box-shadow: 0 0 0 3px rgba(0, 154, 156, 0.12);
}

.tipo-veiculo-btn.is-active svg {
  color: var(--teal-700);
}

@media (max-width: 520px) {
  .tipo-veiculo-toggle {
    gap: 0.5rem;
  }

  .tipo-veiculo-btn {
    flex-direction: column;
    gap: 0.25rem;
    min-height: 64px;
    padding: 0.55rem 0.4rem;
    font-size: 0.82rem;
  }
}

.search-body > .active-filters,
.search-body > .search-hero,
.search-body > .search-hero-meta,
.search-body > .primary-filters,
.search-body > .brand-picker,
.search-body > .advanced-filters,
.search-body > .search-submit {
  width: 100%;
  max-width: var(--filters-width);
  margin-left: auto;
  margin-right: auto;
}

.primary-filters > .filter-group {
  flex: 1 1 0;
}

.primary-filters .filter-group-full {
  flex: 1 0 100%;
  display: flex;
  flex-direction: column;
}

/* Mesmo tamanho de fonte, altura e formato em todos os filtros do painel (marcas à parte). */
.search-body .filter-group label,
.search-body .multi-check-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-muted);
}

.search-body .filter-group,
.search-body .multi-check-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.search-body .custom-input:not(.search-input-main),
.search-body .custom-select {
  height: 42px;
  min-height: 42px;
  font-size: 0.86rem;
}

.search-body .multi-check-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.search-body .multi-check-options .check-pill {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
}

.search-body .filter-hint {
  margin: 0;
  font-size: 0.72rem;
}

.primary-filters .filter-group-full .check-pill {
  flex: 1 1 0;
  justify-content: center;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-control > .custom-input {
  width: 72px;
  flex-shrink: 0;
  text-align: center;
}

.qty-presets {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-top: 0;
  padding: 3px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}

.brand-chip.qty-preset {
  padding: 0.32rem 0.6rem;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  transform: none;
}

.brand-chip.qty-preset:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-main);
  transform: none;
}

.brand-chip.qty-preset.active {
  background: #fff;
  color: var(--teal-800);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.brand-chip.qty-preset-unlimited.active {
  color: #b91c1c;
}

.qty-disclaimer {
  margin-top: 0.1rem;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.qty-disclaimer.is-unlimited {
  padding: 0;
  background: none;
  border: none;
  color: #b91c1c;
}

.prazo-label-row {
  gap: 0.4rem;
}

.prazo-radio {
  width: 15px;
  height: 15px;
}

/* Marcas: grade 4x3 em blocos + pop-up com todas */
.brand-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.9rem;
  border-radius: var(--radius-md);
}

.brand-picker.needs-attention {
  animation: brand-picker-flag 0.8s ease-in-out 3;
}

@keyframes brand-picker-flag {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
  50% { box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.45); }
}

.brand-picker-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.filter-section-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
}

.filter-section-meta {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.filter-section-meta.has-value {
  color: var(--teal-700);
  font-weight: 500;
}

#marcaChips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.brand-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 112px;
  padding: 1rem 0.6rem 0.8rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: #2a444b;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), opacity var(--transition-fast);
}

.brand-tile:hover {
  border-color: rgba(0, 154, 156, 0.55);
  box-shadow: 0 4px 12px rgba(16, 40, 48, 0.07);
}

.brand-tile.active {
  border-color: var(--teal-600);
  background: var(--teal-50);
  box-shadow: 0 0 0 3px rgba(0, 154, 156, 0.12);
}

.brand-tile.is-limited {
  opacity: 0.55;
}

.brand-tile-check {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 20px;
  height: 20px;
  border: 1.5px solid #c3cdd2;
  border-radius: 50%;
  background: #fff;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.brand-tile.active .brand-tile-check {
  border-color: var(--teal-600);
  background: var(--teal-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.brand-tile-logo,
.brand-option-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-tile-logo {
  width: 64px;
  height: 44px;
}

.brand-tile-logo img,
.brand-option-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: var(--bg-muted);
  color: var(--teal-700);
  font-weight: 700;
}

.brand-tile-logo .brand-logo-fallback {
  width: 44px;
  font-size: 1.2rem;
}

.brand-tile-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
}

.brand-tile.active .brand-tile-name {
  color: var(--teal-800);
}

.brand-picker-more {
  margin-top: 0.9rem;
}

.brand-modal-card {
  max-width: 600px;
  display: flex;
  flex-direction: column;
}

.brand-modal-head {
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.brand-modal-hint {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.brand-modal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  max-height: min(55vh, 460px);
  overflow-y: auto;
  padding: 0.15rem 0.25rem 0.15rem 0;
}

/* Atalhos do pop-up de marcas: cada um mostra só as marcas daquele grupo */
.brand-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.brand-group-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: #2a444b;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.brand-group-chip:hover {
  border-color: rgba(0, 154, 156, 0.35);
}

.brand-group-chip:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
}

.brand-group-chip.is-active {
  background: var(--teal-50);
  border-color: var(--teal-600);
  color: var(--teal-800);
}

.brand-group-chip-count {
  min-width: 1.4rem;
  padding: 0.05rem 0.4rem;
  background: var(--bg-subtle);
  border-radius: 999px;
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-dim);
}

.brand-group-chip.is-active .brand-group-chip-count {
  background: #fff;
  color: var(--teal-700);
}

.brand-modal-group-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0 0.6rem 0.35rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.brand-modal-group-title:first-child {
  margin-top: 0;
}

.brand-modal-group-count {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-dim);
}

.brand-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.86rem;
  color: #2a444b;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.brand-option:hover {
  background: var(--bg-subtle);
}

.brand-option.active {
  background: var(--teal-50);
  border-color: rgba(0, 154, 156, 0.35);
  color: var(--teal-800);
  font-weight: 600;
}

.brand-option.is-limited {
  opacity: 0.5;
  cursor: not-allowed;
}

.brand-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--teal-600);
}

.brand-option-logo {
  width: 32px;
  height: 24px;
  flex-shrink: 0;
}

.brand-option-logo .brand-logo-fallback {
  width: 24px;
  font-size: 0.75rem;
}

.brand-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.filter-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 0.9rem;
  font-size: 0.73rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.filter-note svg {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex-shrink: 0;
  color: var(--color-amber);
}

.filter-note strong {
  color: var(--text-muted);
  font-weight: 600;
}

/* Filtros avançados */
.advanced-filters {
  margin-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.advanced-filters > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem 0 0.25rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
}

.advanced-filters > summary::-webkit-details-marker {
  display: none;
}

.advanced-filters > summary > svg {
  width: 16px;
  height: 16px;
  color: var(--teal-700);
}

.advanced-filters > summary:hover {
  color: var(--teal-800);
}

.advanced-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--teal-600);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.advanced-summary-hint {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--text-dim);
}

.advanced-filters > summary > .advanced-chevron {
  color: var(--text-dim);
  transition: transform var(--transition-normal);
}

.advanced-filters[open] > summary > .advanced-chevron {
  transform: rotate(180deg);
}

.advanced-body {
  padding-top: 1rem;
  animation: fadeIn 0.18s ease-out;
}

.advanced-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  align-items: start;
}

.advanced-row + .advanced-row {
  margin-top: 1.25rem;
}

.advanced-row .multi-check-options .check-pill {
  flex: 1 1 0;
  justify-content: center;
}

.multi-check-label {
  margin-bottom: 0.5rem;
}

.multi-check-options {
  gap: 0.35rem;
}

.check-pill,
.multi-check-options .check-pill {
  gap: 0.4rem;
  padding: 0.36rem 0.75rem 0.36rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: #2a444b;
  font-size: 0.79rem;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.check-pill:hover {
  border-color: rgba(0, 154, 156, 0.55);
}

.check-pill input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--teal-600);
}

.check-pill:has(input:checked) {
  background: var(--teal-50);
  border-color: rgba(0, 154, 156, 0.4);
  color: var(--teal-800);
}

/* --- Seções do dashboard --- */
.section-container {
  gap: 1rem;
}

.section-title {
  gap: 0.5rem;
}

.section-title > svg {
  width: 18px;
  height: 18px;
  color: var(--teal-700);
}

.section-title h3 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.section-tag {
  padding: 0.2rem 0.6rem;
  border: none;
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

/* KPIs: uma única faixa com divisórias finas */
.kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.kpi-card {
  padding: 1.15rem 1.25rem;
  gap: 0.85rem;
  background: #fff;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.kpi-card::before {
  display: none;
}

.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
}

.kpi-icon svg {
  width: 17px;
  height: 17px;
}

.kpi-label {
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
}

.kpi-value {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 1.6vw, 1.6rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  margin: 0.15rem 0 0.1rem;
  color: var(--text-main);
}

.kpi-subtext {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.kpi-badge {
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.kpi-card-priority {
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.05), #fff 70%);
}

.kpi-card-priority .kpi-label {
  color: var(--color-emerald);
  font-weight: 600;
}

/* Destaques */
.ranking-cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

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

.ranking-card,
.ranking-card.rank-1,
.ranking-card.rank-2,
.ranking-card.rank-3 {
  flex: 1;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

/* Bloco da foto: título em cima, score embaixo; contorno branco mantém o texto legível sobre a foto. */
.rank-media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--teal-50);
}

.rank-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-no-image-label {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 500;
}

.rank-no-image-label svg {
  width: 28px;
  height: 28px;
  opacity: 0.6;
}

.rank-media.no-image .rank-no-image-label {
  display: flex;
}

.rank-media-top,
.rank-media-bottom {
  position: relative;
  z-index: 1;
  padding: 0.7rem 1rem;
  text-shadow:
    -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff,
    0 -1px 0 #fff, 0 1px 0 #fff, -1px 0 0 #fff, 1px 0 0 #fff,
    0 0 4px #fff;
}

/* Faixas de cinema translúcidas atrás do título e do score (só quando há foto). */
.rank-media:not(.no-image) .rank-media-top,
.rank-media:not(.no-image) .rank-media-bottom {
  background: rgba(10, 20, 24, 0.38);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.rank-media .rank-link {
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff);
}

.rank-vehicle-title .rank-fav-btn {
  width: 1.9rem;
  height: 1.9rem;
  margin: -0.3rem 0 -0.3rem -0.1rem;
}

.rank-vehicle-title .rank-fav-btn svg {
  width: 19px;
  height: 19px;
}

.rank-media:not(.no-image) .rank-fav-btn:not(.is-fav) {
  color: rgba(255, 255, 255, 0.92);
}

.rank-media:not(.no-image) .rank-fav-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fbbf24;
}

.rank-version {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.rank-media-bottom .score-bar-header {
  align-items: baseline;
  font-size: 0.8rem;
  font-weight: 700;
}

.rank-media-bottom .score-bar-header .text-emerald {
  font-size: 1rem;
}

.rank-media-bottom .score-progress-bg {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.ranking-card .rank-details-grid {
  margin: 0;
  padding: 0.85rem 1rem;
  border-top: none;
  border-bottom: none;
}

.ranking-card:hover {
  box-shadow: var(--shadow-md);
}

.rank-badge {
  padding: 0.2rem 0.55rem;
  border: none;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rank-badge.badge-gold { background: #fdf3dc; color: #92400e; }
.rank-badge.badge-silver { background: #eef2f4; color: #3d5a61; }
.rank-badge.badge-bronze { background: #fbeee4; color: #9a3412; }
.rank-badge.badge-default { background: var(--teal-50); color: var(--teal-800); }

.rank-top-bar {
  gap: 0.6rem;
  min-width: 0;
}

.rank-top-bar > :first-child {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Lotes com id longo (ex.: slug do veículo) não podem quebrar linha e encolher o card. */
.rank-lote-tag {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.rank-vehicle-title {
  font-size: 0.98rem;
  font-weight: 600;
}

.rank-details-grid {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: none;
}

.ranking-empty {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.86rem;
}

/* Gráficos: mosaico com divisórias finas */
.charts-grid {
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chart-card {
  padding: 1.25rem 1.35rem 1.1rem;
  gap: 0.75rem;
  min-height: 330px;
  background: #fff;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.chart-header {
  padding-bottom: 0;
  border-bottom: none;
}

.chart-header h4 {
  font-size: 0.88rem;
  font-weight: 600;
}

.chart-header svg {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
}

/* --- Lista de lotes --- */
/* Título à esquerda, Resultados/Favoritos no centro, contador à direita. */
.table-section-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem 1rem;
}

.table-section-header .view-tabs {
  grid-column: 2;
}

.table-section-header .records-counter {
  grid-column: 3;
  justify-self: end;
}

.view-tabs {
  gap: 2px;
  padding: 3px;
  background: var(--bg-muted);
  border: none;
  border-radius: var(--radius-md);
}

.view-tab {
  padding: 0.38rem 0.8rem;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
}

.view-tab.active {
  background: #fff;
  color: var(--text-main);
  border: none;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.view-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6);
}

.records-counter {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.history-summary {
  padding: 0.9rem 1.1rem;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.table-filters-bar {
  padding: 0;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.table-filters-header {
  margin-bottom: 0.6rem;
}

.table-filters-title {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.table-filters-title strong {
  font-weight: 600;
  color: var(--text-main);
}

.table-filters-title svg {
  width: 15px;
  height: 15px;
  color: var(--teal-700);
}

.table-filters-title .btn-link {
  margin-left: 0.5rem;
}

.table-filters-title .section-toggle svg {
  width: 18px;
  height: 18px;
  color: inherit;
}

.table-filters-bar.is-collapsed .table-filters-header,
.results-toolbar .table-filters-header {
  margin-bottom: 0;
}

.results-toolbar {
  margin-bottom: 0.85rem;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.sort-control svg {
  width: 15px;
  height: 15px;
  color: var(--teal-700);
}

.sort-control .custom-select {
  width: auto;
  min-width: 15rem;
  font-weight: 500;
}

.table-filters-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.table-filter-label {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
}

.table-filter-label svg {
  display: none;
}

.table-filter-hint {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.table-card {
  background: #fff;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Grade / Lista */
.layout-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}

.layout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.8rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.layout-btn svg {
  width: 14px;
  height: 14px;
}

.layout-btn.active {
  background: #fff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.layout-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6);
}

.results-grid {
  display: none;
}

#tableSection.layout-grid .results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
  padding-bottom: 1.25rem;
}

#tableSection.layout-grid .table-responsive,
#tableSection.layout-grid .table-float-head,
#tableSection.layout-grid .table-hscroll {
  display: none !important;
}

#tableSection.layout-grid .table-card {
  overflow: visible;
  background: none;
  box-shadow: none;
}

#tableSection.layout-grid .empty-state,
#tableSection.layout-grid .pagination-bar {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1100px) {
  #tableSection.layout-grid .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  #tableSection.layout-grid .results-grid { grid-template-columns: 1fr; }
}

.ranking-item .ranking-card {
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.ranking-item .ranking-card:hover {
  z-index: 2;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.ranking-item,
.lot-grid-item,
.ranking-card.lot-list-item {
  cursor: pointer;
}

.ranking-card.lot-list-item:hover {
  box-shadow: var(--shadow-md);
}

/* Página do lote */
.lot-detail-nav {
  margin-bottom: -1rem;
}

.lot-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.lot-detail-main,
.lot-detail-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.lot-detail-side {
  position: sticky;
  top: 5.5rem;
}

.lot-detail-side.is-static {
  position: static;
}

.lot-detail-card {
  padding: 1.25rem;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.lot-detail-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
}

.lot-detail-card-title svg {
  width: 17px;
  height: 17px;
  color: var(--teal-700);
}

/* Lotes semelhantes: os cards da grade, menores; 5 lado a lado, com rolagem lateral em telas estreitas. */
.lot-similares {
  margin-top: 2rem;
}

.lot-similares-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.lot-similares-title svg {
  width: 19px;
  height: 19px;
  color: var(--teal-700);
}

.lot-similares-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 0.75rem;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.lot-similares-track > .lot-grid-item {
  scroll-snap-align: start;
  cursor: pointer;
}

.lot-similares .rank-media-top,
.lot-similares .rank-media-bottom {
  padding: 0.45rem 0.65rem;
}

.lot-similares .rank-vehicle-title {
  font-size: 0.82rem;
}

.lot-similares .rank-version {
  font-size: 0.66rem;
}

.lot-similares .rank-media-bottom .score-bar-header {
  font-size: 0.68rem;
}

.lot-similares .rank-media-bottom .score-bar-header .text-emerald {
  font-size: 0.82rem;
}

.lot-similares .lot-grid-info {
  gap: 0.3rem;
  padding: 0.65rem 0.75rem 0.75rem;
  font-size: 0.74rem;
}

.lot-similares .lot-grid-lance .val {
  font-size: 1.1rem;
}

.lot-similares .lot-discount {
  font-size: 0.7rem;
}

.lot-similares .lot-fav-btn {
  width: 1.9rem;
  height: 1.9rem;
}

.lot-similares .badge-status-oportunidade {
  font-size: 0.62rem;
}

.lot-similares .rank-lote-tag {
  font-size: 0.66rem;
}

.lot-similares .lot-grid-enc svg {
  width: 13px;
  height: 13px;
}

.lot-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 4rem 1rem;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text-dim);
  text-align: center;
}

.lot-detail-empty svg {
  width: 32px;
  height: 32px;
}

.lot-detail-empty strong {
  color: var(--text-main);
}

/* Galeria */
.lot-gallery {
  padding: 0;
  overflow: hidden;
}

.lot-gallery-main {
  aspect-ratio: 16 / 10;
}

.lot-gallery-main .rank-img {
  object-fit: contain;
  background: #0f1d21;
}

.lot-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background var(--transition-fast);
}

.lot-gallery-nav:hover {
  background: #fff;
}

.lot-gallery-nav.is-prev {
  left: 0.75rem;
}

.lot-gallery-nav.is-next {
  right: 0.75rem;
}

.lot-gallery-counter {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(10, 20, 24, 0.65);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.lot-gallery-thumbs {
  position: relative;
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.lot-gallery-thumbs:empty {
  display: none;
}

.lot-thumb {
  flex: 0 0 auto;
  width: 84px;
  height: 60px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-fast), border-color var(--transition-fast);
}

.lot-thumb:hover {
  opacity: 1;
}

.lot-thumb.active {
  border-color: var(--teal-600);
  opacity: 1;
}

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

/* Ficha e detalhes */
.lot-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem 1.25rem;
  margin: 0;
}

.lot-spec dt {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.lot-spec dd {
  margin: 0.15rem 0 0;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.lot-detail-text {
  white-space: pre-line;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #2a444b;
}

/* Resumo lateral */
.lot-summary {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lot-summary .badge-status-oportunidade {
  font-size: 0.68rem;
}

.lot-summary-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.lot-summary-title h2 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

.lot-summary-year {
  font-weight: 500;
  color: var(--text-dim);
}

.lot-summary-version {
  margin-top: -0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.lot-summary-site {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.lot-summary-site svg {
  width: 15px;
  height: 15px;
}

.lot-summary-values {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.lot-summary-values .lbl,
.lot-countdown .lbl {
  display: block;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.lot-summary-lance .val {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-cyan);
}

.lot-summary-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.lot-summary-pair .val {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.lot-ref {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.lot-ref-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.3rem;
}

.lot-diff {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.lot-diff.is-below {
  background: #e7f8ef;
  color: var(--color-emerald);
}

.lot-diff.is-above {
  background: #fdecec;
  color: #b91c1c;
}

.lot-market-loading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.lot-market-loading .spinner,
.lot-cost-value .spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.lot-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-800);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: help;
  outline: none;
}

.lot-help:focus-visible {
  box-shadow: 0 0 0 2px var(--teal-600);
}

.lot-help-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  width: max-content;
  max-width: 280px;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  background: #0f2a30;
  color: #e6f3f4;
  font-size: 0.74rem;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  box-shadow: var(--shadow-md);
}

.lot-help-pop strong {
  color: #fff;
  font-size: 0.76rem;
}

.lot-help:hover .lot-help-pop,
.lot-help:focus .lot-help-pop {
  display: flex;
}

/* Custo estimado até a posse */
.lot-cost-main,
.lot-cost-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.lot-cost-main {
  padding-bottom: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.lot-cost-main strong {
  font-size: 1.05rem;
  color: var(--text-main);
}

.lot-cost-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.lot-cost-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--line);
}

.lot-cost-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.lot-cost-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
}

.lot-cost-info small {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.lot-cost-tag {
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #fff4e0;
  color: var(--color-amber);
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lot-cost-value {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.lot-cost-row.is-unknown .lot-cost-value {
  color: #b91c1c;
}

.lot-cost-row.is-loading .lot-cost-label {
  color: var(--text-dim);
}

.lot-cost-total {
  padding-top: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.lot-cost-total strong {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--color-cyan);
}

.lot-cost-warning {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-md);
  background: #fdecec;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 600;
}

.lot-cost-warning svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.lot-cost-note,
.lot-cost-disclaimer {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.lot-cost-disclaimer {
  margin-top: 0.3rem;
  font-style: italic;
}

.lot-countdown {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lot-countdown .lbl {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lot-countdown .lbl svg {
  width: 14px;
  height: 14px;
}

.lot-countdown-values {
  display: flex;
  gap: 0.5rem;
}

.lot-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--teal-50);
}

.lot-countdown-unit strong {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--teal-800);
}

.lot-countdown-unit small {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.lot-countdown-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.lot-countdown-text.is-ended {
  color: #b91c1c;
}

.lot-countdown-date {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.lot-detail-cta {
  justify-content: center;
  width: 100%;
  min-height: 48px;
  font-size: 0.95rem;
  background: var(--brand-gradient);
}

.lot-detail-cta:hover:not(:disabled) {
  background: var(--brand-gradient-hover);
}

.lot-detail-cta svg {
  width: 17px;
  height: 17px;
}

.lot-detail-cta-hint {
  margin-top: -0.4rem;
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-dim);
}

.lot-location p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.lot-location .btn-link {
  margin-top: 0.5rem;
}

/* Histórico de arremates (coluna lateral da página do lote) */
.lot-history .lot-detail-card-title {
  margin-bottom: 0.3rem;
}

.lot-history-hint {
  margin-bottom: 0.85rem;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.lot-history-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lot-history-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lot-history-item + .lot-history-item {
  border-top: 1px solid var(--line);
}

.lot-history-item:hover {
  background: var(--bg-subtle);
}

.lot-history-thumb {
  flex-shrink: 0;
  width: 86px;
  align-self: flex-start;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lot-history-thumb .rank-no-image-label svg {
  width: 20px;
  height: 20px;
}

.lot-history-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.lot-history-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.lot-history-date {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.lot-history-date svg {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}

.lot-history-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.lot-history-values > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lot-history-values .lbl {
  font-size: 0.66rem;
  color: var(--text-dim);
}

.lot-history-values .val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.lot-history-values .val.is-lance {
  font-weight: 700;
  color: var(--color-cyan);
}

.lot-history-empty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lot-history-empty svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-dim);
}

@media (max-width: 1100px) {
  .lot-detail {
    grid-template-columns: 1fr;
  }

  /* Uma coluna: fotos, resumo, localização e depois ficha e detalhes. */
  .lot-detail-main,
  .lot-detail-side {
    display: contents;
  }

  .lot-detail > * > * {
    order: 3;
  }

  .lot-detail .lot-gallery {
    order: 1;
  }

  .lot-detail .lot-summary {
    order: 2;
  }

  .lot-detail .lot-location,
  .lot-detail .lot-history {
    order: 2;
  }

  .lot-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .lot-countdown-unit {
    min-width: 0;
    flex: 1;
  }
}

/* Lista: 1 lote por linha, baixa (cabem ~3 linhas na altura de um card da grade) */
#tableSection.layout-list .results-grid {
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.ranking-card.lot-list-item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.25fr) auto;
  align-items: center;
  gap: 1.25rem;
  height: 140px;
  padding-right: 0.75rem;
  transition: box-shadow var(--transition-normal);
}

.lot-list-item .lot-list-media {
  align-self: stretch;
  aspect-ratio: auto;
  height: 100%;
}

.lot-list-item .rank-no-image-label {
  font-size: 0.75rem;
}

.lot-list-main,
.lot-list-values,
.lot-list-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.82rem;
}

.lot-list-main .badge-status-oportunidade {
  font-size: 0.68rem;
}

.lot-list-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
}

.lot-list-title > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lot-list-version {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.lot-list-score {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 260px;
  margin-top: 0.15rem;
}

.lot-list-score .score-bar-header {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.lot-list-values .lot-grid-lance .val {
  font-size: 1.25rem;
}

.lot-list-meta .lot-grid-enc {
  margin-top: 0;
  padding-top: 0.45rem;
}

.lot-list-actions {
  align-self: flex-start;
  padding-top: 0.6rem;
}

@media (max-width: 1100px) {
  .ranking-card.lot-list-item {
    grid-template-columns: 160px minmax(0, 1.4fr) minmax(0, 1fr) auto;
    height: auto;
    min-height: 140px;
  }

  .lot-list-item .lot-list-media {
    grid-row: 1 / span 2;
  }

  .lot-list-meta {
    grid-column: 2 / 4;
    padding-bottom: 0.75rem;
  }

  .lot-list-actions {
    grid-row: 1;
    grid-column: 4;
  }
}

@media (max-width: 680px) {
  .ranking-card.lot-list-item {
    grid-template-columns: 110px minmax(0, 1fr) auto;
    gap: 0.75rem;
  }

  .lot-list-item .lot-list-media {
    grid-row: 1 / span 3;
  }

  .lot-list-values,
  .lot-list-meta {
    grid-column: 2 / 4;
  }

  .lot-list-actions {
    grid-row: 1;
    grid-column: 3;
  }
}

.lot-grid-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.lot-grid-item .badge-status-oportunidade {
  font-size: 0.68rem;
}

.lot-grid-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 1rem 1rem;
  font-size: 0.82rem;
}

.ranking-card.lot-grid-card {
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.ranking-card.lot-grid-card:hover {
  z-index: 2;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.lot-grid-lance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.lot-grid-lance {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lot-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.lot-fav-btn svg {
  width: 22px;
  height: 22px;
}

.lot-fav-btn:hover {
  background: #fdf3dc;
  color: #d97706;
}

.lot-fav-btn:active {
  transform: scale(0.9);
}

.lot-fav-btn.is-fav {
  color: #f59e0b;
}

.lot-fav-btn.is-fav svg {
  fill: #fbbf24;
}

.lot-site {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text-main);
}

.lot-grid-lance .lbl {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.lot-grid-lance .val {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-cyan);
}

.lot-grid-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.lot-grid-row .lbl {
  flex-shrink: 0;
  color: var(--text-dim);
}

.lot-grid-row .val {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  text-align: right;
}

.lot-discount {
  margin-left: 0.2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  vertical-align: middle;
}

.lot-grid-enc {
  justify-content: flex-start;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
}

.lot-grid-enc svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.lot-grid-enc.is-today {
  color: #b45309;
  font-weight: 700;
}

.lot-uf {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-dim);
  font-weight: 600;
}

.data-table th {
  padding: 0.65rem 0.3rem;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
}

.data-table th.sortable:hover {
  background: var(--bg-subtle);
}

.data-table td {
  padding: 0.55rem 0.3rem;
  border-bottom: 1px solid #f0f3f5;
  font-size: 0.74rem;
}

.data-table tbody tr:hover {
  background: #f2f8f8;
}

#dataTable tbody tr:hover > :nth-child(n+2):nth-child(-n+4) {
  background: linear-gradient(#f2f8f8, #f2f8f8), var(--bg-card);
}

.table-float-head {
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 12px -6px rgba(16, 40, 48, 0.12);
}

.pagination-bar {
  padding: 0.8rem 1.1rem;
  background: transparent;
  border-top: 1px solid var(--line);
}

.current-page-badge {
  border-radius: var(--radius-sm);
}

.export-bar {
  justify-content: flex-end;
  margin-top: 1rem;
}

.btn-lote-link,
.btn-copart-link {
  border: none;
  background: var(--teal-50);
  color: var(--teal-800);
  border-radius: 999px;
}

.btn-lote-link:hover,
.btn-copart-link:hover {
  background: var(--teal-600);
  color: #fff;
  box-shadow: none;
}

/* --- Seções recolhíveis --- */
.section-toggle {
  width: 1.65rem;
  height: 1.65rem;
}

.section-toggle:hover,
.section-toggle:focus-visible {
  background: var(--bg-muted);
  border-color: transparent;
  color: var(--text-main);
}

/* --- Navegação rápida --- */
.quick-nav-handle {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.quick-nav-item {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
  font-family: var(--font-body);
  font-weight: 500;
}

.quick-nav-item:hover,
.quick-nav-item:focus-visible {
  background: var(--teal-600);
  border-color: var(--teal-600);
}

/* --- Botão flutuante: atualizar perfil de busca --- */
.profile-update-fab {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  max-width: calc(100vw - 2rem);
  padding: 0.7rem 1.4rem 0.7rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 88, 102, 0.32), 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateX(-50%);
  animation: profileFabIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-update-fab:hover {
  background: var(--brand-gradient-hover);
}

.profile-update-fab:focus-visible {
  outline: 3px solid rgba(0, 154, 156, 0.4);
  outline-offset: 3px;
}

.profile-update-fab:disabled {
  opacity: 0.7;
  cursor: wait;
}

.profile-update-fab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.profile-update-fab-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.profile-update-fab-text strong {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.profile-update-fab-text small {
  overflow: hidden;
  font-size: 0.74rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.85;
}

@keyframes profileFabIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* --- Modais e autenticação --- */
.auth-card,
.search-modal-card {
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.auth-modal {
  padding: 1rem;
  backdrop-filter: blur(3px);
}

.auth-modal .auth-card {
  position: relative;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: #fff;
  animation: zoomIn 0.25s ease;
}

.auth-modal .custom-input {
  min-height: 44px;
}

.auth-form .btn-auth-link {
  margin-top: 0;
  padding: 0.15rem;
}

.auth-google {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.btn-google {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border: 1px solid #dadce0;
  border-radius: 10px;
  background: #fff;
  color: #1f1f1f;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.btn-google:hover:not(:disabled) {
  background: #f8fafb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.btn-google:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-google svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

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

/* --- Alertas por e-mail --- */
.btn-search-alert {
  position: relative;
  width: 50px;
  padding: 0;
  justify-content: center;
}

.search-alert-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--vidda-blue);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.alert-modal-card {
  width: min(520px, 100%);
}

.alert-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
  padding-right: 2rem;
}

.alert-modal-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 154, 156, 0.1);
  color: var(--vidda-blue);
}

.alert-modal-icon svg {
  width: 22px;
  height: 22px;
}

.alert-modal-head .auth-subtitle {
  margin: 0;
  line-height: 1.45;
}

.alert-modal-section {
  margin-bottom: 1.1rem;
}

.alert-modal-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.alert-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.alert-filter-chips:empty::before {
  content: "Nenhum filtro na busca.";
  font-size: 0.85rem;
  color: var(--text-dim);
}

.alert-filter-chips .active-chip {
  padding-right: 0.65rem;
}

.alert-modal-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.alert-modal-hint.is-warning {
  color: var(--color-amber);
}

.alert-freq-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.alert-freq {
  position: relative;
  cursor: pointer;
}

.alert-freq input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.alert-freq span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.alert-freq:hover span {
  border-color: var(--vidda-blue);
}

.alert-freq input:checked + span {
  border-color: var(--vidda-blue);
  background: rgba(0, 154, 156, 0.1);
  color: var(--vidda-dark);
}

.alert-freq input:focus-visible + span {
  outline: 2px solid var(--vidda-blue);
  outline-offset: 2px;
}

.alert-list-section {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.alert-list-count {
  margin-left: 0.25rem;
  font-weight: 600;
  color: var(--text-dim);
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.5rem 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.alert-item.is-paused {
  background: var(--bg-body);
}

.alert-item.is-paused .alert-item-desc {
  color: var(--text-dim);
}

.alert-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.alert-item-desc {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-item-info:hover .alert-item-desc {
  color: var(--vidda-blue);
}

.alert-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.alert-item-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.alert-item-btn:hover {
  background: rgba(0, 154, 156, 0.1);
  color: var(--vidda-blue);
}

.alert-item-btn.is-danger:hover {
  background: rgba(225, 29, 72, 0.08);
  color: var(--color-rose);
}

.alert-item-btn svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 520px) {
  .alert-freq-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.auth-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.auth-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-main);
}

.auth-close svg {
  width: 18px;
  height: 18px;
}

.auth-modal .auth-brand .brand-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 0.75rem;
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.guest-auth-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.guest-auth-box .btn svg {
  width: 15px;
  height: 15px;
}

/* --- Responsivo --- */
@media (max-width: 1280px) {
  .table-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-bar {
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  .primary-filters > .filter-group {
    flex-basis: calc(50% - 0.55rem);
  }

  #marcaChips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand-modal-list {
    grid-template-columns: 1fr;
  }

  .user-meta-label {
    display: none;
  }

  .header-nav {
    position: static;
    transform: none;
    gap: 1rem;
  }

  .advanced-summary-hint {
    display: none;
  }
}

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

  .advanced-row,
  .table-filters-grid {
    grid-template-columns: 1fr;
  }

  .primary-filters .filter-group-full .check-pill,
  .advanced-row .multi-check-options .check-pill {
    flex: 1 1 auto;
  }

  .primary-filters > .filter-group {
    flex-basis: 100%;
  }

  #marcaChips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-hero {
    flex-direction: column;
  }

  .search-actions > #btnShowFavorites {
    flex: 1;
  }

  .qty-control {
    flex-wrap: wrap;
  }

  .profile-bar,
  .profile-field {
    width: 100%;
  }

  .input-group > #selectFilterProfile,
  .input-group > #inputProfileName {
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .user-email-label {
    max-width: 140px;
  }
}
