/* LeadBase sign-in screen — split-card dark/light design */

:root {
  --bg: #f1f5fa;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e5eaf1;
  --line-strong: #d5dde8;
  --accent: #6d5ce7;
  --accent-hover: #5c4bd4;
  --accent-soft: #f0edff;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --danger-line: #fecaca;
  --on-accent: #ffffff;
  --radius: 10px;
  --shadow-lg: 0 24px 60px -18px rgba(15, 23, 42, .28), 0 8px 24px -12px rgba(15, 23, 42, .18);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: #171d2b;
  --panel-soft: #1e2636;
  --ink: #eef2f9;
  --ink-2: #c8d3e4;
  --muted: #93a4bd;
  --muted-2: #6c7d96;
  --line: #2a3447;
  --line-strong: #38455c;
  --accent: #7c6bff;
  --accent-hover: #6d5ce7;
  --accent-soft: #26214a;
  --danger: #f87171;
  --danger-soft: #3a1d25;
  --danger-line: #5a2830;
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .7), 0 8px 24px -12px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body.auth-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    radial-gradient(900px 460px at 50% -10%, var(--accent-soft) 0%, transparent 65%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.auth-shell { width: 100%; max-width: 940px; }

.auth-card {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

/* -------------------------- left visual panel -------------------------- */

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 30px 28px;
  color: #fff;
  background: url('/login-art.svg') center / cover no-repeat, #2c2350;
}

.visual-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.visual-brand { display: flex; align-items: center; gap: 10px; }
.visual-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 10px;
  background: rgba(255, 255, 255, .14);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.visual-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.visual-brand-text strong { font-size: 15px; letter-spacing: -.01em; }
.visual-brand-text small { font-size: 10.5px; opacity: .72; }

.visual-kicker {
  margin: 0 0 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .16em;
  opacity: .72;
}
.visual-bottom h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -.02em;
}
.visual-copy { margin: 0; max-width: 290px; font-size: 12px; line-height: 1.5; opacity: .8; }

/* --------------------------- right form panel -------------------------- */

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px 34px;
}

.auth-heading h1 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 680;
  letter-spacing: -.025em;
  color: var(--ink);
}
.auth-heading p { margin: 0 0 26px; font-size: 12.5px; color: var(--muted); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.auth-field label em { font-style: normal; font-weight: 400; color: var(--muted); }

.auth-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input::placeholder { color: var(--muted-2); }
.auth-field input:hover { border-color: var(--muted-2); }
.auth-field input:focus {
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-wrap { position: relative; }
.input-wrap input { padding-right: 42px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.pw-toggle svg { width: 17px; height: 17px; }
.pw-toggle:hover { background: var(--panel-soft); color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-toggle.visible { color: var(--accent); }

.auth-submit {
  height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 8px 18px -10px var(--accent);
  transition: background .15s, transform .1s;
}
.auth-submit:hover { background: var(--accent-hover); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { opacity: .6; cursor: default; }
.auth-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.auth-switch { margin: 2px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.auth-switch button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.auth-switch button:hover { text-decoration: underline; }

.auth-error {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--danger-line);
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
}

.auth-intro {
  margin: 0 0 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-foot { margin: 18px 0 0; text-align: center; font-size: 11px; color: var(--muted-2); }

@media (max-width: 720px) {
  body.auth-body { padding: 18px 12px; align-content: start; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-visual { min-height: 180px; padding: 20px 22px; }
  .visual-copy { display: none; }
  .visual-bottom h2 { font-size: 22px; }
  .auth-panel { padding: 30px 24px 26px; }
}
