/* The sign-in page.
 *
 * Split in two: the form, and a room of cats solving itself beside it. The art
 * is the second column rather than a background image behind the inputs,
 * because text over moving artwork is a contrast problem that no amount of
 * overlay really fixes - and on a phone the art is dropped entirely rather
 * than shrunk into a strip nobody can read.
 */

.auth-page { min-height: 100svh; }

.auth {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 940px) {
  .auth { grid-template-columns: minmax(420px, 44%) 1fr; }
}

.auth-form {
  display: flex; flex-direction: column; gap: 22px;
  justify-content: center; align-items: center;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 44px);
}
.auth-form .brand { margin: 0; font-size: 1.15rem; }

.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: var(--step-5); margin-bottom: 10px; }
.auth-sub { color: var(--muted); margin-bottom: 26px; }

/* --- the two modes ------------------------------------------------------ */

.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  padding: 3px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.tabs button {
  padding: 9px 10px; border: none; border-radius: 9px; background: none;
  color: var(--muted); font: inherit; font-weight: 700; font-size: var(--step-1);
  cursor: pointer; transition: background .2s, color .2s;
}
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

/* --- fields ------------------------------------------------------------- */

.field { margin-bottom: 16px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; }
.field label {
  display: block; margin-bottom: 7px;
  font-size: var(--step-1); font-weight: 700; color: var(--muted);
}
.field input {
  width: 100%; padding: 13px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: var(--step-2);
  transition: border-color .18s, box-shadow .18s;
}
.field input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.field input:focus-visible {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.field input[aria-invalid="true"] { border-color: var(--accent-2); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 68px; }
.reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  padding: 7px 11px; border-radius: 9px; border: none;
  background: transparent; color: var(--muted);
  font: inherit; font-size: var(--step-0); font-weight: 700; cursor: pointer;
}
.reveal:hover { color: var(--text); background: var(--surface-2); }

.hint { color: var(--muted); font-size: var(--step-0); margin-top: 7px; }

.linkish {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--muted); font: inherit; font-size: var(--step-0); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}
.linkish:hover { color: var(--text); }

.full { width: 100%; margin-top: 8px; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* --- messages ----------------------------------------------------------- */

.form-error, .form-note {
  border-radius: 11px; padding: 11px 13px; margin-top: 14px;
  font-size: var(--step-1);
}
.form-error {
  background: color-mix(in srgb, var(--accent-2) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 42%, transparent);
  color: var(--text);
}
.form-note {
  background: color-mix(in srgb, var(--good) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--good) 38%, transparent);
  color: var(--text);
}

/* --- google, and the rest ----------------------------------------------- */

.google-holder { display: flex; justify-content: center; margin-bottom: 4px; min-height: 44px; }
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: var(--step-0); font-weight: 700;
  margin: 18px 0;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.auth-switch, .auth-guest {
  color: var(--muted); font-size: var(--step-1); margin-top: 16px; text-align: center;
}
.auth-guest a { color: var(--accent); text-underline-offset: 3px; }
.auth-legal { color: var(--muted); font-size: var(--step-0); }
.auth-legal a { text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }

/* --- the art ------------------------------------------------------------ */

.auth-art { display: none; }
@media (min-width: 940px) {
  .auth-art {
    display: grid; place-items: center;
    padding: 40px;
    background:
      radial-gradient(70% 60% at 70% 20%, rgba(240,160,75,.16), transparent 70%),
      linear-gradient(200deg, var(--surface-2), var(--bg-deep));
    border-left: 1px solid var(--line);
  }
}
.auth-art-inner { width: min(460px, 100%); }
