:root {
  --auth-blue: #1559dc;
  --auth-blue-hover: #0f4fc9;
  --auth-text: #17191d;
  --auth-muted: #565d6d;
  --auth-border: #c9cfdd;
  --auth-field: #f1f3f7;
  --auth-page: #f6f7f9;
}

.auth-body { background: var(--auth-page); }

.auth-main {
  display: grid;
  min-height: 100vh;
  padding: 48px 24px 32px;
  place-items: center;
}

.auth-shell {
  width: 100%;
  max-width: 670px;
  min-width: 0;
}

.auth-shell,
.auth-shell * {
  box-sizing: border-box;
}

.auth-card {
  width: 100%;
  min-width: 0;
  padding: 58px 56px 52px;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(27, 47, 87, 0.08);
}

.auth-heading { margin-bottom: 43px; }

.auth-heading h1 {
  margin: 0 0 12px;
  color: var(--auth-text);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.12;
}

.auth-heading p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 20px;
  line-height: 1.5;
}

.auth-message {
  margin: -17px 0 28px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.45;
}

.auth-message-error { border-color: #fecaca; background: #fff1f2; color: #a51d2d; }
.auth-message-warning { border-color: #fde68a; background: #fffbeb; color: #854d0e; }

.auth-form { display: grid; gap: 31px; }

.auth-field label {
  display: block;
  margin: 0 0 11px 5px;
  color: #4b5060;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: uppercase;
}

.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.auth-label-row a {
  color: var(--auth-blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.auth-label-row a:hover { text-decoration: underline; }

.auth-help {
  margin: -24px 0 30px;
  color: var(--auth-muted);
  font-size: 16px;
  line-height: 1.6;
}

.auth-field-errors {
  margin: 9px 0 0;
  padding: 0;
  color: #a51d2d;
  font-size: 14px;
  list-style: none;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  color: var(--auth-blue);
  font-weight: 700;
  text-decoration: none;
}

.auth-back:hover { text-decoration: underline; }

.auth-status-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: #e8f7ef;
  color: #138654;
  font-size: 28px;
  place-items: center;
}

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

.auth-input-wrap input {
  display: block;
  width: 100%;
  height: 70px;
  padding: 0 64px 0 22px;
  border: 0;
  border-bottom: 2px solid var(--auth-border);
  border-radius: 8px 8px 0 0;
  outline: 0;
  background: var(--auth-field);
  color: var(--auth-text);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-input-wrap input::placeholder { color: #c5cad7; opacity: 1; }
.auth-input-wrap input:hover { background: #eceff4; }
.auth-input-wrap input:focus { border-color: var(--auth-blue); background: #f4f6fa; box-shadow: 0 3px 0 rgba(21, 89, 220, 0.1); }

.auth-input-icon {
  position: absolute;
  top: 50%;
  right: 23px;
  width: 27px;
  height: 27px;
  color: #bdc5d7;
  pointer-events: none;
  transform: translateY(-50%);
}

.auth-input-wrap input:focus + .auth-input-icon { color: var(--auth-blue); }

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  margin-top: 2px;
  padding: 0 28px;
  border: 0;
  border-radius: 8px;
  background: var(--auth-blue);
  box-shadow: 0 10px 22px rgba(21, 89, 220, 0.2);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 21px;
  font-weight: 700;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.auth-submit svg { width: 28px; height: 28px; margin-left: 14px; }
.auth-submit:hover { background: var(--auth-blue-hover); box-shadow: 0 12px 26px rgba(21, 89, 220, 0.25); transform: translateY(-1px); }
.auth-submit:focus-visible { outline: 3px solid rgba(21, 89, 220, 0.28); outline-offset: 3px; }
.auth-submit:active { box-shadow: 0 6px 14px rgba(21, 89, 220, 0.2); transform: translateY(0); }

.auth-register {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 55px;
  padding-top: 43px;
  border-top: 1px solid #e9ebef;
  color: #474d5c;
  font-size: 18px;
}

.auth-register a { color: var(--auth-blue); font-weight: 700; text-decoration: none; }
.auth-register a:hover { text-decoration: underline; }

.auth-trust {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 44px auto 0;
  padding: 14px 26px;
  border-radius: 999px;
  background: #eceff2;
  color: #4e5361;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.auth-trust svg { flex: 0 0 auto; width: 25px; height: 25px; color: var(--auth-blue); }

.auth-trust span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .auth-main { align-items: start; padding: 24px 14px; }
  .auth-card { padding: 38px 22px 32px; }
  .auth-heading { margin-bottom: 34px; }
  .auth-heading h1 { font-size: 32px; }
  .auth-heading p { font-size: 17px; }
  .auth-form { gap: 25px; }
  .auth-input-wrap input { height: 62px; padding-right: 54px; font-size: 17px; }
  .auth-input-icon { right: 18px; width: 24px; height: 24px; }
  .auth-submit { min-height: 64px; font-size: 18px; }
  .auth-register { flex-wrap: wrap; margin-top: 40px; padding-top: 32px; font-size: 16px; }
  .auth-label-row { align-items: flex-start; }
  .auth-label-row a { font-size: 13px; }
  .auth-trust { margin-top: 28px; padding: 12px 18px; border-radius: 8px; font-size: 11px; }
}

@media (max-width: 380px) {
  .auth-card { padding-right: 18px; padding-left: 18px; }
  .auth-heading h1 { font-size: 29px; }
  .auth-submit svg { width: 24px; height: 24px; margin-left: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-input-wrap input, .auth-submit { transition: none; }
}
