/* GTA System — internal login with animated themed background */

:root {
  --login-navy: #1a2332;
  --login-navy-mid: #243049;
  --login-pink: #e91e63;
  --login-pink-dark: #c2185b;
  --login-pink-glow: rgba(233, 30, 99, 0.45);
  --login-muted: #8392ab;
  --login-border: rgba(255, 255, 255, 0.12);
  --login-radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5.5rem 1.5rem 2rem;
  font-family: 'Cairo', system-ui, sans-serif;
  overflow: hidden;
  background: var(--login-navy);
}

/* ——— Animated background ——— */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-bg__mesh {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, #0f1623 0%, var(--login-navy) 40%, #1a1020 100%);
}

.login-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: login-orb-drift 18s ease-in-out infinite;
}

.login-bg__orb--1 {
  width: 480px;
  height: 480px;
  top: -12%;
  right: -8%;
  background: radial-gradient(circle, var(--login-pink-glow) 0%, transparent 70%);
  animation-duration: 22s;
}

.login-bg__orb--2 {
  width: 360px;
  height: 360px;
  bottom: -10%;
  left: -6%;
  background: radial-gradient(circle, rgba(94, 114, 228, 0.35) 0%, transparent 70%);
  animation-duration: 26s;
  animation-delay: -6s;
}

.login-bg__orb--3 {
  width: 280px;
  height: 280px;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(233, 30, 99, 0.2) 0%, transparent 70%);
  animation-duration: 20s;
  animation-delay: -12s;
}

.login-bg__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.4;
  animation: login-dots-shift 40s linear infinite;
}

.login-bg__floats {
  position: absolute;
  inset: 0;
}

.login-float {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.35);
  animation: login-float  var(--dur, 14s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.login-float i {
  font-size: 1.4rem;
}

.login-float--1  { top: 12%;  right: 8%;   --dur: 16s; --delay: 0s;   width: 56px; height: 56px; color: rgba(255, 107, 157, 0.5); }
.login-float--2  { top: 22%;  left: 6%;    --dur: 18s; --delay: -2s;  width: 48px; height: 48px; }
.login-float--3  { top: 38%;  right: 14%; --dur: 15s; --delay: -4s;  width: 44px; height: 44px; color: rgba(94, 114, 228, 0.45); }
.login-float--4  { top: 55%;  left: 10%;  --dur: 20s; --delay: -1s;  width: 58px; height: 58px; color: rgba(255, 107, 157, 0.45); }
.login-float--5  { top: 68%;  right: 6%;  --dur: 17s; --delay: -6s;  width: 46px; height: 46px; }
.login-float--6  { top: 8%;   left: 22%;  --dur: 19s; --delay: -3s;  width: 50px; height: 50px; }
.login-float--7  { top: 72%;  left: 22%;  --dur: 21s; --delay: -8s;  width: 42px; height: 42px; color: rgba(94, 114, 228, 0.4); }
.login-float--8  { top: 48%;  right: 4%;  --dur: 16s; --delay: -5s;  width: 54px; height: 54px; }
.login-float--9  { top: 82%;  right: 22%; --dur: 22s; --delay: -7s;  width: 40px; height: 40px; }
.login-float--10 { top: 30%;  left: 4%;   --dur: 18s; --delay: -9s;  width: 48px; height: 48px; color: rgba(255, 107, 157, 0.4); }
.login-float--11 { top: 62%;  right: 28%; --dur: 17s; --delay: -11s; width: 44px; height: 44px; }
.login-float--12 { top: 18%;  right: 32%; --dur: 20s; --delay: -10s; width: 46px; height: 46px; color: rgba(94, 114, 228, 0.38); }

@keyframes login-orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(24px, -18px) scale(1.06); }
  66%       { transform: translate(-16px, 14px) scale(0.96); }
}

@keyframes login-dots-shift {
  0%   { background-position: 0 0; }
  100% { background-position: 32px 32px; }
}

@keyframes login-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.55;
  }
  25% {
    transform: translateY(-14px) rotate(2deg);
    opacity: 0.75;
  }
  50% {
    transform: translateY(-6px) rotate(-1deg);
    opacity: 0.6;
  }
  75% {
    transform: translateY(-18px) rotate(1deg);
    opacity: 0.7;
  }
}

/* ——— Top brand ——— */
.login-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(180deg, rgba(15, 22, 35, 0.85) 0%, transparent 100%);
}

.login-top__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

.login-top__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--login-pink) 0%, var(--login-pink-dark) 100%);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  box-shadow: 0 4px 16px rgba(233, 30, 99, 0.4);
}

.login-top__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

/* ——— Login card ——— */
.login-shell {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  border-radius: var(--login-radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  padding: 2rem 1.75rem;
}

.login-card__brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.1) 0%, rgba(26, 35, 50, 0.06) 100%);
  border: 1px solid rgba(233, 30, 99, 0.15);
  margin-bottom: 1rem;
}

.login-card__icon i {
  font-size: 1.5rem;
  color: var(--login-pink);
}

.login-card__brand h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--login-navy);
  margin: 0 0 0.35rem;
}

.login-card__brand p {
  font-size: 0.82rem;
  color: var(--login-muted);
  margin: 0;
  line-height: 1.6;
}

.login-field {
  margin-bottom: 1rem;
}

.login-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--login-navy);
  margin-bottom: 0.35rem;
}

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

.login-input-wrap i.field-icon {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  left: auto;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--login-muted);
  pointer-events: none;
  z-index: 1;
}

.login-input-wrap input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 0.85rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--login-navy);
  background: #fafbfc;
  text-align: right;
  direction: rtl;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input-wrap--password input {
  padding-left: 2.75rem;
  padding-right: 0.85rem;
}

.login-input-wrap input:focus {
  outline: none;
  border-color: var(--login-pink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.12);
}

.login-input-wrap .toggle-pw {
  position: absolute;
  top: 50%;
  left: 0.5rem;
  right: auto;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--login-muted);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  z-index: 2;
  flex-shrink: 0;
}

.login-input-wrap .toggle-pw .material-symbols-rounded {
  font-size: 1.2rem;
  pointer-events: none;
}

.login-input-wrap .toggle-pw:hover {
  color: var(--login-pink);
  background: rgba(233, 30, 99, 0.06);
}

.login-input-wrap .toggle-pw:focus-visible {
  outline: 2px solid var(--login-pink);
  outline-offset: 2px;
}

.login-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--login-pink) 0%, var(--login-pink-dark) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.35);
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.login-submit:hover:not(:disabled) {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(233, 30, 99, 0.42);
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.login-submit .spinner-ring {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin 0.7s linear infinite;
  display: none;
}

.login-submit.is-loading .spinner-ring {
  display: block;
}

.login-submit.is-loading .btn-text {
  opacity: 0.85;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

.login-error {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
  background: #fff5f5;
  border: 1px solid #feb2b2;
  border-radius: 10px;
  color: #c53030;
  font-size: 0.82rem;
  font-weight: 500;
}

.login-error.is-visible {
  display: flex;
}

.login-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: var(--login-muted);
}

.login-note i {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 480px) {
  .login-page {
    padding: 5rem 1rem 1.5rem;
  }

  .login-top__title {
    font-size: 1.15rem;
  }

  .login-float {
    opacity: 0.35;
  }

  .login-float--9,
  .login-float--11,
  .login-float--12 {
    display: none;
  }

  .login-card {
    padding: 1.5rem 1.25rem;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .login-bg__orb,
  .login-bg__dots,
  .login-float {
    animation: none;
  }
}
