/**
 * TrustMeet — premium login experience
 * Loaded on /login (templates/auth/login.php)
 */

@keyframes tm-login-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tm-login-glow-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.04);
  }
}

@keyframes tm-login-cta-pulse {
  0%,
  100% {
    box-shadow:
      0 12px 36px rgba(99, 102, 241, 0.38),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset,
      0 0 24px rgba(56, 189, 248, 0.15);
  }
  50% {
    box-shadow:
      0 16px 44px rgba(99, 102, 241, 0.48),
      0 0 0 1px rgba(255, 255, 255, 0.14) inset,
      0 0 32px rgba(56, 189, 248, 0.28);
  }
}

@keyframes tm-login-shine {
  0% {
    transform: translateX(-120%) skewX(-18deg);
    opacity: 0;
  }
  35% {
    opacity: 0.35;
  }
  100% {
    transform: translateX(220%) skewX(-18deg);
    opacity: 0;
  }
}

@keyframes tm-login-orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(14px, -10px) scale(1.06);
  }
}

body.tm-page--login {
  font-family: "Plus Jakarta Sans", "Poppins", var(--tm-font-sans, system-ui), sans-serif;
  background: #05070f;
}

body.tm-page--login .tm-pnav__inner {
  padding: 16px 24px;
}

@media (max-width: 899px) {
  body.tm-page--login .tm-pnav__inner {
    padding: 14px 16px;
  }

  body.tm-page--login .tm-login-page__inner {
    padding: 24px 16px 48px;
  }

  body.tm-page--login .tm-login-hero {
    margin-bottom: 24px;
  }
}

body.tm-page--login .tm-pnav__ghost.is-active {
  color: #f8fafc;
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

body.tm-page--login .tm-pnav__dlink.is-active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
}

/* Hide legacy auth main styles when premium layout is present */
body.tm-page--login .tm-auth-main:not(.tm-login-page) {
  display: none;
}

.tm-login-page {
  position: relative;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: calc(100vh - 72px);
}

.tm-login-page__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.tm-login-page__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: tm-login-orb-float 16s ease-in-out infinite;
}

.tm-login-page__orb--a {
  width: min(480px, 55vw);
  height: min(480px, 55vw);
  top: -8%;
  left: -6%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22), transparent 68%);
}

.tm-login-page__orb--b {
  width: min(420px, 48vw);
  height: min(420px, 48vw);
  right: -4%;
  top: 22%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.24), transparent 70%);
  animation-delay: -5s;
}

.tm-login-page__orb--c {
  width: min(360px, 42vw);
  height: min(360px, 42vw);
  left: 38%;
  bottom: -12%;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.16), transparent 72%);
  animation-delay: -9s;
}

.tm-login-page__inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 22px 72px;
}

.tm-login-reveal {
  animation: tm-login-fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.08s * var(--tm-reveal-i, 0));
}

.tm-login-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
}

.tm-login-hero__eyebrow {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(165, 180, 252, 0.9);
}

.tm-login-hero__title {
  margin: 0 0 14px;
  font-family: "Plus Jakarta Sans", "Poppins", sans-serif;
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  background: linear-gradient(135deg, #f8fafc 0%, #c7d2fe 42%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tm-login-hero__lead {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.65;
  color: rgba(203, 213, 225, 0.92);
  font-weight: 500;
}

.tm-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

@media (min-width: 960px) {
  .tm-login-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 32px;
    align-items: stretch;
  }
}

.tm-login-form-col {
  min-width: 0;
}

.tm-login-card-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

@media (min-width: 960px) {
  .tm-login-card-wrap {
    margin: 0;
    max-width: none;
  }
}

.tm-login-card__glow {
  position: absolute;
  inset: -20px -16px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(99, 102, 241, 0.22), rgba(192, 132, 252, 0.14));
  filter: blur(28px);
  opacity: 0.55;
  animation: tm-login-glow-pulse 5s ease-in-out infinite;
  pointer-events: none;
}

.tm-login-card {
  position: relative;
  padding: 28px 26px 26px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 28px 64px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.tm-login-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.32);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 32px 72px rgba(0, 0, 0, 0.48),
    0 0 40px rgba(99, 102, 241, 0.12);
}

.tm-login-card__helper {
  margin: 0 0 20px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(203, 213, 225, 0.88);
  font-weight: 500;
}

.tm-login-alert {
  margin-bottom: 16px;
}

.tm-login-alert.tm-alert.show {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: #fecdd3;
}

.tm-login-alert.tm-alert.tm-alert--staff.show {
  background: rgba(30, 58, 138, 0.35);
  border-color: rgba(96, 165, 250, 0.45);
  color: #dbeafe;
}

.tm-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tm-login-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.82);
}

.tm-login-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.72);
  color: #f1f5f9;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    transform 0.18s ease;
}

.tm-login-field input::placeholder {
  color: rgba(148, 163, 184, 0.72);
  font-weight: 400;
}

.tm-login-field input:hover {
  border-color: rgba(129, 140, 248, 0.35);
}

.tm-login-field input:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.65);
  background: rgba(2, 6, 23, 0.88);
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.22),
    0 0 24px rgba(56, 189, 248, 0.14);
  transform: translateY(-1px);
}

.tm-login-submit {
  position: relative;
  overflow: hidden;
  margin-top: 6px;
  padding: 15px 22px !important;
  border: none !important;
  border-radius: 16px !important;
  font-family: inherit;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  color: #fff !important;
  background: linear-gradient(135deg, #22d3ee 0%, #6366f1 48%, #a78bfa 100%) !important;
  background-size: 160% 100% !important;
  animation: tm-login-cta-pulse 3.2s ease-in-out infinite;
  transition: transform 0.22s ease, filter 0.22s ease !important;
}

.tm-login-submit:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.06);
}

.tm-login-submit:active {
  transform: translateY(0) scale(0.99);
}

.tm-login-submit__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  animation: tm-login-shine 4.5s ease-in-out infinite;
  pointer-events: none;
}

.tm-login-submit__label {
  position: relative;
  z-index: 1;
}

.tm-login-forgot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.88rem;
}

.tm-login-forgot a {
  color: #a5f3fc;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(165, 243, 252, 0.3);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tm-login-forgot a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.45);
}

.tm-login-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
  padding: 16px 14px;
  list-style: none;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.35);
}

.tm-login-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.9);
  line-height: 1.35;
}

.tm-login-trust__dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.tm-login-alert .tm-alert-staff-msg {
  margin: 0 0 12px;
}

.tm-login-alert .tm-alert-staff-btn {
  display: block;
  margin: 0;
  text-align: center;
  text-decoration: none;
  border-radius: 14px !important;
}

.tm-login-signup {
  margin: 20px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: rgba(203, 213, 225, 0.88);
}

.tm-login-signup a {
  color: #c4b5fd;
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
  transition: color 0.2s ease;
}

.tm-login-signup a:hover {
  color: #fff;
}

/* Side panel */
.tm-login-info__panel {
  height: 100%;
  padding: 26px 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.55), rgba(30, 27, 75, 0.28));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.tm-login-info__title {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.tm-login-info__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tm-login-info__list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.tm-login-info__bullet {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.45);
}

.tm-login-info__list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
}

.tm-login-info__list p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(148, 163, 184, 0.95);
}

@media (max-width: 959px) {
  .tm-login-info__panel {
    margin-top: 8px;
  }
}

@media (max-width: 520px) {
  .tm-login-page__inner {
    padding-top: 24px;
    padding-bottom: 48px;
  }

  .tm-login-trust {
    grid-template-columns: 1fr;
  }

  .tm-login-card {
    padding: 22px 18px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tm-login-reveal,
  .tm-login-card__glow,
  .tm-login-submit,
  .tm-login-submit__shine,
  .tm-login-page__orb {
    animation: none !important;
  }

  .tm-login-card:hover,
  .tm-login-field input:focus,
  .tm-login-submit:hover {
    transform: none;
  }
}
