/* =============================================
   AVTools - Login Page Styles
   ============================================= */

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

:root {
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --glass-bg: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(255,255,255,0.08);
  --input-bg: rgba(255,255,255,0.05);
  --input-border: rgba(255,255,255,0.12);
  --input-focus: rgba(59,130,246,0.5);
  --error-bg: rgba(239, 68, 68, 0.1);
  --error-border: rgba(239, 68, 68, 0.4);
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--slate-950);
  color: var(--text-primary);
  overflow: hidden;
}

/* Background */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

.bg-glow {
  position: fixed; z-index: 0; border-radius: 50%;
  filter: blur(120px); pointer-events: none;
}
.bg-glow-1 {
  width: 600px; height: 600px;
  top: -200px; left: -200px;
  background: radial-gradient(circle, rgba(37,99,235,0.18), transparent 70%);
  animation: floatGlow 8s ease-in-out infinite;
}
.bg-glow-2 {
  width: 500px; height: 500px;
  bottom: -200px; right: -100px;
  background: radial-gradient(circle, rgba(99,102,241,0.12), transparent 70%);
  animation: floatGlow 10s ease-in-out infinite reverse;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.05); }
}

/* Aircraft SVGs */
.aircraft-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.aircraft {
  position: absolute;
  color: rgba(59,130,246,0.04);
  animation: fly linear infinite;
}
.a1 { width: 200px; top: 15%; animation-duration: 30s; animation-delay: 0s; }
.a2 { width: 120px; top: 55%; animation-duration: 40s; animation-delay: -15s; }
.a3 { width: 160px; top: 75%; animation-duration: 35s; animation-delay: -8s; }

@keyframes fly {
  from { transform: translateX(-300px) rotate(15deg); }
  to { transform: translateX(calc(100vw + 300px)) rotate(15deg); }
}

/* Login Container */
.login-container {
  position: relative; z-index: 10;
  height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
  gap: 20px;
}

/* Card */
.login-card {
  width: 100%; max-width: 420px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(24px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 25px 50px rgba(0,0,0,0.5),
    0 0 80px rgba(37,99,235,0.08);
  animation: cardIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

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

/* Logo */
.login-logo {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 36px;
}

.logo-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  filter: drop-shadow(0 0 16px rgba(59,130,246,0.5));
}
.logo-icon svg { width: 100%; height: 100%; }

.logo-text h1 {
  font-size: 1.8rem; font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}
.logo-text span {
  font-size: 0.75rem; font-weight: 500;
  color: var(--text-secondary); letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

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

.form-group label {
  font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.08em;
}

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

.input-icon {
  position: absolute; left: 14px;
  width: 18px; height: 18px; color: var(--text-secondary);
  pointer-events: none; z-index: 1;
}
.input-icon svg { width: 100%; height: 100%; }

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

.input-wrapper input:focus {
  border-color: var(--blue-500);
  background: rgba(59,130,246,0.05);
  box-shadow: 0 0 0 3px var(--input-focus);
}

.input-wrapper input::placeholder { color: rgba(148,163,184,0.5); }

.toggle-password {
  position: absolute; right: 14px;
  width: 20px; height: 20px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
  padding: 0;
}
.toggle-password:hover { color: var(--blue-400); }
.toggle-password svg { width: 100%; height: 100%; }

/* Error */
.login-error {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 10px;
  font-size: 0.85rem; color: #fca5a5;
  animation: shake 0.3s cubic-bezier(0.36,0.07,0.19,0.97);
}
.login-error svg { width: 18px; height: 18px; flex-shrink: 0; }

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

/* Login Button */
.btn-login {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: white; border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; letter-spacing: 0.02em;
  position: relative; overflow: hidden;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 20px rgba(37,99,235,0.35);
  margin-top: 4px;
}

.btn-login::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
}

.btn-login:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(37,99,235,0.45);
}
.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled { opacity: 0.7; cursor: not-allowed; }

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Login Footer */
.login-footer {
  display: flex; align-items: center; gap: 8px;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  font-size: 0.78rem; color: var(--text-secondary);
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.9); }
}

/* Version badge */
.version-badge {
  font-size: 0.72rem; color: rgba(148,163,184,0.4);
  letter-spacing: 0.05em;
}

/* Utilities */
.hidden { display: none !important; }
