/* =============================================================================
   LOGIN.CSS — HarmonyHub  (HarmonyTech Design System v2)
   Palette: #722581 (violet) · #de3622 (crimson) · black · white
   Font: DM Sans
   ============================================================================= */

/* ── DESIGN TOKENS ─────────────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --c-bg:        #f5f5f7;
  --c-surface:   #ffffff;
  --c-surface-2: #fafafa;
  --c-border:    rgba(0, 0, 0, 0.08);

  /* Brand — Violet */
  --c-v:         #722581;
  --c-v-h:       #8a2d9a;
  --c-v-a:       #5e1d6a;
  --c-v-soft:    rgba(114, 37, 129, 0.08);
  --c-v-ring:    rgba(114, 37, 129, 0.14);
  --c-v-glow:    rgba(114, 37, 129, 0.28);

  /* Brand — Crimson */
  --c-r:         #de3622;
  --c-r-soft:    rgba(222, 54, 34, 0.08);

  /* Text */
  --c-text:      #1d1d1f;
  --c-muted:     #6e6e73;

  /* Status */
  --c-green:     #28cd41;
  --c-red:       #de3622;
  --c-red-soft:  rgba(222, 54, 34, 0.08);

  /* Radii */
  --r-card:  18px;
  --r-input: 12px;
  --r-btn:   12px;
  --r-pill:  100px;

  /* Shadows */
  --sh-card:   0 2px 16px rgba(0, 0, 0, 0.07), 0 8px 32px rgba(0, 0, 0, 0.05);
  --sh-card-h: 0 4px 24px rgba(0, 0, 0, 0.10), 0 12px 40px rgba(0, 0, 0, 0.07);
  --sh-btn:    0 1px 3px var(--c-v-glow), 0 4px 14px rgba(114, 37, 129, 0.18);
  --sh-float:  0 20px 60px rgba(0, 0, 0, 0.14);

  /* Typography */
  --font:   'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:   'DM Mono', monospace;

  /* Easing */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --eout:   cubic-bezier(0.16, 1.00, 0.30, 1);
}

/* ── RESET ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font);
  background: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-x: hidden;
  position: relative;
}

/* ── ATMOSPHERIC BACKGROUND ORBS ─────────────────────────────────────────────
   Replaced generic blue/purple orbs with brand-matched violet & crimson mesh  */
.bg-orbs {
  position: fixed; inset: 0;
  pointer-events: none; overflow: hidden; z-index: 0;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  animation: float-orb 22s ease-in-out infinite;
}
/* Top-left — violet */
.bg-orb-1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, #a040b8, transparent 68%);
  top: -140px; left: -180px;
}
/* Bottom-right — crimson */
.bg-orb-2 {
  width: 440px; height: 440px;
  background: radial-gradient(circle, #de3622, transparent 68%);
  bottom: -100px; right: -120px;
  animation-delay: -8s;
}
/* Centre — mid-purple bridge */
.bg-orb-3 {
  width: 340px; height: 340px;
  background: radial-gradient(circle, #8b1a9a, transparent 68%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.12;
  animation-name: float-orb-3;
  animation-delay: -16s;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(28px, -38px) scale(1.04); }
  66%       { transform: translate(-18px, 28px) scale(0.97); }
}
@keyframes float-orb-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  33%       { transform: translate(calc(-50% + 28px), calc(-50% - 38px)) scale(1.04); }
  66%       { transform: translate(calc(-50% - 18px), calc(-50% + 28px)) scale(0.97); }
}

/* ── PAGE LAYOUT ─────────────────────────────────────────────────────────────── */
.page-wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column;
  align-items: center; gap: 18px;
}

/* ── LOGO ───────────────────────────────────────────────────────────────────── */
.logo-wrap {
  text-align: center;
  animation: fade-down 0.55s var(--eout) both;
}
.logo-wrap img {
  width: 385px; height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.10));
}

/* ── BRAND BADGES ───────────────────────────────────────────────────────────── */
.brand-bar {
  display: flex; align-items: center; gap: 6px;
  animation: fade-down 0.55s var(--eout) 0.08s both;
}
.brand-badge {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--c-border);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  color: var(--c-muted);
}
.brand-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--c-muted);
  opacity: 0.35;
}

/* ── CARD ───────────────────────────────────────────────────────────────────── */
.card {
  width: 100%;
  background: var(--c-surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
  padding: 28px 22px 24px;
  border: 1px solid var(--c-border);
  position: relative; overflow: hidden;
  animation: fade-up 0.65s var(--eout) 0.12s both;
  transition: box-shadow 0.3s var(--smooth);
}
.card:hover { box-shadow: var(--sh-card-h); }

/* Top accent bar — brand gradient violet → crimson */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    #722581  0%,
    #9b2eaf 22%,
    #c83892 42%,
    #de3622 60%,
    #f05030 78%,
    #722581 100%
  );
  background-size: 200% 100%;
  border-radius: var(--r-card) var(--r-card) 0 0;
  animation: shimmer-bar 4s linear infinite;
}
@keyframes shimmer-bar {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ── CARD HEADER ────────────────────────────────────────────────────────────── */
.card-header { margin-bottom: 20px; }
.card-header h1 {
  font-size: 24px; font-weight: 600;
  color: var(--c-text); letter-spacing: -0.02em; margin-bottom: 4px;
}
.card-header p { font-size: 14px; color: var(--c-muted); font-weight: 300; }

/* ── ERROR / SUCCESS BOX ────────────────────────────────────────────────────── */
.error-box {
  background: var(--c-red-soft);
  border: 1px solid rgba(222, 54, 34, 0.15);
  border-radius: 10px;
  padding: 11px 14px;
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--c-red); font-weight: 450;
  margin-bottom: 20px;
  animation: shake 0.38s var(--spring);
}
.error-box svg { width: 18px; height: 18px; fill: var(--c-red); flex-shrink: 0; }
.error-box.success {
  background: #e8f7ef;
  border-color: rgba(40, 205, 65, 0.15);
  color: var(--c-green);
}

/* ── FORM FIELDS ────────────────────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; }

.field label {
  font-size: 11px; font-weight: 600;
  color: var(--c-muted);
  letter-spacing: 0.06em; text-transform: uppercase;
  font-family: var(--mono);
}

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

.input-icon {
  position: absolute; left: 14px;
  width: 16px; height: 16px;
  fill: #ccc; pointer-events: none;
  transition: fill 0.2s;
}

.input-field {
  width: 100%; height: 48px;
  padding: 0 44px 0 42px;
  font-size: 15px; font-family: var(--font); font-weight: 400;
  color: var(--c-text);
  background: var(--c-surface-2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-input);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.input-field::placeholder { color: #c8c8cc; }
.input-field:hover { border-color: rgba(0, 0, 0, 0.15); background: #fff; }
.input-field:focus {
  border-color: var(--c-v);
  background: #fff;
  box-shadow: 0 0 0 3.5px var(--c-v-ring);
}
.input-shell:has(.input-field:focus) .input-icon { fill: var(--c-v); }

/* Password toggle */
.pwd-toggle {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer;
  padding: 6px; display: flex; align-items: center;
  color: #ccc; transition: color 0.2s;
}
.pwd-toggle:hover { color: var(--c-v); }
.pwd-toggle svg { width: 17px; height: 17px; fill: currentColor; }

/* ── OPTIONS ROW ────────────────────────────────────────────────────────────── */
.options-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 0 22px;
}

.remember-label {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13.5px; color: var(--c-muted);
  user-select: none; position: relative;
}
.remember-label.disabled { opacity: 0.45; cursor: not-allowed; }

.remember-checkbox {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid #ccc; border-radius: 5px;
  background: #fff; cursor: pointer;
  position: relative; flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}
.remember-checkbox:disabled { cursor: not-allowed; }
.remember-checkbox:checked {
  background: var(--c-v);
  border-color: var(--c-v);
}
.remember-checkbox:checked::after {
  content: '';
  position: absolute; left: 4px; top: 1px;
  width: 7px; height: 11px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(40deg);
}

.cookie-tooltip {
  position: absolute; left: 0; bottom: calc(100% + 8px);
  background: #1d1d1f; color: #fff;
  font-size: 11.5px; border-radius: 8px;
  padding: 7px 10px; white-space: nowrap;
  pointer-events: none; opacity: 0;
  transition: opacity 0.15s; z-index: 10; font-weight: 400;
}
.cookie-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 14px;
  border: 5px solid transparent; border-top-color: #1d1d1f;
}
.remember-label.disabled:hover .cookie-tooltip { opacity: 1; }

.forgot-link {
  font-size: 13.5px; font-weight: 600;
  color: var(--c-v); text-decoration: none;
  transition: opacity 0.2s;
}
.forgot-link:hover { opacity: 0.7; }

/* ── SIGN IN BUTTON ─────────────────────────────────────────────────────────── */
.btn-signin {
  width: 100%; height: 50px;
  background: var(--c-v);
  color: #fff;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  border: none; border-radius: var(--r-btn);
  cursor: pointer;
  box-shadow: var(--sh-btn);
  position: relative; overflow: hidden;
  letter-spacing: -0.01em;
  transition: background 0.2s, transform 0.15s var(--spring), box-shadow 0.2s;
}
/* Subtle inner gloss */
.btn-signin::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, transparent 55%);
  pointer-events: none;
}
.btn-signin:hover {
  background: var(--c-v-h);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--c-v-glow), 0 6px 20px rgba(114,37,129,0.22);
}
.btn-signin:active {
  background: var(--c-v-a);
  transform: translateY(0);
  box-shadow: var(--sh-btn);
}
.btn-signin:disabled { opacity: 0.65; cursor: not-allowed; }

.btn-ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: ripple 0.55s linear;
  pointer-events: none;
}
.loading-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%; border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── USER PILL ──────────────────────────────────────────────────────────────── */
.user-pill {
  display: flex; align-items: center; gap: 12px;
  background: var(--c-surface-2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-pill);
  padding: 8px 14px 8px 8px;
  margin-bottom: 22px;
  transition: border-color 0.2s;
}
.user-pill:hover { border-color: var(--c-v-ring); }

.user-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.user-meta { flex: 1; min-width: 0; }
.user-name {
  font-size: 14.5px; font-weight: 600; color: var(--c-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-handle {
  font-size: 12.5px; color: var(--c-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-verified {
  width: 22px; height: 22px;
  background: var(--c-v-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-verified svg { width: 13px; height: 13px; fill: var(--c-v); }

/* ── SLIDE-TO-UNLOCK TRACK ───────────────────────────────────────────────────── */
.slide-wrap {
  background: var(--c-surface-2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-pill);
  padding: 4px;
  position: relative; overflow: hidden;
}
.slide-track {
  position: relative; height: 52px;
  border-radius: 100px; overflow: hidden;
  cursor: grab; user-select: none; touch-action: none;
}
.slide-track:active { cursor: grabbing; }

.slide-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 52px;
  background: linear-gradient(90deg, var(--c-v-soft), transparent);
  border-radius: 100px; pointer-events: none;
}
.slide-thumb {
  position: absolute; left: 0; top: 0;
  width: 52px; height: 52px;
  background: var(--c-v);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px var(--c-v-glow), 0 4px 16px rgba(114,37,129,0.18);
  z-index: 3; will-change: transform;
}
.slide-thumb.dragging {
  box-shadow: 0 4px 16px var(--c-v-glow), 0 6px 24px rgba(114,37,129,0.28);
}
.slide-thumb svg { width: 20px; height: 20px; fill: #fff; pointer-events: none; }

.slide-label {
  position: absolute; left: 64px; top: 0; right: 0; bottom: 0;
  display: flex; align-items: center;
  font-size: 14px; color: var(--c-muted);
  pointer-events: none; z-index: 1; transition: opacity 0.2s;
}

.slide-success {
  position: absolute; inset: 0; border-radius: 100px;
  background: linear-gradient(90deg, rgba(114,37,129,0.06), rgba(222,54,34,0.04));
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--c-v); font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; z-index: 4;
  transition: opacity 0.25s var(--smooth);
}
.slide-success svg { width: 20px; height: 20px; fill: var(--c-v); }
.slide-track.done .slide-success { opacity: 1; }
.slide-track.done .slide-label   { opacity: 0; }

.not-you {
  text-align: center; margin-top: 14px;
  font-size: 13px; color: var(--c-muted);
}
.not-you a {
  color: var(--c-v); text-decoration: none; font-weight: 600;
  transition: opacity 0.2s;
}
.not-you a:hover { opacity: 0.7; }

/* ── FOOTER ──────────────────────────────────────────────────────────────────── */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 0 4px;
  animation: fade-up 0.65s var(--eout) 0.28s both;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a,
.footer .contact {
  font-size: 12.5px; color: var(--c-muted); text-decoration: none;
  font-weight: 400; transition: color 0.2s;
}
.footer-links a:hover,
.footer .contact:hover { color: var(--c-text); }
.footer .contact { color: var(--c-v); font-weight: 600; }

/* ── COOKIE BANNER ───────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(20, 10, 24, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #f0f0f0;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; z-index: 998;
  border-top: 1px solid rgba(114, 37, 129, 0.18);
  animation: slide-up 0.4s var(--eout);
}
.cookie-banner p { font-size: 13px; color: #aaa; flex: 1; min-width: 180px; line-height: 1.5; }
.cookie-banner a { color: #d090e8; text-decoration: none; }
.cookie-banner a:hover { text-decoration: underline; }

.c-btn {
  background: #fff; color: #1d1d1f;
  border: none; padding: 8px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: var(--font); transition: background 0.15s;
  white-space: nowrap; flex-shrink: 0;
}
.c-btn:hover { background: #f5f5f7; }
.c-btn.sec {
  background: rgba(114, 37, 129, 0.12); color: #d090e8;
  border: 1px solid rgba(114, 37, 129, 0.25);
}
.c-btn.sec:hover { background: rgba(114, 37, 129, 0.22); }

/* ── SECURITY OVERLAY ────────────────────────────────────────────────────────── */
.sec-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 0, 12, 0.55);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--smooth);
}
.sec-overlay.show { opacity: 1; pointer-events: all; }

.sec-card {
  background: var(--c-surface);
  border-radius: 24px; padding: 36px;
  max-width: 340px; width: 90%;
  box-shadow: var(--sh-float);
  border: 1px solid var(--c-border);
  text-align: center;
  animation: pop-in 0.45s var(--spring);
}
.sec-icon {
  width: 64px; height: 64px;
  background: var(--c-v-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.sec-icon svg { width: 32px; height: 32px; fill: var(--c-v); }

.sec-card h2 {
  font-size: 20px; font-weight: 600; color: var(--c-text);
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.sec-card > p { font-size: 13.5px; color: var(--c-muted); margin-bottom: 20px; line-height: 1.5; }

.dev-chips { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.dev-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--c-surface-2); border: 1px solid var(--c-border);
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; color: var(--c-muted); text-align: left;
}
.dev-chip svg { width: 15px; height: 15px; fill: var(--c-muted); flex-shrink: 0; }
.chip-val { color: var(--c-text); font-weight: 600; margin-left: auto; font-size: 12.5px; font-family: var(--mono); }

/* Progress bar — violet → crimson */
.prog-rail {
  height: 3px; background: #eee; border-radius: 4px;
  overflow: hidden; margin-bottom: 10px;
}
.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-v) 0%, #a040b8 50%, var(--c-r) 100%);
  width: 0%; border-radius: 4px;
  transition: width 0.08s linear;
}
.prog-status { font-size: 12.5px; color: var(--c-v); font-weight: 600; font-family: var(--mono); }

/* ── LANGUAGE SWITCHER ──────────────────────────────────────────────────────── */
.language-switcher {
  margin: 16px 0; text-align: center;
  animation: fade-up 0.65s var(--eout) 0.28s both;
}
.language-switcher a {
  color: var(--c-muted); text-decoration: none;
  font-size: 13px; transition: color 0.2s; padding: 4px 8px;
}
.language-switcher a:hover,
.language-switcher a.active { color: var(--c-v); }
.lang-separator { color: var(--c-muted); opacity: 0.3; }

/* ── KEYFRAME ANIMATIONS ─────────────────────────────────────────────────────── */
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.90); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes slide-dn {
  to { transform: translateY(100%); opacity: 0; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  body { padding: 12px; }
  .card { padding: 24px 18px; }
  .cookie-banner { padding: 10px; gap: 8px; }
  .c-btn { padding: 6px 12px; font-size: 12px; }
}