:root {
  color-scheme: dark;
  --bg: #090b12;
  --bg-soft: #10131e;
  --surface: rgba(21, 25, 39, 0.94);
  --surface-raised: #1b2032;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.17);
  --text: #f7f8fc;
  --text-soft: #aeb6c9;
  --text-faint: #737d94;
  --primary: #9d7bff;
  --primary-bright: #b9a2ff;
  --secondary: #42d6c8;
  --danger: #ff7b91;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(135deg, rgba(157, 123, 255, 0.12), transparent 42%),
    linear-gradient(315deg, rgba(66, 214, 200, 0.08), transparent 36%),
    var(--bg);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%);
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.login-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: 48px 24px 24px;
}

.login-shell {
  display: grid;
  width: min(100%, 920px);
  margin: auto;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.04);
}

.brand-panel,
.form-panel {
  min-width: 0;
  padding: clamp(34px, 5vw, 58px);
}

.brand-panel {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.018);
}

.brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 13px;
  font-size: 1.24rem;
  font-weight: 850;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(157, 123, 255, 0.2));
}

.brand-name span {
  color: var(--secondary);
}

.brand-copy {
  margin: auto 0;
  padding: 64px 0;
}

.eyebrow,
.form-kicker {
  display: block;
  margin: 0 0 14px;
  color: var(--secondary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-copy h1,
.form-heading h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

.brand-copy h1 {
  max-width: 410px;
  font-size: clamp(2.35rem, 5vw, 4rem);
}

.brand-copy > p:last-child {
  max-width: 410px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 1.02rem;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 0.78rem;
}

.security-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 1px solid rgba(66, 214, 200, 0.2);
  border-radius: 50%;
  color: var(--secondary);
  background: rgba(66, 214, 200, 0.07);
}

.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-heading {
  margin-bottom: 32px;
}

.form-heading h2 {
  font-size: 2rem;
}

.form-heading p {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

form {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--text-soft);
  font-size: 0.83rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  outline: none;
  color: var(--text);
  background: rgba(9, 11, 18, 0.65);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:hover {
  border-color: rgba(255, 255, 255, 0.26);
}

.field input:focus {
  border-color: var(--secondary);
  background: rgba(9, 11, 18, 0.88);
  box-shadow: 0 0 0 3px rgba(66, 214, 200, 0.14);
}

.field input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--danger);
}

.submit-button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  color: #090b12;
  background: linear-gradient(135deg, var(--primary-bright), var(--secondary));
  box-shadow: 0 14px 34px rgba(107, 102, 228, 0.22);
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(107, 102, 228, 0.34);
  filter: brightness(1.04);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(66, 214, 200, 0.38);
  outline-offset: 3px;
}

.support-note {
  margin: 26px 0 0;
  color: var(--text-faint);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.support-note strong {
  color: var(--text-soft);
  font-weight: 700;
}

.page-footer {
  display: flex;
  justify-content: center;
  gap: 9px;
  padding-top: 24px;
  color: var(--text-faint);
  font-size: 0.72rem;
}

@media (max-width: 760px) {
  .login-page {
    align-items: start;
    padding: 18px 14px;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: auto;
    padding-bottom: 32px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .brand-copy {
    padding: 50px 0 36px;
  }

  .brand-copy h1 {
    font-size: 2.5rem;
  }

  .form-panel {
    padding-top: 36px;
    padding-bottom: 38px;
  }
}

@media (max-width: 420px) {
  .brand-panel,
  .form-panel {
    padding-right: 24px;
    padding-left: 24px;
  }

  .brand-copy h1 {
    font-size: 2.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
