/* Sign-in pages (auth/auth_base.html). Spec: .impeccable/demo/aanmelden-demo.html. Loaded after inspectnote.css. */

body.auth-page { display: flex; flex-direction: column; min-height: 100dvh; background: var(--ground); }
.auth { flex: 1; display: flex; justify-content: center; align-items: center; padding: 40px 16px 20px; }
.auth-grid { display: grid; width: 100%; grid-template-columns: minmax(0, 440px); grid-template-areas: "logo" "panel" "below"; justify-content: center; }
.auth-logo { grid-area: logo; display: flex; justify-content: center; margin-bottom: 24px; }
.auth-logo .logo { height: 44px; width: auto; max-width: 220px; object-fit: contain; display: block; }
.auth-panel { grid-area: panel; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 28px 32px 30px; min-width: 0; }
.auth-below { grid-area: below; display: grid; justify-items: center; gap: 2px; margin-top: 16px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-below p, .auth-panel p { margin: 0; }
.auth-panel h1 { font-size: 24px; line-height: 1.25; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.auth-panel h1:focus { outline: none; }
.auth-panel .lead { font-size: 15px; font-weight: 400; color: var(--muted); margin-bottom: 20px; }
.auth-panel .lead b { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.auth-panel h1 + form { margin-top: 20px; }
.auth-panel .back-link { margin: -6px 0 10px -6px; padding: 4px 6px; }
.btn.block { width: 100%; min-height: 44px; }
.tlink { display: inline-flex; align-items: center; min-height: 36px; font-weight: 700; color: var(--blue-ink); text-decoration: none; border-radius: 6px; padding: 0 4px; background: none; border: 0; }
.tlink:hover { text-decoration: underline; color: var(--blue-ink); }
.alt { text-align: center; margin-top: 12px !important; }
.fine { font-size: 13px; color: var(--muted); margin-top: 14px !important; }
.fine a { color: var(--muted); }

/* the two confirmed product claims, beside the form on wide screens (main site only) */
.claims { grid-area: aside; display: none; }
.claim { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
.claim .ci { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: var(--r-m); background: var(--blue-wash); color: var(--blue-ink); display: grid; place-items: center; }
.claim h2 { font-size: 16px; font-weight: 800; color: var(--ink); line-height: 1.35; padding-top: 9px; margin: 0; }
.claim p { font-size: 14px; color: var(--muted); max-width: 34ch; margin: 0; }
@media (min-width: 1000px) {
    .auth-grid { grid-template-columns: 440px 340px; column-gap: 52px; grid-template-areas: "logo ." "panel aside" "below ."; }
    .claims { display: grid; gap: 28px; align-self: start; margin-top: 30px; padding: 4px 0 4px 32px; border-left: 1px solid var(--line); }
}

/* field extras */
.ctl { position: relative; }
.ctl.pw .form-control { padding-right: 50px; }
.pw-toggle { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; background: none; border-radius: var(--r-c); display: grid; place-items: center; color: var(--muted); }
.pw-toggle:hover { color: var(--ink); }
.pw-toggle .i { width: 20px; height: 20px; }
.f2h { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.otp .form-control { height: 56px; font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: .32em; padding-left: calc(12px + .32em); text-align: center; }
.field.terms { margin: 4px 0 16px; }
.field.terms > .check { align-items: flex-start; min-height: 44px; margin: 0; font-size: 14px; line-height: 1.45; }
.field.terms .check input { margin-top: 1px; }
.rules { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; padding: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.rules li { display: inline-flex; align-items: center; gap: 5px; }
.rules .i { width: 16px; height: 16px; stroke-width: 2.4; }
.rules li.ok { color: var(--ok); }
.rules li.bad { color: var(--rec); }
.match { display: flex; align-items: center; gap: 5px; margin-top: 6px !important; font-size: 13px; font-weight: 700; color: var(--ok); }
.match .i { width: 16px; height: 16px; stroke-width: 2.4; }

/* notices and state icons */
.note { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-c); padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.note > .i { width: 20px; height: 20px; margin-top: 1px; }
.note b { display: block; font-weight: 800; }
.note p { margin-top: 2px; color: var(--text); }
.note p b { display: inline; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.note .btn { margin-top: 10px; }
.note.err { background: var(--rec-wash); color: var(--rec); }
.note.warn { background: var(--warn-wash); color: var(--warn); }
.note.ok { background: var(--ok-wash); color: var(--ok); }
.note.info { background: var(--blue-wash); color: var(--blue-ink); }
.note:last-child { margin-bottom: 0; }
.state-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px; }
.state-ic .i { width: 26px; height: 26px; }
.state-ic.ok { background: var(--ok-wash); color: var(--ok); }
.state-ic.err { background: var(--rec-wash); color: var(--rec); }
.state-ic.info { background: var(--blue-wash); color: var(--blue-ink); }
.again { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.again p { color: var(--text); margin-bottom: 12px !important; }
.btn[data-resend]:disabled { opacity: 1; color: var(--muted); background: var(--surface); border-color: var(--line); }

/* chosen plan */
.plan-box { background: var(--ground); border-radius: var(--r-m); padding: 12px 14px; margin-bottom: 18px; }
.plan-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.plan-h a { font-size: 14px; }
.plan-n { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 2px !important; font-size: 16px; font-weight: 800; color: var(--ink); }
.plan-p { font-size: 14px; color: var(--text); margin-top: 2px !important; }

/* 2FA session timer */
.timer { margin: -6px 0 18px; }
.timer-t { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px !important; }
.timer .track { height: 4px; border-radius: 2px; }
.timer .track > span { transition: width .3s linear, background .3s; }
.timer.warn .timer-t { color: var(--warn); }
.timer.warn .track > span { background: var(--warn-fill); }
.timer.late .timer-t { color: var(--rec); }
.timer.late .track > span { background: var(--rec); }

/* busy button */
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: auth-spin .8s linear infinite; flex: none; }
.btn:not(.btn-primary) .spin { border-color: var(--line-strong); border-top-color: var(--blue); }
.btn.is-busy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; } /* an inline .spin ignores its width and height */
.btn.is-busy:disabled { opacity: 1; cursor: progress; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* footer */
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 4px; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); }
.auth-foot a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 6px; border-radius: 6px; color: var(--muted); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { color: var(--ink); text-decoration: underline; }
.auth-foot .dot { color: var(--icon-muted); }

@media (max-width: 767px) {
    .tlink, .auth-foot a { min-height: 44px; }
    .auth-panel .back-link { min-height: 44px; margin: -12px 0 2px -6px; }
}
/* small phones: the form is the page, edge to edge */
@media (max-width: 519px) {
    body.auth-page { background: var(--surface); }
    .auth { align-items: flex-start; padding: 20px 16px 8px; }
    .auth-logo { justify-content: flex-start; margin-bottom: 20px; }
    .auth-logo .logo { height: 32px; }
    .auth-panel { border: 0; border-radius: 0; padding: 4px 0 8px; background: transparent; }
    .auth-below { margin-top: 12px; }
    .auth-foot { border-top: 1px solid var(--line); margin: 0 16px; padding: 6px 0 calc(14px + env(safe-area-inset-bottom)); gap: 0 10px; }
    .auth-foot .dot { display: none; }
    .f2h { gap: 0 10px; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } }
.back-link.btn-reset { background: none; border: 0; cursor: pointer; }
