:root {
  --bg: #f4f8ff;
  --card: #ffffff;
  --accent: #2f6fdd;
  --accent-dark: #1f4db4;
  --text: #1b2438;
  --muted: #65718a;
  --border: rgba(31, 77, 180, 0.12);
  --shadow: 0 18px 45px rgba(25, 57, 107, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background: linear-gradient(-45deg, #f8f9fa, #e9ecef, #dee2e6, #ced4da);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

.page-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: min(520px, 100%);
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 36px;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out 0.25s forwards;
}

.logo-container {
  text-align: center;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDown 0.8s ease-out forwards;
}

.logo-img {
  width: min(240px, 62%);
  height: auto;
  object-fit: contain;
  animation: pulse 3s ease-in-out infinite;
}

.login-card h1 {
  text-align: center;
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 26px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--muted);
}

input[type='text'],
input[type='password'] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(101, 113, 138, 0.24);
  border-radius: 14px;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type='text']:focus,
input[type='password']:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(47, 111, 221, 0.15);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(47, 111, 221, 0.35);
}

.login-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.remember input[type='checkbox'] {
  width: 16px;
  height: 16px;
}

.login-meta a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.login-meta a:hover {
  color: var(--accent-dark);
}

button[type='submit'] {
  width: 100%;
  padding: 15px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

button[type='submit']:hover {
  background: var(--accent-dark);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@media (max-width: 520px) {
  .login-card {
    padding: 28px 20px;
  }

  .logo-img {
    width: min(200px, 72%);
  }

  .login-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
