/* Sign-in page on the house kit. Brand colours arrive as --brand-a / --brand-b from the template;
   everything else is the shared palette (teal primary, ink text, soft ground). The page keeps the
   form ids/names the index route and the reset-password script rely on. */

:root {
    --lg-teal: #0e5e73;
    --lg-teal-dark: #0b4c5e;
    --lg-green: #2c7a50;
    --lg-ink: #14232a;
    --lg-muted: #47606a;
    --lg-muted-2: #7c8a91;
    --lg-line: #e3e6e8;
    --lg-line-2: #eef1f2;
    --lg-ground: #f7f9fa;
    --brand-a: #0e5e73;
    --brand-b: #0b4c5e;
}

html, body { height: 100%; }
body.lg-page {
    margin: 0;
    background: var(--lg-ground);
    color: var(--lg-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.45;
}

/* brand band behind the card */
.lg-backdrop {
    position: fixed; top: 0; left: 0; right: 0; height: 46vh; min-height: 300px; z-index: 0;
    background: linear-gradient(135deg, var(--brand-a) 0%, var(--brand-b) 100%);
}
.lg-backdrop::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 120px;
    background: linear-gradient(to bottom, rgba(247,249,250,0) 0%, var(--lg-ground) 100%);
}

.lg-wrap {
    position: relative; z-index: 1;
    min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 48px 16px 32px; box-sizing: border-box;
}

.lg-card {
    width: 100%; max-width: 420px; box-sizing: border-box;
    background: #fff; border: 1px solid var(--lg-line); border-radius: 16px;
    box-shadow: 0 24px 64px rgba(20, 35, 42, .22);
    padding: 32px 32px 26px;
}
.lg-logo { display: flex; justify-content: center; margin: 0 0 22px; }
.lg-logo img { max-height: 76px; max-width: 100%; width: auto; display: block; }
.lg-logo img.is-tall { max-height: 110px; }

.lg-head { margin: 0 0 18px; text-align: center; }
.lg-head h1 { margin: 0; font-size: 20px; font-weight: 700; color: var(--lg-ink); letter-spacing: -.01em; }
.lg-head p { margin: 4px 0 0; font-size: 13px; color: var(--lg-muted); }

.lg-field { margin: 0 0 14px; }
.lg-lbl {
    display: block; margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lg-muted-2);
}
.lg-page .form-control, .lg-page .lg-input {
    display: block; width: 100%; height: 42px; box-sizing: border-box; margin: 0;
    padding: 0 12px; border: 1px solid var(--lg-line); border-radius: 9px; background: #fff;
    color: var(--lg-ink); font-size: 15px; font-family: inherit; box-shadow: none; -webkit-appearance: none; appearance: none;
    transition: border-color .15s, box-shadow .15s;
}
.lg-page .form-control::placeholder, .lg-page .lg-input::placeholder { color: #9aa7ad; }
.lg-page .form-control:focus, .lg-page .lg-input:focus {
    outline: none; border-color: var(--lg-teal); box-shadow: 0 0 0 3px rgba(14, 94, 115, .14);
}
.lg-page #inputEmail, .lg-page #dealer-reset { text-transform: capitalize; }
.lg-page #mfaCode { text-align: center; letter-spacing: .3em; font-size: 20px; font-variant-numeric: tabular-nums; }

.lg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; box-sizing: border-box;
    margin: 6px 0 0; padding: 0 16px; border: 1px solid var(--lg-teal); border-radius: 10px; background: var(--lg-teal); color: #fff;
    font-size: 14px; font-weight: 700; font-family: inherit; letter-spacing: .01em; cursor: pointer; user-select: none;
    transition: background .15s, border-color .15s, transform .05s;
}
.lg-btn:hover, .lg-btn:focus { background: var(--lg-teal-dark); border-color: var(--lg-teal-dark); color: #fff; outline: none; text-decoration: none; }
.lg-btn:active { transform: translateY(1px); }
.lg-btn[disabled] { opacity: .5; cursor: default; transform: none; }
.lg-btn.is-green { background: var(--lg-green); border-color: var(--lg-green); }
.lg-btn.is-green:hover, .lg-btn.is-green:focus { background: #246642; border-color: #246642; }
.lg-btn.is-ghost { background: #fff; border-color: var(--lg-line); color: var(--lg-muted); width: auto; height: 38px; font-weight: 600; }
.lg-btn.is-ghost:hover, .lg-btn.is-ghost:focus { background: var(--lg-ground); color: var(--lg-ink); border-color: var(--lg-line); }

.lg-links { display: flex; justify-content: center; margin: 16px 0 0; font-size: 13px; }
.lg-links a { color: var(--lg-teal); font-weight: 600; text-decoration: none; }
.lg-links a:hover, .lg-links a:focus { color: var(--lg-teal-dark); text-decoration: underline; }

.lg-mfa-note {
    margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: #e7f2f5; border: 1px solid #cfe3e9;
    color: var(--lg-muted); font-size: 13px; line-height: 1.45; text-align: center;
}
.lg-mfa-note b { color: var(--lg-ink); }

.lg-foot { margin: 18px 0 0; font-size: 12px; color: var(--lg-muted-2); text-align: center; }
.lg-foot a { color: inherit; text-decoration: none; }

/* reset-password dialog (bootstrap 3 modal, restyled) */
.lg-page .modal-content { border: 0; border-radius: 16px; box-shadow: 0 24px 64px rgba(20, 35, 42, .3); overflow: hidden; }
.lg-page .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--lg-line); background: #f4f7f8; }
.lg-page .modal-header .modal-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--lg-ink); }
.lg-page .modal-header .close {
    float: none; margin: 0; padding: 0; width: 32px; height: 32px; border-radius: 8px; opacity: 1; color: var(--lg-muted-2); font-size: 22px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; text-shadow: none; border: 0; background: transparent;
}
.lg-page .modal-header .close:hover { background: var(--lg-line-2); color: var(--lg-ink); }
.lg-page .modal-body { padding: 20px 20px 4px; }
.lg-page .modal-body p.lg-help { margin: 0 0 16px; font-size: 13px; color: var(--lg-muted); }
.lg-page .modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; border-top: 0; }
.lg-page .modal-footer .lg-btn { width: auto; margin: 0; height: 40px; padding: 0 18px; }
.lg-page .modal-dialog { margin: 40px auto; max-width: 440px; }

/* the old sweetalert in this page keeps its own markup; soften the box */
.lg-page .swal2-popup { border-radius: 14px; font-family: inherit; }
.lg-page .swal2-title { color: var(--lg-ink); font-size: 20px; }
.lg-page .swal2-content { color: var(--lg-muted); font-size: 14px; }
.lg-page .swal2-confirm.swal2-styled { background: var(--lg-teal) !important; border-radius: 9px; box-shadow: none; }

@media (max-width: 480px) {
    .lg-wrap { padding: 28px 16px 24px; justify-content: flex-start; }
    .lg-backdrop { height: 34vh; min-height: 220px; }
    .lg-card { padding: 26px 20px 20px; border-radius: 14px; }
    .lg-logo img { max-height: 64px; }
    .lg-page .modal-dialog { margin: 16px; max-width: none; }
}
