* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
  min-height: 100vh;
  background: #f5f6fa;
}

.login-container {
  display: flex;
  min-height: 100vh;
}

/* =========================
   LADO ESQUERDO
========================= */
.login-left {
  width: 45%;
  background: #ffffff;
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-left h1 {
  font-size: 36px;
  margin-bottom: 40px;
  color: #111827;
}

.input-group {
  margin-bottom: 25px;
}

.input-group label {
  display: block;
  font-size: 14px;
  color: #374151;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 15px;
}

.input-wrapper i:first-child {
  left: 14px;
}

.input-wrapper .toggle-password {
  right: 14px;
  cursor: pointer;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 42px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 15px;
  outline: none;
}

.input-wrapper input:focus {
  border-color: #6366f1;
}

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 14px;
  gap: 10px;
}

.remember {
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.forgot {
  text-decoration: none;
  color: #6366f1;
  white-space: nowrap;
}

.btn-login {
  width: 100%;
  padding: 15px;
  background: #6366f1;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-login:hover {
  background: #4f46e5;
}

.register {
  margin-top: 30px;
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

.register a {
  color: #6366f1;
  font-weight: 600;
  text-decoration: none;
}

/* =========================
   LADO DIREITO
========================= */
.login-right {
  width: 55%;
  background: #6366f1;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  text-align: center;
}

.login-right img {
  max-width: 420px;
  width: 100%;
  margin-bottom: 30px;
}

.slogan {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 15px;
  line-height: 1.4;
}

.credits {
  font-size: 12px;
  opacity: 0.7;
}

/* ===== TOASTS ===== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10020;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  --toast-duration: 4200ms;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 14px 14px 12px;
  border-radius: 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation:
    slideIn 0.22s ease,
    fadeOut 0.22s ease var(--toast-duration) forwards;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.toast.success {
  background: linear-gradient(135deg, #166534, #16a34a);
}

.toast.error {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.toast.warning {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #111827;
}

.toast.info {
  background: linear-gradient(135deg, #1e293b, #334155);
}

.toast.is-closing {
  opacity: 0;
  transform: translateX(24px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast-icon-wrap {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
}

.toast.warning .toast-icon-wrap {
  background: rgba(17, 24, 39, 0.12);
}

.toast-icon {
  font-size: 15px;
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.toast-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.toast-message {
  line-height: 1.4;
  word-break: break-word;
}

.toast-close {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.88;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.toast.warning .toast-close:hover {
  background: rgba(17, 24, 39, 0.1);
}

.btn.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: currentColor;
  animation: tfs-spin 0.7s linear infinite;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(32px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(32px);
  }
}

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

/* ==================================================
   RESPONSIVIDADE
================================================== */

/* Tablets grandes */
@media (max-width: 1200px) {
  .login-left {
    padding: 60px 40px;
  }

  .login-left h1 {
    font-size: 32px;
  }
}

/* Tablets */
@media (max-width: 992px) {
  .login-container {
    flex-direction: column;
  }

  .login-left {
    width: 100%;
    min-height: 100vh;
    padding: 60px 40px;
  }

  .login-right {
    display: none;
  }
}

/* Smartphones grandes */
@media (max-width: 600px) {
  .login-left {
    padding: 50px 24px;
  }

  .login-left h1 {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .options {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .btn-login {
    padding: 14px;
    font-size: 15px;
  }
}

/* Smartphones pequenos */
@media (max-width: 380px) {
  .login-left {
    padding: 40px 18px;
  }

  .login-left h1 {
    font-size: 24px;
  }

  .input-wrapper input {
    font-size: 14px;
    padding: 12px 38px;
  }

  .btn-login {
    font-size: 14px;
    padding: 13px;
  }
}
