/* ================================================================
   ieERP LOGIN PAGE  —  Ported from ieerp React design
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');


/* ── Root ───────────────────────────────────────────────────────── */
.lp-root {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: "Google Sans", system-ui, -apple-system, sans-serif;
    font-optical-sizing: auto;
    font-variation-settings: "GRAD" 0;
}

/* ================================================================
   LEFT PANEL  —  light blue-white gradient
   ================================================================ */
.lp-left {
    position: relative;
    flex: 0 0 50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(160deg, #ddeeff 0%, #eef6ff 40%, #f5faff 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


/* Headline block */
.lp-headline {
    padding: 2.5rem 2.25rem 0;
    flex-shrink: 0;
    z-index: 2;
}

.lp-title {
    font-size: clamp(1.9rem, 3.5vw, 3.25rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin: 0 0 0.85rem 0;
}

.lp-accent {
    color: #063879;
}

.lp-sub {
    font-size: clamp(0.82rem, 1.05vw, 0.97rem);
    color: #334155;
    line-height: 1.65;
    margin: 0 0 1.1rem 0;
}


/* Illustration — fills remaining space, no crop */
.lp-illus-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    padding-bottom: 3.5rem;
}

.lp-illus {
    width: 95%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    transform: scale(1.05);
    transform-origin: bottom center;
    display: block;
}


/* ================================================================
   RIGHT PANEL  —  rich blue gradient background
   ================================================================ */
.lp-right {
    flex: 0 0 50%;
    width: 50%;
    height: 100%;
    background: #063879;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Decorative light shapes in top-right corner */
.lp-right::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.lp-right::after {
    content: '';
    position: absolute;
    top: 40px;
    right: -30px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

/* Top bar */
.lp-topbar {
    display: flex;
    justify-content: flex-end;
    padding: 1.25rem 2rem;
    flex-shrink: 0;
    z-index: 1;
}

/* Need Help */
.lp-need-help {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.83rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.lp-need-help:hover {
    color: #ffffff;
}

.lp-need-help .bi {
    font-size: 1rem;
}

/* Card wrapper — flex-grow to center the card */
.lp-card-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    z-index: 1;
    min-height: 0;
    overflow-y: auto;
}

/* White floating card */
.lp-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: none;
    padding: 0.5rem 2.25rem 1.5rem;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo inside card */
.lp-card-logo-wrap {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.lp-card-logo {
    width: 100%;
    max-width: 220px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Card headings */
.lp-welcome {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.02em;
    text-align: center;
}

.lp-welcome-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1.75rem 0;
    text-align: center;
}

/* Form */
.lp-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Input field */
.lp-field {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.lp-field-icon {
    position: absolute;
    left: 13px;
    font-size: 0.88rem;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.lp-input {
    width: 100%;
    height: 46px;
    padding: 0 2.75rem 0 2.5rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #334155;
    background: #ffffff;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.lp-input::placeholder {
    color: #94a3b8;
}

.lp-input:focus {
    border-color: #063879;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Eye toggle */
.lp-eye-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    padding: 0;
    transition: color 0.2s;
    z-index: 1;
}

.lp-eye-btn:hover {
    color: #063879;
}

/* Options row */
.lp-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -0.1rem;
}

.lp-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.8rem;
    cursor: pointer;
}

    .lp-remember input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: #063879;
    }

/* Primary Sign In button */
.lp-btn-primary {
    width: 100%;
    height: 46px;
    background: #063879;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    letter-spacing: 0.01em;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.lp-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.lp-btn-primary:active:not(:disabled) {
    background: #1e40af;
    transform: translateY(0);
}

.lp-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading state (used by login.js) */
.lp-btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Spinner */
.lp-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: lp-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes lp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer bar */
.lp-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 2rem;
    z-index: 1;
}

.lp-footer-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
}

.lp-footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s;
}

.lp-footer-links a:hover {
    color: #ffffff;
}

.lp-footer-links span {
    color: rgba(255, 255, 255, 0.35);
}

.lp-footer-copy {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .lp-left {
        display: none;
    }

    .lp-right {
        flex: 0 0 100%;
        width: 100%;
    }

    .lp-card {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }

    .lp-footer {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .lp-card {
        padding: 1.5rem 1.25rem;
    }

    .lp-topbar {
        padding: 1rem 1.25rem;
    }

    .lp-card-wrap {
        padding: 0 1rem;
    }
}

/* ── Reduced Motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
