/* =====================================================================
   A2 Life — sign-in / registration
   ===================================================================== */

:root {
    --green-900: #063d1e;
    --green-800: #08491f;
    --green-700: #0b5d30;
    --green-600: #147b3f;
    --green-100: #e6f2ea;
    --green-50:  #f2f8f4;
    --gold-500:  #f0b41b;
    --gold-400:  #f5c63d;

    --ink:    #14251c;
    --muted:  #6b7f73;
    --line:   #dde7e1;
    --danger: #c62828;

    --radius: 14px;
    --shadow: 0 18px 50px rgba(6, 61, 30, .16);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: var(--ink);
    background: linear-gradient(140deg, #0b5d30 0%, #0d6b38 45%, #0a5129 100%);
    display: flex;
    /*
     * 'align-items: center' alone is unsafe: when the card is taller
     * than the viewport (support.php, with its FAQ list, routinely is),
     * a centered flex item overflows its container SYMMETRICALLY —
     * half above, half below. The half above the container's top edge
     * is not just visually hidden, it is structurally unreachable by
     * scrolling (window.scrollY cannot go negative), so the logo and
     * title become permanently cut off with no way to scroll up to
     * them. 'safe center' is the standards-track fix: centered while it
     * fits, falling back to start-alignment (so it scrolls normally)
     * the moment it would overflow. Plain 'center' stays first as the
     * fallback for engines that do not understand the 'safe' keyword —
     * an unrecognised value invalidates the whole declaration, so the
     * line above it is what such a browser actually uses.
     */
    align-items: center;
    align-items: safe center;
    justify-content: center;
    padding: 28px 18px;
    -webkit-font-smoothing: antialiased;
}

/* Soft organic shapes, echoing the leaf mark */
.leaf-blob {
    position: fixed;
    border-radius: 48% 52% 55% 45% / 50% 45% 55% 50%;
    filter: blur(2px);
    opacity: .12;
    pointer-events: none;
    z-index: 0;
}
.leaf-blob.b1 { width: 420px; height: 420px; background: var(--gold-500); top: -140px; left: -120px; }
.leaf-blob.b2 { width: 320px; height: 320px; background: #ffffff;        bottom: -110px; right: -90px; }
.leaf-blob.b3 { width: 200px; height: 200px; background: var(--gold-400); top: 55%; left: 8%; opacity: .08; }

/* ── Card ────────────────────────────────────────────────────────── */

.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;

    /* body is display:flex, which makes this a flex item — flex items
       get an implicit min-width:auto (their content's min-content
       size) unless told otherwise. Wide content (the Help & Support
       grid, at 4 columns wanting 190px each) was pushing that implicit
       minimum past the phone viewport and forcing the whole card
       wider than the screen instead of wrapping inside it. */
    min-width: 0;
}
.auth-shell.wide { max-width: 520px; }
.auth-shell.xwide { max-width: 740px; }

.auth-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.auth-brand {
    padding: 30px 32px 20px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}
.auth-brand img {
    width: 190px;
    max-width: 68%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.auth-body { padding: 26px 32px 30px; }

.auth-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--green-800);
    margin: 0 0 4px;
    letter-spacing: -.2px;
}
.auth-sub {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0 0 22px;
}

/* ── Fields ──────────────────────────────────────────────────────── */

.field { margin-bottom: 17px; }

.field-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--green-800);
    margin-bottom: 7px;
    letter-spacing: .2px;
}
.field-label .req { color: var(--danger); }

.field-input {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    transition: border-color .18s, box-shadow .18s;
}
.field-input:focus-within {
    border-color: var(--green-600);
    box-shadow: 0 0 0 3.5px rgba(20, 123, 63, .13);
}
.field-input.is-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3.5px rgba(198, 40, 40, .1);
}

.field-icon {
    width: 42px;
    display: grid;
    place-items: center;
    color: var(--green-600);
    font-size: 14px;
    flex-shrink: 0;
}

.field-input input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    color: var(--ink);
    padding: 12px 14px 12px 0;
}
.field-input input::placeholder { color: #a9bcb0; }
.field-input input[readonly] { color: var(--muted); }

.pw-toggle {
    border: 0;
    background: none;
    color: #8fa598;
    font-size: 14px;
    cursor: pointer;
    padding: 0 14px;
    align-self: stretch;
}
.pw-toggle:hover { color: var(--green-600); }

.field-hint  { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field-error { font-size: 12.5px; color: var(--danger); margin-top: 6px; display: none; }
.field-error.show { display: block; }

/* ── Sponsor confirmation ────────────────────────────────────────── */

.sponsor-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    background: var(--green-100);
    border: 1px solid #c9e2d3;
    color: var(--green-800);
    min-height: 38px;
}
.sponsor-box.is-idle  { background: #f5f8f6; border-color: var(--line); color: #9db0a4; font-weight: 400; }
.sponsor-box.is-error { background: #fdf0f0; border-color: #f0c4c4; color: var(--danger); }

/* ── Side selector ───────────────────────────────────────────────── */

.side-group { display: flex; gap: 11px; }

.side-option {
    flex: 1;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    padding: 13px 8px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: border-color .18s, background .18s;
}
.side-option input { display: none; }
.side-option:hover { border-color: var(--green-600); background: #f4faf6; }
.side-option.is-active {
    border-color: var(--green-600);
    background: var(--green-100);
    box-shadow: 0 0 0 3px rgba(20, 123, 63, .1);
}
.side-option i     { font-size: 17px; color: var(--green-600); display: block; margin-bottom: 5px; }
.side-option span  { font-size: 13.5px; font-weight: 700; color: var(--green-800); }

.side-group.is-locked .side-option { pointer-events: none; opacity: .45; }
.side-group.is-locked .side-option.is-active { opacity: 1; }

/* ── Consent rows ────────────────────────────────────────────────── */

.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
    cursor: pointer;
}
.consent input {
    width: 17px; height: 17px;
    margin-top: 2px;
    accent-color: var(--green-600);
    flex-shrink: 0;
    cursor: pointer;
}
.consent a { color: var(--green-600); font-weight: 700; }

/* ── Buttons & messages ──────────────────────────────────────────── */

.btn-primary {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 13px;
    margin-top: 4px;
    font: inherit;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--green-700), var(--green-600));
    cursor: pointer;
    transition: transform .12s, box-shadow .18s, filter .18s;
    box-shadow: 0 6px 18px rgba(11, 93, 48, .28);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 9px 24px rgba(11, 93, 48, .34); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { opacity: .62; cursor: not-allowed; box-shadow: none; }
.btn-primary i { margin-right: 8px; }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 18px;
}
.alert i { margin-top: 2px; }
.alert-error   { background: #fdf0f0; border: 1px solid #f0c4c4; color: var(--danger); }
.alert-success { background: var(--green-100); border: 1px solid #c9e2d3; color: var(--green-800); }

.auth-foot {
    text-align: center;
    padding: 15px;
    font-size: 12.5px;
    color: var(--muted);
    background: #f7faf8;
    border-top: 1px solid var(--line);
}
.auth-foot a { color: var(--green-700); font-weight: 800; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.auth-alt {
    text-align: center;
    margin-top: 19px;
    font-size: 13.5px;
    color: var(--muted);
}
.auth-alt a { color: var(--green-700); font-weight: 800; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

.tagline {
    text-align: center;
    margin-top: 18px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .72);
    letter-spacing: .3px;
}

@media (max-width: 480px) {
    .auth-brand { padding: 24px 22px 17px; }
    .auth-body  { padding: 22px 22px 26px; }
}

/* ══ Remember me / forgot password row ═════════════════════════════ */

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: -2px 0 16px;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #14251c;
    cursor: pointer;
    user-select: none;
}
.auth-remember input {
    width: 16px;
    height: 16px;
    accent-color: #0b5d30;
    cursor: pointer;
}

.auth-forgot {
    font-size: 13.5px;
    font-weight: 700;
    color: #0b5d30;
    text-decoration: none;
}
.auth-forgot:hover { text-decoration: underline; }

/* Side by side is cramped on a small phone; stack and keep the tap
   targets a comfortable size. */
@media (max-width: 380px) {
    .auth-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* The recovery form has six fields; give it a little more room than the
   two-field sign-in card without changing that one. */
.auth-card-wide { max-width: 520px; }

/* ══ Public Help & Support page ══════════════════════════════════════ */

.auth-card-xwide { max-width: 720px; }

/* ══ Language translator (shared markup with includes/_legal-doc.php) ═ */

.doc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.doc-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 8px;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.doc-back:hover { background: #d8e9de; }

/* Centers the translator under the logo, its own row rather than
   sharing one with the "go back" link — it needs to stand out, not
   share billing with navigation. */
.doc-translate-row {
    display: flex;
    justify-content: center;
    margin: 0 0 22px;
}

/* Red on purpose: this is the one control on the page that is not
   green-branded chrome, so it reads as a distinct, noticeable option
   rather than blending into the rest of the header. Same red already
   used for errors/attention elsewhere (.alert-error, --danger). */
.doc-translate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px 7px 14px;
    border: 1.5px solid var(--danger);
    border-radius: 999px;
    background: #fdf0f0;
}
.doc-translate i { color: var(--danger); font-size: 15px; }

.doc-translate select {
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--danger);
    cursor: pointer;
}
.doc-translate select:focus { outline: 2px solid var(--danger); outline-offset: 2px; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Google injects a banner and shifts the page down; suppress it, since
   the selector above already tells the reader what language they chose. */
.goog-te-banner-frame,
.skiptranslate iframe { display: none !important; }
body { top: 0 !important; }
#googleTranslateHost { display: none; }

/* ══ Highlighted FAQ / self-support block ═════════════════════════════

   A distinct tinted panel (not just another .card) so it reads as its
   own zone — "try this before you contact anyone" — rather than one
   more section in the page flow. */

.faq-section {
    background: var(--green-50);
    border: 1px solid var(--green-100);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 18px;
}
.faq-section .card-title,
.faq-section h2 {
    font-size: 17px;
    font-weight: 800;
    color: var(--green-900);
    margin: 0;
}
.faq-section .card-sub,
.faq-section > p {
    font-size: 13px;
    color: var(--muted);
    margin: 3px 0 16px;
}
/* The FAQ items themselves stay white, so they still read as
   individually tappable rows against the tinted section background. */
.faq-section .faq-item { background: #fff; }


.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.help-channel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0; /* stop grid blowout: without this, a grid item's
                     implicit min-width:auto (its own content's
                     min-content) can force the track wider than the
                     column's own minmax() minimum, overflowing the
                     grid past its container. */
}
.help-channel.is-primary { border-color: var(--green-500); background: var(--green-50); }

.help-icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 19px;
    margin-bottom: 8px;
}
.help-channel.is-primary .help-icon { background: var(--green-600); color: #fff; }

.help-channel h2 { font-size: 14.5px; font-weight: 800; margin: 0; }
.help-channel p  { font-size: 12px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; }

.help-note { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.help-note a { color: var(--green-600); font-weight: 700; }

.faq { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

.faq-item { border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; }
.faq-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { font-size: 12px; color: var(--muted); transition: transform .15s; flex-shrink: 0; }
.faq-item[open] summary i { transform: rotate(180deg); }

.faq-body { padding: 0 0 16px; font-size: 13.5px; line-height: 1.6; color: #2c3f34; }
.faq-body p { margin: 0 0 10px; }
.faq-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--green-600);
    text-decoration: none;
}
.faq-link:hover { text-decoration: underline; }

.notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 10px;
    background: #fdf8e9;
    border: 1px solid #f2e0ab;
    color: #7a5c07;
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 18px;
}
.notice i { margin-top: 2px; font-size: 15px; }
.notice a { color: #7a5c07; font-weight: 800; }


