/* Reset e Configurações Globais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #0b0f19;
  --card-bg: rgba(17, 25, 40, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --primary-hover: linear-gradient(135deg, #4f46e5, #7c3aed);
  --primary-color: #8b5cf6;
  --accent-color: #a78bfa;
  --error-color: #ef4444;
  --success-color: #10b981;
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Decorações do Background */
.background-decorations {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}

.circle-1 {
  width: 400px;
  height: 400px;
  background: #6366f1;
  top: -100px;
  right: -50px;
}

.circle-2 {
  width: 500px;
  height: 500px;
  background: #8b5cf6;
  bottom: -150px;
  left: -100px;
}

/* Container do App */
.container {
  width: 100%;
  max-width: 600px;
  padding: 20px;
  z-index: 10;
}

/* Card do Formulário (Glassmorphic) */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

/* Header */
.form-header {
  text-align: center;
  margin-bottom: 35px;
}

.logo-container {
  width: 60px;
  height: 60px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 16px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-color);
}

.form-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.form-header p {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 300;
}

/* Estrutura do Formulário */
.input-group {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 480px) {
  .input-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

input, select {
  font-family: var(--font-main);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all 0.25s ease-in-out;
}

input:focus, select:focus {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}

/* Erros de Validação */
.error-msg {
  color: var(--error-color);
  font-size: 12px;
  margin-top: 6px;
  display: none;
}

.input-group.invalid input,
.input-group.invalid select {
  border-color: var(--error-color);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.input-group.invalid .error-msg {
  display: block;
}

/* Select Dropdown custom styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
}

select option {
  background: #0f172a;
  color: var(--text-primary);
}

/* Botão de Envio */
.submit-btn {
  font-family: var(--font-main);
  width: 100%;
  background: var(--primary-gradient);
  border: none;
  border-radius: 14px;
  color: white;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
  margin-top: 10px;
}

.submit-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.45);
}

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

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Botão Loader */
.btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  position: absolute;
}

.submit-btn.btn-loading .btn-text {
  visibility: hidden;
  opacity: 0;
}

.submit-btn.btn-loading .btn-loader {
  display: block;
}

/* Cards de Sucesso e Erro */
.id-card-hidden {
  display: none !important;
}

.success-card, .error-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.4s ease-out forwards;
}

.success-icon, .error-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.success-icon {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.error-icon {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--error-color);
}

.success-icon svg, .error-icon svg {
  width: 40px;
  height: 40px;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.success-card p, .error-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  max-width: 320px;
  margin-bottom: 32px;
}

.reset-btn {
  font-family: var(--font-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.reset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

.error-reset {
  background: var(--error-color);
  border: none;
  color: white;
}

.error-reset:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Animações */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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