:root {
  --bg: #020914;
  --panel: #041124;
  --panel-soft: rgba(5, 20, 40, .82);
  --line: rgba(79, 157, 219, .34);
  --line-bright: #087cd5;
  --text: #f4f8ff;
  --muted: #91a5c1;
  --cyan: #17d8f0;
  --blue: #0b75e7;
  --blue-light: #19baff;
  --danger: #ff6b7f;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
a { color: inherit; }

.login-page {
  min-height: calc(100vh - 42px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(520px, .96fr);
  background:
    radial-gradient(circle at 75% 52%, rgba(5, 91, 190, .18), transparent 38%),
    #020914;
}

.visual-panel {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background-image: url("../img/login-command-center.png");
  background-position: left center;
  background-size: cover;
}
.visual-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 62%, #020914 100%),
    linear-gradient(180deg, rgba(0, 8, 22, .08), rgba(0, 8, 22, .48));
}
.visual-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 30% 42%, transparent 0 32%, rgba(0, 7, 18, .12) 72%);
}
.visual-copy {
  position: absolute;
  z-index: 2;
  left: clamp(28px, 5vw, 82px);
  bottom: clamp(34px, 6vh, 74px);
  width: min(560px, calc(100% - 70px));
  padding: 24px;
  border: 1px solid rgba(71, 169, 238, .24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 10, 26, .74), rgba(3, 31, 61, .45));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  backdrop-filter: blur(8px);
}
.eyebrow {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}
.visual-copy h1 {
  margin: 12px 0 10px;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.08;
}
.visual-copy p {
  margin: 0;
  max-width: 520px;
  color: #b9c9dc;
  line-height: 1.7;
}
.visual-stats {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.visual-stats div {
  min-width: 100px;
  padding: 11px 14px;
  border: 1px solid rgba(73, 160, 224, .24);
  border-radius: 11px;
  background: rgba(1, 17, 35, .55);
}
.visual-stats strong, .visual-stats span { display: block; }
.visual-stats strong { color: #e8f7ff; font-size: 15px; }
.visual-stats span { margin-top: 3px; color: #7fa0bf; font-size: 10px; text-transform: uppercase; }

.auth-panel {
  position: relative;
  min-height: 760px;
  display: grid;
  place-items: center;
  padding: 42px clamp(28px, 5vw, 82px) 54px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2, 11, 27, .89), rgba(1, 9, 22, .96)),
    radial-gradient(circle at 66% 38%, rgba(0, 118, 255, .17), transparent 38%);
}
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .48;
  background-image:
    linear-gradient(rgba(31, 116, 210, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 116, 210, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent);
}
.ambient { position: absolute; border-radius: 50%; filter: blur(75px); opacity: .26; }
.ambient-one { width: 340px; height: 340px; right: -160px; top: 22%; background: #096eff; }
.ambient-two { width: 280px; height: 280px; left: -150px; bottom: 4%; background: #09c8ef; }
.auth-shell { position: relative; z-index: 2; width: min(100%, 530px); }
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 35px;
}
.brand-mark { width: 105px; height: 105px; filter: drop-shadow(0 0 17px rgba(20, 170, 255, .23)); }
.brand-name { font-size: clamp(32px, 3vw, 48px); font-weight: 700; letter-spacing: -.045em; color: #1260b2; }
.brand-name span { color: var(--blue-light); }
.brand-subtitle { margin-top: 2px; color: #8ba8ce; font-size: 26px; letter-spacing: .01em; }

.login-card {
  position: relative;
  padding: 36px 40px 30px;
  border: 1px solid rgba(20, 142, 239, .9);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(4, 19, 39, .86), rgba(2, 14, 31, .92));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .36), inset 0 1px rgba(255, 255, 255, .025);
  backdrop-filter: blur(18px);
}
.card-glow {
  position: absolute;
  width: 82px;
  height: 3px;
  left: 30px;
  top: -2px;
  border-radius: 20px;
  background: linear-gradient(90deg, transparent, #44ccff, transparent);
  box-shadow: 0 0 16px #2ab7ff;
}
.card-heading { text-align: center; margin-bottom: 29px; }
.card-heading h2 { margin: 0 0 10px; color: var(--cyan); font-size: 27px; }
.card-heading p { margin: 0 auto; max-width: 380px; color: #c6d2e2; line-height: 1.65; font-size: 14px; }
.alert {
  margin: -8px 0 18px;
  padding: 11px 13px;
  color: #ffc2cb;
  border: 1px solid rgba(255, 107, 127, .34);
  border-radius: 10px;
  background: rgba(255, 76, 103, .09);
  font-size: 13px;
}
.field {
  min-height: 61px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  border: 1px solid rgba(117, 155, 194, .28);
  border-radius: 11px;
  background: linear-gradient(115deg, rgba(11, 36, 63, .78), rgba(8, 26, 49, .62));
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.field:focus-within {
  border-color: #129bff;
  box-shadow: 0 0 0 3px rgba(12, 139, 234, .11), 0 0 22px rgba(0, 133, 255, .08);
  transform: translateY(-1px);
}
.field.invalid { border-color: var(--danger); }
.field + .field-error { min-height: 18px; }
.field-icon { width: 25px; height: 25px; flex: 0 0 auto; color: #9cb4d3; }
.field-icon svg, .password-toggle svg, .button-arrow, .sso-button svg, .security-note svg {
  width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.field input {
  width: 100%; min-width: 0; padding: 17px 0; border: 0; outline: 0; color: #f5f9ff; background: transparent; font-size: 15px;
}
.field input::placeholder { color: #70849f; opacity: 1; }
.password-toggle {
  width: 28px; height: 28px; padding: 3px; border: 0; color: #91aac8; background: transparent; cursor: pointer;
}
.password-toggle:hover { color: var(--cyan); }
.eye-closed { display: none; }
.password-toggle.visible .eye-open { display: none; }
.password-toggle.visible .eye-closed { display: block; }
.field-error { margin: 2px 3px 4px; color: #ff8fa0; font-size: 11px; }
.form-options { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 3px 0 24px; font-size: 13px; }
.form-options a { color: #16baff; text-decoration: none; }
.form-options a:hover { text-decoration: underline; }
.remember-control { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.remember-control input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox-ui { width: 20px; height: 20px; border: 1px solid #138cf0; border-radius: 4px; background: #05172a; }
.remember-control input:checked + .checkbox-ui { background: #087ee5; box-shadow: inset 0 0 0 4px #05172a; }
.login-button, .sso-button {
  width: 100%; min-height: 60px; border-radius: 11px; display: flex; align-items: center; justify-content: center; gap: 14px; text-decoration: none; cursor: pointer;
}
.login-button {
  position: relative;
  border: 0;
  color: white;
  background: linear-gradient(105deg, #0ca9ef 0%, #0877e6 60%, #075bc6 100%);
  box-shadow: 0 12px 28px rgba(0, 101, 229, .25), inset 0 1px rgba(255, 255, 255, .2);
  font-weight: 800;
  overflow: hidden;
}
.login-button::before { content: ""; position: absolute; inset: 0; transform: translateX(-105%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); transition: transform .65s ease; }
.login-button:hover::before { transform: translateX(105%); }
.login-button:hover { filter: brightness(1.08); }
.login-button:disabled { cursor: wait; opacity: .75; }
.button-arrow { width: 24px; height: 24px; }
.spinner { display: none; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
.login-button.loading .button-label, .login-button.loading .button-arrow { display: none; }
.login-button.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.divider { display: flex; align-items: center; gap: 17px; margin: 23px 0; color: #8ca0ba; font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(144, 170, 202, .35)); }
.divider::after { transform: rotate(180deg); }
.sso-button { border: 1px solid #058df4; color: #1ebcf9; background: rgba(3, 14, 29, .45); font-weight: 600; }
.sso-button:hover { background: rgba(7, 92, 168, .14); box-shadow: 0 0 22px rgba(0, 137, 255, .09); }
.sso-button svg { width: 23px; height: 23px; }
.security-note { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 26px; color: #a7bad3; }
.security-note svg { width: 29px; height: 29px; color: #87a8ca; }
.security-note p { margin: 0; font-size: 12px; line-height: 1.55; }
.security-note span { color: #859ab4; }
.page-footer {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 10px 20px;
  border-top: 1px solid rgba(106, 146, 190, .16);
  color: #7d91ad;
  background: #020914;
  font-size: 12px;
}

@media (max-width: 1050px) {
  .login-page { grid-template-columns: .9fr 1.1fr; }
  .visual-copy { display: none; }
  .auth-panel { padding-inline: 32px; }
}
@media (max-width: 820px) {
  .login-page { display: block; min-height: calc(100vh - 42px); }
  .visual-panel { position: fixed; inset: 0 0 42px; min-height: 0; opacity: .3; background-position: 28% center; }
  .visual-panel::after { background: rgba(0, 7, 18, .68); }
  .auth-panel { min-height: calc(100vh - 42px); padding: 28px 18px 38px; background: linear-gradient(180deg, rgba(1, 9, 22, .5), rgba(1, 9, 22, .76)); }
  .brand { margin-bottom: 22px; }
  .brand-mark { width: 76px; height: 76px; }
  .brand-name { font-size: 34px; }
  .brand-subtitle { font-size: 20px; }
}
@media (max-width: 560px) {
  .login-card { padding: 29px 20px 24px; border-radius: 19px; }
  .card-heading h2 { font-size: 24px; }
  .form-options { align-items: flex-start; }
  .brand { gap: 10px; }
  .brand-mark { width: 64px; height: 64px; }
  .brand-name { font-size: 29px; }
  .brand-subtitle { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
