/* ─────────────────────────────────────────────
   WARD — Login Page
   Font: Syne + Space Mono
───────────────────────────────────────────── */

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

/* ── Variables ── */
:root {
  --bg-void:      #080a0f;
  --bg-base:      #0d0f17;
  --bg-surface:   #121520;
  --border:       rgba(255,255,255,0.06);
  --accent:       #6ee7b7;
  --accent-dim:   rgba(110,231,183,0.08);
  --red:          #f87171;

  --text-primary:   #e8eaf0;
  --text-muted:     #4a5568;

  --font-display: 'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --radius-sm: 6px;
  --radius-lg: 18px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; font-size: 16px; }
body {
  font-family: var(--font-display);
  background: var(--bg-void);
  color: var(--text-primary);
  height: 100%;
  -webkit-font-smoothing: antialiased;
}

/* ── Loader line ── */
.loader-line {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.3s ease, opacity 0.4s ease;
  box-shadow: 0 0 8px rgba(110,231,183,0.4);
}

/* ── Glow dots ── */
.glow-dot {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.glow-dot-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(110,231,183,0.05) 0%, transparent 65%);
  top: -100px; left: -100px;
}
.glow-dot-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(96,165,250,0.04) 0%, transparent 65%);
  bottom: -80px; right: -80px;
}

/* ── Wrapper ── */
.wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ── Auth Card ── */
.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  animation: fadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-header { margin-bottom: 2rem; }

.auth-wordmark {
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.38em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}
.auth-title span { color: var(--accent); }

/* Error banner */
.auth-error {
  display: none;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--red);
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 1.25rem;
  animation: shake 0.32s ease both;
}
.auth-error.show { display: block; }

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

/* Fields */
.auth-field { margin-bottom: 1rem; }

.auth-label {
  display: block;
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 14px;
  font-family: var(--font-display);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.18s, background 0.18s;
  -webkit-appearance: none;
}
.auth-input::placeholder { color: var(--text-muted); opacity: 0.5; }
.auth-input:focus {
  border-color: rgba(110,231,183,0.35);
  background: rgba(110,231,183,0.03);
}
input[type="password"].auth-input {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
}

/* Button */
.auth-btn {
  position: relative;
  width: 100%;
  margin-top: 0.5rem;
  padding: 11px;
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #06080d;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  overflow: hidden;
}
.auth-btn:hover  { opacity: 0.88; }
.auth-btn:active { transform: scale(0.985); }
.auth-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.auth-btn-spinner {
  display: none;
  width: 15px; height: 15px;
  border: 2px solid rgba(6,8,13,0.3);
  border-top-color: #06080d;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.auth-btn.loading .auth-btn-text  { opacity: 0; }
.auth-btn.loading .auth-btn-spinner { display: block; }

/* Footer */
.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.auth-dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(110,231,183,0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(110,231,183,0); }
}

.auth-ver {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  opacity: 0.4;
  letter-spacing: 0.08em;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
