:root {
  /* Cores Oficiais CREMERS (Fundo Claro / Clean Medical) */
  --cremers-teal-primary: #099a82;        /* Verde Petróleo Principal */
  --cremers-teal-dark: #077b68;           /* Hover / Interações */
  --cremers-teal-deep: #022e26;           /* Textos de alto contraste e títulos */
  --cremers-teal-light: #34a992;          /* Destaques suaves */
  --cremers-teal-subtle: #e6f6f3;         /* Fundo de chips e badges suaves */
  --cremers-teal-border: #bce3dc;         /* Bordas institucionais */

  --cremers-gold: #c8963e;
  --cremers-gold-soft: #fcf6eb;

  /* Superfícies Claras */
  --bg-primary: #f8fafc;                  /* Fundo da Página (Off-white puro) */
  --bg-secondary: #f1f5f9;                /* Fundo secundário suave */
  --bg-card: #ffffff;                     /* Cartões Brancos */
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.95);
  
  --border-subtle: #e2e8f0;               /* Linhas divisórias sutis */
  --border-focus: #099a82;
  --border-card: #e2e8f0;                 /* Bordas dos cartões */
  
  --text-main: #1e293b;                   /* Texto escuro legível */
  --text-muted: #64748b;                  /* Texto secundário */
  --text-dim: #94a3b8;                    /* Legendas */
  
  --primary: var(--cremers-teal-primary);
  --primary-hover: var(--cremers-teal-dark);
  --primary-glow: rgba(9, 154, 130, 0.18);
  
  --accent-teal: var(--cremers-teal-primary);

  /* Tags de Notificação de Receita */
  --tag-a: #b45309;
  --tag-a-bg: #fef3c7;
  --tag-a-border: #fde68a;

  --tag-b: #0284c7;
  --tag-b-bg: #e0f2fe;
  --tag-b-border: #bae6fd;

  --tag-c2: #475569;
  --tag-c2-bg: #f1f5f9;
  --tag-c2-border: #e2e8f0;

  --tag-tal: #0f766e;
  --tag-tal-bg: #ccfbf1;
  --tag-tal-border: #99f6e4;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(9, 154, 130, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Background com visual limpo e sutil */
.background-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}

.blob-1 {
  top: -120px;
  right: -50px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #34a992 0%, #bce3dc 100%);
}

.blob-2 {
  bottom: 80px;
  left: -120px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #099a82 0%, #e6f6f3 100%);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#e2e8f0 1px, transparent 1px),
                    linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
}

/* Header */
.main-header {
  position: relative;
  z-index: 10;
  padding: 3rem 1.5rem 2.25rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.brand {
  max-width: 680px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--cremers-teal-subtle);
  border: 1px solid var(--cremers-teal-border);
  color: var(--cremers-teal-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cremers-teal-primary);
  box-shadow: 0 0 8px rgba(9, 154, 130, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.5; transform: scale(0.9); }
}

.brand-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.brand-title .highlight {
  color: var(--cremers-teal-primary);
  position: relative;
}

.brand-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.stats-card {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 1.25rem 2rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--cremers-teal-dark);
  font-family: 'JetBrains Mono', monospace;
}

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

.stat-divider {
  width: 1px;
  height: 38px;
  background: var(--border-subtle);
}

/* Main Container */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  position: relative;
  z-index: 10;
}

/* Banner de Fluxo de Emissão de Receitas */
.flow-banner-section {
  margin-bottom: 2rem;
}

.flow-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1.5px solid var(--cremers-teal-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px -3px rgba(9, 154, 130, 0.12), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.flow-banner-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--cremers-teal-primary);
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}

.flow-banner-card:hover {
  transform: translateY(-2px);
  border-color: var(--cremers-teal-primary);
  box-shadow: 0 10px 25px -4px rgba(9, 154, 130, 0.22);
}

.flow-banner-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--cremers-teal-subtle);
  border: 1px solid var(--cremers-teal-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cremers-teal-primary);
  flex-shrink: 0;
  transition: var(--transition);
}

.flow-banner-card:hover .flow-banner-icon-wrap {
  background: var(--cremers-teal-primary);
  color: #ffffff;
  transform: scale(1.05);
}

.flow-banner-icon {
  width: 26px;
  height: 26px;
}

.flow-banner-content {
  flex: 1;
}

.flow-banner-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.flow-banner-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cremers-teal-dark);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.flow-banner-card:hover .flow-banner-subtitle {
  text-decoration: underline;
}

.flow-banner-action {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-shrink: 0;
}

.flow-banner-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--cremers-teal-subtle);
  border: 1px solid var(--cremers-teal-border);
  color: var(--cremers-teal-dark);
}

.flow-banner-arrow {
  width: 20px;
  height: 20px;
  stroke: var(--cremers-teal-primary);
  transition: transform 0.2s ease;
}

.flow-banner-card:hover .flow-banner-arrow {
  transform: translateX(4px);
}

/* Modal do Fluxo (Peças 1 a 7) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  max-width: 680px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes modalSlideUp {
  from { transform: translateY(20px) scale(0.97); }
  to { transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.modal-tag {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cremers-teal-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-close-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

.modal-body {
  padding: 1.5rem 1.75rem 2rem;
}

/* Carousel Container */
.carousel-container {
  position: relative;
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.carousel-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  max-height: 520px;
  padding: 0.5rem;
}

.carousel-image {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  transition: opacity 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cremers-teal-dark);
  transition: var(--transition);
  z-index: 10;
}

.carousel-nav-btn:hover {
  background: var(--cremers-teal-primary);
  color: #ffffff;
  border-color: var(--cremers-teal-primary);
  transform: translateY(-50%) scale(1.08);
}

.carousel-nav-btn.prev {
  left: 0.75rem;
}

.carousel-nav-btn.next {
  right: 0.75rem;
}

.carousel-nav-btn svg {
  width: 22px;
  height: 22px;
}

.carousel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding: 0 0.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.carousel-indicators {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.indicator-dot:hover {
  background: var(--cremers-teal-light);
}

.indicator-dot.active {
  background: var(--cremers-teal-primary);
  width: 28px;
  border-radius: var(--radius-full);
}

.carousel-counter {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--cremers-teal-dark);
  font-family: 'JetBrains Mono', monospace;
  background: var(--cremers-teal-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--cremers-teal-border);
}

.modal-notice {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.notice-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.notice-text {
  font-size: 0.8125rem;
  color: #78350f;
  line-height: 1.5;
}

/* Search Section */
.search-section {
  margin-bottom: 2.5rem;
}

.search-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.search-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: flex-start;
}

.input-wrapper {
  position: relative;
}

.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cremers-teal-deep);
  margin-bottom: 0.6rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  width: 20px;
  height: 20px;
  stroke: var(--text-dim);
  pointer-events: none;
  transition: var(--transition);
}

.search-box input {
  width: 100%;
  padding: 0.875rem 2.75rem 0.875rem 3rem;
  font-size: 0.95rem;
  color: var(--text-main);
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.search-box input:focus {
  border-color: var(--cremers-teal-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box input:focus + .input-icon {
  stroke: var(--cremers-teal-primary);
}

.clear-btn {
  position: absolute;
  right: 0.875rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.clear-btn:hover {
  color: var(--text-main);
  background: #f1f5f9;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  list-style: none;
}

.autocomplete-dropdown li {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
  color: var(--text-main);
  border-bottom: 1px solid #f1f5f9;
  transition: var(--transition);
}

.autocomplete-dropdown li:hover,
.autocomplete-dropdown li.selected {
  background: var(--cremers-teal-subtle);
  color: var(--cremers-teal-dark);
}

.autocomplete-badge {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: var(--text-muted);
}

/* Clean Combobox Select */
.single-combobox-row {
  grid-template-columns: 1fr;
  max-width: 580px;
}

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

.native-select {
  width: 100%;
  padding: 0.95rem 3rem 0.95rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.native-select:focus {
  border-color: var(--cremers-teal-primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.select-chevron {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: var(--cremers-teal-primary);
  pointer-events: none;
}

/* Quick Shortcuts */
.quick-shortcuts {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.shortcuts-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--cremers-teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.chip-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.chip-btn:hover {
  background: var(--cremers-teal-subtle);
  border-color: var(--cremers-teal-primary);
  color: var(--cremers-teal-dark);
  transform: translateY(-1px);
}

.chip-btn.active {
  background: var(--cremers-teal-primary);
  border-color: var(--cremers-teal-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(9, 154, 130, 0.35);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  max-width: 650px;
  margin: 0 auto;
}

.empty-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--cremers-teal-subtle);
  border: 1px solid var(--cremers-teal-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cremers-teal-primary);
}

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

.empty-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.empty-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* City Detail View */
.city-detail-view {
  animation: fadeIn 0.35s ease-out;
}

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

/* City Banner (Card Principal de Destaque) */
.city-banner {
  background: linear-gradient(135deg, #099a82 0%, #066d5b 100%);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
  color: #ffffff;
}

.state-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d1fae5;
  margin-bottom: 0.5rem;
}

.selected-city-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.2;
}

.selected-city-guidance {
  font-size: 1rem;
  color: #ecfdf5;
  margin-top: 0.35rem;
}

.city-banner-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.action-btn svg {
  width: 17px;
  height: 17px;
}

.primary-btn {
  background: #ffffff;
  color: var(--cremers-teal-dark);
  border: 1px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.primary-btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.outline-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.outline-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Section Heading */
.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.pill-counter {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--cremers-teal-subtle);
  border: 1px solid var(--cremers-teal-border);
  color: var(--cremers-teal-dark);
}

/* Grid de Locais */
.locais-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.local-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.local-card:hover {
  border-color: var(--cremers-teal-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.sphere-pill {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

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

.sphere-estadual {
  background: var(--cremers-teal-subtle);
  border: 1px solid var(--cremers-teal-border);
  color: var(--cremers-teal-dark);
}

.types-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.type-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.tag-a { background: var(--tag-a-bg); color: var(--tag-a); border: 1px solid var(--tag-a-border); }
.tag-b { background: var(--tag-b-bg); color: var(--tag-b); border: 1px solid var(--tag-b-border); }
.tag-c2 { background: var(--tag-c2-bg); color: var(--tag-c2); border: 1px solid var(--tag-c2-border); }
.tag-tal { background: var(--tag-tal-bg); color: var(--tag-tal); border: 1px solid var(--tag-tal-border); }

.local-agency-name {
  font-size: 1.1875rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.card-block-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cremers-teal-dark);
  margin-bottom: 0.45rem;
}

/* O que você recebe */
.outcome-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.outcome-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.outcome-talonario .outcome-icon {
  background: #fef3c7;
  color: #b45309;
}

.outcome-numeracao .outcome-icon {
  background: var(--cremers-teal-subtle);
  color: var(--cremers-teal-primary);
}

.outcome-missing .outcome-icon {
  background: #f1f5f9;
  color: #64748b;
}

.outcome-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

/* Contatos */
.contacts-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cremers-teal-dark);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  transition: var(--transition);
}

.contact-link:hover {
  color: #065f46;
  text-decoration: underline;
}

.contact-link svg {
  width: 15px;
  height: 15px;
  stroke: var(--cremers-teal-primary);
}

.copy-mini-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.copy-mini-btn:hover {
  background: var(--cremers-teal-subtle);
  border-color: var(--cremers-teal-primary);
  color: var(--cremers-teal-dark);
}

/* Links Associados */
.local-links-list {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.external-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--cremers-teal-subtle);
  border: 1px solid var(--cremers-teal-border);
  border-radius: var(--radius-md);
  color: var(--cremers-teal-dark);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 700;
  transition: var(--transition);
}

.external-link-btn:hover {
  background: #d1fae5;
  border-color: var(--cremers-teal-primary);
}

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

/* Fontes Oficiais Card */
.sources-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.sources-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.sources-icon {
  width: 24px;
  height: 24px;
  stroke: var(--cremers-teal-primary);
  flex-shrink: 0;
}

.sources-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

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

.sources-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.source-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 1.1rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: var(--transition);
}

.source-badge-link:hover {
  background: var(--cremers-teal-subtle);
  border-color: var(--cremers-teal-primary);
  color: var(--cremers-teal-dark);
  transform: translateY(-1px);
}

.source-badge-link svg {
  width: 13px;
  height: 13px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 100;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 18px;
  height: 18px;
  stroke: var(--cremers-teal-primary);
}

/* Responsiveness */
@media (max-width: 768px) {
  .main-header {
    padding: 2rem 1rem 1.75rem;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .brand-title {
    font-size: 2rem;
  }

  .brand-subtitle {
    font-size: 0.9375rem;
  }
  
  .stats-card {
    width: 100%;
    justify-content: space-around;
  }
  
  .flow-banner-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
    gap: 1rem;
  }

  .flow-banner-action {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--cremers-teal-border);
  }

  .flow-banner-title {
    font-size: 1.05rem;
  }

  .search-inputs-row {
    grid-template-columns: 1fr;
  }
  
  .city-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.25rem;
  }
  
  .selected-city-title {
    font-size: 1.625rem;
  }

  .city-banner-actions {
    width: 100%;
  }
  
  .city-banner-actions .action-btn {
    flex: 1;
    justify-content: center;
  }
  
  .locais-grid {
    grid-template-columns: 1fr;
  }

  /* Modal em tablets e celulares */
  .modal-backdrop {
    padding: 0.75rem;
  }

  .modal-dialog {
    max-height: 96vh;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 1rem 1.25rem;
  }

  .modal-title {
    font-size: 1.05rem;
  }

  .modal-body {
    padding: 1rem 1rem 1.5rem;
  }

  .carousel-stage {
    min-height: 280px;
    max-height: 380px;
  }

  .carousel-image {
    max-height: 360px;
  }

  .carousel-nav-btn {
    width: 38px;
    height: 38px;
  }

  .carousel-nav-btn.prev {
    left: 0.35rem;
  }

  .carousel-nav-btn.next {
    right: 0.35rem;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 1.5rem 1rem 1.25rem;
  }

  .brand-title {
    font-size: 1.65rem;
  }

  .brand-subtitle {
    font-size: 0.875rem;
  }

  .brand-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  .search-card {
    padding: 1rem;
  }

  .native-select {
    font-size: 0.875rem;
    padding: 0.75rem 2.25rem 0.75rem 0.875rem;
  }

  .selected-city-title {
    font-size: 1.375rem;
  }

  .local-card {
    padding: 1.25rem 1rem;
  }

  .sources-card {
    padding: 1.25rem 1rem;
  }

  .sources-links-row {
    flex-direction: column;
  }

  .source-badge-link {
    width: 100%;
    justify-content: center;
  }

  .carousel-stage {
    min-height: 220px;
    max-height: 300px;
  }

  .carousel-image {
    max-height: 280px;
  }

  .carousel-footer {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .modal-notice {
    padding: 0.75rem 0.875rem;
    font-size: 0.75rem;
  }
}
