/* =====================================================
   CADASTRO.CSS
   Estilos para página de cadastro
   ===================================================== */

/* Container Principal */
.cadastro-container {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 20px;
}

.cadastro-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

.cadastro-header h1 {
  font-size: 36px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 12px 0;
}

.cadastro-header p {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

/* Seções do Formulário */
.form-section {
  margin-bottom: 32px;
}

.form-section-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3f4f6;
}

/* Grid de Campos */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid.cols-1 {
    grid-template-columns: 1fr;
  }
}

/* Campos do Formulário */
.form-field {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  margin-bottom: 8px;
}

.form-label.required::after {
  content: ' *';
  color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
  height: 48px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 15px;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
}

.form-textarea {
  height: 100px;
  padding: 12px 16px;
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #0ea65a;
  box-shadow: 0 0 0 3px rgba(14, 166, 90, 0.1);
}

.form-input:disabled,
.form-select:disabled {
  background: #f3f4f6;
  cursor: not-allowed;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-helper {
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
}

.form-error {
  font-size: 13px;
  color: #ef4444;
  margin-top: 6px;
}

/* Botão de Cadastrar */
.btn-cadastrar {
  width: 100%;
  height: 56px;
  background: #0ea65a;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 32px;
  font-family: inherit;
}

.btn-cadastrar:hover:not(:disabled) {
  background: #0d9551;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 166, 90, 0.3);
}

.btn-cadastrar:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* Alertas */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  display: none;
  line-height: 1.5;
}

.alert.show {
  display: block;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

/* Link de Login */
.login-link {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 14px;
}

.login-link a {
  color: #0ea65a;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.login-link a:hover {
  text-decoration: underline;
}

/* Loading Spinner (opcional) */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* Responsividade para Mobile */
@media (max-width: 640px) {
  .cadastro-container {
    margin: 20px auto;
  }
  
  .cadastro-card {
    padding: 24px;
    border-radius: 16px;
  }
  
  .cadastro-header h1 {
    font-size: 28px;
  }
  
  .form-section-title {
    font-size: 18px;
  }
}
