:root {
  --aliest-yellow: #ffdf05;
  --page-bg: #060b1f;
  --page-overlay: rgba(5, 10, 28, 0.72);
  --hero-start: #3658ba;
  --hero-end: #0d2477;
  --hero-wave-top: rgba(110, 151, 255, 0.28);
  --hero-wave-bottom: #0a174f;
  --text: #f5f7ff;
  --muted: rgba(241, 244, 255, 0.78);
  --card-bg: linear-gradient(180deg, rgba(121, 128, 161, 0.46), rgba(41, 54, 101, 0.72));
  --card-border: rgba(255, 255, 255, 0.18);
  --card-shadow: 0 28px 80px rgba(3, 8, 27, 0.5);
  --field-bg: linear-gradient(180deg, rgba(250, 251, 255, 0.2), rgba(206, 212, 235, 0.24));
  --field-border: rgba(255, 255, 255, 0.2);
  --field-text: #f5f7ff;
  --field-placeholder: rgba(245, 247, 255, 0.46);
  --button-bg: linear-gradient(180deg, rgba(206, 210, 225, 0.95), rgba(150, 157, 184, 0.95));
  --button-text: #ffffff;
  --link: rgba(245, 247, 255, 0.88);
  --feedback-error: #ffd5cf;
  --feedback-success: #dfffe6;
  --support: rgba(214, 220, 245, 0.76);
}

body[data-theme="light"] {
  --page-bg: #eef2ff;
  --page-overlay: rgba(221, 228, 255, 0.44);
  --hero-start: #ffef8d;
  --hero-end: #ffd92a;
  --hero-wave-top: rgba(255, 255, 255, 0.28);
  --hero-wave-bottom: #ffdf05;
  --text: #111a34;
  --muted: rgba(17, 26, 52, 0.74);
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(240, 244, 255, 0.82));
  --card-border: rgba(38, 57, 116, 0.14);
  --card-shadow: 0 28px 80px rgba(76, 92, 143, 0.22);
  --field-bg: linear-gradient(180deg, rgba(245, 247, 255, 0.98), rgba(227, 233, 251, 0.96));
  --field-border: rgba(50, 70, 135, 0.14);
  --field-text: #18233f;
  --field-placeholder: rgba(24, 35, 63, 0.42);
  --button-bg: linear-gradient(180deg, #223b99, #162767);
  --button-text: #ffffff;
  --link: #223b99;
  --feedback-error: #b42318;
  --feedback-success: #13724e;
  --support: rgba(17, 26, 52, 0.58);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, transparent 51.5%, var(--page-overlay) 51.5%),
    radial-gradient(circle at 75% 18%, rgba(134, 160, 255, 0.16), transparent 22%),
    radial-gradient(circle at 84% 62%, rgba(255, 223, 5, 0.08), transparent 18%),
    var(--page-bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 16, 56, 0.12), rgba(7, 16, 56, 0.42)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 60%);
  pointer-events: none;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 38px 42px;
  background: linear-gradient(180deg, var(--hero-start), var(--hero-end));
  overflow: hidden;
}

.brand-panel::before {
  content: "";
  position: absolute;
  top: -78px;
  right: -66px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12) 42%, transparent 72%);
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -12% 28% -20%;
  height: 220px;
  border-radius: 50%;
  background: var(--hero-wave-top);
  transform: rotate(-7deg);
}

.brand-header,
.brand-copy {
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: min(260px, 55%);
  height: auto;
  display: block;
}

.brand-copy {
  max-width: 380px;
}

.brand-copy::after {
  content: "";
  position: absolute;
  left: -24%;
  right: -48%;
  bottom: -180px;
  height: 320px;
  border-radius: 50%;
  background: var(--hero-wave-bottom);
  z-index: -1;
}

.brand-kicker {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.74);
}

.brand-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(2.8rem, 4.7vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.brand-description {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.8);
}

.login-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(7, 12, 32, 0.72), rgba(7, 12, 32, 0.72)),
    radial-gradient(circle at 20% 25%, rgba(255, 223, 5, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(90, 104, 165, 0.12), rgba(13, 20, 49, 0.28));
}

.dashboard-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 76%, rgba(56, 117, 255, 0.22), transparent 20%),
    radial-gradient(circle at 38% 28%, rgba(255, 223, 5, 0.08), transparent 16%);
  filter: blur(16px);
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 32px 30px 28px;
  border-radius: 34px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.login-card h2 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.subtitle {
  margin: 14px 0 22px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.96rem;
  color: var(--text);
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 14px;
  border-radius: 18px;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.input-shell:focus-within {
  border-color: rgba(255, 223, 5, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 223, 5, 0.14);
}

.input-icon,
.ghost-button,
.submit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.input-icon svg,
.ghost-button svg,
.submit-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-icon {
  color: rgba(245, 247, 255, 0.84);
}

body[data-theme="light"] .input-icon {
  color: rgba(24, 35, 63, 0.78);
}

.input-shell input {
  width: 100%;
  height: 60px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--field-text);
  font-size: 1rem;
}

.input-shell input::placeholder {
  color: var(--field-placeholder);
}

.ghost-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(245, 247, 255, 0.86);
  cursor: pointer;
}

body[data-theme="light"] .ghost-button {
  background: rgba(34, 59, 153, 0.08);
  color: rgba(24, 35, 63, 0.76);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0 24px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(127, 152, 220, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
  transition: background 0.2s ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(4, 10, 30, 0.24);
  transition: transform 0.2s ease;
}

.checkbox-label input:checked + .switch-track {
  background: rgba(255, 223, 5, 0.4);
}

.checkbox-label input:checked + .switch-track .switch-thumb {
  transform: translateX(18px);
}

.actions a {
  color: var(--link);
  text-decoration: none;
  font-size: 0.95rem;
}

.actions a:hover {
  text-decoration: underline;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 16px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.submit-button:hover {
  filter: brightness(1.03);
}

.feedback {
  min-height: 22px;
  margin: 14px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.feedback.error {
  color: var(--feedback-error);
}

.feedback.success {
  color: var(--feedback-success);
}

.support {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--support);
}

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

  .brand-panel {
    min-height: 320px;
    padding-bottom: 90px;
  }

  .brand-copy::after {
    left: -10%;
    right: -25%;
    bottom: -200px;
  }

  .login-panel {
    padding: 24px 20px 36px;
  }

  .login-card {
    margin-top: -70px;
  }
}

@media (max-width: 640px) {
  .brand-panel {
    padding: 28px 22px 84px;
  }

  .brand-logo {
    width: min(210px, 60%);
  }

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

  .brand-description {
    font-size: 1rem;
  }

  .login-panel {
    padding: 16px 14px 26px;
  }

  .login-card {
    margin-top: -58px;
    padding: 24px 20px;
    border-radius: 26px;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
