:root {
  color-scheme: dark;
  font-family: "Segoe UI Variable Display", "Aptos Display", "Segoe UI", system-ui, sans-serif;
  background: #07162a;
  color: #eef7fb;
}

* { box-sizing: border-box; }

body {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 80% 8%, rgb(0 229 255 / 14%), transparent 26rem),
    radial-gradient(circle at 10% 96%, rgb(123 92 255 / 13%), transparent 27rem),
    #07162a;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 32px;
}

.login-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(390px, 0.86fr);
  width: min(100%, 1120px);
  min-height: 660px;
  overflow: hidden;
  border: 1px solid rgb(166 219 231 / 20%);
  border-radius: 24px;
  background: #0a1d35;
  box-shadow: 0 28px 90px rgb(0 7 20 / 45%);
}

.signal-panel {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 38px 42px;
  background:
    radial-gradient(circle at 58% 49%, rgb(0 229 255 / 16%), transparent 16rem),
    radial-gradient(circle at 20% 92%, rgb(255 0 200 / 12%), transparent 18rem),
    linear-gradient(145deg, #0a1d35 0%, #0d3151 100%);
}

.signal-panel::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(rgb(165 220 233 / 4%) 1px, transparent 1px), linear-gradient(90deg, rgb(165 220 233 / 4%) 1px, transparent 1px);
  background-size: 46px 46px;
  content: "";
  mask-image: linear-gradient(to bottom, rgb(0 0 0 / 72%), transparent 78%);
}

.signal-panel__top,
.signal-copy,
.signal-visual,
.signal-route { position: relative; z-index: 1; }

.signal-panel__top { display: flex; align-items: center; gap: 13px; }

.itc-logo {
  width: 154px;
  height: auto;
  object-fit: contain;
}

.portal-label {
  padding: 5px 8px;
  border: 1px solid rgb(180 232 240 / 24%);
  border-radius: 7px;
  color: #b9d5de;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.signal-copy { max-width: 410px; margin-top: 94px; }

.eyebrow {
  margin: 0;
  color: #58e6f5;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.signal-copy h2,
h1 {
  margin: 12px 0 0;
  color: #f2fbff;
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.signal-copy h2 { max-width: 430px; font-size: clamp(34px, 4.1vw, 48px); }

.signal-copy > p:last-child {
  max-width: 380px;
  margin: 16px 0 0;
  color: #aac4ce;
  font-size: 15px;
  line-height: 1.55;
}

.signal-visual {
  flex: 1;
  min-height: 230px;
  margin: 16px -8px 0;
}

.signal-orbit,
.camera-unit,
.relay-unit,
.signal-node,
.signal-beam { position: absolute; }

.signal-orbit {
  left: 50%;
  top: 51%;
  border: 1px solid rgb(104 233 247 / 22%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.signal-orbit--one { width: 190px; height: 190px; }
.signal-orbit--two { width: 286px; height: 136px; transform: translate(-50%, -50%) rotate(-28deg); }

.signal-beam {
  left: calc(50% - 72px);
  top: calc(51% - 2px);
  width: 147px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #56e8f6 48%, transparent);
  box-shadow: 0 0 16px rgb(0 229 255 / 55%);
  transform: rotate(-28deg);
}

.camera-unit,
.relay-unit {
  display: grid;
  place-items: center;
  width: 64px;
  height: 50px;
  border: 1px solid rgb(183 243 250 / 48%);
  border-radius: 12px;
  background: linear-gradient(145deg, rgb(24 77 105 / 95%), rgb(9 39 69 / 95%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), 0 12px 30px rgb(0 7 20 / 32%);
}

.camera-unit { left: 19%; top: 53%; transform: translateY(-50%) rotate(-7deg); }
.relay-unit { right: 16%; top: 34%; transform: translateY(-50%) rotate(7deg); }

.camera-unit::after {
  width: 16px;
  height: 16px;
  border: 4px solid #80f2fb;
  border-radius: 50%;
  box-shadow: 0 0 14px rgb(0 229 255 / 52%);
  content: "";
}

.camera-unit i {
  position: absolute;
  right: -15px;
  width: 16px;
  height: 22px;
  border: 1px solid rgb(183 243 250 / 46%);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: #12486f;
}

.camera-unit b,
.relay-unit b { display: none; }

.relay-unit::after {
  width: 24px;
  height: 18px;
  border: 2px solid #80f2fb;
  border-radius: 5px;
  box-shadow: inset 0 0 0 4px #12486f;
  content: "";
}

.relay-unit i {
  position: absolute;
  bottom: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #55effb;
  box-shadow: 0 0 8px #55effb;
}

.signal-node {
  width: 9px;
  height: 9px;
  border: 2px solid #aaf7ff;
  border-radius: 50%;
  background: #0f4568;
  box-shadow: 0 0 0 6px rgb(0 229 255 / 8%);
}

.signal-node--one { left: 39%; top: 23%; }
.signal-node--two { right: 24%; bottom: 9%; }
.signal-node--three { left: 49%; bottom: 16%; }

.signal-route {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: #a9cbd5;
  font-size: 11px;
  font-weight: 650;
}

.signal-route i {
  display: block;
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, #54e7f6, rgb(84 231 246 / 24%));
}

.login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgb(104 218 235 / 10%), transparent 19rem),
    #fbfcfd;
  color: #1c3448;
}

.login-panel::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #00cfe4, #8f67ff 58%, #e14ccd);
  content: "";
}

.login-panel__intro { max-width: 350px; }
.login-panel .eyebrow { color: #0d788c; }

h1 {
  color: #122b43;
  font-size: clamp(30px, 3vw, 39px);
  font-weight: 720;
  letter-spacing: -0.052em;
}

.login-panel__intro > p:last-child {
  margin: 14px 0 0;
  color: #5e7384;
  font-size: 14px;
  line-height: 1.55;
}

.form-error {
  margin: 28px 0 -4px;
  padding: 11px 12px;
  border: 1px solid #eab7c0;
  border-left: 3px solid #b93a4d;
  border-radius: 8px;
  color: #892a39;
  background: #fff0f2;
  font-size: 12.5px;
  line-height: 1.4;
}

.form-error[hidden] { display: none; }

form { display: grid; gap: 19px; margin-top: 34px; }

label {
  display: grid;
  gap: 7px;
  position: relative;
}

label > span {
  color: #3b556a;
  font-size: 12px;
  font-weight: 720;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #d4dfe6;
  border-radius: 9px;
  outline: none;
  color: #172f43;
  background:
    radial-gradient(circle at 50% 120%, rgb(0 207 228 / 0%), transparent 70%),
    #ffffff;
  font: inherit;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease, background 340ms ease;
}

input::placeholder { color: #94a6b3; }

label:hover input {
  border-color: #90cbd5;
  background:
    radial-gradient(circle at 50% 120%, rgb(0 207 228 / 11%), transparent 70%),
    #ffffff;
  box-shadow: 0 8px 22px rgb(27 89 112 / 7%);
}

label:focus-within input {
  border-color: #00aabd;
  background:
    radial-gradient(circle at 50% 120%, rgb(0 207 228 / 16%), transparent 70%),
    #ffffff;
  box-shadow: 0 0 0 4px rgb(0 174 194 / 13%), 0 10px 25px rgb(27 89 112 / 9%);
  transform: translateY(-1px);
}

button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 48px;
  margin-top: 4px;
  border: 1px solid #17384e;
  border-radius: 9px;
  color: #ffffff;
  background: #17384e;
  box-shadow: 0 10px 24px rgb(15 53 73 / 17%);
  font: inherit;
  font-size: 13.5px;
  font-weight: 760;
  cursor: pointer;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease, background 200ms ease;
}

button::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, #17384e 20%, #007f95 48%, #17384e 76%);
  background-size: 220% 100%;
  content: "";
  transition: background-position 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

button span {
  display: inline-block;
  margin-left: 5px;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

button:hover { border-color: #008da3; box-shadow: 0 13px 30px rgb(0 139 163 / 25%); }
button:hover::before { background-position: 100% 50%; }
button:hover span { transform: translateX(4px); }
button:active { transform: translateY(1px) scale(0.99); }
button:focus-visible { outline: 3px solid rgb(0 158 181 / 35%); outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .signal-orbit--one { animation: breathe 5.5s ease-in-out infinite; }
  .signal-orbit--two { animation: orbit-turn 15s linear infinite; }
  .signal-beam { animation: beam-pulse 3.2s ease-in-out infinite; }
  .signal-node { animation: node-pulse 3s ease-in-out infinite; }
  .signal-node--two { animation-delay: 0.8s; }
  .signal-node--three { animation-delay: 1.6s; }
  .camera-unit { animation: device-float 5s ease-in-out infinite; }
  .relay-unit { animation: relay-float 5.6s ease-in-out infinite; }
  .login-panel__intro { animation: reveal-up 520ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .login-panel form { animation: reveal-up 560ms 90ms cubic-bezier(0.16, 1, 0.3, 1) both; }
}

@keyframes breathe { 50% { opacity: 0.48; transform: translate(-50%, -50%) scale(1.07); } }
@keyframes orbit-turn { to { transform: translate(-50%, -50%) rotate(332deg); } }
@keyframes beam-pulse { 50% { opacity: 0.32; filter: brightness(0.65); } }
@keyframes node-pulse { 50% { box-shadow: 0 0 0 10px rgb(0 229 255 / 0%), 0 0 13px rgb(0 229 255 / 58%); } }
@keyframes device-float { 50% { transform: translateY(calc(-50% - 7px)) rotate(-3deg); } }
@keyframes relay-float { 50% { transform: translateY(calc(-50% - 6px)) rotate(3deg); } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 760px) {
  .login-shell { display: block; padding: 16px; }
  .login-frame { display: block; min-height: auto; border-radius: 18px; }
  .signal-panel { min-height: 250px; padding: 28px 26px; }
  .signal-copy { margin-top: 50px; }
  .signal-copy h2 { max-width: 300px; font-size: 32px; }
  .signal-copy > p:last-child { display: none; }
  .signal-visual { position: absolute; inset: 0; margin: 0; opacity: 0.56; pointer-events: none; }
  .signal-route { display: none; }
  .login-panel { min-height: 455px; padding: 34px 26px; }
}

@media (max-width: 420px) {
  .login-shell { padding: 0; }
  .login-frame { border-right: 0; border-left: 0; border-radius: 0; }
  .signal-panel { min-height: 232px; }
  .itc-logo { width: 138px; }
  .portal-label { display: none; }
  .login-panel { padding: 32px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
