/* ==========================================================================
   INDICA IMÓVEIS — DESIGN SYSTEM DARK LUXE
   Tema: fundo escuro profundo + dourado elegante + glassmorphism
   Fontes: Playfair Display (display) + Inter (body) + IBM Plex Mono (code)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  /* Surfaces */
  --bg-deep: #05080F;
  --bg-primary: #0A0E17;
  --bg-secondary: #111827;
  --bg-elevated: #1A2235;
  --bg-card: rgba(26, 34, 53, 0.72);
  --bg-card-solid: #161D2E;

  /* Dourado (marca) */
  --gold-primary: #C9A962;
  --gold-light: #E5D4A1;
  --gold-dark: #8B6914;
  --gold-glow: rgba(201, 169, 98, 0.4);

  /* Texto */
  --text-primary: #F5F5F7;
  --text-secondary: #C4C9D4;
  --text-muted: #6B7A99;

  /* Bordas */
  --border-subtle: rgba(201, 169, 98, 0.12);
  --border-glow: rgba(201, 169, 98, 0.3);
  --border-soft: rgba(255, 255, 255, 0.07);

  /* Feedback semântico (versões neon sobre dark) */
  --success: #4ADE80;
  --success-bg: rgba(74, 222, 128, 0.1);
  --warning: #C9A962;
  --warning-bg: rgba(201, 169, 98, 0.12);
  --danger: #F87171;
  --danger-bg: rgba(248, 113, 113, 0.1);
  --info: #60A5FA;
  --info-bg: rgba(96, 165, 250, 0.1);

  /* Tipografia */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(201, 169, 98, 0.12);
  --shadow-inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 600;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}

::selection { background: rgba(201, 169, 98, 0.3); }

/* ==========================================================================
   Background animado (efeitos de fundo compartilhados)
   ========================================================================== */

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(201, 169, 98, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(139, 105, 20, 0.06), transparent 50%),
    radial-gradient(ellipse 100% 100% at 50% 50%, var(--bg-primary), var(--bg-deep));
  animation: gradient-shift 20s ease-in-out infinite alternate;
}

@keyframes gradient-shift {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(201, 169, 98, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 169, 98, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
}

.particles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold-primary);
  border-radius: 50%;
  opacity: 0;
  animation: float-particle 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 18s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 16s; }
.particle:nth-child(3) { left: 35%; animation-delay: 4s; animation-duration: 20s; }
.particle:nth-child(4) { left: 50%; animation-delay: 1s; animation-duration: 14s; }
.particle:nth-child(5) { left: 65%; animation-delay: 3s; animation-duration: 17s; }
.particle:nth-child(6) { left: 80%; animation-delay: 5s; animation-duration: 19s; }
.particle:nth-child(7) { left: 90%; animation-delay: 2.5s; animation-duration: 15s; }
.particle:nth-child(8) { left: 44%; animation-delay: 6s; animation-duration: 13s; }
.particle:nth-child(9) { left: 72%; animation-delay: 7.5s; animation-duration: 21s; }

@keyframes float-particle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

.light-lines {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.light-line {
  position: absolute;
  width: 1px;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--gold-glow), transparent);
  opacity: 0.3;
  animation: light-fall 8s linear infinite;
}

.light-line:nth-child(1) { left: 15%; animation-delay: 0s; }
.light-line:nth-child(2) { left: 40%; animation-delay: 2s; }
.light-line:nth-child(3) { left: 70%; animation-delay: 4s; }
.light-line:nth-child(4) { left: 85%; animation-delay: 6s; }

@keyframes light-fall {
  0% { transform: translateY(-200px); opacity: 0; }
  20% { opacity: 0.3; }
  80% { opacity: 0.3; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* ==========================================================================
   Botões
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

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

/* Botão primário: gradiente dourado + shimmer */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary), var(--gold-dark));
  color: var(--bg-deep);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 169, 98, 0.3), 0 0 0 1px rgba(201, 169, 98, 0.2);
}
.btn-primary:active { transform: translateY(0); }

/* Shimmer: brilho que percorre o botão */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}
.btn-primary:hover::before { left: 100%; }

/* Botão latão (alternativa dourada sólida) */
.btn-brass {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: var(--bg-deep);
}
.btn-brass:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 169, 98, 0.3);
}
.btn-brass:active { transform: translateY(0); }

/* Botão ghost: transparente com borda */
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
}
.btn-ghost:hover {
  border-color: var(--border-glow);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }

/* Ripple */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255, 255, 255, 0.25), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.btn:active::after { opacity: 1; }

/* ==========================================================================
   Páginas públicas (formulário / obrigado)
   ========================================================================== */

.page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.card-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 460px;
}

/* Glow externo pulsante */
.card-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at 50% 30%, var(--gold-glow), transparent 60%);
  filter: blur(60px);
  opacity: 0.4;
  animation: glow-pulse 4s ease-in-out infinite alternate;
  z-index: -1;
  pointer-events: none;
}

@keyframes glow-pulse {
  0% { opacity: 0.25; transform: scale(1); }
  100% { opacity: 0.5; transform: scale(1.05); }
}

/* ==========================================================================
   Glassmorphism card base
   ========================================================================== */

.card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-inner-glow), var(--shadow-glow);
  overflow: hidden;
  animation: card-entrance 0.8s var(--ease-out-expo) forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes card-entrance {
  to { opacity: 1; transform: translateY(0); }
}

/* Variação para cards internos do admin (sem animação de página) */
.admin-content .card {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md), var(--shadow-inner-glow);
  animation: none;
  opacity: 1;
  transform: none;
  margin-bottom: 24px;
  padding: 26px 28px;
}

.admin-content .card h3 {
  font-size: 17px;
  margin-bottom: 18px;
  color: var(--text-primary);
}

/* Card header premium */
.card-header {
  position: relative;
  padding: 40px 36px 32px;
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.08), transparent);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.header-decoration {
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--gold-glow), transparent 70%);
  filter: blur(40px);
  opacity: 0.4;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 16px;
  animation: fade-in 0.6s var(--ease-out-expo) 0.2s forwards;
  opacity: 0;
}

.eyebrow::before,
.eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-primary), transparent);
}
.eyebrow::after { background: linear-gradient(90deg, transparent, var(--gold-primary)); }

@keyframes fade-in {
  to { opacity: 1; }
}

.card-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
  animation: title-slide 0.7s var(--ease-out-expo) 0.3s forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes title-slide {
  to { opacity: 1; transform: translateY(0); }
}

.card-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  animation: fade-in 0.6s var(--ease-out-expo) 0.5s forwards;
  opacity: 0;
}

/* Stamp decorativo (código do parceiro) */
.stamp {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 62px;
  height: 62px;
  border: 2px dashed var(--gold-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--gold-primary);
  text-align: center;
  line-height: 1.3;
  animation: stamp-entrance 0.6s var(--ease-out-back) 0.6s forwards;
  opacity: 0;
  transform: rotate(12deg) scale(0.5);
}

@keyframes stamp-entrance {
  to { opacity: 0.75; transform: rotate(12deg) scale(1); }
}

.card-body { padding: 32px 36px 36px; }

/* ==========================================================================
   Formulários / inputs
   ========================================================================== */

.field {
  margin-bottom: 22px;
  animation: field-entrance 0.5s var(--ease-out-expo) forwards;
  opacity: 0;
  transform: translateY(15px);
}

.card-body .field:nth-child(1),
.form-group:nth-child(1) { animation-delay: 0.5s; }
.card-body .field:nth-child(2),
.form-group:nth-child(2) { animation-delay: 0.6s; }
.card-body .field:nth-child(3),
.form-group:nth-child(3) { animation-delay: 0.7s; }
.card-body .field:nth-child(4),
.form-group:nth-child(4) { animation-delay: 0.8s; }

@keyframes field-entrance {
  to { opacity: 1; transform: translateY(0); }
}

/* Campos sem animação dentro do admin */
.admin-content .field,
.card > form .field,
.card form .field {
  animation: none;
  opacity: 1;
  transform: none;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.field:focus-within label { color: var(--gold-primary); }

.field input,
.field select,
.field textarea,
.form-input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.field input::placeholder,
.form-input::placeholder { color: var(--text-muted); }

.field input:hover,
.field select:hover,
.field textarea:hover,
.form-input:hover {
  border-color: var(--border-glow);
  background: rgba(255, 255, 255, 0.05);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-input:focus {
  border-color: var(--gold-primary);
  background: rgba(201, 169, 98, 0.05);
  box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.1);
}

.field input[type="checkbox"] {
  width: auto;
  accent-color: var(--gold-primary);
  margin-right: 8px;
}

.field select {
  appearance: none;
  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='%23C9A962' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 46px;
  cursor: pointer;
}

.field select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ==========================================================================
   Select Premium (classe dedicada para selects destacados)
   ========================================================================== */

.select-premium {
  appearance: none;
  width: 100%;
  padding: 14px 46px 14px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  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='%23C9A962' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.15s ease;
}

.select-premium:hover {
  border-color: var(--border-glow);
  background-color: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.select-premium:focus {
  border-color: var(--gold-primary);
  background-color: rgba(201, 169, 98, 0.06);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.12), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.select-premium option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 6px;
}

.select-premium option:hover,
.select-premium option:checked {
  background: rgba(201, 169, 98, 0.15);
  color: var(--gold-light);
}

.select-premium-sm {
  padding: 10px 38px 10px 12px;
  font-size: 13px;
  background-position: right 12px center;
  border-radius: 8px;
}

.select-premium-block { width: 100%; }

.select-premium-inline {
  width: auto;
  min-width: 140px;
  display: inline-block;
}

/* Select com ícone de busca (para filtros) */
.select-premium-filter {
  min-width: 160px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23C9A962' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"),
    none;
  background-position: right 12px center;
  background-repeat: no-repeat;
}

.form-group { margin-bottom: 24px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.form-group:focus-within .form-label { color: var(--gold-primary); }

/* Alias premium de botão de submit */
.btn-submit {
  position: relative;
  width: 100%;
  padding: 18px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary), var(--gold-dark));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
  animation: field-entrance 0.5s var(--ease-out-expo) 0.8s forwards;
  opacity: 0;
  transform: translateY(15px);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 169, 98, 0.3), 0 0 0 1px rgba(201, 169, 98, 0.2);
}
.btn-submit:active { transform: translateY(0); }

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}
.btn-submit:hover::before { left: 100%; }

.btn-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease-out-expo);
}
.btn-submit:hover .btn-icon { transform: translateX(4px); }

.btn-submit.loading {
  pointer-events: none;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.footer-note {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
  animation: fade-in 0.5s var(--ease-out-expo) 1s forwards;
  opacity: 0;
}

.footer-note a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-note a:hover { color: var(--gold-light); }

.form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.form-row .field { flex: 1; min-width: 160px; margin-bottom: 0; animation: none; opacity: 1; transform: none; }
.form-row .btn { align-self: flex-end; }

/* ==========================================================================
   Alertas / notificações
   ========================================================================== */

.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 20px;
  border: 1px solid;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: alert-in 0.4s var(--ease-out-expo);
}
.alert-error { background: var(--danger-bg); border-color: rgba(248, 113, 113, 0.3); color: var(--danger); }
.alert-success { background: var(--success-bg); border-color: rgba(74, 222, 128, 0.3); color: var(--success); }

@keyframes alert-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Página de obrigado
   ========================================================================== */

.thanks-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.thanks-card {
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-inner-glow), var(--shadow-glow);
  padding: 48px 36px;
  position: relative;
  z-index: 10;
  animation: card-entrance 0.8s var(--ease-out-expo) forwards;
  opacity: 0;
  transform: translateY(30px);
}

.thanks-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 1px solid rgba(74, 222, 128, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  animation: thanks-pop 0.6s var(--ease-out-back) 0.4s forwards;
  opacity: 0;
  transform: scale(0.5);
}

.thanks-icon svg { width: 34px; height: 34px; }

@keyframes thanks-pop {
  to { opacity: 1; transform: scale(1); }
}

.thanks-card h1 {
  font-size: 25px;
  margin-bottom: 14px;
  line-height: 1.25;
  animation: fade-in 0.6s ease 0.6s forwards;
  opacity: 0;
}

.thanks-card p {
  color: var(--text-secondary);
  line-height: 1.65;
  animation: fade-in 0.6s ease 0.8s forwards;
  opacity: 0;
}

/* ==========================================================================
   Login admin
   ========================================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 38px 34px;
  box-shadow: var(--shadow-lg), var(--shadow-inner-glow), var(--shadow-glow);
  animation: card-entrance 0.8s var(--ease-out-expo) forwards;
  opacity: 0;
  transform: translateY(30px);
}

.login-card .eyebrow {
  display: flex;
  justify-content: center;
  opacity: 1;
  animation: fade-in 0.6s var(--ease-out-expo) 0.2s forwards;
}

.login-card .eyebrow::before,
.login-card .eyebrow::after { width: 18px; }

.login-card h1 {
  font-size: 24px;
  margin-bottom: 8px;
  text-align: center;
  animation: title-slide 0.6s var(--ease-out-expo) 0.3s forwards;
  opacity: 0;
  transform: translateY(12px);
}

.login-card p.sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 28px;
  text-align: center;
  animation: fade-in 0.6s ease 0.4s forwards;
  opacity: 0;
}

.login-card form .field { animation: none; opacity: 1; transform: none; }

/* ==========================================================================
   Admin shell
   ========================================================================== */

.admin-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}

.admin-content {
  padding: 36px 42px;
  width: 100%;
  min-width: 0;
}

.admin-content h2 {
  font-size: 25px;
  margin-bottom: 4px;
}

.admin-content .page-sub {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0 0 28px;
}

/* Page head com título + ações no topo */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-head h2 { margin-bottom: 0; }

/* ==========================================================================
   Sidebar
   ========================================================================== */

.admin-sidebar {
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-deep));
  border-right: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}

.admin-brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 30px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.admin-nav a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.admin-nav a:hover {
  background: rgba(201, 169, 98, 0.06);
  color: var(--text-primary);
  transform: translateX(2px);
}
.admin-nav a:hover svg { color: var(--gold-primary); }

.admin-nav a.active {
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.15), rgba(201, 169, 98, 0.06));
  border-color: var(--border-subtle);
  color: var(--gold-light);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.admin-nav a.active svg { color: var(--gold-primary); }

.admin-sidebar form { margin-top: auto; }
.admin-sidebar .btn-ghost {
  color: var(--text-muted);
  border-color: var(--border-soft);
}
.admin-sidebar .btn-ghost:hover { border-color: var(--border-glow); color: var(--text-primary); }
.admin-sidebar .btn-ghost svg { color: inherit; }

/* ==========================================================================
   Stats cards
   ========================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}

.stat-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-md), var(--shadow-inner-glow);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease, box-shadow 0.3s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: 0.6;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(201, 169, 98, 0.1);
}

.stat-card .num {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--text-primary), var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card .label {
  font-size: 12.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 5px;
  font-weight: 600;
}

.stat-icon {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  background: rgba(201, 169, 98, 0.08);
  border: 1px solid var(--border-subtle);
}

.stat-icon svg { width: 18px; height: 18px; }

/* ==========================================================================
   Tabelas
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: rgba(201, 169, 98, 0.04);
}

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

/* ==========================================================================
   Pills e badges
   ========================================================================== */

.code-pill {
  font-family: var(--font-mono);
  background: rgba(201, 169, 98, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--gold-light);
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 12.5px;
}

.status-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.status-novo { background: var(--warning-bg); color: var(--warning); border-color: rgba(201, 169, 98, 0.3); }
.status-contatado { background: var(--info-bg); color: var(--info); border-color: rgba(96, 165, 250, 0.3); }
.status-negociando { background: rgba(167, 139, 250, 0.1); color: #C4B5FD; border-color: rgba(167, 139, 250, 0.3); }
.status-fechado { background: var(--success-bg); color: var(--success); border-color: rgba(74, 222, 128, 0.3); }
.status-perdido { background: var(--danger-bg); color: var(--danger); border-color: rgba(248, 113, 113, 0.3); }
.status-ativo { background: var(--success-bg); color: var(--success); border-color: rgba(74, 222, 128, 0.3); }
.status-bloqueado { background: var(--danger-bg); color: var(--danger); border-color: rgba(248, 113, 113, 0.3); }

.role-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
}
.role-badge.role-admin {
  background: var(--warning-bg);
  border-color: rgba(201, 169, 98, 0.3);
  color: var(--warning);
}

.status-select {
  appearance: none;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 7px 30px 7px 10px;
  font-size: 12.5px;
  font-family: inherit;
  background-color: var(--bg-secondary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C9A962' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.status-select:hover, .status-select:focus {
  border-color: var(--border-glow);
  color: var(--text-primary);
  outline: none;
}

.status-select option { background: var(--bg-secondary); color: var(--text-primary); }

/* ==========================================================================
   QR cells
   ========================================================================== */

.qr-cell img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  padding: 3px;
  background: #fff;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease, border-color 0.3s ease;
}

.qr-cell a:hover img {
  transform: scale(1.06);
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px rgba(201, 169, 98, 0.25);
}

.link-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.badge-off { opacity: 0.45; }

.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.empty-state .empty-icon svg { width: 22px; height: 22px; }

/* ==========================================================================
   Usuários: linha de ações e popover de permissões
   ========================================================================== */

.user-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.user-actions form { margin: 0; }

.protected-label {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
}

/* ==========================================================================
   Actions Dropdown (menu ⋮ para ações de tabela)
   ========================================================================== */

.actions-dropdown-wrapper { position: relative; display: inline-block; }

.actions-dropdown-panel {
  position: fixed;
  z-index: 1000;
  min-width: 200px;
  background: var(--bg-card-solid);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
}

.actions-dropdown-panel.is-open {
  display: block;
  animation: popover-in 0.25s var(--ease-out-expo);
}

.action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.action-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }
.action-item svg { flex-shrink: 0; color: var(--text-muted); }
.action-item:hover svg { color: var(--gold-primary); }

.action-item.action-primary:hover { color: var(--gold-light); }
.action-item.action-danger { color: var(--danger); }
.action-item.action-danger:hover { background: var(--danger-bg); color: var(--danger); }
.action-item.action-danger:hover svg { color: var(--danger); }

.action-divider { height: 1px; background: var(--border-soft); margin: 4px 8px; }
.action-form { margin: 0; padding: 0; }

.perm-popover-panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0;
  margin-top: 6px;
  overflow: hidden;
}

.perm-popover-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.08), transparent);
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.01em;
}

.perm-popover-title svg { color: var(--gold-primary); }

.perm-popover-panel form { padding: 18px; }

.perm-divider { height: 1px; background: var(--border-soft); margin: 14px 0; }

@keyframes popover-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.perm-popover-panel .field { margin-bottom: 14px; animation: none; opacity: 1; transform: none; }
.perm-popover-panel .field:last-of-type { margin-bottom: 12px; }

.perm-checklist {
  display: grid;
  gap: 9px;
  margin-top: 6px;
}

.perm-checklist label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}
.perm-checklist label:hover { color: var(--text-primary); }

.perm-checklist input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--gold-primary);
}

.users-table td { vertical-align: middle; }
.users-table .col-actions { text-align: right; }

/* Botão Voltar em páginas de edição */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--gold-primary); }
.back-link svg { width: 14px; height: 14px; }

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 16px 24px;
  background: var(--bg-card-solid);
  border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
  opacity: 0;
  transition: transform 0.4s var(--ease-out-expo), opacity 0.4s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon { width: 20px; height: 20px; color: var(--success); }
.toast-text { font-size: 14px; color: var(--text-primary); }

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 480px) {
  .page-wrapper { padding: 16px; }
  .card-header { padding: 32px 24px 28px; }
  .card-title { font-size: 26px; }
  .card-body { padding: 28px 24px; }
  .stamp { width: 52px; height: 52px; font-size: 9px; }
}

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }

  .admin-sidebar {
    flex-direction: row;
    align-items: center;
    padding: 14px 18px;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 50;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .admin-brand, .admin-brand-sub { display: none; }
  .admin-nav { flex-direction: row; gap: 4px; overflow-x: auto; }
  .admin-nav a { padding: 9px 11px; font-size: 13px; white-space: nowrap; }
  .admin-nav a:hover { transform: none; }
  .admin-nav a svg { width: 16px; height: 16px; }
  .admin-sidebar form { margin-top: 0; margin-left: auto; }
  .admin-content { padding: 22px 18px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-top: 8px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-info strong { color: var(--text-secondary); font-weight: 600; }

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(.pagination-btn-active):not(.pagination-btn-disabled) {
  border-color: var(--border-glow);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.pagination-btn-active {
  background: linear-gradient(135deg, rgba(201, 169, 98, 0.15), rgba(201, 169, 98, 0.06));
  border-color: var(--border-glow);
  color: var(--gold-light);
  font-weight: 600;
}

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

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

.pagination-dots {
  color: var(--text-muted);
  padding: 0 4px;
  font-size: 13px;
}

.pagination-limit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-limit-label { white-space: nowrap; }

/* ==========================================================================
   Filters Panel
   ========================================================================== */

.filters-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 20px;
  transition: all 0.3s var(--ease-out-expo);
}

.filters-panel.collapsed { padding: 12px 22px; }

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  cursor: pointer;
}

.filters-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.filters-header h3 svg { width: 16px; height: 16px; color: var(--gold-primary); }

.filters-toggle {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 0.2s ease;
}
.filters-toggle:hover { color: var(--gold-primary); }

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.filters-grid .field { margin-bottom: 0; animation: none; opacity: 1; transform: none; }

.filters-grid .field label {
  font-size: 11px;
  margin-bottom: 6px;
}

.filters-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.search-input {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.search-input input::placeholder { color: var(--text-muted); }
.search-input input:hover { border-color: var(--border-glow); background: rgba(255, 255, 255, 0.06); }
.search-input input:focus { border-color: var(--gold-primary); background: rgba(201, 169, 98, 0.05); box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1); }

.search-input svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ==========================================================================
   HTMX Transitions
   ========================================================================== */

.htmx-swapping {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.htmx-settling {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s var(--ease-out-expo), transform 0.35s var(--ease-out-expo);
}

.htmx-request {
  opacity: 0.6;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-block;
}

/* Indicador de loading na sidebar */
.sidebar-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.htmx-request .sidebar-loading { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   Parceiros — toolbar de lote, checkboxes e modal de edição
   ========================================================================== */

/* Checkbox de seleção (lote) */
input.parceiro-check {
  accent-color: var(--gold-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
  vertical-align: middle;
}
thead input.parceiro-check {
  margin: 0;
}

/* Toolbar acima da tabela (gerar QR em lote) */
.card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.toolbar-counter {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
}

/* Ações por linha (Editar + Ativar/Desativar) */
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.table-actions form {
  margin: 0;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  animation: modal-in 0.18s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.modal-header h3 {
  margin: 0;
  font-size: 18px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}
.modal-close:hover {
  color: var(--text-primary);
  background: var(--border-soft);
}

.modal .field {
  margin-bottom: 16px;
}
.modal .field:last-of-type {
  margin-bottom: 20px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .modal {
    animation: none;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
