:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --primary: #3b82f6;
  --border: #e5e7eb;
  --shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #60a5fa;
  --border: #1f2937;
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Arial;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  width: 100%;
}

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  /* Use dvh for better mobile support */
  padding: 20px;
}

.login-card {
  background: transparent;
  padding: 0 20px;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-header {
  text-align: center;
}

.login-header h1 {
  font-size: 26px;
  margin-bottom: 6px;
  font-weight: 700;
}

.login-header p {
  color: var(--muted);
  font-size: 14px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-weight: 500;
  font-size: 14px;
}

.input-field {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.input-field>span.material-symbols-rounded {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 20px;
}

.input-field input {
  display: block;
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease;
  box-sizing: border-box;
}

.input-field input:focus {
  border-color: var(--primary);
}

.actions { margin-top: 5px;
  display: flex;
  justify-content: flex-end;
}

.actions a.forgot {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

/* BOTÕES FULL WIDTH e ALINHADOS */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: 15px;
  margin-top: 10px;
  box-sizing: border-box;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  transition: background .2s, transform .1s;
}

.btn.primary:hover {
  background: #2563eb;
  transform: scale(1.02);
}

.btn.google {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background .2s, transform .1s;
}

.btn.google:hover {
  background: var(--bg);
  transform: scale(1.01);
}

.btn.google img {
  width: 20px;
  height: 20px;
}

.register {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.register a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

@media (max-width: 480px) {
  .login-card {
    max-width: 100%;
  }

  .input-field input {
    font-size: 14px;
  }

  .btn {
    font-size: 14px;
  }
}

/* Custom Toast Notification */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.custom-toast {
  background: rgba(255, 255, 255, 0.9);
  padding: 14px 24px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: auto;
  min-width: 300px;
  max-width: 90vw;
}

[data-theme="dark"] .custom-toast {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.custom-toast .icon {
  font-size: 24px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-toast .message {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.custom-toast.error .icon {
  color: #ef4444;
}

.custom-toast.hiding {
  animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

/* Password Toggle Config */
#password {
  padding-right: 44px;
  /* Space for the eye button */
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--primary);
}

.toggle-password span {
  font-size: 20px;
}