/* ============================================================================
   Вхід / реєстрація / відновлення пароля (app/core/auth_ui.php).
   Шрифт — Onest (dg-font.css), тут не задаємо.
   ========================================================================== */
.au-body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(circle at 50% -10%, rgba(214, 121, 64, .14), transparent 420px), #f7f2eb;
  color: #17120d;
}
.au { --brand: #d67940; --brand-d: #b9612e; --soft: #fdf1e7; --ink: #17120d; --ink2: #4a423b; --muted: #8a7f77; --line: #e6ddd3;
  width: min(100%, 440px); margin: 0 auto; padding: 28px 16px 40px; box-sizing: border-box; }
.au *, .au *::before, .au *::after { box-sizing: border-box; }

.au-logo { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--ink); font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: .01em; }
.au-logo img { width: 40px; height: 40px; border-radius: 50%; }

.au-card { background: #fff; border: 1px solid #ece3da; border-radius: 24px; padding: 26px 22px 24px;
  box-shadow: 0 1px 2px rgba(60, 40, 25, .05), 0 12px 32px rgba(60, 40, 25, .08); }
.au-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 0 14px; background: var(--soft); color: var(--brand-d); font-size: 22px; }
.au h1 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.au-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.au-sub b { color: var(--ink2); }

.au form { margin: 20px 0 0; }
.au-field { margin: 0 0 14px; }
.au-field label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--ink2); }
.au-field input[type=email], .au-field input[type=text], .au-field input[type=password] {
  display: block; width: 100%; height: 50px; padding: 0 14px; margin: 0;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink);
  font: inherit; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; box-shadow: none;
}
.au-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(214, 121, 64, .14); }
.au-field input[aria-invalid=true] { border-color: #c0392b; }
.au-field small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.au-pass { position: relative; }
.au-pass input { padding-right: 50px !important; }
.au-eye { position: absolute; top: 3px; right: 3px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: 17px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.au-eye:hover { color: var(--brand-d); background: var(--soft); }

.au-row { display: flex; justify-content: flex-end; margin: -4px 0 14px; }
.au-link { color: var(--brand-d); font-weight: 700; font-size: 14px; text-decoration: none; }
.au-link:hover { text-decoration: underline; }

.au-rules { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.au-rules li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #f4eee8; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.au-rules li i { font-size: 10px; opacity: .35; }
.au-rules li.is-ok { background: #e8f6ed; color: #1b7f3a; }
.au-rules li.is-ok i { opacity: 1; }
.au-match { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; }
.au-match.is-ok { color: #1b7f3a; } .au-match.is-bad { color: #b3261e; }
.au-match[hidden] { display: none; }

.au-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin: 6px 0 0; padding: 0 18px;
  border: 1px solid transparent; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.au-btn--brand { background: var(--brand); color: #fff; }
.au-btn--brand:hover { background: var(--brand-d); }
.au-btn--brand:disabled { opacity: .7; cursor: progress; }
.au-btn--ghost { background: #fff; color: var(--ink2); border-color: var(--line); }
.au-btn--ghost:hover { border-color: #f0c9aa; color: var(--brand-d); }
.au-btn--google { background: #fff; color: var(--ink); border-color: var(--line); font-weight: 700; }
.au-btn--google:hover { border-color: #cfc5bb; background: #fcfaf8; }
.au-btn.is-busy::after { content: ""; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: au-spin .8s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }

.au-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: #ece3da; }

.au-note { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; font-weight: 600; }
.au-note i { margin-top: 2px; }
.au-note p { margin: 0; } .au-note p + p { margin-top: 4px; }
.au-note a { color: inherit; font-weight: 800; }
.au-note--err { background: #fdecec; color: #a8322a; }
.au-note--ok { background: #e8f6ed; color: #1b6b2c; }
.au-note--info { background: var(--soft); color: #7a4a1e; }

.au-legal { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; text-align: center; }
.au-legal a { color: var(--ink2); }
.au-steps { margin: 16px 0 0; padding: 0 0 0 20px; color: var(--ink2); font-size: 14.5px; line-height: 1.6; }
.au-foot { margin: 18px 0 0; text-align: center; color: var(--ink2); font-size: 15px; }
.au-foot a { color: var(--brand-d); font-weight: 800; text-decoration: none; }
.au-foot a:hover { text-decoration: underline; }

@media (max-width: 400px) {
  .au { padding-top: 18px; }
  .au-card { padding: 22px 16px 20px; border-radius: 20px; }
  .au h1 { font-size: 23px; }
}

/* ── Заповнення профілю (app/core/profile_setup.php) ────────────────────── */
.au-progress { list-style: none; display: flex; gap: 6px; margin: 16px 0 0; padding: 0; counter-reset: au; }
.au-progress li { flex: 1; padding-top: 8px; border-top: 4px solid #ece3da; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.au-progress li.is-done { border-color: #1b7f3a; color: #1b7f3a; }
.au-progress li.is-now { border-color: var(--brand); color: var(--brand-d); }
.au-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 380px) { .au-grid2 { grid-template-columns: minmax(0, 1fr); } }
.au-fs { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.au-fs legend { padding: 0; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--ink2); }
.au-date { display: grid; grid-template-columns: 1fr 1.45fr 1.1fr; gap: 8px; }
.au-date select, .au-field input[type=tel] {
  display: block; width: 100%; height: 50px; margin: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--ink); font: inherit; font-size: 16px; outline: none; min-width: 0;
}
.au-date select { padding: 0 8px; }
.au-date select:focus, .au-field input[type=tel]:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(214, 121, 64, .14); }
.au-date select[aria-invalid=true], .au-field input[type=tel][aria-invalid=true] { border-color: #c0392b; }
.au-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.au-seg label { position: relative; margin: 0; cursor: pointer; }
.au-seg input { position: absolute; opacity: 0; pointer-events: none; }
.au-seg span { display: flex; align-items: center; justify-content: center; height: 50px; border: 1px solid var(--line); border-radius: 14px; font-weight: 700; color: var(--ink2); transition: .15s; }
.au-seg input:checked + span { border-color: var(--brand); background: var(--soft); color: var(--brand-d); box-shadow: inset 0 0 0 1px var(--brand); }
.au-seg input:focus-visible + span { box-shadow: 0 0 0 4px rgba(214, 121, 64, .2); }
.au-opt { margin-left: 4px; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.au-field small.au-err, .au-fs small.au-err { color: #b3261e; font-weight: 700; }

.au-next { display: grid; gap: 8px; margin: 18px 0 0; }
.au-next a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #ece3da; border-radius: 16px; color: var(--ink); text-decoration: none; transition: .15s; }
.au-next a:hover { border-color: #f0c9aa; background: #fffaf6; }
.au-next i { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--brand-d); font-size: 16px; }
.au-next span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.au-next b { font-size: 15px; } .au-next small { color: var(--muted); font-size: 13px; }
.au-tip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: #f7f2eb; font-size: 14px; }
.au-tip b { flex-basis: 100%; color: var(--ink2); }
.au-tip a { color: var(--brand-d); font-weight: 700; text-decoration: none; }
.au-tip a:hover { text-decoration: underline; }
