/* ============================================
   LOGIN PAGE STYLES
   ============================================ */
:root {
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-light: #6EE7B7;
  --primary-glow: rgba(16, 185, 129, 0.30);
  --bg-main: #F8FAFB;
  --bg-card: #FFFFFF;
  --bg-input: #F1F5F9;
  --text-primary: #022C22;
  --text-secondary: #065F46;
  --text-muted: #059669;
  --border-color: rgba(16, 185, 129, 0.18);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg-main: #0F1117;
  --bg-card: #1A1D27;
  --bg-input: #242736;
  --text-primary: #E8EAF0;
  --text-secondary: #9CA3B4;
  --text-muted: #6B7280;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: absolute;
  top: -40%; right: -15%;
  width: 70%; height: 130%;
  background: radial-gradient(ellipse at center, var(--primary-glow) 0%, transparent 70%);
  z-index: 0;
  animation: gradientMove 12s ease-in-out infinite;
  background-size: 200% 200%;
}

body::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -15%;
  width: 55%; height: 90%;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  z-index: 0;
}

.login-container {
  background: var(--bg-card);
  padding: 48px 44px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 440px;
  position: relative; z-index: 1;
  animation: fadeUp 0.6s var(--ease);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header { text-align: center; margin-bottom: 40px; }

.logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  animation: float 4s ease-in-out infinite;
  box-shadow: 0 8px 24px var(--primary-glow);
}

.logo svg { width: 34px; height: 34px; stroke: white; }

h2 { color: var(--text-primary); font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.03em; }
.subtitle { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.form-group { margin-bottom: 20px; }

label {
  display: block; margin-bottom: 8px;
  color: var(--text-secondary); font-weight: 600; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}

.input-wrapper { position: relative; }

.input-wrapper svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; stroke: var(--text-muted);
  transition: stroke 0.2s var(--ease); pointer-events: none;
}

input {
  width: 100%; padding: 14px 16px 14px 48px;
  border: 1px solid var(--border-color); border-radius: 14px;
  font-size: 1rem; font-weight: 500;
  transition: all 0.2s var(--ease);
  background: var(--bg-input); color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); background: var(--bg-card); }
.input-wrapper:focus-within svg { stroke: var(--primary); }
input::placeholder { color: var(--text-muted); }

button#loginBtn {
  width: 100%; padding: 15px 24px;
  background: var(--primary); color: white; border: none; border-radius: 14px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 8px; font-family: 'Inter', sans-serif;
  letter-spacing: -0.01em; box-shadow: 0 4px 16px var(--primary-glow);
}

button#loginBtn svg { width: 20px; height: 20px; }
button#loginBtn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 28px var(--primary-glow); }
button#loginBtn:active { transform: translateY(0) scale(0.98); }

.footer { text-align: center; margin-top: 32px; color: var(--text-muted); font-size: 0.82rem; font-weight: 500; }

.theme-toggle {
  position: fixed; top: 24px; right: 24px;
  width: 44px; height: 44px; border-radius: 14px;
  border: 1px solid var(--border-color); background: var(--bg-card);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease); z-index: 10;
  box-shadow: var(--shadow); padding: 0;
}

.theme-toggle:hover { transform: scale(1.05); border-color: var(--primary); }
.theme-toggle svg { width: 18px; height: 18px; stroke: var(--text-secondary); }
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: block; }

button.loading { pointer-events: none; opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }
button.loading svg { animation: spin 0.8s linear infinite; }

input.error { border-color: #EF4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
.error-message { color: #EF4444; font-size: 0.8rem; font-weight: 500; margin-top: 8px; display: none; }
.error-message.visible { display: block; }

@media (max-width: 480px) {
  .login-container { padding: 36px 28px; border-radius: 20px; }
  h2 { font-size: 1.5rem; }
  .logo { width: 64px; height: 64px; border-radius: 18px; }
  .logo svg { width: 30px; height: 30px; }
}
