@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Syne:wght@500;600;700;800&display=swap');

:root {
  --bg-base: #0a0a0b;
  --bg-elevated: #1a1a1f;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --color-primary: #3b82f6;
  --color-primary-hover: #60a5fa;
  --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
  --color-error: #ef4444;
  --text-primary: #f5f5f7;
  --text-secondary: #8e8e93;
  --text-muted: #48484a;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  min-height: 100vh;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
  animation: float 20s ease-in-out infinite;
}
.bg-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, transparent 70%);
  top: -200px; left: -100px;
}
.bg-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(30, 64, 175, 0.3) 0%, transparent 70%);
  top: 50%; right: -150px;
  animation-delay: -7s;
}
.bg-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  bottom: -100px; left: 30%;
  animation-delay: -14s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: 420px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.brand__main {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 4rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}
.brand__accent {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1;
}

.login-card {
  position: relative;
  width: 100%;
  padding: 32px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0.85;
}

.login-card .field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.login-card label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.login-card input {
  width: 100%;
  height: 44px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}
.login-card input::placeholder { color: var(--text-muted); }
.login-card input:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.login-card button {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-full);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-card button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}
.login-card button:active:not(:disabled) { transform: translateY(0); }
.login-card button:disabled {
  background: var(--bg-glass);
  color: var(--text-muted);
  box-shadow: none;
  cursor: wait;
}

.error {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--color-error);
  font-size: 13px;
}
.error[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .bg-orb { animation: none; }
  .login-card button:hover:not(:disabled) { transform: none; }
}
