/* Отклик — account access screens. Scoped: do not restyle the main application. */
#shell.locked main.auth-main {
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
}
.auth-frame {
  --auth-canvas: var(--ui-canvas);
  --auth-paper: var(--ui-surface);
  --auth-text: var(--ui-text);
  --auth-secondary: var(--ui-muted);
  --auth-muted: var(--ui-secondary);
  --auth-border: var(--ui-line-strong);
  --auth-accent: var(--ui-accent);
  --auth-accent-hover: var(--ui-accent-hover);
  --auth-accent-ink: var(--ui-on-accent);
  --auth-tint: var(--ui-tint);
  --auth-danger: var(--ui-danger);
  --auth-danger-bg: var(--ui-danger-bg);
  --auth-success: var(--ui-accent);
  --auth-success-bg: var(--ui-tint);
  min-height: 100dvh;
  background: var(--auth-canvas);
  color: var(--auth-text);
  padding: clamp(24px, 4vw, 66px);
  display: grid;
  align-content: center;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  width: min(1120px, 100%);
  min-height: 620px;
  margin-inline: auto;
  background: var(--auth-paper);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(24,29,52,.08);
}
:root[data-theme=dark] .auth-layout {box-shadow: 0 20px 80px #0002}
.auth-intro {
  min-width: 0;
  background: linear-gradient(150deg,#2e2b69 0%,#222348 64%,#1b203c 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: clamp(30px, 4vw, 56px);
}
.auth-intro-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  color: #fff;
  text-decoration: none;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1;
}
.auth-intro-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-right: 4px;
  background: #a8a1ff;
  border-radius: 11px;
  color: #211c59;
}
.auth-intro-symbol .icon {width: 22px;height: 22px}
.auth-intro-dot {color: #b8b1ff}
.auth-intro-body {
  margin-block: auto;
  padding-block: 64px 46px;
}
.auth-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #cdc9ff;
  margin-bottom: 22px;
  letter-spacing: .025em;
}
.auth-intro h2 {
  max-width: 14ch;
  font-size: clamp(28px, 3.1vw, 40px);
  line-height: 1.17;
  letter-spacing: -.052em;
  font-weight: 750;
}
.auth-intro p {
  color: #d6d7e8;
  max-width: 46ch;
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.75;
}
.auth-points {
  display: grid;
  gap: 0;
  margin-top: 35px;
  max-width: 430px;
  border-top: 1px solid rgba(255,255,255,.17);
}
.auth-points span {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 49px;
  border-bottom: 1px solid rgba(255,255,255,.17);
  font-size: 12px;
  color: #bab5f5;
  font-variant-numeric: tabular-nums;
}
.auth-points strong {
  color: #f4f4ff;
  font-size: 13px;
  font-weight: 570;
}
.auth-intro .auth-intro-foot {
  color: #bdc0dc;
  font-size: 12px;
  margin-top: 0;
}
.auth-card.card {
  width: 100%;
  max-width: none;
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: clamp(30px, 5.5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--auth-paper);
  color: var(--auth-text);
}
.auth-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 45px;
  margin-bottom: clamp(20px, 3vw, 35px);
}
.auth-card .auth-card-top .auth-brand {display: none}
.auth-theme-switch {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--auth-border);
  color: var(--auth-secondary);
  background: var(--auth-paper);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  padding: 0 12px;
  cursor: pointer;
}
.auth-theme-switch:hover {color: var(--auth-text);border-color: var(--auth-accent)}
.auth-theme-switch .icon {width: 17px;height: 17px}
.auth-card .page-head {margin-bottom: 28px}
.auth-card .page-head h1 {
  color: var(--auth-text);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 33px);
  line-height: 1.28;
  letter-spacing: -.048em;
  font-weight: 620;
}
.auth-card .page-head p {
  margin-top: 12px;
  max-width: 43ch;
  font-size: 14px;
  line-height: 1.65;
  color: var(--auth-secondary);
}
.auth-card .form-grid {
  grid-template-columns: minmax(0,1fr);
  gap: 16px;
}
.auth-card .auth-field {
  display: grid;
  gap: 7px;
}
.auth-card .auth-field > label {
  color: var(--auth-text);
  font-size: 14px;
  font-weight: 600;
}
.auth-card .auth-field > small {color: var(--auth-muted);font-size: 12px}
.auth-input-wrap {
  position: relative;
  display: flex;
  min-width: 0;
}
.auth-card .auth-field input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  background: var(--auth-paper);
  color: var(--auth-text);
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
}
.auth-card .auth-field input::placeholder {color: var(--auth-muted);opacity: .9}
.auth-card .auth-field input:focus {
  border-color: var(--auth-accent);
  outline: 2px solid var(--auth-accent);
  outline-offset: 1px;
}
.auth-card .auth-field input[type="password"],
.auth-card .auth-field input[name="password"][type="text"],
.auth-card .auth-field input[name="newPassword"][type="text"],
.auth-card .auth-field input[name="confirmPassword"][type="text"] {
  padding-right: 105px;
}
.auth-reveal {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  min-width: 76px;
  min-height: 38px;
  background: transparent;
  color: var(--auth-accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.auth-reveal:hover {background: var(--auth-tint)}
.auth-card .form-actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}
.auth-card .button {
  width: 100%;
  min-height: 50px;
  white-space: normal;
  border-radius: 8px;
  justify-content: center;
  font-size: 14px;
}
.auth-card .button.primary {
  background: var(--auth-accent);
  border-color: var(--auth-accent);
  color: var(--auth-accent-ink);
}
.auth-card .button.primary:hover {
  background: var(--auth-accent-hover);
  border-color: var(--auth-accent-hover);
  filter: none;
}
.auth-card .button.outline {
  border-color: var(--auth-border);
  color: var(--auth-text);
  background: var(--auth-paper);
}
.auth-card .button.outline:hover {background: var(--auth-tint)}
.auth-card .button.subtle {color: var(--auth-accent)}
.auth-switch {
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--auth-secondary);
}
.auth-switch a,
.auth-links a,
.auth-consent a,
.auth-legal a {color: var(--auth-accent)}
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 17px;
}
.auth-links a {font-size: 12px;font-weight: 620}
.auth-consent {margin-top: 3px}
.auth-consent .check {font-size: 13px;line-height: 1.6}
.auth-consent .check input {accent-color: var(--auth-accent)}
.auth-consent-note {
  margin: 5px 0 0 25px;
  color: var(--auth-secondary);
  font-size: 12px;
  line-height: 1.55;
}
.auth-card .notice {
  background: var(--auth-success-bg);
  border-color: var(--auth-success-bg);
  color: var(--auth-success);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 19px;
}
.auth-card .notice.bad {
  background: var(--auth-danger-bg);
  border-color: var(--auth-danger-bg);
  color: var(--auth-danger);
}
.auth-provider {
  position: relative;
  text-align: center;
  color: var(--auth-muted);
  font-size: 12px;
  margin: 26px 0 14px;
}
.auth-provider::before {
  position: absolute;
  content: "";
  z-index: 0;
  height: 1px;
  background: var(--auth-border);
  top: 50%;
  left: 0;
  right: 0;
}
.auth-provider span {
  position: relative;
  z-index: 1;
  background: var(--auth-paper);
  padding-inline: 14px;
}
.auth-card > button[data-v4-action="google"] {width: 100%}
.auth-mail {margin-top: 18px;font-size: 12px}
.auth-legal {
  margin-top: clamp(30px, 4vw, 54px);
  padding-top: 20px;
  border-top: 1px solid var(--auth-border);
}
.auth-legal .legal-links {margin: 0;gap: 11px 19px}
.auth-legal a {font-size: 12px;line-height: 1.6}
.auth-check-actions, .auth-empty {display: grid;gap: 12px}
.auth-card .auth-empty .button,
.auth-card .auth-check-actions .button {text-decoration: none}
.auth-card .auth-brand {
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--auth-text);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 21px;
  font-weight: 790;
  letter-spacing: -.055em;
}
.auth-card .auth-brand .brandmark {
  background: var(--auth-accent);
  color: var(--auth-accent-ink);
}
.auth-card .auth-brand .brandmark .icon {width: 20px;height: 20px}
.auth-card .auth-brand .auth-intro-dot {color: var(--auth-accent)}
@media (max-width: 960px) {
  .auth-frame {padding: clamp(22px,4vw,38px)}
  .auth-layout {grid-template-columns: minmax(0,1fr);max-width: 580px;min-height: 0}
  .auth-intro {display: none}
  .auth-card-top {justify-content: space-between}
  .auth-card .auth-card-top .auth-brand {display: flex}
  .auth-card.card {padding: clamp(25px,5vw,44px)}
}
@media (max-width: 520px) {
  .auth-frame {align-content: start;padding: 0;min-height: 100dvh}
  .auth-layout {
    width: 100%;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .auth-card.card {padding: 27px clamp(23px,5vw,32px) 32px;justify-content: flex-start}
  .auth-card-top {margin-bottom: 30px}
  .auth-card .page-head {margin-bottom: 25px}
  .auth-card .page-head h1 {font-size: clamp(23px,6.5vw,29px)}
  .auth-card .auth-field input {min-height: 52px;font-size: 16px}
  .auth-card .button {min-height: 52px;font-size: 14px}
  .auth-card .legal-links {gap: 7px 18px}
}
@media (max-width: 350px) {
  .auth-theme-switch span {display: none}
  .auth-theme-switch {width: 44px;padding: 0}
  .auth-links {flex-direction: column;align-items: flex-start}
}
@media (prefers-reduced-motion: reduce) {
  .auth-frame *, .auth-frame *::before, .auth-frame *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}


/* Focused sign-in / registration layout — same visual hierarchy on desktop and mobile. */
.auth-frame {
  padding: clamp(20px, 5vw, 64px) clamp(16px, 4vw, 36px);
  background: var(--auth-canvas);
}
.auth-layout {
  grid-template-columns: minmax(0, 1fr);
  max-width: 555px;
  min-height: 0;
  border-radius: 12px;
}
.auth-intro {display: none}
.auth-card .auth-card-top .auth-brand {display: flex}
.auth-card.card {padding: clamp(28px, 4vw, 44px)}
.auth-card-top {justify-content: space-between; margin-bottom: 26px}
.auth-card .page-head {margin-bottom: 23px}
.auth-card .page-head h1 {font-size: clamp(26px, 3vw, 31px)}
.auth-card .auth-legal {margin-top: 30px}
.auth-testlab-mail {
  margin-top: 24px;
  padding: clamp(16px, 3vw, 22px);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: var(--auth-tint);
}
.auth-testlab-label {
  color: var(--auth-accent);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 9px;
}
.auth-testlab-mail h2 {
  font-size: 17px;
  line-height: 1.35;
  color: var(--auth-text);
  letter-spacing: -.02em;
}
.auth-testlab-mail > p {
  margin: 10px 0 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--auth-secondary);
}
.auth-testlab-mail form .form-grid {gap: 12px}
.auth-testlab-mail .form-actions {margin-top: 14px}
.auth-testlab-mail .auth-field input {background: var(--auth-paper)}
@media (max-width: 520px) {
  .auth-frame {padding: 0;background: var(--auth-paper)}
  .auth-layout {max-width: none;border-radius: 0;box-shadow: none}
  .auth-card.card {padding: 27px clamp(23px, 5vw, 32px) 32px}
  .auth-card-top {margin-bottom: 24px}
  .auth-testlab-mail {padding: 18px 15px}
}

/* Fluid auth controls: fixed readable measure, never fixed viewport width. */
.auth-frame, .auth-layout, .auth-card.card, .auth-card .form-grid,
.auth-input-wrap { min-width: 0; }
.auth-card .page-head h1, .auth-card .page-head p { overflow-wrap: break-word; }
.auth-card .auth-field input, .auth-card .button { max-width: 100%; }
@media (min-width: 521px) {
  .auth-layout { width: min(100%, 555px); }
}
@media (max-width: 520px) {
  .auth-layout { width: 100%; }
  .auth-card.card { width: 100%; }
}

.auth-card .page-head h1{font-family:var(--ui-heading);font-size:32px;line-height:1.2;letter-spacing:-.035em}
.auth-card .page-head p{font-size:16px;line-height:1.6}
.auth-card .auth-switch,.auth-card .auth-consent .check,.auth-links a{font-size:14px}
.auth-brand .brandmark{background:var(--ui-accent);color:var(--ui-on-accent)}
.auth-intro-dot{color:var(--ui-accent)}
.auth-layout{border-color:var(--ui-line)}
.auth-card .auth-field input{background:var(--ui-inset);border-color:var(--ui-line-strong)}
@media(max-width:520px){.auth-card .page-head h1{font-size:28px}.auth-card.card{padding:28px 20px 36px}.auth-card .page-head p{font-size:15px}}
