/* Sign-in page. Self-contained (owner's design), not Tailwind. Loaded automatically for /login.
   Light by default; dark when <html data-theme="dark"> (the app's theme choice). */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --line-hover: rgba(15, 23, 42, 0.24);
  --text: #0f172a;
  --label: #334155;
  --muted: #64748b;
  --placeholder: #94a3b8;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(13, 148, 136, 0.10);
  --accent-ring: rgba(13, 148, 136, 0.18);
  --danger: #e11d48;
  --btn2-bg: #ffffff;
  --btn2-hover: #f1f5f9;
  --primary-a: #3b82f6;
  --primary-b: #2563eb;
  --primary-hover-a: #60a5fa;
  --primary-hover-b: #3b82f6;
  --input-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --toggle-hover: rgba(15, 23, 42, 0.06);
  --auth-glow: rgba(13, 148, 136, 0.08);
  --stage-bg: #eef1f5;
  --stage-glow-1: rgba(13, 148, 136, 0.14);
  --stage-glow-2: rgba(245, 158, 11, 0.08);
  --dots: rgba(15, 23, 42, 0.10);
  --shot-border: rgba(255, 255, 255, 0.9);
  --shot-ring: rgba(15, 23, 42, 0.18);
}
html[data-theme="dark"] {
  --bg: #0b0e14;
  --surface: #11151d;
  --surface-2: #171c26;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-hover: rgba(255, 255, 255, 0.2);
  --text: #eceff4;
  --label: #c9cfd9;
  --muted: #8b93a3;
  --placeholder: #596274;
  --accent: #2dd4bf;
  --accent-hover: #4ae2cf;
  --accent-ink: #ffffff;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-ring: rgba(45, 212, 191, 0.16);
  --danger: #fb7185;
  --btn2-bg: rgba(255, 255, 255, 0.035);
  --btn2-hover: rgba(255, 255, 255, 0.07);
  --primary-a: #3b82f6;
  --primary-b: #2563eb;
  --primary-hover-a: #60a5fa;
  --primary-hover-b: #3b82f6;
  --input-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 1px 2px rgba(0, 0, 0, 0.3);
  --toggle-hover: rgba(255, 255, 255, 0.06);
  --auth-glow: rgba(45, 212, 191, 0.07);
  --stage-bg: #0a0d13;
  --stage-glow-1: rgba(45, 212, 191, 0.16);
  --stage-glow-2: rgba(245, 158, 11, 0.06);
  --dots: rgba(255, 255, 255, 0.07);
  --shot-border: rgba(255, 255, 255, 0.1);
  --shot-ring: rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif !important;
  font-weight: 400 !important;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }

/* ---------- Left: auth ---------- */
.auth {
  display: flex; flex-direction: column; padding: 40px 64px;
  border-right: 1px solid var(--line);
  background: radial-gradient(900px 500px at -10% -10%, var(--auth-glow), transparent 60%), var(--bg);
}
.brand { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); text-decoration: none; border-radius: 8px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.brand-mark svg { width: 16px; height: 16px; stroke: var(--accent); }

.form-wrap { flex: 1; display: flex; align-items: center; padding: 48px 0; }
.login form { width: 100%; max-width: 400px; margin: 0 auto; }
h1 { margin: 0 0 8px; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.lede { margin: 0 0 28px; color: var(--muted); }

.login .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; padding: 0 16px;
  border-radius: 11px; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.login .btn-secondary { background: var(--btn2-bg); border: 1px solid var(--line-strong); color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.login .btn-secondary:hover { background: var(--btn2-hover); }
.login .btn-secondary:active { box-shadow: none; }
.login .btn-secondary svg { width: 16px; height: 16px; color: var(--muted); }
.login .btn-primary {
  margin-top: 4px; border: 1px solid #3b82f6; font-weight: 600; color: #fff; background: #2563eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.12), 0 2px 4px -2px rgba(0, 0, 0, 0.12), inset 0 1px 0 #93c5fd;
}
.login .btn-primary:hover { background: #3b82f6; }
.login .btn-primary:active { background: #1d4ed8; box-shadow: inset 0 1px 0 #1d4ed8; transform: none; }
.login .btn { position: relative; overflow: hidden; }
.login .btn::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent); }
.login .btn-secondary::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent); }
.login .btn:disabled { opacity: .7; cursor: progress; transform: none; }

.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--placeholder); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.field { margin-bottom: 16px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.login label { font-size: 13px; font-weight: 500; color: var(--label); }
.control { position: relative; }
.login input[type="email"], .login input[type="password"], .login input[type="text"] {
  width: 100%; height: 46px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 11px;
  color: var(--text); font: inherit; outline: none; box-shadow: var(--input-shadow);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login input::placeholder { color: var(--placeholder); }
.login input:hover { border-color: var(--line-hover); }
.login input:focus { background: var(--surface-2); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.login input[aria-invalid="true"] { border-color: var(--danger); }
.login input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 16%, transparent); }
.control input[type="password"], .control input[type="text"] { padding-right: 50px; }
.toggle .eye-hide, .toggle[aria-pressed="true"] .eye-show { display: none; }
.toggle[aria-pressed="true"] .eye-hide { display: block; }
.toggle svg { width: 18px; height: 18px; }
.toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 32px; width: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.toggle:hover { color: var(--text); background: var(--toggle-hover); }
.link { color: var(--accent); font-size: 13px; text-decoration: none; border-radius: 4px; }
.link:hover { color: var(--accent-hover); text-decoration: underline; }
.error { display: none; margin-top: 7px; color: var(--danger); font-size: 13px; }
.error.show { display: block; }
.remember { display: flex; align-items: center; gap: 9px; margin: 2px 0 20px; font-size: 13px; color: var(--muted); cursor: pointer; font-weight: 400; }
.remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.invite { margin: 26px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

.foot { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--placeholder); align-items: center; }
.foot nav { display: flex; gap: 18px; align-items: center; }
.foot a, .foot button { color: var(--placeholder); text-decoration: none; border-radius: 4px; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 6px; }
.foot a:hover, .foot button:hover { color: var(--text); }
.foot svg { width: 14px; height: 14px; }

.login .btn:focus-visible, .toggle:focus-visible, .link:focus-visible, .brand:focus-visible, .foot a:focus-visible, .foot button:focus-visible, .remember input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Right: product stage ---------- */
.stage {
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 56px 0 0 64px;
  background: radial-gradient(1100px 650px at 25% 5%, var(--stage-glow-1), transparent 60%), radial-gradient(800px 500px at 110% 90%, var(--stage-glow-2), transparent 60%), var(--stage-bg);
}
.stage::before {
  content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--dots) 1px, transparent 1px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 70% at 40% 30%, #000 30%, transparent 100%); mask-image: radial-gradient(70% 70% at 40% 30%, #000 30%, transparent 100%); pointer-events: none;
}
.stage-copy { position: relative; max-width: 440px; padding-right: 48px; }
.stage-copy h2 { margin: 0 0 10px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.stage-copy p { margin: 0; color: var(--muted); font-size: 15px; }

.shot { position: relative; flex: 1; min-height: 0; margin: 36px 0 0; }
/* The map is a background so only the active theme's image is downloaded. */
.shot .map {
  position: absolute; left: 0; top: 0; height: calc(100% + -10px); aspect-ratio: 2560 / 1600;
  background: var(--map-light) left top / cover no-repeat; border-radius: 16px; border: 1px solid var(--shot-border); box-shadow: 0 0 0 1px var(--shot-ring);
  opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2, .7, .2, 1) .15s forwards;
}
html[data-theme="dark"] .shot .map { background-image: var(--map-dark); }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) { .auth { padding: 32px 40px; } .stage { padding: 40px 0 0 40px; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .stage { order: -1; min-height: 360px; padding: 32px 0 0 24px; border-bottom: 1px solid var(--line); }
  .stage-copy { max-width: none; padding-right: 24px; }
  .stage-copy h2 { font-size: 22px; } .stage-copy p { font-size: 14px; }
  .shot { margin-top: 24px; min-height: 200px; } .shot .map { height: calc(100% + 40px); border-radius: 12px; }
  .auth { border-right: 0; padding: 24px 20px 32px; }
  .form-wrap { align-items: flex-start; padding: 28px 0 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .shot .map { opacity: 1; transform: none; } }
