.k43-access {
  --access-ink: #f6f8ff;
  --access-muted: #b1c2dd;
  --access-cyan: #4ce6ff;
  color-scheme: dark;
  margin: 0;
  background: #030615;
  color: var(--access-ink);
  font: 1rem/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.k43-access *, .k43-access *::before, .k43-access *::after { box-sizing: border-box; }
.k43-access button, .k43-access input { font-family: inherit; font-size: inherit; }
.k43-access [hidden] { display: none !important; }
.k43-access :focus-visible { outline: 2px solid #8cefff; outline-offset: 4px; }
.k43-access svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.access-scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 11%, #0a2a59 0, transparent 48%),
    radial-gradient(ellipse at 99% 39%, #211347 0, transparent 40%),
    radial-gradient(ellipse at 65% 136%, #101c53 0, transparent 54%),
    linear-gradient(136deg, #050d26, #020512 67%, #070c27);
}

.access-globe {
  position: absolute;
  top: 50%;
  left: 28.5%;
  width: clamp(600px, min(64vw, 111vh), 1060px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.access-globe img, .access-globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.access-waves {
  position: absolute;
  inset: 0;
  background: url("../img/k43-login-waves.svg") center bottom / cover no-repeat;
}

.access-layout {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.access-card {
  width: min(100%, 570px);
  min-width: 0;
  padding: clamp(27px, 4vw, 53px);
  border: 1px solid transparent;
  border-radius: clamp(21px, 2.7vw, 34px);
  background:
    radial-gradient(ellipse at 0 0, #123f7180, transparent 50%) padding-box,
    radial-gradient(ellipse at 100% 100%, #0059887a, transparent 43%) padding-box,
    radial-gradient(ellipse at 100% 0, #57318854, transparent 42%) padding-box,
    linear-gradient(153deg, #06162de8, #050b1aee 58%, #0b1126e8) padding-box,
    linear-gradient(142deg, #3474ac, #42caff 26%, #9952d7 50%, #243668 72%, #1ad6f2) border-box;
  box-shadow: 0 30px 90px #00030cbf, inset 0 1px #b1ddff2b, 0 0 35px #0c57be25;
  -webkit-backdrop-filter: blur(11px);
  backdrop-filter: blur(11px);
}

.access-header { display: grid; justify-items: center; margin-bottom: clamp(19px, 3.2vh, 31px); text-align: center; }
.access-brand-image {
  display: block;
  width: clamp(77px, 12vh, 106px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 0 9px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px #23bbfa80);
}
.access-header h1 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(1.7rem, 4.5vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -.043em;
  line-height: 1.09;
  overflow-wrap: anywhere;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .access-header h1 {
    background: linear-gradient(99deg, #f7faff 63%, #34ddff 83%, #39b9f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.access-header p { margin: 6px 0 0; color: var(--access-muted); font-size: clamp(.94rem, 2.5vw, 1.16rem); }

.access-form { display: grid; gap: 14px; }
.access-field { position: relative; min-width: 0; }
.access-field input {
  display: block;
  width: 100%;
  height: 57px;
  padding: 16px 15px 4px 49px;
  border: 1px solid #4c638b;
  border-radius: 14px;
  color: var(--access-ink);
  background: linear-gradient(112deg, #101e33e6, #0a162be6);
  box-shadow: inset 0 1px #92c2ff16;
  font-size: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
  scroll-margin-block: 14px;
}
.access-field-password input { padding-right: 54px; }
.access-field input:focus {
  border-color: #79d9ff;
  outline: none;
  box-shadow: 0 0 0 3px #1ba9e72e, inset 0 1px #92c2ff28;
}
.access-field input:autofill {
  -webkit-text-fill-color: var(--access-ink);
  box-shadow: 0 0 0 100px #10223d inset;
}
.access-field label {
  position: absolute;
  inset-inline-start: 49px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--access-muted);
  font-size: 1rem;
  line-height: 1.15;
  cursor: text;
  transition: top .16s ease, font-size .16s ease, color .16s ease;
}
.access-field input:focus + label, .access-field input:not(:placeholder-shown) + label {
  top: 13px;
  font-size: .71rem;
  font-weight: 600;
}
.access-field input:focus + label { color: #a9edff; }
.access-field-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 15px;
  transform: translateY(-50%);
  color: #b6c9ee;
  pointer-events: none;
}
.access-password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 5px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #bac9e6;
  cursor: pointer;
}
.access-password-toggle:hover { background: #b4d6ff15; color: var(--access-ink); }
.access-field-password:has(.access-password-toggle[hidden]) input { padding-right: 15px; }
.access-field-password input[type="text"] ~ .access-password-toggle .access-eye-slash { display: none; }

.access-submit {
  position: relative;
  width: 100%;
  min-height: 56px;
  margin-top: 7px;
  padding: 10px 48px;
  border: 1px solid #79b8fb9c;
  border-radius: 14px;
  background: linear-gradient(112deg, #087d9d, #0659cf 44%, #4333db 73%, #7936cd);
  box-shadow: 0 7px 23px #0969fa47, inset 0 1px 5px #d9f7ff3b;
  color: #fff;
  font-weight: 740;
  cursor: pointer;
  transition: filter .18s ease, box-shadow .18s ease, transform .16s ease;
}
.access-submit:hover { filter: brightness(1.15); box-shadow: 0 8px 26px #1269f571, inset 0 1px 5px #d9f7ff50; }
.access-submit:active { transform: translateY(1px); }
.access-submit svg {
  position: absolute;
  top: 50%;
  inset-inline-end: 16px;
  transform: translateY(-50%);
  stroke-width: 2.15;
}

.access-error {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 13px;
  padding: 10px 12px;
  border: 1px solid #b8637a;
  border-radius: 10px;
  color: #ffdbe4;
  background: #391d34;
  font-size: .85rem;
}
.access-error svg { width: 19px; height: 19px; flex: none; }
.access-footer {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 25px;
  text-align: center;
}
.access-footer::before, .access-footer::after { content: ""; flex: 1; height: 1px; background: #91b2ea44; }
.access-footer a { display: inline-flex; align-items: center; gap: 5px; color: var(--access-muted); text-decoration: none; font-size: .86rem; }
.access-footer a:hover { color: var(--access-cyan); text-decoration: underline; text-underline-offset: .22em; }
.access-footer svg { width: 14px; height: 14px; }

@media (max-width: 767px) {
  .access-globe { left: 24%; width: clamp(450px, 115vw, 730px); }
  .access-waves { background-position: 43% bottom; opacity: .78; }
  .access-card { width: min(100%, 488px); }
}

@media (max-width: 390px) {
  .access-card { padding-inline: 19px; }
  .access-layout { padding-inline: max(12px, min(env(safe-area-inset-left), env(safe-area-inset-right))); }
  .access-field input, .access-submit { min-height: 53px; }
}

@media (max-height: 530px) {
  .access-card { padding-block: 19px; }
  .access-header { margin-bottom: 16px; }
  .access-brand-image { width: 64px; margin-bottom: 5px; }
  .access-form { gap: 10px; }
  .access-footer { margin-top: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .access-field input, .access-field label, .access-submit { transition: none; }
  .access-submit:active { transform: none; }
}
