/* ==========================================
   Portal Fundaciones — Login split-screen
   Inspirado en el login del backoffice PS9 (saydev.tech/admin-rompoda)
   Paleta Rompoda azul · WebGL gradient panel derecho
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;700&display=swap');

:root {
    --rp-primary: #2563EB;
    --rp-primary-dark: #1D4ED8;
    --rp-primary-light: #60A5FA;
    --rp-primary-soft: #DBEAFE;
    --rp-primary-bg: #EFF6FF;
    --rp-dark: #0F172A;
    --rp-g700: #334155;
    --rp-g500: #64748B;
    --rp-g400: #94A3B8;
    --rp-g300: #CBD5E1;
    --rp-g200: #E2E8F0;
    --rp-g100: #F1F5F9;
    --rp-g50: #F8FAFC;
}

* { box-sizing: border-box; }

body.rp-login-body {
    margin: 0;
    padding: 0;
    background: #fff;
    font-family: 'DM Sans', sans-serif;
    color: var(--rp-dark);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* --- LAYOUT SPLIT 45 / 55 --- */
.rp-login-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* === LEFT PANEL: FORM (45%) === */
.rp-login-form-side {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px 48px;
    background: #fff;
}

.rp-login-form-inner {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
}

.rp-login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}
.rp-login-logo-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}
.rp-login-logo-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}
.rp-login-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--rp-dark);
    letter-spacing: -.01em;
}

.rp-login-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--rp-dark);
    margin: 0 0 8px;
}

.rp-login-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    color: var(--rp-g500);
    margin: 0 0 28px;
}

/* --- ALERT (error) --- */
.rp-login-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 16px;
    background: #FEF2F2;
    border: 1.5px solid #FECACA;
    color: #DC2626;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    margin-bottom: 20px;
}
.rp-login-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* --- FORM GROUP --- */
.rp-login-group {
    margin-bottom: 18px;
}
.rp-login-label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: var(--rp-g500);
    margin-bottom: 8px;
}

/* --- INPUTS GLASS-STYLE --- */
.rp-login-input {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 1.5px solid rgba(15, 23, 42, .1);
    border-radius: 16px;
    background: rgba(15, 23, 42, .03);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--rp-g700);
    transition: all .2s ease;
    outline: none;
}
.rp-login-input::placeholder { color: var(--rp-g400); }
.rp-login-input:focus {
    border-color: rgba(37, 99, 235, .5);
    background: rgba(37, 99, 235, .04);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

/* --- SUBMIT BUTTON --- */
.rp-login-submit {
    width: 100%;
    height: 54px;
    margin-top: 8px;
    border: none;
    border-radius: 16px;
    background: var(--rp-primary);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all .2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.rp-login-submit:hover {
    background: var(--rp-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, .3);
}
.rp-login-submit:active {
    transform: translateY(0);
}

/* === RIGHT PANEL: GRADIENT (55%) === */
.rp-login-gradient-side {
    flex: 0 0 55%;
    position: relative;
    overflow: hidden;
    background: #fff;
    min-height: 100vh;
}

#rp-gradient-canvas {
    position: absolute;
    inset: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border-radius: 24px;
    z-index: 0;
    opacity: 0;
    transition: opacity .8s ease;
}
#rp-gradient-canvas.isLoaded {
    opacity: 1;
}

/* === FOOTER fixed bottom === */
.rp-login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: transparent;
    text-align: center;
    z-index: 10;
    pointer-events: none;
}
.rp-login-footer span {
    color: var(--rp-g300);
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    opacity: .4;
    transition: opacity .2s;
    pointer-events: auto;
}
.rp-login-footer:hover span { opacity: .8; }

/* === MOBILE <768px === */
@media (max-width: 768px) {
    .rp-login-shell {
        flex-direction: column;
    }

    .rp-login-gradient-side {
        flex: none;
        order: 1;
        min-height: 240px;
        height: 240px;
    }

    .rp-login-form-side {
        order: 2;
        flex: 1;
        padding: 32px 24px;
    }

    .rp-login-title { font-size: 32px; }

    .rp-login-footer { position: relative; }
}
