﻿:root {
  --bg: #0b1223;
  --bg2: #0f172a;
  --card: rgba(17, 24, 39, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --brand1: #28a7ff; /* azul */
  --brand2: #22d3a8; /* verde/teal */
  --primary: #3b82f6;
  --primary-contrast: #ffffff;
  --success: #10b981;
  --danger: #ef4444;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(40, 167, 255, 0.2), transparent 60%),
              radial-gradient(1200px 600px at 80% -10%, rgba(34, 211, 168, 0.18), transparent 60%),
              linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(90deg, rgba(40,167,255,0.12), rgba(34,211,168,0.12));
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;`n  justify-content: center;
}
.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(40,167,255,0.25));
}
.brand-text { line-height: 1.05; }
.brand-title {
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 20px;
}
.brand-sub { color: var(--muted); font-size: 12px; }

/* Layout */
.container {
  min-height: calc(100vh - 70px);
  padding: 12px 16px 32px;
}
.grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-areas: "lista form";
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Map cards to grid areas for easy reordering */
.cnaes-card { grid-area: lista; overflow: hidden; }
.form-card { grid-area: form; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px;
  width: 100%;
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.card-title { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.subtitle { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

/* CNAEs list */
.cnaes-card { overflow: hidden; }
.categories { margin-top: 8px; max-height: 70vh; overflow: auto; padding-right: 6px; }
.category-block { margin: 16px 0; }
.category-title {
  font-weight: 700; font-size: 13px; letter-spacing: 0.2px; color: #cfe8ff;
  text-transform: none;
}
.cnae-list { margin: 8px 0 0; padding-left: 16px; }
.cnae-list li { margin: 4px 0; color: #e8f6ff; }
.cnae-list li::marker { color: var(--brand1); }

/* Form */
.cnpj-form { display: grid; gap: 10px; }
label { font-size: 13px; color: var(--muted); }
input[type="text"] {
  background: #0b1020;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
}
input[type="text"]:focus {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
button {
  background-image: linear-gradient(90deg, var(--brand1), var(--brand2));
  color: var(--primary-contrast);
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.2px;
}
button:disabled { opacity: 0.7; cursor: not-allowed; }

.result { margin-top: 18px; font-size: 14px; }
.result .error { color: var(--danger); }
.result .ok { color: var(--success); }
.actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

.link-btn {
  display: inline-block;
  text-decoration: none;
  background: #0b1020;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
}
.link-btn.primary {
  background-image: linear-gradient(90deg, var(--brand1), var(--brand2));
  border: none; color: #00131a; font-weight: 800;
}

/* Toasts */
.toast-container { position: fixed; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast {
  background: #0b1020; border: 1px solid rgba(255,255,255,0.1); color: var(--text);
  padding: 10px 14px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.25); min-width: 240px; transition: opacity .25s ease;
}
.toast.success { border-color: rgba(16,185,129,0.6); }
.toast.error { border-color: rgba(239,68,68,0.6); }
.toast.info { border-color: rgba(59,130,246,0.6); }

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "form"
      "lista";
  }
  .categories { max-height: none; }
}
@media (max-width: 480px) {
  .card { padding: 18px; }
}


/* Hero centered logo */
.site-header { display: none; }
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 4px auto 16px;
}
.hero .logo { width: 300px; height: auto; max-width: 80vw; }
.hero .brand-title { font-size: 24px; font-weight: 800; margin: 0; line-height: 1; }
.hero .brand-sub { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.1; }



/* Fitness dumbbells background canvas */
#fitness-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.container { position: relative; z-index: 1; }
