:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #edf5ff;
  background: #050d1b;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --primary: #268cff;
  --primary-hover: #4ba3ff;
  --border: rgba(148, 179, 219, 0.16);
  --muted: #91a4bf;
}

* {
  box-sizing: border-box;
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--primary-hover);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 42px clamp(36px, 6vw, 96px);
  background:
    radial-gradient(circle at 18% 12%, rgba(38, 140, 255, 0.22), transparent 34%),
    radial-gradient(circle at 84% 88%, rgba(31, 194, 255, 0.12), transparent 30%),
    linear-gradient(145deg, #08172b 0%, #06101f 52%, #040b15 100%);
  border-right: 1px solid var(--border);
}

.brand-panel::before,
.brand-panel::after {
  position: absolute;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(83, 163, 255, 0.1);
  border-radius: 50%;
}

.brand-panel::before {
  width: 540px;
  height: 540px;
  right: -300px;
  top: -210px;
}

.brand-panel::after {
  width: 420px;
  height: 420px;
  left: -280px;
  bottom: -180px;
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  color: #f4f9ff;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #dceeff;
  background: linear-gradient(145deg, #2d98ff, #1464d8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(17, 116, 231, 0.25);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
}

.brand-name {
  font-size: 20px;
}

.brand-name span {
  margin-left: 4px;
  color: #66b3ff;
  font-weight: 500;
}

.brand-content {
  position: relative;
  z-index: 1;
  width: min(100%, 590px);
  margin: auto 0;
  padding: 80px 0;
}

.eyebrow,
.auth-kicker {
  margin: 0 0 18px;
  color: #67b5ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-content h1 {
  margin: 0;
  font-size: clamp(42px, 5.4vw, 74px);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.brand-content h1 span {
  color: #a9c9ee;
  font-weight: 450;
}

.brand-description {
  max-width: 500px;
  margin: 28px 0 0;
  color: #9eb2cd;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.7;
}

.feature-list {
  display: grid;
  gap: 17px;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #c5d5e9;
  font-size: 15px;
}

.feature-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #72bcff;
  background: rgba(38, 140, 255, 0.1);
  border: 1px solid rgba(71, 158, 255, 0.17);
  border-radius: 10px;
}

.feature-icon svg {
  width: 19px;
  height: 19px;
}

.brand-footer {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #667f9f;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-footer span {
  margin: 0 9px;
  color: #2e98ff;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px clamp(24px, 5vw, 72px) 28px;
  background:
    radial-gradient(circle at 90% 5%, rgba(38, 140, 255, 0.07), transparent 28%),
    #050d1b;
}

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

.mobile-brand {
  display: none;
  margin: 0 0 38px;
  color: #68b6ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.auth-heading {
  margin-bottom: 34px;
}

.auth-kicker {
  display: block;
  margin-bottom: 12px;
  font-size: 11px;
}

.auth-heading h2 {
  margin: 0;
  color: #f4f8fd;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.auth-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.field {
  margin-bottom: 21px;
}

label,
.label-row {
  color: #c9d7e8;
  font-size: 13px;
  font-weight: 600;
}

label {
  display: inline-block;
  margin-bottom: 9px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.label-row label {
  margin: 0;
}

.text-button {
  padding: 0;
  color: #6eb7ff;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.text-button:hover {
  color: #a6d3ff;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 19px;
  height: 19px;
  color: #627b9b;
  pointer-events: none;
  transform: translateY(-50%);
}

input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 45px;
  color: #eef6ff;
  background: rgba(12, 25, 44, 0.72);
  border: 1px solid rgba(132, 164, 204, 0.2);
  border-radius: 11px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
  color: #536b89;
}

input:hover {
  border-color: rgba(132, 164, 204, 0.34);
}

input:focus {
  background: rgba(13, 29, 51, 0.92);
  border-color: #2f95ff;
  box-shadow: 0 0 0 4px rgba(38, 140, 255, 0.12);
}

.form-error {
  margin: -3px 0 18px;
  padding: 11px 13px;
  color: #ffb4c0;
  background: rgba(255, 78, 108, 0.09);
  border: 1px solid rgba(255, 102, 128, 0.22);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.45;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  width: 100%;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #2e98ff, #166bdf);
  border: 1px solid rgba(124, 190, 255, 0.25);
  box-shadow: 0 12px 28px rgba(17, 104, 218, 0.2);
}

.primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #48a6ff, #247cf0);
  box-shadow: 0 14px 32px rgba(17, 104, 218, 0.28);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary-button {
  margin-top: 24px;
  color: #cfe2f8;
  background: rgba(21, 42, 69, 0.5);
  border: 1px solid rgba(133, 169, 213, 0.2);
}

.secondary-button:hover {
  background: rgba(29, 56, 91, 0.7);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-help {
  margin: 25px 0 0;
  color: #7288a5;
  font-size: 13px;
  text-align: center;
}

.auth-help a {
  color: #93c7ff;
  font-weight: 600;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 48px;
  color: #58708f;
  font-size: 11px;
}

.footer-dot {
  width: 4px;
  height: 4px;
  background: #2f8ff1;
  border-radius: 50%;
}

.success-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 27px;
  place-items: center;
  color: #70d5a1;
  background: rgba(63, 194, 127, 0.1);
  border: 1px solid rgba(88, 211, 147, 0.2);
  border-radius: 18px;
}

.success-icon svg {
  width: 35px;
  height: 35px;
}

.session-card {
  display: grid;
  gap: 7px;
  padding: 17px 18px;
  background: rgba(14, 29, 49, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.session-card span {
  color: #7890af;
  font-size: 12px;
}

.session-card strong {
  overflow-wrap: anywhere;
  color: #dceaff;
  font-size: 14px;
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid #75bcff;
  outline-offset: 3px;
}

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

  .brand-panel {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 42px 24px 26px;
  }

  .mobile-brand {
    display: block;
  }
}

@media (max-width: 420px) {
  .auth-heading h2 {
    font-size: 28px;
  }

  .auth-panel {
    justify-content: flex-start;
    padding-top: 34px;
  }

  .auth-card {
    margin: 0;
  }
}

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