/* login.css — the signed-out door. Only this page uses it.
 *
 * Layout is a two-column shell: a navy brand panel that states what
 * Datafort is, and a form pane. Below 900px the brand panel collapses
 * to a compact header so the form stays above the fold on a phone.
 */

/* ══ Shell ═══════════════════════════════════════════════════════ */

.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
}


/* ══ Brand panel ═════════════════════════════════════════════════ */

.brandside {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #101012 0%, var(--ink) 45%, #1E1214 100%);
  color: var(--on-dark);
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* Slow drifting glow. Purely atmospheric — sits behind everything and
 * is hidden from assistive tech. */
.brandside::before {
  content: '';
  position: absolute;
  top: -18%; left: -12%;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(185, 25, 23, .48), transparent 68%);
  filter: blur(42px);
  animation: drift 22s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(22%, 26%) scale(1.18); }
}

.brandside > * { position: relative; z-index: 1; }

.brandside__logo {
  display: flex;
  align-items: center;
  gap: 13px;
}

/* Mark only — the product name beside it is live text. See .side__brand
 * in app.css for why the FolksFirst wordmark is not used here. */
.brandside__logo img { width: 42px; height: auto; }

.brandside__logo .word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 1.2px;
}

.brandside__body { margin-top: auto; }

.brandside__tag {
  font-size: clamp(28px, 3.1vw, 39px);
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.brandside__tag span { color: #F1736A; display: block; }

.brandside__blurb {
  color: var(--on-dark-dim);
  max-width: 46ch;
  margin: 0;
}

.pointlist {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  gap: 13px;
  max-width: 48ch;
}

.pointlist li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: var(--on-dark-dim);
  font-size: 14px;
}

.pointlist .tick {
  flex: none;
  width: 19px; height: 19px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(214, 43, 35, .32);
  color: #F5978F;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.brandside__foot {
  font-size: 12px;
  color: rgba(255, 255, 255, .42);
  letter-spacing: .2px;
}

@media (max-width: 900px) {
  .brandside {
    padding: 26px 24px 30px;
    gap: 20px;
  }
  /* The value proposition is for first-time visitors on a desktop. On a
   * phone the person signing in already knows what this is — give the
   * space to the form instead. */
  .brandside__blurb,
  .pointlist,
  .brandside__foot { display: none; }
  .brandside__tag { font-size: 22px; margin-bottom: 0; }
  .brandside__tag span { display: inline; }
  .brandside__body { margin-top: 0; }
}


/* ══ Form pane ═══════════════════════════════════════════════════ */

.pane {
  background: var(--surface);
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  .pane { padding: 32px 24px 40px; }
}

.pane__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: auto;
}

.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-faint);
}

.themebtn {
  flex: none;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.themebtn:hover { background: var(--surface-alt); color: var(--text); }
.themebtn svg { width: 17px; height: 17px; }

/* Only one of the two icons is ever shown, chosen by the resolved theme. */
.themebtn .i-moon { display: none; }
:root[data-theme="dark"] .themebtn .i-sun  { display: none; }
:root[data-theme="dark"] .themebtn .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themebtn .i-sun  { display: none; }
  :root:not([data-theme="light"]) .themebtn .i-moon { display: block; }
}

.form {
  width: 100%;
  max-width: 380px;
  margin: 40px auto;
  display: grid;
  gap: 18px;
}

.form__head { margin-bottom: 4px; }
.form__head h1 { font-size: 27px; margin-bottom: 6px; }
.form__head p  { margin: 0; color: var(--text-muted); font-size: 14px; }

/* Password field with the reveal toggle sitting inside the input. */
.pw { position: relative; }
.pw .input { padding-right: 46px; }

.pw__toggle {
  position: absolute;
  top: 50%; right: 6px;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--text-faint);
  cursor: pointer;
}
.pw__toggle:hover { color: var(--text-muted); background: var(--surface-alt); }
.pw__toggle svg { width: 17px; height: 17px; }
.pw__toggle .i-hide { display: none; }
.pw__toggle[aria-pressed="true"] .i-show { display: none; }
.pw__toggle[aria-pressed="true"] .i-hide { display: block; }

.form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.check input { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }

/* Spinner shown inside the submit button while the request is in flight. */
.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn[data-busy="false"] .spinner { display: none; }
.btn[data-busy="true"]  .btn__label { opacity: .8; }


/* ══ Footer notes ════════════════════════════════════════════════ */

.pane__foot {
  margin-top: auto;
  display: grid;
  gap: 12px;
  max-width: 380px;
  width: 100%;
  margin-inline: auto;
}

/* Says plainly that the session is recorded. This is deliberate: a
 * product whose whole value is the audit trail should tell people the
 * audit trail exists. Deterrence only works if it is visible. */
.monitor {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 13px;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}
.monitor svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--text-faint); }

.noaccount {
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
}
