/* ==========================================================================
   Login page redesign — scoped to .lp-wrap so nothing collides with
   Bootstrap / Tailwind(prefixed tw-) / AdminLTE styles.
   Tokens drive color, spacing, radius; themes cascade through custom props.
   ========================================================================== */

.lp-wrap {
    /* Design tokens */
    --lp-primary-700: #4338ca;
    --lp-primary-600: #4f46e5;
    --lp-primary-500: #6366f1;
    --lp-accent-600:  #2563eb;
    --lp-accent-500:  #3b82f6;
    --lp-text:        #0f172a;
    --lp-text-muted:  #64748b;
    --lp-border:      #e2e8f0;
    --lp-surface:     #ffffff;
    --lp-danger:      #dc2626;
    --lp-ring:        rgba(99, 102, 241, 0.28);
    --lp-radius-lg:   20px;
    --lp-radius-md:   12px;
    --lp-radius-sm:   10px;
    --lp-space-1: 4px; --lp-space-2: 8px; --lp-space-3: 12px;
    --lp-space-4: 16px; --lp-space-5: 20px; --lp-space-6: 24px;
    --lp-space-8: 32px; --lp-space-10: 40px;
    --lp-font: inherit;

    font-family: var(--lp-font);
    color: var(--lp-text);
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--lp-space-6) var(--lp-space-3);
}

/* ---------- Card shell ---------- */
.lp-card {
    width: 100%;
    max-width: 940px;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    background: var(--lp-surface);
    border-radius: var(--lp-radius-lg);
    box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.35),
                0 4px 12px -4px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

/* ---------- Hero / brand panel ---------- */
.lp-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--lp-space-5);
    padding: var(--lp-space-10) var(--lp-space-8);
    background: linear-gradient(150deg, var(--lp-primary-600) 0%, var(--lp-accent-500) 100%);
    color: #fff;
    overflow: hidden;
}

/* decorative blobs */
.lp-hero::before,
.lp-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.lp-hero::before {
    width: 260px; height: 260px;
    inset-block-start: -90px;
    inset-inline-end: -90px;
}
.lp-hero::after {
    width: 180px; height: 180px;
    inset-block-end: -60px;
    inset-inline-start: -60px;
}

.lp-hero > * { position: relative; z-index: 1; }

.lp-brand {
    display: flex;
    align-items: center;
    gap: var(--lp-space-3);
}
.lp-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 6px;
}
.lp-brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}
.lp-hero-tag {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 32ch;
}
.lp-hero-points {
    list-style: none;
    margin: var(--lp-space-2) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--lp-space-3);
}
.lp-hero-points li {
    display: flex;
    align-items: center;
    gap: var(--lp-space-3);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.92);
}
.lp-hero-points svg { flex: 0 0 auto; }

/* ---------- Form panel ---------- */
.lp-body {
    padding: var(--lp-space-10) var(--lp-space-8);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lp-heading { margin: 0 0 var(--lp-space-1); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.lp-subheading { margin: 0 0 var(--lp-space-6); font-size: 0.9rem; color: var(--lp-text-muted); }

/* ---------- Fields ---------- */
.lp-field { margin-block-end: var(--lp-space-4); }

.lp-field > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--lp-text);
    margin-block-end: var(--lp-space-2);
}

.lp-field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--lp-space-3);
}

.lp-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--lp-primary-600);
    text-decoration: none;
}
.lp-link:hover, .lp-link:focus { color: var(--lp-primary-700); text-decoration: underline; }

.lp-input-wrap { position: relative; display: flex; align-items: center; }

.lp-input-wrap .lp-icon {
    position: absolute;
    inset-inline-start: 14px;
    color: #94a3b8;
    pointer-events: none;
    display: flex;
}

.lp-input {
    width: 100%;
    height: 48px;
    padding-block: 0;
    padding-inline-start: 44px;
    padding-inline-end: 44px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--lp-text);
    background: #f8fafc;
    border: 1.5px solid var(--lp-border);
    border-radius: var(--lp-radius-md);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.lp-input::placeholder { color: #94a3b8; font-weight: 400; }
.lp-input:hover { border-color: #cbd5e1; }
.lp-input:focus {
    background: #fff;
    border-color: var(--lp-primary-500);
    box-shadow: 0 0 0 4px var(--lp-ring);
}
.lp-input[aria-invalid="true"] {
    border-color: var(--lp-danger);
}
.lp-input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.lp-eye {
    position: absolute;
    inset-inline-end: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}
.lp-eye:hover { color: var(--lp-text); background: #f1f5f9; }
.lp-eye:focus-visible {
    outline: 2px solid var(--lp-primary-500);
    outline-offset: 2px;
}

.lp-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-block-start: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--lp-danger);
}

/* ---------- Remember me ---------- */
.lp-remember {
    display: flex;
    align-items: center;
    gap: var(--lp-space-2);
    margin-block-end: var(--lp-space-5);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--lp-text);
    width: fit-content;
}
.lp-remember input[type="checkbox"] {
    width: 18px; height: 18px;
    margin: 0;
    accent-color: var(--lp-primary-600);
    cursor: pointer;
}

/* ---------- Submit ---------- */
.lp-submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: var(--lp-radius-md);
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(90deg, var(--lp-primary-500), var(--lp-accent-500));
    transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
    box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.6);
}
.lp-submit:hover { filter: brightness(1.06); }
.lp-submit:active { transform: translateY(1px); filter: brightness(0.95); }
.lp-submit:focus-visible {
    outline: 3px solid var(--lp-ring);
    outline-offset: 2px;
}

/* ---------- Footer ---------- */
.lp-foot {
    margin-block-start: var(--lp-space-6);
    text-align: center;
    font-size: 0.85rem;
    color: var(--lp-text-muted);
}
.lp-foot .lp-link { font-size: 0.85rem; }

/* ---------- reCAPTCHA centering ---------- */
.lp-recaptcha { margin-block-end: var(--lp-space-4); }
.lp-recaptcha .g-recaptcha { display: inline-block; }

/* ---------- Demo shops strip ---------- */
.lp-demo {
    width: 100%;
    max-width: 940px;
    margin-block-start: var(--lp-space-5);
    background: var(--lp-surface);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius-lg);
    padding: var(--lp-space-5) var(--lp-space-6);
    box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.15);
}
.lp-demo .box { background: transparent; box-shadow: none; margin-bottom: 0; }
.lp-demo .box-header { border: 0; }
.lp-demo h4 { color: var(--lp-text); }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .lp-card { grid-template-columns: 1fr; max-width: 440px; }
    .lp-hero { display: none; }
    .lp-body { padding: var(--lp-space-8) var(--lp-space-6); }
}
