/* WiseFinance – login / register. Builds on wf.css. */

body.auth { background: var(--surface); }

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

/* form column */
.auth-main {
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  padding: var(--sp-5) var(--sp-8);
  background: var(--surface);
}
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.auth-top-actions { display: flex; align-items: center; gap: var(--sp-2); }

.auth-content { flex: 1; display: grid; place-items: center; padding-block: var(--sp-10); }
.auth-panel { width: 100%; max-width: 400px; }

.auth-switch { display: flex; width: 100%; margin-bottom: var(--sp-8); }
.auth-switch a {
  flex: 1; text-align: center; text-decoration: none;
  padding: 8px 14px; border-radius: 9px;
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-muted);
}
.auth-switch a:hover { color: var(--text); }
.auth-switch a.active { background: var(--surface); color: var(--text); font-weight: var(--fw-semibold); box-shadow: var(--shadow-xs); }

.auth-title { font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.auth-sub { margin-top: var(--sp-2); color: var(--text-2); }

.auth-form { display: grid; gap: var(--sp-5); margin-top: var(--sp-8); }
.auth-form .btn[aria-busy="true"] { cursor: progress; }
.auth-legal { text-align: center; margin-top: calc(-1 * var(--sp-2)); }

.auth-alt { margin-top: var(--sp-6); text-align: center; font-size: var(--fs-sm); color: var(--text-2); }
.auth-alt a { font-weight: var(--fw-semibold); }

.auth-foot {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-size: var(--fs-xs); color: var(--text-muted); text-align: center;
}
.auth-foot svg { width: 14px; height: 14px; flex: none; }

/* password rules */
.pw-rules {
  list-style: none; margin: 2px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pw-rules li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: var(--fs-xs); color: var(--text-muted);
  transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.pw-rules li::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid currentColor; box-sizing: border-box;
}
.pw-rules li.is-met { background: var(--positive-soft); color: var(--positive); font-weight: var(--fw-medium); }
.pw-rules li.is-met::before {
  border: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a11 11 0 1 0 0 22 11 11 0 0 0 0-22Zm5.3 8.2-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4l2.3 2.3 5.3-5.3a1 1 0 1 1 1.4 1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a11 11 0 1 0 0 22 11 11 0 0 0 0-22Zm5.3 8.2-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4l2.3 2.3 5.3-5.3a1 1 0 1 1 1.4 1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hint--ok { color: var(--positive); }

/* brand column */
.auth-aside {
  position: relative;
  background: var(--brand-softer);
  border-inline-start: 1px solid var(--border);
  display: grid; place-items: center;
  padding: var(--sp-12) var(--sp-10);
  overflow: hidden;
}
.auth-aside::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 70% 20%, var(--brand-soft), transparent 70%);
  pointer-events: none;
}
.aside-inner { position: relative; width: 100%; max-width: 420px; }
.aside-title { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); letter-spacing: -0.025em; line-height: 1.12; }
.aside-lead { margin-top: var(--sp-4); color: var(--text-2); font-size: var(--fs-lg); }

.aside-card {
  margin-top: var(--sp-8);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}
.ac-row { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); }
.ac-label { display: block; font-size: var(--fs-xs); color: var(--text-muted); }
.ac-big {
  margin-top: var(--sp-2);
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 2.25rem; letter-spacing: -0.02em; color: var(--text); text-align: right;
}
.ac-big small { font-size: 0.55em; color: var(--text-muted); }
.ac-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-4); }
.ac-split > div { padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2); }
.ac-val { display: block; font-weight: var(--fw-semibold); text-align: right; }
.ac-track { margin-top: var(--sp-4); height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.ac-track span { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--brand-solid); }

.aside-points { list-style: none; padding: 0; margin: var(--sp-8) 0 0; display: grid; gap: var(--sp-3); }
.aside-points li { display: flex; align-items: center; gap: var(--sp-3); color: var(--text-2); font-size: var(--fs-sm); }
.aside-points svg {
  width: 22px; height: 22px; padding: 4px; flex: none;
  border-radius: 50%; background: var(--surface); color: var(--positive);
  border: 1px solid var(--border);
}

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}
@media (max-width: 520px) {
  .auth-main { padding: var(--sp-4); }
  .auth-content { padding-block: var(--sp-6); place-items: start center; }
  .auth-top .btn { display: none; }
  .auth-switch { margin-bottom: var(--sp-6); }
  .auth-form { margin-top: var(--sp-6); }
}
