:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #697386;
  --border: #d9e0ea;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --focus: rgba(37, 99, 235, 0.22);
  --error: #c62828;
  --success: #0f7b55;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.16), transparent 32%),
    linear-gradient(135deg, #f8fbff 0%, var(--bg) 45%, #edf2f8 100%);
}

a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 400px);
  padding: 34px;
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(23, 32, 51, 0.14);
}

.brand-badge {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 14px;
  background: var(--primary);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

.intro-text {
  margin: 8px 0 26px;
  color: var(--muted);
  font-size: 15px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 7px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

label {
  font-size: 14px;
  font-weight: 700;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input::placeholder {
  color: #9aa4b2;
}

input[type="email"]:hover,
input[type="password"]:hover {
  border-color: #aeb9c9;
}

input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus);
}

input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.12);
}

.field-error {
  min-height: 18px;
  margin: 0;
  color: var(--error);
  font-size: 12px;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--muted);
  font-weight: 500;
}

.remember-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: background 150ms ease, box-shadow 150ms ease, transform 80ms ease;
}

.login-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

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

.login-button:focus-visible,
a:focus-visible,
.remember-row:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.form-status {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
}

.signup-copy {
  margin: 26px 0 0;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 480px) {
  .page-shell {
    align-items: start;
    padding: 18px;
  }

  .login-card {
    padding: 26px 20px;
    border-radius: 14px;
  }

  h1 {
    font-size: 26px;
  }
}
