/* MAPXER Customer Portal: sign-in page.
   Brand values mirror mapxer.com (navy #0d1b2a, blue #2563eb, DM Sans). */

.lp, .lp-loading {
    position: fixed;
    inset: 0;
    z-index: 50;
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

.lp-loading { display: flex; align-items: center; justify-content: center; background: #fff; }
.lp-spinner {
    width: 28px; height: 28px; border-radius: 50%;
    border: 3px solid #e2e8f0; border-top-color: #2563eb;
    animation: lp-spin 0.8s linear infinite;
}
@keyframes lp-spin { to { transform: rotate(360deg); } }

.lp {
    display: grid;
    grid-template-columns: minmax(360px, 44%) 1fr;
    background: #fff;
    overflow-y: auto;
}

/* ── Brand panel ─────────────────────────────────────────────────────── */
.lp-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 56px 40px;
    color: #e2e8f0;
    background:
        radial-gradient(circle at 85% 15%, rgba(0, 212, 255, 0.22), transparent 42%),
        radial-gradient(circle at 10% 90%, rgba(37, 99, 235, 0.35), transparent 50%),
        linear-gradient(160deg, #0d1b2a 0%, #13243a 55%, #1b3354 100%);
    overflow: hidden;
}
/* Subtle map-grid texture */
.lp-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    pointer-events: none;
}
.lp-brand-inner { position: relative; margin-top: auto; margin-bottom: auto; max-width: 440px; }
.lp-brand-kicker {
    display: inline-block;
    font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: #7dd3fc; margin-bottom: 18px;
}
.lp-brand-title {
    font-size: 34px; line-height: 1.2; font-weight: 700; color: #fff;
    margin: 0 0 28px;
}
.lp-brand-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.lp-brand-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #cbd5e1; }
.lp-tick {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(56, 189, 248, 0.16); color: #7dd3fc; font-size: 13px; font-weight: 700;
    flex-shrink: 0;
}
.lp-brand-foot { position: relative; font-size: 13px; color: #94a3b8; }
.lp-brand-foot a { color: #7dd3fc; text-decoration: none; }
.lp-brand-foot a:hover { text-decoration: underline; }

/* ── Form panel ──────────────────────────────────────────────────────── */
.lp-form-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 28px;
    background: #f8fafc;
}
.lp-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px 36px 32px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}
.lp-logo { display: block; height: 44px; width: auto; margin: 0 0 28px; }
.lp-title { font-size: 24px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
.lp-sub { font-size: 14px; color: #64748b; margin: 0 0 24px; line-height: 1.5; }

.lp-alert {
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 18px;
}

.lp-field { margin-bottom: 18px; }
.lp-field label {
    display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px;
}
.lp-field input {
    width: 100%; box-sizing: border-box;
    height: 46px; padding: 0 14px;
    font: inherit; font-size: 15px; color: #0f172a;
    background: #fff; border: 1px solid #cbd5e1; border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.lp-field input:focus {
    outline: none; border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}
.lp-field input:disabled { background: #f1f5f9; }

.lp-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.lp-text-link {
    border: none; background: none; padding: 0; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 600; color: #2563eb;
}
.lp-text-link:hover { text-decoration: underline; }
.lp-success {
    background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
    padding: 12px 14px; border-radius: 8px; font-size: 14px; line-height: 1.5; margin-bottom: 8px;
}

.lp-reveal { position: relative; }
.lp-reveal input { padding-right: 70px; }
.lp-reveal-btn {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    border: none; background: transparent; color: #2563eb;
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 6px;
}
.lp-reveal-btn:hover { background: #eff6ff; }

.lp-code { text-align: center; font-size: 22px !important; letter-spacing: 8px; font-variant-numeric: tabular-nums; }

.lp-btn {
    width: 100%; height: 48px; margin-top: 6px;
    border: none; border-radius: 10px; cursor: pointer;
    font: inherit; font-size: 15px; font-weight: 600; color: #fff;
    background: linear-gradient(180deg, #2f6ff0, #2563eb);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
    transition: transform 0.05s, box-shadow 0.15s, background 0.15s;
}
.lp-btn:hover:not(:disabled) { background: linear-gradient(180deg, #2563eb, #1d4ed8); box-shadow: 0 8px 22px rgba(37, 99, 235, 0.34); }
.lp-btn:active:not(:disabled) { transform: translateY(1px); }
.lp-btn:disabled { opacity: 0.7; cursor: default; }

.lp-link {
    display: block; margin: 16px auto 0; border: none; background: none; cursor: pointer;
    font: inherit; font-size: 14px; color: #475569;
}
.lp-link:hover { color: #2563eb; }

.lp-help { margin: 20px 0 0; font-size: 13px; color: #64748b; text-align: center; line-height: 1.5; }
.lp-help a, .lp-legal a { color: #2563eb; text-decoration: none; }
.lp-legal { margin-top: 22px; font-size: 12px; color: #94a3b8; }

/* ── Small screens: stack, compact brand header ─────────────────────── */
@media (max-width: 880px) {
    .lp { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .lp-brand { padding: 28px 24px; }
    .lp-brand-inner { margin: 0; }
    .lp-brand-title { font-size: 22px; margin-bottom: 0; }
    .lp-brand-list { display: none; }
    .lp-form-side { justify-content: flex-start; padding: 28px 16px; }
    .lp-card { padding: 28px 22px 24px; }
}

/* ── Forced password change notice (used on Change Password page) ───── */
.pw-forced {
    border: 1px solid #fde68a; background: #fffbeb; color: #92400e;
    padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; line-height: 1.5;
}
.pw-rules { font-size: 12px; color: #6b7c93; margin-top: 6px; }

/* ── Single-column variant (reset password page) ─────────────────────── */
.lp-single { grid-template-columns: 1fr; }
.lp-btn-link {
    display: flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box;
}
a.lp-link { text-align: center; text-decoration: none; }
.lp-loading-inline { display: flex; justify-content: center; padding: 30px 0; }
