/* assets/css/fap-styles.css — Modern 2-Column Login UI */

.fap-plugin {
    min-height: 100vh;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ========== SPLIT LAYOUT ========== */
.fap-plugin .fap-split {
    display: flex;
    width: 100%;
    max-width: 920px;
    min-height: 540px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fapFadeIn 0.45s ease-out;
}

/* LEFT — Brand Panel */
.fap-plugin .fap-brand-panel {
    flex: 0 0 42%;
    background: linear-gradient(160deg, #1a2a5e 0%, #1F3C82 40%, #2c4a9a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.fap-plugin .fap-brand-panel::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -30%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.fap-plugin .fap-brand-panel::after {
    content: "";
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.fap-plugin .fap-brand-content {
    position: relative;
    z-index: 1;
}

.fap-plugin .fap-brand-logo {
    height: 51px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 2.75rem;
    filter: brightness(1.05);
}

.fap-plugin .fap-brand-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 0.6rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.fap-plugin .fap-brand-desc {
    font-size: 0.95rem;
    line-height: 1.55;
    opacity: 0.88;
    margin: 0 0 1.5rem;
}

.fap-plugin .fap-brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.fap-plugin .fap-brand-features li {
    position: relative;
    padding-left: 1.35rem;
    margin-bottom: 0.55rem;
    line-height: 1.4;
}

.fap-plugin .fap-brand-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #93c5fd;
}

.fap-plugin .fap-brand-footer {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    opacity: 0.65;
    margin-top: 2rem;
}

/* RIGHT — Form Panel */
.fap-plugin .fap-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2.25rem;
    background: #fff;
}

/* Mobile logo & copyright — hidden on desktop */
.fap-plugin .fap-mobile-logo {
    display: none;
}

.fap-plugin .fap-mobile-copyright {
    display: none;
}

.fap-plugin .fap-header {
    margin-bottom: 1.5rem;
}

.fap-plugin .fap-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.3rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.fap-plugin .fap-subtext {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.fap-plugin .fap-otp-instruction {
    font-size: 0.99rem;
    color: #64748b;
    margin: 0.2rem 0 0;
    line-height: 1.5;
}

.fap-plugin .fap-email-display {
    font-weight: 600;
    color: #1F3C82;
    word-break: break-all;
}

/* Forms */
.fap-plugin .fap-form {
    display: block;
}

.fap-plugin .fap-form.hidden {
    display: none;
}

.fap-plugin .fap-form-inner {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

.fap-plugin .fap-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fap-plugin .fap-field label {
    font-size: 0.99rem;
    font-weight: 600;
    color: #334155;
}

/* Input with icon */
.fap-plugin .fap-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.fap-plugin .fap-input-icon {
    position: absolute;
    left: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s ease;
}

.fap-plugin .fap-input-wrap input {
    padding-left: 2.65rem !important;
}

.fap-plugin .fap-input-wrap:focus-within .fap-input-icon {
    color: #3b5bdb;
}



.fap-plugin .fap-field input,
.fap-plugin .fap-form-inner input[type="email"],
.fap-plugin .fap-form-inner input[type="password"] {
    width: 100%;
    padding: 0.78rem 0.95rem;
    font-size: 0.99rem;
    color: #1e293b;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.fap-plugin .fap-field input::placeholder {
    color: #94a3b8;
}

.fap-plugin .fap-field input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.fap-plugin .fap-field input:focus {
    outline: none;
    border-color: #3b5bdb;
    background: #fff;
    box-shadow: 0 0 0 3.5px rgba(59, 91, 219, 0.15);
}

/* Button */
.fap-plugin .fap-btn {
    width: 100%;
    padding: 0.88rem 1.25rem;
    margin-top: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #1F3C82 0%, #2c4a9a 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 12px rgba(31, 60, 130, 0.28);
    letter-spacing: 0.01em;
}

.fap-plugin .fap-btn:hover {
    background: linear-gradient(135deg, #16306b 0%, #1F3C82 100%);
    box-shadow: 0 6px 18px rgba(31, 60, 130, 0.38);
    transform: translateY(-1px);
}

.fap-plugin .fap-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(31, 60, 130, 0.28);
}

/* Footer links */
.fap-plugin .fap-footer-links {
    text-align: center;
    margin-top: 0.15rem;
    font-size: 0.875rem;
}

.fap-plugin .fap-footer-links a {
    color: #3b5bdb;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.fap-plugin .fap-footer-links a:hover {
    color: #1F3C82;
    text-decoration: underline;
}

.fap-plugin .fap-divider {
    margin: 0 0.4rem;
    color: #94a3b8;
}

/* Messages */
.fap-plugin .fap-message {
    margin: 0;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}

.fap-plugin .fap-message.text-red-600 {
    color: #dc2626 !important;
}

.fap-plugin .fap-message.text-green-600 {
    color: #16a34a !important;
}

/* OTP */
.fap-plugin .fap-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin: 0.15rem 0 0.35rem;
}

.fap-plugin .fap-otp-digit {
    width: 3.25rem !important;
    height: 3.6rem !important;
    text-align: center;
    font-size: 1.55rem;
    font-weight: 600;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #AFBBC9;
    border-radius: 10px;
    padding: 0 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.fap-plugin .fap-otp-digit:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.fap-plugin .fap-otp-digit:focus {
    outline: none;
    border-color: #3b5bdb;
    background: #fff;
    box-shadow: 0 0 0 3.5px rgba(59, 91, 219, 0.15);
}

/* Animation */
@keyframes fapFadeIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fap-plugin .animate-fade-in {
    animation: fapFadeIn 0.3s ease-out;
}

/* Compatibility utilities */
.fap-plugin .fap-text-center { text-align: center; }
.fap-plugin .fap-text-xl {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}
.fap-plugin .fap-copyright {
    display: none;
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
    .fap-plugin {
        padding: 0.75rem;
        align-items: flex-start;
        padding-top: 1.25rem;
        background: #f1f5f9;
    }

    .fap-plugin .fap-split {
        flex-direction: column;
        max-width: 440px;
        min-height: auto;
        border-radius: 16px;
        box-shadow:
            0 4px 6px -1px rgba(0, 0, 0, 0.08),
            0 12px 24px -4px rgba(0, 0, 0, 0.1);
    }

    /* Hide left brand panel completely on mobile */
    .fap-plugin .fap-brand-panel {
        display: none !important;
    }

    /* Show mobile logo at top */
    .fap-plugin .fap-mobile-logo {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.15rem 0 1.35rem;
        margin-bottom: 1.35rem;
        border-bottom: 1px solid #eef0f5;
    }

    .fap-plugin .fap-mobile-logo img {
        height: 56px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    /* Show mobile copyright at bottom */
    .fap-plugin .fap-mobile-copyright {
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: #94a3b8;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid #eef0f5;
        line-height: 1.4;
    }

    .fap-plugin .fap-form-panel {
        padding: 1.35rem 1.35rem 1.5rem;
        justify-content: flex-start;
    }

    .fap-plugin .fap-header {
        margin-bottom: 1.25rem;
    }

    .fap-plugin .fap-heading {
        font-size: 1.45rem;
    }

    .fap-plugin .fap-subtext,
    .fap-plugin .fap-otp-instruction {
        font-size: 0.95rem;
    }

    .fap-plugin .fap-field label {
        font-size: 0.9rem;
    }

    .fap-plugin .fap-mobile-copyright {
        font-size: 0.8rem;
    }

    .fap-plugin .fap-otp-digit {
        width: 2.9rem !important;
        height: 3.35rem !important;
        font-size: 1.35rem;
    }

    .fap-plugin .fap-otp-inputs {
        gap: 0.4rem;
    }
}

@media (max-width: 380px) {
    .fap-plugin .fap-otp-digit {
        width: 2.55rem !important;
        height: 3.05rem !important;
        font-size: 1.25rem;
    }

    .fap-plugin .fap-mobile-logo img {
        height: 50px;
    }
}
