:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #edf2f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 16% 10%, rgba(56, 116, 255, 0.14), transparent 34%),
    radial-gradient(circle at 90% 90%, rgba(20, 184, 166, 0.12), transparent 30%),
    #edf2f8;
}

.card {
  width: min(100%, 480px);
  padding: 42px;
  border: 1px solid rgba(138, 154, 181, 0.25);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(32, 49, 78, 0.14);
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #245eea, #153aa8);
  box-shadow: 0 10px 26px rgba(36, 94, 234, 0.28);
}

.brand-mark span {
  width: 22px;
  height: 16px;
  border: 3px solid white;
  border-top: 0;
  border-radius: 2px 2px 8px 8px;
  position: relative;
}

.brand-mark span::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -12px;
  width: 10px;
  height: 10px;
  border: 3px solid white;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: #245eea;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #14203a;
  font-size: clamp(1.85rem, 6vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.intro {
  margin: 16px 0 30px;
  color: #5b667c;
  font-size: 0.96rem;
  line-height: 1.6;
}

form {
  display: grid;
  gap: 10px;
}

label {
  margin-top: 8px;
  color: #2f3a50;
  font-size: 0.88rem;
  font-weight: 680;
}

input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #cfd7e6;
  border-radius: 11px;
  outline: none;
  background: #fbfcfe;
  color: #172033;
  font: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input:focus {
  border-color: #3b6ff0;
  background: white;
  box-shadow: 0 0 0 4px rgba(59, 111, 240, 0.13);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 70px;
}

.toggle-button {
  position: absolute;
  top: 50%;
  right: 10px;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #245eea;
  font-weight: 700;
  transform: translateY(-50%);
  cursor: pointer;
}

.toggle-button:focus-visible,
.primary-button:focus-visible {
  outline: 3px solid rgba(59, 111, 240, 0.3);
  outline-offset: 2px;
}

.primary-button {
  display: flex;
  height: 52px;
  margin-top: 14px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f6af1, #1d4fc8);
  box-shadow: 0 10px 24px rgba(36, 94, 234, 0.24);
  color: white;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.primary-button:hover {
  filter: brightness(1.04);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.loading .spinner {
  display: inline-block;
}

.result {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 680;
  line-height: 1.45;
}

.result.success {
  border: 1px solid #a5e2c0;
  background: #edf9f2;
  color: #17653b;
}

.result.error {
  border: 1px solid #f1b7b7;
  background: #fff2f2;
  color: #a12b2b;
}

.privacy-note {
  display: flex;
  margin-top: 24px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #758096;
  font-size: 0.76rem;
}

.lock {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #e7f5ec;
  color: #238650;
  font-size: 0.72rem;
  font-weight: 800;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
  .card {
    padding: 30px 22px;
    border-radius: 20px;
  }
}

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

