/* The auth pages (login, register, forgot and reset password, verify) in the landing page's style:
   the form beside the lit lavender panel. Linked after assets/site/system.css and theme.css. */

body { background: var(--bg); }

/* ------------------------------------------------------------ the page: the form beside the lit panel */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; min-height: 100svh; }
.auth__main { display: flex; flex-direction: column; min-width: 0; padding: var(--s-5) var(--s-7); }
.auth__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.auth__logo { display: inline-flex; align-items: center; gap: var(--s-3); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.auth__body { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--s-7) 0; }
.auth__box { width: 100%; max-width: 400px; }
.auth__box h1 { font-size: clamp(30px, 1.2vw + 22px, 40px); line-height: 1.1; }
.auth__lead { margin-top: var(--s-3); color: var(--muted); }
.auth__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-4); font-size: 13px; color: var(--muted); }
.auth__foot nav { display: flex; gap: var(--s-4); }
.auth__foot a:hover { color: var(--ink); }

.theme-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card-bg); color: var(--muted); cursor: pointer;
}
.theme-btn:hover { color: var(--ink); }

/* ------------------------------------------------------------ the form */
.form { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-6); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 500; }
.field__label a { font-weight: 400; font-size: 13px; color: var(--accent); }
.field__label a:hover { text-decoration: underline; text-underline-offset: 3px; }
.field__wrap { position: relative; }
.input {
  width: 100%; height: 44px; padding: 0 var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--card-bg); color: var(--ink); font: 400 15px var(--font-text); outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder { color: var(--muted); opacity: .75; }
.input:focus { border-color: var(--action); box-shadow: 0 0 0 3px color-mix(in oklab, var(--action) 22%, transparent); }
.field__wrap .input { padding-right: 44px; }
.pw-toggle {
  position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.pw-toggle .off { display: none; }
.pw-toggle[aria-pressed="true"] .on { display: none; }
.pw-toggle[aria-pressed="true"] .off { display: block; }
.field__hint { font-size: 13px; color: var(--muted); }

.input--code { height: 56px; text-align: center; font: 500 26px var(--font-mono); letter-spacing: .5em; padding-left: .5em; }

.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: 14px; line-height: 1.5; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--action); cursor: pointer; }
.check a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent); }

.form .btn--primary { width: 100%; margin-top: var(--s-2); }

.auth__alt { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s-2); font-size: 14px; color: var(--muted); }
.auth__alt a, .auth__alt button { color: var(--accent); font-weight: 500; }
.auth__alt a:hover, .auth__alt button:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth__alt button { padding: 0; border: 0; background: none; font: inherit; font-weight: 500; cursor: pointer; text-align: left; }

/* ------------------------------------------------------------ the lit panel, the landing hero's painted ground */
.auth__art {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--s-6);
  margin: var(--s-3); padding: var(--s-7); border-radius: var(--r-lg); overflow: hidden;
  /* it stays in view while a long form (register) scrolls beside it */
  position: sticky; top: var(--s-3); height: calc(100vh - 2 * var(--s-3)); height: calc(100svh - 2 * var(--s-3));
  background:
    radial-gradient(120% 60% at 70% 118%, #7e3af2 0 40%, transparent 41%),
    radial-gradient(90% 50% at 10% 108%, #6c2bd9 0 42%, transparent 43%),
    radial-gradient(80% 40% at 60% 92%, #cabffd 0 40%, transparent 41%),
    linear-gradient(#bfb3f5, #e4e0fb 70%, #f4f5f7);
}
html.theme-dark .auth__art {
  background:
    radial-gradient(120% 60% at 70% 118%, #4c1d95 0 40%, transparent 41%),
    radial-gradient(90% 50% at 10% 108%, #3b1676 0 42%, transparent 43%),
    radial-gradient(80% 40% at 60% 92%, #5521b5 0 40%, transparent 41%),
    linear-gradient(#121317, #1a1c23 70%, #24262d);
}
.art__caption { max-width: 420px; text-align: center; color: #24262d; }
.art__caption h2 { font-size: clamp(24px, 1vw + 16px, 32px); line-height: 1.15; }
.art__caption p { margin-top: var(--s-2); color: #4c4f52; }
html.theme-dark .art__caption { color: #f4f5f7; }
html.theme-dark .art__caption p { color: #c3bce6; }

/* the UI card on the panel, in the landing page's window look */
.ui-card {
  width: 100%; max-width: 420px; border-radius: var(--r-md); background: var(--card-bg); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 24px 60px rgb(36 22 90 / .22); overflow: hidden; font-size: 13px;
  animation: rise .6s var(--ease) both .1s;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .ui-card, .ui-card * { animation: none !important; } }
.ui-card__bar { display: flex; align-items: center; gap: var(--s-3); padding: 10px var(--s-4); border-bottom: 1px solid var(--line); color: var(--muted); }
.ui-card__bar b { color: var(--ink); font-weight: 500; }
.ui-dots { display: flex; gap: 6px; }
.ui-dots i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in oklab, var(--ink) 16%, transparent); }
.ui-card__body { padding: var(--s-3) var(--s-4) var(--s-4); }
.ui-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ui-row:last-child { border-bottom: 0; }
.ui-row small { display: block; color: var(--muted); font-size: 12px; }
.ui-row .amt { font-variant-numeric: tabular-nums; font-weight: 500; text-align: right; }
.ui-av { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font: 500 11px var(--font-mono); color: #fff; background: var(--t, #7e3af2); }
.ui-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 500; color: var(--ok); background: color-mix(in oklab, var(--ok) 12%, transparent); }
.ui-chip--wait { color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
.ui-row.is-posting .ui-chip { animation: post 3.2s var(--ease) infinite; }
@keyframes post { 0%, 40% { color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); } 55%, 100% { color: var(--ok); background: color-mix(in oklab, var(--ok) 12%, transparent); } }

.ui-check { display: flex; align-items: center; gap: var(--s-3); padding: 8px 0; }
.ui-check__box { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-strong); flex: none; }
.ui-check.is-done .ui-check__box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ui-check.is-done span:last-child { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.ui-check__box svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.ui-check.is-done .ui-check__box svg { opacity: 1; }
.ui-meter { height: 6px; margin: var(--s-2) 0 var(--s-3); border-radius: 99px; background: color-mix(in oklab, var(--ink) 8%, transparent); overflow: hidden; }
.ui-meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.ui-mail { display: flex; gap: var(--s-3); padding: var(--s-4); }
.ui-mail__ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent); }
.ui-mail__ico .icon { width: 18px; height: 18px; }
.ui-mail b { display: block; font-weight: 500; font-size: 14px; }
.ui-mail p { color: var(--muted); margin-top: 2px; line-height: 1.45; }
.ui-mail__btn { display: inline-flex; margin-top: var(--s-3); padding: 7px 14px; border-radius: 8px; background: var(--action); color: var(--action-ink); font-weight: 500; font-size: 12px; }
.ui-code { display: flex; gap: 6px; margin-top: var(--s-3); }
.ui-code span { display: grid; place-items: center; width: 34px; height: 42px; border-radius: 8px; border: 1px solid var(--line-strong); font: 500 18px var(--font-mono); background: var(--bg); }
.ui-meta { display: flex; justify-content: space-between; padding: 10px var(--s-4); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; background: color-mix(in oklab, var(--surface) 60%, var(--card-bg)); }

/* ------------------------------------------------------------ smaller screens */
/* a short screen (1366x768 leaves about 650): less room above and below the form */
@media (max-height: 760px) {
  .auth__body { padding: var(--s-5) 0; }
  .form { gap: var(--s-3); margin-top: var(--s-5); }
  .auth__alt { margin-top: var(--s-5); padding-top: var(--s-4); }
  .auth__art { gap: var(--s-5); padding: var(--s-6); }
}
/* a tablet or a narrow window: the panel goes, the form takes the page */
@media (max-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__art { display: none; }
  .auth__main { padding: var(--s-5) var(--s-6); }
}
@media (max-width: 639px) {
  .auth__main { padding: var(--s-4); }
  .form__row { grid-template-columns: 1fr; }
}
