/* ===== SaaS Login Page ===== */
body#kt_body {
    background: #f4f5fb;
}

.lg-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

/* ===== Decorative background blobs ===== */
.lg-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
}

.lg-bg-blob-1 {
    width: 440px;
    height: 440px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    top: -180px;
    left: -140px;
}

.lg-bg-blob-2 {
    width: 380px;
    height: 380px;
    background: linear-gradient(135deg, #2dd4bf, #4f46e5);
    bottom: -160px;
    right: -120px;
}

.lg-bg-blob-3 {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    top: 12%;
    right: 8%;
    opacity: 0.25;
}

.lg-bg-blob-4 {
    width: 240px;
    height: 240px;
    background: linear-gradient(135deg, #38bdf8, #4f46e5);
    bottom: 8%;
    left: 6%;
    opacity: 0.22;
}

.lg-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    min-height: 600px;
    display: flex;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.12);
    overflow: hidden;
}

/* ===== Brand panel ===== */
.lg-brand-panel {
    flex: 1 1 45%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    background-image:
        radial-gradient(circle at 18% 85%, rgba(255, 255, 255, 0.08) 0, transparent 45%),
        linear-gradient(135deg, #4f46e5, #7c3aed);
    position: relative;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    overflow: hidden;
}

.lg-brand-panel::before,
.lg-brand-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.lg-brand-panel::before {
    width: 280px;
    height: 280px;
    top: -110px;
    right: -90px;
}

.lg-brand-panel::after {
    width: 200px;
    height: 200px;
    bottom: -70px;
    left: -60px;
    background: rgba(255, 255, 255, 0.06);
}

.lg-brand-top,
.lg-brand-features,
.lg-brand-footer {
    position: relative;
    z-index: 1;
}

.lg-brand-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 16px;
    padding: 10px 18px;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.lg-brand-logo-img {
    display: block;
    width: 140px;
    height: auto;
}

.lg-brand-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.lg-brand-text {
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.7;
    max-width: 320px;
    margin: 0;
}

.lg-brand-features {
    list-style: none;
    padding: 0;
    margin: 36px 0 0;
}

.lg-brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    margin-bottom: 14px;
    opacity: 0.95;
}

.lg-brand-features li i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.lg-brand-footer {
    font-size: 12px;
    opacity: 0.7;
}

/* ===== Brand stat chips ===== */
.lg-brand-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.lg-stat-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 10px 14px;
    backdrop-filter: blur(6px);
}

.lg-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.lg-stat-title {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    line-height: 1.4;
}

.lg-stat-value {
    font-size: 13px;
    color: #fff;
    font-weight: 800;
    line-height: 1.4;
}

/* ===== Form panel ===== */
.lg-form-panel {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
}

.lg-form-wrap {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    animation: lgFadeIn .5s ease both;
}

@keyframes lgFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lg-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #7c3aed;
    background: #f5f3ff;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.lg-mobile-logo {
    display: none;
}

.lg-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.lg-subtitle {
    font-size: 13.5px;
    color: #64748b;
    margin-bottom: 0;
}

.lg-header {
    margin-bottom: 28px;
}

.lg-alert {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ===== Form controls ===== */
.lg-form-group {
    margin-bottom: 18px;
}

.lg-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.lg-input-wrap {
    position: relative;
}

.lg-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    background: #f8fafc;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.lg-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
    background: #fff;
}

.lg-input.pr-5 {
    padding-right: 44px;
}

.lg-pin-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 12px;
    font-weight: 700;
}

.lg-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 13px 20px;
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
    transition: transform .15s, box-shadow .15s;
}

.lg-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.32);
    color: #fff;
}

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

.lg-link {
    color: #7c3aed;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.lg-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* ===== Account chooser ===== */
.lg-account-list {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lg-account-item {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
    animation: lgFadeIn .4s ease both;
}

.lg-account-item:nth-child(2) { animation-delay: .05s; }
.lg-account-item:nth-child(3) { animation-delay: .1s; }
.lg-account-item:nth-child(4) { animation-delay: .15s; }
.lg-account-item:nth-child(5) { animation-delay: .2s; }

.lg-account-item:hover {
    border-color: #c7d2fe;
    background: #f5f3ff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.12);
}

.lg-account-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.lg-account-info {
    flex: 1;
    min-width: 0;
}

.lg-account-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.lg-account-name span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lg-account-pin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    font-size: 9px;
    flex-shrink: 0;
}

.lg-account-email {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lg-account-remove {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}

.lg-account-remove:hover {
    background: #fee2e2;
    color: #ef4444;
}

.lg-account-other {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1.5px dashed #c7d2fe;
    border-radius: 14px;
    padding: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #7c3aed;
    cursor: pointer;
    transition: background .15s;
}

.lg-account-other:hover {
    background: #f5f3ff;
}

/* ===== Quick PIN view ===== */
.lg-pin-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
}

.lg-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 18px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.lg-back-link:hover {
    color: #4f46e5;
}

/* ===== Misc form bits ===== */
.lg-form-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 8px;
}

.lg-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.lg-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #7c3aed;
    cursor: pointer;
}

.lg-page-footer {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 28px;
}

.toggle-password {
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
    cursor: pointer;
}

.toggle-password:hover {
    color: #7c3aed;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .lg-shell {
        flex-direction: column;
        max-width: 460px;
        min-height: auto;
    }

    .lg-brand-panel {
        padding: 32px 28px;
    }

    .lg-brand-logo-badge {
        margin-bottom: 18px;
        padding: 8px 14px;
    }

    .lg-brand-logo-img {
        width: 110px;
    }

    .lg-brand-text,
    .lg-brand-features,
    .lg-brand-stats {
        display: none;
    }

    .lg-form-panel {
        padding: 32px 28px;
    }
}

@media (max-width: 480px) {
    .lg-page {
        padding: 0;
    }

    .lg-bg-blob {
        display: none;
    }

    .lg-shell {
        border-radius: 0;
        min-height: 100vh;
    }

    .lg-brand-panel {
        padding: 28px 22px;
    }

    .lg-brand-title {
        font-size: 22px;
    }

    .lg-form-panel {
        padding: 28px 22px;
        justify-content: flex-start;
        padding-top: 40px;
    }
}

/* Install app (PWA) */
.lg-install {
    width: 100%;
    max-width: 380px;
    margin: 18px auto 0;
    text-align: center;
}

.lg-install[hidden],
.lg-install [hidden] {
    display: none !important;
}

.lg-install-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1.5px solid #c7d2fe;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #4f46e5;
    background: #eef2ff;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.lg-install-btn:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
}

.lg-ios-guide {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 90px;
}

.lg-ios-guide.lg-ios-top {
    padding: 90px 16px 16px;
}

.lg-ios-card {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px 20px;
    text-align: left;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

.lg-ios-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: 0;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #94a3b8;
}

.lg-ios-logo {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.lg-ios-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 16px;
}

.lg-ios-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #1e293b;
    padding: 10px 0;
    border-top: 1px solid #f1f5f9;
}

.lg-ios-num {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lg-ios-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lg-ios-pill {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 14px;
}

.lg-ios-arrow {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    animation: lgIosBounce 1s ease-in-out infinite;
}

.lg-ios-top .lg-ios-arrow {
    bottom: auto;
    top: 18px;
    left: auto;
    right: 24px;
    transform: rotate(180deg);
    animation-name: lgIosBounceUp;
}

@keyframes lgIosBounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 12px); }
}

@keyframes lgIosBounceUp {
    0%, 100% { transform: rotate(180deg) translateY(0); }
    50% { transform: rotate(180deg) translateY(12px); }
}
