/* ==============================================
   M/S. R. P. Enterprise – Lens ERP Login Page
   ============================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:       #1a56db;
    --primary-dark:  #1343b4;
    --primary-light: #eff4ff;
    --text-dark:     #111827;
    --text-mid:      #374151;
    --text-muted:    #6b7280;
    --border:        #d1d5db;
    --bg-input:      #f9fafb;
    --bg-left:       #0f2057;
    --white:         #ffffff;
    --danger:        #dc2626;
    --success:       #16a34a;
    --radius:        10px;
    --shadow-card:   0 4px 24px rgba(0,0,0,.10);
}

html, body {
    height: 100%;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    background: #f1f5f9;
}

/* ---- Page layout ---- */
.login-page {
    display: flex;
    min-height: 100vh;
}

/* =====================
   LEFT PANEL
   ===================== */
.lp-left {
    width: 44%;
    background: var(--bg-left);
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(26,86,219,.35) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(15,32,87,.6) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
}

/* subtle grid texture */
.lp-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.lp-left-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

/* Brand mark */
.brand-mark {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 52px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .01em;
}

.brand-tag {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,.55);
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* Tagline */
.lp-tagline {
    margin-bottom: 44px;
}

.lp-tagline h1 {
    font-size: 30px;
    font-weight: 400;
    color: rgba(255,255,255,.75);
    line-height: 1.4;
    margin-bottom: 14px;
}

.lp-tagline h1 strong {
    font-weight: 700;
    color: #fff;
}

.lp-tagline p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,.5);
}

/* Feature list */
.lp-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 52px;
}

.lp-features li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.feat-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: rgba(255,255,255,.8);
    flex-shrink: 0;
    margin-top: 2px;
}

.lp-features li div strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    margin-bottom: 2px;
}

.lp-features li div small {
    font-size: 12px;
    color: rgba(255,255,255,.45);
}

/* Footer note */
.lp-footer-note {
    font-size: 12px;
    color: rgba(255,255,255,.3);
}

/* =====================
   RIGHT PANEL
   ===================== */
.lp-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--white);
}

.lp-form-wrap {
    width: 100%;
    max-width: 400px;
}

/* Mobile brand (hidden on desktop) */
.mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.mobile-brand .brand-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
}

.mobile-brand span {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Form header */
.lp-form-header {
    margin-bottom: 32px;
}

.lp-form-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.lp-form-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ---- Field group ---- */
.field-group {
    margin-bottom: 20px;
}

.field-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    margin-bottom: 7px;
}

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

.field-icon {
    position: absolute;
    left: 13px;
    font-size: 17px;
    color: var(--text-muted);
    pointer-events: none;
    line-height: 1;
}

.field-input {
    width: 100%;
    height: 46px;
    padding: 0 42px 0 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
}

.field-input::placeholder {
    color: #9ca3af;
}

.field-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,86,219,.10);
}

.toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color .2s;
}

.toggle-pass:hover { color: var(--primary); }

/* ---- Options row ---- */
.form-opts {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Custom checkbox */
.remember-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-mid);
    user-select: none;
}

.remember-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.link-forgot {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: color .2s;
}

.link-forgot:hover { color: var(--primary-dark); }

/* ---- Submit button ---- */
.btn-signin {
    width: 100%;
    height: 46px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, box-shadow .2s, transform .15s;
    margin-bottom: 20px;
    font-family: inherit;
    letter-spacing: .01em;
}

.btn-signin:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(26,86,219,.30);
    transform: translateY(-1px);
}

.btn-signin:active { transform: translateY(0); }

.btn-loader { display: none; font-size: 18px; animation: spin .7s linear infinite; }

.btn-signin.loading .btn-label { display: none; }
.btn-signin.loading .btn-loader { display: inline-flex; }

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

/* ---- Secure note ---- */
.lp-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.lp-secure i { font-size: 14px; color: var(--success); }

/* ---- Alerts ---- */
#alert-container { margin-bottom: 16px; }

.lp-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.lp-alert i { font-size: 18px; flex-shrink: 0; }

.lp-alert button {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: .6;
    flex-shrink: 0;
}

.lp-alert button:hover { opacity: 1; }

.lp-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.lp-alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 900px) {
    .lp-left { width: 38%; padding: 48px 36px; }
    .lp-tagline h1 { font-size: 24px; }
}

@media (max-width: 700px) {
    .login-page { flex-direction: column; }
    .lp-left { display: none; }
    .lp-right { padding: 40px 24px; }
    .mobile-brand { display: flex; }
    .lp-form-wrap { max-width: 100%; }
}
