:root {
  --purple: #6a22ff;
  --purple-deep: #43129d;
  --cyan: #00b8f5;
  --dark: #22103c;
  --ink: #17151f;
  --muted: #706b79;
  --line: #e4e1e8;
  --soft: #f3edff;
}

* {
  box-sizing: border-box;
}

html,body {
  margin: 0;
  min-height: 100%;
  font-family: Inter,system-ui,sans-serif;
  color: var(--ink);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px,42%) 1fr;
}

.auth-brand {
  background: linear-gradient(145deg, var(--dark) 0%, var(--purple-deep) 100%);
  color: #fff;
  padding: 45px 55px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand,.mobile-brand {
  position: relative;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.brand img {
  position: absolute;
  width: 120px;
  height: 120px;
  max-width: none;
  left: -36px;
  top: -27px;
}

.mobile-brand img {
  position: absolute;
  width: 120px;
  height: 120px;
  max-width: none;
  left: -36px;
  top: -27px;
}

.auth-brand h1 {
  font-size: 40px;
  line-height: 1.14;
  letter-spacing: -1.5px;
  max-width: 520px;
  margin: 12px 0 18px;
}

.lead {
  color: #c8c1d1;
  line-height: 1.7;
  max-width: 480px;
  font-size: 14px;
}

.auth-brand small {
  color: #d9c8ff;
}

.eyebrow {
  color: var(--purple);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: 35px;
  background: #fff;
}

.auth-card {
  width: min(420px,100%);
}

.auth-card.register {
  width: min(560px,100%);
}

.auth-card h2 {
  font-size: 28px;
  letter-spacing: -.7px;
  margin: 7px 0;
}

.subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

.auth-card>label,.form-grid label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin: 14px 0;
}

.auth-card input:not([type=checkbox]) {
  display: block;
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 7px;
  padding: 0 12px;
  outline: none;
  font-size: 12px;
}

.auth-card input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--soft);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 44px !important;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  background: transparent !important;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.password-toggle:hover {
  color: var(--purple);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-card button {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  margin-top: 18px;
}

.auth-card button:hover {
  background: var(--purple-deep);
}

.form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0;
  font-size: 10px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 5px;
}

.form-meta a,.switch a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
}

.switch {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 18px;
}

.security,.hint {
  font-size: 9px;
  color: #928d98;
  line-height: 1.5;
}

.security {
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 17px;
}

.alert {
  background: #fff0f2;
  color: #a8293c;
  border: 1px solid #f3cad1;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 11px;
  margin-bottom: 14px;
}

.mobile-brand {
  display: none;
  margin-bottom: 30px;
}

@media(max-width:800px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-form-wrap {
    padding: 28px 20px;
    min-height: 100vh;
  }

  .mobile-brand {
    display: flex;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .auth-card h2 {
    font-size: 24px;
  }

}

.auth-card select {
  display: block;
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 7px;
  padding: 0 12px;
  outline: none;
  font-size: 12px;
  background: #fff;
}

.auth-card select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--soft);
}
