/* ============================================================================
   Cascade Nexus — Login Gate Styles
   Full-screen overlay matching the dark dashboard theme
   ============================================================================ */

/* ─── Login Overlay ──────────────────────────────────────────── */
#loginOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary, #111318);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(45, 90, 64, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(91, 143, 168, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(45, 212, 191, 0.04) 0%, transparent 50%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loginOverlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ─── Login Card ─────────────────────────────────────────────── */
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 48px 40px 40px;
  text-align: center;
}

.login-logo {
  font-size: 42px;
  margin-bottom: 8px;
  display: block;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary, #e8edf2);
  margin: 0 0 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-tertiary, #6b7280);
  margin: 0 0 32px;
}

.login-error {
  font-size: 13px;
  color: #ef4444;
  margin-bottom: 16px;
  min-height: 20px;
  transition: opacity 0.2s;
}

.login-error:empty {
  opacity: 0;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary, #1a1d24);
  border: 1px solid var(--border-color, #2a2d35);
  border-radius: 10px;
  color: var(--text-primary, #e8edf2);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.login-input::placeholder {
  color: var(--text-quaternary, #4b5563);
}

.login-input:focus {
  border-color: var(--accent, #5b8fa8);
  box-shadow: 0 0 0 3px rgba(91, 143, 168, 0.15);
}

.login-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent, #5b8fa8);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.login-submit:hover {
  background: var(--accent-hover, #4a7d94);
}

.login-submit:active {
  transform: scale(0.98);
}

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

.login-hint {
  font-size: 11px;
  color: var(--text-quaternary, #4b5563);
  margin-top: 24px;
}

/* ─── Spinner ─────────────────────────────────────────────────── */
.login-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loginSpin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

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