:root {
  --brand-blue: #0b5ed7;
  --brand-blue-700: #0a4fb6;
  --brand-blue-50: #ecf4ff;
  --brand-red: #e74c3c;
  --brand-red-600: #cc3f30;
  --text-main: #0f2238;
  --text-sub: #5b6b7f;
  --line: #d8e5f3;
  --bg-page: #f2f7fc;
  --focus-ring: rgba(11, 94, 215, 0.22);
  --shadow-soft: 0 20px 48px rgba(9, 30, 66, 0.12);
  --green: #0fa26d;
  --blue: #2b7de9;
  --orange: #ff7a1a;
}

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

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--text-main);
  background: linear-gradient(140deg, #002e5d, #002e5d, #2774ae);
}

.auth-page {
  min-height: 100vh;
  padding: 20px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-shell {
  width: 100%;
  max-width: 540px;
}

.auth-card {
  background: #fff;
  border: 1px solid #e6eef7;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 22px 16px;
  animation: enter-card 0.42s ease;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  margin-bottom: 14px;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand span {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.auth-title {
  margin: 0;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 800;
}

.auth-subtitle {
  margin: 8px 0 18px;
  text-align: center;
  color: var(--text-sub);
  font-size: 0.95rem;
}

.form-label {
  font-size: 0.9rem;
  color: #36526e;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-control {
  border-radius: 12px;
  border: 1px solid var(--line);
  min-height: 46px;
  font-size: 0.96rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-control::placeholder {
  color: #9fb1c4;
}

.form-control:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.input-password-wrap {
  position: relative;
}

.btn-toggle-password {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  padding: 6px 12px;
  min-width: 52px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--brand-blue-50);
  color: var(--brand-blue);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.btn-toggle-password:hover {
  background: #dfeeff;
}

.btn-toggle-password:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.input-error {
  min-height: 18px;
  display: block;
  margin-top: 6px;
  color: var(--brand-red);
  font-size: 0.82rem;
}

.row-meta {
  margin-top: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.form-check {
  margin: 0;
}

.form-check-input {
  border-color: #b7cadf;
}

.form-check-input:focus {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.form-check-label {
  font-size: 0.88rem;
  color: #3e5670;
}

.row-meta a {
  font-size: 0.93rem;
  color: var(--orange);
  text-decoration: none;
  font-weight: 700;
}

.row-meta a:hover {
  color: var(--orange);
  text-decoration: none;
}

.btn-auth {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.98rem;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 12px 24px rgba(15, 162, 109, 0.3);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.btn-auth:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgba(31, 123, 232, 0.26);
  filter: brightness(1.02);
}

.btn-auth:active:not(:disabled) {
  transform: translateY(0);
}

.btn-auth:focus-visible {
  outline: 3px solid rgba(231, 76, 60, 0.25);
  outline-offset: 2px;
}

.btn-auth:disabled {
  opacity: 0.75;
}

.status-message {
  margin-top: 12px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.auth-footer {
  margin-top: 14px;
  text-align: center;
  color: var(--text-sub);
  font-size: 0.93rem;
}

.auth-footer a {
  color: var(--orange);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: none;
}

.home-link {
  margin-top: 10px;
  font-size: 0.86rem;
}

.home-link a {
  color: #607a93;
  text-decoration: none;
}

/* .home-link a:hover {
  text-decoration: none;
} */

@media (min-width: 576px) {
  .auth-page {
    padding: 28px 18px;
  }

  .auth-card {
    padding: 28px 24px;
    border-radius: 22px;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }
}

@media (min-width: 768px) {
  .auth-shell {
    max-width: 620px;
  }

  .auth-card {
    padding: 34px 34px;
  }

  .auth-title {
    font-size: 1.75rem;
  }

  .auth-subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@keyframes enter-card {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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