/* =====================================================================
   Distribot — login surface styles (B1.4)
   Scoped under `#distribot-login`. Pairs with landing.css (shares the
   --dw-* token block via the `.dw-mk` parent). Drops in cleanly on top
   of landing.css's nav-less body.
   ===================================================================== */

#distribot-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#distribot-login.dw-mk { background: var(--dw-bg); }

.dw-auth-page .dw-auth {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(480px, 1.2fr);
  min-height: 100vh;
}
@media (max-width: 880px) {
  .dw-auth-page .dw-auth { grid-template-columns: 1fr; }
}

/* ─────────────── Brand rail (left) ─────────────── */
.dw-auth__brand {
  background:
    radial-gradient(800px 400px at 0% 0%, var(--dw-primary-mist), transparent 60%),
    linear-gradient(135deg, var(--dw-primary) 0%, #3a4a3a 100%);
  color: var(--dw-bg);
  padding: clamp(32px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 100vh;
}
@media (max-width: 880px) {
  .dw-auth__brand { min-height: auto; gap: 24px; padding: 32px 24px; }
}
a.dw-auth__brandLogo,
.dw-auth__brandLogo {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
  color: var(--dw-bg);
  text-decoration: none;
}
.dw-auth__brandLogoMark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
  display: inline-flex; align-items: center; justify-content: center;
}
.dw-auth__brandLogoMark img { display: block; }
.dw-auth__brandH {
  margin: 0 0 16px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
}
.dw-auth__brandSub {
  margin: 0;
  font-size: 17px; line-height: 1.55;
  opacity: 0.85;
  max-width: 420px;
}
.dw-auth__brandMeta {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 6px;
  font-size: 13px;
  font-family: var(--dw-font-mono);
  letter-spacing: 0.02em;
  opacity: 0.75;
}
.dw-auth__brandMeta strong { color: var(--dw-bg); font-weight: 700; }

/* ─────────────── Form column (right) ─────────────── */
.dw-auth__form {
  padding: clamp(32px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  background: var(--dw-bg);
}
.dw-auth__card {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  padding: 36px clamp(24px, 4vw, 44px);
  background: var(--dw-surface);
  border: 1px solid var(--dw-line);
  border-radius: 18px;
  box-shadow: var(--dw-shadow-soft);
}
.dw-auth__eyebrow {
  margin: 0 0 12px;
  font-family: var(--dw-font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dw-muted);
}
.dw-auth__h {
  margin: 0 0 8px;
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--dw-ink);
}
.dw-auth__sub {
  margin: 0 0 28px;
  font-size: 15px;
  color: var(--dw-ink-soft);
}

/* GitHub primary button — `a.` prefix bumps specificity over `.dw-mk a`
   from landing.css (which would otherwise force `color: inherit`). */
a.dw-auth__github,
.dw-auth__github {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 14px 18px;
  font-size: 15px; font-weight: 600;
  background: var(--dw-ink);
  color: var(--dw-bg);
  border-radius: 12px;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
a.dw-auth__github:hover,
.dw-auth__github:hover {
  background: #2b2d29;
  box-shadow: var(--dw-shadow-soft);
  transform: translateY(-1px);
}

/* "or" divider */
.dw-auth__divider {
  position: relative;
  margin: 24px 0;
  text-align: center;
  font-size: 13px;
  font-family: var(--dw-font-mono);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--dw-muted);
}
.dw-auth__divider::before,
.dw-auth__divider::after {
  content: "";
  position: absolute; top: 50%; width: 40%;
  height: 1px; background: var(--dw-line);
}
.dw-auth__divider::before { left: 0; }
.dw-auth__divider::after  { right: 0; }

/* Magic-link <details>/<summary> + form */
.dw-auth__magic {
  border-radius: 10px;
}
.dw-auth__magic[open] {
  background: var(--dw-primary-mist);
  border: 1px solid var(--dw-primary-soft);
  padding: 16px;
}
.dw-auth__magicToggle {
  display: inline-block;
  font-size: 14px;
  color: var(--dw-ink-soft);
  cursor: pointer;
  padding: 4px 0;
  list-style: none;
}
.dw-auth__magicToggle::-webkit-details-marker { display: none; }
.dw-auth__magicToggle u {
  color: var(--dw-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.dw-auth__magicToggle:hover u { color: #3a4a3a; }

.dw-auth__magicForm {
  margin-top: 14px;
  display: grid; gap: 10px;
}
.dw-auth__label {
  font-size: 13px; font-weight: 600;
  color: var(--dw-ink-soft);
}
.dw-auth__input {
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--dw-line);
  border-radius: 10px;
  background: var(--dw-surface);
  color: var(--dw-ink);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.dw-auth__input:focus {
  border-color: var(--dw-primary);
  box-shadow: 0 0 0 3px var(--dw-primary-soft);
}
button.dw-auth__submit,
.dw-auth__submit {
  padding: 12px 18px;
  font-size: 15px; font-weight: 600;
  background: var(--dw-primary);
  color: var(--dw-bg);
  border-radius: 10px;
  transition: background .12s ease, transform .12s ease;
}
button.dw-auth__submit:hover:not(:disabled),
.dw-auth__submit:hover:not(:disabled) {
  background: #3a4a3a;
  transform: translateY(-1px);
}
button.dw-auth__submit:disabled,
.dw-auth__submit:disabled {
  opacity: 0.55; cursor: not-allowed; transform: none;
}

.dw-auth__formMsg {
  margin: 4px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.dw-auth__formMsg--pending {
  background: var(--dw-primary-mist);
  border-color: var(--dw-primary-soft);
  color: var(--dw-primary);
}
.dw-auth__formMsg--success {
  background: #e8f5e9;
  border-color: #c8e6c9;
  color: #1b5e20;
}
.dw-auth__formMsg--warn {
  background: #fff8e1;
  border-color: #ffe082;
  color: #6f4d00;
}
.dw-auth__formMsg--error {
  background: #fdecea;
  border-color: #f5c2bc;
  color: #c1361e;
}

.dw-auth__fineprint {
  margin: 24px 0 0;
  font-size: 12px;
  color: var(--dw-muted);
  line-height: 1.5;
}
.dw-auth__fineprint a {
  color: var(--dw-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dw-auth__back {
  margin: 0;
  text-align: center;
  font-size: 13px;
}
.dw-auth__back a {
  color: var(--dw-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─────────────── Magic-link welcome toast (B1.5) ─────────────── */
.dw-welcome-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 420px;
  padding: 14px 18px;
  background: var(--dw-surface);
  border: 1px solid var(--dw-primary-soft);
  border-left: 4px solid var(--dw-primary);
  border-radius: 12px;
  box-shadow: var(--dw-shadow-lift);
  font-family: var(--dw-font-sans);
  color: var(--dw-ink);
  font-size: 14px;
  line-height: 1.45;
  transition: opacity .4s ease;
}
.dw-welcome-toast[data-vector="stripe"]   { border-left-color: var(--dw-stone); }
.dw-welcome-toast[data-vector="mcp"]      { border-left-color: #4a5b7a; /* Refactory slate */ }
.dw-welcome-toast[data-vector="moltbook"] { border-left-color: var(--dw-stone-deep); }

.dw-welcome-toast__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--dw-primary);
  color: var(--dw-bg);
  border-radius: 50%;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}
.dw-welcome-toast__body {
  flex: 1;
  min-width: 0;
}
.dw-welcome-toast__title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 14px;
  color: var(--dw-ink);
}
.dw-welcome-toast__sub {
  margin: 0;
  font-size: 13px;
  color: var(--dw-ink-soft);
}
.dw-welcome-toast__close {
  align-self: flex-start;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  color: var(--dw-muted);
  font-size: 18px; line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.dw-welcome-toast__close:hover {
  background: var(--dw-primary-mist);
  color: var(--dw-primary);
}

/* ─────────────── Login error toast (B1.5) ─────────────── */
.dw-auth__errorBanner {
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #fdecea;
  border: 1px solid #f5c2bc;
  border-radius: 10px;
  color: #c1361e;
  font-size: 14px;
  line-height: 1.4;
}
.dw-auth__errorBanner strong { color: #8a2616; }

