/* ============================================================
   keynexis — Auth (Login) Styles
   Mirrors the React Management Portal glassmorphism theme so
   users do not experience a visual break when the SPA redirects
   them here for authentication.
   ============================================================ */

:root {
  --background: 213 47% 7%;
  --foreground: 0 0% 100%;
  --primary: 195 43% 25%;
  --primary-hover: 195 43% 32%;
  --primary-foreground: 0 0% 100%;
  --radius: 0.5rem;

  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;
}

* { box-sizing: border-box; }

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

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif;
  background: hsl(var(--background));
  color: rgba(255, 255, 255, 0.9);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Ambient background orbs ---- */
.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.ambient-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(36, 76, 90, 0.35) 0%, transparent 70%);
  top: -5%; left: -5%;
  animation: orb-float-1 25s ease-in-out infinite;
}
.ambient-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, transparent 70%);
  top: 40%; right: -8%;
  animation: orb-float-2 30s ease-in-out infinite;
}
.ambient-orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  bottom: -5%; left: 25%;
  animation: orb-float-3 22s ease-in-out infinite;
}
.ambient-orb-4 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(36, 76, 90, 0.2) 0%, transparent 70%);
  top: 20%; left: 45%;
  animation: orb-float-2 28s ease-in-out infinite reverse;
}

@keyframes orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -40px) scale(1.05); }
  66%      { transform: translate(-20px, 20px) scale(0.95); }
}
@keyframes orb-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-40px, 30px) scale(0.95); }
  66%      { transform: translate(25px, -15px) scale(1.08); }
}
@keyframes orb-float-3 {
  0%, 100% { transform: translate(0, 0) scale(1.02); }
  50%      { transform: translate(35px, 25px) scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-orb { animation: none !important; }
}

/* ---- Layout ---- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

.auth-card {
  width: 100%;
  max-width: 28rem;
  padding: 2rem;
}

/* ---- Logo ---- */
.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.logo-tile {
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 0.75rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

/* ---- Titles ---- */
.auth-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
}

.auth-subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 1.5rem;
  text-align: center;
}

/* ---- Alert ---- */
.auth-notice {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(125, 211, 252, 0.36);
  color: #d6f3ff;
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  text-align: center;
}

.auth-alert {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* ---- Form ---- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.form-field input {
  height: 2.5rem;
  padding: 0 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.form-field input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-field input:focus {
  outline: none;
  border-color: hsl(195 43% 45%);
  box-shadow: 0 0 0 2px hsl(195 43% 35% / 0.4);
}

/* ---- Button ---- */
.btn-primary {
  height: 2.5rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s, transform 0.1s;
  margin-top: 0.25rem;
}

.btn-primary:hover {
  background: hsl(var(--primary-hover));
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Footer link ---- */
.auth-footer-link {
  text-align: center;
  margin-top: 0.25rem;
}

.auth-footer-link a {
  font-size: 0.75rem;
  color: hsl(195 43% 55%);
  text-decoration: none;
}

.auth-footer-link a:hover {
  text-decoration: underline;
}
