* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e9e5f1;
  background: #15141b;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 34%, #39264e 0%, transparent 56%),
    repeating-linear-gradient(135deg, #ffffff05 0 1px, transparent 1px 36px);
}

button, input { font: inherit; }
.site-header { padding: 30px 48px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #c6bed4;
  text-decoration: none;
  font-size: 17px;
}
.brand strong { color: #e9e5f1; font-weight: 700; }
.brand-mark { width: 30px; height: 26px; position: relative; }
.brand-mark span {
  position: absolute;
  width: 20px;
  height: 16px;
  border-radius: 4px 4px 4px 0;
  background: #a98aee;
  transform: skewX(-10deg);
  top: 1px;
  left: 1px;
}
.brand-mark span + span {
  background: #614796;
  top: 10px;
  left: 9px;
  border: 2px solid #15141b;
}

main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 20px 44px;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 438px;
  background: #211e2a;
  border: 1px solid #483952;
  border-radius: 12px;
  padding: 34px 36px 27px;
  box-shadow: 0 24px 72px #0b0910a8;
}
.login-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 34px;
  width: 66px;
  height: 2px;
  background: #b493ff;
  box-shadow: 0 0 12px #ae84fb75;
}
.card-mark {
  width: 43px;
  height: 43px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #30253f;
  border: 1px solid #503866;
  border-radius: 9px;
}
.card-mark span { width: 4px; height: 12px; border-radius: 2px; background: #bfa1fc; transform: skewX(-12deg); }
.card-mark span:nth-child(2) { height: 21px; }
.card-mark span:nth-child(3) { height: 16px; }

h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.9px; line-height: 1.2; }
.intro { margin: 10px 0 28px; color: #b3a8c2; font-size: 14px; }
.field { margin-bottom: 18px; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
input:not([type="hidden"]) {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid #494052;
  border-radius: 7px;
  background: #191720;
  color: #e9e5f1;
  font-size: 14px;
}
input::placeholder { color: #93889f; }
input:focus { outline: 2px solid #a585e3; outline-offset: 1px; }
.password-field { position: relative; }
.password-field input { padding-right: 86px; }
.password-toggle {
  position: absolute;
  top: 0;
  right: 10px;
  height: 48px;
  border: 0;
  padding: 0 3px;
  background: transparent;
  color: #c4a9fc;
  font-size: 12px;
  cursor: pointer;
}

.submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  margin-top: 22px;
  padding: 0 15px;
  border: 1px solid #b69aef;
  border-radius: 7px;
  background: #ae8df0;
  color: #1d142e;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.submit:hover { background: #c3a7fa; }
.submit:disabled { opacity: .75; cursor: wait; }
.submit span { font-size: 19px; }
button:focus-visible, a:focus-visible { outline: 2px solid #c8aaff; outline-offset: 3px; }

.help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid #3a3044;
}
.help-icon {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border: 1px solid #685177;
  border-radius: 50%;
  color: #c4a9fc;
  text-align: center;
  font-size: 11px;
  line-height: 15px;
}
.help p { margin: 0; color: #d3c9df; font-size: 12px; line-height: 1.6; }
.help p span, footer { color: #a99cb7; }
.error {
  padding: 10px 12px;
  border: 1px solid #713c57;
  border-radius: 6px;
  background: #392435;
  color: #ffc4d9;
  font-size: 13px;
  line-height: 1.5;
}
[hidden] { display: none !important; }
footer { padding: 22px 48px; font-size: 12px; }

@media (max-width: 520px) {
  .site-header { padding: 22px; }
  main { padding: 22px 16px 30px; }
  .login-card { padding: 28px 22px 24px; }
  .login-card::before { left: 22px; }
  h1 { font-size: 27px; }
  input:not([type="hidden"]) { font-size: 16px; }
  footer { padding: 20px 22px; }
}
