.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 32px;
}

.login-card {
  display: flex;
  width: 100%;
  max-width: 900px;
  min-height: 520px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: login-card-in 0.4s ease-out;
}

.login-card__brand {
  flex: 0 0 45%;
  width: 45%;
  background: linear-gradient(135deg, var(--color-header-dark), var(--color-header) 60%, var(--color-header-light));
  color: #fff;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.login-card__form {
  flex: 1;
  padding: 48px 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.login-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@keyframes login-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .login-card { animation: none; }
}

.login-card__icon { display: flex; justify-content: center; margin-bottom: 20px; }
.login-card__brand .droplet-icon { background: rgba(255, 255, 255, 0.18); }
.login-card__brand h1 { font-size: 1.4rem; color: #fff; margin-bottom: 6px; }
.login-card__subtitle { color: rgba(255,255,255,0.85); font-size: 0.9rem; line-height: 1.5; max-width: 320px; }

.login-card__form h2 { font-size: 1.5rem; color: var(--color-navy); margin-bottom: 6px; text-align: left; }
.login-card__hint { color: var(--color-text-faint); font-size: 0.85rem; margin-bottom: 24px; text-align: left; }
.login-card__copyright { color: var(--color-text-faint); font-size: 0.74rem; padding-top: 20px; text-align: center; }

@media (max-width: 640px) {
  .login-main { padding: 0; }
  .login-card { flex-direction: column; border-radius: 0; min-height: 100vh; max-width: none; }
  .login-card__brand { width: 100%; padding: 28px; }
  .login-card__form { width: 100%; padding: 28px; }
}

.login-card__field { text-align: left; margin-bottom: 16px; }
.login-card__field label {
  display: block;
  font-size: 0.76rem; font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.login-card__input-wrap { position: relative; }

.login-card__form input {
  width: 100%; padding: 12px 44px 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.9rem;
  outline: none;
}
.login-card__form input { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.login-card__form input:focus { border-color: var(--color-blue); box-shadow: 0 0 0 3px rgba(22, 119, 184, 0.15); }
.login-card__form input:focus ~ .login-card__field-icon { color: var(--color-blue); }
.login-card__form input::placeholder { color: var(--color-text-faint); }

/* Edge/IE inject their own built-in reveal-password icon once a password
   field has content, which would otherwise sit right on top of our custom
   eye-toggle button. */
.login-card__form input[type="password"]::-ms-reveal,
.login-card__form input[type="password"]::-ms-clear {
  display: none;
}

.login-card__field-icon {
  position: absolute; top: 50%; right: 16px; transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--color-text-faint);
  pointer-events: none;
}

.login-card__toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: transparent;
  color: var(--color-text-faint);
  cursor: pointer;
}
.login-card__toggle:hover { background: #f1f5f9; color: var(--color-text); }
.login-card__toggle svg { width: 18px; height: 18px; }

.login-card__submit {
  width: 100%; padding: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--color-navy-dark);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.9rem; font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.login-card__submit:hover { background: var(--color-navy); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.login-card__submit:active { transform: translateY(0); }
.login-card__submit svg { width: 17px; height: 17px; }

.toast {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 1000;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100% - 40px);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.84rem; font-weight: 600;
  animation: toast-in 0.3s ease-out;
}
.toast--error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.toast__icon { width: 20px; height: 20px; flex-shrink: 0; }
.toast__close {
  border: none; background: transparent; color: inherit;
  font-size: 1.1rem; line-height: 1; cursor: pointer;
  padding: 0 0 0 6px; opacity: 0.6;
}
.toast__close:hover { opacity: 1; }
.toast.is-leaving { animation: toast-out 0.25s ease-in forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(30px); }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-leaving { animation: none; }
}
