:root {
  --brand-blue: #1f5fae;
  --brand-blue-dark: #154986;
  --text: #1e293b;
  --muted: #697386;
  --line: #d9e2ef;
  --card: rgba(255, 255, 255, 0.96);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.28)),
    url("assets/bg-auth3.png") center / cover fixed no-repeat;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 32px;
}

.login-stack {
  width: min(100%, 460px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.brand img {
  width: auto;
  height: 60px;
  display: block;
}

.welcome-card,
.signin-card {
  width: 100%;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.welcome-card {
  padding: 34px 38px;
  text-align: center;
  margin-bottom: 28px;
}

.welcome-card h1 {
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.15;
  font-weight: 700;
}

.welcome-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.welcome-card a {
  display: inline-block;
  margin-top: 8px;
  color: var(--brand-blue);
  font-weight: 700;
  text-decoration: none;
}

.welcome-card a:hover,
.welcome-card a:focus-visible,
.forgot-link:hover,
.forgot-link:focus-visible {
  text-decoration: underline;
}

.signin-card {
  padding: 34px 32px 30px;
}

.signin-card h2 {
  margin: 0 0 26px;
  text-align: center;
  font-size: 1rem;
  letter-spacing: 0;
  font-weight: 700;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(31, 95, 174, 0.15);
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #475569;
  font-size: 0.95rem;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-blue);
}

.login-button {
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--brand-blue);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(31, 95, 174, 0.22);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.login-button:hover,
.login-button:focus-visible {
  background: var(--brand-blue-dark);
  box-shadow: 0 12px 24px rgba(31, 95, 174, 0.28);
}

.login-button:active {
  transform: translateY(1px);
}

.forgot-link {
  margin-top: 18px;
  border: 0;
  background: transparent;
  color: #eef5ff;
  cursor: pointer;
  font-size: 0.95rem;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.5);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.52);
  z-index: 20;
}

.modal-backdrop[hidden] {
  display: none;
}

.popup-card {
  width: min(100%, 360px);
  background: #fff;
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
}

.popup-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.popup-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.popup-card button {
  min-width: 96px;
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 520px) {
  .page-shell {
    padding-top: 32px;
  }

  .welcome-card,
  .signin-card {
    padding-left: 24px;
    padding-right: 24px;
  }
}
