/* Sign-in, registration and other pages on _AuthLayout.
   Re-skins the template's Bootstrap components with the public site's tokens (see home.css). */

.auth-body {
    --paper: #f6f4ee;
    --paper-deep: #eeebe2;
    --surface: #fcfbf8;
    --sheet: #fffefb;
    --ink: #10221b;
    --ink-soft: #33443d;
    --muted: #5b6962;
    --line: #dcd8cc;
    --line-soft: #e7e4da;
    --green: #1d6a4d;
    --green-strong: #14523a;
    --green-tint: #e2eee7;
    --orange: #e9851f;
    --issue: #a3381f;
    --issue-tint: #f7e5de;
    --dark: #0d1e17;
    --dark-text: #e7efe9;
    --dark-muted: #a3b6ac;
    --dark-accent: #8fd9b3;
    --font: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ease-out: cubic-bezier(.2, .7, .2, 1);

    min-height: 100dvh;
    margin: 0;
    color: var(--ink-soft);
    background: var(--paper);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
}

.auth-body h1, .auth-body h2, .auth-body h3, .auth-body h4, .auth-body h5, .auth-body h6 {
    color: var(--ink);
    font-family: var(--font);
    font-weight: 600;
}

.auth-body a { color: var(--green); }
.auth-body a:hover { color: var(--green-strong); }
.auth-body :focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* Top bar */
.auth-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
    padding-inline: clamp(1rem, 4vw, 2.5rem);
    background: rgba(246, 244, 238, .92);
    border-bottom: 1px solid var(--line-soft);
}

.auth-body .auth-brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); }
.auth-brand img { width: 2.4rem; height: auto; }
.auth-brand span { display: grid; font-size: .95rem; font-weight: 600; line-height: 1.15; }
.auth-brand small { color: var(--muted); font-size: .7rem; font-weight: 400; }

.auth-body .auth-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--ink-soft);
    font-size: .88rem;
    transition: color .2s ease;
}

.auth-body .auth-back:hover { color: var(--green); }
.auth-back i { font-size: 1rem; }

/* Split layout: form on one side, product panel on the other */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    min-height: calc(100dvh - 4rem);
}

.auth-main { display: grid; align-items: center; min-width: 0; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem); }

.auth-aside {
    position: relative;
    display: grid;
    align-items: center;
    padding: clamp(2rem, 5vw, 4rem);
    color: var(--dark-muted);
    background: var(--dark);
    overflow: hidden;
    isolation: isolate;
}

.auth-aside::before {
    content: "";
    position: absolute;
    inset: auto -20% -30% auto;
    z-index: -1;
    width: 32rem;
    height: 32rem;
    background: radial-gradient(circle, rgba(233, 133, 31, .16), transparent 62%);
}

.auth-aside__inner { display: grid; gap: 1.4rem; max-width: 30rem; }
.auth-aside__kicker { margin: 0; color: #f2b673; font-size: .85rem; }
.auth-aside__title { margin: 0; color: var(--dark-text); font-size: clamp(1.8rem, 1rem + 2vw, 2.6rem); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.auth-aside__title span { color: var(--dark-accent); }
.auth-aside__points { display: grid; gap: .7rem; margin: 0; padding: 0; color: var(--dark-text); list-style: none; }
.auth-aside__points li { display: flex; gap: .6rem; align-items: flex-start; }
.auth-aside__points i { margin-top: .2rem; color: var(--dark-accent); font-size: 1.05rem; }
.auth-aside__systems { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding-top: 1.2rem; border-top: 1px solid rgba(214, 235, 224, .13); font-size: .82rem; }
.auth-aside__systems span { margin-inline-end: .25rem; }
.auth-aside__systems img { width: 2.1rem; height: 2.1rem; padding: .3rem; object-fit: contain; background: #f3f1ea; border-radius: .55rem; }
.auth-aside__help { margin: 0; font-size: .88rem; }
.auth-body .auth-aside__help a { color: var(--dark-accent); }

/* The template's centred card, restyled */
.auth-body .container-xxl { max-width: none; padding: 0; }
.auth-body .authentication-wrapper.authentication-basic { min-height: 0; padding: 0; display: block; }
.auth-body .authentication-wrapper .authentication-inner { width: 100%; max-width: 27rem; margin-inline: auto; padding: 0 !important; }
.auth-body .authentication-wrapper .authentication-inner::before,
.auth-body .authentication-wrapper .authentication-inner::after { display: none; }

.auth-body .card {
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 1.25rem;
    box-shadow: 0 1px 2px rgba(16, 34, 27, .05), 0 24px 48px -28px rgba(16, 34, 27, .3);
}

.auth-body .card-body { padding: clamp(1.5rem, 4vw, 2.25rem); }

/* Panel used by the simpler account pages (reset password, confirmations, lockout, 2FA...) */
.auth-panel {
    width: 100%;
    max-width: 27rem;
    margin-inline: auto;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 1.25rem;
    box-shadow: 0 1px 2px rgba(16, 34, 27, .05), 0 24px 48px -28px rgba(16, 34, 27, .3);
}

.auth-icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.1rem;
    color: var(--green);
    font-size: 1.45rem;
    background: var(--green-tint);
    border-radius: .85rem;
}

.auth-icon--success { color: var(--green-strong); background: var(--green-tint); }
.auth-icon--issue { color: var(--issue); background: var(--issue-tint); }
.auth-note { margin: -.4rem 0 1.4rem; color: var(--muted); font-size: .9rem; }
.auth-note code { padding: .1rem .35rem; color: var(--ink); background: var(--paper-deep); border-radius: .3rem; }
.auth-actions { display: grid; gap: .6rem; }
.auth-footnote { margin: 1.4rem 0 0; color: var(--muted); font-size: .92rem; text-align: center; }
.auth-body .auth-footnote a { display: inline-flex; align-items: center; gap: .3rem; font-weight: 500; }
.auth-panel .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; }
.auth-panel .alert { margin-bottom: 1.2rem; }

/* Six single-digit boxes for the verification code */
.auth-body .auth-input-wrapper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; }
.auth-body .auth-input-wrapper .auth-input { min-height: 3.25rem; padding: 0; font-size: 1.3rem; font-weight: 600; text-align: center; }
.auth-body .card .app-brand { display: none !important; }
.auth-body .auth-heading { margin: 0 0 .35rem; font-size: 1.6rem; line-height: 1.25; letter-spacing: -.02em; }
.auth-body .auth-subheading { margin: 0 0 1.6rem; color: var(--muted); }

/* Form controls */
.auth-body label, .auth-body .form-label {
    margin-bottom: .4rem;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.auth-body .form-control, .auth-body .form-select {
    min-height: 3rem;
    padding: .65rem .9rem;
    color: var(--ink);
    font-family: var(--font);
    font-size: 1rem; /* 16px keeps iOS from zooming into the field */
    background-color: var(--sheet);
    border: 1px solid var(--line);
    border-radius: .75rem;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-body .form-control::placeholder { color: #8a948f; }

.auth-body .form-control:focus, .auth-body .form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(29, 106, 77, .16);
}

.auth-body .form-control.input-validation-error, .auth-body .form-control.is-invalid { border-color: var(--issue); }

.auth-body .input-group-merge .form-control:not(:last-child) { border-inline-end: 0; border-start-end-radius: 0; border-end-end-radius: 0; }

.auth-body .input-group-merge .input-group-text {
    color: var(--muted);
    background: var(--sheet);
    border: 1px solid var(--line);
    border-inline-start: 0;
    border-start-end-radius: .75rem;
    border-end-end-radius: .75rem;
}

.auth-body .input-group-merge:focus-within .form-control,
.auth-body .input-group-merge:focus-within .input-group-text { border-color: var(--green); }
.auth-body .input-group-merge:focus-within { border-radius: .75rem; box-shadow: 0 0 0 3px rgba(29, 106, 77, .16); }
.auth-body .input-group-merge:focus-within .form-control:focus { box-shadow: none; }

.auth-body .form-check-input { width: 1.1rem; height: 1.1rem; border-color: var(--line); }
.auth-body .form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.auth-body .form-check-input:focus { box-shadow: 0 0 0 3px rgba(29, 106, 77, .16); border-color: var(--green); }
.auth-body .form-check-label { color: var(--ink-soft); font-weight: 400; }

.auth-body .text-danger, .auth-body .field-validation-error { color: var(--issue) !important; font-size: .85rem; }
.auth-body .validation-summary-errors ul, .auth-body form > ul { margin: .5rem 0 0; padding-inline-start: 1.1rem; }

/* Buttons. Some pages ship an inline `button {}` rule, so these are scoped to win over it. */
.auth-body .btn {
    margin: 0;
    font-family: var(--font);
    font-weight: 500;
    border-radius: .75rem;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}

.auth-body .btn:active { transform: translateY(1px); }

.auth-body .btn-primary {
    min-height: 3rem;
    padding: .7rem 1.25rem;
    color: #fff;
    font-size: 1rem;
    background-color: var(--green);
    border-color: var(--green);
    box-shadow: 0 6px 16px -6px rgba(20, 82, 58, .5);
}

.auth-body .btn-primary:hover, .auth-body .btn-primary:focus, .auth-body .btn-primary:active {
    color: #fff;
    background-color: var(--green-strong) !important;
    border-color: var(--green-strong) !important;
}

.auth-body .btn-primary:disabled { opacity: .7; }
.auth-body .btn-primary .spinner-border { width: 1.1rem; height: 1.1rem; border-width: .15em; }

.auth-body .btn-outline-primary, .auth-body .btn-label-primary, .auth-body .btn-secondary, .auth-body .btn-outline-secondary {
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line);
}

.auth-body .btn-outline-primary:hover, .auth-body .btn-label-primary:hover, .auth-body .btn-secondary:hover, .auth-body .btn-outline-secondary:hover {
    color: var(--ink);
    background: var(--paper-deep);
    border-color: var(--line);
}

/* "Or" divider and Sign in with Intuit (the button keeps Intuit's official artwork) */
.auth-body .divider .divider-text { color: var(--muted); font-size: .85rem; }
.auth-body .divider .divider-text::before, .auth-body .divider .divider-text::after { border-color: var(--line-soft); }
.auth-body .external-login-container { margin-top: .25rem; }
.auth-body .quickbooks-button { margin: 0; }

.auth-body .alert { border: 0; border-radius: .75rem; font-size: .92rem; }
.auth-body .alert-danger { color: var(--issue); background: var(--issue-tint); }
.auth-body .alert-success { color: var(--green-strong); background: var(--green-tint); }
.auth-body .alert-warning { color: #7a4a0c; background: #fbeedb; }
.auth-body .card > .alert { margin: 1rem 1rem 0; }

.auth-body .text-center a, .auth-body .card-body > p a { font-weight: 500; }

/* Reading layout for policies, error and payment-return pages */
.auth-read { width: min(56rem, 100% - 2rem); margin: 0 auto; padding-block: clamp(2rem, 5vw, 3.5rem) 4rem; }
.auth-read .container, .auth-read .container-xxl { max-width: none; padding-inline: 0; }
.auth-read h1, .auth-read h2 { letter-spacing: -.015em; line-height: 1.25; }
.auth-read h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.4rem); }
.auth-read h2 { margin-top: 2rem; font-size: 1.35rem; }
.auth-read p, .auth-read li { max-width: 46rem; }
.auth-read .misc-bg-wrapper { background: none; }

/* Responsive */
@media (max-width: 60rem) {
    .auth-shell { grid-template-columns: minmax(0, 1fr); }
    .auth-main { align-items: start; }
    .auth-aside { padding-block: 2.25rem 2.75rem; }
    .auth-aside__title { font-size: 1.6rem; }
}

@media (max-width: 30rem) {
    .auth-back { font-size: 0; gap: 0; }
    .auth-back i { font-size: 1.3rem; }
    .auth-main { padding-inline: .75rem; }
    .auth-body .card, .auth-panel { border-radius: 1rem; }
    .auth-body .auth-input-wrapper { gap: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-body *, .auth-body *::before, .auth-body *::after { transition-duration: .01ms !important; }
}
