/* =========================================================
   RAMS LOGIN PAGE
   ========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


:root {
  --login-bg-start: #0a0e27;
  --login-bg-middle: #1a1f3a;
  --login-bg-end: #0d1229;

  --login-green-glow-soft: rgba(26, 232, 160, 0.12);
  --login-green-glow-strong: rgba(66, 255, 193, 0.12);
  --login-green-glow-deep: rgba(9, 147, 101, 0.1);

  --login-surface:
    rgba(
      255,
      255,
      255,
      0.035
    );

  --login-surface-strong:
    rgba(
      255,
      255,
      255,
      0.06
    );

  --login-border:
    rgba(
      255,
      255,
      255,
      0.09
    );

  --login-border-accent:
    rgb(var(--brand-rgb) / 0.25);

  --login-text: #f8fbff;
  --login-muted: #95a4bd;
  --login-muted-strong: #c9d4e4;

  --login-primary: #00c8ff;
  --login-primary-strong: #0080ff;

  --login-success: #00ff88;
  --login-danger: #ff6179;

  --login-shadow:
    rgba(
      0,
      0,
      0,
      0.42
    );

  --login-grid:
    rgb(var(--brand-rgb) / 0.035);

  --login-device-screen:
    radial-gradient(
      circle at center,
      #1a2138,
      #0f1424
    );
}


html {
  min-height: 100%;
}


html.light-mode {
  --login-bg-start: #f0f5f8;
  --login-bg-middle: #fffdf9;
  --login-bg-end: #edf4f7;

  --login-green-glow-soft: rgba(22, 180, 116, 0.2);
  --login-green-glow-strong: rgba(28, 202, 133, 0.28);
  --login-green-glow-deep: rgba(12, 138, 94, 0.16);

  --login-surface:
    rgba(
      255,
      255,
      255,
      0.72
    );

  --login-surface-strong:
    rgba(
      255,
      255,
      255,
      0.92
    );

  --login-border:
    rgba(
      43,
      78,
      115,
      0.13
    );

  --login-border-accent:
    rgb(var(--brand-rgb) / 0.22);

  --login-text: #172033;
  --login-muted: #66758c;
  --login-muted-strong: #34445c;

  --login-primary: #008dd8;
  --login-primary-strong: #006fe6;

  --login-success: #00a968;
  --login-danger: #d9475e;

  --login-shadow:
    rgba(
      58,
      85,
      112,
      0.18
    );

  --login-grid:
    rgb(var(--brand-rgb) / 0.055);

  --login-device-screen:
    radial-gradient(
      circle at center,
      #fbfbf8,
      #e5edf5
    );
}


body {
  min-height: 100vh;

  overflow-x: hidden;

  position: relative;

  isolation: isolate;

  color: var(
    --login-text
  );

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;

  background:
    linear-gradient(
      135deg,
      var(--login-bg-start) 0%,
      var(--login-bg-middle) 55%,
      var(--login-bg-end) 100%
    );

  background-attachment: fixed;

  transition:
    background 0.3s ease,
    color 0.3s ease;
}

html.light-mode body {
  background:
    radial-gradient(
      circle at 14% 16%,
      var(--login-green-glow-strong),
      transparent 22%
    ),
    radial-gradient(
      circle at 78% 18%,
      rgba(28, 255, 174, 0.18),
      transparent 24%
    ),
    radial-gradient(
      circle at 50% 100%,
      var(--login-green-glow-deep),
      transparent 42%
    ),
    linear-gradient(
      135deg,
      var(--login-bg-start) 0%,
      var(--login-bg-middle) 55%,
      var(--login-bg-end) 100%
    );
}

html.light-mode body::before {
  content: '';
  position: fixed;
  inset: -10% -6% auto auto;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      var(--login-green-glow-strong) 0%,
      rgba(36, 255, 174, 0.2) 22%,
      rgba(36, 255, 174, 0.06) 38%,
      transparent 72%
    );
  filter: blur(48px);
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

html.light-mode body::after {
  content: '';
  position: fixed;
  inset: auto auto -16% -12%;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(22, 255, 170, 0.18),
      rgba(22, 255, 170, 0.08) 26%,
      transparent 70%
    );
  filter: blur(52px);
  pointer-events: none;
  z-index: 0;
}


button,
input {
  font: inherit;
}


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


a {
  color: inherit;
}


/* =========================================================
   SELECTION
   ========================================================= */

::selection {
  background:
    rgb(var(--brand-rgb) / 0.3);

  color: #ffffff;
}


html.light-mode ::selection {
  background:
    rgb(var(--brand-rgb) / 0.2);

  color: #111827;
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
  width: 8px;
}


::-webkit-scrollbar-track {
  background: #0a0e27;
}


::-webkit-scrollbar-thumb {
  background:
    linear-gradient(
      var(--brand-500, #00c8ff),
      #00ff88
    );

  border-radius: 4px;
}


html.light-mode
::-webkit-scrollbar-track {
  background: #edf4ff;
}


html.light-mode
::-webkit-scrollbar-thumb {
  background:
    linear-gradient(
      var(--brand-500, #0080ff),
      #00c896
    );
}

/* =========================================================
   BACKGROUND PARTICLES
   ========================================================= */

.bg-particles {
  position: fixed;

  inset: 0;

  width: 100%;
  height: 100%;

  overflow: hidden;

  pointer-events: none;

  z-index: 0;
  contain: strict;
}


.particle {
  position: absolute;

  left: 0;
  bottom: -12px;

  width: 4px;
  height: 4px;

  border-radius: 50%;

  background:
    rgb(var(--brand-rgb) / 0.55);

  box-shadow:
    0
    0
    7px
    rgb(var(--brand-rgb) / 0.35);

  opacity: 0;

  will-change:
    transform,
    opacity;

  animation-name:
    particleFloat;

  animation-timing-function:
    linear;

  animation-iteration-count:
    infinite;
  contain: layout paint;
}


@keyframes particleFloat {

  0% {
    transform:
      translate3d(
        0,
        0,
        0
      );

    opacity: 0;
  }


  8% {
    opacity: 1;
  }


  85% {
    opacity: 1;
  }


  100% {
    transform:
      translate3d(
        50px,
        -115vh,
        0
      );

    opacity: 0;
  }
}


/* =========================================================
   LIGHT MODE PARTICLES
   ========================================================= */

html.light-mode
.particle {

  background:
    rgb(var(--brand-rgb) / 0.38);

  box-shadow:
    0
    0
    7px
    rgb(var(--brand-rgb) / 0.25);
}

/* =========================================================
   GRID BACKGROUND
   ========================================================= */

.login-grid {
  position: fixed;

  inset: 0;

  z-index: 0;

  pointer-events: none;

  background-image:

    linear-gradient(
      var(--login-grid)
      1px,
      transparent
      1px
    ),

    linear-gradient(
      90deg,
      var(--login-grid)
      1px,
      transparent
      1px
    );

  background-size:
    52px
    52px;

  mask-image:
    linear-gradient(
      to bottom,
      rgba(
        0,
        0,
        0,
        0.7
      ),
      transparent
      90%
    );

  -webkit-mask-image:
    linear-gradient(
      to bottom,
      rgba(
        0,
        0,
        0,
        0.7
      ),
      transparent
      90%
    );
}


/* =========================================================
   HEADER
   ========================================================= */

.login-header {
  position: relative;

  z-index: 10;

  width:
    min(
      1400px,
      calc(
        100% - 48px
      )
    );

  margin:
    0
    auto;

  padding:
    24px
    0
    0;

  display: flex;

  align-items: center;
  justify-content: space-between;

  contain: layout paint;
}


.login-brand {
  display:
    inline-flex;

  align-items: center;

  gap: 10px;

  text-decoration: none;

  color:
    var(
      --login-text
    );

  font-size: 1.05rem;

  font-weight: 800;

  letter-spacing: 0.08em;
}


.login-brand-logo,
.login-device-logo {

  overflow: hidden;

  display:
    inline-flex;

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

  background:
    linear-gradient(
      135deg,
      var(
        --login-primary
      ),
      var(
        --login-success
      )
    );
}


.login-brand-logo {
  width: 34px;
  height: 34px;

  border-radius: 9px;
}


.login-brand-logo img,
.login-device-logo img {

  width: 100%;
  height: 100%;

  object-fit: cover;
}


.login-header-actions {
  display: flex;

  align-items: center;

  gap: 16px;
}


.back-home-link {
  display:
    inline-flex;

  align-items: center;

  gap: 7px;

  color:
    var(
      --login-muted-strong
    );

  text-decoration: none;

  font-size: 0.86rem;

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


.back-home-link:hover {
  color:
    var(
      --login-primary
    );

  transform:
    translateX(
      -2px
    );
}


/* =========================================================
   THEME TOGGLE
   ========================================================= */

.login-theme-toggle {
  display: flex;
}


.login-theme-input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}


.login-theme-label {
  position: relative;

  width: 58px;
  height: 30px;

  padding:
    0
    7px;

  cursor: pointer;

  border:
    1px
    solid
    var(
      --login-border
    );

  border-radius: 999px;

  background:
    var(
      --login-surface-strong
    );

  display: flex;

  align-items: center;
  justify-content: space-between;

  font-size: 0.72rem;

  box-shadow:
    0
    8px
    24px
    var(
      --login-shadow
    );
}


.login-theme-ball {
  position: absolute;

  top: 3px;
  left: 3px;

  width: 22px;
  height: 22px;

  border-radius: 50%;

  background:
    linear-gradient(
      135deg,
      var(
        --login-primary
      ),
      var(
        --login-success
      )
    );

  transition:
    transform
    0.25s
    ease;
}


.login-theme-input:checked
+
.login-theme-label
.login-theme-ball {

  transform:
    translateX(
      28px
    );
}


/* =========================================================
   MAIN SHELL
   ========================================================= */

.login-shell {
  position: relative;

  z-index: 1;

  width:
    min(
      1400px,
      calc(
        100% - 48px
      )
    );

  min-height:
    calc(
      100vh - 82px
    );

  margin:
    0
    auto;

  padding:
    36px
    0
    48px;

  display: grid;

  grid-template-columns:
    minmax(
      0,
      1.1fr
    )
    minmax(
      340px,
      0.78fr
    );

  align-items: center;

  gap:
    clamp(
      48px,
      7vw,
      110px
    );

  contain: layout style;
}


/* =========================================================
   LEFT VISUAL SECTION
   ========================================================= */

.login-visual-section {
  min-width: 0;

  display: flex;

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

  perspective: 1500px;

  animation:
    loginEnterLeft
    0.8s
    ease
    both;
}


@keyframes loginEnterLeft {

  from {
    opacity: 0;

    transform:
      translateX(
        -35px
      );
  }


  to {
    opacity: 1;

    transform:
      translateX(
        0
      );
  }
}


/* =========================================================
   TABLET WRAPPER
   ========================================================= */

.login-device-wrapper {
  position: relative;

  transform-style:
    preserve-3d;

  animation:
    loginDeviceFloat
    6s
    ease-in-out
    infinite;

  will-change:
    transform;
  contain: layout style;
}


@keyframes loginDeviceFloat {

  0%,
  100% {

    transform:
      rotateY(
        12deg
      )
      rotateX(
        4deg
      )
      translateY(
        0
      );
  }


  50% {

    transform:
      rotateY(
        12deg
      )
      rotateX(
        4deg
      )
      translateY(
        -16px
      );
  }
}


/* =========================================================
   TABLET DEVICE
   ========================================================= */

.login-device {
  position: relative;

  width:
    clamp(
      310px,
      31vw,
      395px
    );

  aspect-ratio:
    0.72;

  padding: 18px;

  border-radius: 31px;

  background:
    linear-gradient(
      145deg,
      #161d33,
      #10182a
    );

  box-shadow:

    0
    48px
    95px
    var(
      --login-shadow
    ),

    0
    0
    0
    1px
    rgba(
      255,
      255,
      255,
      0.08
    ),

    inset
    0
    0
    24px
    rgb(var(--brand-rgb) / 0.08);

  transform-style:
    preserve-3d;
}


html.light-mode
.login-device {

  background:
    linear-gradient(
      145deg,
      #ffffff,
      #edf4ff
    );

  box-shadow:

    0
    48px
    95px
    rgba(
      0,
      0,
      0,
      0.15
    ),

    0
    0
    0
    1px
    rgb(var(--brand-rgb) / 0.1);

  contain: layout paint;
}


.login-device::before {
  content: '';

  position: absolute;

  top: 8px;

  left: 50%;

  width: 56px;
  height: 5px;

  border-radius: 5px;

  background:
    rgba(
      117,
      135,
      157,
      0.48
    );

  transform:
    translateX(
      -50%
    );
}


/* =========================================================
   TABLET SCREEN
   ========================================================= */

.login-device-screen {
  position: relative;

  width: 100%;
  height: 100%;

  overflow: hidden;

  border-radius: 19px;

  background:
    var(
      --login-device-screen
    );

  box-shadow:
    inset
    0
    0
    34px
    rgba(
      0,
      0,
      0,
      0.34
    );

  display: flex;

  flex-direction: column;

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

  contain: layout paint;
}


/* =========================================================
   TABLET HEADER
   ========================================================= */

.login-device-header {
  position: absolute;

  top: 19px;
  left: 19px;
  right: 19px;

  display: flex;

  align-items: center;
  justify-content: space-between;
}


.login-device-title {
  display: flex;

  align-items: center;

  gap: 8px;

  color:
    var(
      --login-text
    );

  font-size: 0.78rem;

  font-weight: 800;

  letter-spacing: 0.04em;
}


.login-device-logo {
  width: 24px;
  height: 24px;

  border-radius: 6px;
}


.login-device-clock {
  color:
    var(
      --login-muted
    );

  font-size: 0.66rem;

  font-family:
    "JetBrains Mono",
    Consolas,
    monospace;
}


/* =========================================================
   FACE SCANNER
   ========================================================= */

.face-scanner {
  position: relative;

  width: 205px;
  height: 205px;

  display: flex;

  align-items: center;
  justify-content: center;
}


.face-scanner-ring {
  position: absolute;

  border-radius: 50%;

  border:
    1px
    solid
    rgb(var(--brand-rgb) / 0.22);
}


.face-scanner-ring-one {
  inset: 0;

  animation:
    loginRingSpin
    10s
    linear
    infinite;
}


.face-scanner-ring-two {
  inset: 18px;

  border-color:
    rgba(
      0,
      255,
      136,
      0.24
    );

  animation:
    loginRingSpin
    8s
    linear
    infinite
    reverse;
}


.face-scanner-ring::before {
  content: '';

  position: absolute;

  top: -4px;

  left: 50%;

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background:
    var(
      --login-primary
    );

  box-shadow:
    0
    0
    14px
    var(
      --login-primary
    );
}


@keyframes loginRingSpin {

  to {
    transform:
      rotate(
        360deg
      );
  }
}


/* =========================================================
   FACE FRAME
   ========================================================= */

.face-frame {
  position: relative;

  width: 116px;
  height: 140px;

  overflow: hidden;

  border-radius: 24px;

  background:
    radial-gradient(
      circle at 50% 35%,
      rgb(var(--brand-rgb) / 0.08),
      rgb(var(--brand-rgb) / 0.02)
    );
}


.face-corner {
  position: absolute;

  width: 25px;
  height: 25px;

  border-color:
    var(
      --login-primary
    );

  border-style: solid;
}


.face-corner-tl {
  top: 0;
  left: 0;

  border-width:
    2px
    0
    0
    2px;

  border-radius:
    10px
    0
    0
    0;
}


.face-corner-tr {
  top: 0;
  right: 0;

  border-width:
    2px
    2px
    0
    0;

  border-radius:
    0
    10px
    0
    0;
}


.face-corner-bl {
  bottom: 0;
  left: 0;

  border-width:
    0
    0
    2px
    2px;

  border-radius:
    0
    0
    0
    10px;
}


.face-corner-br {
  right: 0;
  bottom: 0;

  border-width:
    0
    2px
    2px
    0;

  border-radius:
    0
    0
    10px
    0;
}


/* =========================================================
   FACE SILHOUETTE
   ========================================================= */

.face-silhouette {
  position: absolute;

  inset: 14px;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;
}


.face-head {
  width: 52px;
  height: 62px;

  border-radius:
    46%
    46%
    42%
    42%;

  background:
    linear-gradient(
      145deg,
      rgb(var(--brand-rgb) / 0.28),
      rgba(
        0,
        255,
        136,
        0.16
      )
    );

  box-shadow:
    0
    0
    22px
    rgb(var(--brand-rgb) / 0.17);
}


.face-body {
  width: 82px;
  height: 42px;

  margin-top: 7px;

  border-radius:
    50%
    50%
    14px
    14px;

  background:
    linear-gradient(
      145deg,
      rgb(var(--brand-rgb) / 0.2),
      rgba(
        0,
        255,
        136,
        0.11
      )
    );
}


/* =========================================================
   FACE SCAN LINE
   ========================================================= */

.face-scan-line {
  position: absolute;

  left: 8%;

  width: 84%;

  height: 2px;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(
        --login-success
      ),
      transparent
    );

  box-shadow:
    0
    0
    12px
    var(
      --login-success
    );

  animation:
    loginFaceScan
    2.2s
    ease-in-out
    infinite;
}


@keyframes loginFaceScan {

  0% {
    top: 12%;

    opacity: 0;
  }


  10% {
    opacity: 1;
  }


  90% {
    opacity: 1;
  }


  100% {
    top: 88%;

    opacity: 0;
  }
}


/* =========================================================
   TABLET STATUS
   ========================================================= */

.login-device-status {
  margin-top: 26px;

  text-align: center;
}


.login-device-status strong {
  display: block;

  color:
    var(
      --login-primary
    );

  font-size: 0.9rem;
}


.login-device-status span {
  display: block;

  max-width: 240px;

  margin-top: 6px;

  color:
    var(
      --login-muted
    );

  font-size: 0.66rem;

  line-height: 1.5;
}


/* =========================================================
   TABLET PULSE
   ========================================================= */

.login-device-pulse {
  height: 32px;

  margin-top: 18px;

  display: flex;

  align-items: center;

  gap: 4px;
}


.login-device-pulse span {
  width: 3px;
  height: 16px;

  border-radius: 4px;

  background:
    linear-gradient(
      to top,
      var(
        --login-primary
      ),
      var(
        --login-success
      )
    );

  animation:
    loginWave
    1s
    ease-in-out
    infinite;
}


.login-device-pulse
span:nth-child(2) {
  height: 23px;

  animation-delay:
    0.08s;
}


.login-device-pulse
span:nth-child(3) {
  height: 29px;

  animation-delay:
    0.16s;
}


.login-device-pulse
span:nth-child(4) {
  height: 18px;

  animation-delay:
    0.24s;
}


.login-device-pulse
span:nth-child(5) {
  height: 26px;

  animation-delay:
    0.32s;
}


.login-device-pulse
span:nth-child(6) {
  height: 20px;

  animation-delay:
    0.4s;
}


.login-device-pulse
span:nth-child(7) {
  height: 14px;

  animation-delay:
    0.48s;
}


@keyframes loginWave {

  0%,
  100% {
    transform:
      scaleY(
        0.5
      );
  }


  50% {
    transform:
      scaleY(
        1
      );
  }
}


/* =========================================================
   TABLET FOOTER
   ========================================================= */

.login-device-footer {
  position: absolute;

  right: 18px;
  bottom: 18px;
  left: 18px;

  padding-top: 14px;

  border-top:
    1px
    solid
    var(
      --login-border
    );

  display: grid;

  grid-template-columns:
    repeat(
      3,
      1fr
    );

  gap: 6px;
}


.login-device-footer div {
  text-align: center;
}


.login-device-footer strong {
  display: block;

  color:
    var(
      --login-success
    );

  font-size: 0.72rem;
}


.login-device-footer span {
  display: block;

  margin-top: 3px;

  color:
    var(
      --login-muted
    );

  font-size: 0.55rem;
}


/* =========================================================
   FLOATING CARDS
   ========================================================= */

.login-floating-card {
  position: absolute;

  z-index: 5;

  padding:
    11px
    14px;

  border:
    1px
    solid
    var(
      --login-border-accent
    );

  border-radius: 13px;

  background:
    rgba(
      16,
      24,
      42,
      0.88
    );

  box-shadow:
    0
    14px
    34px
    var(
      --login-shadow
    );

  backdrop-filter:
    blur(
      14px
    );

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

  display: flex;

  align-items: center;

  gap: 10px;
}


html.light-mode
.login-floating-card {

  background:
    rgba(
      248,
      252,
      255,
      0.9
    );
}


.login-floating-card-top {
  top: 13%;

  left: -29%;

  animation:
    loginBadgeFloatOne
    4.2s
    ease-in-out
    infinite;
}


.login-floating-card-side {
  right: -30%;

  bottom: 20%;

  animation:
    loginBadgeFloatTwo
    4.8s
    ease-in-out
    infinite;
}


.login-floating-icon {
  width: 31px;
  height: 31px;

  flex:
    0
    0
    31px;

  border-radius: 8px;

  color:
    var(
      --login-primary
    );

  background:
    rgb(var(--brand-rgb) / 0.13);

  display:
    inline-flex;

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

  font-weight: 800;
}


.login-floating-card strong,
.login-floating-card small {

  display: block;

  white-space: nowrap;
}


.login-floating-card strong {
  color:
    var(
      --login-text
    );

  font-size: 0.69rem;
}


.login-floating-card small {
  margin-top: 2px;

  color:
    var(
      --login-muted
    );

  font-size: 0.58rem;
}


@keyframes loginBadgeFloatOne {

  0%,
  100% {
    transform:
      translateY(
        0
      );
  }


  50% {
    transform:
      translateY(
        -12px
      );
  }
}


@keyframes loginBadgeFloatTwo {

  0%,
  100% {
    transform:
      translateY(
        0
      );
  }


  50% {
    transform:
      translateY(
        12px
      );
  }
}


/* =========================================================
   RIGHT FORM SECTION
   ========================================================= */

.login-form-section {
  animation:
    loginEnterRight
    0.8s
    ease
    both;
}


@keyframes loginEnterRight {

  from {
    opacity: 0;

    transform:
      translateX(
        35px
      );
  }


  to {
    opacity: 1;

    transform:
      translateX(
        0
      );
  }
}


/* =========================================================
   LOGIN CARD
   ========================================================= */

.login-card {
  position: relative;
  width: 100%;

  max-width: 470px;

  margin-left: auto;

  padding:
    clamp(
      28px,
      3.3vw,
      44px
    );

  border:
    1px
    solid
    var(
      --login-border
    );

  border-radius: 25px;

  background:
    var(
      --login-surface
    );

  box-shadow:
    0
    32px
    65px
    var(
      --login-shadow
    );

  backdrop-filter:
    blur(
      20px
    );

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

  contain: layout paint;
}


/* =========================================================
   LOGIN SYSTEM BADGE
   ========================================================= */

.login-system-badge {
  width:
    fit-content;

  margin-bottom: 22px;

  padding:
    7px
    13px;

  border:
    1px
    solid
    var(
      --login-border-accent
    );

  border-radius: 999px;

  color:
    var(
      --login-primary
    );

  background:
    rgb(var(--brand-rgb) / 0.075);

  display:
    inline-flex;

  align-items: center;

  gap: 8px;

  font-size: 0.72rem;

  font-weight: 600;
}


.login-system-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background:
    var(
      --login-success
    );

  box-shadow:
    0
    0
    0
    rgba(
      0,
      255,
      136,
      0.55
    );

  animation:
    loginDotPulse
    1.8s
    infinite;
}


@keyframes loginDotPulse {

  50% {
    box-shadow:
      0
      0
      0
      7px
      rgba(
        0,
        255,
        136,
        0
      );
  }
}


/* =========================================================
   LOGIN TITLE
   ========================================================= */

.login-card h1 {
  color:
    var(
      --login-text
    );

  font-size:
    clamp(
      2rem,
      4vw,
      2.55rem
    );

  line-height: 1.05;

  font-weight: 800;

  letter-spacing:
    -0.035em;
}


.login-card h1 span {

  background:
    linear-gradient(
      135deg,
      var(
        --login-primary
      ),
      var(
        --login-success
      )
    );

  -webkit-background-clip:
    text;

  background-clip:
    text;

  color: transparent;
}


.login-card-subtitle {
  margin-top: 11px;

  margin-bottom: 29px;

  color:
    var(
      --login-muted
    );

  font-size: 0.92rem;

  line-height: 1.65;
}


/* =========================================================
   ERROR ALERT
   ========================================================= */

.login-alert-top {
  position: absolute;
  top: 12px;
  right: 12px;
  margin-bottom: 0;

  padding:
    12px
    14px;

  border:
    1px
    solid
    rgba(
      255,
      97,
      121,
      0.28
    );

  border-radius: 11px;

  color:
    var(
      --login-danger
    );

  background:
    rgba(
      255,
      97,
      121,
      0.075
    );

  display: flex;

  align-items:
    flex-start;

  gap: 10px;

  font-size: 0.82rem;

  line-height: 1.45;
  z-index: 100;
}

.login-alert {
  margin-bottom: 21px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 400px;
}

.login-alert-info,
.login-alert-success {
  border-color:
    rgb(var(--brand-rgb) / 0.26);

  color:
    var(
      --login-primary
    );

  background:
    rgb(var(--brand-rgb) / 0.08);
}

.login-alert-success {
  border-color:
    rgba(
      0,
      255,
      155,
      0.26
    );

  color:
    var(
      --login-success
    );

  background:
    rgba(
      0,
      255,
      155,
      0.08
    );
}


.login-alert-icon {
  width: 20px;
  height: 20px;

  flex:
    0
    0
    20px;

  border-radius: 50%;

  border:
    1px
    solid
    currentColor;

  display:
    inline-flex;

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

  font-size: 0.7rem;

  font-weight: 800;
}


/* =========================================================
   LOGIN FIELDS
   ========================================================= */

.login-field {
  margin-bottom: 19px;
}


.login-field label {
  display:
    inline-block;

  margin-bottom: 8px;

  color:
    var(
      --login-muted-strong
    );

  font-size: 0.82rem;

  font-weight: 650;
}


.login-input-wrap {
  position: relative;

  transition:
    transform
    0.2s
    ease;
}


.login-input-wrap:focus-within {
  transform:
    translateY(
      -1px
    );
}


.login-input {
  width: 100%;
  height: 50px;

  padding:
    0
    15px
    0
    45px;

  border:
    1px
    solid
    var(
      --login-border
    );

  border-radius: 11px;

  outline: none;

  color:
    var(
      --login-text
    );

  background:
    var(
      --login-surface-strong
    );

  font-size: 0.91rem;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}


.login-password-input {
  padding-right: 62px;
}


.login-input::placeholder {
  color:
    var(
      --login-muted
    );

  opacity: 0.58;
}


.login-input:focus {
  border-color:
    var(
      --login-primary
    );

  box-shadow:
    0
    0
    0
    4px
    rgb(var(--brand-rgb) / 0.1);
}

.login-input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.login-input-wrap:has(.login-input:disabled):focus-within {
  transform: none;
}

.login-password-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}


.login-input.is-invalid {
  border-color:
    var(
      --login-danger
    );

  box-shadow:
    0
    0
    0
    4px
    rgba(
      255,
      97,
      121,
      0.08
    );
}


/* =========================================================
   INPUT ICON
   ========================================================= */

.login-input-icon {
  position: absolute;

  top: 50%;
  left: 15px;

  z-index: 2;

  color:
    var(
      --login-muted
    );

  transform:
    translateY(
      -50%
    );

  font-size: 0.88rem;

  font-weight: 800;

  pointer-events: none;
}


.login-input-wrap:focus-within
.login-input-icon {

  color:
    var(
      --login-primary
    );
}


/* =========================================================
   PASSWORD MONKEY / EYE BUTTON
   ========================================================= */

.login-password-toggle {
  position: absolute;

  top: 50%;
  right: 10px;

  width: 38px;
  height: 38px;

  padding: 0;

  border: 0;

  border-radius: 9px;

  color:
    var(
      --login-muted
    );

  background:
    rgb(var(--brand-rgb) / 0.04);

  cursor: pointer;

  transform:
    translateY(
      -50%
    );

  display:
    flex;

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

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


.login-password-toggle:hover {
  color:
    var(
      --login-primary
    );

  background:
    rgb(var(--brand-rgb) / 0.1);
}


.login-password-toggle:active {
  transform:
    translateY(
      -50%
    )
    scale(
      0.94
    );
}


.password-show-icon {
  font-size: 1.15rem;

  line-height: 1;

  user-select: none;
}


/* =========================================================
   FIELD ERRORS
   ========================================================= */

.login-field-error {
  display: block;

  min-height: 16px;

  padding-top: 5px;

  color:
    var(
      --login-danger
    );

  font-size: 0.68rem;
}


/* =========================================================
   LOGIN OPTIONS
   ========================================================= */

.login-options {
  margin:
    1px
    0
    22px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 14px;
}


/* =========================================================
   REMEMBER USERNAME
   ========================================================= */

.remember-login {
  position: relative;

  display:
    inline-flex;

  align-items: center;

  gap: 8px;

  color:
    var(
      --login-muted
    );

  cursor: pointer;

  font-size: 0.78rem;

  user-select: none;
}


.remember-login input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}


.remember-box {
  width: 17px;
  height: 17px;

  border:
    1px
    solid
    var(
      --login-border
    );

  border-radius: 5px;

  background:
    var(
      --login-surface-strong
    );

  display:
    inline-flex;

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

  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}


.remember-login
input:checked
+
.remember-box {

  border-color:
    transparent;

  background:
    linear-gradient(
      135deg,
      var(
        --login-primary
      ),
      var(
        --login-success
      )
    );
}


.remember-login
input:checked
+
.remember-box::after {

  content: '✓';

  color: #ffffff;

  font-size: 0.68rem;

  font-weight: 800;
}


.login-account-note {
  color:
    var(
      --login-muted
    );

  font-size: 0.7rem;
}


/* =========================================================
   LOGIN BUTTON
   ========================================================= */

.login-submit {
  position: relative;

  width: 100%;
  height: 50px;

  overflow: hidden;

  border: 0;

  border-radius: 11px;

  color: #ffffff;

  cursor: pointer;

  background:
    linear-gradient(
      135deg,
      var(
        --login-primary
      ),
      var(
        --login-primary-strong
      )
    );

  box-shadow:
    0
    7px
    25px
    rgba(
      0,
      160,
      255,
      0.28
    );

  display: flex;

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

  gap: 10px;

  font-size: 0.91rem;

  font-weight: 750;

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


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

  box-shadow:
    0
    11px
    30px
    rgba(
      0,
      160,
      255,
      0.38
    );

  filter:
    brightness(
      1.04
    );
}

.login-forgot-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  color: var(--login-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.login-forgot-link:hover {
  color: var(--login-success);
}

.login-forgot-link-inline {
  margin-top: 0;
}

.login-secondary-button {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--login-border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--login-text);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.login-secondary-button:hover {
  transform: translateY(-2px);
  border-color: var(--login-border-accent);
  background: rgb(var(--brand-rgb) / 0.05);
}

.login-secondary-button-wide {
  width: 100%;
}

.login-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.login-inline-form {
  flex: 1;
}

.login-recovery-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.login-recovery-form {
  width: 100%;
}

.login-recovery-separator {
  margin: 24px 0 16px;
  color: var(--login-muted);
  font-size: 0.9rem;
  text-align: center;
}

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


.login-submit:disabled {
  cursor: wait;
  opacity: 0.82;
}

.login-submit.locked,
.login-submit.login-submit-locked {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.login-submit.locked .login-submit-text,
.login-submit.login-submit-locked .login-submit-text {
  opacity: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.login-submit.locked::after,
.login-submit.login-submit-locked::after {
  display: none;
}

/* =========================================================
   LOGIN BUTTON COUNTDOWN PROGRESS
   ========================================================= */

.login-submit.locked,
.login-submit.login-submit-locked {
  --countdown-progress: conic-gradient(var(--login-danger, #ff4868) 0deg, var(--countdown-track) 0deg);
  --countdown-progress-rotate: 0deg;
}

.login-submit.locked .login-submit-text,
.login-submit.login-submit-locked .login-submit-text {
  opacity: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.login-submit.locked::after,
.login-submit.login-submit-locked::after {
  display: none;
}

.login-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  mask-image: linear-gradient(transparent 60%, #000 0);
  -webkit-mask-image: linear-gradient(transparent 60%, #000 0);
  opacity: 0.3;
  transition: opacity 0.2s ease;
}

.login-submit.locked::before,
.login-submit.login-submit-locked::before {
  opacity: 0.1;
}

.login-submit.locked .login-submit-text,
.login-submit.login-submit-locked .login-submit-text {
  background: var(--countdown-progress);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-submit:not(.locked):not(.login-submit-locked)::before {
  opacity: 0;
}


.login-submit:disabled {
  cursor: wait;
  opacity: 0.82;
}

.login-submit.locked,
.login-submit.login-submit-locked {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.login-submit.locked .login-submit-text,
.login-submit.login-submit-locked .login-submit-text {
  opacity: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.login-submit.locked::after,
.login-submit.login-submit-locked::after {
  display: none;
}


.login-submit-arrow {
  font-size: 1rem;

  transition:
    transform
    0.2s
    ease;
}


.login-submit:hover
.login-submit-arrow {

  transform:
    translateX(
      3px
    );
}


/* =========================================================
   LOGIN BUTTON SPINNER
   ========================================================= */

.login-submit-spinner {
  display: none;

  width: 18px;
  height: 18px;

  border:
    2px
    solid
    rgba(
      255,
      255,
      255,
      0.34
    );

  border-top-color:
    #ffffff;

  border-radius: 50%;

  animation:
    loginSpinner
    1.5s
    linear
    infinite;
}


.login-submit.is-loading
.login-submit-text,

.login-submit.is-loading
.login-submit-arrow {

  display: none;
}


.login-submit.is-loading
.login-submit-spinner {

  display:
    inline-block;
}


@keyframes loginSpinner {

  to {
    transform:
      rotate(
        360deg
      );
  }
}


/* =========================================================
   ROLE NOTE
   ========================================================= */

.login-role-note {
  margin-top: 22px;

  padding-top: 18px;

  border-top:
    1px
    solid
    var(
      --login-border
    );

  color:
    var(
      --login-muted
    );

  display: flex;

  align-items:
    flex-start;

  justify-content:
    center;

  gap: 8px;

  font-size: 0.73rem;

  line-height: 1.5;

  text-align: center;
}


.login-role-note-icon {
  color:
    var(
      --login-success
    );

  font-weight: 800;
}


/* =========================================================
   LIGHT MODE EXTRAS
   ========================================================= */

html.light-mode
.login-password-toggle {

  background:
    rgb(var(--brand-rgb) / 0.05);
}


html.light-mode
.login-password-toggle:hover {

  background:
    rgb(var(--brand-rgb) / 0.1);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media
(
  max-width: 1080px
) {

  .login-shell {

    gap: 40px;

    grid-template-columns:

      minmax(
        0,
        0.9fr
      )

      minmax(
        340px,
        1fr
      );
  }


  .login-floating-card {
    display: none;
  }
}


/* ========================================================= */

@media
(
  max-width: 820px
) {

  .login-header {

    width:
      min(
        100% - 32px,
        680px
      );
  }


  .login-shell {

    width:
      min(
        100% - 32px,
        560px
      );

    min-height:
      calc(
        100vh - 78px
      );

    padding-top:
      28px;

    grid-template-columns:
      1fr;
  }


  .login-visual-section {
    display: none;
  }


  .login-card {

    max-width: none;

    margin: 0;
  }
}


/* ========================================================= */

@media
(
  max-width: 520px
) {

  .login-header {
    padding-top: 17px;
  }


  .login-brand {
    font-size: 0.92rem;
  }


  .login-brand-logo {

    width: 30px;
    height: 30px;
  }


  .back-home-link {
    font-size: 0;
  }


  .back-home-link span {
    font-size: 1.2rem;
  }


  .login-shell {

    width:
      min(
        100% - 22px,
        500px
      );

    padding-top:
      22px;

    padding-bottom:
      28px;
  }


  .login-card {

    padding:
      25px
      20px;

    border-radius:
      20px;
  }


  .login-card h1 {
    font-size: 2rem;
  }


  .login-options {

    align-items:
      flex-start;

    flex-direction:
      column;

    gap: 10px;
  }


  .login-account-note {
    padding-left: 25px;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media
(
  prefers-reduced-motion:
  reduce
) {

  .login-device-wrapper,
  .login-floating-card,
  .face-scanner-ring,
  .face-scan-line,
  .login-device-pulse span,
  .login-system-dot {

    animation-duration:
      0.01ms
      !important;

    animation-iteration-count:
      1
      !important;
  }

  
}
@media (prefers-reduced-motion: reduce) {
  .particle {
    animation-duration: 80s !important;
    animation-iteration-count: infinite !important;
  }
  .login-submit-spinner {
    animation-duration: 2.5s !important;
    animation-iteration-count: infinite !important;
  }
  .login-toast {
    animation-duration: 0.01ms !important;
  }
}

/* Failed sign-in limiter (AuthController) — the in-alert link to Forgot
   Password after repeated failures, and the lock countdown text. */

.login-alert .login-alert-link {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-alert .login-alert-link:hover {
  opacity: .85;
}

.login-alert .login-alert-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.login-alert [data-lock-countdown] {
  font-weight: 700;
}

.login-lock-toast [data-lock-countdown] {
  display: inline-block;
  font-weight: 800;
}

.login-submit:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.login-submit.login-submit-locked {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.6);
  box-shadow: 0 7px 25px rgba(0, 160, 255, 0.12);
}

.login-submit.login-submit-locked:hover {
  transform: none;
  box-shadow: 0 7px 25px rgba(0, 160, 255, 0.12);
  filter: grayscale(0.6);
}


/* =========================================================
   LOGIN TOAST NOTIFICATIONS (Top Right Corner)
   ========================================================= */

.login-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 48px));
  contain: layout style;
}.login-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 97, 121, 0.5);
  background: rgba(19, 22, 36, 0.92);
  color: var(--login-danger);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  isolation: isolate;
}

.login-toast.login-toast-visible {
  opacity: 1;
  pointer-events: auto;
}

.login-toast-badge {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;

  --countdown-ring: rgba(255, 97, 121, 0.18);
  --countdown-track: rgba(255, 255, 255, 0.12);
  --countdown-progress: var(--login-danger);
  
  background: rgba(0, 0, 0, 0.3);
}

.login-toast-countdown-ring {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: block;
}

.login-toast-countdown-ring::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--countdown-track);
}

.login-toast-countdown-ring::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--countdown-track);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)) contribute%; 
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)) contribute%;
  transform: rotate(-90deg);
}

.login-toast-count {
  font-family: var(--rams-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--login-danger);
}

.login-toast-text {
  flex: 1;
  min-width: 0;
  color: rgba(255, 255, 255, 0.92);
}

.login-toast-formatted {
  display: block;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.login-toast-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  padding: 4px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.login-toast-dismissible .login-toast-dismiss {
  opacity: 1;
  pointer-events: auto;
}

.login-toast-dismissible.login-toast-visible .login-toast-dismiss {
  opacity: 1;
}

.login-toast-dismissible.login-toast-visible:hover .login-toast-dismiss {
  color: rgba(255, 255, 255, 0.8);
}

.login-toast-notice .login-toast-countdown-ring::after {
  background: var(--login-info);
}

.login-toast-notice .login-toast-count {
  color: var(--login-info);
}

.login-toast:not(.login-toast-visible) {
  display: none;
  visibility: hidden;
}

.login-toast.login-toast-visible {
  animation: none;
  opacity: 1;
  transform: translateX(0);
  transition: none;
  display: flex;
}

.login-toast:not(.login-toast-visible) {
  display: none;
}

.login-toast.success {
  border-color: rgba(0, 255, 136, 0.4);
  background: rgba(0, 255, 136, 0.14);
  color: var(--login-success);
}

.login-toast.info {
  border-color: rgba(0, 200, 255, 0.4);
  background: rgba(0, 200, 255, 0.14);
  color: var(--login-primary);
}

.login-toast.hiding {
  animation: loginToastSlideOut 0.3s ease forwards;
}

.login-toast-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.login-toast-content {
  flex: 1;
  min-width: 0;
}

.login-toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.7;
  padding: 0 4px;
  transition: opacity 0.2s ease;
}

.login-toast-close:hover {
  opacity: 1;
}

.login-lock-toast {
  border-color: rgba(255, 97, 121, 0.55);
  background: rgba(255, 97, 121, 0.18);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.login-lock-toast .login-toast-icon {
  color: var(--login-danger);
}

.login-lock-toast .login-toast-content strong {
  color: var(--login-text);
  font-weight: 800;
}

.login-toast-spinner {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--login-text);
  border-radius: 50%;
  animation: loginToastSpinner 0.8s linear infinite;
}

.login-lock-toast .login-toast-spinner {
  border-top-color: var(--login-danger);
}

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

@keyframes loginToastSlideIn {
  from {
    opacity: 0;
    transform: translate(100%, -12px);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-toast {
    animation-duration: 0.01ms !important;
  }
}

@keyframes loginToastSlideOut {
  from {
    opacity: 1;
    transform: translate(0, 0);
  }
  to {
    opacity: 0;
    transform: translate(100%, -12px);
  }
}

html.light-mode .login-toast {
  box-shadow: 0 20px 60px rgba(58, 85, 112, 0.25);
}

html.light-mode .login-lock-toast {
  background: rgba(255, 97, 121, 0.12);
}

@media (max-width: 520px) {
  .login-toast-container {
    top: 12px;
    right: 12px;
    max-width: calc(100vw - 24px);
  }
  .login-toast {
    padding: 12px 14px;
    font-size: 0.82rem;
  }
  .login-toast-spinner {
    width: 12px;
    height: 12px;
  }
}
