:root {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f1b41;
  background-color: #f6fbff;
  line-height: 1.5;
  font-weight: 400;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #e7f0ff, #f6fbff 45%, #d8e6ff);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Elementos decorativos inspirados na logo */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(29, 91, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(10, 44, 107, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

/* Header */
.header {
  background: #ffffff;
  border-bottom: 1px solid rgba(5, 34, 85, 0.08);
  box-shadow: 0 2px 20px rgba(13, 35, 66, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  overflow: visible;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  overflow: visible;
  position: relative;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  margin: 0;
  padding: 0.25rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border-radius: 8px;
}

.logo:hover {
  transform: scale(1.02);
  background: rgba(29, 91, 255, 0.05);
}

.logo:hover .logo-brain {
  transform: scale(1.05);
}

.logo:active {
  transform: scale(0.98);
}

.logo-icon {
  width: 80px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  overflow: visible;
  position: relative;
  padding: 0;
  margin: 0;
}

.logo-brain {
  height: 60px;
  width: auto;
  min-width: 500px;
  object-fit: contain;
  object-position: left center;
  display: block;
  margin: 0;
  padding: 0;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.logo-underline {
  display: block;
  height: 2px;
  background: #0a2c6b;
  width: 100%;
  margin-top: 0.1rem;
}

.logo-main {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.logo-gray {
  color: #6b7280;
}

.logo-blue {
  color: #0a2c6b;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: #6b7280;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Menu de navegação */
.nav-menu {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-link {
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  color: #415b91;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #0a2c6b;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.nav-link:hover {
  color: #0a2c6b;
  background: #f0f5ff;
  transform: translateY(-1px);
}

.nav-link:hover::after {
  width: 60%;
}

.nav-link.active {
  color: #0a2c6b;
  background: #ecf2ff;
  font-weight: 600;
}

.nav-link.active::after {
  width: 60%;
}

/* Ajuste do container principal */
main.container {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  margin: 3rem auto;
  padding: 0 2rem;
}

.card {
  background: #ffffff;
  border-radius: 26px;
  padding: 2.75rem;
  box-shadow: 0 30px 80px rgba(13, 35, 66, 0.15);
  text-align: center;
  border: 1px solid rgba(5, 34, 85, 0.06);
  animation: cardFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 100px rgba(13, 35, 66, 0.2);
}

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

h1 {
  margin-top: 0;
  font-size: 1.9rem;
  color: #061234;
}

.subtitle {
  color: #415b91;
  margin-bottom: 2rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}

label {
  font-size: 0.92rem;
  color: #061234;
  font-weight: 600;
}

input {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid #cfdff7;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f8fbff;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

input:hover {
  border-color: #a8c5ff;
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29, 91, 255, 0.08);
}

input:focus {
  outline: none;
  border-color: #1d5bff;
  box-shadow: 0 0 0 4px rgba(29, 91, 255, 0.18), 0 4px 16px rgba(29, 91, 255, 0.12);
  background: #fff;
  transform: translateY(-2px);
}

input:active {
  transform: translateY(0);
}

.helper-text {
  font-size: 0.85rem;
  color: #4a6599;
  margin: 0.5rem 0 1.1rem;
}

button,
.link-button {
  border: none;
  border-radius: 14px;
  background: linear-gradient(120deg, #0f67ff, #0a2c6b);
  color: #ffffff;
  padding: 1rem 1.35rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
}

button::before,
.link-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before,
.link-button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover,
.link-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 35px rgba(12, 74, 184, 0.35), 0 8px 16px rgba(12, 74, 184, 0.2);
}

button:active,
.link-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 8px 16px rgba(12, 74, 184, 0.25);
}

button:focus,
.link-button:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(29, 91, 255, 0.3), 0 18px 35px rgba(12, 74, 184, 0.35);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

button:disabled:hover {
  transform: none;
  box-shadow: none;
}

.validation-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #e2e9fb;
  border-top-color: #0f67ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transition: transform 0.3s;
}

.spinner:hover {
  transform: scale(1.1);
}

.data-preview {
  background: linear-gradient(145deg, #f6faff, #ecf2ff);
  border-radius: 16px;
  padding: 1.2rem;
  text-align: left;
  font-size: 0.95rem;
  color: #061234;
  border: 1px solid #d6e3ff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-preview:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(29, 91, 255, 0.15);
  border-color: #1d5bff;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.secondary {
  background: #ecf2ff;
  color: #0f1b41;
  box-shadow: none;
  margin-top: 1.5rem;
  border: 2px solid transparent;
}

.secondary:hover {
  background: #d6e3ff;
  border-color: #1d5bff;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(29, 91, 255, 0.2);
}

.secondary:active {
  transform: translateY(0) scale(0.98);
}

.error {
  color: #c62828;
}

.error-message {
  color: #c62828;
  font-weight: 500;
}

.success {
  color: #0f7b4e;
}

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

/* Responsividade - Tablets */
@media (max-width: 1024px) {
  .header-content {
    padding: 1rem 1.5rem;
  }

  main.container {
    margin: 2.5rem auto;
    padding: 0 1.5rem;
  }

  .card {
    padding: 2.5rem 2rem;
  }
}

/* Responsividade - Tablets pequenos e smartphones grandes */
@media (max-width: 768px) {
  body {
    padding: 0;
  }

  .header-content {
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  .logo {
    width: 100%;
    justify-content: center;
    order: 1;
    gap: 0.5rem;
  }

  .logo-icon {
    width: 50px;
    height: 50px;
  }

  .logo-brain {
    height: 50px;
    min-width: 400px;
  }

  .logo-main {
    font-size: 1.1rem;
  }

  .logo-subtitle {
    font-size: 0.65rem;
  }

  .nav-menu {
    width: 100%;
    justify-content: center;
    order: 2;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .nav-link {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
  }

  main.container {
    margin: 2rem auto;
    padding: 0 1rem;
    width: min(100%, 500px);
  }

  .card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  input {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
  }

  button,
  .link-button {
    padding: 0.9rem 1.2rem;
    font-size: 0.95rem;
  }

  .data-preview {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .validation-status {
    flex-direction: column;
    gap: 0.75rem;
  }

  .spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
  }
}

/* Responsividade - Smartphones */
@media (max-width: 480px) {
  .header-content {
    padding: 0.9rem 1rem;
    gap: 0.75rem;
    justify-content: center;
    flex-direction: column;
  }

  .logo {
    gap: 0.4rem;
    width: 100%;
    justify-content: center;
    order: 1;
  }

  .logo-icon {
    width: 45px;
    height: 45px;
  }

  .logo-brain {
    height: 45px;
    min-width: 350px;
  }

  .logo-main {
    font-size: 0.95rem;
  }

  .logo-subtitle {
    font-size: 0.6rem;
  }

  .nav-menu {
    gap: 0.25rem;
    order: 2;
    width: 100%;
    justify-content: center;
  }

  .nav-link {
    padding: 0.45rem 0.7rem;
    font-size: 0.75rem;
  }

  main.container {
    margin: 1.5rem auto;
    padding: 0 0.75rem;
  }

  .card {
    padding: 1.5rem 1.25rem;
    border-radius: 18px;
  }

  h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
  }

  .subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }

  form {
    gap: 0.75rem;
  }

  label {
    font-size: 0.85rem;
  }

  input {
    padding: 0.85rem 0.9rem;
    font-size: 0.9rem;
    border-radius: 12px;
  }

  .helper-text {
    font-size: 0.8rem;
    margin: 0.4rem 0 1rem;
  }

  button,
  .link-button {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    border-radius: 12px;
    width: 100%;
  }

  .data-preview {
    padding: 0.9rem;
    font-size: 0.85rem;
    border-radius: 12px;
  }

  .validation-status {
    gap: 0.5rem;
  }

  .validation-status p {
    font-size: 0.9rem;
  }

  .spinner {
    width: 36px;
    height: 36px;
    border-width: 3px;
  }

  .secondary {
    margin-top: 1.25rem;
  }
}

/* Responsividade - Smartphones muito pequenos */
@media (max-width: 360px) {
  .header-content {
    padding: 0.75rem 0.75rem;
  }

  .logo-main {
    font-size: 0.85rem;
  }

  .logo-subtitle {
    font-size: 0.55rem;
  }

  .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
  }

  .card {
    padding: 1.25rem 1rem;
  }

  h1 {
    font-size: 1.25rem;
  }

  .subtitle {
    font-size: 0.8rem;
  }

  input {
    padding: 0.75rem 0.8rem;
    font-size: 0.85rem;
  }

  button,
  .link-button {
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
  }
}

