:root {
  color-scheme: dark;
  --login-ink: #f5f8ff;
  --login-muted: #aab8cc;
  --login-line: rgba(190, 211, 239, .2);
  --login-accent: #f6c453;
}

* { box-sizing: border-box; }

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

body.login-page {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--login-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101a28 url('new_portal_background.jpg') center / cover fixed no-repeat;
}

body.login-page::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(8, 18, 31, .86), rgba(13, 27, 45, .56) 48%, rgba(7, 15, 27, .84)),
    radial-gradient(circle at 50% 22%, rgba(79, 126, 174, .2), transparent 40%);
  content: "";
}

body.login-page::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  content: "";
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
}

.login-card {
  width: min(100%, 440px);
  padding: 38px;
  border: 1px solid var(--login-line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(18, 35, 56, .88), rgba(10, 21, 36, .82));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px);
}

.login-brand {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 32px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid rgba(246, 196, 83, .42);
  border-radius: 14px;
  background: rgba(246, 196, 83, .12);
  color: var(--login-accent);
}

.brand-mark svg,
.input-icon,
.btn-grad svg,
.eye-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.login-eyebrow {
  margin: 1px 0 5px;
  color: var(--login-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1 {
  margin: 0;
  color: var(--login-ink);
  font-size: clamp(30px, 6vw, 38px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.05;
}

.login-subtitle {
  max-width: 31ch;
  margin: 10px 0 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.5;
}

.input-group { margin-bottom: 19px; }

.input-group label {
  display: block;
  margin-bottom: 8px;
  color: #d8e2f2;
  font-size: 13px;
  font-weight: 650;
}

.input-control {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  z-index: 1;
  width: 19px;
  height: 19px;
  color: #91a7c2;
  pointer-events: none;
}

.input-control input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(174, 199, 229, .2);
  border-radius: 12px;
  outline: none;
  padding: 0 15px 0 47px;
  color: var(--login-ink);
  background: rgba(7, 16, 28, .48);
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.input-control input::placeholder { color: #71839b; }

.input-control input:hover { border-color: rgba(174, 199, 229, .38); }

.input-control input:focus {
  border-color: var(--login-accent);
  background: rgba(7, 16, 28, .68);
  box-shadow: 0 0 0 4px rgba(246, 196, 83, .12);
}

.password-toggle {
  position: absolute;
  right: 9px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #91a7c2;
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  outline: none;
  color: var(--login-accent);
  background: rgba(246, 196, 83, .1);
}

.eye-icon-hidden,
.password-toggle[aria-pressed="true"] .eye-icon-visible { display: none; }

.password-toggle[aria-pressed="true"] .eye-icon-hidden { display: block; }

.login_warning {
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 125, 125, .38);
  border-radius: 9px;
  color: #ffc1c1;
  background: rgba(151, 39, 55, .2);
  font-size: 12px;
  line-height: 1.45;
}

.btn-grad {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  border: 1px solid rgba(255, 239, 177, .95) !important;
  border-radius: 12px;
  padding: 0 20px;
  color: #152337;
  background: linear-gradient(100deg, #d99b2b 0%, #f3be45 48%, #ffe58b 100%);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 12px 25px rgba(232, 171, 52, .2);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-grad svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  transition: transform .18s ease;
}

.btn-grad:hover {
  filter: brightness(1.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), 0 16px 30px rgba(232, 171, 52, .3);
  transform: translateY(-2px);
}

.btn-grad:hover svg { transform: translateX(3px); }

.btn-grad:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .9);
  outline-offset: 3px;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 25px 0 0;
  color: #8fa4be;
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6bd29a;
  box-shadow: 0 0 0 4px rgba(107, 210, 154, .12);
}

@media (max-width: 520px) {
  .login-shell { padding: 18px 14px; }
  .login-card { padding: 28px 22px; border-radius: 20px; }
  .login-brand { margin-bottom: 27px; }
}

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