:root {
  --ink: #0b1325;
  --muted: #72809f;
  --blue: #0b53ff;
  --blue-deep: #0637d8;
  --line: #d8e0ef;
  --pale: #f4f7fd;
  --night: #020b1c;
  --cyan: #20dfce;
  --orange: #ff652d;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(560px, 1fr);
}

.auth-context {
  position: relative;
  min-height: 100vh;
  padding: clamp(42px, 5.3vw, 86px) clamp(42px, 5.3vw, 88px) clamp(38px, 4vw, 66px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--night);
  background-image:
    radial-gradient(circle at 88% 45%, rgba(15, 86, 255, .18), transparent 31%),
    radial-gradient(circle at 84% 58%, rgba(0, 223, 219, .07), transparent 24%);
  color: #fff;
}

.auth-context::before,
.auth-context::after {
  content: "";
  position: absolute;
  width: 740px;
  height: 740px;
  left: 51%;
  top: 6%;
  border: 1px solid rgba(38, 103, 255, .21);
  border-radius: 50%;
  pointer-events: none;
}

.auth-context::after {
  width: 570px;
  height: 570px;
  left: 61%;
  top: 16%;
  border-color: rgba(38, 103, 255, .28);
  box-shadow:
    0 0 0 68px rgba(30, 86, 218, .09),
    0 0 0 144px rgba(30, 86, 218, .055),
    0 0 0 230px rgba(30, 86, 218, .035);
}

.auth-brand,
.auth-intro,
.auth-route,
.auth-support { position: relative; z-index: 1; }

.auth-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 16px;
  color: #fff;
  font-size: clamp(17px, 1.5vw, 24px);
  font-weight: 900;
  text-decoration: none;
}

.auth-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(31%) sepia(91%) saturate(6323%) hue-rotate(222deg) brightness(103%) contrast(104%);
}

.auth-intro {
  margin: clamp(68px, 11vh, 126px) 0 0;
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-context .eyebrow { color: #1671ff; }

.auth-intro h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(48px, 5vw, 78px);
  line-height: 1.02;
  letter-spacing: 0;
}

.auth-intro > p:last-child {
  max-width: 590px;
  margin: 24px 0 0;
  color: #c5ccda;
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.55;
}

.auth-route {
  margin: clamp(38px, 6vh, 58px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.auth-route li {
  position: relative;
  min-width: 0;
  padding: 0 24px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.auth-route li + li {
  padding-left: 24px;
  border-left: 1px solid rgba(111, 139, 192, .24);
}

.route-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #155ee9;
  border-radius: 9px;
  color: #1c79ff;
}

.route-icon svg { width: 21px; height: 21px; stroke-width: 1.8; }

.route-comments .route-icon { border-color: #00a99a; color: var(--cyan); }
.route-files .route-icon { border-color: #a6361c; color: var(--orange); }
.auth-route b { color: #1671ff; font-size: 13px; }
.route-comments b { color: var(--cyan); }
.route-files b { color: var(--orange); }
.auth-route strong, .auth-route small { display: block; }
.auth-route strong { color: #fff; font-size: 13px; line-height: 1.35; }
.auth-route small { margin-top: 5px; color: #aeb8ca; font-size: 12px; line-height: 1.55; }

.auth-support {
  margin: auto 0 0;
  padding-top: 34px;
  color: #aeb8ca;
  font-size: 13px;
}

.auth-support a { color: #1480ff; text-underline-offset: 3px; }

.auth-workspace {
  min-height: 100vh;
  padding: clamp(38px, 6.2vw, 92px);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 45% 30%, rgba(112, 148, 224, .12), transparent 37%),
    #f8f9fc;
}

.auth-card {
  width: min(100%, 680px);
  border: 1px solid #d3dced;
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 52px rgba(65, 86, 137, .11);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  min-height: 74px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #6e7b98;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.auth-tab.active { border-bottom-color: var(--blue); color: var(--blue); }
.auth-panel { display: none; padding: clamp(36px, 5.4vw, 60px); }
.auth-panel.active { display: block; }
.auth-heading { margin-bottom: 30px; }
.auth-heading h2 { margin: 0; font-size: clamp(31px, 3vw, 39px); line-height: 1.08; }
.auth-heading > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

form { display: grid; gap: 19px; }
form label { display: grid; gap: 9px; color: #1e293f; font-size: 12px; font-weight: 850; }

.input-shell,
.password-field { position: relative; display: block; }

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: #7d8dad;
  pointer-events: none;
}

.input-icon svg { display: block; width: 17px; height: 17px; stroke-width: 1.8; }

input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid #ccd6e7;
  border-radius: 7px;
  background: rgba(255, 255, 255, .62);
  color: var(--ink);
  outline: none;
}

.field-email input,
.field-password input { padding-left: 50px; }
input::placeholder { color: #7d8baa; opacity: 1; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 83, 255, .1); }
.password-field input { padding-right: 56px; }

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #7484a3;
  cursor: pointer;
}

.password-toggle svg { display: block; width: 18px; height: 18px; margin: auto; stroke-width: 1.8; }

.auth-form-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.check-label { display: flex; grid-template-columns: none; flex-direction: row; align-items: flex-start; gap: 11px; font-weight: 500; line-height: 1.45; }
.check-label input { width: 19px; height: 19px; min-height: 19px; flex: 0 0 auto; margin: 0; border-radius: 4px; accent-color: var(--blue); }
.check-label a { color: var(--blue); text-decoration: none; }
.text-button, .back-button { padding: 0; border: 0; background: transparent; color: var(--blue); font-weight: 900; cursor: pointer; }
.auth-consents { display: grid; gap: 12px; padding: 2px 0 4px; }

.primary-button,
.demo-access {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover { background: var(--blue-deep); box-shadow: 0 8px 22px rgba(11, 83, 255, .2); }
.demo-access { margin-top: 14px; background: transparent; color: var(--blue); }
.demo-access:hover { background: rgba(11, 83, 255, .045); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.consent { margin-top: 2px; }
.form-message { display: none; margin: -4px 0 0; padding: 10px 12px; border-radius: 6px; background: #fff1f0; color: #9f3f2e; font-size: 12px; line-height: 1.4; }
.form-message.show { display: block; }
.form-message.success { background: #ecfdf3; color: #14714d; }
.back-button { margin-bottom: 28px; }

.verification-state { display: grid; gap: 22px; text-align: center; }
.verification-state .auth-heading { margin: 0; }
.verification-icon { width: 72px; height: 72px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(11, 83, 255, .08); color: var(--blue); }
.verification-icon svg { width: 34px; height: 34px; stroke-width: 1.7; }

@media (min-width: 901px) and (max-height: 800px) {
  html, body, .auth-shell { height: 100%; min-height: 100%; overflow: hidden; }
  .auth-context { min-height: 100%; height: 100%; padding-top: 28px; padding-bottom: 24px; }
  .auth-brand { gap: 12px; font-size: 18px; }
  .auth-brand img { width: 42px; height: 42px; }
  .auth-intro { margin-top: clamp(32px, 6vh, 48px); }
  .auth-intro h1 { max-width: 610px; font-size: clamp(42px, 4.1vw, 58px); }
  .auth-intro > p:last-child { max-width: 570px; margin-top: 14px; font-size: 14px; line-height: 1.45; }
  .auth-route { margin-top: clamp(22px, 4vh, 30px); }
  .auth-route li { gap: 7px; }
  .route-icon { width: 38px; height: 38px; }
  .auth-route small { margin-top: 3px; font-size: 11px; line-height: 1.4; }
  .auth-support { padding-top: 14px; }
  .auth-workspace { min-height: 100%; height: 100%; padding-top: 20px; padding-bottom: 20px; overflow: hidden; }
  .auth-card { max-height: calc(100vh - 40px); }
  .auth-tabs .auth-tab { min-height: 50px; }
  .auth-panel { padding: 22px 48px 24px; }
  .auth-heading { margin-bottom: 15px; }
  .auth-heading .eyebrow { margin-bottom: 8px; }
  .auth-heading h2 { font-size: 29px; }
  .auth-heading > p:last-child { margin-top: 6px; font-size: 12px; }
  form { gap: 9px; }
  form label { gap: 6px; }
  input { min-height: 44px; }
  .auth-form-row { min-height: 22px; }
  .auth-consents { gap: 6px; padding: 0; }
  .check-label { font-size: 11px; }
  .check-label input { width: 17px; height: 17px; min-height: 17px; }
  .primary-button, .demo-access { min-height: 44px; }
  .demo-access { margin-top: 8px; }
}

@media (min-width: 901px) and (max-height: 640px) {
  .auth-context { padding-left: 44px; padding-right: 44px; }
  .auth-intro { margin-top: 24px; }
  .auth-intro h1 { font-size: 42px; }
  .auth-intro > p:last-child { margin-top: 10px; font-size: 13px; }
  .auth-route { margin-top: 18px; }
  .auth-route small { line-height: 1.3; }
  .auth-support { padding-top: 8px; }
  .auth-tabs .auth-tab { min-height: 46px; }
  .auth-panel { padding-top: 16px; padding-bottom: 18px; }
  .auth-heading { margin-bottom: 10px; }
  .auth-heading h2 { font-size: 26px; }
  input { min-height: 40px; }
  .primary-button, .demo-access { min-height: 40px; }
}

@media (max-width: 1120px) {
  .auth-shell { grid-template-columns: minmax(430px, .9fr) minmax(520px, 1.1fr); }
  .auth-context { padding: 44px; }
  .auth-route li { padding-right: 14px; }
  .auth-route li + li { padding-left: 14px; }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-context { min-height: auto; padding: 28px 24px 34px; }
  .auth-context::before, .auth-context::after { display: none; }
  .auth-brand img { width: 42px; height: 42px; }
  .auth-intro { margin: 48px 0 0; }
  .auth-intro h1 { max-width: 620px; font-size: 44px; }
  .auth-intro > p:last-child { max-width: 650px; font-size: 15px; }
  .auth-route { margin-top: 32px; }
  .auth-support { margin-top: 28px; padding-top: 0; }
  .auth-workspace { min-height: auto; padding: 34px 18px 52px; }
}

@media (max-width: 620px) {
  .auth-intro h1 { font-size: 37px; }
  .auth-route { grid-template-columns: 1fr; gap: 18px; }
  .auth-route li, .auth-route li + li { padding: 0; border-left: 0; grid-template-columns: 48px minmax(0, 1fr); align-items: start; }
  .auth-route li b { grid-column: 2; grid-row: 1; align-self: center; }
  .auth-route li div { grid-column: 2; }
  .route-icon { grid-row: 1 / span 2; }
  .auth-panel { padding: 30px 20px; }
  .auth-tabs .auth-tab { min-height: 62px; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-form-row { align-items: flex-start; }
}
