/* Login Screen ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

:root {
  --red:   #C8102E;
  --red-l: #E8253E;
  --ink:   #0D1117;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: 'DM Sans', sans-serif; min-height: 100vh; background: var(--ink); display: flex; overflow: hidden; }

/* ── Dark side (left) ───────────────────────────────────────── */
.login-left {
  width: 55%;
  min-height: 100vh;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 64px;
  position: relative;
  overflow: hidden;
}

/* Grid pattern */
.login-left::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(200,16,46,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,16,46,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* Animated orbs */
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .18; pointer-events: none;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--red), transparent 70%);
  top: -160px; right: -100px;
  animation: drift1 14s ease-in-out infinite;
}
.orb-2 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, #FF4060, transparent 70%);
  bottom: -80px; left: -60px;
  animation: drift2 18s ease-in-out infinite;
}
@keyframes drift1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-30px,40px)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,-30px)} }

/* Logo */
.login-logo { display: flex; align-items: center; gap: 13px; margin-bottom: 64px; position: relative; z-index: 1; }
.login-logo-img { height: 52px; width: auto; max-width: 240px; object-fit: contain; display: block; }
.login-mark {
  width: 50px; height: 50px; border-radius: 13px;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800; font-size: 17px; color: white;
  box-shadow: 0 8px 28px rgba(200,16,46,.45);
}
.login-brand-name { font-family:'Space Grotesk',sans-serif; font-size:20px; font-weight:800; color:white; letter-spacing:.04em; }
.login-brand-tag  { font-size:11px; color:rgba(255,255,255,.4); text-transform:uppercase; letter-spacing:.12em; margin-top:1px; }

/* Headline */
.login-headline {
  position: relative; z-index: 1; margin-bottom: 48px;
}
.login-headline h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px,4vw,48px);
  font-weight: 800; color: white;
  line-height: 1.12; margin-bottom: 18px;
}
.login-headline h1 span { color: var(--red); }
.login-headline p { font-size: 15px; color: rgba(255,255,255,.5); line-height: 1.7; max-width: 380px; }

/* Feature pills */
.login-pills { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.pill {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px; padding: 12px 16px;
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.pill:hover { background: rgba(255,255,255,.09); }
.pill-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(200,16,46,.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pill-icon svg { width: 16px; height: 16px; color: #FF6080; }
.pill-title { font-size: 13px; font-weight: 600; font-family:'Space Grotesk',sans-serif; color: white; }
.pill-desc  { font-size: 11px; color: rgba(255,255,255,.4); }

/* AI avatar animation */
.ai-visual {
  position: absolute;
  right: -20px; top: 50%; transform: translateY(-50%);
  z-index: 1;
}
.av-card {
  width: 200px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(12px);
  animation: floatCard 4s ease-in-out infinite;
}
@keyframes floatCard { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.av-face-ring {
  width: 96px; height: 96px; border-radius: 50%;
  border: 2px solid rgba(200,16,46,.5);
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  animation: spin-slow 8s linear infinite;
  position: relative;
}
.av-face-ring::after {
  content: '';
  position: absolute; top: -3px; left: 50%;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  transform: translateX(-50%);
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.av-face {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 7px;
}
.av-eyes { display: flex; gap: 12px; }
.av-eye  { width: 7px; height: 7px; background: #64CFFF; border-radius: 50%; box-shadow: 0 0 6px rgba(100,207,255,.7); animation: blink 4s infinite; }
.av-eye:last-child { animation-delay: .1s; }
@keyframes blink { 0%,94%,100%{transform:scaleY(1)} 97%{transform:scaleY(.1)} }
.av-mouth { width: 18px; height: 5px; background: var(--red); border-radius: 3px; animation: talk .35s infinite alternate; }
@keyframes talk { from{height:3px} to{height:7px;width:20px} }
.av-wave {
  display: flex; align-items: center; justify-content: center; gap: 2.5px;
  margin-top: 10px;
}
.av-wave span {
  display: block; width: 3px; background: var(--red);
  border-radius: 2px; animation: wave .5s infinite alternate;
}
.av-wave span:nth-child(1){height:6px;animation-delay:0s}
.av-wave span:nth-child(2){height:14px;animation-delay:.1s}
.av-wave span:nth-child(3){height:22px;animation-delay:.2s}
.av-wave span:nth-child(4){height:16px;animation-delay:.1s}
.av-wave span:nth-child(5){height:10px;animation-delay:.05s}
.av-wave span:nth-child(6){height:18px;animation-delay:.15s}
.av-wave span:nth-child(7){height:24px;animation-delay:.25s}
@keyframes wave { from{transform:scaleY(.3)} to{transform:scaleY(1)} }
.av-label { text-align:center; font-size:11px; color:rgba(255,255,255,.4); margin-top:8px; font-family:'Space Grotesk',sans-serif; font-weight:600; letter-spacing:.06em; }

/* ── White side (right) ─────────────────────────────────────── */
.login-right {
  flex: 1;
  background: #FAFAFA;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

.login-form-wrap {
  width: 100%; max-width: 380px;
}
.login-form-head { text-align: center; margin-bottom: 32px; }
.login-form-head h2 { font-family:'Space Grotesk',sans-serif; font-size:26px; font-weight:800; color:var(--ink); margin-bottom:7px; }
.login-form-head p  { font-size:13px; color:#8B919E; }

.login-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: #2D3340; font-family:'Space Grotesk',sans-serif; }
.field-wrap { position: relative; }
.field-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #8B919E; pointer-events: none; transition: color .15s; }
.field-input {
  width: 100%; padding: 11px 13px 11px 38px;
  border: 1.5px solid #E8EAED; border-radius: 9px;
  font-size: 14px; color: var(--ink);
  background: white; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,.1); }
.field-input:focus + svg,
.field-wrap:focus-within svg { color: var(--red); }
.toggle-pwd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: #8B919E; transition: color .15s; display: flex;
}
.toggle-pwd:hover { color: var(--ink); }
.toggle-pwd svg { width: 16px; height: 16px; }

.login-error {
  display: none; padding: 10px 14px;
  background: #FEE2E6; border: 1px solid #FECDD3;
  border-radius: 8px; font-size: 13px; color: var(--red);
  align-items: center; gap: 7px;
}
.login-error.show { display: flex; }
.login-error svg { width: 15px; height: 15px; flex-shrink: 0; }

.login-btn {
  width: 100%; padding: 12px;
  background: var(--red); color: white; border: none;
  border-radius: 9px; font-family:'Space Grotesk',sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all .2s; display: flex;
  align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(200,16,46,.35);
  margin-top: 4px;
}
.login-btn:hover { background: var(--red-l); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(200,16,46,.45); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.login-btn .spinner-w { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: spin .6s linear infinite; display: none; }
.login-btn.loading .spinner-w { display: block; }
.login-btn.loading .btn-txt { display: none; }
@keyframes spin { to{transform:rotate(360deg)} }

.login-hint { text-align:center; margin-top:20px; font-size:12px; color:#B0B8C4; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .login-left { display: none; }
  .login-right { background: white; padding: 40px 24px; }
  body { background: white; }
}
