/* ===== Login screen ===== */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
@media (max-width: 940px) { .auth { grid-template-columns: 1fr; } .auth-hero { display: none; } }

/* ---- Hero panel ---- */
.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(900px 500px at 75% 110%, rgba(224,33,138,.18), transparent 60%),
    radial-gradient(700px 500px at 5% -10%, rgba(25,211,218,.16), transparent 55%),
    #0a0a0d;
  border-right: 1px solid var(--border);
}
.hex-field {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    radial-gradient(circle at center, rgba(255,255,255,.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 100% at 70% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(120% 100% at 70% 30%, #000 30%, transparent 75%);
}
.hero-glow {
  position: absolute; width: 460px; height: 460px; right: -120px; top: 30%;
  background: var(--gradient); filter: blur(120px); opacity: .35; border-radius: 50%;
  animation: glowPulse 7s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100%{ transform: scale(1); opacity:.30 } 50%{ transform: scale(1.15); opacity:.45 } }

.auth-hero > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; }

.hero-mid { max-width: 520px; }
.eyebrow {
  display: inline-block; font-size: 11px; letter-spacing: .22em; color: var(--cyan);
  padding: 6px 12px; border: 1px solid var(--border-2); border-radius: var(--r-pill);
  margin-bottom: 22px; background: rgba(25,211,218,.06);
}
.hero-mid h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.06; margin: 0 0 18px; font-weight: 800; color: #fff; }
.hero-mid p { color: #b9b9c4; font-size: 16px; line-height: 1.6; margin: 0 0 30px; max-width: 440px; }

.hero-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hero-feats li { display: flex; align-items: center; gap: 12px; color: #d6d6df; font-weight: 500; font-size: 15px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-cyan { background: var(--cyan); box-shadow: var(--glow-cyan); }
.dot-magenta { background: var(--magenta); box-shadow: var(--glow-magenta); }
.dot-orange { background: var(--orange); box-shadow: 0 0 18px rgba(255,90,44,.5); }

.hero-bottom { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-bottom span {
  font-size: 12px; letter-spacing: .12em; padding: 7px 12px; border-radius: 8px;
  color: #0a0a0d; font-weight: 600;
  background: linear-gradient(100deg, var(--orange), var(--magenta));
}

/* ---- Form panel ---- */
.auth-form-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px; gap: 18px; position: relative;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 38px 34px;
  box-shadow: var(--shadow);
}
.brand-sm { justify-content: center; margin-bottom: 26px; }
.brand-sm .ic-cube { width: 30px; height: 30px; }
.brand-sm .wordmark { font-size: 16px; }

.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h2 { font-size: 25px; margin: 0 0 6px; }
.auth-head p { color: var(--text-muted); margin: 0; font-size: 14px; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text-muted); }
.input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 12px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input-wrap:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(25,211,218,.16); }
.input-wrap .i { width: 19px; height: 19px; color: var(--text-faint); flex: none; }
.input-wrap input {
  flex: 1; border: 0; background: transparent; color: var(--text);
  font-size: 15px; font-family: inherit; padding: 13px 0; outline: none;
}
.input-wrap input::placeholder { color: var(--text-faint); }
.reveal { border: 0; background: transparent; color: var(--text-faint); display: grid; place-items: center; padding: 4px; }
.reveal svg { width: 19px; height: 19px; }
.reveal:hover { color: var(--text); }

.row-between { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.check input { accent-color: var(--cyan); width: 15px; height: 15px; }
.link-muted { font-size: 13px; color: var(--text-muted); }
.link-muted:hover { color: var(--cyan); }

.form-error {
  display: none; color: #ff6b8a; font-size: 13px; margin-bottom: 14px;
  background: rgba(224,33,138,.10); border: 1px solid rgba(224,33,138,.30);
  padding: 10px 12px; border-radius: var(--r-sm);
}
.form-error.show { display: block; animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

.btn-primary {
  width: 100%; border: 0; border-radius: var(--r-md);
  background: var(--gradient); color: var(--on-accent);
  font-weight: 700; font-size: 15px; padding: 14px 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 30px -12px rgba(224,33,138,.6);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(224,33,138,.7); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }
.btn-primary[disabled] { opacity: .65; pointer-events: none; }
.btn-primary .arr { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn-primary:hover .arr { transform: translateX(3px); }
.btn-primary.loading .arr { display: none; }
.btn-primary.loading::after {
  content: ''; width: 17px; height: 17px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-faint); font-size: 13px; }
.divider::before, .divider::after { content: ''; height: 1px; flex: 1; background: var(--border); }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 12px 18px; border-radius: var(--r-md); border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 14.5px;
  transition: border-color .2s var(--ease), transform .15s var(--ease), background .2s;
}
.btn-google:hover { border-color: var(--text-faint); transform: translateY(-1px); background: var(--surface-3); }
.btn-google svg { width: 18px; height: 18px; flex: none; }

.auth-foot { text-align: center; margin: 22px 0 0; font-size: 14px; color: var(--text-muted); }
.copyright { color: var(--text-faint); font-size: 12px; }

/* Theme toggle (shared) */
.theme-toggle {
  position: fixed; top: 22px; right: 22px; z-index: 20;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border-2); background: var(--glass); backdrop-filter: blur(8px);
  color: var(--text); display: grid; place-items: center; transition: transform .2s var(--ease-spring), border-color .2s;
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.06); border-color: var(--cyan); }
.theme-toggle::before { content: '🌙'; font-size: 18px; }
[data-theme='light'] .theme-toggle::before { content: '☀️'; }
