:root {
  --primary: #2457d6;
  --accent: #65d4ff;
  --sidebar: #08142f;
  --font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --login-ink: #10213f;
  --login-muted: #63708a;
  --login-line: #dce4f2;
  --login-card: rgba(255, 255, 255, 0.94);
  --login-field: #f8faff;
  --login-danger: #b42318;
  --login-success: #067647;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #07122d;
}

body.skylight-login-page {
  min-height: 100vh;
  margin: 0;
  color: var(--login-ink);
  font-family: var(--font-family, "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  background:
    radial-gradient(circle at 12% 18%, rgba(69, 127, 255, 0.33), transparent 28rem),
    radial-gradient(circle at 86% 82%, rgba(93, 218, 255, 0.22), transparent 24rem),
    linear-gradient(145deg, #06112b 0%, #0c2553 48%, #153f75 100%);
}

button,
input {
  font: inherit;
}

.skylight-auth {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(390px, 0.84fr);
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.skylight-auth::before {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to right, #000, transparent 72%);
  content: "";
}

.skylight-auth__visual,
.skylight-auth__form-panel {
  position: relative;
  display: flex;
  min-width: 0;
}

.skylight-auth__visual {
  align-items: center;
  padding: clamp(38px, 6vw, 96px);
  color: #fff;
}

.skylight-auth__story {
  position: relative;
  z-index: 2;
  width: min(690px, 100%);
}

.skylight-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-bottom: clamp(44px, 8vh, 92px);
}

.skylight-wordmark__mark,
.skylight-form-brand__mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(103, 210, 255, 0.14));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26), inset 0 1px rgba(255, 255, 255, 0.42);
}

.skylight-wordmark__mark::before,
.skylight-form-brand__mark::before {
  width: 24px;
  height: 24px;
  border: 3px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  transform: rotate(-28deg);
  content: "";
}

.skylight-wordmark__mark::after,
.skylight-form-brand__mark::after {
  position: absolute;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-28deg);
  content: "";
}

.skylight-wordmark__copy,
.skylight-form-brand__copy {
  display: grid;
  gap: 1px;
}

.skylight-wordmark__copy strong {
  font-size: 23px;
  letter-spacing: -0.03em;
}

.skylight-wordmark__copy small {
  color: rgba(255, 255, 255, 0.67);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.skylight-auth__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: #9be4ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.skylight-auth__eyebrow::before {
  width: 31px;
  height: 1px;
  background: currentColor;
  content: "";
}

.skylight-auth__story h1 {
  max-width: 730px;
  margin: 0;
  font-size: clamp(45px, 6vw, 82px);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 0.99;
}

.skylight-auth__lead {
  max-width: 610px;
  margin: 28px 0 0;
  color: rgba(239, 247, 255, 0.78);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.65;
}

.skylight-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: clamp(42px, 7vh, 72px);
}

.skylight-trust-card {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.skylight-trust-card span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  margin-bottom: 12px;
  border-radius: 10px;
  color: #06244d;
  background: #86defe;
  font-size: 13px;
  font-weight: 900;
}

.skylight-trust-card b {
  display: block;
  font-size: 13px;
}

.skylight-trust-card small {
  display: block;
  margin-top: 5px;
  color: rgba(237, 246, 255, 0.62);
  font-size: 11px;
  line-height: 1.45;
}

.skylight-orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(132, 220, 255, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.skylight-orbit::before,
.skylight-orbit::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.skylight-orbit::before {
  top: 12%;
  right: 14%;
  width: 15px;
  height: 15px;
  background: #8ae2ff;
  box-shadow: 0 0 34px rgba(126, 223, 255, 0.9);
}

.skylight-orbit::after {
  bottom: 7%;
  left: 22%;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.skylight-orbit--one {
  top: -14%;
  right: -12%;
  width: min(50vw, 720px);
  aspect-ratio: 1;
  animation: skylight-spin 30s linear infinite;
}

.skylight-orbit--two {
  bottom: -31%;
  left: -17%;
  width: min(39vw, 540px);
  aspect-ratio: 1;
  animation: skylight-spin 24s linear infinite reverse;
}

.skylight-float {
  position: absolute;
  z-index: 1;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 29px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(77, 194, 255, 0.03));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  pointer-events: none;
  animation: skylight-float 8s ease-in-out infinite;
}

.skylight-float--one {
  top: 17%;
  right: 8%;
  transform: rotate(18deg);
}

.skylight-float--two {
  right: 25%;
  bottom: 9%;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  animation-delay: -3.4s;
}

.skylight-auth__form-panel {
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 72px);
  background: rgba(245, 249, 255, 0.95);
  box-shadow: -28px 0 90px rgba(0, 11, 37, 0.22);
  backdrop-filter: blur(24px);
}

.skylight-auth__form-panel::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 100% 0, rgba(46, 111, 239, 0.12), transparent 33%),
    radial-gradient(circle at 0 100%, rgba(76, 204, 245, 0.11), transparent 34%);
  content: "";
}

.skylight-login-card {
  width: min(460px, 100%);
}

.skylight-form-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.skylight-form-brand__mark {
  width: 43px;
  height: 43px;
  border-color: rgba(36, 87, 214, 0.25);
  color: #2457d6;
  background: #eef4ff;
  box-shadow: none;
}

.skylight-form-brand__copy strong {
  color: var(--login-ink);
  font-size: 20px;
}

.skylight-form-brand__copy small {
  color: var(--login-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.skylight-client {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  margin-bottom: 34px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--login-line);
}

.skylight-client__logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--login-line);
  border-radius: 13px;
  color: #2457d6;
  background: #fff;
  font-weight: 800;
}

.skylight-client__logo img {
  width: 100%;
  height: 100%;
  padding: 7px;
  object-fit: contain;
}

.skylight-client__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.skylight-client__copy small {
  color: var(--login-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.skylight-client__copy b {
  overflow: hidden;
  color: var(--login-ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skylight-login-card h2 {
  margin: 0;
  color: var(--login-ink);
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.skylight-login-card__intro {
  margin: 12px 0 28px;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.65;
}

.skylight-login-flashes {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.skylight-login-flash {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #f4c7c3;
  border-radius: 12px;
  color: var(--login-danger);
  background: #fff2f0;
  font-size: 13px;
  line-height: 1.45;
}

.skylight-login-flash.success {
  border-color: #abefc6;
  color: var(--login-success);
  background: #ecfdf3;
}

.skylight-login-form {
  display: grid;
  gap: 19px;
}

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

.skylight-field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.skylight-field label {
  color: #233657;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.skylight-input-wrap {
  position: relative;
}

.skylight-field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--login-line);
  border-radius: 14px;
  outline: none;
  color: var(--login-ink);
  background: var(--login-field);
  padding: 0 16px;
  font-size: 14px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.skylight-field input::placeholder {
  color: #98a3b8;
}

.skylight-field input:hover {
  border-color: #bac8df;
  background: #fff;
}

.skylight-field input:focus {
  border-color: #3974ee;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(57, 116, 238, 0.13), 0 10px 26px rgba(26, 71, 164, 0.09);
}

.skylight-input-wrap--password input {
  padding-right: 54px;
}

.skylight-password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: #61708c;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.skylight-password-toggle:hover,
.skylight-password-toggle:focus-visible {
  color: #2457d6;
  background: #eaf1ff;
  outline: none;
}

.skylight-password-toggle span {
  display: block;
  width: 18px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50% / 62%;
}

.skylight-password-toggle span::after {
  display: block;
  width: 4px;
  height: 4px;
  margin: 2px auto 0;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.skylight-password-toggle[aria-pressed="true"] span {
  border-style: dashed;
}

.skylight-login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  margin-top: 3px;
  padding: 0 18px 0 21px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(115deg, #1f56d8, #237ade 55%, #28a7dd);
  box-shadow: 0 18px 34px rgba(31, 86, 216, 0.25);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.skylight-login-submit span:last-child {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 17px;
}

.skylight-login-submit:hover {
  box-shadow: 0 21px 39px rgba(31, 86, 216, 0.31);
  filter: saturate(1.08);
  transform: translateY(-2px);
}

.skylight-login-submit:focus-visible {
  outline: 3px solid rgba(57, 116, 238, 0.25);
  outline-offset: 3px;
}

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

.skylight-login-submit[aria-busy="true"] {
  cursor: wait;
  filter: saturate(0.65);
}

.skylight-login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  color: var(--login-muted);
  font-size: 12px;
}

.skylight-login-meta a {
  color: #2457d6;
  font-weight: 800;
  text-decoration: none;
}

.skylight-login-meta a:hover,
.skylight-login-meta a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skylight-security-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--login-line);
  color: #78849a;
  font-size: 11px;
  line-height: 1.5;
}

.skylight-security-note span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  color: #2457d6;
  background: #eaf1ff;
  font-size: 10px;
  font-weight: 900;
}

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

@keyframes skylight-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -20px; }
}

@media (max-width: 1040px) {
  .skylight-auth {
    grid-template-columns: minmax(0, 0.95fr) minmax(390px, 1.05fr);
  }

  .skylight-auth__visual {
    padding: 45px;
  }

  .skylight-trust-grid {
    grid-template-columns: 1fr;
    max-width: 370px;
  }

  .skylight-trust-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 11px;
  }

  .skylight-trust-card span {
    grid-row: 1 / 3;
    margin: 0;
  }
}

@media (max-width: 780px) {
  body.skylight-login-page {
    background: #f5f8ff;
  }

  .skylight-auth {
    display: block;
    min-height: 100vh;
    overflow: visible;
  }

  .skylight-auth__visual {
    display: none;
  }

  .skylight-auth__form-panel {
    min-height: 100vh;
    padding: 28px clamp(20px, 7vw, 48px);
    background:
      radial-gradient(circle at 100% 0, rgba(46, 111, 239, 0.13), transparent 27rem),
      #f5f8ff;
    box-shadow: none;
  }

  .skylight-form-brand {
    display: flex;
  }
}

@media (max-width: 480px) {
  .skylight-auth__form-panel {
    align-items: flex-start;
    padding-top: 24px;
  }

  .skylight-client {
    margin-bottom: 28px;
  }

  .skylight-login-card h2 {
    font-size: 31px;
  }

  .skylight-login-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-color-scheme: dark) {
  body.skylight-login-page {
    --login-ink: #edf4ff;
    --login-muted: #aebbd2;
    --login-line: #30405d;
    --login-card: rgba(12, 26, 52, 0.95);
    --login-field: #111f3a;
  }

  .skylight-auth__form-panel {
    background: rgba(8, 19, 40, 0.96);
  }

  .skylight-form-brand__mark,
  .skylight-client__logo,
  .skylight-field input {
    background: #111f3a;
  }

  .skylight-field label {
    color: #d9e4f6;
  }

  .skylight-field input:hover,
  .skylight-field input:focus {
    background: #142746;
  }

  .skylight-login-flash {
    border-color: #7a342e;
    color: #ffb4ab;
    background: #351a1b;
  }

  .skylight-login-flash.success {
    border-color: #126e4a;
    color: #8ce6ba;
    background: #0a3425;
  }

  .skylight-password-toggle:hover,
  .skylight-password-toggle:focus-visible,
  .skylight-security-note span {
    background: #1a315b;
  }

  @media (max-width: 780px) {
    body.skylight-login-page,
    .skylight-auth__form-panel {
      background: #081328;
    }
  }
}

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