/* Layout elegante para a página de login
   Usa variáveis CSS para manter as cores do projeto caso já existam.
   Troque valores de fallback (--primary, --bg, etc.) conforme necessário. */

:root {
  --primary: #0d6efd;
  --primary-dark: #0b5ed7;
  --success: #28a745;
  --error: #dc3545;
  --card-bg: rgba(255,255,255,0.98);
  --muted: #6c757d;
  --text: #0b1720;
  --border: rgba(11,23,32,0.12);
  --shadow: 0 10px 40px rgba(12, 24, 40, 0.12);
  --input-focus: rgba(13,110,253,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background-image: url('./img/background.jpeg');
  background-size: cover;
  background-position: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  padding: 20px;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.25));
  z-index: 0;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 200px;
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
}

.brand-icon {
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 0px;
}

.signup-container {
  width: 100%;
  max-width: 900px;
  background: var(--card-bg);
  border-radius: 0px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(6px) saturate(120%);
}

.header {
  background: transparent;
  color: var(--text);
  padding: 30px 40px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.header p {
  color: var(--muted);
  font-size: 15px;
}

.form-content {
  padding: 40px;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e9ecef;
  z-index: 0;
}

.progress-line {
  position: absolute;
  top: 20px;
  left: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
  z-index: 1;
}

.step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.1);
}

.step.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.form-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.required {
  color: var(--error);
}

input {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s ease;
  background: white;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--input-focus);
}

input.error {
  border-color: var(--error);
}

input.success {
  border-color: var(--success);
}

.error-message {
  font-size: 12px;
  color: var(--error);
  margin-top: 4px;
  display: none;
}

.error-message.show {
  display: block;
}

.password-strength {
  height: 4px;
  background: #e9ecef;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
}

.strength-weak { background: var(--error); width: 33%; }
.strength-medium { background: #ffc107; width: 66%; }
.strength-strong { background: var(--success); width: 100%; }

.password-toggle {
  position: relative;
}

.password-toggle input {
  padding-right: 45px;
}

.toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  padding: 4px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(13,110,253,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13,110,253,0.4);
}

.btn-secondary {
  background: #f8f9fa;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: #e9ecef;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.footer-link {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.footer-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-link a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .form-content { padding: 24px; }
  .header { padding: 30px 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .step-label { font-size: 10px; }
}