/* ──────────────────────────────────────────────────────────────
   Login — full-viewport split layout: marketing (left) + form (right)
   Always dark — the design is committed to the dark palette.
   The page wrapper sets data-theme="wisertalk-dark" locally so the
   tokens resolve to dark values regardless of user theme preference.
   ────────────────────────────────────────────────────────────── */

.wt-login-page {
  position: fixed;
  inset: 0;
  display: flex;
  background: var(--wt-bg);
  color: var(--wt-fg);
  font-family: var(--wt-font);
  overflow: hidden;
  z-index: 1;
}

/* ── Left: marketing panel ─────────────────────────────── */
.wt-login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 36px 48px 40px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 30% 40%, color-mix(in oklch, var(--wt-primary) 14%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, oklch(0.16 0.022 280) 0%, oklch(0.13 0.018 270) 100%);
}
/* Subtle dot pattern overlay */
.wt-login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, oklch(1 0 0 / 0.05) 1px, transparent 0);
  background-size: 22px 22px;
  pointer-events: none;
}

.wt-login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.wt-login-brand-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.wt-login-brand-text {
  font-family: var(--wt-font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: white;
}

.wt-login-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.wt-login-hero-art {
  width: 100%;
  max-width: 560px;
  height: auto;
}

.wt-login-marketing {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  max-width: 540px;
}
.wt-login-tagline {
  display: inline-block;
  font-family: var(--wt-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(0.78 0.16 265);
  margin-bottom: 14px;
}
.wt-login-headline {
  margin: 0;
  font-family: var(--wt-font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: white;
}
.wt-login-headline .accent {
  background: linear-gradient(90deg, oklch(0.72 0.18 265), oklch(0.78 0.18 285));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wt-login-subhead {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: oklch(0.72 0.012 265);
  max-width: 480px;
}

/* ── Right: form panel ─────────────────────────────────── */
.wt-login-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: oklch(0.13 0.014 268);
  padding: 36px 48px 28px;
  position: relative;
  overflow-y: auto;
}

.wt-login-topright {
  position: absolute;
  top: 36px;
  right: 48px;
  font-size: 12.5px;
  color: var(--wt-fg-3);
}
.wt-login-topright a {
  color: oklch(0.72 0.18 265);
  font-weight: 600;
  text-decoration: none;
}
.wt-login-topright a:hover { text-decoration: underline; }

.wt-login-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 0;
}

.wt-login-form-title {
  margin: 0;
  font-family: var(--wt-font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: white;
}
.wt-login-form-sub {
  margin: 8px 0 28px;
  font-size: 13px;
  color: var(--wt-fg-3);
}

.wt-login-error {
  background: color-mix(in oklch, var(--wt-danger) 14%, transparent);
  border: 1px solid color-mix(in oklch, var(--wt-danger) 35%, transparent);
  color: oklch(0.78 0.16 25);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  margin-bottom: 16px;
}

.wt-login-field { margin-bottom: 18px; }
.wt-login-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.wt-login-label {
  display: block;
  font-family: var(--wt-font);
  font-size: 13px;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
}
.wt-login-forgot {
  font-size: 12px;
  color: oklch(0.72 0.18 265);
  text-decoration: none;
  font-weight: 500;
}
.wt-login-forgot:hover { text-decoration: underline; }

.wt-login-input-wrap {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  background: oklch(0.18 0.014 268);
  border: 1px solid oklch(0.27 0.018 270);
  border-radius: 8px;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.wt-login-input-wrap:focus-within {
  border-color: var(--wt-primary);
  background: oklch(0.20 0.014 268);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--wt-primary) 20%, transparent);
}
.wt-login-input-icon {
  width: 16px;
  height: 16px;
  color: var(--wt-fg-3);
  flex-shrink: 0;
  margin-right: 10px;
}
.wt-login-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-family: var(--wt-font);
  font-size: 14px;
}
.wt-login-input::placeholder { color: var(--wt-fg-4); }
.wt-login-input.is-mono { font-family: var(--wt-font-mono); }

.wt-login-eye {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--wt-fg-4);
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
  transition: color 0.12s, background 0.12s;
}
.wt-login-eye:hover { color: var(--wt-fg-2); background: oklch(0.22 0.014 268); }

.wt-login-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 22px;
  cursor: pointer;
  font-size: 13px;
  color: var(--wt-fg-2);
  user-select: none;
}
.wt-login-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--wt-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.wt-login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  background: linear-gradient(180deg, oklch(0.62 0.20 265), oklch(0.55 0.22 268));
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--wt-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.1) inset, 0 6px 18px oklch(0.55 0.22 268 / 0.4);
  transition: transform 0.06s, filter 0.12s;
}
.wt-login-submit:hover:not(:disabled) { filter: brightness(1.08); }
.wt-login-submit:active:not(:disabled) { transform: translateY(0.5px); }
.wt-login-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Status panel */
.wt-login-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 14px;
  background: oklch(0.16 0.012 268);
  border: 1px solid oklch(0.24 0.016 270);
  border-radius: 10px;
}
.wt-login-status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wt-secondary);
  flex-shrink: 0;
}
.wt-login-status-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--wt-secondary);
  opacity: 0.3;
  animation: wt-login-pulse 1.8s ease-in-out infinite;
}
@keyframes wt-login-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0; transform: scale(1.6); }
}
.wt-login-status-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wt-login-status-title {
  font-size: 12.5px;
  font-weight: 600;
  color: white;
}
.wt-login-status-detail {
  font-size: 11px;
  color: var(--wt-fg-3);
}
.wt-login-status-link {
  font-size: 12px;
  color: var(--wt-fg-3);
  text-decoration: none;
  flex-shrink: 0;
}
.wt-login-status-link:hover { color: white; }

/* Footer */
.wt-login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--wt-font-mono);
  font-size: 11px;
  color: var(--wt-fg-4);
  padding-top: 16px;
  flex-shrink: 0;
}

/* ── Responsive: stack on small screens ────────────────── */
@media (max-width: 960px) {
  .wt-login-page { flex-direction: column; }
  .wt-login-left {
    flex: 0 0 auto;
    padding: 28px 28px 32px;
  }
  .wt-login-hero { display: none; }
  .wt-login-headline { font-size: 28px; }
  .wt-login-right {
    padding: 28px 24px 20px;
  }
  .wt-login-topright {
    top: 28px;
    right: 24px;
  }
}
