/* Design System - Sistema Sindicato Censo CNPJ */
:root {
  --bg-main: #0B0F19;
  --bg-card: #131B2E;
  --bg-card-hover: #1A243D;
  --bg-input: #1E293B;
  --border-color: #2D3748;
  --border-focus: #3B82F6;
  
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-glow: rgba(37, 99, 235, 0.35);
  
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.3);
  
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.15);
  
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  
  --text-main: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Header */
.top-nav {
  background: rgba(19, 27, 46, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.nav-container {
  width: 100%;
  max-width: min(98vw, 1920px);
  margin: 0 auto;
  padding: clamp(0.6rem, 1.2vw, 1rem) clamp(0.75rem, 1.8vw, 2rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1vw, 1rem);
}

.logo-icon {
  width: clamp(38px, 3.2vw, 46px);
  height: clamp(38px, 3.2vw, 46px);
  background: linear-gradient(135deg, #2563EB, #4F46E5);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.1rem, 1.3vw, 1.35rem);
  color: white;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
  flex-shrink: 0;
}

.system-title {
  font-size: clamp(1.05rem, 1.35vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #FFFFFF, #CBD5E1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.system-subtitle {
  font-size: clamp(0.7rem, 0.85vw, 0.825rem);
  color: var(--text-secondary);
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 1rem);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.db-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem clamp(0.5rem, 0.9vw, 0.85rem);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-full);
  font-size: clamp(0.725rem, 0.8vw, 0.8rem);
  color: #34D399;
  font-weight: 600;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* Main Container Fluid & Auto-Adjusting */
.main-container {
  width: 100%;
  max-width: min(98vw, 1920px);
  margin: 0 auto;
  padding: clamp(0.75rem, 1.5vw, 2rem);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 1.4vw, 1.75rem);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #34D399, #10B981);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: var(--bg-input);
  border-color: var(--text-secondary);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.775rem;
}

.btn-link {
  background: none;
  border: none;
  color: #60A5FA;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.btn-icon:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

/* KPI Cards - Auto-ajustável 100% da largura */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 1.2vw, 1.35rem);
  width: 100%;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(0.85rem, 1.2vw, 1.35rem);
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1vw, 1.15rem);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: #3B82F6;
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  width: clamp(42px, 3.4vw, 54px);
  height: clamp(42px, 3.4vw, 54px);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.15rem, 1.4vw, 1.45rem);
  flex-shrink: 0;
}

.kpi-icon.blue { background: rgba(37, 99, 235, 0.15); color: #60A5FA; }
.kpi-icon.green { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.kpi-icon.purple { background: rgba(139, 92, 246, 0.15); color: #A78BFA; }
.kpi-icon.amber { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }

.kpi-label {
  font-size: clamp(0.725rem, 0.8vw, 0.825rem);
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-value {
  font-size: clamp(1.3rem, 1.9vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin: 0.1rem 0;
  line-height: 1.15;
}

.kpi-detail {
  font-size: clamp(0.675rem, 0.75vw, 0.775rem);
  color: var(--text-muted);
}

/* Stats Panel */
.stats-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 1.5vw, 1.75rem);
  animation: fadeIn 0.3s ease;
  width: 100%;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  color: #93C5FD;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(0.85rem, 1.3vw, 1.5rem);
}

.stats-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.stats-card h4 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.825rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-bar-bg {
  width: 100%;
  height: 6px;
  background: #1E293B;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.stats-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
  border-radius: 3px;
}

/* Filter Section */
.filter-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 1.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 1.2vw, 1.35rem);
  width: 100%;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.filter-title h3 {
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  font-weight: 700;
}

.primary-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(0.75rem, 1.2vw, 1.25rem);
  margin-bottom: 0.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.search-bar-wrapper {
  position: relative;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  width: 100%;
  flex-wrap: wrap;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  min-width: min(100%, 280px);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: clamp(0.6rem, 0.9vw, 0.8rem) 1rem clamp(0.6rem, 0.9vw, 0.8rem) 2.75rem;
  font-size: clamp(0.825rem, 0.9vw, 0.925rem);
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

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

.filter-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.group-title {
  font-size: clamp(0.75rem, 0.82vw, 0.84rem);
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: clamp(120px, 15vh, 180px);
  overflow-y: auto;
  padding: 0.25rem 0.1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chips-container::-webkit-scrollbar {
  width: 5px;
}
.chips-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem clamp(0.5rem, 0.8vw, 0.75rem);
  border-radius: var(--radius-full);
  font-size: clamp(0.725rem, 0.78vw, 0.8rem);
  font-weight: 500;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chip:hover {
  background: #27354E;
  color: var(--text-main);
  border-color: #475569;
}

.chip.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: #3B82F6;
  color: #93C5FD;
  font-weight: 600;
}

.chip-count {
  font-size: 0.675rem;
  padding: 0.1rem 0.35rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.secondary-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: clamp(0.65rem, 1vw, 1.15rem);
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.filter-field label {
  font-size: clamp(0.725rem, 0.78vw, 0.8rem);
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.custom-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  font-size: clamp(0.775rem, 0.85vw, 0.875rem);
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
  width: 100%;
}

.custom-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.custom-select-sm {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-main);
  font-family: inherit;
}

/* Results Section */
.results-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 1.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 1.2vw, 1.25rem);
  width: 100%;
}

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

.results-count h3 {
  font-size: clamp(0.95rem, 1.15vw, 1.15rem);
  font-weight: 700;
}

.highlight-count {
  color: #60A5FA;
}

.sub-count {
  font-size: clamp(0.725rem, 0.8vw, 0.825rem);
  color: var(--text-muted);
}

.export-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Fluid Auto-Adjusting Table */
.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.3) rgba(15, 23, 42, 0.6);
}

.table-wrapper::-webkit-scrollbar {
  height: 7px;
}
.table-wrapper::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.35);
  border-radius: 4px;
}
.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.6);
}

.data-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  text-align: left;
  font-size: clamp(0.775rem, 0.86vw, 0.865rem);
}

.data-table th {
  background: #1A2338;
  color: var(--text-secondary);
  font-weight: 600;
  padding: clamp(0.65rem, 0.9vw, 0.95rem) clamp(0.65rem, 1vw, 1.1rem);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
}

.data-table td {
  padding: clamp(0.65rem, 0.85vw, 0.95rem) clamp(0.65rem, 1vw, 1.1rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.empresa-razao {
  font-weight: 600;
  color: #F8FAFC;
  display: block;
  word-break: break-word;
  max-width: 380px;
}

.empresa-fantasia {
  font-size: 0.75rem;
  color: #94A3B8;
  display: block;
  word-break: break-word;
  max-width: 380px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ativa { background: var(--success-bg); color: #34D399; border: 1px solid var(--success-border); }
.badge-suspensa { background: var(--warning-bg); color: #FBBF24; }
.badge-inapta { background: var(--danger-bg); color: #F87171; }
.badge-baixada { background: rgba(148, 163, 184, 0.15); color: #94A3B8; }
.badge-matriz { background: rgba(37, 99, 235, 0.2); color: #93C5FD; font-size: 0.7rem; }
.badge-filial { background: rgba(139, 92, 246, 0.2); color: #C4B5FD; font-size: 0.7rem; }

.cnae-badge {
  font-size: 0.75rem;
  color: #CBD5E1;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  max-width: clamp(200px, 20vw, 320px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-cell {
  font-size: 0.775rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.contact-cell div {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.5rem;
  width: 100%;
}

.items-per-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pagination-buttons {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-btn:hover:not(:disabled) {
  background: #27354E;
  color: var(--text-main);
}

.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
}

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

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-container,
.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.modal-dialog.modal-lg {
  max-width: 1020px;
}

.modal-dialog.modal-md {
  max-width: 520px;
}

.billing-dialog {
  max-width: 1080px;
  width: 95%;
  max-height: 94vh;
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-title-box h3 {
  font-size: 1.15rem;
  margin: 0.35rem 0 0.15rem 0;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-header-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #F8FAFC;
}

.modal-subtitle {
  font-size: 0.775rem;
  color: var(--text-secondary);
  margin: 0.15rem 0 0 0;
}

.modal-cnpj {
  color: #60A5FA;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-close-modal,
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.btn-close-modal:hover,
.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  max-height: calc(94vh - 120px);
}

/* Custom Scrollbar for Modal Body */
.modal-body::-webkit-scrollbar {
  width: 8px;
}
.modal-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.detail-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-card.full-width {
  grid-column: span 2;
}

.detail-label {
  font-size: 0.725rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-value {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
}

.detail-value.highlight {
  color: #93C5FD;
  font-weight: 600;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Footer */
.system-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
}

/* User Profile Menu */
.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #F8FAFC;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-plan-badge {
  font-size: 0.625rem;
  font-weight: 800;
  color: #38BDF8;
  letter-spacing: 0.05em;
}

.btn-logout {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-logout:hover {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.15);
}

.btn-admin {
  background: linear-gradient(135deg, #4F46E5, #4338CA);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-admin:hover {
  background: linear-gradient(135deg, #6366F1, #4F46E5);
  transform: translateY(-1px);
}

/* Antivirus Modal Styles */
.modal-admin {
  max-width: 760px;
}

.antivirus-status-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(79, 70, 229, 0.12));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.av-shield-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #2563EB, #4F46E5);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.5);
}

.av-info {
  flex: 1;
}

.av-status-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.av-status-title h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #F8FAFC;
}

.av-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.85rem;
}

.av-dates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.av-date-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8rem;
}

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

.sync-action-box {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

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

.progress-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.3s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.825rem;
  margin-bottom: 0.4rem;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #1E293B;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #38BDF8);
  border-radius: 5px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.progress-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.sync-history-box {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.history-table-wrapper {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.history-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.history-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animations & Utilities */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.text-center { text-align: center; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 2rem; padding-bottom: 2rem; }

/* Filtro Tags (resumo visual de filtros ativos) */
.filtro-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.15);
  color: #A5B4FC;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(99, 102, 241, 0.25);
  white-space: nowrap;
}
.filtro-tag i {
  font-size: 0.65rem;
  opacity: 0.75;
}

/* ==========================================================================
   DESIGN RESPONSIVO AUTO-AJUSTÁVEL (MULTI-DISPOSITIVOS E RESOLUÇÕES)
   ========================================================================== */

/* 1. Telas Grandes e Ultra-Wide (> 1600px) */
@media (min-width: 1600px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .primary-filters-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .secondary-filters {
    grid-template-columns: repeat(6, 1fr);
  }
  .chips-container {
    max-height: 200px;
  }
}

/* 2. Desktops e Notebooks Padrão (1200px a 1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .primary-filters-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .secondary-filters {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* 3. Notebooks Compactos e Tablets Landscape (992px a 1199px) */
@media (max-width: 1199px) {
  .nav-container {
    padding: 0.75rem 1.25rem;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .primary-filters-grid {
    grid-template-columns: 1fr;
  }
  .secondary-filters {
    grid-template-columns: repeat(3, 1fr);
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* 4. Tablets Portrait (768px a 991px) */
@media (max-width: 991px) {
  .top-nav {
    position: relative;
  }
  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .logo-area {
    justify-content: center;
  }
  .nav-actions {
    justify-content: center;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .secondary-filters {
    grid-template-columns: repeat(2, 1fr);
  }
  .results-header {
    flex-direction: column;
    align-items: stretch;
  }
  .export-actions {
    width: 100%;
  }
  .export-actions .btn {
    flex: 1;
  }
  .pagination-container {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
}

/* 5. Smartphones e Telas Menores (< 768px) */
@media (max-width: 767px) {
  .main-container {
    padding: 0.75rem 0.5rem;
    gap: 1rem;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .kpi-card {
    padding: 0.85rem;
  }
  .filter-section,
  .results-section,
  .stats-panel {
    padding: 1rem 0.75rem;
    border-radius: var(--radius-md);
  }
  .search-bar-wrapper {
    flex-direction: column;
  }
  .search-bar-wrapper .btn {
    width: 100%;
  }
  .secondary-filters {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-card.full-width {
    grid-column: span 1;
  }
  .modal-container {
    max-height: 96vh;
    border-radius: var(--radius-md);
  }
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
  .export-actions {
    flex-direction: column;
  }
  .export-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   CARTEIRA DE CRÉDITOS, CREDITS BADGE & API B2B STYLES
   ========================================================================== */

.credits-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.5rem 0.25rem 0.75rem;
  transition: all var(--transition-fast);
}

.credits-badge:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
}

.credits-icon-wrap {
  color: #F59E0B;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  animation: pulse-coin 3s infinite;
}

@keyframes pulse-coin {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6)); }
}

.credits-info {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.credits-amount {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #F8FAFC;
}

.credits-label {
  font-size: 0.7rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-recharge-pill {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.btn-recharge-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.5);
}

.btn-b2b {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: #93C5FD;
}

.btn-b2b:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: #3B82F6;
  color: #FFFFFF;
}

/* Wallet Balance Card */
.wallet-balance-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.wallet-balance-label {
  font-size: 0.725rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.wallet-balance-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.wallet-balance-number {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #F59E0B;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.wallet-balance-unit {
  font-size: 0.875rem;
  color: #E2E8F0;
  font-weight: 600;
}

.wallet-rates-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.rate-item {
  font-size: 0.75rem;
  color: #CBD5E1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.rate-item i {
  color: #60A5FA;
  width: 14px;
}

.rate-item strong {
  color: #FCD34D;
  margin-left: 0.25rem;
}

/* Tabs Navigation */
.billing-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
}

.billing-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.billing-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.billing-tab-btn.active {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Banner Informativo PIX */
.pix-info-banner {
  background: linear-gradient(135deg, rgba(0, 189, 174, 0.12), rgba(30, 41, 59, 0.8));
  border: 1px solid rgba(0, 189, 174, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.pix-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 189, 174, 0.2);
  color: #00BDAE;
  font-size: 0.675rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  border: 1px solid rgba(0, 189, 174, 0.4);
}

.pix-info-banner h3 {
  font-size: 1.05rem;
  color: #F8FAFC;
  margin: 0 0 0.25rem 0;
  font-weight: 700;
}

.pix-info-banner p {
  font-size: 0.775rem;
  color: #CBD5E1;
  margin: 0;
  line-height: 1.4;
}

/* 4 Alternativas de Uso (Usage Tiers Grid) */
.usage-tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.usage-tier-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 0.85rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-normal);
}

.usage-tier-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 189, 174, 0.4);
  background: rgba(30, 41, 59, 0.9);
}

.usage-tier-card.active {
  border: 2px solid #00BDAE;
  background: linear-gradient(180deg, rgba(0, 189, 174, 0.15) 0%, rgba(15, 23, 42, 0.8) 100%);
  box-shadow: 0 4px 20px rgba(0, 189, 174, 0.25);
}

.tier-badge {
  position: absolute;
  top: -8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  font-size: 0.575rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
}

.tier-badge.popular {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFF;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.tier-badge.best {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  color: #FFF;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
}

.tier-icon {
  font-size: 1.25rem;
  color: #60A5FA;
  margin-bottom: 0.35rem;
}

.usage-tier-card.active .tier-icon {
  color: #00BDAE;
}

.usage-tier-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0 0 0.25rem 0;
}

.tier-credits {
  font-size: 0.8rem;
  color: #94A3B8;
  margin-bottom: 0.35rem;
}

.tier-credits strong {
  color: #FFF;
  font-family: var(--font-mono);
}

.tier-price {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #38BDF8;
}

.tier-unit {
  font-size: 0.675rem;
  color: #34D399;
  font-weight: 600;
  display: block;
  margin-top: 0.15rem;
}

/* Simulador Dinâmico PIX */
.pix-calculator-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(0, 189, 174, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.calc-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-input-group {
  flex: 1;
}

.calc-input-group label {
  font-size: 0.775rem;
  color: #CBD5E1;
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.input-credits-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-credits-wrap input {
  padding-right: 70px;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #F8FAFC;
  height: 48px;
}

.input-credits-unit {
  position: absolute;
  right: 14px;
  font-size: 0.8rem;
  color: #94A3B8;
  font-weight: 600;
  pointer-events: none;
}

.calc-summary-group {
  flex: 1.2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: right;
}

.summary-line {
  font-size: 0.75rem;
  color: #94A3B8;
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.badge-discount {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
}

.summary-total-box {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 189, 174, 0.3);
  text-align: center;
}

.total-label {
  font-size: 0.675rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  display: block;
}

.total-amount-pix {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #00BDAE;
  margin: 0.15rem 0 0 0;
  text-shadow: 0 0 20px rgba(0, 189, 174, 0.3);
}

.calc-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.15rem;
}

.pix-features-note {
  display: flex;
  gap: 1rem;
}

.pix-features-note span {
  font-size: 0.725rem;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

#btn-gerar-pix-checkout {
  background: linear-gradient(135deg, #00BDAE, #0284C7);
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 189, 174, 0.4);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-normal);
}

#btn-gerar-pix-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 189, 174, 0.6);
}

/* Modal Checkout PIX Elements */
.pix-checkout-summary {
  display: flex;
  justify-content: space-around;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.pix-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pix-summary-label {
  font-size: 0.7rem;
  color: #94A3B8;
  text-transform: uppercase;
  font-weight: 600;
}

.pix-summary-val {
  font-size: 1.15rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.pix-qrcode-box {
  margin: 0 auto 1.25rem auto;
  text-align: center;
}

.pix-scan-hint {
  font-size: 0.75rem;
  color: #94A3B8;
  margin: 0.5rem 0 0 0;
}

.pix-copia-cola-box {
  margin-bottom: 1rem;
}

.pix-input-copy-wrap {
  display: flex;
  gap: 0.5rem;
}

.pix-status-notice {
  font-size: 0.775rem;
  color: #93C5FD;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-md);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

@media (max-width: 820px) {
  .usage-tiers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .calc-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .calc-summary-group {
    justify-content: space-between;
  }
  .calc-footer-row {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Coupon Box */
.coupon-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
}

.coupon-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.coupon-box h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 0.5rem;
}

.coupon-box p {
  font-size: 0.825rem;
  color: #94A3B8;
  margin-bottom: 1.25rem;
}

.coupon-input-group {
  display: flex;
  gap: 0.5rem;
}

.coupon-feedback {
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  font-weight: 600;
}

.coupon-feedback.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34D399;
}

.coupon-feedback.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #F87171;
}

/* API B2B Box */
.api-generate-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.api-input-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.api-key-created-alert {
  margin-top: 1rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
}

.token-copy-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.token-copy-box code {
  background: #0F172A;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  color: #38BDF8;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  flex: 1;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-snippet-box {
  background: #0F172A;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.code-snippet-box pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #E2E8F0;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .pricing-cards-grid {
    grid-template-columns: 1fr;
  }
  .wallet-balance-card {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .coupon-input-group,
  .api-input-row {
    flex-direction: column;
  }
}




/* --- Resumo de Consumo (pra onde foram os créditos) --- */
.consumo-resumo {
  background: linear-gradient(135deg, #16233b 0%, #1a2c47 100%);
  border: 1px solid #2a3b57;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.consumo-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid #2a3b57;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.consumo-total-label { font-size: 0.82rem; color: #94a3b8; }
.consumo-total-valor { font-size: 1.6rem; font-weight: 800; color: #f59e0b; font-family: var(--font-mono, monospace); }
.consumo-eventos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.consumo-evento-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #0f1a2e;
  border: 1px solid #263651;
  border-radius: 8px;
  padding: 8px 10px;
}
.consumo-evento-nome { font-size: 0.78rem; color: #cbd5e1; font-weight: 600; }
.consumo-evento-cred { font-size: 1.05rem; color: #f8fafc; font-family: var(--font-mono, monospace); }
.consumo-evento-chamadas { font-size: 0.7rem; color: #64748b; }
.consumo-vazio { color: #64748b; font-size: 0.82rem; }
