:root {
  --green: #68ff94;
  --green-border: rgba(104, 255, 148, 0.14);
  --green-dim: rgba(104, 255, 148, 0.08);
  --green-glow: rgba(104, 255, 148, 0.35);
  --border: rgba(255, 255, 255, 0.06);
  --border-hi: rgba(104, 255, 148, 0.28);
  --text: #bcc0c3;
  --text-dim: rgba(188, 192, 195, 0.45);
  --text-dimmer: rgba(188, 192, 195, 0.25);
  --bg-card: rgba(255, 255, 255, 0.018);
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Orbitron', monospace;
  --radius: 3px;
  --red: #ff6b6b;
  --link: #8ad4ff;
  --yellow: #ffd580;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #070707;
  color: var(--text);
  overflow-x: hidden;
  position: relative;
  cursor: crosshair;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(20, 83, 45, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 83, 45, 0.08) 1px, transparent 1px),
    radial-gradient(circle, rgba(69, 190, 108, 0.1) 1px, transparent 1px),
    linear-gradient(45deg, rgba(69, 190, 108, 0.02) 1px, transparent 1px),
    linear-gradient(-45deg, rgba(69, 190, 108, 0.02) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 20px 20px, 80px 80px, 80px 80px;
  z-index: -1;
  pointer-events: none;
}

@keyframes circuit-flicker {

  0%,
  100% {
    opacity: 0.05;
  }

  50% {
    opacity: 0.15;
  }
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(69, 190, 108, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 190, 108, 0.1) 1px, transparent 1px);
  background-size: 100px 100px;
  background-position: 0 0, 50px 50px;
  z-index: -1;
  pointer-events: none;
  animation: circuit-flicker 8s infinite alternate;
  opacity: 0.05;
}

#ambientGlow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(104, 255, 148, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 50% 30% at 85% 90%, rgba(138, 212, 255, 0.025) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

#cursorOrb {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(104, 255, 148, 0.045) 0%, transparent 65%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: opacity 0.4s;
}

::-webkit-scrollbar {
  width: 3px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--green-border);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green-glow);
}

#page {
  position: relative;
  z-index: 10;
  max-width: 920px;
  margin: 0 auto;
  padding: 30px 22px 40px;
  flex: 1;
  width: 100%;
}

#siteHeader {
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.logo-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.logo-xrav {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 6vw, 48px);
  color: var(--green);
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px rgba(104, 255, 148, 0.5), 0 0 80px rgba(104, 255, 148, 0.15);
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {

  0%,
  100% {
    text-shadow: 0 0 30px rgba(104, 255, 148, 0.5), 0 0 80px rgba(104, 255, 148, 0.15);
  }

  50% {
    text-shadow: 0 0 40px rgba(104, 255, 148, 0.7), 0 0 100px rgba(104, 255, 148, 0.25);
  }
}

.logo-tools {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(12px, 2.5vw, 20px);
  color: rgba(188, 192, 195, 0.55);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-left: 4px;
}

.logo-cursor {
  display: inline-block;
  width: clamp(5px, 1vw, 8px);
  height: clamp(18px, 3.5vw, 30px);
  background: var(--green);
  margin-left: 4px;
  animation: blink 1.05s step-end infinite;
  vertical-align: bottom;
  box-shadow: 0 0 12px rgba(104, 255, 148, 0.7);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.slogan-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.slogan {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--green);
  text-shadow: 0 0 5px var(--green);
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.slogan i {
  font-size: 13px;
  opacity: 0.7;
}

.search-section {
  margin: 20px 0 18px;
}

.search-wrapper {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

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

.search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  opacity: 0.5;
  font-size: 14px;
}

#cnpjInput {
  width: 100%;
  height: 100%;
  min-height: 48px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px 12px 42px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  letter-spacing: 0.02em;
}

#cnpjInput::placeholder {
  color: rgba(188, 192, 195, 0.25);
  font-size: 12px;
}

#cnpjInput:focus {
  border-color: var(--border-hi);
  background: rgba(104, 255, 148, 0.02);
  box-shadow: 0 0 0 3px rgba(104, 255, 148, 0.05);
}

.api-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 6px;
  min-height: 48px;
}

.api-selector label {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-dimmer);
  letter-spacing: 0.06em;
  padding: 0 6px;
}

.api-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--text-dimmer);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.api-btn:hover {
  color: var(--text);
  border-color: var(--border);
}

.api-btn.active {
  background: var(--green-dim);
  border-color: var(--green-border);
  color: var(--green);
}

.api-btn.active:hover {
  background: rgba(104, 255, 148, 0.14);
}

.btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  min-height: 48px;
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.btn-search:hover {
  background: rgba(104, 255, 148, 0.14);
  border-color: rgba(104, 255, 148, 0.5);
  box-shadow: 0 0 18px rgba(104, 255, 148, 0.1);
  transform: translateY(-1px);
}

.btn-search:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-clear-cache {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  min-height: 48px;
  background: rgba(255, 107, 107, 0.05);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-radius: var(--radius);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.btn-clear-cache.visible {
  display: inline-flex;
}

.btn-clear-cache:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.4);
  box-shadow: 0 0 18px rgba(255, 107, 107, 0.08);
  transform: translateY(-1px);
}

.btn-clear-cache i {
  font-size: 13px;
}

.search-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.disclaimer {
  font-size: 11px;
  line-height: 1.7;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.disclaimer i {
  color: var(--green);
  opacity: 0.6;
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.disclaimer-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.disclaimer-content .main-text {
  color: var(--text);
}

.disclaimer-content .main-text strong {
  color: var(--green);
  font-weight: 600;
}

.disclaimer-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 10px;
}

.disclaimer-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.disclaimer-footer i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  flex-shrink: 0;
  font-size: 10px;
  line-height: 1;
  opacity: 0.6;
}

.result-area {
  margin-top: 24px;
  display: none;
}

.result-area.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#siteFooter {
  padding: 32px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 10px;
  color: var(--text-dimmer);
  letter-spacing: 0.06em;
  max-width: 840px;
}

#siteFooter a {
  color: rgba(104, 255, 148, 0.35);
  text-decoration: none;
  transition: color 0.15s;
}

#siteFooter a:hover {
  color: var(--green);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-dot {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 2s step-end infinite;
  box-shadow: 0 0 6px rgba(104, 255, 148, 0.6);
}

.result-card {
  background: var(--bg-card);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: 0 0 0 1px rgba(104, 255, 148, 0.03);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.result-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--green);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.result-title i {
  font-size: 20px;
  opacity: 0.8;
}

.result-title .cnpj-number {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.result-status {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 4px 14px;
  border-radius: 2px;
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.result-status.error {
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.3);
  color: var(--red);
}

.result-status.suspensa {
  background: rgba(255, 213, 128, 0.08);
  border-color: rgba(255, 213, 128, 0.3);
  color: var(--yellow);
}

.api-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.api-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.api-info-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.api-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.api-info-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.api-info-card:hover,
.api-info-card:focus-visible {
  background: var(--green-dim);
  border-color: var(--border-hi);
  transform: translateX(2px);
  outline: none;
}

.api-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50px 0 0 50px;
}

.api-info-card:hover::before,
.api-info-card:focus-visible::before {
  opacity: 1;
}

.api-info-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(104, 255, 148, 0.06);
  border: 1px solid var(--green-border);
  z-index: 1;
}

.api-info-card-icon i {
  color: var(--green);
  font-size: 11px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.api-info-card:hover .api-info-card-icon i {
  transform: scale(1.12) rotate(5deg);
  filter: drop-shadow(0 0 4px var(--green-glow));
}

.api-info-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  z-index: 1;
}

.api-info-card-label {
  color: var(--text-dimmer);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.api-info-card-value {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.api-info-card:hover .api-info-card-value {
  color: #ffffff;
  text-shadow: 0 0 4px var(--green-glow);
}

#apiEndpoint:hover .api-info-card-value,
#apiEndpoint:focus-visible .api-info-card-value,
#apiSiteLink:hover .api-info-card-value,
#apiSiteLink:focus-visible .api-info-card-value {
  color: var(--link);
  text-shadow: 0 0 6px rgba(138, 212, 255, 0.45);
}

.api-info-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.api-info-card-arrow i {
  color: var(--text-dimmer);
  font-size: 10px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

.api-info-card:hover .api-info-card-arrow i {
  transform: translateX(4px);
  color: var(--green);
}

.api-info .limit-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.api-info-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-export-txt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(138, 212, 255, 0.08);
  border: 1px solid rgba(138, 212, 255, 0.25);
  border-radius: var(--radius);
  color: var(--link);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.btn-export-txt:hover {
  background: rgba(138, 212, 255, 0.16);
  border-color: rgba(138, 212, 255, 0.5);
  box-shadow: 0 0 14px rgba(138, 212, 255, 0.15);
  transform: translateY(-1px);
}

.btn-export-txt:active {
  transform: translateY(0);
}

.btn-export-txt i {
  font-size: 11px;
}

.api-info .api-badge {
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  border-radius: 2px;
  padding: 4px 12px;
  color: var(--green);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.api-info .cache-badge {
  background: rgba(255, 213, 128, 0.08);
  border: 1px solid rgba(255, 213, 128, 0.2);
  border-radius: 2px;
  padding: 4px 12px;
  color: var(--yellow);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: none;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.api-info .cache-badge.visible {
  display: inline-flex;
}

.info-grid-cnpj {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.info-item-cnpj {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: none;
}

.info-item-cnpj.visible {
  display: block;
}

.info-item-cnpj .label {
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.info-item-cnpj .label i {
  font-size: 10px;
  color: var(--green);
  opacity: 0.6;
}

.info-item-cnpj .value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
  line-height: 1.4;
}

.info-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.info-section-title {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  opacity: 0.7;
  font-weight: 700;
}

.info-section-title i {
  font-size: 12px;
}

.socios-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.socio-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.socio-item .nome {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}

.socio-item .detalhes {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.socio-item .detalhes span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.socio-item .detalhes i {
  font-size: 8px;
  opacity: 0.5;
}

.socio-item .representante {
  font-size: 9px;
  color: var(--text-dimmer);
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px solid var(--border);
}

.atividades-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.atividade-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  background: rgba(104, 255, 148, 0.05);
  border: 1px solid var(--green-border);
  border-radius: 2px;
  padding: 3px 10px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.atividade-tag .code {
  color: var(--green);
  opacity: 0.6;
  margin-right: 4px;
}

.simples-info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.simples-item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.simples-item i {
  font-size: 10px;
  color: var(--green);
  opacity: 0.6;
}

.simples-item .nao {
  color: var(--red);
  opacity: 0.6;
}

.simples-item .sim {
  color: var(--green);
}

.inscricoes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inscricao-item {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 3px 10px;
  color: var(--text-dim);
}

.inscricao-item .ativo {
  color: var(--green);
}

.inscricao-item .inativo {
  color: var(--red);
}

.error-box {
  background: rgba(255, 107, 107, 0.05);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.error-box i {
  color: var(--red);
  font-size: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.error-box .error-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

.error-box .error-text a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dashed rgba(138, 212, 255, 0.3);
  transition: border-color 0.15s;
}

.error-box .error-text a:hover {
  border-color: var(--link);
}

.loading-spinner {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 20px;
  justify-content: center;
}

.loading-spinner.active {
  display: flex;
}

.loading-spinner i {
  font-size: 24px;
  color: var(--green);
  animation: spin 1s linear infinite;
}

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

.loading-spinner span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  width: 100%;
  pointer-events: none;
}

.toast {
  background: rgba(10, 12, 10, 0.88);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(104, 255, 148, 0.15);
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  transform: translateX(calc(100% + 30px));
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(104, 255, 148, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: 0 2px 2px 0;
}

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

.toast.success {
  border-color: rgba(104, 255, 148, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(104, 255, 148, 0.06),
    0 0 0 1px rgba(104, 255, 148, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.toast.success::before {
  background: var(--green);
  box-shadow: 0 0 12px rgba(104, 255, 148, 0.4);
}

.toast.success .toast-icon {
  color: var(--green);
  text-shadow: 0 0 20px rgba(104, 255, 148, 0.3);
}

.toast.error {
  border-color: rgba(255, 107, 107, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(255, 107, 107, 0.06),
    0 0 0 1px rgba(255, 107, 107, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.toast.error::before {
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.4);
}

.toast.error .toast-icon {
  color: var(--red);
  text-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.toast.info {
  border-color: rgba(255, 213, 128, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(255, 213, 128, 0.06),
    0 0 0 1px rgba(255, 213, 128, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.toast.info::before {
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(255, 213, 128, 0.4);
}

.toast.info .toast-icon {
  color: var(--yellow);
  text-shadow: 0 0 20px rgba(255, 213, 128, 0.3);
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.toast-content {
  flex: 1;
  line-height: 1.5;
}

.toast-content .toast-message {
  font-size: 12px;
  color: var(--text);
}

.toast-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  opacity: 0.03;
  background: radial-gradient(circle at center, var(--green) 0%, transparent 70%);
  animation: toastPulse 3s ease-in-out infinite;
}

@keyframes toastPulse {

  0%,
  100% {
    opacity: 0.03;
    transform: scale(1);
  }

  50% {
    opacity: 0.06;
    transform: scale(1.1);
  }
}

.toast.success .toast-glow {
  background: radial-gradient(circle at center, var(--green) 0%, transparent 70%);
}

.toast.error .toast-glow {
  background: radial-gradient(circle at center, var(--red) 0%, transparent 70%);
}

.toast.info .toast-glow {
  background: radial-gradient(circle at center, var(--yellow) 0%, transparent 70%);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), rgba(104, 255, 148, 0.3));
  border-radius: 0 0 0 2px;
  transition: width 0.1s linear;
  width: 100%;
}

.toast.success .toast-progress {
  background: linear-gradient(90deg, var(--green), rgba(104, 255, 148, 0.3));
}

.toast.error .toast-progress {
  background: linear-gradient(90deg, var(--red), rgba(255, 107, 107, 0.3));
}

.toast.info .toast-progress {
  background: linear-gradient(90deg, var(--yellow), rgba(255, 213, 128, 0.3));
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-dimmer);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  transition: color 0.2s;
  flex-shrink: 0;
  pointer-events: auto;
}

.toast-close:hover {
  color: var(--text);
}

.logo-sub {
  font-size: 15px;
  color: var(--text-dimmer);
  letter-spacing: 0.06em;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-sub a {
  color: rgba(138, 212, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.logo-sub a:hover {
  color: var(--link);
}

.history-container {
  margin: 0 0 12px 0;
  display: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
  transition: all 0.25s ease;
}

.history-container.visible {
  display: block;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
  gap: 12px;
  flex-wrap: wrap;
}

.history-header:hover {
  background: rgba(104, 255, 148, 0.03);
}

.history-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.history-header-left i:first-child {
  font-size: 14px;
  color: var(--green);
  opacity: 0.6;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}

.history-header-left i.rotate-icon {
  transform: rotate(90deg);
  color: var(--green);
  opacity: 1;
}

.history-header-left .label-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.history-header .badge {
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

.history-header .chevron {
  font-size: 11px;
  color: var(--text-dimmer);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.history-header .chevron.open {
  transform: rotate(180deg);
}

.history-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.history-body.open {
  max-height: 420px;
  overflow-y: auto;
}

.history-body::-webkit-scrollbar {
  width: 2px;
}

.history-body::-webkit-scrollbar-thumb {
  background: var(--green-border);
  border-radius: 2px;
}

.history-list {
  padding: 4px 0;
  border-top: 1px solid var(--border);
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  gap: 14px;
}

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

.history-item:hover {
  background: rgba(104, 255, 148, 0.04);
}

.history-item:active {
  background: rgba(104, 255, 148, 0.07);
}

.history-item .h-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.history-item .h-cnpj {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.history-item .h-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: var(--text-dimmer);
  flex-wrap: wrap;
}

.history-item .h-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.history-item .h-meta i {
  font-size: 9px;
  opacity: 0.5;
}

.history-item .h-api {
  font-size: 9px;
  font-family: var(--font-mono);
  padding: 2px 10px;
  border-radius: 2px;
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.history-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-dimmer);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.history-empty i {
  display: block;
  font-size: 24px;
  margin-bottom: 10px;
  opacity: 0.2;
}

@media (max-width: 767px) {
  #siteFooter {
    flex-direction: column;
    align-items: flex-start;
  }

  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
    width: auto;
  }

  .toast {
    padding: 12px 16px;
    font-size: 11px;
  }

  #page {
    padding: 16px 14px 20px;
  }

  .search-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .api-selector {
    justify-content: center;
    flex-wrap: wrap;
  }

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

  .btn-search,
  .btn-clear-cache {
    width: 100%;
    justify-content: center;
  }

  .result-card {
    padding: 16px;
  }

  .info-grid-cnpj {
    grid-template-columns: 1fr;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .disclaimer {
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
  }

  .disclaimer-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

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

  .result-title {
    font-size: 16px;
  }

  #siteFooter {
    padding: 16px 14px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 0;
  }

  .footer-left,
  .footer-right {
    width: 100%;
    justify-content: center;
  }

  .api-info {
    padding: 12px 14px;
    font-size: 11px;
  }

  .api-info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .api-info-row {
    gap: 8px;
  }

  .api-info .limit-info {
    width: 100%;
  }

  .api-info-actions {
    width: 100%;
    justify-content: space-between;
  }

  .btn-export-txt {
    flex-shrink: 0;
  }

  .history-header {
    padding: 8px 12px;
    font-size: 11px;
  }

  .history-item {
    padding: 8px 12px;
    flex-wrap: wrap;
  }

  .history-item .h-meta {
    gap: 8px;
  }

  .history-body.open {
    max-height: 300px;
  }
}

@media (max-width: 480px) {
  .info-grid-cnpj {
    grid-template-columns: 1fr;
  }

  .simples-info {
    flex-direction: column;
    gap: 6px;
  }

  .api-info-status {
    width: 100%;
    justify-content: space-between;
  }

  .api-info-row {
    justify-content: flex-start;
  }

  .api-info .api-badge,
  .api-info .cache-badge {
    font-size: 11px;
  }

  .api-info-card {
    padding: 9px 12px 9px 14px;
  }

  .api-info-card-value {
    font-size: 12px;
  }

  .history-item .h-cnpj {
    font-size: 12px;
  }
}

.noscript-cat {
  margin-bottom: clamp(16px, 4vw, 24px);
  display: flex;
  justify-content: center;
}

.noscript-cat img {
  width: 100%;
  max-width: min(400px, 80vw);
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: clamp(8px, 3vw, 12px);
  image-rendering: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.noscript-cat img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}