/* Login — Rally Alpha (redesign) */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--bg-0);
  position: relative;
  overflow: hidden;
}
html, body { overflow: auto; }
body { background: var(--bg-0); }

.login-ambient, .login-grid-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.login-ambient::before, .login-ambient::after {
  content: ""; position: absolute;
  width: 700px; height: 700px; border-radius: 50%;
  filter: blur(100px);
}
.login-ambient::before { left: -200px; top: -200px;   background: oklch(0.5 0.2 var(--hue-info)); opacity: 0.18; }
.login-ambient::after  { right: -200px; bottom: -200px; background: oklch(0.6 0.15 var(--hue-pos));  opacity: 0.10; }

.login-grid-bg {
  background-image:
    linear-gradient(oklch(0.3 0.02 var(--bg-hue) / 0.18) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.3 0.02 var(--bg-hue) / 0.18) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, #000 0, #000 50%, transparent 100%);
  opacity: 0.5;
}

.login-left {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px;
  border-right: 1px solid var(--line);
  gap: 32px;
}

.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand .logo { width: 220px; }

.login-pitch { display: flex; flex-direction: column; gap: 18px; max-width: 500px; }
.login-kicker { font-size: 10px; color: var(--info); text-transform: uppercase; letter-spacing: 0.2em; font-weight: 500; }
.login-pitch h1 { font-size: 48px; font-weight: 600; color: var(--text-1); line-height: 1.05; letter-spacing: -0.02em; }
.login-pitch p { font-size: 13px; color: var(--text-3); line-height: 1.6; max-width: 440px; }
.login-stats { display: flex; gap: 28px; margin-top: 8px; }
.login-stats .v { color: var(--text-1); font-size: 20px; font-weight: 500; }
.login-stats .l { font-size: 9px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

.login-foot { display: flex; gap: 14px; color: var(--text-4); font-size: 10px; }

.login-right {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
}

.login-card {
  width: 420px; max-width: 100%;
  padding: 32px;
  border: 1px solid var(--line-strong); border-radius: 18px;
  background: linear-gradient(180deg, oklch(0.2 0.015 var(--bg-hue)), oklch(0.14 0.01 var(--bg-hue)));
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 14px;
}
.login-card h2 { font-size: 24px; color: var(--text-1); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.login-card .sub { color: var(--text-3); font-size: 12px; margin-bottom: 10px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.flbl { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em; }
.flbl-row { display: flex; justify-content: space-between; align-items: center; }
.forgot { font-size: 10px; color: var(--info); text-transform: none; letter-spacing: 0; }
.forgot:hover { color: var(--text-1); }
.login-card .input { height: 40px; font-size: 13px; }

.remember { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-3); cursor: pointer; user-select: none; }
.remember input { position: absolute; opacity: 0; pointer-events: none; }
.remember .cbx {
  width: 16px; height: 16px; border-radius: 4px;
  background: oklch(0.28 0.05 var(--hue-info) / 0.4);
  border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; transition: all 0.12s;
}
.remember input:checked ~ .cbx { background: var(--info-bg); border-color: oklch(0.55 0.14 var(--hue-info) / 0.7); color: var(--info); }
.remember .sep { opacity: 0.5; margin: 0 2px; }

.login-submit { height: 44px; width: 100%; font-size: 13px; margin-top: 4px; }
.login-submit .arr { margin-left: 4px; transition: transform 0.15s; }
.login-submit:hover .arr { transform: translateX(3px); }

.err { color: var(--neg); font-size: 11px; min-height: 14px; text-align: center; }

.newto {
  margin-top: 8px; padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--text-3);
}
.newto a { color: var(--info); }
.newto a:hover { color: var(--text-1); }

/* Light theme overrides */
[data-theme="light"] .login-card { background: linear-gradient(180deg, oklch(1 0 0), oklch(0.97 0.006 75)); }
[data-theme="light"] .login-pitch h1 { color: var(--text-1); }

@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-left { padding: 24px 20px; border-right: 0; gap: 16px; }
  .login-left .login-pitch h1 { font-size: 28px; }
  .login-left .login-foot, .login-left .login-stats { display: none; }
  .login-right { padding: 20px 20px 40px; }
}
@media (max-width: 480px) {
  .login-left .login-pitch { display: none; }
  .login-card { padding: 22px; border-radius: 14px; }
  .login-card h2 { font-size: 20px; }
  .login-card .input { height: 36px; }
  .login-submit { height: 40px; }
}
