/* =========================================
   LOGIN - CONTROL PRESENCIALIDAD
   Diseño rojo/blanco tipo app
========================================= */

/* Fondo general */
.login-body{
    margin:0;
    padding:30px 20px;
    min-height:100vh;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    font-family:'Segoe UI',sans-serif;
    background:#ffffff;
    overflow-x:hidden;
    overflow-y:auto;
    position:relative;
}

.login-body::before{
    content:"";
    position:fixed;

    top:-250px;
    left:-280px;

    width:1250px;
    height:850px;

    background:
            linear-gradient(
                    135deg,
                    #ff1f1f,
                    #e00000
            );

    border-radius:
            0 0 55% 0;

    transform:
            rotate(-7deg);

    z-index:0;
}
/* =========================================
   CALENDARIO DECORATIVO
========================================= */

.login-calendar{
    position:fixed;
    left:95px;
    bottom:130px;
    width:260px;
    height:210px;
    border:22px solid rgba(255,255,255,.20);
    border-radius:34px;
    z-index:1;
    pointer-events:none;
}

/* Línea horizontal */

.login-calendar::before{
    content:"";
    position:absolute;
    left:0;
    top:44px;
    width:100%;
    height:22px;
    background:rgba(255,255,255,.20);
}

/* Dos "ganchitos" superiores */

.login-calendar::after{
    content:"";
    position:absolute;
    left:50px;
    top:-40px;
    width:130px;
    height:38px;

    border-top:
            22px solid rgba(255,255,255,.20);

    border-left:
            22px solid transparent;

    border-right:
            22px solid transparent;
}

/* Puntitos blancos */
.login-dots{
    position:fixed;
    width:160px;
    height:150px;
    top:48px;
    left:52px;
    background-image:radial-gradient(rgba(255,255,255,.85) 2px, transparent 2px);
    background-size:24px 24px;
    z-index:2;
    pointer-events:none;
}

/* Puntitos rojos */
.login-dots-red{
    position:fixed;
    width:185px;
    height:185px;
    right:115px;
    bottom:115px;
    background-image:radial-gradient(rgba(255,31,31,.75) 2px, transparent 2px);
    background-size:24px 24px;
    z-index:1;
    pointer-events:none;
}

/* Card principal */
.login-container{
    width:100%;
    max-width:430px;
    background:#ffffff;
    border-radius:28px;
    padding:42px 48px;
    box-shadow:0 32px 90px rgba(15,23,42,.18);
    position:relative;
    z-index:5;
}

/* Cabecera */
.login-logo{
    text-align:center;
    margin-bottom:34px;
}

/* =========================================
   LOGO
========================================= */

.logo-circle{
    width:90px;
    height:90px;
    margin:0 auto 20px auto;

    border-radius:50%;
    background:#ff1f1f;

    display:flex;
    align-items:center;
    justify-content:center;

    overflow:hidden;

    box-shadow:
            0 14px 34px rgba(255,31,31,.30);
}

.logo-img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* Título */
.login-title{
    color:#e00000;
    font-size:34px;
    font-weight:900;
    line-height:1.05;
    margin:0 0 10px 0;
    text-transform:uppercase;
    text-align:center;
}

/* Subtítulo */
.login-subtitle{
    color:#64748b;
    font-size:15px;
    text-align:center;
}

/* Grupo formulario */
.login-form-group{
    margin-bottom:22px;
}

/* Label */
.login-form-group label{
    display:block;
    color:#334155;
    font-weight:800;
    margin-bottom:10px;
}

/* Inputs */
.login-form-group input{
    width:100%;
    height:52px;
    border-radius:14px;
    border:1px solid #cbd5e1;
    background:#ffffff;
    color:#1e293b;
    padding:0 16px;
    outline:none;
    font-size:15px;
    box-sizing:border-box;
}

/* Focus input */
.login-form-group input:focus{
    border-color:#ff1f1f;
    box-shadow:0 0 0 4px rgba(255,31,31,.12);
}

/* Botón ingresar */
.btn-login{
    width:100%;
    height:54px;
    border:none;
    border-radius:14px;
    background:linear-gradient(135deg,#ff2525,#e00000);
    color:#ffffff;
    font-size:15px;
    font-weight:900;
    cursor:pointer;
    transition:.2s;
    box-shadow:0 16px 30px rgba(255,31,31,.30);
}

/* Hover botón */
.btn-login:hover{
    transform:translateY(-2px);
    opacity:.96;
}

/* Links */
.login-links{
    margin-top:20px;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:12px;
}

/* Texto links */
.login-links a{
    color:#ff1f1f;
    font-size:14px;
    text-decoration:none;
    transition:.2s;
}

/* Hover links */
.login-links a:hover{
    color:#b80000;
}

/* Footer */
.login-footer{
    text-align:center;
    color:#64748b;
    margin-top:28px;
    padding-top:20px;
    border-top:1px solid #e2e8f0;
    font-size:13px;
}

/* =========================================
   MODALES LOGIN
========================================= */

/* Overlay modal */
.modal-overlay,
#modalRestablecer,
#modalAltaUsuario{
    display:none;
}

/* Modal visible */
.modal-overlay[style*="flex"],
#modalRestablecer[style*="flex"],
#modalAltaUsuario[style*="flex"]{
    position:fixed;
    inset:0;
    display:flex !important;
    align-items:center;
    justify-content:center;
    background:rgba(15,23,42,.45);
    z-index:9999;
}

/* Caja modal */
.custom-modal{
    width:100%;
    max-width:460px;
    background:#ffffff;
    border-radius:24px;
    box-shadow:0 30px 80px rgba(15,23,42,.25);
    overflow:hidden;
}

/* Header modal */
.custom-modal-header{
    padding:22px;
    color:#e00000;
    font-size:22px;
    font-weight:900;
    text-align:center;
    border-bottom:1px solid #e2e8f0;
}

/* Body modal */
.custom-modal-body{
    padding:24px;
}

/* Footer modal */
.custom-modal-footer{
    padding:20px 24px;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    border-top:1px solid #e2e8f0;
}

/* Labels modal */
.modal-form-group label{
    display:block;
    color:#334155;
    font-weight:800;
    margin-bottom:8px;
}

/* Inputs modal */
.modal-form-group input{
    width:100%;
    height:48px;
    border-radius:14px;
    border:1px solid #cbd5e1;
    background:#ffffff;
    color:#1e293b;
    padding:0 14px;
    outline:none;
    box-sizing:border-box;
}

/* Focus modal */
.modal-form-group input:focus{
    border-color:#ff1f1f;
    box-shadow:0 0 0 4px rgba(255,31,31,.12);
}

/* Botón secundario modal */
.btn-modal-secondary{
    border:none;
    background:#e2e8f0;
    color:#334155;
    border-radius:12px;
    padding:12px 18px;
    cursor:pointer;
    font-weight:800;
}

/* Botón principal modal */
.btn-modal-primary{
    border:none;
    background:linear-gradient(135deg,#ff2525,#e00000);
    color:white;
    border-radius:12px;
    padding:12px 18px;
    cursor:pointer;
    font-weight:800;
}

/* CONTROL PRESENCIALIDAD - LOGIN MOBILE SCROLL V3 */
html,
body,
.login-body{
    height:auto !important;
    min-height:100vh !important;
}

.login-body{
    overflow-x:hidden !important;
    overflow-y:auto !important;
}

/* =========================================
   LOGIN RESPONSIVE FINAL
========================================= */
@media (max-width:768px){

    html,
    body,
    .login-body{
        width:100%;
        max-width:100%;
        overflow-x:hidden !important;
        overflow-y:auto !important;
    }

    .login-body{
        display:flex !important;
        align-items:flex-start !important;
        justify-content:center !important;
        padding:28px 16px 60px 16px !important;
        min-height:100vh !important;
        height:auto !important;
    }

    .login-body::before{
        width:620px !important;
        height:360px !important;
        top:-120px !important;
        left:-180px !important;
        transform:rotate(-7deg) !important;
        border-radius:0 0 58% 0 !important;
    }

    .login-container{
        width:100% !important;
        max-width:calc(100vw - 32px) !important;
        margin:0 auto !important;
        padding:34px 26px !important;
        border-radius:28px !important;
        overflow:hidden !important;
    }

    .logo-circle{
        width:82px !important;
        height:82px !important;
    }

    .login-title{
        font-size:28px !important;
        line-height:1.08 !important;
        word-break:normal !important;
    }

    .login-calendar,
    .login-dots,
    .login-dots-red{
        display:none !important;
    }
}

/* =========================================
   LOGIN - VALIDACION VISUAL Y COLOR ALTA
========================================= */

.input-error-login {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.login-error-campo {
    display: block;
    margin-top: 6px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
}

.login-color-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-color-wrap input[type="color"] {
    width: 48px;
    height: 42px;
    padding: 4px;
    border-radius: 12px;
    cursor: pointer;
}

.login-color-preview {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #3b82f6;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}


/* =========================================
   ALTA PUBLICA DE USUARIO
========================================= */

.alta-publica-container{
    width:100%;
    max-width:620px;
    background:#ffffff;
    border-radius:28px;
    padding:38px 42px;
    box-shadow:0 32px 90px rgba(15,23,42,.18);
    position:relative;
    z-index:5;
}

.alta-publica-header{
    text-align:center;
    margin-bottom:26px;
}

.alta-publica-title{
    margin:0;
    color:#e00000;
    font-size:30px;
    line-height:1.05;
    font-weight:900;
    text-transform:uppercase;
}

.alta-publica-subtitle{
    margin:10px 0 0 0;
    color:#64748b;
    font-size:15px;
    line-height:1.45;
}

.alta-publica-card{
    display:block !important;
}

#altaPublicaPage #modalAltaUsuario{
    display:block !important;
}

#altaPublicaPage .custom-modal{
    width:100%;
    max-width:none;
    box-shadow:none;
    border-radius:22px;
    border:1px solid #e2e8f0;
}

#altaPublicaPage .custom-modal-header{
    text-align:left;
    font-size:20px;
}

#altaPublicaPage .custom-modal-footer{
    justify-content:space-between;
    align-items:center;
}

.alta-publica-volver{
    color:#ff1f1f;
    font-weight:800;
    text-decoration:none;
    font-size:14px;
}

.alta-publica-volver:hover{
    color:#b80000;
}

.alta-publica-exito{
    display:none;
    padding:28px;
    border:1px solid #bbf7d0;
    background:#f0fdf4;
    border-radius:22px;
    text-align:center;
}

.alta-publica-exito-icono{
    width:70px;
    height:70px;
    margin:0 auto 16px auto;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#dcfce7;
    color:#15803d;
    font-size:34px;
    font-weight:900;
}

.alta-publica-exito h3{
    margin:0;
    color:#14532d;
    font-size:22px;
    font-weight:900;
}

.alta-publica-exito p{
    margin:10px 0 20px 0;
    color:#166534;
    font-size:15px;
    line-height:1.45;
}

.alta-publica-footer{
    margin-top:20px;
    text-align:center;
    color:#64748b;
    font-size:13px;
}

@media (max-width: 768px){
    .alta-publica-container{
        padding:30px 22px;
        max-width:390px;
        border-radius:26px;
    }

    .alta-publica-title{
        font-size:24px;
    }

    #altaPublicaPage .custom-modal-footer{
        flex-direction:column-reverse;
        align-items:stretch;
    }

    .alta-publica-volver{
        text-align:center;
        display:block;
    }
}
