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

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}

.shell { width: min(100%, 560px); }

.card {
  min-width: 0;
  background: #fff;
  border: 1px solid #d9e1ef;
  border-radius: 18px;
  box-shadow: 0 18px 48px #19213a18;
  padding: clamp(22px, 5vw, 32px);
}

h1 { margin: 4px 0 10px; font-size: clamp(1.65rem, 6vw, 2.2rem); line-height: 1.2; }
.eyebrow { color: #0b5fff; font-size: .85rem; font-weight: 700; letter-spacing: .08em; margin: 0; }
.muted { color: #5e6b85; line-height: 1.55; }

form { display: grid; gap: 17px; margin-top: 22px; }
label { display: grid; gap: 7px; font-weight: 650; min-width: 0; }

input, select, button {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  font: inherit;
}

input, select {
  border: 1px solid #aebbd1;
  padding: 0 12px;
  background: #fff;
}

input[type="file"] { padding: 9px 12px; }

button {
  border: 0;
  padding: 0 18px;
  background: #0b5fff;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:disabled { opacity: .6; cursor: wait; }
button.secondary { width: auto; background: #e7edf8; color: #21304d; }

.remember-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 24px;
  font-size: .95rem;
  font-weight: 600;
}

.remember-option input {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  accent-color: #0b5fff;
}

.form-note { margin: -8px 0 0; color: #5e6b85; font-size: .9rem; line-height: 1.5; }

.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.title-row > div { min-width: 0; }
.message { min-height: 1.4em; line-height: 1.5; color: #146c37; margin: 18px 0 0; overflow-wrap: anywhere; }
.message.error { color: #bf1f2f; }
progress { width: 100%; height: 12px; margin-top: 20px; }

@media (max-width: 600px) {
  :root { background: #fff; }

  body {
    display: block;
    padding: 0;
  }

  .shell { width: 100%; min-height: 100dvh; }

  .card {
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: max(24px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  }

  input, select, button { font-size: 16px; }
}

@media (max-width: 360px) {
  .card { padding-inline: 16px; }
  .title-row { align-items: center; }
  button.secondary { padding-inline: 14px; }
}
