/* =============================================
   AUTOFLOW — cadastro.css
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface2: #1a1a24;
  --accent: #00e5a0;
  --accent2: #7c5cfc;
  --accent3: #ff6b35;
  --text: #f0f0f8;
  --muted: #7a7a96;
  --border: rgba(255,255,255,0.07);
  --error: #ff6b6b;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ── LADO ESQUERDO ── */
.left-panel {
  background: linear-gradient(145deg, #0d0d18 0%, #111128 100%);
  border-right: 1px solid var(--border);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.left-panel::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,252,0.12) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}

.left-panel::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,160,0.08) 0%, transparent 70%);
  bottom: 60px; left: 40px;
  pointer-events: none;
}

.panel-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 24px;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}
.panel-logo span { color: var(--accent); }

.panel-content { position: relative; z-index: 1; }

.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,229,160,0.1);
  border: 1px solid rgba(0,229,160,0.25);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.panel-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.5); }
}

.panel-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
}

.panel-title .grad {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.panel-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
  max-width: 340px;
  margin-bottom: 48px;
}

.panel-features { display: flex; flex-direction: column; gap: 16px; }

.panel-feat {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
}

.feat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.panel-footer {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: var(--muted);
}

/* ── LADO DIREITO ── */
.right-panel {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.form-header { margin-bottom: 40px; }

.form-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 8px;
}

.form-header p { font-size: 15px; color: var(--muted); }
.form-header p a { color: var(--accent); text-decoration: none; font-weight: 500; }
.form-header p a:hover { text-decoration: underline; }

/* STEPS INDICATOR */
.steps-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 36px;
}

.step-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.step-dot.active { color: var(--accent); }
.step-dot.done   { color: var(--accent); }

.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 12px; font-weight: 700;
  transition: all 0.3s;
  flex-shrink: 0;
}

.step-dot.active .step-circle {
  border-color: var(--accent);
  background: rgba(0,229,160,0.1);
  color: var(--accent);
}

.step-dot.done .step-circle {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0a0f;
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 8px;
}

/* FORM */
.auth-form { display: flex; flex-direction: column; }

.step-form {
  display: none;
  flex-direction: column;
  gap: 18px;
  animation: fadeUp 0.3s ease;
}
.step-form.active { display: flex; }

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

.field { display: flex; flex-direction: column; gap: 7px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

input, select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

input::placeholder { color: var(--muted); }

input:focus, select:focus {
  border-color: rgba(0,229,160,0.4);
  box-shadow: 0 0 0 3px rgba(0,229,160,0.07);
}

input.error {
  border-color: rgba(255,107,107,0.5);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.07);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7a96' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
select option { background: var(--surface2); }

.field-error {
  font-size: 12px;
  color: var(--error);
  min-height: 16px;
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }

.toggle-pass {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}
.toggle-pass:hover { color: var(--text); }

.strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.strength-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--surface2);
  transition: background 0.3s;
}

.strength-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}

.terms input[type="checkbox"] {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}

.terms a { color: var(--accent); text-decoration: none; }

.btn-full {
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  letter-spacing: -0.3px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-full:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,229,160,0.25);
}
.btn-full:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-top: 8px;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.15); color: var(--text); }

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.btn-row .btn-outline { margin-top: 0; }
.btn-row .btn-full    { margin-top: 0; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(10,10,15,0.3);
  border-top-color: #0a0a0f;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* TOAST */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(0,229,160,0.3); }
.toast.error   { border-color: rgba(255,107,107,0.3); }

/* RESPONSIVE */
@media (max-width: 768px) {
  body { grid-template-columns: 1fr; }
  .left-panel { display: none; }
  .right-panel { padding: 40px 24px; max-width: 100%; }
  .field-row { grid-template-columns: 1fr; }
}
