/* === Contenedor general === */
.cr-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    width: 90vw;
    margin: 40px auto;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* === Columna izquierda con imagen === */
.cr-col-left {
    flex: 1 1 50%;
    min-height: 450px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* === Columna derecha (contenido funcional o mensaje) === */
.cr-col-right {
    flex: 1 1 50%;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
}

/* === Contenedor funcional (si está logueado) === */
.cr-container {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

/* === Botones === */
.cr-botones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    width: 100%; /* ocupa todo el ancho del contenedor padre */
    margin-bottom: 15px;
}

.cr-boton {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    background-color: #FDDA5F;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cr-boton:hover {
    background-color: #FFCC00;
}

.cr-boton-icon {
    width: 24px;
    height: 24px;
    margin-left: 8px;
}

/* === Responsivo de los botones === */
@media (max-width: 800px) {
    .cr-botones {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (max-width: 500px) {
    .cr-botones {
        grid-template-columns: 1fr;
    }

    .cr-boton-icon {
        width: 20px;
        height: 20px;
    }
}

/* === Formulario === */
#cr-form input,
#cr-form textarea,
#cr-form button {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    box-sizing: border-box;
}

#cr-form button {
    background-color: #0073aa;
    color: white;
    border: none;
    cursor: pointer;
}

#cr-form button:hover {
    background-color: #005f87;
}

/* === Mensaje === */
#cr-mensaje {
    margin-top: 10px;
    font-weight: bold;
    color: green;
}

/* === Mensaje de usuario no logueado === */
.cr-mensaje-no-login {
    position: relative;
    color: #000;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    max-width: 420px;
    margin: auto;
}

.cr-logo {
    position: absolute;
    top: -30px;
    left: 10px;
    width: 70px;
    height: auto;
}

/* === Modal de alerta === */
.cr-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.6);
}

.cr-modal-content {
    position: relative;
    background-color: #FDDA5F;
    color: #000;
    margin: 10% auto;
    padding: 40px 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-weight: bold;
}

.cr-logo-modal {
    width: 80px;
    margin-bottom: 10px;
}

.cr-boton-login {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.cr-boton-login:hover {
    background-color: #005f87;
}

.cr-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #000;
    font-size: 24px;
    cursor: pointer;
}

/* === Responsivo general === */
@media (max-width: 992px) {
    .cr-row {
        flex-direction: column;
        width: 95vw;
    }

    .cr-col-left, .cr-col-right {
        flex: 1 1 100%;
        min-height: 300px;
    }

    .cr-logo {
        width: 60px;
        top: -25px;
    }
}

@media (max-width: 600px) {
    .cr-col-right {
        padding: 25px;
    }

    .cr-logo {
        width: 50px;
        top: -20px;
    }
}
