@font-face {
  font-style: normal;
  font-weight: 700;
  font-family: "SourceSansPro";
  font-display: swap;
  src: url("../fonts/SourceSansPro-Bold.woff2") format("woff2"), url("../fonts/SourceSansPro-Bold.woff") format("woff");
}

@font-face {
  font-style: normal;
  font-weight: 400;
  font-family: "SourceSansPro";
  font-display: swap;
  src: url("../fonts/SourceSansPro-Regular.woff2") format("woff2"), url("../fonts/SourceSansPro-Regular.woff") format("woff");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "SourceSansPro", "Arial", sans-serif;
}

.wrapper {
  min-height: 100vh;
}

.auth-gate {
  --ink: #111827;
  --muted: #6b7280;
  --line: #d1d5db;
  --surface: #fffdf8;
  --violet: #6d28d9;
  --violet-deep: #3b0764;
  --coral: #ea580c;
  --danger: #991b1b;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 28px 16px;
  color: var(--ink);
  background-color: #0b1220;
  background-image:
    linear-gradient(rgba(109, 40, 217, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 40, 217, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 12% 18%, rgba(109, 40, 217, 0.28), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(234, 88, 12, 0.12), transparent 40%);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.auth-gate__shell {
  display: grid;
  grid-template-columns: minmax(0, 270px) minmax(0, 460px);
  width: 100%;
  max-width: 780px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 12px 16px 0 rgba(0, 0, 0, 0.35);
}

.auth-gate__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 420px;
  padding: 28px 24px;
  overflow: hidden;
  color: #f5f3ff;
  background-color: var(--violet-deep);
  background-image:
    repeating-linear-gradient(
      -32deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 2px,
      transparent 2px,
      transparent 14px
    ),
    linear-gradient(165deg, #5b21b6 0%, var(--violet-deep) 55%, #1e0538 100%);
}

.auth-gate__mark {
  position: absolute;
  right: -8px;
  bottom: -18px;
  color: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 120px;
  line-height: 1;
  letter-spacing: -0.06em;
  pointer-events: none;
  user-select: none;
}

.auth-gate__badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  background-color: rgba(0, 0, 0, 0.18);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-gate__brand-text {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 18em;
  color: rgba(237, 233, 254, 0.92);
  font-size: 15px;
  line-height: 1.55;
}

.auth-gate__panel {
  padding: 34px 36px 32px;
  background-color: var(--surface);
  border-left: 4px solid var(--coral);
}

.auth-gate__kicker {
  margin: 0 0 8px;
  color: var(--coral);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-gate__title {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.auth-gate__text {
  margin: 0 0 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e5e7eb;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.auth-gate__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-gate__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-gate__label {
  color: #374151;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
}

.auth-gate__input {
  width: 100%;
  padding: 10px 2px 12px;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  background-color: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.3;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-gate__input::placeholder {
  color: #9ca3af;
}

.auth-gate__input:hover {
  border-bottom-color: #9ca3af;
}

.auth-gate__input:focus {
  border-bottom-color: var(--violet);
  box-shadow: 0 3px 0 rgba(109, 40, 217, 0.15);
}

.auth-gate__error {
  margin: 0;
  padding: 11px 14px;
  border-radius: 2px;
  background-color: #7f1d1d;
  color: #fee2e2;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}

.auth-gate__submit {
  width: 100%;
  margin-top: 4px;
  padding: 14px 18px;
  border: none;
  border-radius: 2px;
  background-color: #111827;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.auth-gate__submit:hover {
  background-color: var(--violet);
  box-shadow: 0 10px 24px rgba(109, 40, 217, 0.35);
  transform: translateY(-1px);
}

.auth-gate__submit:active {
  transform: translateY(0);
  box-shadow: none;
}

@media (max-width: 767px) {
  .auth-gate__shell {
    grid-template-columns: 1fr;
    max-width: 440px;
    box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.3);
  }

  .auth-gate__brand {
    min-height: 0;
    gap: 18px;
    padding: 22px 20px;
  }

  .auth-gate__mark {
    font-size: 84px;
    right: -4px;
    bottom: -12px;
  }

  .auth-gate__panel {
    padding: 24px 20px 22px;
    border-left: 0;
    border-top: 4px solid var(--coral);
  }
}
