.login {
  --red: #c1272d;
  --red-dark: #8f1c21;
  --black: #1a1a1a;
  --white: #ffffff;
  --card-bg: #f5f5f5;
  --field-bg: #ffffff;
  --text: #1a1a1a;
  --text-dim: #7a7a7a;
  --error: #c1272d;
  --radius: 20px;

  display: flex;
  justify-content: center;
  padding: 40px 16px;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
}

.login__card {
  width: 100%;
  max-width: 380px;
  padding: 44px 34px 36px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.login__brand {
  text-align: center;
  margin-bottom: 36px;
}

.login__title {
  position: relative;
  display: inline-block;
  margin: 0 0 14px;
  padding-bottom: 14px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--black);
  border-bottom: none;
}

.login__title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 36px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  transform: translateX(-50%);
}

.login__tagline {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.login__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.field__wrap {
  position: relative;
}

.field__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  fill: var(--text-dim);
  transition: fill 0.15s ease;
  pointer-events: none;
}

.field input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px 13px 42px;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--field-bg);
  border: 1.5px solid transparent;
  border-radius: 12px;
  outline: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.field input:focus {
  background: var(--white);
  border-color: var(--red);
}

.field input:focus ~ .field__icon,
.field__wrap:focus-within .field__icon {
  fill: var(--red);
}

.field--password input {
  padding-right: 42px;
}

.field__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 0;
}

.field__toggle:hover {
  color: var(--red);
}

.field__toggle .icon-eye {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.login__options {
  display: flex;
  justify-content: flex-end;
  font-size: 0.82rem;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8rem;
  transition:
    color 0.15s ease,
    gap 0.15s ease;
}

.link svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  transition: transform 0.15s ease;
}

.link:hover {
  color: var(--red);
  gap: 6px;
}

.link:hover svg {
  transform: translateX(2px);
}

.btn {
  margin-top: 8px;
  padding: 14px;
  border: none;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(193, 39, 45, 0.25);
  transition:
    background 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--red-dark);
  box-shadow: 0 12px 24px rgba(193, 39, 45, 0.3);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.login-error {
  margin: 8px 0;
  padding: 8px 12px;
  background: #fdecea;
  color: #b3261e;
  border: 1px solid #f5c2c0;
  border-radius: 6px;
  font-size: 0.9em;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.shake {
  animation: shake 0.3s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

@media (max-width: 420px) {
  .login__card {
    padding: 34px 24px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
