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

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #ffffff;
  color: #171717;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== LAYOUT ===== */
.auth-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== LEFT PANEL (Branding) ===== */
.auth-brand {
  display: none;
  width: 52%;
  background: #f5f5f5;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

@media (min-width: 1024px) {
  .auth-brand {
    display: flex;
  }
}

.auth-brand .grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: radial-gradient(#171717 1px, transparent 1px);
  background-size: 24px 24px;
}

.brand-content {
  position: relative;
  z-index: 10;
  max-width: 480px;
  text-align: center;
}

/* Badge */
.brand-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  font-size: 14px;
  font-weight: 500;
  color: #171717;
  margin-bottom: 2rem;
}

/* Title */
.brand-title {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #171717;
}

.brand-title span {
  background: linear-gradient(135deg, #171717, #737373);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Checklist */
.brand-checklist {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.brand-checklist li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #737373;
  font-size: 15px;
}

.brand-checklist li svg {
  width: 20px;
  height: 20px;
  color: #171717;
  flex-shrink: 0;
}

/* Floating Cards */
.float-card {
  position: absolute;
  display: none;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid #e5e5e5;
}

@media (min-width: 1280px) {
  .float-card {
    display: flex;
  }
}

.float-card .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.avatar-primary { background: #171717; }
.avatar-emerald { background: #10b981; }
.avatar-amber { background: #f59e0b; }
.avatar-rose { background: #f43f5e; }

.float-card .info-name {
  font-size: 13px;
  font-weight: 600;
  color: #171717;
}

.float-card .info-role {
  font-size: 11px;
  color: #737373;
}

.fc-1 { top: 60px; left: 40px; }
.fc-2 { top: 48px; right: 40px; }
.fc-3 { bottom: 160px; left: 16px; }

/* Float Animations */
@keyframes floatUp1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes floatUp2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes floatUp3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.fc-anim-1 { animation: floatUp1 4s ease-in-out infinite; }
.fc-anim-2 { animation: floatUp2 5s ease-in-out infinite 0.5s; }
.fc-anim-3 { animation: floatUp3 4.5s ease-in-out infinite 1s; }

/* ===== RIGHT PANEL (Form) ===== */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

@media (min-width: 1024px) {
  .auth-form-panel {
    padding: 3rem;
  }
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards 0.1s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo & Header */
.auth-logo {
  font-size: 44px;
  font-weight: 800;
  color: #171717;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 42px;
}

.auth-subtitle {
  margin-top: 0.5rem;
  color: #737373;
  font-size: 1rem;
  text-align: center;
}

/* ===== FORM STYLES ===== */
.auth-form {
  margin-top: 2.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #171717;
  margin-bottom: 6px;
}

.form-group .input-wrap {
  position: relative;
}

.form-group input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  color: #171717;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
  color: #a3a3a3;
}

.form-group input:focus {
  border-color: #171717;
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}

.form-group input.input-error {
  border-color: #ef4444;
}

.form-group input.input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group .error-msg {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}

.form-group .error-msg.visible {
  display: block;
}

/* Password Toggle */
.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #a3a3a3;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: #171717;
}

.toggle-password svg {
  width: 20px;
  height: 20px;
}

.form-group input[type="password"],
.form-group input.has-toggle {
  padding-right: 48px;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: #171717;
  color: #fafafa;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding-bottom: 5px;
}

.btn-submit:hover {
  opacity: 0.9;
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-submit svg {
  width: 17px;
  height: 16px;
  position: relative;
  top: 3px;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(250,250,250,0.3);
  border-top-color: #fafafa;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}

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

/* Links */
.auth-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 14px;
  color: #737373;
}

.auth-links a {
  color: #171717;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 4px;
}

.auth-links a:hover {
  text-decoration: underline;
}

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 13px;
  color: #737373;
  text-decoration: none;
}

.forgot-link:hover {
  color: #171717;
  text-decoration: underline;
}

/* ===== MODAL (Esqueceu Senha) ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #171717;
  margin-bottom: 0.5rem;
}

.modal-box p {
  font-size: 14px;
  color: #737373;
  margin-bottom: 1.5rem;
}

.modal-box .form-group {
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
}

.modal-actions .btn-cancel {
  flex: 1;
  height: 44px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  color: #171717;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-actions .btn-cancel:hover {
  background: #f5f5f5;
}

.modal-actions .btn-send {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #171717;
  color: #fafafa;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
}

.modal-actions .btn-send:hover {
  opacity: 0.9;
}

/* ===== PASSWORD STRENGTH ===== */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #e5e5e5;
  transition: background 0.3s;
}

.strength-bar.weak { background: #ef4444; }
.strength-bar.medium { background: #f59e0b; }
.strength-bar.strong { background: #10b981; }

.strength-label {
  font-size: 11px;
  margin-top: 4px;
  color: #a3a3a3;
}

.strength-label.weak { color: #ef4444; }
.strength-label.medium { color: #f59e0b; }
.strength-label.strong { color: #10b981; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #171717;
  color: #fafafa;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.4s;
  z-index: 2000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}
