:root {
  --auth-ink: #142438;
  --auth-muted: #526c81;
  --auth-canvas: #f5f7fa;
  --auth-line: #d3dfeb;
  --auth-blue: #1262c4;
  --auth-blue-dark: #0d4f9f;
  --auth-focus: rgba(18, 98, 196, .2);
  --auth-danger: #b42318;
  --auth-danger-bg: #fff4f2;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--auth-canvas); }
body.auth-page { min-width: 320px; min-height: 100vh; margin: 0; color: var(--auth-ink); background: var(--auth-canvas); font-family: "Manrope", "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }

.auth-header { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; max-width: 1260px; min-height: 94px; margin: 0 auto; padding: 20px 36px; }
.auth-brand { display: inline-flex; align-items: center; min-height: 42px; color: var(--auth-ink); font-family: "Urbanist", "Segoe UI", sans-serif; font-size: 1.56rem; font-weight: 700; letter-spacing: -.035em; text-decoration: none; }
.auth-brand__mark { width: 24px; height: 26px; margin-right: 8px; background: currentColor; clip-path: polygon(39% 0, 61% 0, 100% 100%, 69% 100%, 50% 48%, 30% 100%, 0 100%); }
.auth-brand__product { max-width: 130px; margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--auth-line); color: var(--auth-muted); font-family: "Manrope", "Segoe UI", sans-serif; font-size: .74rem; font-weight: 500; letter-spacing: 0; }
.auth-brand__product span { color: var(--auth-blue); }
.back-to-home { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 4px; color: #29445c; font-size: .88rem; font-weight: 700; text-decoration: none; transition: color 180ms ease, transform 180ms ease; }
.back-to-home:hover { color: var(--auth-blue); transform: translateX(-2px); }

.auth-container { position: relative; display: grid; min-height: calc(100vh - 94px); place-items: center; overflow: hidden; padding: 52px 24px 82px; isolation: isolate; }
.auth-container::before { position: absolute; z-index: -2; inset: 0; content: ""; background: linear-gradient(90deg, rgba(20, 36, 56, .045) 1px, transparent 1px) 0 0 / 96px 96px, linear-gradient(rgba(20, 36, 56, .035) 1px, transparent 1px) 0 0 / 96px 96px; mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 78%); }
.auth-card { position: relative; z-index: 1; width: min(100%, 494px); padding: 44px; border: 1px solid var(--auth-line); border-radius: 14px; background: rgba(255, 255, 255, .94); box-shadow: 0 22px 58px rgba(32, 61, 91, .11), 0 3px 9px rgba(32, 61, 91, .04); }
.auth-card__header { margin-bottom: 30px; }
.auth-card h1 { margin: 0; color: var(--auth-ink); font-family: "Urbanist", "Segoe UI", sans-serif; font-size: clamp(2rem, 4vw, 2.45rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.04; }
.auth-card__header p { max-width: 28rem; margin: 11px 0 0; color: var(--auth-muted); font-size: .96rem; line-height: 1.65; }
.auth-card form { margin: 0; }
.form-group { margin-bottom: 19px; }
.form-label { display: block; margin: 0 0 8px; color: #233e55; font-size: .82rem; font-weight: 800; }
.form-control { display: block; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #bdcddd; border-radius: 8px; outline: none; color: var(--auth-ink); background: #fff; box-shadow: inset 0 1px 1px rgba(20, 36, 56, .025); font: inherit; font-size: .94rem; transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease; }
.form-control::placeholder { color: #879bae; opacity: 1; }
.form-control:hover { border-color: #8fa8bf; }
.form-control:focus { border-color: var(--auth-blue); background: #fff; box-shadow: 0 0 0 4px var(--auth-focus); }
.form-control.input-validation-error { border-color: var(--auth-danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.btn-auth { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: 8px; padding: 12px 18px; border: 1px solid var(--auth-blue); border-radius: 8px; color: #fff; background: var(--auth-blue); box-shadow: 0 5px 13px rgba(18, 98, 196, .16); cursor: pointer; font: inherit; font-size: .9rem; font-weight: 800; transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.btn-auth:hover { border-color: var(--auth-blue-dark); background: var(--auth-blue-dark); box-shadow: 0 9px 18px rgba(18, 98, 196, .22); transform: translateY(-1px); }
.btn-auth:active { transform: translateY(0); }
.auth-link { margin-top: 24px; text-align: center; }
.auth-link p { margin: 0; color: var(--auth-muted); font-size: .88rem; }
.auth-link a { color: var(--auth-blue); font-weight: 800; text-underline-offset: 3px; }
.auth-link a:hover { color: var(--auth-blue-dark); }
.text-danger { display: block; margin-top: 7px; color: var(--auth-danger); font-size: .78rem; font-weight: 700; line-height: 1.42; }
.alert { margin: 0 0 19px; padding: 12px 14px; border-radius: 8px; font-size: .82rem; font-weight: 700; line-height: 1.5; }
.alert-danger { border: 1px solid #fecdc7; color: var(--auth-danger); background: var(--auth-danger-bg); }
.alert-success { border: 1px solid #b7e3ca; color: #176b43; background: #edf9f1; }
.validation-summary-valid, .alert:empty { display: none; }
.validation-summary-errors ul { margin: 0; padding-left: 1.2rem; }
.auth-card :focus-visible, .auth-header a:focus-visible { outline: 3px solid var(--auth-focus); outline-offset: 3px; }

.auth-art { position: absolute; z-index: -1; top: clamp(3%, 8vh, 13%); left: calc(50% + 245px); width: 365px; height: 388px; opacity: .8; pointer-events: none; transform: rotate(-8deg); }
.auth-art__shadow { position: absolute; right: 20px; bottom: 41px; width: 292px; height: 48px; border-radius: 50%; background: rgba(31, 72, 113, .13); filter: blur(20px); }
.auth-art__base, .auth-art__sheet { position: absolute; border: 1px solid #9ac7ec; border-radius: 13px; }
.auth-art__base { right: 12px; bottom: 67px; width: 310px; height: 208px; padding: 47px 34px; background: rgba(179, 222, 250, .42); box-shadow: 0 24px 30px rgba(27, 89, 141, .12); }
.auth-art__base::before, .auth-art__base::after { position: absolute; content: ""; border: 1px solid rgba(18, 98, 196, .4); border-radius: 5px; }
.auth-art__base::before { width: 120px; height: 67px; left: 34px; top: 63px; }
.auth-art__base::after { width: 43px; height: 43px; right: 36px; top: 75px; border-radius: 50%; }
.auth-art__base span { display: block; width: 90px; height: 3px; margin: 0 0 10px; background: rgba(18, 98, 196, .34); }
.auth-art__base span:nth-child(2) { width: 61px; }
.auth-art__base span:nth-child(3) { width: 76px; }
.auth-art__sheet { top: 32px; right: 0; width: 312px; height: 220px; padding: 28px 29px; color: #315575; background: rgba(255, 255, 255, .9); box-shadow: 0 21px 36px rgba(31, 72, 113, .15); }
.auth-art__sheet-brand { display: flex; align-items: center; gap: 5px; font-size: 8px; font-weight: 800; letter-spacing: .03em; }
.auth-art__sheet-brand i { width: 9px; height: 10px; background: var(--auth-blue); clip-path: polygon(39% 0, 61% 0, 100% 100%, 69% 100%, 50% 48%, 30% 100%, 0 100%); }
.auth-art__sheet strong { display: block; margin-top: 18px; color: #1d405e; font-family: "Urbanist", sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -.04em; }
.auth-art__sheet em { display: block; width: 100%; height: 3px; margin-top: 13px; background: #b6cce0; }
.auth-art__sheet em:nth-of-type(2) { width: 74%; }
.auth-art__sheet em:nth-of-type(3) { width: 88%; }
.auth-art__sheet em:nth-of-type(4) { width: 48%; }
.auth-art__sheet-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.auth-art__sheet-footer span { width: 31px; height: 31px; background: repeating-linear-gradient(45deg, #224d74 0 2px, #fff 2px 4px); }
.auth-art__sheet-footer b { width: 66px; height: 5px; background: #54a6e3; }

@media (max-width: 860px) { .auth-art { left: calc(50% + 172px); opacity: .46; } }
@media (max-width: 640px) { .auth-header { min-height: 78px; padding: 16px 20px; } .auth-brand { font-size: 1.34rem; } .auth-brand__mark { width: 21px; height: 23px; } .auth-brand__product { display: none; } .back-to-home { font-size: .8rem; } .auth-container { min-height: calc(100vh - 78px); padding: 28px 16px 48px; align-items: start; } .auth-card { padding: 31px 24px; border-radius: 12px; } .auth-art { display: none; } }
@media (max-width: 380px) { .auth-header { padding-inline: 15px; } .auth-brand { font-size: 1.18rem; } .back-to-home { gap: 5px; font-size: .75rem; } .auth-card { padding: 27px 19px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
