:root {
  --white: #ffffff;
  --background-dark: #050505;

  --text-primary: rgba(255, 255, 255, 0.97);
  --text-secondary: rgba(255, 255, 255, 0.67);
  --text-placeholder: rgba(255, 255, 255, 0.36);

  --glass-background: rgba(255, 255, 255, 0.11);
  --glass-background-hover: rgba(255, 255, 255, 0.16);
  --glass-border: rgba(255, 255, 255, 0.24);
  --glass-border-soft: rgba(255, 255, 255, 0.14);

  --red: #ef3340;
  --red-dark: #a90f1d;
  --red-light: #ff6670;

  --danger-background: rgba(127, 29, 29, 0.32);
  --danger-border: rgba(248, 113, 113, 0.3);
  --danger-text: #fecaca;

  --card-radius: 36px;
  --input-radius: 18px;

  --shadow-large:
    0 40px 100px rgba(0, 0, 0, 0.55),
    0 8px 30px rgba(0, 0, 0, 0.24);

  --shadow-glass:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

body.page-loading {
  cursor: progress;
}

.page-preloader {
  position: fixed;
  inset: 0;
  z-index: 2400;

  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 14px;

  padding: 24px;

  visibility: hidden;
  pointer-events: none;

  overflow: hidden;

  backdrop-filter: blur(18px) saturate(175%);
  -webkit-backdrop-filter: blur(18px) saturate(175%);

  transition: visibility 0ms linear 720ms;
}

.page-preloader.is-visible {
  visibility: visible;
  pointer-events: auto;

  transition-delay: 0ms;
}

.page-preloader::before,
.page-preloader::after {
  content: "";

  position: absolute;
  left: 0;
  right: 0;
  z-index: 0;

  height: 50%;

  background: rgba(255, 255, 255, 0.76);

  backdrop-filter: blur(18px) saturate(175%);
  -webkit-backdrop-filter: blur(18px) saturate(175%);

  transition:
    transform 680ms cubic-bezier(0.76, 0, 0.24, 1),
    opacity 360ms ease;
}

.page-preloader::before {
  top: 0;
  transform: translateY(-100%);
}

.page-preloader::after {
  bottom: 0;
  transform: translateY(100%);
}

.page-preloader.is-visible::before,
.page-preloader.is-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.page-preloader-logo {
  position: relative;
  z-index: 1;

  width: 76px;
  height: 76px;

  object-fit: contain;

  filter: drop-shadow(0 18px 24px rgba(15, 23, 42, 0.14));

  opacity: 0;
  transform: translateY(14px) scale(0.9) rotate(-4deg);

  transition:
    opacity 180ms ease,
    transform 260ms cubic-bezier(0.2, 0.85, 0.25, 1);
  will-change: transform;
}

.page-preloader.is-visible .page-preloader-logo {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0);

  animation: pageLoaderLogoBounce 900ms cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.page-preloader-text {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 3px;

  text-align: center;
  line-height: 1.1;

  opacity: 0;
  transform: translateY(10px);

  transition:
    opacity 220ms ease 210ms,
    transform 340ms cubic-bezier(0.2, 0.85, 0.25, 1) 210ms;
}

.page-preloader.is-visible .page-preloader-text {
  opacity: 1;
  transform: translateY(0);
}

.page-preloader-text strong {
  font-size: 13px;
  font-weight: 760;
}

.page-preloader-text span {
  color: #64748b;

  font-size: 11px;
  font-weight: 650;
}

@keyframes pageLoaderLogoBounce {
  0% {
    filter: drop-shadow(0 14px 20px rgba(15, 23, 42, 0.13));
    transform: translateY(0) scale(1) rotate(0);
  }

  26% {
    filter: drop-shadow(0 28px 34px rgba(239, 51, 64, 0.2));
    transform: translateY(-14px) scale(1.06) rotate(2deg);
  }

  48% {
    filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.12));
    transform: translateY(0) scale(0.98) rotate(-1deg);
  }

  68% {
    filter: drop-shadow(0 20px 28px rgba(239, 51, 64, 0.14));
    transform: translateY(-6px) scale(1.025) rotate(1deg);
  }

  100% {
    filter: drop-shadow(0 14px 20px rgba(15, 23, 42, 0.13));
    transform: translateY(0) scale(1) rotate(0);
  }
}

.login-page {
  position: relative;

  min-height: 100vh;
  overflow-x: hidden;

  color: var(--text-primary);
  background: var(--background-dark);
}

.login-background {
  position: fixed;
  inset: -30px;
  z-index: 0;

  background-image: url("/images/login-background.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;

  filter: blur(1.5px);
  transform: scale(1.05);

  animation:
    backgroundEntrance 1.5s ease both,
    backgroundMovement 22s ease-in-out 1.5s infinite alternate;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;

  background:
    radial-gradient(
      circle at 50% 15%,
      rgba(255, 255, 255, 0.07),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0.52) 47%,
      rgba(0, 0, 0, 0.85) 100%
    );
}

.login-overlay::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.1),
      rgba(0, 0, 0, 0.4)
    );
}

.background-orb {
  position: fixed;
  z-index: 1;

  border-radius: 50%;

  pointer-events: none;
  filter: blur(70px);
}

.background-orb-one {
  top: -150px;
  right: -100px;

  width: 430px;
  height: 430px;

  background: rgba(239, 51, 64, 0.18);

  animation: orbOneMovement 14s ease-in-out infinite alternate;
}

.background-orb-two {
  bottom: -170px;
  left: -120px;

  width: 480px;
  height: 480px;

  background: rgba(255, 255, 255, 0.08);

  animation: orbTwoMovement 18s ease-in-out infinite alternate;
}

.login-main {
  position: relative;
  z-index: 3;

  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 52px 20px 34px;
}

.login-container {
  width: 100%;
  max-width: 450px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-container {
  position: relative;
  z-index: 5;

  width: 116px;
  height: 116px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: -38px;

  animation:
    logoEntrance 1.15s cubic-bezier(0.16, 1, 0.3, 1) both,
    logoFloating 4.5s ease-in-out 1.15s infinite;
}

.logo-glow {
  position: absolute;
  inset: 10px;

  border-radius: 34px;

  background: rgba(239, 51, 64, 0.44);

  opacity: 0.75;
  filter: blur(30px);

  animation: logoGlow 2.8s ease-in-out infinite alternate;
}

.logo-glass {
  position: relative;
  overflow: hidden;

  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.29);
  border-radius: 34px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.29) 0%,
      rgba(255, 255, 255, 0.12) 48%,
      rgba(255, 255, 255, 0.06) 100%
    );

  box-shadow:
    0 28px 65px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -1px 0 rgba(255, 255, 255, 0.09);

  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
}

.logo-glass::before {
  content: "";

  position: absolute;
  inset: 1px;

  border-radius: 32px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.25),
      transparent 47%
    );

  pointer-events: none;
}

.logo-shine {
  position: absolute;
  top: -45%;
  left: -75%;

  width: 80%;
  height: 190%;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.38),
      transparent
    );

  transform: rotate(22deg);

  animation: logoShine 4s ease-in-out 1.5s infinite;
}

.login-logo {
  position: relative;
  z-index: 2;

  width: 74px;
  height: 74px;

  object-fit: contain;

  filter:
    drop-shadow(0 9px 20px rgba(0, 0, 0, 0.4));

  animation: logoImageEntrance 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-card {
  position: relative;
  overflow: hidden;

  width: 100%;

  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.19) 0%,
      rgba(255, 255, 255, 0.09) 42%,
      rgba(255, 255, 255, 0.055) 100%
    );

  box-shadow:
    var(--shadow-large),
    var(--shadow-glass);

  backdrop-filter: blur(38px) saturate(190%);
  -webkit-backdrop-filter: blur(38px) saturate(190%);

  animation: cardEntrance 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.login-card::before {
  content: "";

  position: absolute;
  inset: 1px;

  border-radius: calc(var(--card-radius) - 2px);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.15),
      transparent 32%,
      transparent 70%,
      rgba(255, 255, 255, 0.035)
    );

  pointer-events: none;
}

.login-card::after {
  content: "";

  position: absolute;
  top: 0;
  right: 0;
  left: 0;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.75),
      transparent
    );

  opacity: 0.55;
}

.card-light {
  position: absolute;

  border-radius: 50%;

  pointer-events: none;
  filter: blur(45px);
}

.card-light-one {
  top: -100px;
  left: -90px;

  width: 250px;
  height: 210px;

  background: rgba(255, 255, 255, 0.13);
}

.card-light-two {
  right: -100px;
  bottom: -100px;

  width: 260px;
  height: 220px;

  background: rgba(239, 51, 64, 0.09);
}

.login-content {
  position: relative;
  z-index: 2;

  padding: 76px 36px 31px;
}

.login-header {
  margin-bottom: 29px;

  text-align: center;
}

.login-badge {
  width: fit-content;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  margin: 0 auto 15px;
  padding: 7px 13px;

  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;

  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.075);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.65px;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.badge-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: #68f58a;
  box-shadow: 0 0 10px rgba(104, 245, 138, 0.8);

  animation: badgePulse 1.8s ease-in-out infinite;
}

.login-header h1 {
  margin: 0 0 10px;

  color: var(--text-primary);

  font-size: clamp(28px, 6vw, 32px);
  font-weight: 720;
  letter-spacing: -0.9px;
  line-height: 1.15;
}

.login-header p {
  max-width: 330px;

  margin: 0 auto;

  color: var(--text-secondary);

  font-size: 14px;
  line-height: 1.65;
}

.alert {
  display: flex;
  align-items: center;
  gap: 11px;

  margin-bottom: 20px;
  padding: 12px 14px;

  border: 1px solid var(--danger-border);
  border-radius: 16px;

  font-size: 13px;
  line-height: 1.45;

  animation: alertEntrance 0.35s ease both;

  backdrop-filter: blur(17px);
  -webkit-backdrop-filter: blur(17px);
}

.alert[hidden] {
  display: none;
}

.alert-danger {
  color: var(--danger-text);
  background: var(--danger-background);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.alert-icon {
  flex: 0 0 auto;

  width: 25px;
  height: 25px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: #ffffff;
  background: rgba(239, 68, 68, 0.76);
}

.alert-icon svg {
  width: 16px;
  height: 16px;
}

.login-form {
  width: 100%;
}

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

.form-group label {
  display: block;

  margin: 0 0 9px 6px;

  color: rgba(255, 255, 255, 0.82);

  font-size: 13px;
  font-weight: 620;
}

.input-container {
  position: relative;
  overflow: hidden;

  width: 100%;
  height: 57px;

  display: flex;
  align-items: center;

  border: 1px solid var(--glass-border-soft);
  border-radius: var(--input-radius);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.13),
      rgba(255, 255, 255, 0.06)
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    0 9px 26px rgba(0, 0, 0, 0.12);

  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.input-container:hover {
  border-color: rgba(255, 255, 255, 0.25);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.155),
      rgba(255, 255, 255, 0.07)
    );
}

.input-container:focus-within {
  border-color: rgba(255, 255, 255, 0.48);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.19),
      rgba(255, 255, 255, 0.085)
    );

  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.27),
    0 13px 35px rgba(0, 0, 0, 0.2);

  transform: translateY(-1px);
}

.input-container.is-error {
  border-color: rgba(248, 113, 113, 0.62);

  box-shadow:
    0 0 0 4px rgba(239, 68, 68, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.17);
}

.input-icon {
  position: relative;
  z-index: 2;

  flex: 0 0 auto;

  width: 22px;
  height: 22px;

  margin-left: 17px;

  color: rgba(255, 255, 255, 0.58);

  transition: color 0.25s ease;
}

.input-container:focus-within .input-icon {
  color: rgba(255, 255, 255, 0.94);
}

.input-icon svg {
  width: 100%;
  height: 100%;
}

.input-container input {
  position: relative;
  z-index: 2;

  width: 100%;
  height: 100%;

  padding: 0 14px;

  border: 0;
  outline: 0;

  color: var(--text-primary);
  background: transparent;

  font-size: 14px;
  font-weight: 460;

  caret-color: var(--red-light);
}

.input-container input::placeholder {
  color: var(--text-placeholder);
}

.input-container input:-webkit-autofill,
.input-container input:-webkit-autofill:hover,
.input-container input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff;
  transition: background-color 9999s ease-in-out 0s;
  box-shadow: 0 0 0 1000px transparent inset;
}

.input-glow {
  position: absolute;
  bottom: -55px;
  left: 50%;

  width: 150px;
  height: 75px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.12);

  opacity: 0;
  filter: blur(28px);
  transform: translateX(-50%);

  transition: opacity 0.25s ease;
}

.input-container:focus-within .input-glow {
  opacity: 1;
}

.password-toggle {
  position: relative;
  z-index: 3;

  flex: 0 0 auto;

  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-right: 6px;
  padding: 0;

  border: 0;
  border-radius: 14px;

  color: rgba(255, 255, 255, 0.5);
  background: transparent;

  cursor: pointer;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.password-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.password-toggle:active {
  transform: scale(0.92);
}

.eye-icon {
  position: absolute;

  width: 20px;
  height: 20px;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.eye-open {
  opacity: 1;
  transform: scale(1);
}

.eye-closed {
  opacity: 0;
  transform: scale(0.7);
}

.password-toggle.is-visible .eye-open {
  opacity: 0;
  transform: scale(0.7);
}

.password-toggle.is-visible .eye-closed {
  opacity: 1;
  transform: scale(1);
}

.field-error {
  min-height: 16px;

  display: block;

  margin: 6px 0 0 6px;

  color: #fecaca;

  font-size: 11px;
  line-height: 1.4;
}

.login-button {
  position: relative;
  overflow: hidden;

  width: 100%;
  height: 57px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-top: 7px;
  padding: 0 20px;

  border: 1px solid rgba(255, 255, 255, 0.27);
  border-radius: var(--input-radius);

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      rgba(255, 74, 86, 0.97),
      rgba(190, 23, 37, 0.98)
    );

  box-shadow:
    0 17px 38px rgba(169, 15, 29, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(94, 0, 8, 0.27);

  cursor: pointer;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.login-button:hover {
  transform: translateY(-2px);

  box-shadow:
    0 22px 48px rgba(169, 15, 29, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(94, 0, 8, 0.27);

  filter: brightness(1.05);
}

.login-button:active {
  transform: translateY(0) scale(0.985);
}

.login-button:disabled {
  cursor: not-allowed;

  opacity: 0.78;
  transform: none;
}

.otp-resend-form {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.login-link-button {
  padding: 5px 8px;
  border: 0;
  color: #2563eb;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.login-link-button:hover {
  color: #1d4ed8;
  text-decoration: underline;
  transform: translateY(-1px);
}

.login-link-button:active {
  transform: translateY(0);
}

.monitoring-login-link-wrap {
  margin-top: 18px;
  text-align: center;
}

.monitoring-login-link {
  color: #2563eb;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.monitoring-login-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.otp-inputs {
  height: auto;
  justify-content: center;
  gap: 9px;
  padding: 9px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.otp-inputs:hover,
.otp-inputs:focus-within {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.otp-inputs .otp-digit {
  width: 43px;
  height: 47px;
  flex: 0 0 43px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 13px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.68);
  font-size: 21px;
  font-weight: 720;
  line-height: 1;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.otp-inputs .otp-digit:focus {
  border-color: rgba(239, 51, 64, 0.64);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(239, 51, 64, 0.11);
  transform: translateY(-1px);
}

.otp-countdown {
  margin: 9px 0 0;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.otp-countdown.is-expired {
  color: #dc2626;
}

.button-shine {
  position: absolute;
  top: -40%;
  left: -90%;

  width: 65%;
  height: 180%;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.36),
      transparent
    );

  transform: rotate(20deg);

  transition: left 0.75s ease;
}

.login-button:hover .button-shine {
  left: 135%;
}

.button-content {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.button-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.button-arrow {
  width: 19px;
  height: 19px;

  transition:
    opacity 0.2s ease,
    transform 0.25s ease;
}

.login-button:hover .button-arrow {
  transform: translateX(4px);
}

.button-loader {
  width: 19px;
  height: 19px;

  display: none;

  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;

  animation: loaderSpin 0.75s linear infinite;
}

.login-button.is-loading .button-arrow {
  display: none;
}

.login-button.is-loading .button-loader {
  display: inline-block;
}

.login-footer {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-top: 27px;
}

.login-footer p {
  flex: 0 0 auto;

  margin: 0;

  color: rgba(255, 255, 255, 0.39);

  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.footer-line {
  width: 100%;
  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.14)
    );
}

.footer-line:last-child {
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.14),
      transparent
    );
}

.copyright {
  margin: 19px 0 0;

  color: rgba(255, 255, 255, 0.36);

  font-size: 11px;
  text-align: center;

  animation: copyrightEntrance 0.8s ease 0.8s both;
}

/* Animations */

@keyframes backgroundEntrance {
  from {
    opacity: 0;
    transform: scale(1.14);
  }

  to {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes backgroundMovement {
  from {
    transform: scale(1.05) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.12) translate3d(-1.2%, -0.8%, 0);
  }
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    filter: blur(13px);
    transform: translateY(45px) scale(0.94);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes logoEntrance {
  0% {
    opacity: 0;
    filter: blur(18px);
    transform:
      translateY(-115px)
      rotate(-18deg)
      scale(0.25);
  }

  62% {
    opacity: 1;
    filter: blur(0);
    transform:
      translateY(9px)
      rotate(4deg)
      scale(1.09);
  }

  82% {
    transform:
      translateY(-4px)
      rotate(-2deg)
      scale(0.98);
  }

  100% {
    opacity: 1;
    transform:
      translateY(0)
      rotate(0)
      scale(1);
  }
}

@keyframes logoImageEntrance {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.3) rotate(-25deg);
  }

  68% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1.12) rotate(5deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes logoFloating {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes logoGlow {
  from {
    opacity: 0.48;
    transform: scale(0.8);
  }

  to {
    opacity: 0.95;
    transform: scale(1.2);
  }
}

@keyframes logoShine {
  0%,
  55% {
    left: -85%;
  }

  82%,
  100% {
    left: 145%;
  }
}

@keyframes badgePulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes alertEntrance {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes copyrightEntrance {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orbOneMovement {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(-90px, 70px, 0) scale(1.18);
  }
}

@keyframes orbTwoMovement {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(110px, -80px, 0) scale(1.15);
  }
}

/* Responsive */

@media (max-width: 520px) {
  .login-main {
    padding: 38px 15px 27px;
  }

  .login-container {
    max-width: 100%;
  }

  .logo-container {
    width: 102px;
    height: 102px;

    margin-bottom: -34px;
  }

  .logo-glass {
    border-radius: 30px;
  }

  .login-logo {
    width: 65px;
    height: 65px;
  }

  .login-card {
    border-radius: 31px;
  }

  .login-content {
    padding: 67px 22px 27px;
  }

  .login-header {
    margin-bottom: 25px;
  }

  .login-header h1 {
    font-size: 27px;
  }

  .login-header p {
    font-size: 13px;
  }

  .input-container,
  .login-button {
    height: 55px;
    border-radius: 17px;
  }

  .login-footer {
    gap: 8px;
  }

  .login-footer p {
    font-size: 9px;
  }
}

@media (max-height: 730px) and (min-width: 521px) {
  .login-main {
    padding-top: 35px;
    padding-bottom: 25px;
  }

  .logo-container {
    width: 100px;
    height: 100px;

    margin-bottom: -33px;
  }

  .login-logo {
    width: 64px;
    height: 64px;
  }

  .login-content {
    padding-top: 65px;
    padding-bottom: 25px;
  }

  .login-header {
    margin-bottom: 22px;
  }

  .login-header h1 {
    font-size: 27px;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .input-container,
  .login-button {
    height: 52px;
  }

  .login-footer {
    margin-top: 21px;
  }

  .copyright {
    margin-top: 12px;
  }
}

/* White frosted glass theme */

:root {
  --background-dark: #ffffff;

  --text-primary: #111827;
  --text-secondary: #475569;
  --text-placeholder: #94a3b8;

  --glass-background: rgba(255, 255, 255, 0.62);
  --glass-background-hover: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-border-soft: rgba(15, 23, 42, 0.1);

  --danger-background: rgba(254, 226, 226, 0.74);
  --danger-border: rgba(248, 113, 113, 0.34);
  --danger-text: #b91c1c;

  --shadow-large:
    0 28px 75px rgba(15, 23, 42, 0.11),
    0 8px 24px rgba(15, 23, 42, 0.08);

  --shadow-glass:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(15, 23, 42, 0.04);
}

.login-page {
  color: var(--text-primary);
  background: var(--background-dark);
}

.login-background {
  inset: 0;

  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #ffffff 54%,
      #f8fafc 100%
    );

  filter: none;
  transform: none;
  animation: none;
}

.login-overlay {
  background:
    radial-gradient(
      circle at 72% 10%,
      rgba(239, 51, 64, 0.1),
      transparent 30%
    ),
    radial-gradient(
      circle at 20% 86%,
      rgba(37, 99, 235, 0.08),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.84),
      rgba(248, 250, 252, 0.64)
    );
}

.login-overlay::after {
  background:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.3),
      rgba(255, 255, 255, 0.08)
    );
}

.background-orb-one {
  background: rgba(239, 51, 64, 0.13);
}

.background-orb-two {
  background: rgba(37, 99, 235, 0.09);
}

.logo-glow {
  background: rgba(239, 51, 64, 0.18);
  opacity: 1;
}

.logo-glass {
  border-color: rgba(255, 255, 255, 0.78);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.86) 0%,
      rgba(255, 255, 255, 0.52) 54%,
      rgba(255, 255, 255, 0.34) 100%
    );

  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(15, 23, 42, 0.04);

  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
}

.logo-glass::before {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.72),
      transparent 42%,
      rgba(239, 51, 64, 0.05)
    );
}

.logo-shine {
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.86),
      transparent
    );
}

.login-card {
  border-color: rgba(255, 255, 255, 0.72);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.78) 0%,
      rgba(255, 255, 255, 0.55) 46%,
      rgba(255, 255, 255, 0.38) 100%
    );

  box-shadow:
    var(--shadow-large),
    var(--shadow-glass);

  backdrop-filter: blur(34px) saturate(180%);
  -webkit-backdrop-filter: blur(34px) saturate(180%);
}

.login-card::before {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.72),
      transparent 34%,
      transparent 70%,
      rgba(239, 51, 64, 0.04)
    );
}

.login-card::after {
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.95),
      transparent
    );
}

.card-light-one {
  background: rgba(239, 51, 64, 0.08);
}

.card-light-two {
  background: rgba(37, 99, 235, 0.07);
}

.login-badge {
  border-color: rgba(239, 51, 64, 0.18);
  color: var(--red-dark);
  background: rgba(255, 255, 255, 0.56);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.badge-dot {
  background: var(--red);
  box-shadow: 0 0 10px rgba(239, 51, 64, 0.34);
}

.login-header h1 {
  color: var(--text-primary);
}

.login-header p,
.form-group label,
.login-footer p,
.copyright {
  color: var(--text-secondary);
}

.alert-danger {
  color: var(--danger-text);
  background: var(--danger-background);
}

.alert-icon {
  color: #ffffff;
  background: rgba(239, 51, 64, 0.86);
}

.input-container {
  border-color: rgba(15, 23, 42, 0.1);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.72),
      rgba(255, 255, 255, 0.48)
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 25px rgba(15, 23, 42, 0.05);
}

.input-container:hover {
  border-color: rgba(239, 51, 64, 0.22);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.86),
      rgba(255, 255, 255, 0.58)
    );
}

.input-container:focus-within {
  border-color: rgba(239, 51, 64, 0.42);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.92),
      rgba(255, 255, 255, 0.68)
    );

  box-shadow:
    0 0 0 4px rgba(239, 51, 64, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.input-container.is-error {
  border-color: rgba(220, 38, 38, 0.5);

  box-shadow:
    0 0 0 4px rgba(220, 38, 38, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.input-icon,
.password-toggle {
  color: #64748b;
}

.input-container:focus-within .input-icon,
.password-toggle:hover {
  color: var(--red);
}

.password-toggle:hover {
  background: rgba(239, 51, 64, 0.08);
}

.input-container input {
  color: var(--text-primary);
}

.input-container input::placeholder {
  color: var(--text-placeholder);
}

.input-container input:-webkit-autofill,
.input-container input:-webkit-autofill:hover,
.input-container input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
}

.input-glow {
  background: rgba(239, 51, 64, 0.1);
}

.field-error {
  color: #dc2626;
}

.login-button {
  border-color: rgba(239, 51, 64, 0.2);

  box-shadow:
    0 18px 35px rgba(169, 15, 29, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.login-button:hover {
  box-shadow:
    0 22px 42px rgba(169, 15, 29, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.footer-line {
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(148, 163, 184, 0.36)
    );
}

.footer-line:last-child {
  background:
    linear-gradient(
      90deg,
      rgba(148, 163, 184, 0.36),
      transparent
    );
}

/* Reapply the original glass treatment when the saved theme is dark. */
html.theme-dark {
  color-scheme: dark;
  --background-dark: #050505;
  --text-primary: rgba(255, 255, 255, 0.97);
  --text-secondary: rgba(255, 255, 255, 0.67);
  --text-placeholder: rgba(255, 255, 255, 0.36);
  --glass-border: rgba(255, 255, 255, 0.14);
  --shadow-glass:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

html.theme-dark .login-page {
  color: var(--text-primary);
  background: var(--background-dark);
}

html.theme-dark .login-background {
  inset: 0;
  background: linear-gradient(
    180deg,
    #0f172a 0%,
    #0f172a 54%,
    #080f1e 100%
  );
  filter: none;
  transform: none;
  animation: none;
}

html.theme-dark .login-overlay {
  background:
    radial-gradient(circle at 72% 10%, rgba(239, 51, 64, 0.16), transparent 30%),
    radial-gradient(circle at 20% 86%, rgba(80, 167, 255, 0.12), transparent 30%),
    linear-gradient(145deg, rgba(4, 6, 11, 0.86), rgba(8, 11, 18, 0.74));
}

html.theme-dark .login-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.05)
  );
  box-shadow: var(--shadow-large), var(--shadow-glass);
}

html.theme-dark .login-card::before {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 34%);
}

html.theme-dark .login-card::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

html.theme-dark .logo-glass {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

html.theme-dark .input-container {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html.theme-dark .input-container:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

html.theme-dark .input-container:focus-within {
  border-color: rgba(239, 51, 64, 0.5);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 4px rgba(239, 51, 64, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html.theme-dark .login-badge {
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.79);
  background: rgba(255, 255, 255, 0.08);
}

/* Monitoring Access / OTP mengikuti permukaan dark yang sama dengan form login. */
html.theme-dark .otp-inputs .otp-digit {
  border-color: rgba(148, 163, 184, 0.25);
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

html.theme-dark .otp-inputs .otp-digit:hover {
  border-color: rgba(148, 163, 184, 0.38);
  background: rgba(30, 41, 59, 0.9);
}

html.theme-dark .otp-inputs .otp-digit:focus {
  border-color: rgba(255, 89, 103, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 89, 103, 0.14);
}

html.theme-dark .otp-countdown {
  color: #94a3b8;
}

html.theme-dark .otp-countdown.is-expired {
  color: #fca5a5;
}

html.theme-dark .login-link-button,
html.theme-dark .monitoring-login-link {
  color: #93c5fd;
}

html.theme-dark .login-link-button:hover,
html.theme-dark .monitoring-login-link:hover {
  color: #bfdbfe;
}

html.theme-dark .page-preloader::before,
html.theme-dark .page-preloader::after {
  background: rgba(15, 23, 42, 0.94);
}

html.theme-dark .page-preloader {
  color: #f8fafc;
}

html.theme-dark .page-preloader-text span {
  color: #94a3b8;
}

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

/* OTP memakai enam kotak mandiri, tanpa panel input pembungkus. */
.input-container.otp-inputs,
.input-container.otp-inputs:hover,
.input-container.otp-inputs:focus-within,
.input-container.otp-inputs.is-error {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
  transform: none;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
