/* ===========================
   LOGIN PAGE - SynkAI
   =========================== */

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

:root {
  --orange: #F5851F;
  --orange-light: #FFa347;
  --orange-dark: #D96E0A;
  --bg-primary: #0b0d0f;
  --bg-card: #111417;
  --bg-input: #1a1d22;
  --border: #2a2d34;
  --text-primary: #e9edef;
  --text-secondary: #8696a0;
  --text-muted: #536471;
  --error: #f32735;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

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

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: float 12s ease-in-out infinite;
}

.orb-1 {
  width: 500px; height: 500px;
  background: var(--orange);
  top: -150px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 350px; height: 350px;
  background: #D96E0A;
  bottom: -100px; right: -80px;
  animation-delay: -4s;
}
.orb-3 {
  width: 250px; height: 250px;
  background: var(--orange-light);
  top: 50%; left: 55%;
  animation-delay: -8s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 20px) scale(0.95); }
}

/* ---- Login Card ---- */
.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 36px 40px;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Logo ---- */
.logo-area {
  text-align: center;
  margin-bottom: 20px;
  overflow: hidden;
}

.logo-image {
  max-width: 310px;
  width: 100%;
  height: auto;
  /* Neutralize the transparent whitespace inside the PNG */
  margin-top: -18%;
  margin-bottom: calc(-18% + 50px);
  filter: drop-shadow(0 4px 16px rgba(245, 133, 31, 0.25));
}

.logo-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---- Form ---- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.input-wrapper input:focus {
  border-color: var(--orange);
  background: rgba(245,133,31,0.05);
  box-shadow: 0 0 0 3px rgba(245,133,31,0.12);
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.toggle-password {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-password:hover { color: var(--text-secondary); }

/* ---- Options ---- */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--orange);
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-link:hover { color: var(--orange-light); }

/* ---- Button ---- */
.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, #e15200, #e77c15, #ffb703);
  border: none;
  border-radius: 12px;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 4px 20px rgba(245,133,31,0.35);
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.btn-login:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245,133,31,0.45);
}

.btn-login:active:not(:disabled) { transform: translateY(0); }

.btn-login:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-loader {
  display: flex;
  align-items: center;
}

.spinner {
  width: 20px; height: 20px;
  animation: spin 0.8s linear infinite;
}

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

/* ---- Error ---- */
.error-message {
  align-items: center;
  gap: 8px;
  background: rgba(243,39,53,0.1);
  border: 1px solid rgba(243,39,53,0.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #ff6b7a;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ---- Footer ---- */
.login-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 28px;
}
