/* Sign-in and password pages (auth/login, auth/passwords/*), revamped 2026-11-16.
   Split layout: brand panel (auth/partials/brand-panel) + form card. On phones the form comes first
   and a short version of the panel follows it. Brand green matches the marketing site (#0D864F / #11A25F). */

.auth-shell { display: flex; min-height: 100vh; background: #f6f8f7; font-family: 'Open Sans', sans-serif; }
.auth-shell *, .auth-shell *::before, .auth-shell *::after { box-sizing: border-box; }

/* ---- Brand panel ---- */
.auth-panel {
    flex: 0 0 52%; max-width: 52%; position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .10) 0, rgba(255, 255, 255, 0) 38%),
                linear-gradient(155deg, #0f9a5a 0%, #0b7a47 45%, #075c36 100%);
    display: flex; align-items: center;
}
.auth-panel::after {
    content: ""; position: absolute; right: -160px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
    background: rgba(255, 255, 255, .06); pointer-events: none;
}
.auth-panel-inner { position: relative; z-index: 1; width: 100%; max-width: 600px; margin: 0 auto; padding: 36px 56px; text-align: left; }
.auth-panel-logo { display: inline-block; margin-bottom: 24px; }
.auth-panel-logo img { display: block; width: 136px; height: auto; }
.auth-panel .auth-panel-title { color: #fff; font-size: 1.6rem; font-weight: 700; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
.auth-panel .auth-panel-lead { color: rgba(255, 255, 255, .86); font-size: .95rem; line-height: 1.6; margin: 0 0 22px; }
.auth-panel-visual { margin: 0 0 24px; }
.auth-panel-visual img { display: block; width: 100%; max-width: 440px; height: auto; filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .28)); }
.auth-panel-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.auth-panel-list li { display: flex; gap: 12px; align-items: flex-start; }
.auth-panel-list i {
    flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: .9rem;
}
.auth-panel-list span { color: rgba(255, 255, 255, .82); font-size: .84rem; line-height: 1.5; }
.auth-panel-list strong { display: block; color: #fff; font-size: .9rem; margin-bottom: 2px; }
.auth-panel .auth-panel-label { color: rgba(255, 255, 255, .7); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.auth-panel-orgs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.auth-panel-orgs li {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); color: #fff; font-size: .8rem; font-weight: 600;
}
.auth-panel-orgs li i { font-size: .78rem; opacity: .9; }

/* ---- Form side ---- */
.auth-main { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 40px 36px; box-shadow: 0 18px 40px rgba(17, 24, 39, .06); }
.auth-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 0 0 24px; padding: 0 0 18px; border-bottom: 1px solid #eef0ef;
}
.auth-card-logo { display: block; }
.auth-card-logo img { display: block; width: 120px; height: auto; }
.auth-secure {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
    background: #e8f6ee; color: #0c7f4a; font-size: .74rem; font-weight: 600; white-space: nowrap;
}
.auth-secure i { font-size: .68rem; }
.auth-card .auth-title { font-size: 1.6rem; font-weight: 700; color: #111827; margin: 0 0 22px; }
.auth-card .auth-intro { color: #4b5563; font-size: .93rem; line-height: 1.6; margin: 0 0 26px; }
.auth-card label { font-weight: 600; font-size: .85rem; color: #374151; margin-bottom: 6px; }
.auth-card .form-control { height: 48px; border-radius: 10px; border-color: #d1d5db; font-size: .95rem; }
.auth-card .form-control:focus { border-color: #11A25F; box-shadow: 0 0 0 3px rgba(17, 162, 95, .18); }
.auth-card .input-group .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.auth-card .input-group-append .btn { border-color: #d1d5db; border-radius: 0 10px 10px 0; color: #4b5563; background: #fff; width: 48px; }
.auth-card .input-group-append .btn:hover { background: #f3f4f6; }
.auth-card .auth-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.auth-card .auth-label-row a, .auth-card .auth-link { color: #0c7f4a; font-size: .84rem; font-weight: 600; }
.auth-card .auth-forgot { text-align: right; margin-top: 8px; }
.auth-card .custom-control-label { font-weight: 400; color: #4b5563; font-size: .88rem; padding-top: 1px; }
.auth-card .custom-control-input:checked ~ .custom-control-label::before { background-color: #11A25F; border-color: #11A25F; }
.auth-card .btn-auth {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border-radius: 10px;
    background: #11A25F; border: 1px solid #11A25F; color: #fff; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .98rem;
    text-transform: none; letter-spacing: 0;
}
.auth-card .btn-auth:hover, .auth-card .btn-auth:focus { background: #0c7f4a; border-color: #0c7f4a; color: #fff; }
.auth-card .g-recaptcha { margin: 2px 0 6px; }
.auth-card .alert { border-radius: 10px; font-size: .9rem; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: #9ca3af; font-size: .8rem; margin: 26px 0 16px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #e5e7eb; }
.auth-new { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-new a {
    display: flex; align-items: center; justify-content: center; gap: 7px; height: 44px; border-radius: 10px; border: 1px solid #d1d5db;
    color: #111827; font-weight: 600; font-size: .86rem; text-decoration: none; background: #fff;
}
.auth-new a:hover { border-color: #11A25F; color: #0c7f4a; text-decoration: none; }
.auth-new a i { color: #11A25F; }
.auth-help { margin: 22px 0 0; color: #6b7280; font-size: .82rem; text-align: center; line-height: 1.6; }
.auth-help a { color: #0c7f4a; font-weight: 600; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; font-size: .9rem; color: #0c7f4a; font-weight: 600; }
.auth-foot { margin-top: 22px; color: #9ca3af; font-size: .78rem; text-align: center; }
.auth-foot a { color: #6b7280; }
.auth-shell a:focus-visible, .auth-shell button:focus-visible { outline: 3px solid rgba(17, 162, 95, .45); outline-offset: 2px; }

/* Short desktop screens: drop the device picture so the panel fits without scrolling */
@media (min-width: 992px) and (max-height: 740px) { .auth-panel-visual { display: none; } }
/* Small laptops (992–1199px): the features stack in one column, so drop the picture earlier */
@media (min-width: 992px) and (max-width: 1199.98px) and (max-height: 820px) { .auth-panel-visual { display: none; } }
@media (min-width: 992px) and (max-height: 940px) { .auth-panel-visual img { max-width: 360px; } .auth-panel-visual { margin-bottom: 18px; } }

/* ---- Tablet / phone ---- */
@media (max-width: 1199.98px) {
    .auth-panel-inner { padding: 40px 40px; }
    .auth-panel-list { grid-template-columns: 1fr; }
}
@media (max-width: 991.98px) {
    .auth-shell { flex-direction: column-reverse; min-height: 0; }
    .auth-panel { flex-basis: auto; max-width: none; }
    .auth-panel-inner { padding: 40px 24px 44px; max-width: 640px; }
    .auth-panel-logo { display: none; }
    .auth-panel .auth-panel-title { font-size: 1.4rem; }
    .auth-panel-visual img { margin: 0 auto; max-width: 440px; }
    .auth-panel-list { grid-template-columns: 1fr 1fr; }
    .auth-main { padding: 28px 16px 36px; justify-content: flex-start; min-height: 0; }
}
@media (max-width: 575.98px) {
    .auth-card { padding: 28px 20px; border-radius: 14px; }
    .auth-panel-list { grid-template-columns: 1fr; }
    .auth-new { grid-template-columns: 1fr; }
}

/* Very narrow phones (≤ 380px): the reCAPTCHA v2 widget is a fixed 304px wide, so scale it to fit the card. */
@media (max-width: 380px) {
    .auth-main { padding-left: 12px; padding-right: 12px; }
    .auth-card { padding: 24px 16px; }
    .auth-card .auth-title { font-size: 1.45rem; }
    .auth-card .g-recaptcha { transform: scale(.84); transform-origin: 0 0; height: 66px; }
    .auth-panel-inner { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 340px) { .auth-card .g-recaptcha { transform: scale(.78); height: 61px; } }

/* ---- No page scroll on laptops and desktops (client, 2026-11-16) ----
   From 992px wide the page is exactly one screen high; the panel and the form compact
   step by step on shorter screens so everything still fits. Phones and tablets stack the
   form and the panel, so they scroll as normal. */
@media (min-width: 992px) {
    html, body { height: 100%; overflow: hidden; }
    .auth-shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
    .auth-panel, .auth-main { height: 100%; overflow: hidden; }
    .auth-main { padding-top: 24px; padding-bottom: 24px; }
}
@media (min-width: 992px) and (max-height: 820px) {
    .auth-card-head { margin-bottom: 16px; padding-bottom: 14px; }
    .auth-card-logo img { width: 108px; }
    .auth-card .auth-title { margin-bottom: 16px; }
    .auth-panel-inner { padding-top: 24px; padding-bottom: 24px; }
    .auth-panel-logo { margin-bottom: 16px; }
    .auth-panel-list { gap: 10px 20px; margin-bottom: 18px; }
    .auth-card { padding: 26px 30px; }
    .auth-card .form-group { margin-bottom: 12px; }
    .auth-card .form-control { height: 44px; }
    .auth-card .btn-auth { height: 46px; }
    .auth-divider { margin: 16px 0 12px; }
    .auth-help { margin-top: 14px; }
    .auth-foot { margin-top: 12px; }
}
@media (min-width: 992px) and (max-height: 720px) {
    /* keep each feature's title, drop its description (a text node next to <strong>) */
    .auth-panel-list span { font-size: 0; line-height: 0; }
    .auth-panel-list strong { font-size: .9rem; line-height: 1.35; }
    .auth-panel-list li { align-items: center; }
    .auth-panel-list strong { margin: 0; }
    .auth-foot { display: none; }
}
@media (min-width: 992px) and (max-height: 620px) {
    .auth-card-logo img { width: 96px; }
    .auth-card { padding-top: 20px; padding-bottom: 20px; }
    .auth-card-head { margin-bottom: 12px; padding-bottom: 10px; }
    .auth-card .auth-title { font-size: 1.4rem; margin-bottom: 12px; }
    .auth-panel-lead, .auth-panel-orgs .auth-panel-label { display: none; }
    .auth-help { display: none; }
    .auth-new a { height: 40px; }
}

/* The admin theme (assets/css/style.css) sets `.btn:not(...):hover/:focus/:active { background-color: white;
   border-color: transparent !important }` with higher specificity, which turned the green Sign in button fully
   white (white text on white) on hover or click. Restate the colours for every state on these pages. */
.auth-card .btn.btn-auth,
.auth-card .btn.btn-auth:not(.btn-social):not(.btn-social-icon):hover,
.auth-card .btn.btn-auth:not(.btn-social):not(.btn-social-icon):focus,
.auth-card .btn.btn-auth:not(.btn-social):not(.btn-social-icon):active { color: #fff !important; }
.auth-card .btn.btn-auth { background-color: #11A25F; border-color: #11A25F !important; }
.auth-card .btn.btn-auth:not(.btn-social):not(.btn-social-icon):hover,
.auth-card .btn.btn-auth:not(.btn-social):not(.btn-social-icon):focus,
.auth-card .btn.btn-auth:not(.btn-social):not(.btn-social-icon):active { background-color: #0c7f4a !important; border-color: #0c7f4a !important; }
.auth-card .btn.btn-auth:not(.btn-social):not(.btn-social-icon):focus { box-shadow: 0 0 0 3px rgba(17, 162, 95, .3) !important; }
/* Show/hide password button keeps its grey border and light hover */
.auth-card .input-group-append .btn:not(.btn-social):not(.btn-social-icon) { border-color: #d1d5db !important; background-color: #fff; color: #4b5563; }
.auth-card .input-group-append .btn:not(.btn-social):not(.btn-social-icon):hover,
.auth-card .input-group-append .btn:not(.btn-social):not(.btn-social-icon):focus,
.auth-card .input-group-append .btn:not(.btn-social):not(.btn-social-icon):active { background-color: #f3f4f6 !important; border-color: #d1d5db !important; color: #111827; }
