/* =============================================
   AUTOFLOW — login.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;
  --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, #111128);
  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(0,229,160,0.1) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  pointer-events: none;
}

.left-panel::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,252,0.12) 0%, transparent 70%);
  top: 100px; left: -60px;
  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-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 3vw, 50px);
  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;
}

.stats-row { display: flex; flex-direction: column; gap: 28px; }

.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -2px;
  line-height: 1;
}
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

.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: 480px;
  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; }

.auth-form { display: flex; flex-direction: column; gap: 18px; }

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

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

input {
  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 {
  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);
}

.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); }

.field-row-space {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}
.forgot-link:hover { color: var(--accent); }

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

.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;
  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; }

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-signup {
  display: block;
  text-align: center;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-signup:hover { border-color: rgba(255,255,255,0.15); color: var(--text); }

.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); } }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  transform: translateY(16px);
  transition: transform 0.3s;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal h3 {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.modal p { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }

.modal .field { margin-bottom: 0; }

.modal-btns { display: flex; gap: 10px; margin-top: 20px; }

.btn-cancel {
  flex: 1;
  padding: 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.btn-cancel:hover { border-color: rgba(255,255,255,0.15); color: var(--text); }

.btn-send {
  flex: 1;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #0a0a0f;
  font-family: 'Syne', sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-send:hover { box-shadow: 0 6px 20px rgba(0,229,160,0.2); }

/* 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%; }
}
