:root {
  --night: #030b16;
  --panel: rgba(7, 27, 47, 0.9);
  --line: rgba(112, 191, 255, 0.25);
  --text: #f3f8fc;
  --muted: #91a8ba;
  --cyan: #1fc8ff;
  --blue: #2871ff;
  --lime: #a8ff32;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--night); color: var(--text); font-family: Inter, Arial, sans-serif; }

.access-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(430px, 0.85fr);
  isolation: isolate;
  overflow: hidden;
  background-image: linear-gradient(90deg, rgba(2, 10, 20, 0.7), rgba(2, 12, 23, 0.35) 48%, rgba(2, 9, 18, 0.85)), url("../images/vtic-technology-access-bg.png");
  background-size: cover;
  background-position: center;
  animation: technology-drift 22s ease-in-out infinite alternate;
}

.access-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.25;
  pointer-events: none;
  background-image: linear-gradient(rgba(45, 158, 222, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(45, 158, 222, 0.14) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000, transparent 65%);
  animation: data-grid-flow 18s linear infinite;
}

.access-shell::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 44% 54%, rgba(49, 220, 255, 0.42) 0, rgba(15, 158, 239, 0.12) 9%, transparent 24%),
    radial-gradient(circle at 62% 30%, rgba(48, 143, 255, 0.26) 0, transparent 18%),
    linear-gradient(105deg, transparent 32%, rgba(98, 221, 255, 0.12) 46%, transparent 58%);
  mix-blend-mode: screen;
  filter: blur(8px);
  animation: energy-flow 9s ease-in-out infinite alternate;
}

.brand-panel {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: clamp(36px, 5vw, 76px) clamp(34px, 7vw, 112px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 54%;
  left: 82%;
  width: clamp(260px, 34vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(191, 250, 255, 0.82) 0,
    rgba(31, 210, 255, 0.48) 7%,
    rgba(26, 139, 255, 0.2) 21%,
    transparent 60%
  );
  mix-blend-mode: screen;
  filter: blur(10px);
  transform: translate(-50%, -50%) scale(0.84);
  animation: core-beacon 3.6s ease-in-out infinite;
}

.brand-panel::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -15%;
  bottom: -15%;
  left: -28%;
  width: 20%;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(90, 226, 255, 0.06) 30%,
    rgba(144, 241, 255, 0.38) 50%,
    rgba(90, 226, 255, 0.06) 70%,
    transparent
  );
  mix-blend-mode: screen;
  filter: blur(15px);
  transform: skewX(-12deg);
  animation: network-scan 7s linear infinite;
}

.brand-panel > * {
  position: relative;
  z-index: 1;
}

.brand-mark { width: max-content; display: inline-flex; }
.brand-mark img {
  width: clamp(150px, 13vw, 220px);
  height: 74px;
  display: block;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: screen;
  filter: saturate(1.2) brightness(1.15);
}

.brand-message { max-width: 700px; padding: 70px 0 50px; }
.eyebrow, .portal-label { margin: 0; color: var(--cyan); font: 500 11px/1.4 "DM Mono", monospace; letter-spacing: 0.16em; }
.eyebrow { display: flex; align-items: center; gap: 14px; }
.eyebrow span { width: 34px; height: 1px; background: var(--cyan); }
.brand-message h1 { max-width: 700px; margin: 24px 0; font-size: clamp(48px, 5vw, 82px); line-height: 0.98; letter-spacing: -0.065em; text-wrap: balance; }
.brand-copy { max-width: 620px; margin: 0; color: #afc0ce; font-size: clamp(14px, 1.15vw, 17px); line-height: 1.75; }

.system-metrics { max-width: 650px; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(173, 215, 242, 0.25); }
.system-metrics div { padding: 22px 22px 0 0; }
.system-metrics div + div { padding-left: 22px; border-left: 1px solid rgba(173, 215, 242, 0.22); }
.system-metrics dt { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; }
.system-metrics dd { margin: 7px 0 0; color: #849bac; font: 10px/1.5 "DM Mono", monospace; text-transform: uppercase; }

.system-status { width: max-content; display: flex; align-items: center; gap: 10px; color: #7f98ab; font: 500 10px "DM Mono", monospace; letter-spacing: 0.1em; }
.system-status strong { color: var(--lime); font-weight: 500; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(168, 255, 50, 0.1), 0 0 16px var(--lime); animation: status-pulse 2.4s ease-in-out infinite; }

.login-panel { position: relative; z-index: 1; display: grid; place-items: center; padding: clamp(30px, 5vw, 82px); }
.login-panel::before { content: ""; position: absolute; inset: 5vh clamp(18px, 3vw, 54px); border: 1px solid rgba(74, 184, 255, 0.12); border-radius: 42px; background: linear-gradient(145deg, rgba(32, 87, 130, 0.2), rgba(3, 15, 27, 0.1)); backdrop-filter: blur(4px); }
.login-box { position: relative; z-index: 1; width: min(510px, 100%); margin-inline: auto; padding: clamp(34px, 4vw, 58px); border: 1px solid var(--line); border-radius: 28px; background: var(--panel); box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42); backdrop-filter: blur(22px); }
.login-box header {
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(145, 189, 220, 0.19);
  background: transparent !important;
  color: var(--text);
}

:root[data-theme="dark"] .login-box header {
  border-color: rgba(145, 189, 220, 0.19);
  background: transparent !important;
}
.login-box h2 { margin: 16px 0 10px; font-size: clamp(36px, 3.2vw, 52px); line-height: 1.03; letter-spacing: -0.055em; }
.login-box header > span { color: var(--muted); font-size: 13px; line-height: 1.6; }

.alert { margin-top: 22px; padding: 13px 15px; border: 1px solid rgba(255, 107, 115, 0.35); border-left: 3px solid #ff6b73; background: rgba(112, 18, 28, 0.28); color: #ffdadd; font-size: 12px; }
.alert.success { border-color: rgba(168, 255, 50, 0.35); border-left-color: var(--lime); background: rgba(60, 100, 18, 0.22); color: #e4ffc0; }
.login-box form { margin-top: 30px; display: grid; gap: 20px; }
.login-box label { display: grid; gap: 9px; }
.login-box label > span { color: #a9bdcc; font: 500 10px "DM Mono", monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.login-box .remember-session {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: max-content;
  max-width: 100%;
  cursor: pointer;
}
.login-box .remember-session input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 4px;
  box-shadow: none;
  accent-color: var(--blue);
}
.login-box .remember-session > span {
  display: grid;
  gap: 4px;
  color: #d9e6ee;
  letter-spacing: 0;
  text-transform: none;
}
.remember-session b {
  font-size: 11px;
}
.remember-session small {
  color: #7891a4;
  font-size: 9px;
  font-weight: 400;
}
.login-box input { width: 100%; height: 58px; padding: 0 17px; border: 1px solid rgba(140, 190, 225, 0.25); border-radius: 10px; outline: 0; background: rgba(238, 247, 255, 0.96); color: #0a2033; font: 500 13px Inter, Arial, sans-serif; transition: border-color 160ms ease, box-shadow 160ms ease; }
.login-box input::placeholder { color: #8295a5; }
.login-box input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(31, 200, 255, 0.14); }
.password-control { position: relative; display: flex; }
.password-control input { padding-right: 70px; }
.login-box .password-control button { position: absolute; right: 7px; top: 7px; width: 55px; height: 44px; border: 0; border-radius: 7px; background: transparent; color: #1b63b8; font: 700 10px Inter, Arial, sans-serif; cursor: pointer; }
.submit-button { height: 58px; margin-top: 6px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 10px; background: linear-gradient(90deg, var(--blue), #12bae2); color: white; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease; }
.submit-button:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(24, 146, 236, 0.26); }
.submit-button span { font-size: 18px; }

.login-footer { margin-top: 28px; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid rgba(145, 189, 220, 0.15); }
.login-footer a, .login-footer span { color: #7f98aa; font-size: 10px; text-decoration: none; }
.login-footer a:hover { color: var(--cyan); }

@keyframes technology-drift {
  0% {
    background-position: 48% center;
  }
  100% {
    background-position: 53% center;
  }
}

@keyframes data-grid-flow {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 72px 72px, 72px 72px;
  }
}

@keyframes energy-flow {
  0% {
    opacity: 0.42;
    transform: translate3d(-3%, 2%, 0) scale(0.96);
  }
  55% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.5;
    transform: translate3d(5%, -3%, 0) scale(1.08);
  }
}

@keyframes status-pulse {
  0%, 100% {
    opacity: 0.65;
    transform: scale(0.86);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@keyframes core-beacon {
  0%,
  100% {
    opacity: 0.42;
    transform: translate(-50%, -50%) scale(0.82);
  }
  50% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes network-scan {
  0% {
    opacity: 0;
    transform: translateX(0) skewX(-12deg);
  }
  12% {
    opacity: 0.75;
  }
  78% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: translateX(720%) skewX(-12deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-shell,
  .access-shell::before,
  .access-shell::after,
  .brand-panel::before,
  .brand-panel::after,
  .status-dot {
    animation: none;
  }
}

@media (max-width: 1050px) {
  .access-shell { grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr); }
  .brand-panel { padding-inline: 50px; }
  .brand-message h1 { font-size: 52px; }
}

@media (max-width: 820px) {
  .access-shell { min-height: 100svh; grid-template-columns: 1fr; overflow: auto; background-position: 64% center; }
  .brand-panel { min-height: 410px; padding: 28px 28px 34px; }
  .brand-message { padding: 50px 0 30px; }
  .brand-message h1 { margin-block: 18px; font-size: clamp(42px, 12vw, 62px); }
  .system-metrics { margin-top: 28px; }
  .login-panel { padding: 22px 20px 46px; }
  .login-panel::before { display: none; }
  .login-box { width: min(600px, 100%); }
}

@media (max-width: 540px) {
  .brand-panel { min-height: 380px; }
  .brand-mark img { width: 145px; height: 56px; }
  .brand-message h1 { font-size: 43px; }
  .brand-copy { font-size: 13px; }
  .system-metrics div { padding-right: 10px; }
  .system-metrics div + div { padding-left: 10px; }
  .system-metrics dt { font-size: 19px; }
  .system-metrics dd { font-size: 8px; }
  .system-status { display: none; }
  .login-box { padding: 30px 22px; border-radius: 20px; }
  .login-box h2 { font-size: 36px; }
  .login-footer { align-items: flex-start; flex-direction: column; }
}
